forked from Cutlery/immich
chore: tree shake unused API methods from CLI (#6973)
This commit is contained in:
parent
954c1c2ef4
commit
aff71a10e5
4
cli/package-lock.json
generated
4
cli/package-lock.json
generated
@ -33,7 +33,7 @@
|
|||||||
"mock-fs": "^5.2.0",
|
"mock-fs": "^5.2.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^5.0.12",
|
"vite": "^5.0.12",
|
||||||
"vitest": "^1.2.1",
|
"vitest": "^1.2.2",
|
||||||
"yaml": "^2.3.1"
|
"yaml": "^2.3.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -47,6 +47,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.11.0",
|
"@types/node": "^20.11.0",
|
||||||
|
"oazapfts": "^5.1.4",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@ -6112,6 +6113,7 @@
|
|||||||
"version": "file:../open-api/typescript-sdk",
|
"version": "file:../open-api/typescript-sdk",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "^20.11.0",
|
"@types/node": "^20.11.0",
|
||||||
|
"oazapfts": "^5.1.4",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"mock-fs": "^5.2.0",
|
"mock-fs": "^5.2.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^5.0.12",
|
"vite": "^5.0.12",
|
||||||
"vitest": "^1.2.1",
|
"vitest": "^1.2.2",
|
||||||
"yaml": "^2.3.1"
|
"yaml": "^2.3.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { ServerVersionResponseDto, UserResponseDto } from '@immich/sdk';
|
import { ServerVersionResponseDto, UserResponseDto } from '@immich/sdk';
|
||||||
import { ImmichApi } from '../services/api.service';
|
|
||||||
import { SessionService } from '../services/session.service';
|
import { SessionService } from '../services/session.service';
|
||||||
|
import { ImmichApi } from 'src/services/api.service';
|
||||||
|
|
||||||
export abstract class BaseCommand {
|
export abstract class BaseCommand {
|
||||||
protected sessionService!: SessionService;
|
protected sessionService!: SessionService;
|
||||||
protected immichApi!: ImmichApi;
|
|
||||||
protected user!: UserResponseDto;
|
protected user!: UserResponseDto;
|
||||||
protected serverVersion!: ServerVersionResponseDto;
|
protected serverVersion!: ServerVersionResponseDto;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ export abstract class BaseCommand {
|
|||||||
this.sessionService = new SessionService(options.configDirectory);
|
this.sessionService = new SessionService(options.configDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async connect(): Promise<void> {
|
public async connect(): Promise<ImmichApi> {
|
||||||
this.immichApi = await this.sessionService.connect();
|
return await this.sessionService.connect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@ import { BaseCommand } from './base-command';
|
|||||||
|
|
||||||
export class ServerInfoCommand extends BaseCommand {
|
export class ServerInfoCommand extends BaseCommand {
|
||||||
public async run() {
|
public async run() {
|
||||||
await this.connect();
|
const api = await this.connect();
|
||||||
const versionInfo = await this.immichApi.serverInfoApi.getServerVersion();
|
const versionInfo = await api.getServerVersion();
|
||||||
const mediaTypes = await this.immichApi.serverInfoApi.getSupportedMediaTypes();
|
const mediaTypes = await api.getSupportedMediaTypes();
|
||||||
const statistics = await this.immichApi.assetApi.getAssetStatistics();
|
const statistics = await api.getAssetStatistics();
|
||||||
|
|
||||||
console.log(`Server Version: ${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`);
|
console.log(`Server Version: ${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`);
|
||||||
console.log(`Image Types: ${mediaTypes.image.map((extension) => extension.replace('.', ''))}`);
|
console.log(`Image Types: ${mediaTypes.image.map((extension) => extension.replace('.', ''))}`);
|
||||||
|
@ -7,7 +7,7 @@ import { basename } from 'node:path';
|
|||||||
import { access, constants, stat, unlink } from 'node:fs/promises';
|
import { access, constants, stat, unlink } from 'node:fs/promises';
|
||||||
import { createHash } from 'node:crypto';
|
import { createHash } from 'node:crypto';
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
import { UploadFileRequest } from '@immich/sdk';
|
import { ImmichApi } from 'src/services/api.service';
|
||||||
|
|
||||||
class Asset {
|
class Asset {
|
||||||
readonly path: string;
|
readonly path: string;
|
||||||
@ -33,7 +33,7 @@ class Asset {
|
|||||||
this.albumName = this.extractAlbumName();
|
this.albumName = this.extractAlbumName();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUploadFileRequest(): Promise<UploadFileRequest> {
|
async getUploadFormData(): Promise<FormData> {
|
||||||
if (!this.deviceAssetId) {
|
if (!this.deviceAssetId) {
|
||||||
throw new Error('Device asset id not set');
|
throw new Error('Device asset id not set');
|
||||||
}
|
}
|
||||||
@ -52,15 +52,25 @@ class Asset {
|
|||||||
sidecarData = new File([await fs.openAsBlob(sideCarPath)], basename(sideCarPath));
|
sidecarData = new File([await fs.openAsBlob(sideCarPath)], basename(sideCarPath));
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
return {
|
const data: any = {
|
||||||
assetData: new File([await fs.openAsBlob(this.path)], basename(this.path)),
|
assetData: new File([await fs.openAsBlob(this.path)], basename(this.path)),
|
||||||
deviceAssetId: this.deviceAssetId,
|
deviceAssetId: this.deviceAssetId,
|
||||||
deviceId: 'CLI',
|
deviceId: 'CLI',
|
||||||
fileCreatedAt: this.fileCreatedAt,
|
fileCreatedAt: this.fileCreatedAt,
|
||||||
fileModifiedAt: this.fileModifiedAt,
|
fileModifiedAt: this.fileModifiedAt,
|
||||||
isFavorite: false,
|
isFavorite: String(false),
|
||||||
sidecarData,
|
|
||||||
};
|
};
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
for (const property in data) {
|
||||||
|
formData.append(property, data[property]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sidecarData) {
|
||||||
|
formData.append('sidecarData', sidecarData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete(): Promise<void> {
|
async delete(): Promise<void> {
|
||||||
@ -101,9 +111,9 @@ export class UploadCommand extends BaseCommand {
|
|||||||
uploadLength!: number;
|
uploadLength!: number;
|
||||||
|
|
||||||
public async run(paths: string[], options: UploadOptionsDto): Promise<void> {
|
public async run(paths: string[], options: UploadOptionsDto): Promise<void> {
|
||||||
await this.connect();
|
const api = await this.connect();
|
||||||
|
|
||||||
const formatResponse = await this.immichApi.serverInfoApi.getSupportedMediaTypes();
|
const formatResponse = await api.getSupportedMediaTypes();
|
||||||
const crawlService = new CrawlService(formatResponse.image, formatResponse.video);
|
const crawlService = new CrawlService(formatResponse.image, formatResponse.video);
|
||||||
|
|
||||||
const inputFiles: string[] = [];
|
const inputFiles: string[] = [];
|
||||||
@ -153,7 +163,7 @@ export class UploadCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const existingAlbums = await this.immichApi.albumApi.getAllAlbums();
|
const existingAlbums = await api.getAllAlbums();
|
||||||
|
|
||||||
uploadProgress.start(totalSize, 0);
|
uploadProgress.start(totalSize, 0);
|
||||||
uploadProgress.update({ value_formatted: 0, total_formatted: byteSize(totalSize) });
|
uploadProgress.update({ value_formatted: 0, total_formatted: byteSize(totalSize) });
|
||||||
@ -172,9 +182,7 @@ export class UploadCommand extends BaseCommand {
|
|||||||
if (!options.skipHash) {
|
if (!options.skipHash) {
|
||||||
const assetBulkUploadCheckDto = { assets: [{ id: asset.path, checksum: await asset.hash() }] };
|
const assetBulkUploadCheckDto = { assets: [{ id: asset.path, checksum: await asset.hash() }] };
|
||||||
|
|
||||||
const checkResponse = await this.immichApi.assetApi.checkBulkUpload({
|
const checkResponse = await api.checkBulkUpload(assetBulkUploadCheckDto);
|
||||||
assetBulkUploadCheckDto,
|
|
||||||
});
|
|
||||||
|
|
||||||
skipUpload = checkResponse.results[0].action === 'reject';
|
skipUpload = checkResponse.results[0].action === 'reject';
|
||||||
|
|
||||||
@ -188,9 +196,10 @@ export class UploadCommand extends BaseCommand {
|
|||||||
|
|
||||||
if (!skipAsset && !options.dryRun) {
|
if (!skipAsset && !options.dryRun) {
|
||||||
if (!skipUpload) {
|
if (!skipUpload) {
|
||||||
const fileRequest = await asset.getUploadFileRequest();
|
const formData = await asset.getUploadFormData();
|
||||||
const response = await this.immichApi.assetApi.uploadFile(fileRequest);
|
const response = await this.uploadAsset(api, formData);
|
||||||
existingAssetId = response.id;
|
const json = await response.json();
|
||||||
|
existingAssetId = json.id;
|
||||||
uploadCounter++;
|
uploadCounter++;
|
||||||
totalSizeUploaded += asset.fileSize;
|
totalSizeUploaded += asset.fileSize;
|
||||||
}
|
}
|
||||||
@ -198,17 +207,14 @@ export class UploadCommand extends BaseCommand {
|
|||||||
if ((options.album || options.albumName) && asset.albumName !== undefined) {
|
if ((options.album || options.albumName) && asset.albumName !== undefined) {
|
||||||
let album = existingAlbums.find((album) => album.albumName === asset.albumName);
|
let album = existingAlbums.find((album) => album.albumName === asset.albumName);
|
||||||
if (!album) {
|
if (!album) {
|
||||||
const response = await this.immichApi.albumApi.createAlbum({
|
const response = await api.createAlbum({ albumName: asset.albumName });
|
||||||
createAlbumDto: { albumName: asset.albumName },
|
|
||||||
});
|
|
||||||
album = response;
|
album = response;
|
||||||
existingAlbums.push(album);
|
existingAlbums.push(album);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existingAssetId) {
|
if (existingAssetId) {
|
||||||
await this.immichApi.albumApi.addAssetsToAlbum({
|
await api.addAssetsToAlbum(album.id, {
|
||||||
id: album.id,
|
ids: [existingAssetId],
|
||||||
bulkIdsDto: { ids: [existingAssetId] },
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -248,4 +254,21 @@ export class UploadCommand extends BaseCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async uploadAsset(api: ImmichApi, data: FormData): Promise<Response> {
|
||||||
|
const url = api.instanceUrl + '/asset/upload';
|
||||||
|
|
||||||
|
const response = await fetch(url, {
|
||||||
|
method: 'post',
|
||||||
|
redirect: 'error',
|
||||||
|
headers: {
|
||||||
|
'x-api-key': api.apiKey,
|
||||||
|
},
|
||||||
|
body: data,
|
||||||
|
});
|
||||||
|
if (response.status !== 200 && response.status !== 201) {
|
||||||
|
throw new Error(await response.text());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,56 +1,106 @@
|
|||||||
import {
|
import {
|
||||||
AlbumApi,
|
addAssetsToAlbum,
|
||||||
APIKeyApi,
|
checkBulkUpload,
|
||||||
AssetApi,
|
createAlbum,
|
||||||
AuthenticationApi,
|
createApiKey,
|
||||||
Configuration,
|
getAllAlbums,
|
||||||
JobApi,
|
getAllAssets,
|
||||||
OAuthApi,
|
getAssetStatistics,
|
||||||
ServerInfoApi,
|
getMyUserInfo,
|
||||||
SystemConfigApi,
|
getServerVersion,
|
||||||
UserApi,
|
getSupportedMediaTypes,
|
||||||
|
login,
|
||||||
|
pingServer,
|
||||||
|
signUpAdmin,
|
||||||
|
uploadFile,
|
||||||
|
ApiKeyCreateDto,
|
||||||
|
AssetBulkUploadCheckDto,
|
||||||
|
BulkIdsDto,
|
||||||
|
CreateAlbumDto,
|
||||||
|
CreateAssetDto,
|
||||||
|
LoginCredentialDto,
|
||||||
|
SignUpDto,
|
||||||
} from '@immich/sdk';
|
} from '@immich/sdk';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps the underlying API to abstract away the options and make API calls mockable for testing.
|
||||||
|
*/
|
||||||
export class ImmichApi {
|
export class ImmichApi {
|
||||||
public userApi: UserApi;
|
private readonly options;
|
||||||
public albumApi: AlbumApi;
|
|
||||||
public assetApi: AssetApi;
|
|
||||||
public authenticationApi: AuthenticationApi;
|
|
||||||
public oauthApi: OAuthApi;
|
|
||||||
public serverInfoApi: ServerInfoApi;
|
|
||||||
public jobApi: JobApi;
|
|
||||||
public keyApi: APIKeyApi;
|
|
||||||
public systemConfigApi: SystemConfigApi;
|
|
||||||
|
|
||||||
private readonly config;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public instanceUrl: string,
|
public instanceUrl: string,
|
||||||
public apiKey: string,
|
public apiKey: string,
|
||||||
) {
|
) {
|
||||||
this.config = new Configuration({
|
this.options = {
|
||||||
basePath: instanceUrl,
|
baseUrl: instanceUrl,
|
||||||
headers: {
|
headers: {
|
||||||
'x-api-key': apiKey,
|
'x-api-key': apiKey,
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
this.userApi = new UserApi(this.config);
|
|
||||||
this.albumApi = new AlbumApi(this.config);
|
|
||||||
this.assetApi = new AssetApi(this.config);
|
|
||||||
this.authenticationApi = new AuthenticationApi(this.config);
|
|
||||||
this.oauthApi = new OAuthApi(this.config);
|
|
||||||
this.serverInfoApi = new ServerInfoApi(this.config);
|
|
||||||
this.jobApi = new JobApi(this.config);
|
|
||||||
this.keyApi = new APIKeyApi(this.config);
|
|
||||||
this.systemConfigApi = new SystemConfigApi(this.config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setApiKey(apiKey: string) {
|
setApiKey(apiKey: string) {
|
||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
if (!this.config.headers) {
|
if (!this.options.headers) {
|
||||||
throw new Error('missing headers');
|
throw new Error('missing headers');
|
||||||
}
|
}
|
||||||
this.config.headers['x-api-key'] = apiKey;
|
this.options.headers['x-api-key'] = apiKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
async addAssetsToAlbum(id: string, bulkIdsDto: BulkIdsDto) {
|
||||||
|
return await addAssetsToAlbum({ id, bulkIdsDto }, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkBulkUpload(assetBulkUploadCheckDto: AssetBulkUploadCheckDto) {
|
||||||
|
return await checkBulkUpload({ assetBulkUploadCheckDto }, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async createAlbum(createAlbumDto: CreateAlbumDto) {
|
||||||
|
return await createAlbum({ createAlbumDto }, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async createApiKey(apiKeyCreateDto: ApiKeyCreateDto, options: { headers: { Authorization: string } }) {
|
||||||
|
return await createApiKey({ apiKeyCreateDto }, { ...this.options, ...options });
|
||||||
|
}
|
||||||
|
|
||||||
|
async getAllAlbums() {
|
||||||
|
return await getAllAlbums({}, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getAllAssets() {
|
||||||
|
return await getAllAssets({}, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getAssetStatistics() {
|
||||||
|
return await getAssetStatistics({}, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getMyUserInfo() {
|
||||||
|
return await getMyUserInfo(this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getServerVersion() {
|
||||||
|
return await getServerVersion(this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async getSupportedMediaTypes() {
|
||||||
|
return await getSupportedMediaTypes(this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async login(loginCredentialDto: LoginCredentialDto) {
|
||||||
|
return await login({ loginCredentialDto }, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async pingServer() {
|
||||||
|
return await pingServer(this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async signUpAdmin(signUpDto: SignUpDto) {
|
||||||
|
return await signUpAdmin({ signUpDto }, this.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
async uploadFile(createAssetDto: CreateAssetDto) {
|
||||||
|
return await uploadFile({ createAssetDto }, this.options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,18 +12,20 @@ import {
|
|||||||
spyOnConsole,
|
spyOnConsole,
|
||||||
} from '../../test/cli-test-utils';
|
} from '../../test/cli-test-utils';
|
||||||
|
|
||||||
const mockPingServer = vi.fn(() => Promise.resolve({ res: 'pong' }));
|
const mocks = vi.hoisted(() => {
|
||||||
const mockUserInfo = vi.fn(() => Promise.resolve({ email: 'admin@example.com' }));
|
return {
|
||||||
|
getMyUserInfo: vi.fn(() => Promise.resolve({ email: 'admin@example.com' })),
|
||||||
|
pingServer: vi.fn(() => Promise.resolve({ res: 'pong' })),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
vi.mock('@immich/sdk', async () => ({
|
vi.mock('./api.service', async (importOriginal) => {
|
||||||
...(await vi.importActual('@immich/sdk')),
|
const module = await importOriginal<typeof import('./api.service')>();
|
||||||
UserApi: vi.fn().mockImplementation(() => {
|
// @ts-expect-error this is only a partial implementation of the return value
|
||||||
return { getMyUserInfo: mockUserInfo };
|
module.ImmichApi.prototype.getMyUserInfo = mocks.getMyUserInfo;
|
||||||
}),
|
module.ImmichApi.prototype.pingServer = mocks.pingServer;
|
||||||
ServerInfoApi: vi.fn().mockImplementation(() => {
|
return module;
|
||||||
return { pingServer: mockPingServer };
|
});
|
||||||
}),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('SessionService', () => {
|
describe('SessionService', () => {
|
||||||
let sessionService: SessionService;
|
let sessionService: SessionService;
|
||||||
@ -46,7 +48,7 @@ describe('SessionService', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await sessionService.connect();
|
await sessionService.connect();
|
||||||
expect(mockPingServer).toHaveBeenCalledTimes(1);
|
expect(mocks.pingServer).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should error if no auth file exists', async () => {
|
it('should error if no auth file exists', async () => {
|
||||||
|
@ -3,7 +3,6 @@ import { access, constants, mkdir, readFile, unlink, writeFile } from 'node:fs/p
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import yaml from 'yaml';
|
import yaml from 'yaml';
|
||||||
import { ImmichApi } from './api.service';
|
import { ImmichApi } from './api.service';
|
||||||
|
|
||||||
class LoginError extends Error {
|
class LoginError extends Error {
|
||||||
constructor(message: string) {
|
constructor(message: string) {
|
||||||
super(message);
|
super(message);
|
||||||
@ -51,12 +50,12 @@ export class SessionService {
|
|||||||
|
|
||||||
const api = new ImmichApi(instanceUrl, apiKey);
|
const api = new ImmichApi(instanceUrl, apiKey);
|
||||||
|
|
||||||
const pingResponse = await api.serverInfoApi.pingServer().catch((error) => {
|
const pingResponse = await api.pingServer().catch((error) => {
|
||||||
throw new Error(`Failed to connect to server ${api.instanceUrl}: ${error.message}`);
|
throw new Error(`Failed to connect to server ${instanceUrl}: ${error.message}`, error);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (pingResponse.res !== 'pong') {
|
if (pingResponse.res !== 'pong') {
|
||||||
throw new Error(`Could not parse response. Is Immich listening on ${api.instanceUrl}?`);
|
throw new Error(`Could not parse response. Is Immich listening on ${instanceUrl}?`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return api;
|
return api;
|
||||||
@ -68,7 +67,7 @@ export class SessionService {
|
|||||||
const api = new ImmichApi(instanceUrl, apiKey);
|
const api = new ImmichApi(instanceUrl, apiKey);
|
||||||
|
|
||||||
// Check if server and api key are valid
|
// Check if server and api key are valid
|
||||||
const userInfo = await api.userApi.getMyUserInfo().catch((error) => {
|
const userInfo = await api.getMyUserInfo().catch((error) => {
|
||||||
throw new LoginError(`Failed to connect to server ${instanceUrl}: ${error.message}`);
|
throw new LoginError(`Failed to connect to server ${instanceUrl}: ${error.message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { ImmichApi } from '../src/services/api.service';
|
import { ImmichApi } from 'src/services/api.service';
|
||||||
|
|
||||||
export const TEST_CONFIG_DIR = '/tmp/immich/';
|
export const TEST_CONFIG_DIR = '/tmp/immich/';
|
||||||
export const TEST_AUTH_FILE = path.join(TEST_CONFIG_DIR, 'auth.yml');
|
export const TEST_AUTH_FILE = path.join(TEST_CONFIG_DIR, 'auth.yml');
|
||||||
@ -11,14 +11,10 @@ export const CLI_BASE_OPTIONS = { configDirectory: TEST_CONFIG_DIR };
|
|||||||
|
|
||||||
export const setup = async () => {
|
export const setup = async () => {
|
||||||
const api = new ImmichApi(process.env.IMMICH_INSTANCE_URL as string, '');
|
const api = new ImmichApi(process.env.IMMICH_INSTANCE_URL as string, '');
|
||||||
await api.authenticationApi.signUpAdmin({
|
await api.signUpAdmin({ email: 'cli@immich.app', password: 'password', name: 'Administrator' });
|
||||||
signUpDto: { email: 'cli@immich.app', password: 'password', name: 'Administrator' },
|
const admin = await api.login({ email: 'cli@immich.app', password: 'password' });
|
||||||
});
|
const apiKey = await api.createApiKey(
|
||||||
const admin = await api.authenticationApi.login({
|
{ name: 'CLI Test' },
|
||||||
loginCredentialDto: { email: 'cli@immich.app', password: 'password' },
|
|
||||||
});
|
|
||||||
const apiKey = await api.keyApi.createApiKey(
|
|
||||||
{ aPIKeyCreateDto: { name: 'CLI Test' } },
|
|
||||||
{ headers: { Authorization: `Bearer ${admin.accessToken}` } },
|
{ headers: { Authorization: `Bearer ${admin.accessToken}` } },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ describe(`login-key (e2e)`, () => {
|
|||||||
|
|
||||||
it('should error when providing an invalid API key', async () => {
|
it('should error when providing an invalid API key', async () => {
|
||||||
await expect(new LoginCommand(CLI_BASE_OPTIONS).run(instanceUrl, 'invalid')).rejects.toThrow(
|
await expect(new LoginCommand(CLI_BASE_OPTIONS).run(instanceUrl, 'invalid')).rejects.toThrow(
|
||||||
`Failed to connect to server ${instanceUrl}: Response returned an error code`,
|
`Failed to connect to server ${instanceUrl}: Error: 401`,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IMMICH_TEST_ASSET_PATH, restoreTempFolder, testApp } from '@test-utils';
|
import { IMMICH_TEST_ASSET_PATH, restoreTempFolder, testApp } from '@test-utils';
|
||||||
import { CLI_BASE_OPTIONS, setup, spyOnConsole } from 'test/cli-test-utils';
|
import { CLI_BASE_OPTIONS, setup, spyOnConsole } from 'test/cli-test-utils';
|
||||||
import { UploadCommand } from '../../src/commands/upload.command';
|
import { UploadCommand } from '../../src/commands/upload.command';
|
||||||
import { ImmichApi } from '../../src/services/api.service';
|
import { ImmichApi } from 'src/services/api.service';
|
||||||
|
|
||||||
describe(`upload (e2e)`, () => {
|
describe(`upload (e2e)`, () => {
|
||||||
let api: ImmichApi;
|
let api: ImmichApi;
|
||||||
@ -26,13 +26,13 @@ describe(`upload (e2e)`, () => {
|
|||||||
|
|
||||||
it('should upload a folder recursively', async () => {
|
it('should upload a folder recursively', async () => {
|
||||||
await new UploadCommand(CLI_BASE_OPTIONS).run([`${IMMICH_TEST_ASSET_PATH}/albums/nature/`], { recursive: true });
|
await new UploadCommand(CLI_BASE_OPTIONS).run([`${IMMICH_TEST_ASSET_PATH}/albums/nature/`], { recursive: true });
|
||||||
const assets = await api.assetApi.getAllAssets({}, { headers: { 'x-api-key': api.apiKey } });
|
const assets = await api.getAllAssets();
|
||||||
expect(assets.length).toBeGreaterThan(4);
|
expect(assets.length).toBeGreaterThan(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not create a new album', async () => {
|
it('should not create a new album', async () => {
|
||||||
await new UploadCommand(CLI_BASE_OPTIONS).run([`${IMMICH_TEST_ASSET_PATH}/albums/nature/`], { recursive: true });
|
await new UploadCommand(CLI_BASE_OPTIONS).run([`${IMMICH_TEST_ASSET_PATH}/albums/nature/`], { recursive: true });
|
||||||
const albums = await api.albumApi.getAllAlbums({}, { headers: { 'x-api-key': api.apiKey } });
|
const albums = await api.getAllAlbums();
|
||||||
expect(albums.length).toEqual(0);
|
expect(albums.length).toEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ describe(`upload (e2e)`, () => {
|
|||||||
album: true,
|
album: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const albums = await api.albumApi.getAllAlbums({}, { headers: { 'x-api-key': api.apiKey } });
|
const albums = await api.getAllAlbums();
|
||||||
expect(albums.length).toEqual(1);
|
expect(albums.length).toEqual(1);
|
||||||
const natureAlbum = albums[0];
|
const natureAlbum = albums[0];
|
||||||
expect(natureAlbum.albumName).toEqual('nature');
|
expect(natureAlbum.albumName).toEqual('nature');
|
||||||
@ -59,7 +59,7 @@ describe(`upload (e2e)`, () => {
|
|||||||
album: true,
|
album: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const albums = await api.albumApi.getAllAlbums({}, { headers: { 'x-api-key': api.apiKey } });
|
const albums = await api.getAllAlbums();
|
||||||
expect(albums.length).toEqual(1);
|
expect(albums.length).toEqual(1);
|
||||||
const natureAlbum = albums[0];
|
const natureAlbum = albums[0];
|
||||||
expect(natureAlbum.albumName).toEqual('nature');
|
expect(natureAlbum.albumName).toEqual('nature');
|
||||||
@ -71,7 +71,7 @@ describe(`upload (e2e)`, () => {
|
|||||||
albumName: 'testAlbum',
|
albumName: 'testAlbum',
|
||||||
});
|
});
|
||||||
|
|
||||||
const albums = await api.albumApi.getAllAlbums({}, { headers: { 'x-api-key': api.apiKey } });
|
const albums = await api.getAllAlbums();
|
||||||
expect(albums.length).toEqual(1);
|
expect(albums.length).toEqual(1);
|
||||||
const testAlbum = albums[0];
|
const testAlbum = albums[0];
|
||||||
expect(testAlbum.albumName).toEqual('testAlbum');
|
expect(testAlbum.albumName).toEqual('testAlbum');
|
||||||
|
@ -19,7 +19,7 @@ function dart {
|
|||||||
function typescript {
|
function typescript {
|
||||||
rm -rf ./typescript-sdk/client
|
rm -rf ./typescript-sdk/client
|
||||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ./typescript-sdk/axios-client --additional-properties=useSingleRequestParameter=true,supportsES6=true
|
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ./typescript-sdk/axios-client --additional-properties=useSingleRequestParameter=true,supportsES6=true
|
||||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-fetch -i ./immich-openapi-specs.json -o ./typescript-sdk/fetch-client --additional-properties=useSingleRequestParameter=true,supportsES6=true
|
npx oazapfts --optimistic --argumentStyle=object immich-openapi-specs.json typescript-sdk/fetch-client.ts
|
||||||
npm --prefix typescript-sdk ci && npm --prefix typescript-sdk run build
|
npm --prefix typescript-sdk ci && npm --prefix typescript-sdk run build
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2526
open-api/typescript-sdk/fetch-client.ts
Normal file
2526
open-api/typescript-sdk/fetch-client.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
|||||||
# OpenAPI Generator Ignore
|
|
||||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
|
||||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
||||||
#ApiClient.cs
|
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
||||||
#foo/*/qux
|
|
||||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
||||||
#foo/**/qux
|
|
||||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
||||||
#docs/*.md
|
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
|
||||||
#!docs/README.md
|
|
@ -1,181 +0,0 @@
|
|||||||
apis/APIKeyApi.ts
|
|
||||||
apis/ActivityApi.ts
|
|
||||||
apis/AlbumApi.ts
|
|
||||||
apis/AssetApi.ts
|
|
||||||
apis/AuditApi.ts
|
|
||||||
apis/AuthenticationApi.ts
|
|
||||||
apis/DownloadApi.ts
|
|
||||||
apis/FaceApi.ts
|
|
||||||
apis/JobApi.ts
|
|
||||||
apis/LibraryApi.ts
|
|
||||||
apis/OAuthApi.ts
|
|
||||||
apis/PartnerApi.ts
|
|
||||||
apis/PersonApi.ts
|
|
||||||
apis/SearchApi.ts
|
|
||||||
apis/ServerInfoApi.ts
|
|
||||||
apis/SharedLinkApi.ts
|
|
||||||
apis/SystemConfigApi.ts
|
|
||||||
apis/TagApi.ts
|
|
||||||
apis/TrashApi.ts
|
|
||||||
apis/UserApi.ts
|
|
||||||
apis/index.ts
|
|
||||||
index.ts
|
|
||||||
models/APIKeyCreateDto.ts
|
|
||||||
models/APIKeyCreateResponseDto.ts
|
|
||||||
models/APIKeyResponseDto.ts
|
|
||||||
models/APIKeyUpdateDto.ts
|
|
||||||
models/ActivityCreateDto.ts
|
|
||||||
models/ActivityResponseDto.ts
|
|
||||||
models/ActivityStatisticsResponseDto.ts
|
|
||||||
models/AddUsersDto.ts
|
|
||||||
models/AlbumCountResponseDto.ts
|
|
||||||
models/AlbumResponseDto.ts
|
|
||||||
models/AllJobStatusResponseDto.ts
|
|
||||||
models/AssetBulkDeleteDto.ts
|
|
||||||
models/AssetBulkUpdateDto.ts
|
|
||||||
models/AssetBulkUploadCheckDto.ts
|
|
||||||
models/AssetBulkUploadCheckItem.ts
|
|
||||||
models/AssetBulkUploadCheckResponseDto.ts
|
|
||||||
models/AssetBulkUploadCheckResult.ts
|
|
||||||
models/AssetFaceResponseDto.ts
|
|
||||||
models/AssetFaceUpdateDto.ts
|
|
||||||
models/AssetFaceUpdateItem.ts
|
|
||||||
models/AssetFaceWithoutPersonResponseDto.ts
|
|
||||||
models/AssetFileUploadResponseDto.ts
|
|
||||||
models/AssetIdsDto.ts
|
|
||||||
models/AssetIdsResponseDto.ts
|
|
||||||
models/AssetJobName.ts
|
|
||||||
models/AssetJobsDto.ts
|
|
||||||
models/AssetOrder.ts
|
|
||||||
models/AssetResponseDto.ts
|
|
||||||
models/AssetStatsResponseDto.ts
|
|
||||||
models/AssetTypeEnum.ts
|
|
||||||
models/AudioCodec.ts
|
|
||||||
models/AuditDeletesResponseDto.ts
|
|
||||||
models/AuthDeviceResponseDto.ts
|
|
||||||
models/BulkIdResponseDto.ts
|
|
||||||
models/BulkIdsDto.ts
|
|
||||||
models/CLIPConfig.ts
|
|
||||||
models/CLIPMode.ts
|
|
||||||
models/CQMode.ts
|
|
||||||
models/ChangePasswordDto.ts
|
|
||||||
models/CheckExistingAssetsDto.ts
|
|
||||||
models/CheckExistingAssetsResponseDto.ts
|
|
||||||
models/Colorspace.ts
|
|
||||||
models/CreateAlbumDto.ts
|
|
||||||
models/CreateLibraryDto.ts
|
|
||||||
models/CreateProfileImageResponseDto.ts
|
|
||||||
models/CreateTagDto.ts
|
|
||||||
models/CreateUserDto.ts
|
|
||||||
models/CuratedLocationsResponseDto.ts
|
|
||||||
models/CuratedObjectsResponseDto.ts
|
|
||||||
models/DownloadArchiveInfo.ts
|
|
||||||
models/DownloadInfoDto.ts
|
|
||||||
models/DownloadResponseDto.ts
|
|
||||||
models/EntityType.ts
|
|
||||||
models/ExifResponseDto.ts
|
|
||||||
models/FaceDto.ts
|
|
||||||
models/FileChecksumDto.ts
|
|
||||||
models/FileChecksumResponseDto.ts
|
|
||||||
models/FileReportDto.ts
|
|
||||||
models/FileReportFixDto.ts
|
|
||||||
models/FileReportItemDto.ts
|
|
||||||
models/JobCommand.ts
|
|
||||||
models/JobCommandDto.ts
|
|
||||||
models/JobCountsDto.ts
|
|
||||||
models/JobName.ts
|
|
||||||
models/JobSettingsDto.ts
|
|
||||||
models/JobStatusDto.ts
|
|
||||||
models/LibraryResponseDto.ts
|
|
||||||
models/LibraryStatsResponseDto.ts
|
|
||||||
models/LibraryType.ts
|
|
||||||
models/LogLevel.ts
|
|
||||||
models/LoginCredentialDto.ts
|
|
||||||
models/LoginResponseDto.ts
|
|
||||||
models/LogoutResponseDto.ts
|
|
||||||
models/MapMarkerResponseDto.ts
|
|
||||||
models/MapTheme.ts
|
|
||||||
models/MemoryLaneResponseDto.ts
|
|
||||||
models/MergePersonDto.ts
|
|
||||||
models/ModelType.ts
|
|
||||||
models/OAuthAuthorizeResponseDto.ts
|
|
||||||
models/OAuthCallbackDto.ts
|
|
||||||
models/OAuthConfigDto.ts
|
|
||||||
models/PartnerResponseDto.ts
|
|
||||||
models/PathEntityType.ts
|
|
||||||
models/PathType.ts
|
|
||||||
models/PeopleResponseDto.ts
|
|
||||||
models/PeopleUpdateDto.ts
|
|
||||||
models/PeopleUpdateItem.ts
|
|
||||||
models/PersonResponseDto.ts
|
|
||||||
models/PersonStatisticsResponseDto.ts
|
|
||||||
models/PersonUpdateDto.ts
|
|
||||||
models/PersonWithFacesResponseDto.ts
|
|
||||||
models/QueueStatusDto.ts
|
|
||||||
models/ReactionLevel.ts
|
|
||||||
models/ReactionType.ts
|
|
||||||
models/RecognitionConfig.ts
|
|
||||||
models/ScanLibraryDto.ts
|
|
||||||
models/SearchAlbumResponseDto.ts
|
|
||||||
models/SearchAssetResponseDto.ts
|
|
||||||
models/SearchExploreItem.ts
|
|
||||||
models/SearchExploreResponseDto.ts
|
|
||||||
models/SearchFacetCountResponseDto.ts
|
|
||||||
models/SearchFacetResponseDto.ts
|
|
||||||
models/SearchResponseDto.ts
|
|
||||||
models/ServerConfigDto.ts
|
|
||||||
models/ServerFeaturesDto.ts
|
|
||||||
models/ServerInfoResponseDto.ts
|
|
||||||
models/ServerMediaTypesResponseDto.ts
|
|
||||||
models/ServerPingResponse.ts
|
|
||||||
models/ServerStatsResponseDto.ts
|
|
||||||
models/ServerThemeDto.ts
|
|
||||||
models/ServerVersionResponseDto.ts
|
|
||||||
models/SharedLinkCreateDto.ts
|
|
||||||
models/SharedLinkEditDto.ts
|
|
||||||
models/SharedLinkResponseDto.ts
|
|
||||||
models/SharedLinkType.ts
|
|
||||||
models/SignUpDto.ts
|
|
||||||
models/SmartInfoResponseDto.ts
|
|
||||||
models/SystemConfigDto.ts
|
|
||||||
models/SystemConfigFFmpegDto.ts
|
|
||||||
models/SystemConfigJobDto.ts
|
|
||||||
models/SystemConfigLibraryDto.ts
|
|
||||||
models/SystemConfigLibraryScanDto.ts
|
|
||||||
models/SystemConfigLibraryWatchDto.ts
|
|
||||||
models/SystemConfigLoggingDto.ts
|
|
||||||
models/SystemConfigMachineLearningDto.ts
|
|
||||||
models/SystemConfigMapDto.ts
|
|
||||||
models/SystemConfigNewVersionCheckDto.ts
|
|
||||||
models/SystemConfigOAuthDto.ts
|
|
||||||
models/SystemConfigPasswordLoginDto.ts
|
|
||||||
models/SystemConfigReverseGeocodingDto.ts
|
|
||||||
models/SystemConfigServerDto.ts
|
|
||||||
models/SystemConfigStorageTemplateDto.ts
|
|
||||||
models/SystemConfigTemplateStorageOptionDto.ts
|
|
||||||
models/SystemConfigThemeDto.ts
|
|
||||||
models/SystemConfigThumbnailDto.ts
|
|
||||||
models/SystemConfigTrashDto.ts
|
|
||||||
models/TagResponseDto.ts
|
|
||||||
models/TagTypeEnum.ts
|
|
||||||
models/ThumbnailFormat.ts
|
|
||||||
models/TimeBucketResponseDto.ts
|
|
||||||
models/TimeBucketSize.ts
|
|
||||||
models/ToneMapping.ts
|
|
||||||
models/TranscodeHWAccel.ts
|
|
||||||
models/TranscodePolicy.ts
|
|
||||||
models/UpdateAlbumDto.ts
|
|
||||||
models/UpdateAssetDto.ts
|
|
||||||
models/UpdateLibraryDto.ts
|
|
||||||
models/UpdatePartnerDto.ts
|
|
||||||
models/UpdateStackParentDto.ts
|
|
||||||
models/UpdateTagDto.ts
|
|
||||||
models/UpdateUserDto.ts
|
|
||||||
models/UsageByUserDto.ts
|
|
||||||
models/UserAvatarColor.ts
|
|
||||||
models/UserDto.ts
|
|
||||||
models/UserResponseDto.ts
|
|
||||||
models/ValidateAccessTokenResponseDto.ts
|
|
||||||
models/VideoCodec.ts
|
|
||||||
models/index.ts
|
|
||||||
runtime.ts
|
|
@ -1 +0,0 @@
|
|||||||
7.2.0
|
|
@ -1,261 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
APIKeyCreateDto,
|
|
||||||
APIKeyCreateResponseDto,
|
|
||||||
APIKeyResponseDto,
|
|
||||||
APIKeyUpdateDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
APIKeyCreateDtoFromJSON,
|
|
||||||
APIKeyCreateDtoToJSON,
|
|
||||||
APIKeyCreateResponseDtoFromJSON,
|
|
||||||
APIKeyCreateResponseDtoToJSON,
|
|
||||||
APIKeyResponseDtoFromJSON,
|
|
||||||
APIKeyResponseDtoToJSON,
|
|
||||||
APIKeyUpdateDtoFromJSON,
|
|
||||||
APIKeyUpdateDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreateApiKeyRequest {
|
|
||||||
aPIKeyCreateDto: APIKeyCreateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteApiKeyRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetApiKeyRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateApiKeyRequest {
|
|
||||||
id: string;
|
|
||||||
aPIKeyUpdateDto: APIKeyUpdateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class APIKeyApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createApiKeyRaw(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyCreateResponseDto>> {
|
|
||||||
if (requestParameters.aPIKeyCreateDto === null || requestParameters.aPIKeyCreateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('aPIKeyCreateDto','Required parameter requestParameters.aPIKeyCreateDto was null or undefined when calling createApiKey.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/api-key`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: APIKeyCreateDtoToJSON(requestParameters.aPIKeyCreateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => APIKeyCreateResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createApiKey(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyCreateResponseDto> {
|
|
||||||
const response = await this.createApiKeyRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteApiKeyRaw(requestParameters: DeleteApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteApiKey.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/api-key/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteApiKey(requestParameters: DeleteApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteApiKeyRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getApiKeyRaw(requestParameters: GetApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getApiKey.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/api-key/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => APIKeyResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getApiKey(requestParameters: GetApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyResponseDto> {
|
|
||||||
const response = await this.getApiKeyRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getApiKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<APIKeyResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/api-key`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(APIKeyResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getApiKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<APIKeyResponseDto>> {
|
|
||||||
const response = await this.getApiKeysRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateApiKeyRaw(requestParameters: UpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<APIKeyResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateApiKey.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.aPIKeyUpdateDto === null || requestParameters.aPIKeyUpdateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('aPIKeyUpdateDto','Required parameter requestParameters.aPIKeyUpdateDto was null or undefined when calling updateApiKey.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/api-key/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: APIKeyUpdateDtoToJSON(requestParameters.aPIKeyUpdateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => APIKeyResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateApiKey(requestParameters: UpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<APIKeyResponseDto> {
|
|
||||||
const response = await this.updateApiKeyRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,253 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
ActivityCreateDto,
|
|
||||||
ActivityResponseDto,
|
|
||||||
ActivityStatisticsResponseDto,
|
|
||||||
ReactionLevel,
|
|
||||||
ReactionType,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
ActivityCreateDtoFromJSON,
|
|
||||||
ActivityCreateDtoToJSON,
|
|
||||||
ActivityResponseDtoFromJSON,
|
|
||||||
ActivityResponseDtoToJSON,
|
|
||||||
ActivityStatisticsResponseDtoFromJSON,
|
|
||||||
ActivityStatisticsResponseDtoToJSON,
|
|
||||||
ReactionLevelFromJSON,
|
|
||||||
ReactionLevelToJSON,
|
|
||||||
ReactionTypeFromJSON,
|
|
||||||
ReactionTypeToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreateActivityRequest {
|
|
||||||
activityCreateDto: ActivityCreateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteActivityRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetActivitiesRequest {
|
|
||||||
albumId: string;
|
|
||||||
assetId?: string;
|
|
||||||
level?: ReactionLevel;
|
|
||||||
type?: ReactionType;
|
|
||||||
userId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetActivityStatisticsRequest {
|
|
||||||
albumId: string;
|
|
||||||
assetId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class ActivityApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createActivityRaw(requestParameters: CreateActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ActivityResponseDto>> {
|
|
||||||
if (requestParameters.activityCreateDto === null || requestParameters.activityCreateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('activityCreateDto','Required parameter requestParameters.activityCreateDto was null or undefined when calling createActivity.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/activity`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: ActivityCreateDtoToJSON(requestParameters.activityCreateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ActivityResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createActivity(requestParameters: CreateActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ActivityResponseDto> {
|
|
||||||
const response = await this.createActivityRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteActivityRaw(requestParameters: DeleteActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteActivity.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/activity/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteActivity(requestParameters: DeleteActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteActivityRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getActivitiesRaw(requestParameters: GetActivitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ActivityResponseDto>>> {
|
|
||||||
if (requestParameters.albumId === null || requestParameters.albumId === undefined) {
|
|
||||||
throw new runtime.RequiredError('albumId','Required parameter requestParameters.albumId was null or undefined when calling getActivities.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.albumId !== undefined) {
|
|
||||||
queryParameters['albumId'] = requestParameters.albumId;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetId !== undefined) {
|
|
||||||
queryParameters['assetId'] = requestParameters.assetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.level !== undefined) {
|
|
||||||
queryParameters['level'] = requestParameters.level;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.type !== undefined) {
|
|
||||||
queryParameters['type'] = requestParameters.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.userId !== undefined) {
|
|
||||||
queryParameters['userId'] = requestParameters.userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/activity`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ActivityResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getActivities(requestParameters: GetActivitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ActivityResponseDto>> {
|
|
||||||
const response = await this.getActivitiesRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getActivityStatisticsRaw(requestParameters: GetActivityStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ActivityStatisticsResponseDto>> {
|
|
||||||
if (requestParameters.albumId === null || requestParameters.albumId === undefined) {
|
|
||||||
throw new runtime.RequiredError('albumId','Required parameter requestParameters.albumId was null or undefined when calling getActivityStatistics.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.albumId !== undefined) {
|
|
||||||
queryParameters['albumId'] = requestParameters.albumId;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetId !== undefined) {
|
|
||||||
queryParameters['assetId'] = requestParameters.assetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/activity/statistics`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ActivityStatisticsResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getActivityStatistics(requestParameters: GetActivityStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ActivityStatisticsResponseDto> {
|
|
||||||
const response = await this.getActivityStatisticsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,538 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AddUsersDto,
|
|
||||||
AlbumCountResponseDto,
|
|
||||||
AlbumResponseDto,
|
|
||||||
BulkIdResponseDto,
|
|
||||||
BulkIdsDto,
|
|
||||||
CreateAlbumDto,
|
|
||||||
UpdateAlbumDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AddUsersDtoFromJSON,
|
|
||||||
AddUsersDtoToJSON,
|
|
||||||
AlbumCountResponseDtoFromJSON,
|
|
||||||
AlbumCountResponseDtoToJSON,
|
|
||||||
AlbumResponseDtoFromJSON,
|
|
||||||
AlbumResponseDtoToJSON,
|
|
||||||
BulkIdResponseDtoFromJSON,
|
|
||||||
BulkIdResponseDtoToJSON,
|
|
||||||
BulkIdsDtoFromJSON,
|
|
||||||
BulkIdsDtoToJSON,
|
|
||||||
CreateAlbumDtoFromJSON,
|
|
||||||
CreateAlbumDtoToJSON,
|
|
||||||
UpdateAlbumDtoFromJSON,
|
|
||||||
UpdateAlbumDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface AddAssetsToAlbumRequest {
|
|
||||||
id: string;
|
|
||||||
bulkIdsDto: BulkIdsDto;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AddUsersToAlbumRequest {
|
|
||||||
id: string;
|
|
||||||
addUsersDto: AddUsersDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateAlbumRequest {
|
|
||||||
createAlbumDto: CreateAlbumDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteAlbumRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAlbumInfoRequest {
|
|
||||||
id: string;
|
|
||||||
key?: string;
|
|
||||||
withoutAssets?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAllAlbumsRequest {
|
|
||||||
assetId?: string;
|
|
||||||
shared?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveAssetFromAlbumRequest {
|
|
||||||
id: string;
|
|
||||||
bulkIdsDto: BulkIdsDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveUserFromAlbumRequest {
|
|
||||||
id: string;
|
|
||||||
userId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateAlbumInfoRequest {
|
|
||||||
id: string;
|
|
||||||
updateAlbumDto: UpdateAlbumDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class AlbumApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addAssetsToAlbumRaw(requestParameters: AddAssetsToAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BulkIdResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling addAssetsToAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.bulkIdsDto === null || requestParameters.bulkIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('bulkIdsDto','Required parameter requestParameters.bulkIdsDto was null or undefined when calling addAssetsToAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: BulkIdsDtoToJSON(requestParameters.bulkIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BulkIdResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addAssetsToAlbum(requestParameters: AddAssetsToAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BulkIdResponseDto>> {
|
|
||||||
const response = await this.addAssetsToAlbumRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addUsersToAlbumRaw(requestParameters: AddUsersToAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AlbumResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling addUsersToAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.addUsersDto === null || requestParameters.addUsersDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('addUsersDto','Required parameter requestParameters.addUsersDto was null or undefined when calling addUsersToAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}/users`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AddUsersDtoToJSON(requestParameters.addUsersDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AlbumResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addUsersToAlbum(requestParameters: AddUsersToAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AlbumResponseDto> {
|
|
||||||
const response = await this.addUsersToAlbumRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createAlbumRaw(requestParameters: CreateAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AlbumResponseDto>> {
|
|
||||||
if (requestParameters.createAlbumDto === null || requestParameters.createAlbumDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('createAlbumDto','Required parameter requestParameters.createAlbumDto was null or undefined when calling createAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: CreateAlbumDtoToJSON(requestParameters.createAlbumDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AlbumResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createAlbum(requestParameters: CreateAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AlbumResponseDto> {
|
|
||||||
const response = await this.createAlbumRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteAlbumRaw(requestParameters: DeleteAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteAlbum(requestParameters: DeleteAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteAlbumRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAlbumCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AlbumCountResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/count`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AlbumCountResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAlbumCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AlbumCountResponseDto> {
|
|
||||||
const response = await this.getAlbumCountRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAlbumInfoRaw(requestParameters: GetAlbumInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AlbumResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getAlbumInfo.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.withoutAssets !== undefined) {
|
|
||||||
queryParameters['withoutAssets'] = requestParameters.withoutAssets;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AlbumResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAlbumInfo(requestParameters: GetAlbumInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AlbumResponseDto> {
|
|
||||||
const response = await this.getAlbumInfoRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllAlbumsRaw(requestParameters: GetAllAlbumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AlbumResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.assetId !== undefined) {
|
|
||||||
queryParameters['assetId'] = requestParameters.assetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.shared !== undefined) {
|
|
||||||
queryParameters['shared'] = requestParameters.shared;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AlbumResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllAlbums(requestParameters: GetAllAlbumsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AlbumResponseDto>> {
|
|
||||||
const response = await this.getAllAlbumsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeAssetFromAlbumRaw(requestParameters: RemoveAssetFromAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BulkIdResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removeAssetFromAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.bulkIdsDto === null || requestParameters.bulkIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('bulkIdsDto','Required parameter requestParameters.bulkIdsDto was null or undefined when calling removeAssetFromAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: BulkIdsDtoToJSON(requestParameters.bulkIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BulkIdResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeAssetFromAlbum(requestParameters: RemoveAssetFromAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BulkIdResponseDto>> {
|
|
||||||
const response = await this.removeAssetFromAlbumRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeUserFromAlbumRaw(requestParameters: RemoveUserFromAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removeUserFromAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.userId === null || requestParameters.userId === undefined) {
|
|
||||||
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeUserFromAlbum.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}/user/{userId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeUserFromAlbum(requestParameters: RemoveUserFromAlbumRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.removeUserFromAlbumRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateAlbumInfoRaw(requestParameters: UpdateAlbumInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AlbumResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateAlbumInfo.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.updateAlbumDto === null || requestParameters.updateAlbumDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('updateAlbumDto','Required parameter requestParameters.updateAlbumDto was null or undefined when calling updateAlbumInfo.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/album/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PATCH',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: UpdateAlbumDtoToJSON(requestParameters.updateAlbumDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AlbumResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateAlbumInfo(requestParameters: UpdateAlbumInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AlbumResponseDto> {
|
|
||||||
const response = await this.updateAlbumInfoRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,236 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AuditDeletesResponseDto,
|
|
||||||
EntityType,
|
|
||||||
FileChecksumDto,
|
|
||||||
FileChecksumResponseDto,
|
|
||||||
FileReportDto,
|
|
||||||
FileReportFixDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AuditDeletesResponseDtoFromJSON,
|
|
||||||
AuditDeletesResponseDtoToJSON,
|
|
||||||
EntityTypeFromJSON,
|
|
||||||
EntityTypeToJSON,
|
|
||||||
FileChecksumDtoFromJSON,
|
|
||||||
FileChecksumDtoToJSON,
|
|
||||||
FileChecksumResponseDtoFromJSON,
|
|
||||||
FileChecksumResponseDtoToJSON,
|
|
||||||
FileReportDtoFromJSON,
|
|
||||||
FileReportDtoToJSON,
|
|
||||||
FileReportFixDtoFromJSON,
|
|
||||||
FileReportFixDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface FixAuditFilesRequest {
|
|
||||||
fileReportFixDto: FileReportFixDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAuditDeletesRequest {
|
|
||||||
after: Date;
|
|
||||||
entityType: EntityType;
|
|
||||||
userId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetFileChecksumsRequest {
|
|
||||||
fileChecksumDto: FileChecksumDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class AuditApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async fixAuditFilesRaw(requestParameters: FixAuditFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.fileReportFixDto === null || requestParameters.fileReportFixDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('fileReportFixDto','Required parameter requestParameters.fileReportFixDto was null or undefined when calling fixAuditFiles.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/audit/file-report/fix`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: FileReportFixDtoToJSON(requestParameters.fileReportFixDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async fixAuditFiles(requestParameters: FixAuditFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.fixAuditFilesRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuditDeletesRaw(requestParameters: GetAuditDeletesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuditDeletesResponseDto>> {
|
|
||||||
if (requestParameters.after === null || requestParameters.after === undefined) {
|
|
||||||
throw new runtime.RequiredError('after','Required parameter requestParameters.after was null or undefined when calling getAuditDeletes.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.entityType === null || requestParameters.entityType === undefined) {
|
|
||||||
throw new runtime.RequiredError('entityType','Required parameter requestParameters.entityType was null or undefined when calling getAuditDeletes.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.after !== undefined) {
|
|
||||||
queryParameters['after'] = (requestParameters.after as any).toISOString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.entityType !== undefined) {
|
|
||||||
queryParameters['entityType'] = requestParameters.entityType;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.userId !== undefined) {
|
|
||||||
queryParameters['userId'] = requestParameters.userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/audit/deletes`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AuditDeletesResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuditDeletes(requestParameters: GetAuditDeletesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuditDeletesResponseDto> {
|
|
||||||
const response = await this.getAuditDeletesRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuditFilesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileReportDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/audit/file-report`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => FileReportDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuditFiles(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileReportDto> {
|
|
||||||
const response = await this.getAuditFilesRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getFileChecksumsRaw(requestParameters: GetFileChecksumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FileChecksumResponseDto>>> {
|
|
||||||
if (requestParameters.fileChecksumDto === null || requestParameters.fileChecksumDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('fileChecksumDto','Required parameter requestParameters.fileChecksumDto was null or undefined when calling getFileChecksums.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/audit/file-report/checksum`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: FileChecksumDtoToJSON(requestParameters.fileChecksumDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileChecksumResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getFileChecksums(requestParameters: GetFileChecksumsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileChecksumResponseDto>> {
|
|
||||||
const response = await this.getFileChecksumsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,354 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AuthDeviceResponseDto,
|
|
||||||
ChangePasswordDto,
|
|
||||||
LoginCredentialDto,
|
|
||||||
LoginResponseDto,
|
|
||||||
LogoutResponseDto,
|
|
||||||
SignUpDto,
|
|
||||||
UserResponseDto,
|
|
||||||
ValidateAccessTokenResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AuthDeviceResponseDtoFromJSON,
|
|
||||||
AuthDeviceResponseDtoToJSON,
|
|
||||||
ChangePasswordDtoFromJSON,
|
|
||||||
ChangePasswordDtoToJSON,
|
|
||||||
LoginCredentialDtoFromJSON,
|
|
||||||
LoginCredentialDtoToJSON,
|
|
||||||
LoginResponseDtoFromJSON,
|
|
||||||
LoginResponseDtoToJSON,
|
|
||||||
LogoutResponseDtoFromJSON,
|
|
||||||
LogoutResponseDtoToJSON,
|
|
||||||
SignUpDtoFromJSON,
|
|
||||||
SignUpDtoToJSON,
|
|
||||||
UserResponseDtoFromJSON,
|
|
||||||
UserResponseDtoToJSON,
|
|
||||||
ValidateAccessTokenResponseDtoFromJSON,
|
|
||||||
ValidateAccessTokenResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface ChangePasswordRequest {
|
|
||||||
changePasswordDto: ChangePasswordDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LoginRequest {
|
|
||||||
loginCredentialDto: LoginCredentialDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LogoutAuthDeviceRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SignUpAdminRequest {
|
|
||||||
signUpDto: SignUpDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class AuthenticationApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async changePasswordRaw(requestParameters: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.changePasswordDto === null || requestParameters.changePasswordDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('changePasswordDto','Required parameter requestParameters.changePasswordDto was null or undefined when calling changePassword.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/change-password`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: ChangePasswordDtoToJSON(requestParameters.changePasswordDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async changePassword(requestParameters: ChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.changePasswordRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuthDevicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AuthDeviceResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/devices`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AuthDeviceResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAuthDevices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AuthDeviceResponseDto>> {
|
|
||||||
const response = await this.getAuthDevicesRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginResponseDto>> {
|
|
||||||
if (requestParameters.loginCredentialDto === null || requestParameters.loginCredentialDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('loginCredentialDto','Required parameter requestParameters.loginCredentialDto was null or undefined when calling login.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/login`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: LoginCredentialDtoToJSON(requestParameters.loginCredentialDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async login(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginResponseDto> {
|
|
||||||
const response = await this.loginRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LogoutResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/logout`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LogoutResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LogoutResponseDto> {
|
|
||||||
const response = await this.logoutRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logoutAuthDeviceRaw(requestParameters: LogoutAuthDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling logoutAuthDevice.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/devices/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logoutAuthDevice(requestParameters: LogoutAuthDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.logoutAuthDeviceRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logoutAuthDevicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/devices`,
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async logoutAuthDevices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.logoutAuthDevicesRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async signUpAdminRaw(requestParameters: SignUpAdminRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.signUpDto === null || requestParameters.signUpDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('signUpDto','Required parameter requestParameters.signUpDto was null or undefined when calling signUpAdmin.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/admin-sign-up`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: SignUpDtoToJSON(requestParameters.signUpDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async signUpAdmin(requestParameters: SignUpAdminRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.signUpAdminRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async validateAccessTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValidateAccessTokenResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/auth/validateToken`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ValidateAccessTokenResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async validateAccessToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValidateAccessTokenResponseDto> {
|
|
||||||
const response = await this.validateAccessTokenRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,189 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AssetIdsDto,
|
|
||||||
DownloadInfoDto,
|
|
||||||
DownloadResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AssetIdsDtoFromJSON,
|
|
||||||
AssetIdsDtoToJSON,
|
|
||||||
DownloadInfoDtoFromJSON,
|
|
||||||
DownloadInfoDtoToJSON,
|
|
||||||
DownloadResponseDtoFromJSON,
|
|
||||||
DownloadResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface DownloadArchiveRequest {
|
|
||||||
assetIdsDto: AssetIdsDto;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DownloadFileRequest {
|
|
||||||
id: string;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetDownloadInfoRequest {
|
|
||||||
downloadInfoDto: DownloadInfoDto;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class DownloadApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async downloadArchiveRaw(requestParameters: DownloadArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
||||||
if (requestParameters.assetIdsDto === null || requestParameters.assetIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetIdsDto','Required parameter requestParameters.assetIdsDto was null or undefined when calling downloadArchive.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/download/archive`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetIdsDtoToJSON(requestParameters.assetIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.BlobApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async downloadArchive(requestParameters: DownloadArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
||||||
const response = await this.downloadArchiveRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async downloadFileRaw(requestParameters: DownloadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling downloadFile.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/download/asset/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.BlobApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async downloadFile(requestParameters: DownloadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
||||||
const response = await this.downloadFileRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getDownloadInfoRaw(requestParameters: GetDownloadInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadResponseDto>> {
|
|
||||||
if (requestParameters.downloadInfoDto === null || requestParameters.downloadInfoDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('downloadInfoDto','Required parameter requestParameters.downloadInfoDto was null or undefined when calling getDownloadInfo.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/download/info`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: DownloadInfoDtoToJSON(requestParameters.downloadInfoDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => DownloadResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getDownloadInfo(requestParameters: GetDownloadInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadResponseDto> {
|
|
||||||
const response = await this.getDownloadInfoRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,136 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AssetFaceResponseDto,
|
|
||||||
FaceDto,
|
|
||||||
PersonResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AssetFaceResponseDtoFromJSON,
|
|
||||||
AssetFaceResponseDtoToJSON,
|
|
||||||
FaceDtoFromJSON,
|
|
||||||
FaceDtoToJSON,
|
|
||||||
PersonResponseDtoFromJSON,
|
|
||||||
PersonResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface GetFacesRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ReassignFacesByIdRequest {
|
|
||||||
id: string;
|
|
||||||
faceDto: FaceDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class FaceApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getFacesRaw(requestParameters: GetFacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetFaceResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getFaces.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.id !== undefined) {
|
|
||||||
queryParameters['id'] = requestParameters.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/face`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetFaceResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getFaces(requestParameters: GetFacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetFaceResponseDto>> {
|
|
||||||
const response = await this.getFacesRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async reassignFacesByIdRaw(requestParameters: ReassignFacesByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling reassignFacesById.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.faceDto === null || requestParameters.faceDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('faceDto','Required parameter requestParameters.faceDto was null or undefined when calling reassignFacesById.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/face/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: FaceDtoToJSON(requestParameters.faceDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PersonResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async reassignFacesById(requestParameters: ReassignFacesByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonResponseDto> {
|
|
||||||
const response = await this.reassignFacesByIdRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,127 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AllJobStatusResponseDto,
|
|
||||||
JobCommandDto,
|
|
||||||
JobName,
|
|
||||||
JobStatusDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AllJobStatusResponseDtoFromJSON,
|
|
||||||
AllJobStatusResponseDtoToJSON,
|
|
||||||
JobCommandDtoFromJSON,
|
|
||||||
JobCommandDtoToJSON,
|
|
||||||
JobNameFromJSON,
|
|
||||||
JobNameToJSON,
|
|
||||||
JobStatusDtoFromJSON,
|
|
||||||
JobStatusDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface SendJobCommandRequest {
|
|
||||||
id: JobName;
|
|
||||||
jobCommandDto: JobCommandDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class JobApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllJobsStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AllJobStatusResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/jobs`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => AllJobStatusResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllJobsStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AllJobStatusResponseDto> {
|
|
||||||
const response = await this.getAllJobsStatusRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async sendJobCommandRaw(requestParameters: SendJobCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobStatusDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling sendJobCommand.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.jobCommandDto === null || requestParameters.jobCommandDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('jobCommandDto','Required parameter requestParameters.jobCommandDto was null or undefined when calling sendJobCommand.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: JobCommandDtoToJSON(requestParameters.jobCommandDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => JobStatusDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async sendJobCommand(requestParameters: SendJobCommandRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobStatusDto> {
|
|
||||||
const response = await this.sendJobCommandRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,402 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
CreateLibraryDto,
|
|
||||||
LibraryResponseDto,
|
|
||||||
LibraryStatsResponseDto,
|
|
||||||
ScanLibraryDto,
|
|
||||||
UpdateLibraryDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
CreateLibraryDtoFromJSON,
|
|
||||||
CreateLibraryDtoToJSON,
|
|
||||||
LibraryResponseDtoFromJSON,
|
|
||||||
LibraryResponseDtoToJSON,
|
|
||||||
LibraryStatsResponseDtoFromJSON,
|
|
||||||
LibraryStatsResponseDtoToJSON,
|
|
||||||
ScanLibraryDtoFromJSON,
|
|
||||||
ScanLibraryDtoToJSON,
|
|
||||||
UpdateLibraryDtoFromJSON,
|
|
||||||
UpdateLibraryDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreateLibraryRequest {
|
|
||||||
createLibraryDto: CreateLibraryDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteLibraryRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetLibraryInfoRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetLibraryStatisticsRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveOfflineFilesRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScanLibraryRequest {
|
|
||||||
id: string;
|
|
||||||
scanLibraryDto: ScanLibraryDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateLibraryRequest {
|
|
||||||
id: string;
|
|
||||||
updateLibraryDto: UpdateLibraryDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class LibraryApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createLibraryRaw(requestParameters: CreateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LibraryResponseDto>> {
|
|
||||||
if (requestParameters.createLibraryDto === null || requestParameters.createLibraryDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('createLibraryDto','Required parameter requestParameters.createLibraryDto was null or undefined when calling createLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: CreateLibraryDtoToJSON(requestParameters.createLibraryDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LibraryResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createLibrary(requestParameters: CreateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LibraryResponseDto> {
|
|
||||||
const response = await this.createLibraryRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteLibraryRaw(requestParameters: DeleteLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteLibrary(requestParameters: DeleteLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteLibraryRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibrariesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LibraryResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LibraryResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibraries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LibraryResponseDto>> {
|
|
||||||
const response = await this.getLibrariesRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibraryInfoRaw(requestParameters: GetLibraryInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LibraryResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getLibraryInfo.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LibraryResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibraryInfo(requestParameters: GetLibraryInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LibraryResponseDto> {
|
|
||||||
const response = await this.getLibraryInfoRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibraryStatisticsRaw(requestParameters: GetLibraryStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LibraryStatsResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getLibraryStatistics.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}/statistics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LibraryStatsResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getLibraryStatistics(requestParameters: GetLibraryStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LibraryStatsResponseDto> {
|
|
||||||
const response = await this.getLibraryStatisticsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeOfflineFilesRaw(requestParameters: RemoveOfflineFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removeOfflineFiles.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}/removeOffline`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeOfflineFiles(requestParameters: RemoveOfflineFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.removeOfflineFilesRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async scanLibraryRaw(requestParameters: ScanLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling scanLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.scanLibraryDto === null || requestParameters.scanLibraryDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('scanLibraryDto','Required parameter requestParameters.scanLibraryDto was null or undefined when calling scanLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}/scan`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: ScanLibraryDtoToJSON(requestParameters.scanLibraryDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async scanLibrary(requestParameters: ScanLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.scanLibraryRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateLibraryRaw(requestParameters: UpdateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LibraryResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.updateLibraryDto === null || requestParameters.updateLibraryDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('updateLibraryDto','Required parameter requestParameters.updateLibraryDto was null or undefined when calling updateLibrary.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/library/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: UpdateLibraryDtoToJSON(requestParameters.updateLibraryDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LibraryResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateLibrary(requestParameters: UpdateLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LibraryResponseDto> {
|
|
||||||
const response = await this.updateLibraryRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,218 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
LoginResponseDto,
|
|
||||||
OAuthAuthorizeResponseDto,
|
|
||||||
OAuthCallbackDto,
|
|
||||||
OAuthConfigDto,
|
|
||||||
UserResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
LoginResponseDtoFromJSON,
|
|
||||||
LoginResponseDtoToJSON,
|
|
||||||
OAuthAuthorizeResponseDtoFromJSON,
|
|
||||||
OAuthAuthorizeResponseDtoToJSON,
|
|
||||||
OAuthCallbackDtoFromJSON,
|
|
||||||
OAuthCallbackDtoToJSON,
|
|
||||||
OAuthConfigDtoFromJSON,
|
|
||||||
OAuthConfigDtoToJSON,
|
|
||||||
UserResponseDtoFromJSON,
|
|
||||||
UserResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface FinishOAuthRequest {
|
|
||||||
oAuthCallbackDto: OAuthCallbackDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LinkOAuthAccountRequest {
|
|
||||||
oAuthCallbackDto: OAuthCallbackDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StartOAuthRequest {
|
|
||||||
oAuthConfigDto: OAuthConfigDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class OAuthApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async finishOAuthRaw(requestParameters: FinishOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginResponseDto>> {
|
|
||||||
if (requestParameters.oAuthCallbackDto === null || requestParameters.oAuthCallbackDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('oAuthCallbackDto','Required parameter requestParameters.oAuthCallbackDto was null or undefined when calling finishOAuth.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/oauth/callback`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: OAuthCallbackDtoToJSON(requestParameters.oAuthCallbackDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async finishOAuth(requestParameters: FinishOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginResponseDto> {
|
|
||||||
const response = await this.finishOAuthRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async linkOAuthAccountRaw(requestParameters: LinkOAuthAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.oAuthCallbackDto === null || requestParameters.oAuthCallbackDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('oAuthCallbackDto','Required parameter requestParameters.oAuthCallbackDto was null or undefined when calling linkOAuthAccount.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/oauth/link`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: OAuthCallbackDtoToJSON(requestParameters.oAuthCallbackDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async linkOAuthAccount(requestParameters: LinkOAuthAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.linkOAuthAccountRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async redirectOAuthToMobileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/oauth/mobile-redirect`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async redirectOAuthToMobile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.redirectOAuthToMobileRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async startOAuthRaw(requestParameters: StartOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthAuthorizeResponseDto>> {
|
|
||||||
if (requestParameters.oAuthConfigDto === null || requestParameters.oAuthConfigDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('oAuthConfigDto','Required parameter requestParameters.oAuthConfigDto was null or undefined when calling startOAuth.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/oauth/authorize`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: OAuthConfigDtoToJSON(requestParameters.oAuthConfigDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => OAuthAuthorizeResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async startOAuth(requestParameters: StartOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthAuthorizeResponseDto> {
|
|
||||||
const response = await this.startOAuthRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async unlinkOAuthAccountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/oauth/unlink`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async unlinkOAuthAccount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.unlinkOAuthAccountRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,229 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
PartnerResponseDto,
|
|
||||||
UpdatePartnerDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
PartnerResponseDtoFromJSON,
|
|
||||||
PartnerResponseDtoToJSON,
|
|
||||||
UpdatePartnerDtoFromJSON,
|
|
||||||
UpdatePartnerDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreatePartnerRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetPartnersRequest {
|
|
||||||
direction: GetPartnersDirectionEnum;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemovePartnerRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdatePartnerRequest {
|
|
||||||
id: string;
|
|
||||||
updatePartnerDto: UpdatePartnerDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class PartnerApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createPartnerRaw(requestParameters: CreatePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PartnerResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling createPartner.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/partner/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PartnerResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createPartner(requestParameters: CreatePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerResponseDto> {
|
|
||||||
const response = await this.createPartnerRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPartnersRaw(requestParameters: GetPartnersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PartnerResponseDto>>> {
|
|
||||||
if (requestParameters.direction === null || requestParameters.direction === undefined) {
|
|
||||||
throw new runtime.RequiredError('direction','Required parameter requestParameters.direction was null or undefined when calling getPartners.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.direction !== undefined) {
|
|
||||||
queryParameters['direction'] = requestParameters.direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/partner`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PartnerResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPartners(requestParameters: GetPartnersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PartnerResponseDto>> {
|
|
||||||
const response = await this.getPartnersRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removePartnerRaw(requestParameters: RemovePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removePartner.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/partner/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removePartner(requestParameters: RemovePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.removePartnerRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePartnerRaw(requestParameters: UpdatePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PartnerResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updatePartner.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.updatePartnerDto === null || requestParameters.updatePartnerDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('updatePartnerDto','Required parameter requestParameters.updatePartnerDto was null or undefined when calling updatePartner.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/partner/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: UpdatePartnerDtoToJSON(requestParameters.updatePartnerDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PartnerResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePartner(requestParameters: UpdatePartnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerResponseDto> {
|
|
||||||
const response = await this.updatePartnerRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const GetPartnersDirectionEnum = {
|
|
||||||
By: 'shared-by',
|
|
||||||
With: 'shared-with'
|
|
||||||
} as const;
|
|
||||||
export type GetPartnersDirectionEnum = typeof GetPartnersDirectionEnum[keyof typeof GetPartnersDirectionEnum];
|
|
@ -1,513 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AssetFaceUpdateDto,
|
|
||||||
AssetResponseDto,
|
|
||||||
BulkIdResponseDto,
|
|
||||||
MergePersonDto,
|
|
||||||
PeopleResponseDto,
|
|
||||||
PeopleUpdateDto,
|
|
||||||
PersonResponseDto,
|
|
||||||
PersonStatisticsResponseDto,
|
|
||||||
PersonUpdateDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AssetFaceUpdateDtoFromJSON,
|
|
||||||
AssetFaceUpdateDtoToJSON,
|
|
||||||
AssetResponseDtoFromJSON,
|
|
||||||
AssetResponseDtoToJSON,
|
|
||||||
BulkIdResponseDtoFromJSON,
|
|
||||||
BulkIdResponseDtoToJSON,
|
|
||||||
MergePersonDtoFromJSON,
|
|
||||||
MergePersonDtoToJSON,
|
|
||||||
PeopleResponseDtoFromJSON,
|
|
||||||
PeopleResponseDtoToJSON,
|
|
||||||
PeopleUpdateDtoFromJSON,
|
|
||||||
PeopleUpdateDtoToJSON,
|
|
||||||
PersonResponseDtoFromJSON,
|
|
||||||
PersonResponseDtoToJSON,
|
|
||||||
PersonStatisticsResponseDtoFromJSON,
|
|
||||||
PersonStatisticsResponseDtoToJSON,
|
|
||||||
PersonUpdateDtoFromJSON,
|
|
||||||
PersonUpdateDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface GetAllPeopleRequest {
|
|
||||||
withHidden?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetPersonRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetPersonAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetPersonStatisticsRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetPersonThumbnailRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MergePersonRequest {
|
|
||||||
id: string;
|
|
||||||
mergePersonDto: MergePersonDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ReassignFacesRequest {
|
|
||||||
id: string;
|
|
||||||
assetFaceUpdateDto: AssetFaceUpdateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdatePeopleRequest {
|
|
||||||
peopleUpdateDto: PeopleUpdateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdatePersonRequest {
|
|
||||||
id: string;
|
|
||||||
personUpdateDto: PersonUpdateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class PersonApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createPersonRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PersonResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createPerson(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonResponseDto> {
|
|
||||||
const response = await this.createPersonRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllPeopleRaw(requestParameters: GetAllPeopleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PeopleResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.withHidden !== undefined) {
|
|
||||||
queryParameters['withHidden'] = requestParameters.withHidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PeopleResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllPeople(requestParameters: GetAllPeopleRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PeopleResponseDto> {
|
|
||||||
const response = await this.getAllPeopleRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonRaw(requestParameters: GetPersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PersonResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPerson(requestParameters: GetPersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonResponseDto> {
|
|
||||||
const response = await this.getPersonRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonAssetsRaw(requestParameters: GetPersonAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPersonAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonAssets(requestParameters: GetPersonAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetResponseDto>> {
|
|
||||||
const response = await this.getPersonAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonStatisticsRaw(requestParameters: GetPersonStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonStatisticsResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPersonStatistics.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}/statistics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PersonStatisticsResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonStatistics(requestParameters: GetPersonStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonStatisticsResponseDto> {
|
|
||||||
const response = await this.getPersonStatisticsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonThumbnailRaw(requestParameters: GetPersonThumbnailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPersonThumbnail.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}/thumbnail`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.BlobApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getPersonThumbnail(requestParameters: GetPersonThumbnailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
||||||
const response = await this.getPersonThumbnailRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async mergePersonRaw(requestParameters: MergePersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BulkIdResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling mergePerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.mergePersonDto === null || requestParameters.mergePersonDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('mergePersonDto','Required parameter requestParameters.mergePersonDto was null or undefined when calling mergePerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}/merge`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: MergePersonDtoToJSON(requestParameters.mergePersonDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BulkIdResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async mergePerson(requestParameters: MergePersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BulkIdResponseDto>> {
|
|
||||||
const response = await this.mergePersonRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async reassignFacesRaw(requestParameters: ReassignFacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PersonResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling reassignFaces.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetFaceUpdateDto === null || requestParameters.assetFaceUpdateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetFaceUpdateDto','Required parameter requestParameters.assetFaceUpdateDto was null or undefined when calling reassignFaces.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}/reassign`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetFaceUpdateDtoToJSON(requestParameters.assetFaceUpdateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PersonResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async reassignFaces(requestParameters: ReassignFacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PersonResponseDto>> {
|
|
||||||
const response = await this.reassignFacesRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePeopleRaw(requestParameters: UpdatePeopleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BulkIdResponseDto>>> {
|
|
||||||
if (requestParameters.peopleUpdateDto === null || requestParameters.peopleUpdateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('peopleUpdateDto','Required parameter requestParameters.peopleUpdateDto was null or undefined when calling updatePeople.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person`,
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: PeopleUpdateDtoToJSON(requestParameters.peopleUpdateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BulkIdResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePeople(requestParameters: UpdatePeopleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BulkIdResponseDto>> {
|
|
||||||
const response = await this.updatePeopleRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePersonRaw(requestParameters: UpdatePersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PersonResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updatePerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.personUpdateDto === null || requestParameters.personUpdateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('personUpdateDto','Required parameter requestParameters.personUpdateDto was null or undefined when calling updatePerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/person/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: PersonUpdateDtoToJSON(requestParameters.personUpdateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => PersonResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updatePerson(requestParameters: UpdatePersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PersonResponseDto> {
|
|
||||||
const response = await this.updatePersonRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,215 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
PersonResponseDto,
|
|
||||||
SearchExploreResponseDto,
|
|
||||||
SearchResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
PersonResponseDtoFromJSON,
|
|
||||||
PersonResponseDtoToJSON,
|
|
||||||
SearchExploreResponseDtoFromJSON,
|
|
||||||
SearchExploreResponseDtoToJSON,
|
|
||||||
SearchResponseDtoFromJSON,
|
|
||||||
SearchResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface SearchRequest {
|
|
||||||
clip?: boolean;
|
|
||||||
motion?: boolean;
|
|
||||||
q?: string;
|
|
||||||
query?: string;
|
|
||||||
recent?: boolean;
|
|
||||||
smart?: boolean;
|
|
||||||
type?: SearchTypeEnum;
|
|
||||||
withArchived?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SearchPersonRequest {
|
|
||||||
name: string;
|
|
||||||
withHidden?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class SearchApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getExploreDataRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SearchExploreResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/search/explore`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SearchExploreResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getExploreData(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SearchExploreResponseDto>> {
|
|
||||||
const response = await this.getExploreDataRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async searchRaw(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.clip !== undefined) {
|
|
||||||
queryParameters['clip'] = requestParameters.clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.motion !== undefined) {
|
|
||||||
queryParameters['motion'] = requestParameters.motion;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.q !== undefined) {
|
|
||||||
queryParameters['q'] = requestParameters.q;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.query !== undefined) {
|
|
||||||
queryParameters['query'] = requestParameters.query;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.recent !== undefined) {
|
|
||||||
queryParameters['recent'] = requestParameters.recent;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.smart !== undefined) {
|
|
||||||
queryParameters['smart'] = requestParameters.smart;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.type !== undefined) {
|
|
||||||
queryParameters['type'] = requestParameters.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.withArchived !== undefined) {
|
|
||||||
queryParameters['withArchived'] = requestParameters.withArchived;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/search`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SearchResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async search(requestParameters: SearchRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchResponseDto> {
|
|
||||||
const response = await this.searchRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async searchPersonRaw(requestParameters: SearchPersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PersonResponseDto>>> {
|
|
||||||
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
||||||
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling searchPerson.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.name !== undefined) {
|
|
||||||
queryParameters['name'] = requestParameters.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.withHidden !== undefined) {
|
|
||||||
queryParameters['withHidden'] = requestParameters.withHidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/search/person`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PersonResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async searchPerson(requestParameters: SearchPersonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PersonResponseDto>> {
|
|
||||||
const response = await this.searchPersonRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const SearchTypeEnum = {
|
|
||||||
Image: 'IMAGE',
|
|
||||||
Video: 'VIDEO',
|
|
||||||
Audio: 'AUDIO',
|
|
||||||
Other: 'OTHER'
|
|
||||||
} as const;
|
|
||||||
export type SearchTypeEnum = typeof SearchTypeEnum[keyof typeof SearchTypeEnum];
|
|
@ -1,302 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
ServerConfigDto,
|
|
||||||
ServerFeaturesDto,
|
|
||||||
ServerInfoResponseDto,
|
|
||||||
ServerMediaTypesResponseDto,
|
|
||||||
ServerPingResponse,
|
|
||||||
ServerStatsResponseDto,
|
|
||||||
ServerThemeDto,
|
|
||||||
ServerVersionResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
ServerConfigDtoFromJSON,
|
|
||||||
ServerConfigDtoToJSON,
|
|
||||||
ServerFeaturesDtoFromJSON,
|
|
||||||
ServerFeaturesDtoToJSON,
|
|
||||||
ServerInfoResponseDtoFromJSON,
|
|
||||||
ServerInfoResponseDtoToJSON,
|
|
||||||
ServerMediaTypesResponseDtoFromJSON,
|
|
||||||
ServerMediaTypesResponseDtoToJSON,
|
|
||||||
ServerPingResponseFromJSON,
|
|
||||||
ServerPingResponseToJSON,
|
|
||||||
ServerStatsResponseDtoFromJSON,
|
|
||||||
ServerStatsResponseDtoToJSON,
|
|
||||||
ServerThemeDtoFromJSON,
|
|
||||||
ServerThemeDtoToJSON,
|
|
||||||
ServerVersionResponseDtoFromJSON,
|
|
||||||
ServerVersionResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class ServerInfoApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerConfigDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/config`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerConfigDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerConfigDto> {
|
|
||||||
const response = await this.getServerConfigRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerFeaturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerFeaturesDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/features`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerFeaturesDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerFeaturesDto> {
|
|
||||||
const response = await this.getServerFeaturesRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerInfoResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerInfoResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerInfoResponseDto> {
|
|
||||||
const response = await this.getServerInfoRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerStatisticsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerStatsResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/statistics`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerStatsResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerStatistics(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerStatsResponseDto> {
|
|
||||||
const response = await this.getServerStatisticsRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerVersionResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/version`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerVersionResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getServerVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerVersionResponseDto> {
|
|
||||||
const response = await this.getServerVersionRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getSupportedMediaTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerMediaTypesResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/media-types`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerMediaTypesResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getSupportedMediaTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerMediaTypesResponseDto> {
|
|
||||||
const response = await this.getSupportedMediaTypesRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getThemeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerThemeDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/theme`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerThemeDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getTheme(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerThemeDto> {
|
|
||||||
const response = await this.getThemeRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async pingServerRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServerPingResponse>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/ping`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => ServerPingResponseFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async pingServer(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServerPingResponse> {
|
|
||||||
const response = await this.pingServerRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async setAdminOnboardingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/server-info/admin-onboarding`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async setAdminOnboarding(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.setAdminOnboardingRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,432 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AssetIdsDto,
|
|
||||||
AssetIdsResponseDto,
|
|
||||||
SharedLinkCreateDto,
|
|
||||||
SharedLinkEditDto,
|
|
||||||
SharedLinkResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AssetIdsDtoFromJSON,
|
|
||||||
AssetIdsDtoToJSON,
|
|
||||||
AssetIdsResponseDtoFromJSON,
|
|
||||||
AssetIdsResponseDtoToJSON,
|
|
||||||
SharedLinkCreateDtoFromJSON,
|
|
||||||
SharedLinkCreateDtoToJSON,
|
|
||||||
SharedLinkEditDtoFromJSON,
|
|
||||||
SharedLinkEditDtoToJSON,
|
|
||||||
SharedLinkResponseDtoFromJSON,
|
|
||||||
SharedLinkResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface AddSharedLinkAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
assetIdsDto: AssetIdsDto;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateSharedLinkRequest {
|
|
||||||
sharedLinkCreateDto: SharedLinkCreateDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetMySharedLinkRequest {
|
|
||||||
key?: string;
|
|
||||||
password?: string;
|
|
||||||
token?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetSharedLinkByIdRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveSharedLinkRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RemoveSharedLinkAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
assetIdsDto: AssetIdsDto;
|
|
||||||
key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateSharedLinkRequest {
|
|
||||||
id: string;
|
|
||||||
sharedLinkEditDto: SharedLinkEditDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class SharedLinkApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addSharedLinkAssetsRaw(requestParameters: AddSharedLinkAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetIdsResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling addSharedLinkAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetIdsDto === null || requestParameters.assetIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetIdsDto','Required parameter requestParameters.assetIdsDto was null or undefined when calling addSharedLinkAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetIdsDtoToJSON(requestParameters.assetIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetIdsResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async addSharedLinkAssets(requestParameters: AddSharedLinkAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetIdsResponseDto>> {
|
|
||||||
const response = await this.addSharedLinkAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createSharedLinkRaw(requestParameters: CreateSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SharedLinkResponseDto>> {
|
|
||||||
if (requestParameters.sharedLinkCreateDto === null || requestParameters.sharedLinkCreateDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('sharedLinkCreateDto','Required parameter requestParameters.sharedLinkCreateDto was null or undefined when calling createSharedLink.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: SharedLinkCreateDtoToJSON(requestParameters.sharedLinkCreateDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SharedLinkResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createSharedLink(requestParameters: CreateSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SharedLinkResponseDto> {
|
|
||||||
const response = await this.createSharedLinkRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllSharedLinksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SharedLinkResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SharedLinkResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllSharedLinks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SharedLinkResponseDto>> {
|
|
||||||
const response = await this.getAllSharedLinksRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMySharedLinkRaw(requestParameters: GetMySharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SharedLinkResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.password !== undefined) {
|
|
||||||
queryParameters['password'] = requestParameters.password;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.token !== undefined) {
|
|
||||||
queryParameters['token'] = requestParameters.token;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/me`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SharedLinkResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMySharedLink(requestParameters: GetMySharedLinkRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SharedLinkResponseDto> {
|
|
||||||
const response = await this.getMySharedLinkRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getSharedLinkByIdRaw(requestParameters: GetSharedLinkByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SharedLinkResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getSharedLinkById.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SharedLinkResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getSharedLinkById(requestParameters: GetSharedLinkByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SharedLinkResponseDto> {
|
|
||||||
const response = await this.getSharedLinkByIdRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeSharedLinkRaw(requestParameters: RemoveSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removeSharedLink.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeSharedLink(requestParameters: RemoveSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.removeSharedLinkRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeSharedLinkAssetsRaw(requestParameters: RemoveSharedLinkAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetIdsResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling removeSharedLinkAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetIdsDto === null || requestParameters.assetIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetIdsDto','Required parameter requestParameters.assetIdsDto was null or undefined when calling removeSharedLinkAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.key !== undefined) {
|
|
||||||
queryParameters['key'] = requestParameters.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetIdsDtoToJSON(requestParameters.assetIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetIdsResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async removeSharedLinkAssets(requestParameters: RemoveSharedLinkAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetIdsResponseDto>> {
|
|
||||||
const response = await this.removeSharedLinkAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateSharedLinkRaw(requestParameters: UpdateSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SharedLinkResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateSharedLink.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.sharedLinkEditDto === null || requestParameters.sharedLinkEditDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('sharedLinkEditDto','Required parameter requestParameters.sharedLinkEditDto was null or undefined when calling updateSharedLink.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/shared-link/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PATCH',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: SharedLinkEditDtoToJSON(requestParameters.sharedLinkEditDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SharedLinkResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateSharedLink(requestParameters: UpdateSharedLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SharedLinkResponseDto> {
|
|
||||||
const response = await this.updateSharedLinkRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,239 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
MapTheme,
|
|
||||||
SystemConfigDto,
|
|
||||||
SystemConfigTemplateStorageOptionDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
MapThemeFromJSON,
|
|
||||||
MapThemeToJSON,
|
|
||||||
SystemConfigDtoFromJSON,
|
|
||||||
SystemConfigDtoToJSON,
|
|
||||||
SystemConfigTemplateStorageOptionDtoFromJSON,
|
|
||||||
SystemConfigTemplateStorageOptionDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface GetMapStyleRequest {
|
|
||||||
theme: MapTheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateConfigRequest {
|
|
||||||
systemConfigDto: SystemConfigDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class SystemConfigApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemConfigDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/system-config`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemConfigDto> {
|
|
||||||
const response = await this.getConfigRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getConfigDefaultsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemConfigDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/system-config/defaults`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getConfigDefaults(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemConfigDto> {
|
|
||||||
const response = await this.getConfigDefaultsRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMapStyleRaw(requestParameters: GetMapStyleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
||||||
if (requestParameters.theme === null || requestParameters.theme === undefined) {
|
|
||||||
throw new runtime.RequiredError('theme','Required parameter requestParameters.theme was null or undefined when calling getMapStyle.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.theme !== undefined) {
|
|
||||||
queryParameters['theme'] = requestParameters.theme;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/system-config/map/style.json`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse<any>(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMapStyle(requestParameters: GetMapStyleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
||||||
const response = await this.getMapStyleRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getStorageTemplateOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemConfigTemplateStorageOptionDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/system-config/storage-template-options`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigTemplateStorageOptionDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getStorageTemplateOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemConfigTemplateStorageOptionDto> {
|
|
||||||
const response = await this.getStorageTemplateOptionsRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateConfigRaw(requestParameters: UpdateConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemConfigDto>> {
|
|
||||||
if (requestParameters.systemConfigDto === null || requestParameters.systemConfigDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('systemConfigDto','Required parameter requestParameters.systemConfigDto was null or undefined when calling updateConfig.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/system-config`,
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: SystemConfigDtoToJSON(requestParameters.systemConfigDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => SystemConfigDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateConfig(requestParameters: UpdateConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemConfigDto> {
|
|
||||||
const response = await this.updateConfigRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,415 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
AssetIdsDto,
|
|
||||||
AssetIdsResponseDto,
|
|
||||||
AssetResponseDto,
|
|
||||||
CreateTagDto,
|
|
||||||
TagResponseDto,
|
|
||||||
UpdateTagDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
AssetIdsDtoFromJSON,
|
|
||||||
AssetIdsDtoToJSON,
|
|
||||||
AssetIdsResponseDtoFromJSON,
|
|
||||||
AssetIdsResponseDtoToJSON,
|
|
||||||
AssetResponseDtoFromJSON,
|
|
||||||
AssetResponseDtoToJSON,
|
|
||||||
CreateTagDtoFromJSON,
|
|
||||||
CreateTagDtoToJSON,
|
|
||||||
TagResponseDtoFromJSON,
|
|
||||||
TagResponseDtoToJSON,
|
|
||||||
UpdateTagDtoFromJSON,
|
|
||||||
UpdateTagDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreateTagRequest {
|
|
||||||
createTagDto: CreateTagDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteTagRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetTagAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetTagByIdRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TagAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
assetIdsDto: AssetIdsDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UntagAssetsRequest {
|
|
||||||
id: string;
|
|
||||||
assetIdsDto: AssetIdsDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateTagRequest {
|
|
||||||
id: string;
|
|
||||||
updateTagDto: UpdateTagDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class TagApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createTagRaw(requestParameters: CreateTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponseDto>> {
|
|
||||||
if (requestParameters.createTagDto === null || requestParameters.createTagDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('createTagDto','Required parameter requestParameters.createTagDto was null or undefined when calling createTag.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: CreateTagDtoToJSON(requestParameters.createTagDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createTag(requestParameters: CreateTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponseDto> {
|
|
||||||
const response = await this.createTagRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteTag.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteTagRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllTagsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TagResponseDto>>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TagResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllTags(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TagResponseDto>> {
|
|
||||||
const response = await this.getAllTagsRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getTagAssetsRaw(requestParameters: GetTagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getTagAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getTagAssets(requestParameters: GetTagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetResponseDto>> {
|
|
||||||
const response = await this.getTagAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getTagByIdRaw(requestParameters: GetTagByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getTagById.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getTagById(requestParameters: GetTagByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponseDto> {
|
|
||||||
const response = await this.getTagByIdRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async tagAssetsRaw(requestParameters: TagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetIdsResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling tagAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetIdsDto === null || requestParameters.assetIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetIdsDto','Required parameter requestParameters.assetIdsDto was null or undefined when calling tagAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetIdsDtoToJSON(requestParameters.assetIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetIdsResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async tagAssets(requestParameters: TagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetIdsResponseDto>> {
|
|
||||||
const response = await this.tagAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async untagAssetsRaw(requestParameters: UntagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssetIdsResponseDto>>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling untagAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.assetIdsDto === null || requestParameters.assetIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('assetIdsDto','Required parameter requestParameters.assetIdsDto was null or undefined when calling untagAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}/assets`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: AssetIdsDtoToJSON(requestParameters.assetIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssetIdsResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async untagAssets(requestParameters: UntagAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssetIdsResponseDto>> {
|
|
||||||
const response = await this.untagAssetsRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateTagRaw(requestParameters: UpdateTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateTag.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.updateTagDto === null || requestParameters.updateTagDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('updateTagDto','Required parameter requestParameters.updateTagDto was null or undefined when calling updateTag.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/tag/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'PATCH',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: UpdateTagDtoToJSON(requestParameters.updateTagDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateTag(requestParameters: UpdateTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponseDto> {
|
|
||||||
const response = await this.updateTagRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,146 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
BulkIdsDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
BulkIdsDtoFromJSON,
|
|
||||||
BulkIdsDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface RestoreAssetsRequest {
|
|
||||||
bulkIdsDto: BulkIdsDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class TrashApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async emptyTrashRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/trash/empty`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async emptyTrash(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.emptyTrashRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreAssetsRaw(requestParameters: RestoreAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
if (requestParameters.bulkIdsDto === null || requestParameters.bulkIdsDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('bulkIdsDto','Required parameter requestParameters.bulkIdsDto was null or undefined when calling restoreAssets.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/trash/restore/assets`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: BulkIdsDtoToJSON(requestParameters.bulkIdsDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreAssets(requestParameters: RestoreAssetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.restoreAssetsRaw(requestParameters, initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreTrashRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/trash/restore`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreTrash(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.restoreTrashRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,493 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as runtime from '../runtime';
|
|
||||||
import type {
|
|
||||||
CreateProfileImageResponseDto,
|
|
||||||
CreateUserDto,
|
|
||||||
UpdateUserDto,
|
|
||||||
UserResponseDto,
|
|
||||||
} from '../models/index';
|
|
||||||
import {
|
|
||||||
CreateProfileImageResponseDtoFromJSON,
|
|
||||||
CreateProfileImageResponseDtoToJSON,
|
|
||||||
CreateUserDtoFromJSON,
|
|
||||||
CreateUserDtoToJSON,
|
|
||||||
UpdateUserDtoFromJSON,
|
|
||||||
UpdateUserDtoToJSON,
|
|
||||||
UserResponseDtoFromJSON,
|
|
||||||
UserResponseDtoToJSON,
|
|
||||||
} from '../models/index';
|
|
||||||
|
|
||||||
export interface CreateProfileImageRequest {
|
|
||||||
file: Blob;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateUserRequest {
|
|
||||||
createUserDto: CreateUserDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DeleteUserRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAllUsersRequest {
|
|
||||||
isAll: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetProfileImageRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetUserByIdRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestoreUserRequest {
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpdateUserRequest {
|
|
||||||
updateUserDto: UpdateUserDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export class UserApi extends runtime.BaseAPI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createProfileImageRaw(requestParameters: CreateProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateProfileImageResponseDto>> {
|
|
||||||
if (requestParameters.file === null || requestParameters.file === undefined) {
|
|
||||||
throw new runtime.RequiredError('file','Required parameter requestParameters.file was null or undefined when calling createProfileImage.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const consumes: runtime.Consume[] = [
|
|
||||||
{ contentType: 'multipart/form-data' },
|
|
||||||
];
|
|
||||||
// @ts-ignore: canConsumeForm may be unused
|
|
||||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
||||||
|
|
||||||
let formParams: { append(param: string, value: any): any };
|
|
||||||
let useForm = false;
|
|
||||||
// use FormData to transmit files using content-type "multipart/form-data"
|
|
||||||
useForm = canConsumeForm;
|
|
||||||
if (useForm) {
|
|
||||||
formParams = new FormData();
|
|
||||||
} else {
|
|
||||||
formParams = new URLSearchParams();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requestParameters.file !== undefined) {
|
|
||||||
formParams.append('file', requestParameters.file as any);
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/profile-image`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: formParams,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => CreateProfileImageResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createProfileImage(requestParameters: CreateProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateProfileImageResponseDto> {
|
|
||||||
const response = await this.createProfileImageRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.createUserDto === null || requestParameters.createUserDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('createUserDto','Required parameter requestParameters.createUserDto was null or undefined when calling createUser.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user`,
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: CreateUserDtoToJSON(requestParameters.createUserDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.createUserRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteProfileImageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/profile-image`,
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.VoidApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteProfileImage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
||||||
await this.deleteProfileImageRaw(initOverrides);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteUser.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'DELETE',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.deleteUserRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllUsersRaw(requestParameters: GetAllUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserResponseDto>>> {
|
|
||||||
if (requestParameters.isAll === null || requestParameters.isAll === undefined) {
|
|
||||||
throw new runtime.RequiredError('isAll','Required parameter requestParameters.isAll was null or undefined when calling getAllUsers.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
if (requestParameters.isAll !== undefined) {
|
|
||||||
queryParameters['isAll'] = requestParameters.isAll;
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserResponseDtoFromJSON));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getAllUsers(requestParameters: GetAllUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserResponseDto>> {
|
|
||||||
const response = await this.getAllUsersRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMyUserInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/me`,
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getMyUserInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.getMyUserInfoRaw(initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getProfileImageRaw(requestParameters: GetProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getProfileImage.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/profile-image/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.BlobApiResponse(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getProfileImage(requestParameters: GetProfileImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
||||||
const response = await this.getProfileImageRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getUserByIdRaw(requestParameters: GetUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getUserById.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/info/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'GET',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async getUserById(requestParameters: GetUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.getUserByIdRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreUserRaw(requestParameters: RestoreUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
||||||
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling restoreUser.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user/{id}/restore`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
||||||
method: 'POST',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async restoreUser(requestParameters: RestoreUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.restoreUserRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponseDto>> {
|
|
||||||
if (requestParameters.updateUserDto === null || requestParameters.updateUserDto === undefined) {
|
|
||||||
throw new runtime.RequiredError('updateUserDto','Required parameter requestParameters.updateUserDto was null or undefined when calling updateUser.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryParameters: any = {};
|
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
|
||||||
|
|
||||||
headerParameters['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.apiKey) {
|
|
||||||
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // api_key authentication
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.configuration && this.configuration.accessToken) {
|
|
||||||
const token = this.configuration.accessToken;
|
|
||||||
const tokenString = await token("bearer", []);
|
|
||||||
|
|
||||||
if (tokenString) {
|
|
||||||
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const response = await this.request({
|
|
||||||
path: `/user`,
|
|
||||||
method: 'PUT',
|
|
||||||
headers: headerParameters,
|
|
||||||
query: queryParameters,
|
|
||||||
body: UpdateUserDtoToJSON(requestParameters.updateUserDto),
|
|
||||||
}, initOverrides);
|
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseDtoFromJSON(jsonValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async updateUser(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponseDto> {
|
|
||||||
const response = await this.updateUserRaw(requestParameters, initOverrides);
|
|
||||||
return await response.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export * from './APIKeyApi';
|
|
||||||
export * from './ActivityApi';
|
|
||||||
export * from './AlbumApi';
|
|
||||||
export * from './AssetApi';
|
|
||||||
export * from './AuditApi';
|
|
||||||
export * from './AuthenticationApi';
|
|
||||||
export * from './DownloadApi';
|
|
||||||
export * from './FaceApi';
|
|
||||||
export * from './JobApi';
|
|
||||||
export * from './LibraryApi';
|
|
||||||
export * from './OAuthApi';
|
|
||||||
export * from './PartnerApi';
|
|
||||||
export * from './PersonApi';
|
|
||||||
export * from './SearchApi';
|
|
||||||
export * from './ServerInfoApi';
|
|
||||||
export * from './SharedLinkApi';
|
|
||||||
export * from './SystemConfigApi';
|
|
||||||
export * from './TagApi';
|
|
||||||
export * from './TrashApi';
|
|
||||||
export * from './UserApi';
|
|
@ -1,5 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export * from './runtime';
|
|
||||||
export * from './apis/index';
|
|
||||||
export * from './models/index';
|
|
@ -1,65 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface APIKeyCreateDto
|
|
||||||
*/
|
|
||||||
export interface APIKeyCreateDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof APIKeyCreateDto
|
|
||||||
*/
|
|
||||||
name?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the APIKeyCreateDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAPIKeyCreateDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateDtoFromJSON(json: any): APIKeyCreateDto {
|
|
||||||
return APIKeyCreateDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyCreateDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateDtoToJSON(value?: APIKeyCreateDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { APIKeyResponseDto } from './APIKeyResponseDto';
|
|
||||||
import {
|
|
||||||
APIKeyResponseDtoFromJSON,
|
|
||||||
APIKeyResponseDtoFromJSONTyped,
|
|
||||||
APIKeyResponseDtoToJSON,
|
|
||||||
} from './APIKeyResponseDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface APIKeyCreateResponseDto
|
|
||||||
*/
|
|
||||||
export interface APIKeyCreateResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {APIKeyResponseDto}
|
|
||||||
* @memberof APIKeyCreateResponseDto
|
|
||||||
*/
|
|
||||||
apiKey: APIKeyResponseDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof APIKeyCreateResponseDto
|
|
||||||
*/
|
|
||||||
secret: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the APIKeyCreateResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAPIKeyCreateResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "apiKey" in value;
|
|
||||||
isInstance = isInstance && "secret" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateResponseDtoFromJSON(json: any): APIKeyCreateResponseDto {
|
|
||||||
return APIKeyCreateResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyCreateResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'apiKey': APIKeyResponseDtoFromJSON(json['apiKey']),
|
|
||||||
'secret': json['secret'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyCreateResponseDtoToJSON(value?: APIKeyCreateResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'apiKey': APIKeyResponseDtoToJSON(value.apiKey),
|
|
||||||
'secret': value.secret,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface APIKeyResponseDto
|
|
||||||
*/
|
|
||||||
export interface APIKeyResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof APIKeyResponseDto
|
|
||||||
*/
|
|
||||||
createdAt: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof APIKeyResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof APIKeyResponseDto
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof APIKeyResponseDto
|
|
||||||
*/
|
|
||||||
updatedAt: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the APIKeyResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAPIKeyResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "createdAt" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
isInstance = isInstance && "updatedAt" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyResponseDtoFromJSON(json: any): APIKeyResponseDto {
|
|
||||||
return APIKeyResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'createdAt': (new Date(json['createdAt'])),
|
|
||||||
'id': json['id'],
|
|
||||||
'name': json['name'],
|
|
||||||
'updatedAt': (new Date(json['updatedAt'])),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyResponseDtoToJSON(value?: APIKeyResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'createdAt': (value.createdAt.toISOString()),
|
|
||||||
'id': value.id,
|
|
||||||
'name': value.name,
|
|
||||||
'updatedAt': (value.updatedAt.toISOString()),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface APIKeyUpdateDto
|
|
||||||
*/
|
|
||||||
export interface APIKeyUpdateDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof APIKeyUpdateDto
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the APIKeyUpdateDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAPIKeyUpdateDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyUpdateDtoFromJSON(json: any): APIKeyUpdateDto {
|
|
||||||
return APIKeyUpdateDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyUpdateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyUpdateDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': json['name'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function APIKeyUpdateDtoToJSON(value?: APIKeyUpdateDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': value.name,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { ReactionType } from './ReactionType';
|
|
||||||
import {
|
|
||||||
ReactionTypeFromJSON,
|
|
||||||
ReactionTypeFromJSONTyped,
|
|
||||||
ReactionTypeToJSON,
|
|
||||||
} from './ReactionType';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface ActivityCreateDto
|
|
||||||
*/
|
|
||||||
export interface ActivityCreateDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityCreateDto
|
|
||||||
*/
|
|
||||||
albumId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityCreateDto
|
|
||||||
*/
|
|
||||||
assetId?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityCreateDto
|
|
||||||
*/
|
|
||||||
comment?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {ReactionType}
|
|
||||||
* @memberof ActivityCreateDto
|
|
||||||
*/
|
|
||||||
type: ReactionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ActivityCreateDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfActivityCreateDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "albumId" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityCreateDtoFromJSON(json: any): ActivityCreateDto {
|
|
||||||
return ActivityCreateDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityCreateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityCreateDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumId': json['albumId'],
|
|
||||||
'assetId': !exists(json, 'assetId') ? undefined : json['assetId'],
|
|
||||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
|
||||||
'type': ReactionTypeFromJSON(json['type']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityCreateDtoToJSON(value?: ActivityCreateDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumId': value.albumId,
|
|
||||||
'assetId': value.assetId,
|
|
||||||
'comment': value.comment,
|
|
||||||
'type': ReactionTypeToJSON(value.type),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,128 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { UserDto } from './UserDto';
|
|
||||||
import {
|
|
||||||
UserDtoFromJSON,
|
|
||||||
UserDtoFromJSONTyped,
|
|
||||||
UserDtoToJSON,
|
|
||||||
} from './UserDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface ActivityResponseDto
|
|
||||||
*/
|
|
||||||
export interface ActivityResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
assetId: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
comment?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
createdAt: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
type: ActivityResponseDtoTypeEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {UserDto}
|
|
||||||
* @memberof ActivityResponseDto
|
|
||||||
*/
|
|
||||||
user: UserDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const ActivityResponseDtoTypeEnum = {
|
|
||||||
Comment: 'comment',
|
|
||||||
Like: 'like'
|
|
||||||
} as const;
|
|
||||||
export type ActivityResponseDtoTypeEnum = typeof ActivityResponseDtoTypeEnum[keyof typeof ActivityResponseDtoTypeEnum];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ActivityResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfActivityResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetId" in value;
|
|
||||||
isInstance = isInstance && "createdAt" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
isInstance = isInstance && "user" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityResponseDtoFromJSON(json: any): ActivityResponseDto {
|
|
||||||
return ActivityResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': json['assetId'],
|
|
||||||
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
|
||||||
'createdAt': (new Date(json['createdAt'])),
|
|
||||||
'id': json['id'],
|
|
||||||
'type': json['type'],
|
|
||||||
'user': UserDtoFromJSON(json['user']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityResponseDtoToJSON(value?: ActivityResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': value.assetId,
|
|
||||||
'comment': value.comment,
|
|
||||||
'createdAt': (value.createdAt.toISOString()),
|
|
||||||
'id': value.id,
|
|
||||||
'type': value.type,
|
|
||||||
'user': UserDtoToJSON(value.user),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface ActivityStatisticsResponseDto
|
|
||||||
*/
|
|
||||||
export interface ActivityStatisticsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ActivityStatisticsResponseDto
|
|
||||||
*/
|
|
||||||
comments: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ActivityStatisticsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfActivityStatisticsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "comments" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityStatisticsResponseDtoFromJSON(json: any): ActivityStatisticsResponseDto {
|
|
||||||
return ActivityStatisticsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityStatisticsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityStatisticsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'comments': json['comments'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ActivityStatisticsResponseDtoToJSON(value?: ActivityStatisticsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'comments': value.comments,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AddUsersDto
|
|
||||||
*/
|
|
||||||
export interface AddUsersDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AddUsersDto
|
|
||||||
*/
|
|
||||||
sharedUserIds: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AddUsersDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAddUsersDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "sharedUserIds" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AddUsersDtoFromJSON(json: any): AddUsersDto {
|
|
||||||
return AddUsersDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AddUsersDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddUsersDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'sharedUserIds': json['sharedUserIds'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AddUsersDtoToJSON(value?: AddUsersDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'sharedUserIds': value.sharedUserIds,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AlbumCountResponseDto
|
|
||||||
*/
|
|
||||||
export interface AlbumCountResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AlbumCountResponseDto
|
|
||||||
*/
|
|
||||||
notShared: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AlbumCountResponseDto
|
|
||||||
*/
|
|
||||||
owned: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AlbumCountResponseDto
|
|
||||||
*/
|
|
||||||
shared: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AlbumCountResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAlbumCountResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "notShared" in value;
|
|
||||||
isInstance = isInstance && "owned" in value;
|
|
||||||
isInstance = isInstance && "shared" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumCountResponseDtoFromJSON(json: any): AlbumCountResponseDto {
|
|
||||||
return AlbumCountResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumCountResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlbumCountResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'notShared': json['notShared'],
|
|
||||||
'owned': json['owned'],
|
|
||||||
'shared': json['shared'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumCountResponseDtoToJSON(value?: AlbumCountResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'notShared': value.notShared,
|
|
||||||
'owned': value.owned,
|
|
||||||
'shared': value.shared,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,220 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetResponseDto } from './AssetResponseDto';
|
|
||||||
import {
|
|
||||||
AssetResponseDtoFromJSON,
|
|
||||||
AssetResponseDtoFromJSONTyped,
|
|
||||||
AssetResponseDtoToJSON,
|
|
||||||
} from './AssetResponseDto';
|
|
||||||
import type { UserResponseDto } from './UserResponseDto';
|
|
||||||
import {
|
|
||||||
UserResponseDtoFromJSON,
|
|
||||||
UserResponseDtoFromJSONTyped,
|
|
||||||
UserResponseDtoToJSON,
|
|
||||||
} from './UserResponseDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AlbumResponseDto
|
|
||||||
*/
|
|
||||||
export interface AlbumResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
albumName: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
albumThumbnailAssetId: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
assetCount: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<AssetResponseDto>}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
assets: Array<AssetResponseDto>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
createdAt: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
description: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
endDate?: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
hasSharedLink: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
isActivityEnabled: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
lastModifiedAssetTimestamp?: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {UserResponseDto}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
owner: UserResponseDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
ownerId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
shared: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<UserResponseDto>}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
sharedUsers: Array<UserResponseDto>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
startDate?: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AlbumResponseDto
|
|
||||||
*/
|
|
||||||
updatedAt: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AlbumResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAlbumResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "albumName" in value;
|
|
||||||
isInstance = isInstance && "albumThumbnailAssetId" in value;
|
|
||||||
isInstance = isInstance && "assetCount" in value;
|
|
||||||
isInstance = isInstance && "assets" in value;
|
|
||||||
isInstance = isInstance && "createdAt" in value;
|
|
||||||
isInstance = isInstance && "description" in value;
|
|
||||||
isInstance = isInstance && "hasSharedLink" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "isActivityEnabled" in value;
|
|
||||||
isInstance = isInstance && "owner" in value;
|
|
||||||
isInstance = isInstance && "ownerId" in value;
|
|
||||||
isInstance = isInstance && "shared" in value;
|
|
||||||
isInstance = isInstance && "sharedUsers" in value;
|
|
||||||
isInstance = isInstance && "updatedAt" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumResponseDtoFromJSON(json: any): AlbumResponseDto {
|
|
||||||
return AlbumResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlbumResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumName': json['albumName'],
|
|
||||||
'albumThumbnailAssetId': json['albumThumbnailAssetId'],
|
|
||||||
'assetCount': json['assetCount'],
|
|
||||||
'assets': ((json['assets'] as Array<any>).map(AssetResponseDtoFromJSON)),
|
|
||||||
'createdAt': (new Date(json['createdAt'])),
|
|
||||||
'description': json['description'],
|
|
||||||
'endDate': !exists(json, 'endDate') ? undefined : (new Date(json['endDate'])),
|
|
||||||
'hasSharedLink': json['hasSharedLink'],
|
|
||||||
'id': json['id'],
|
|
||||||
'isActivityEnabled': json['isActivityEnabled'],
|
|
||||||
'lastModifiedAssetTimestamp': !exists(json, 'lastModifiedAssetTimestamp') ? undefined : (new Date(json['lastModifiedAssetTimestamp'])),
|
|
||||||
'owner': UserResponseDtoFromJSON(json['owner']),
|
|
||||||
'ownerId': json['ownerId'],
|
|
||||||
'shared': json['shared'],
|
|
||||||
'sharedUsers': ((json['sharedUsers'] as Array<any>).map(UserResponseDtoFromJSON)),
|
|
||||||
'startDate': !exists(json, 'startDate') ? undefined : (new Date(json['startDate'])),
|
|
||||||
'updatedAt': (new Date(json['updatedAt'])),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AlbumResponseDtoToJSON(value?: AlbumResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumName': value.albumName,
|
|
||||||
'albumThumbnailAssetId': value.albumThumbnailAssetId,
|
|
||||||
'assetCount': value.assetCount,
|
|
||||||
'assets': ((value.assets as Array<any>).map(AssetResponseDtoToJSON)),
|
|
||||||
'createdAt': (value.createdAt.toISOString()),
|
|
||||||
'description': value.description,
|
|
||||||
'endDate': value.endDate === undefined ? undefined : (value.endDate.toISOString()),
|
|
||||||
'hasSharedLink': value.hasSharedLink,
|
|
||||||
'id': value.id,
|
|
||||||
'isActivityEnabled': value.isActivityEnabled,
|
|
||||||
'lastModifiedAssetTimestamp': value.lastModifiedAssetTimestamp === undefined ? undefined : (value.lastModifiedAssetTimestamp.toISOString()),
|
|
||||||
'owner': UserResponseDtoToJSON(value.owner),
|
|
||||||
'ownerId': value.ownerId,
|
|
||||||
'shared': value.shared,
|
|
||||||
'sharedUsers': ((value.sharedUsers as Array<any>).map(UserResponseDtoToJSON)),
|
|
||||||
'startDate': value.startDate === undefined ? undefined : (value.startDate.toISOString()),
|
|
||||||
'updatedAt': (value.updatedAt.toISOString()),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,172 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { JobStatusDto } from './JobStatusDto';
|
|
||||||
import {
|
|
||||||
JobStatusDtoFromJSON,
|
|
||||||
JobStatusDtoFromJSONTyped,
|
|
||||||
JobStatusDtoToJSON,
|
|
||||||
} from './JobStatusDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
export interface AllJobStatusResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
backgroundTask: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
faceDetection: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
facialRecognition: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
library: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
metadataExtraction: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
migration: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
search: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
sidecar: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
smartSearch: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
storageTemplateMigration: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
thumbnailGeneration: JobStatusDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobStatusDto}
|
|
||||||
* @memberof AllJobStatusResponseDto
|
|
||||||
*/
|
|
||||||
videoConversion: JobStatusDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AllJobStatusResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAllJobStatusResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "backgroundTask" in value;
|
|
||||||
isInstance = isInstance && "faceDetection" in value;
|
|
||||||
isInstance = isInstance && "facialRecognition" in value;
|
|
||||||
isInstance = isInstance && "library" in value;
|
|
||||||
isInstance = isInstance && "metadataExtraction" in value;
|
|
||||||
isInstance = isInstance && "migration" in value;
|
|
||||||
isInstance = isInstance && "search" in value;
|
|
||||||
isInstance = isInstance && "sidecar" in value;
|
|
||||||
isInstance = isInstance && "smartSearch" in value;
|
|
||||||
isInstance = isInstance && "storageTemplateMigration" in value;
|
|
||||||
isInstance = isInstance && "thumbnailGeneration" in value;
|
|
||||||
isInstance = isInstance && "videoConversion" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AllJobStatusResponseDtoFromJSON(json: any): AllJobStatusResponseDto {
|
|
||||||
return AllJobStatusResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AllJobStatusResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllJobStatusResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'backgroundTask': JobStatusDtoFromJSON(json['backgroundTask']),
|
|
||||||
'faceDetection': JobStatusDtoFromJSON(json['faceDetection']),
|
|
||||||
'facialRecognition': JobStatusDtoFromJSON(json['facialRecognition']),
|
|
||||||
'library': JobStatusDtoFromJSON(json['library']),
|
|
||||||
'metadataExtraction': JobStatusDtoFromJSON(json['metadataExtraction']),
|
|
||||||
'migration': JobStatusDtoFromJSON(json['migration']),
|
|
||||||
'search': JobStatusDtoFromJSON(json['search']),
|
|
||||||
'sidecar': JobStatusDtoFromJSON(json['sidecar']),
|
|
||||||
'smartSearch': JobStatusDtoFromJSON(json['smartSearch']),
|
|
||||||
'storageTemplateMigration': JobStatusDtoFromJSON(json['storageTemplateMigration']),
|
|
||||||
'thumbnailGeneration': JobStatusDtoFromJSON(json['thumbnailGeneration']),
|
|
||||||
'videoConversion': JobStatusDtoFromJSON(json['videoConversion']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AllJobStatusResponseDtoToJSON(value?: AllJobStatusResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'backgroundTask': JobStatusDtoToJSON(value.backgroundTask),
|
|
||||||
'faceDetection': JobStatusDtoToJSON(value.faceDetection),
|
|
||||||
'facialRecognition': JobStatusDtoToJSON(value.facialRecognition),
|
|
||||||
'library': JobStatusDtoToJSON(value.library),
|
|
||||||
'metadataExtraction': JobStatusDtoToJSON(value.metadataExtraction),
|
|
||||||
'migration': JobStatusDtoToJSON(value.migration),
|
|
||||||
'search': JobStatusDtoToJSON(value.search),
|
|
||||||
'sidecar': JobStatusDtoToJSON(value.sidecar),
|
|
||||||
'smartSearch': JobStatusDtoToJSON(value.smartSearch),
|
|
||||||
'storageTemplateMigration': JobStatusDtoToJSON(value.storageTemplateMigration),
|
|
||||||
'thumbnailGeneration': JobStatusDtoToJSON(value.thumbnailGeneration),
|
|
||||||
'videoConversion': JobStatusDtoToJSON(value.videoConversion),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkDeleteDto
|
|
||||||
*/
|
|
||||||
export interface AssetBulkDeleteDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetBulkDeleteDto
|
|
||||||
*/
|
|
||||||
force?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AssetBulkDeleteDto
|
|
||||||
*/
|
|
||||||
ids: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkDeleteDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkDeleteDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "ids" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkDeleteDtoFromJSON(json: any): AssetBulkDeleteDto {
|
|
||||||
return AssetBulkDeleteDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkDeleteDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkDeleteDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'force': !exists(json, 'force') ? undefined : json['force'],
|
|
||||||
'ids': json['ids'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkDeleteDtoToJSON(value?: AssetBulkDeleteDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'force': value.force,
|
|
||||||
'ids': value.ids,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
export interface AssetBulkUpdateDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
dateTimeOriginal?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
ids: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
isArchived?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
isFavorite?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
latitude?: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
longitude?: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
removeParent?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUpdateDto
|
|
||||||
*/
|
|
||||||
stackParentId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkUpdateDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkUpdateDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "ids" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUpdateDtoFromJSON(json: any): AssetBulkUpdateDto {
|
|
||||||
return AssetBulkUpdateDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUpdateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkUpdateDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'dateTimeOriginal': !exists(json, 'dateTimeOriginal') ? undefined : json['dateTimeOriginal'],
|
|
||||||
'ids': json['ids'],
|
|
||||||
'isArchived': !exists(json, 'isArchived') ? undefined : json['isArchived'],
|
|
||||||
'isFavorite': !exists(json, 'isFavorite') ? undefined : json['isFavorite'],
|
|
||||||
'latitude': !exists(json, 'latitude') ? undefined : json['latitude'],
|
|
||||||
'longitude': !exists(json, 'longitude') ? undefined : json['longitude'],
|
|
||||||
'removeParent': !exists(json, 'removeParent') ? undefined : json['removeParent'],
|
|
||||||
'stackParentId': !exists(json, 'stackParentId') ? undefined : json['stackParentId'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUpdateDtoToJSON(value?: AssetBulkUpdateDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'dateTimeOriginal': value.dateTimeOriginal,
|
|
||||||
'ids': value.ids,
|
|
||||||
'isArchived': value.isArchived,
|
|
||||||
'isFavorite': value.isFavorite,
|
|
||||||
'latitude': value.latitude,
|
|
||||||
'longitude': value.longitude,
|
|
||||||
'removeParent': value.removeParent,
|
|
||||||
'stackParentId': value.stackParentId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetBulkUploadCheckItem } from './AssetBulkUploadCheckItem';
|
|
||||||
import {
|
|
||||||
AssetBulkUploadCheckItemFromJSON,
|
|
||||||
AssetBulkUploadCheckItemFromJSONTyped,
|
|
||||||
AssetBulkUploadCheckItemToJSON,
|
|
||||||
} from './AssetBulkUploadCheckItem';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkUploadCheckDto
|
|
||||||
*/
|
|
||||||
export interface AssetBulkUploadCheckDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<AssetBulkUploadCheckItem>}
|
|
||||||
* @memberof AssetBulkUploadCheckDto
|
|
||||||
*/
|
|
||||||
assets: Array<AssetBulkUploadCheckItem>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkUploadCheckDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkUploadCheckDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assets" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckDtoFromJSON(json: any): AssetBulkUploadCheckDto {
|
|
||||||
return AssetBulkUploadCheckDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkUploadCheckDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assets': ((json['assets'] as Array<any>).map(AssetBulkUploadCheckItemFromJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckDtoToJSON(value?: AssetBulkUploadCheckDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assets': ((value.assets as Array<any>).map(AssetBulkUploadCheckItemToJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkUploadCheckItem
|
|
||||||
*/
|
|
||||||
export interface AssetBulkUploadCheckItem {
|
|
||||||
/**
|
|
||||||
* base64 or hex encoded sha1 hash
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckItem
|
|
||||||
*/
|
|
||||||
checksum: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckItem
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkUploadCheckItem interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkUploadCheckItem(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "checksum" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckItemFromJSON(json: any): AssetBulkUploadCheckItem {
|
|
||||||
return AssetBulkUploadCheckItemFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkUploadCheckItem {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': json['checksum'],
|
|
||||||
'id': json['id'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckItemToJSON(value?: AssetBulkUploadCheckItem | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': value.checksum,
|
|
||||||
'id': value.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetBulkUploadCheckResult } from './AssetBulkUploadCheckResult';
|
|
||||||
import {
|
|
||||||
AssetBulkUploadCheckResultFromJSON,
|
|
||||||
AssetBulkUploadCheckResultFromJSONTyped,
|
|
||||||
AssetBulkUploadCheckResultToJSON,
|
|
||||||
} from './AssetBulkUploadCheckResult';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkUploadCheckResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetBulkUploadCheckResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<AssetBulkUploadCheckResult>}
|
|
||||||
* @memberof AssetBulkUploadCheckResponseDto
|
|
||||||
*/
|
|
||||||
results: Array<AssetBulkUploadCheckResult>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkUploadCheckResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkUploadCheckResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "results" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResponseDtoFromJSON(json: any): AssetBulkUploadCheckResponseDto {
|
|
||||||
return AssetBulkUploadCheckResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkUploadCheckResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'results': ((json['results'] as Array<any>).map(AssetBulkUploadCheckResultFromJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResponseDtoToJSON(value?: AssetBulkUploadCheckResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'results': ((value.results as Array<any>).map(AssetBulkUploadCheckResultToJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetBulkUploadCheckResult
|
|
||||||
*/
|
|
||||||
export interface AssetBulkUploadCheckResult {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckResult
|
|
||||||
*/
|
|
||||||
action: AssetBulkUploadCheckResultActionEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckResult
|
|
||||||
*/
|
|
||||||
assetId?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckResult
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetBulkUploadCheckResult
|
|
||||||
*/
|
|
||||||
reason?: AssetBulkUploadCheckResultReasonEnum;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetBulkUploadCheckResultActionEnum = {
|
|
||||||
Accept: 'accept',
|
|
||||||
Reject: 'reject'
|
|
||||||
} as const;
|
|
||||||
export type AssetBulkUploadCheckResultActionEnum = typeof AssetBulkUploadCheckResultActionEnum[keyof typeof AssetBulkUploadCheckResultActionEnum];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetBulkUploadCheckResultReasonEnum = {
|
|
||||||
Duplicate: 'duplicate',
|
|
||||||
UnsupportedFormat: 'unsupported-format'
|
|
||||||
} as const;
|
|
||||||
export type AssetBulkUploadCheckResultReasonEnum = typeof AssetBulkUploadCheckResultReasonEnum[keyof typeof AssetBulkUploadCheckResultReasonEnum];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetBulkUploadCheckResult interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetBulkUploadCheckResult(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "action" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResultFromJSON(json: any): AssetBulkUploadCheckResult {
|
|
||||||
return AssetBulkUploadCheckResultFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetBulkUploadCheckResult {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'action': json['action'],
|
|
||||||
'assetId': !exists(json, 'assetId') ? undefined : json['assetId'],
|
|
||||||
'id': json['id'],
|
|
||||||
'reason': !exists(json, 'reason') ? undefined : json['reason'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetBulkUploadCheckResultToJSON(value?: AssetBulkUploadCheckResult | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'action': value.action,
|
|
||||||
'assetId': value.assetId,
|
|
||||||
'id': value.id,
|
|
||||||
'reason': value.reason,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { PersonResponseDto } from './PersonResponseDto';
|
|
||||||
import {
|
|
||||||
PersonResponseDtoFromJSON,
|
|
||||||
PersonResponseDtoFromJSONTyped,
|
|
||||||
PersonResponseDtoToJSON,
|
|
||||||
} from './PersonResponseDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetFaceResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxX1: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxX2: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxY1: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxY2: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
imageHeight: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
imageWidth: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {PersonResponseDto}
|
|
||||||
* @memberof AssetFaceResponseDto
|
|
||||||
*/
|
|
||||||
person: PersonResponseDto | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetFaceResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetFaceResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "boundingBoxX1" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxX2" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxY1" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxY2" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "imageHeight" in value;
|
|
||||||
isInstance = isInstance && "imageWidth" in value;
|
|
||||||
isInstance = isInstance && "person" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceResponseDtoFromJSON(json: any): AssetFaceResponseDto {
|
|
||||||
return AssetFaceResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFaceResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'boundingBoxX1': json['boundingBoxX1'],
|
|
||||||
'boundingBoxX2': json['boundingBoxX2'],
|
|
||||||
'boundingBoxY1': json['boundingBoxY1'],
|
|
||||||
'boundingBoxY2': json['boundingBoxY2'],
|
|
||||||
'id': json['id'],
|
|
||||||
'imageHeight': json['imageHeight'],
|
|
||||||
'imageWidth': json['imageWidth'],
|
|
||||||
'person': PersonResponseDtoFromJSON(json['person']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceResponseDtoToJSON(value?: AssetFaceResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'boundingBoxX1': value.boundingBoxX1,
|
|
||||||
'boundingBoxX2': value.boundingBoxX2,
|
|
||||||
'boundingBoxY1': value.boundingBoxY1,
|
|
||||||
'boundingBoxY2': value.boundingBoxY2,
|
|
||||||
'id': value.id,
|
|
||||||
'imageHeight': value.imageHeight,
|
|
||||||
'imageWidth': value.imageWidth,
|
|
||||||
'person': PersonResponseDtoToJSON(value.person),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetFaceUpdateItem } from './AssetFaceUpdateItem';
|
|
||||||
import {
|
|
||||||
AssetFaceUpdateItemFromJSON,
|
|
||||||
AssetFaceUpdateItemFromJSONTyped,
|
|
||||||
AssetFaceUpdateItemToJSON,
|
|
||||||
} from './AssetFaceUpdateItem';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetFaceUpdateDto
|
|
||||||
*/
|
|
||||||
export interface AssetFaceUpdateDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<AssetFaceUpdateItem>}
|
|
||||||
* @memberof AssetFaceUpdateDto
|
|
||||||
*/
|
|
||||||
data: Array<AssetFaceUpdateItem>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetFaceUpdateDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetFaceUpdateDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "data" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateDtoFromJSON(json: any): AssetFaceUpdateDto {
|
|
||||||
return AssetFaceUpdateDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFaceUpdateDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'data': ((json['data'] as Array<any>).map(AssetFaceUpdateItemFromJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateDtoToJSON(value?: AssetFaceUpdateDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'data': ((value.data as Array<any>).map(AssetFaceUpdateItemToJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetFaceUpdateItem
|
|
||||||
*/
|
|
||||||
export interface AssetFaceUpdateItem {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetFaceUpdateItem
|
|
||||||
*/
|
|
||||||
assetId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetFaceUpdateItem
|
|
||||||
*/
|
|
||||||
personId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetFaceUpdateItem interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetFaceUpdateItem(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetId" in value;
|
|
||||||
isInstance = isInstance && "personId" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateItemFromJSON(json: any): AssetFaceUpdateItem {
|
|
||||||
return AssetFaceUpdateItemFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFaceUpdateItem {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': json['assetId'],
|
|
||||||
'personId': json['personId'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceUpdateItemToJSON(value?: AssetFaceUpdateItem | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': value.assetId,
|
|
||||||
'personId': value.personId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,120 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetFaceWithoutPersonResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxX1: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxX2: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxY1: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
boundingBoxY2: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
imageHeight: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetFaceWithoutPersonResponseDto
|
|
||||||
*/
|
|
||||||
imageWidth: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetFaceWithoutPersonResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetFaceWithoutPersonResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "boundingBoxX1" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxX2" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxY1" in value;
|
|
||||||
isInstance = isInstance && "boundingBoxY2" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "imageHeight" in value;
|
|
||||||
isInstance = isInstance && "imageWidth" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceWithoutPersonResponseDtoFromJSON(json: any): AssetFaceWithoutPersonResponseDto {
|
|
||||||
return AssetFaceWithoutPersonResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceWithoutPersonResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFaceWithoutPersonResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'boundingBoxX1': json['boundingBoxX1'],
|
|
||||||
'boundingBoxX2': json['boundingBoxX2'],
|
|
||||||
'boundingBoxY1': json['boundingBoxY1'],
|
|
||||||
'boundingBoxY2': json['boundingBoxY2'],
|
|
||||||
'id': json['id'],
|
|
||||||
'imageHeight': json['imageHeight'],
|
|
||||||
'imageWidth': json['imageWidth'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFaceWithoutPersonResponseDtoToJSON(value?: AssetFaceWithoutPersonResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'boundingBoxX1': value.boundingBoxX1,
|
|
||||||
'boundingBoxX2': value.boundingBoxX2,
|
|
||||||
'boundingBoxY1': value.boundingBoxY1,
|
|
||||||
'boundingBoxY2': value.boundingBoxY2,
|
|
||||||
'id': value.id,
|
|
||||||
'imageHeight': value.imageHeight,
|
|
||||||
'imageWidth': value.imageWidth,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetFileUploadResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetFileUploadResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetFileUploadResponseDto
|
|
||||||
*/
|
|
||||||
duplicate: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetFileUploadResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetFileUploadResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetFileUploadResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "duplicate" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFileUploadResponseDtoFromJSON(json: any): AssetFileUploadResponseDto {
|
|
||||||
return AssetFileUploadResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFileUploadResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetFileUploadResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'duplicate': json['duplicate'],
|
|
||||||
'id': json['id'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetFileUploadResponseDtoToJSON(value?: AssetFileUploadResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'duplicate': value.duplicate,
|
|
||||||
'id': value.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetIdsDto
|
|
||||||
*/
|
|
||||||
export interface AssetIdsDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AssetIdsDto
|
|
||||||
*/
|
|
||||||
assetIds: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetIdsDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetIdsDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetIds" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsDtoFromJSON(json: any): AssetIdsDto {
|
|
||||||
return AssetIdsDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetIdsDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': json['assetIds'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsDtoToJSON(value?: AssetIdsDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': value.assetIds,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetIdsResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetIdsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetIdsResponseDto
|
|
||||||
*/
|
|
||||||
assetId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetIdsResponseDto
|
|
||||||
*/
|
|
||||||
error?: AssetIdsResponseDtoErrorEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetIdsResponseDto
|
|
||||||
*/
|
|
||||||
success: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetIdsResponseDtoErrorEnum = {
|
|
||||||
Duplicate: 'duplicate',
|
|
||||||
NoPermission: 'no_permission',
|
|
||||||
NotFound: 'not_found'
|
|
||||||
} as const;
|
|
||||||
export type AssetIdsResponseDtoErrorEnum = typeof AssetIdsResponseDtoErrorEnum[keyof typeof AssetIdsResponseDtoErrorEnum];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetIdsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetIdsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetId" in value;
|
|
||||||
isInstance = isInstance && "success" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsResponseDtoFromJSON(json: any): AssetIdsResponseDto {
|
|
||||||
return AssetIdsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetIdsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': json['assetId'],
|
|
||||||
'error': !exists(json, 'error') ? undefined : json['error'],
|
|
||||||
'success': json['success'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetIdsResponseDtoToJSON(value?: AssetIdsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetId': value.assetId,
|
|
||||||
'error': value.error,
|
|
||||||
'success': value.success,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetJobName = {
|
|
||||||
RegenerateThumbnail: 'regenerate-thumbnail',
|
|
||||||
RefreshMetadata: 'refresh-metadata',
|
|
||||||
TranscodeVideo: 'transcode-video'
|
|
||||||
} as const;
|
|
||||||
export type AssetJobName = typeof AssetJobName[keyof typeof AssetJobName];
|
|
||||||
|
|
||||||
|
|
||||||
export function AssetJobNameFromJSON(json: any): AssetJobName {
|
|
||||||
return AssetJobNameFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetJobNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetJobName {
|
|
||||||
return json as AssetJobName;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetJobNameToJSON(value?: AssetJobName | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetJobName } from './AssetJobName';
|
|
||||||
import {
|
|
||||||
AssetJobNameFromJSON,
|
|
||||||
AssetJobNameFromJSONTyped,
|
|
||||||
AssetJobNameToJSON,
|
|
||||||
} from './AssetJobName';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetJobsDto
|
|
||||||
*/
|
|
||||||
export interface AssetJobsDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AssetJobsDto
|
|
||||||
*/
|
|
||||||
assetIds: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {AssetJobName}
|
|
||||||
* @memberof AssetJobsDto
|
|
||||||
*/
|
|
||||||
name: AssetJobName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetJobsDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetJobsDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetIds" in value;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetJobsDtoFromJSON(json: any): AssetJobsDto {
|
|
||||||
return AssetJobsDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetJobsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetJobsDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': json['assetIds'],
|
|
||||||
'name': AssetJobNameFromJSON(json['name']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetJobsDtoToJSON(value?: AssetJobsDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': value.assetIds,
|
|
||||||
'name': AssetJobNameToJSON(value.name),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetOrder = {
|
|
||||||
Asc: 'asc',
|
|
||||||
Desc: 'desc'
|
|
||||||
} as const;
|
|
||||||
export type AssetOrder = typeof AssetOrder[keyof typeof AssetOrder];
|
|
||||||
|
|
||||||
|
|
||||||
export function AssetOrderFromJSON(json: any): AssetOrder {
|
|
||||||
return AssetOrderFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetOrder {
|
|
||||||
return json as AssetOrder;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetOrderToJSON(value?: AssetOrder | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,374 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { AssetTypeEnum } from './AssetTypeEnum';
|
|
||||||
import {
|
|
||||||
AssetTypeEnumFromJSON,
|
|
||||||
AssetTypeEnumFromJSONTyped,
|
|
||||||
AssetTypeEnumToJSON,
|
|
||||||
} from './AssetTypeEnum';
|
|
||||||
import type { ExifResponseDto } from './ExifResponseDto';
|
|
||||||
import {
|
|
||||||
ExifResponseDtoFromJSON,
|
|
||||||
ExifResponseDtoFromJSONTyped,
|
|
||||||
ExifResponseDtoToJSON,
|
|
||||||
} from './ExifResponseDto';
|
|
||||||
import type { PersonWithFacesResponseDto } from './PersonWithFacesResponseDto';
|
|
||||||
import {
|
|
||||||
PersonWithFacesResponseDtoFromJSON,
|
|
||||||
PersonWithFacesResponseDtoFromJSONTyped,
|
|
||||||
PersonWithFacesResponseDtoToJSON,
|
|
||||||
} from './PersonWithFacesResponseDto';
|
|
||||||
import type { SmartInfoResponseDto } from './SmartInfoResponseDto';
|
|
||||||
import {
|
|
||||||
SmartInfoResponseDtoFromJSON,
|
|
||||||
SmartInfoResponseDtoFromJSONTyped,
|
|
||||||
SmartInfoResponseDtoToJSON,
|
|
||||||
} from './SmartInfoResponseDto';
|
|
||||||
import type { TagResponseDto } from './TagResponseDto';
|
|
||||||
import {
|
|
||||||
TagResponseDtoFromJSON,
|
|
||||||
TagResponseDtoFromJSONTyped,
|
|
||||||
TagResponseDtoToJSON,
|
|
||||||
} from './TagResponseDto';
|
|
||||||
import type { UserResponseDto } from './UserResponseDto';
|
|
||||||
import {
|
|
||||||
UserResponseDtoFromJSON,
|
|
||||||
UserResponseDtoFromJSONTyped,
|
|
||||||
UserResponseDtoToJSON,
|
|
||||||
} from './UserResponseDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetResponseDto {
|
|
||||||
/**
|
|
||||||
* base64 encoded sha1 hash
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
checksum: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
deviceAssetId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
deviceId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
duration: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {ExifResponseDto}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
exifInfo?: ExifResponseDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
fileCreatedAt: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
fileModifiedAt: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
hasMetadata: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isArchived: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isExternal: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isFavorite: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isOffline: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isReadOnly: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
isTrashed: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
libraryId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
livePhotoVideoId?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
localDateTime: Date;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
originalFileName: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
originalPath: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {UserResponseDto}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
owner?: UserResponseDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
ownerId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<PersonWithFacesResponseDto>}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
people?: Array<PersonWithFacesResponseDto>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
resized: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {SmartInfoResponseDto}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
smartInfo?: SmartInfoResponseDto;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<AssetResponseDto>}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
stack?: Array<AssetResponseDto>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
stackCount: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
stackParentId?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<TagResponseDto>}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
tags?: Array<TagResponseDto>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
thumbhash: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {AssetTypeEnum}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
type: AssetTypeEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof AssetResponseDto
|
|
||||||
*/
|
|
||||||
updatedAt: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "checksum" in value;
|
|
||||||
isInstance = isInstance && "deviceAssetId" in value;
|
|
||||||
isInstance = isInstance && "deviceId" in value;
|
|
||||||
isInstance = isInstance && "duration" in value;
|
|
||||||
isInstance = isInstance && "fileCreatedAt" in value;
|
|
||||||
isInstance = isInstance && "fileModifiedAt" in value;
|
|
||||||
isInstance = isInstance && "hasMetadata" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "isArchived" in value;
|
|
||||||
isInstance = isInstance && "isExternal" in value;
|
|
||||||
isInstance = isInstance && "isFavorite" in value;
|
|
||||||
isInstance = isInstance && "isOffline" in value;
|
|
||||||
isInstance = isInstance && "isReadOnly" in value;
|
|
||||||
isInstance = isInstance && "isTrashed" in value;
|
|
||||||
isInstance = isInstance && "libraryId" in value;
|
|
||||||
isInstance = isInstance && "localDateTime" in value;
|
|
||||||
isInstance = isInstance && "originalFileName" in value;
|
|
||||||
isInstance = isInstance && "originalPath" in value;
|
|
||||||
isInstance = isInstance && "ownerId" in value;
|
|
||||||
isInstance = isInstance && "resized" in value;
|
|
||||||
isInstance = isInstance && "stackCount" in value;
|
|
||||||
isInstance = isInstance && "thumbhash" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
isInstance = isInstance && "updatedAt" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetResponseDtoFromJSON(json: any): AssetResponseDto {
|
|
||||||
return AssetResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': json['checksum'],
|
|
||||||
'deviceAssetId': json['deviceAssetId'],
|
|
||||||
'deviceId': json['deviceId'],
|
|
||||||
'duration': json['duration'],
|
|
||||||
'exifInfo': !exists(json, 'exifInfo') ? undefined : ExifResponseDtoFromJSON(json['exifInfo']),
|
|
||||||
'fileCreatedAt': (new Date(json['fileCreatedAt'])),
|
|
||||||
'fileModifiedAt': (new Date(json['fileModifiedAt'])),
|
|
||||||
'hasMetadata': json['hasMetadata'],
|
|
||||||
'id': json['id'],
|
|
||||||
'isArchived': json['isArchived'],
|
|
||||||
'isExternal': json['isExternal'],
|
|
||||||
'isFavorite': json['isFavorite'],
|
|
||||||
'isOffline': json['isOffline'],
|
|
||||||
'isReadOnly': json['isReadOnly'],
|
|
||||||
'isTrashed': json['isTrashed'],
|
|
||||||
'libraryId': json['libraryId'],
|
|
||||||
'livePhotoVideoId': !exists(json, 'livePhotoVideoId') ? undefined : json['livePhotoVideoId'],
|
|
||||||
'localDateTime': (new Date(json['localDateTime'])),
|
|
||||||
'originalFileName': json['originalFileName'],
|
|
||||||
'originalPath': json['originalPath'],
|
|
||||||
'owner': !exists(json, 'owner') ? undefined : UserResponseDtoFromJSON(json['owner']),
|
|
||||||
'ownerId': json['ownerId'],
|
|
||||||
'people': !exists(json, 'people') ? undefined : ((json['people'] as Array<any>).map(PersonWithFacesResponseDtoFromJSON)),
|
|
||||||
'resized': json['resized'],
|
|
||||||
'smartInfo': !exists(json, 'smartInfo') ? undefined : SmartInfoResponseDtoFromJSON(json['smartInfo']),
|
|
||||||
'stack': !exists(json, 'stack') ? undefined : ((json['stack'] as Array<any>).map(AssetResponseDtoFromJSON)),
|
|
||||||
'stackCount': json['stackCount'],
|
|
||||||
'stackParentId': !exists(json, 'stackParentId') ? undefined : json['stackParentId'],
|
|
||||||
'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array<any>).map(TagResponseDtoFromJSON)),
|
|
||||||
'thumbhash': json['thumbhash'],
|
|
||||||
'type': AssetTypeEnumFromJSON(json['type']),
|
|
||||||
'updatedAt': (new Date(json['updatedAt'])),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetResponseDtoToJSON(value?: AssetResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': value.checksum,
|
|
||||||
'deviceAssetId': value.deviceAssetId,
|
|
||||||
'deviceId': value.deviceId,
|
|
||||||
'duration': value.duration,
|
|
||||||
'exifInfo': ExifResponseDtoToJSON(value.exifInfo),
|
|
||||||
'fileCreatedAt': (value.fileCreatedAt.toISOString()),
|
|
||||||
'fileModifiedAt': (value.fileModifiedAt.toISOString()),
|
|
||||||
'hasMetadata': value.hasMetadata,
|
|
||||||
'id': value.id,
|
|
||||||
'isArchived': value.isArchived,
|
|
||||||
'isExternal': value.isExternal,
|
|
||||||
'isFavorite': value.isFavorite,
|
|
||||||
'isOffline': value.isOffline,
|
|
||||||
'isReadOnly': value.isReadOnly,
|
|
||||||
'isTrashed': value.isTrashed,
|
|
||||||
'libraryId': value.libraryId,
|
|
||||||
'livePhotoVideoId': value.livePhotoVideoId,
|
|
||||||
'localDateTime': (value.localDateTime.toISOString()),
|
|
||||||
'originalFileName': value.originalFileName,
|
|
||||||
'originalPath': value.originalPath,
|
|
||||||
'owner': UserResponseDtoToJSON(value.owner),
|
|
||||||
'ownerId': value.ownerId,
|
|
||||||
'people': value.people === undefined ? undefined : ((value.people as Array<any>).map(PersonWithFacesResponseDtoToJSON)),
|
|
||||||
'resized': value.resized,
|
|
||||||
'smartInfo': SmartInfoResponseDtoToJSON(value.smartInfo),
|
|
||||||
'stack': value.stack === undefined ? undefined : ((value.stack as Array<any>).map(AssetResponseDtoToJSON)),
|
|
||||||
'stackCount': value.stackCount,
|
|
||||||
'stackParentId': value.stackParentId,
|
|
||||||
'tags': value.tags === undefined ? undefined : ((value.tags as Array<any>).map(TagResponseDtoToJSON)),
|
|
||||||
'thumbhash': value.thumbhash,
|
|
||||||
'type': AssetTypeEnumToJSON(value.type),
|
|
||||||
'updatedAt': (value.updatedAt.toISOString()),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AssetStatsResponseDto
|
|
||||||
*/
|
|
||||||
export interface AssetStatsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetStatsResponseDto
|
|
||||||
*/
|
|
||||||
images: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetStatsResponseDto
|
|
||||||
*/
|
|
||||||
total: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof AssetStatsResponseDto
|
|
||||||
*/
|
|
||||||
videos: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AssetStatsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAssetStatsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "images" in value;
|
|
||||||
isInstance = isInstance && "total" in value;
|
|
||||||
isInstance = isInstance && "videos" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetStatsResponseDtoFromJSON(json: any): AssetStatsResponseDto {
|
|
||||||
return AssetStatsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetStatsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetStatsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'images': json['images'],
|
|
||||||
'total': json['total'],
|
|
||||||
'videos': json['videos'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetStatsResponseDtoToJSON(value?: AssetStatsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'images': value.images,
|
|
||||||
'total': value.total,
|
|
||||||
'videos': value.videos,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AssetTypeEnum = {
|
|
||||||
Image: 'IMAGE',
|
|
||||||
Video: 'VIDEO',
|
|
||||||
Audio: 'AUDIO',
|
|
||||||
Other: 'OTHER'
|
|
||||||
} as const;
|
|
||||||
export type AssetTypeEnum = typeof AssetTypeEnum[keyof typeof AssetTypeEnum];
|
|
||||||
|
|
||||||
|
|
||||||
export function AssetTypeEnumFromJSON(json: any): AssetTypeEnum {
|
|
||||||
return AssetTypeEnumFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetTypeEnum {
|
|
||||||
return json as AssetTypeEnum;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AssetTypeEnumToJSON(value?: AssetTypeEnum | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const AudioCodec = {
|
|
||||||
Mp3: 'mp3',
|
|
||||||
Aac: 'aac',
|
|
||||||
Libopus: 'libopus'
|
|
||||||
} as const;
|
|
||||||
export type AudioCodec = typeof AudioCodec[keyof typeof AudioCodec];
|
|
||||||
|
|
||||||
|
|
||||||
export function AudioCodecFromJSON(json: any): AudioCodec {
|
|
||||||
return AudioCodecFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AudioCodecFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioCodec {
|
|
||||||
return json as AudioCodec;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AudioCodecToJSON(value?: AudioCodec | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AuditDeletesResponseDto
|
|
||||||
*/
|
|
||||||
export interface AuditDeletesResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof AuditDeletesResponseDto
|
|
||||||
*/
|
|
||||||
ids: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AuditDeletesResponseDto
|
|
||||||
*/
|
|
||||||
needsFullSync: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AuditDeletesResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAuditDeletesResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "ids" in value;
|
|
||||||
isInstance = isInstance && "needsFullSync" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuditDeletesResponseDtoFromJSON(json: any): AuditDeletesResponseDto {
|
|
||||||
return AuditDeletesResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuditDeletesResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuditDeletesResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'ids': json['ids'],
|
|
||||||
'needsFullSync': json['needsFullSync'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuditDeletesResponseDtoToJSON(value?: AuditDeletesResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'ids': value.ids,
|
|
||||||
'needsFullSync': value.needsFullSync,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
export interface AuthDeviceResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
createdAt: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
current: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
deviceOS: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
deviceType: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof AuthDeviceResponseDto
|
|
||||||
*/
|
|
||||||
updatedAt: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the AuthDeviceResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfAuthDeviceResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "createdAt" in value;
|
|
||||||
isInstance = isInstance && "current" in value;
|
|
||||||
isInstance = isInstance && "deviceOS" in value;
|
|
||||||
isInstance = isInstance && "deviceType" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "updatedAt" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuthDeviceResponseDtoFromJSON(json: any): AuthDeviceResponseDto {
|
|
||||||
return AuthDeviceResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuthDeviceResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthDeviceResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'createdAt': json['createdAt'],
|
|
||||||
'current': json['current'],
|
|
||||||
'deviceOS': json['deviceOS'],
|
|
||||||
'deviceType': json['deviceType'],
|
|
||||||
'id': json['id'],
|
|
||||||
'updatedAt': json['updatedAt'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuthDeviceResponseDtoToJSON(value?: AuthDeviceResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'createdAt': value.createdAt,
|
|
||||||
'current': value.current,
|
|
||||||
'deviceOS': value.deviceOS,
|
|
||||||
'deviceType': value.deviceType,
|
|
||||||
'id': value.id,
|
|
||||||
'updatedAt': value.updatedAt,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface BulkIdResponseDto
|
|
||||||
*/
|
|
||||||
export interface BulkIdResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof BulkIdResponseDto
|
|
||||||
*/
|
|
||||||
error?: BulkIdResponseDtoErrorEnum;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof BulkIdResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof BulkIdResponseDto
|
|
||||||
*/
|
|
||||||
success: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const BulkIdResponseDtoErrorEnum = {
|
|
||||||
Duplicate: 'duplicate',
|
|
||||||
NoPermission: 'no_permission',
|
|
||||||
NotFound: 'not_found',
|
|
||||||
Unknown: 'unknown'
|
|
||||||
} as const;
|
|
||||||
export type BulkIdResponseDtoErrorEnum = typeof BulkIdResponseDtoErrorEnum[keyof typeof BulkIdResponseDtoErrorEnum];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the BulkIdResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfBulkIdResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "success" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdResponseDtoFromJSON(json: any): BulkIdResponseDto {
|
|
||||||
return BulkIdResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkIdResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'error': !exists(json, 'error') ? undefined : json['error'],
|
|
||||||
'id': json['id'],
|
|
||||||
'success': json['success'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdResponseDtoToJSON(value?: BulkIdResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'error': value.error,
|
|
||||||
'id': value.id,
|
|
||||||
'success': value.success,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface BulkIdsDto
|
|
||||||
*/
|
|
||||||
export interface BulkIdsDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof BulkIdsDto
|
|
||||||
*/
|
|
||||||
ids: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the BulkIdsDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfBulkIdsDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "ids" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdsDtoFromJSON(json: any): BulkIdsDto {
|
|
||||||
return BulkIdsDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkIdsDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'ids': json['ids'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function BulkIdsDtoToJSON(value?: BulkIdsDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'ids': value.ids,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,104 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { CLIPMode } from './CLIPMode';
|
|
||||||
import {
|
|
||||||
CLIPModeFromJSON,
|
|
||||||
CLIPModeFromJSONTyped,
|
|
||||||
CLIPModeToJSON,
|
|
||||||
} from './CLIPMode';
|
|
||||||
import type { ModelType } from './ModelType';
|
|
||||||
import {
|
|
||||||
ModelTypeFromJSON,
|
|
||||||
ModelTypeFromJSONTyped,
|
|
||||||
ModelTypeToJSON,
|
|
||||||
} from './ModelType';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CLIPConfig
|
|
||||||
*/
|
|
||||||
export interface CLIPConfig {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof CLIPConfig
|
|
||||||
*/
|
|
||||||
enabled: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {CLIPMode}
|
|
||||||
* @memberof CLIPConfig
|
|
||||||
*/
|
|
||||||
mode?: CLIPMode;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CLIPConfig
|
|
||||||
*/
|
|
||||||
modelName: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {ModelType}
|
|
||||||
* @memberof CLIPConfig
|
|
||||||
*/
|
|
||||||
modelType?: ModelType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CLIPConfig interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCLIPConfig(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "enabled" in value;
|
|
||||||
isInstance = isInstance && "modelName" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CLIPConfigFromJSON(json: any): CLIPConfig {
|
|
||||||
return CLIPConfigFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CLIPConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CLIPConfig {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'enabled': json['enabled'],
|
|
||||||
'mode': !exists(json, 'mode') ? undefined : CLIPModeFromJSON(json['mode']),
|
|
||||||
'modelName': json['modelName'],
|
|
||||||
'modelType': !exists(json, 'modelType') ? undefined : ModelTypeFromJSON(json['modelType']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CLIPConfigToJSON(value?: CLIPConfig | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'enabled': value.enabled,
|
|
||||||
'mode': CLIPModeToJSON(value.mode),
|
|
||||||
'modelName': value.modelName,
|
|
||||||
'modelType': ModelTypeToJSON(value.modelType),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const CLIPMode = {
|
|
||||||
Vision: 'vision',
|
|
||||||
Text: 'text'
|
|
||||||
} as const;
|
|
||||||
export type CLIPMode = typeof CLIPMode[keyof typeof CLIPMode];
|
|
||||||
|
|
||||||
|
|
||||||
export function CLIPModeFromJSON(json: any): CLIPMode {
|
|
||||||
return CLIPModeFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CLIPModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CLIPMode {
|
|
||||||
return json as CLIPMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CLIPModeToJSON(value?: CLIPMode | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const CQMode = {
|
|
||||||
Auto: 'auto',
|
|
||||||
Cqp: 'cqp',
|
|
||||||
Icq: 'icq'
|
|
||||||
} as const;
|
|
||||||
export type CQMode = typeof CQMode[keyof typeof CQMode];
|
|
||||||
|
|
||||||
|
|
||||||
export function CQModeFromJSON(json: any): CQMode {
|
|
||||||
return CQModeFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CQModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CQMode {
|
|
||||||
return json as CQMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CQModeToJSON(value?: CQMode | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface ChangePasswordDto
|
|
||||||
*/
|
|
||||||
export interface ChangePasswordDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ChangePasswordDto
|
|
||||||
*/
|
|
||||||
newPassword: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ChangePasswordDto
|
|
||||||
*/
|
|
||||||
password: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ChangePasswordDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfChangePasswordDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "newPassword" in value;
|
|
||||||
isInstance = isInstance && "password" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ChangePasswordDtoFromJSON(json: any): ChangePasswordDto {
|
|
||||||
return ChangePasswordDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ChangePasswordDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangePasswordDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'newPassword': json['newPassword'],
|
|
||||||
'password': json['password'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ChangePasswordDtoToJSON(value?: ChangePasswordDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'newPassword': value.newPassword,
|
|
||||||
'password': value.password,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CheckExistingAssetsDto
|
|
||||||
*/
|
|
||||||
export interface CheckExistingAssetsDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CheckExistingAssetsDto
|
|
||||||
*/
|
|
||||||
deviceAssetIds: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CheckExistingAssetsDto
|
|
||||||
*/
|
|
||||||
deviceId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CheckExistingAssetsDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCheckExistingAssetsDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "deviceAssetIds" in value;
|
|
||||||
isInstance = isInstance && "deviceId" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsDtoFromJSON(json: any): CheckExistingAssetsDto {
|
|
||||||
return CheckExistingAssetsDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckExistingAssetsDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'deviceAssetIds': json['deviceAssetIds'],
|
|
||||||
'deviceId': json['deviceId'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsDtoToJSON(value?: CheckExistingAssetsDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'deviceAssetIds': value.deviceAssetIds,
|
|
||||||
'deviceId': value.deviceId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CheckExistingAssetsResponseDto
|
|
||||||
*/
|
|
||||||
export interface CheckExistingAssetsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CheckExistingAssetsResponseDto
|
|
||||||
*/
|
|
||||||
existingIds: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CheckExistingAssetsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCheckExistingAssetsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "existingIds" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsResponseDtoFromJSON(json: any): CheckExistingAssetsResponseDto {
|
|
||||||
return CheckExistingAssetsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckExistingAssetsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'existingIds': json['existingIds'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CheckExistingAssetsResponseDtoToJSON(value?: CheckExistingAssetsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'existingIds': value.existingIds,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const Colorspace = {
|
|
||||||
Srgb: 'srgb',
|
|
||||||
P3: 'p3'
|
|
||||||
} as const;
|
|
||||||
export type Colorspace = typeof Colorspace[keyof typeof Colorspace];
|
|
||||||
|
|
||||||
|
|
||||||
export function ColorspaceFromJSON(json: any): Colorspace {
|
|
||||||
return ColorspaceFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ColorspaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Colorspace {
|
|
||||||
return json as Colorspace;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ColorspaceToJSON(value?: Colorspace | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateAlbumDto
|
|
||||||
*/
|
|
||||||
export interface CreateAlbumDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateAlbumDto
|
|
||||||
*/
|
|
||||||
albumName: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CreateAlbumDto
|
|
||||||
*/
|
|
||||||
assetIds?: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateAlbumDto
|
|
||||||
*/
|
|
||||||
description?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CreateAlbumDto
|
|
||||||
*/
|
|
||||||
sharedWithUserIds?: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateAlbumDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateAlbumDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "albumName" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateAlbumDtoFromJSON(json: any): CreateAlbumDto {
|
|
||||||
return CreateAlbumDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateAlbumDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAlbumDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumName': json['albumName'],
|
|
||||||
'assetIds': !exists(json, 'assetIds') ? undefined : json['assetIds'],
|
|
||||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
||||||
'sharedWithUserIds': !exists(json, 'sharedWithUserIds') ? undefined : json['sharedWithUserIds'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateAlbumDtoToJSON(value?: CreateAlbumDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumName': value.albumName,
|
|
||||||
'assetIds': value.assetIds,
|
|
||||||
'description': value.description,
|
|
||||||
'sharedWithUserIds': value.sharedWithUserIds,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { LibraryType } from './LibraryType';
|
|
||||||
import {
|
|
||||||
LibraryTypeFromJSON,
|
|
||||||
LibraryTypeFromJSONTyped,
|
|
||||||
LibraryTypeToJSON,
|
|
||||||
} from './LibraryType';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateLibraryDto
|
|
||||||
*/
|
|
||||||
export interface CreateLibraryDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
exclusionPatterns?: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
importPaths?: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
isVisible?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
isWatched?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {LibraryType}
|
|
||||||
* @memberof CreateLibraryDto
|
|
||||||
*/
|
|
||||||
type: LibraryType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateLibraryDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateLibraryDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateLibraryDtoFromJSON(json: any): CreateLibraryDto {
|
|
||||||
return CreateLibraryDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateLibraryDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLibraryDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'exclusionPatterns': !exists(json, 'exclusionPatterns') ? undefined : json['exclusionPatterns'],
|
|
||||||
'importPaths': !exists(json, 'importPaths') ? undefined : json['importPaths'],
|
|
||||||
'isVisible': !exists(json, 'isVisible') ? undefined : json['isVisible'],
|
|
||||||
'isWatched': !exists(json, 'isWatched') ? undefined : json['isWatched'],
|
|
||||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
||||||
'type': LibraryTypeFromJSON(json['type']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateLibraryDtoToJSON(value?: CreateLibraryDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'exclusionPatterns': value.exclusionPatterns,
|
|
||||||
'importPaths': value.importPaths,
|
|
||||||
'isVisible': value.isVisible,
|
|
||||||
'isWatched': value.isWatched,
|
|
||||||
'name': value.name,
|
|
||||||
'type': LibraryTypeToJSON(value.type),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateProfileImageResponseDto
|
|
||||||
*/
|
|
||||||
export interface CreateProfileImageResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateProfileImageResponseDto
|
|
||||||
*/
|
|
||||||
profileImagePath: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateProfileImageResponseDto
|
|
||||||
*/
|
|
||||||
userId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateProfileImageResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateProfileImageResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "profileImagePath" in value;
|
|
||||||
isInstance = isInstance && "userId" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateProfileImageResponseDtoFromJSON(json: any): CreateProfileImageResponseDto {
|
|
||||||
return CreateProfileImageResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateProfileImageResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProfileImageResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'profileImagePath': json['profileImagePath'],
|
|
||||||
'userId': json['userId'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateProfileImageResponseDtoToJSON(value?: CreateProfileImageResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'profileImagePath': value.profileImagePath,
|
|
||||||
'userId': value.userId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { TagTypeEnum } from './TagTypeEnum';
|
|
||||||
import {
|
|
||||||
TagTypeEnumFromJSON,
|
|
||||||
TagTypeEnumFromJSONTyped,
|
|
||||||
TagTypeEnumToJSON,
|
|
||||||
} from './TagTypeEnum';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateTagDto
|
|
||||||
*/
|
|
||||||
export interface CreateTagDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateTagDto
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {TagTypeEnum}
|
|
||||||
* @memberof CreateTagDto
|
|
||||||
*/
|
|
||||||
type: TagTypeEnum;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateTagDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateTagDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
isInstance = isInstance && "type" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTagDtoFromJSON(json: any): CreateTagDto {
|
|
||||||
return CreateTagDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTagDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTagDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': json['name'],
|
|
||||||
'type': TagTypeEnumFromJSON(json['type']),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateTagDtoToJSON(value?: CreateTagDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'name': value.name,
|
|
||||||
'type': TagTypeEnumToJSON(value.type),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CreateUserDto
|
|
||||||
*/
|
|
||||||
export interface CreateUserDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
email: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
externalPath?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
memoriesEnabled?: boolean;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
password: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
quotaSizeInBytes?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CreateUserDto
|
|
||||||
*/
|
|
||||||
storageLabel?: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CreateUserDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCreateUserDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "email" in value;
|
|
||||||
isInstance = isInstance && "name" in value;
|
|
||||||
isInstance = isInstance && "password" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateUserDtoFromJSON(json: any): CreateUserDto {
|
|
||||||
return CreateUserDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateUserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'email': json['email'],
|
|
||||||
'externalPath': !exists(json, 'externalPath') ? undefined : json['externalPath'],
|
|
||||||
'memoriesEnabled': !exists(json, 'memoriesEnabled') ? undefined : json['memoriesEnabled'],
|
|
||||||
'name': json['name'],
|
|
||||||
'password': json['password'],
|
|
||||||
'quotaSizeInBytes': !exists(json, 'quotaSizeInBytes') ? undefined : json['quotaSizeInBytes'],
|
|
||||||
'storageLabel': !exists(json, 'storageLabel') ? undefined : json['storageLabel'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CreateUserDtoToJSON(value?: CreateUserDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'email': value.email,
|
|
||||||
'externalPath': value.externalPath,
|
|
||||||
'memoriesEnabled': value.memoriesEnabled,
|
|
||||||
'name': value.name,
|
|
||||||
'password': value.password,
|
|
||||||
'quotaSizeInBytes': value.quotaSizeInBytes,
|
|
||||||
'storageLabel': value.storageLabel,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
export interface CuratedLocationsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
city: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
deviceAssetId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
deviceId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedLocationsResponseDto
|
|
||||||
*/
|
|
||||||
resizePath: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CuratedLocationsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCuratedLocationsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "city" in value;
|
|
||||||
isInstance = isInstance && "deviceAssetId" in value;
|
|
||||||
isInstance = isInstance && "deviceId" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "resizePath" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedLocationsResponseDtoFromJSON(json: any): CuratedLocationsResponseDto {
|
|
||||||
return CuratedLocationsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedLocationsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CuratedLocationsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'city': json['city'],
|
|
||||||
'deviceAssetId': json['deviceAssetId'],
|
|
||||||
'deviceId': json['deviceId'],
|
|
||||||
'id': json['id'],
|
|
||||||
'resizePath': json['resizePath'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedLocationsResponseDtoToJSON(value?: CuratedLocationsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'city': value.city,
|
|
||||||
'deviceAssetId': value.deviceAssetId,
|
|
||||||
'deviceId': value.deviceId,
|
|
||||||
'id': value.id,
|
|
||||||
'resizePath': value.resizePath,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
export interface CuratedObjectsResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
deviceAssetId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
deviceId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
object: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof CuratedObjectsResponseDto
|
|
||||||
*/
|
|
||||||
resizePath: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the CuratedObjectsResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfCuratedObjectsResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "deviceAssetId" in value;
|
|
||||||
isInstance = isInstance && "deviceId" in value;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
isInstance = isInstance && "object" in value;
|
|
||||||
isInstance = isInstance && "resizePath" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedObjectsResponseDtoFromJSON(json: any): CuratedObjectsResponseDto {
|
|
||||||
return CuratedObjectsResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedObjectsResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CuratedObjectsResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'deviceAssetId': json['deviceAssetId'],
|
|
||||||
'deviceId': json['deviceId'],
|
|
||||||
'id': json['id'],
|
|
||||||
'object': json['object'],
|
|
||||||
'resizePath': json['resizePath'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CuratedObjectsResponseDtoToJSON(value?: CuratedObjectsResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'deviceAssetId': value.deviceAssetId,
|
|
||||||
'deviceId': value.deviceId,
|
|
||||||
'id': value.id,
|
|
||||||
'object': value.object,
|
|
||||||
'resizePath': value.resizePath,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface DownloadArchiveInfo
|
|
||||||
*/
|
|
||||||
export interface DownloadArchiveInfo {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof DownloadArchiveInfo
|
|
||||||
*/
|
|
||||||
assetIds: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof DownloadArchiveInfo
|
|
||||||
*/
|
|
||||||
size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the DownloadArchiveInfo interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfDownloadArchiveInfo(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "assetIds" in value;
|
|
||||||
isInstance = isInstance && "size" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadArchiveInfoFromJSON(json: any): DownloadArchiveInfo {
|
|
||||||
return DownloadArchiveInfoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadArchiveInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadArchiveInfo {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': json['assetIds'],
|
|
||||||
'size': json['size'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadArchiveInfoToJSON(value?: DownloadArchiveInfo | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'assetIds': value.assetIds,
|
|
||||||
'size': value.size,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface DownloadInfoDto
|
|
||||||
*/
|
|
||||||
export interface DownloadInfoDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof DownloadInfoDto
|
|
||||||
*/
|
|
||||||
albumId?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof DownloadInfoDto
|
|
||||||
*/
|
|
||||||
archiveSize?: number;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof DownloadInfoDto
|
|
||||||
*/
|
|
||||||
assetIds?: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof DownloadInfoDto
|
|
||||||
*/
|
|
||||||
userId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the DownloadInfoDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfDownloadInfoDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadInfoDtoFromJSON(json: any): DownloadInfoDto {
|
|
||||||
return DownloadInfoDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadInfoDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadInfoDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumId': !exists(json, 'albumId') ? undefined : json['albumId'],
|
|
||||||
'archiveSize': !exists(json, 'archiveSize') ? undefined : json['archiveSize'],
|
|
||||||
'assetIds': !exists(json, 'assetIds') ? undefined : json['assetIds'],
|
|
||||||
'userId': !exists(json, 'userId') ? undefined : json['userId'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadInfoDtoToJSON(value?: DownloadInfoDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'albumId': value.albumId,
|
|
||||||
'archiveSize': value.archiveSize,
|
|
||||||
'assetIds': value.assetIds,
|
|
||||||
'userId': value.userId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { DownloadArchiveInfo } from './DownloadArchiveInfo';
|
|
||||||
import {
|
|
||||||
DownloadArchiveInfoFromJSON,
|
|
||||||
DownloadArchiveInfoFromJSONTyped,
|
|
||||||
DownloadArchiveInfoToJSON,
|
|
||||||
} from './DownloadArchiveInfo';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface DownloadResponseDto
|
|
||||||
*/
|
|
||||||
export interface DownloadResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<DownloadArchiveInfo>}
|
|
||||||
* @memberof DownloadResponseDto
|
|
||||||
*/
|
|
||||||
archives: Array<DownloadArchiveInfo>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof DownloadResponseDto
|
|
||||||
*/
|
|
||||||
totalSize: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the DownloadResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfDownloadResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "archives" in value;
|
|
||||||
isInstance = isInstance && "totalSize" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadResponseDtoFromJSON(json: any): DownloadResponseDto {
|
|
||||||
return DownloadResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'archives': ((json['archives'] as Array<any>).map(DownloadArchiveInfoFromJSON)),
|
|
||||||
'totalSize': json['totalSize'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function DownloadResponseDtoToJSON(value?: DownloadResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'archives': ((value.archives as Array<any>).map(DownloadArchiveInfoToJSON)),
|
|
||||||
'totalSize': value.totalSize,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const EntityType = {
|
|
||||||
Asset: 'ASSET',
|
|
||||||
Album: 'ALBUM'
|
|
||||||
} as const;
|
|
||||||
export type EntityType = typeof EntityType[keyof typeof EntityType];
|
|
||||||
|
|
||||||
|
|
||||||
export function EntityTypeFromJSON(json: any): EntityType {
|
|
||||||
return EntityTypeFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function EntityTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityType {
|
|
||||||
return json as EntityType;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function EntityTypeToJSON(value?: EntityType | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,225 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface ExifResponseDto
|
|
||||||
*/
|
|
||||||
export interface ExifResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
city?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
country?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
dateTimeOriginal?: Date | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
description?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
exifImageHeight?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
exifImageWidth?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
exposureTime?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
fNumber?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
fileSizeInByte?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
focalLength?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
iso?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
latitude?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
lensModel?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
longitude?: number | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
make?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
model?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Date}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
modifyDate?: Date | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
orientation?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
projectionType?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
state?: string | null;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof ExifResponseDto
|
|
||||||
*/
|
|
||||||
timeZone?: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the ExifResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfExifResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ExifResponseDtoFromJSON(json: any): ExifResponseDto {
|
|
||||||
return ExifResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ExifResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExifResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'city': !exists(json, 'city') ? undefined : json['city'],
|
|
||||||
'country': !exists(json, 'country') ? undefined : json['country'],
|
|
||||||
'dateTimeOriginal': !exists(json, 'dateTimeOriginal') ? undefined : (json['dateTimeOriginal'] === null ? null : new Date(json['dateTimeOriginal'])),
|
|
||||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
||||||
'exifImageHeight': !exists(json, 'exifImageHeight') ? undefined : json['exifImageHeight'],
|
|
||||||
'exifImageWidth': !exists(json, 'exifImageWidth') ? undefined : json['exifImageWidth'],
|
|
||||||
'exposureTime': !exists(json, 'exposureTime') ? undefined : json['exposureTime'],
|
|
||||||
'fNumber': !exists(json, 'fNumber') ? undefined : json['fNumber'],
|
|
||||||
'fileSizeInByte': !exists(json, 'fileSizeInByte') ? undefined : json['fileSizeInByte'],
|
|
||||||
'focalLength': !exists(json, 'focalLength') ? undefined : json['focalLength'],
|
|
||||||
'iso': !exists(json, 'iso') ? undefined : json['iso'],
|
|
||||||
'latitude': !exists(json, 'latitude') ? undefined : json['latitude'],
|
|
||||||
'lensModel': !exists(json, 'lensModel') ? undefined : json['lensModel'],
|
|
||||||
'longitude': !exists(json, 'longitude') ? undefined : json['longitude'],
|
|
||||||
'make': !exists(json, 'make') ? undefined : json['make'],
|
|
||||||
'model': !exists(json, 'model') ? undefined : json['model'],
|
|
||||||
'modifyDate': !exists(json, 'modifyDate') ? undefined : (json['modifyDate'] === null ? null : new Date(json['modifyDate'])),
|
|
||||||
'orientation': !exists(json, 'orientation') ? undefined : json['orientation'],
|
|
||||||
'projectionType': !exists(json, 'projectionType') ? undefined : json['projectionType'],
|
|
||||||
'state': !exists(json, 'state') ? undefined : json['state'],
|
|
||||||
'timeZone': !exists(json, 'timeZone') ? undefined : json['timeZone'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ExifResponseDtoToJSON(value?: ExifResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'city': value.city,
|
|
||||||
'country': value.country,
|
|
||||||
'dateTimeOriginal': value.dateTimeOriginal === undefined ? undefined : (value.dateTimeOriginal === null ? null : value.dateTimeOriginal.toISOString()),
|
|
||||||
'description': value.description,
|
|
||||||
'exifImageHeight': value.exifImageHeight,
|
|
||||||
'exifImageWidth': value.exifImageWidth,
|
|
||||||
'exposureTime': value.exposureTime,
|
|
||||||
'fNumber': value.fNumber,
|
|
||||||
'fileSizeInByte': value.fileSizeInByte,
|
|
||||||
'focalLength': value.focalLength,
|
|
||||||
'iso': value.iso,
|
|
||||||
'latitude': value.latitude,
|
|
||||||
'lensModel': value.lensModel,
|
|
||||||
'longitude': value.longitude,
|
|
||||||
'make': value.make,
|
|
||||||
'model': value.model,
|
|
||||||
'modifyDate': value.modifyDate === undefined ? undefined : (value.modifyDate === null ? null : value.modifyDate.toISOString()),
|
|
||||||
'orientation': value.orientation,
|
|
||||||
'projectionType': value.projectionType,
|
|
||||||
'state': value.state,
|
|
||||||
'timeZone': value.timeZone,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FaceDto
|
|
||||||
*/
|
|
||||||
export interface FaceDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FaceDto
|
|
||||||
*/
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FaceDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFaceDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "id" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FaceDtoFromJSON(json: any): FaceDto {
|
|
||||||
return FaceDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FaceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FaceDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'id': json['id'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FaceDtoToJSON(value?: FaceDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'id': value.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FileChecksumDto
|
|
||||||
*/
|
|
||||||
export interface FileChecksumDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof FileChecksumDto
|
|
||||||
*/
|
|
||||||
filenames: Array<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FileChecksumDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFileChecksumDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "filenames" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumDtoFromJSON(json: any): FileChecksumDto {
|
|
||||||
return FileChecksumDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileChecksumDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'filenames': json['filenames'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumDtoToJSON(value?: FileChecksumDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'filenames': value.filenames,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FileChecksumResponseDto
|
|
||||||
*/
|
|
||||||
export interface FileChecksumResponseDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FileChecksumResponseDto
|
|
||||||
*/
|
|
||||||
checksum: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FileChecksumResponseDto
|
|
||||||
*/
|
|
||||||
filename: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FileChecksumResponseDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFileChecksumResponseDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "checksum" in value;
|
|
||||||
isInstance = isInstance && "filename" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumResponseDtoFromJSON(json: any): FileChecksumResponseDto {
|
|
||||||
return FileChecksumResponseDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileChecksumResponseDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': json['checksum'],
|
|
||||||
'filename': json['filename'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileChecksumResponseDtoToJSON(value?: FileChecksumResponseDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': value.checksum,
|
|
||||||
'filename': value.filename,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { FileReportItemDto } from './FileReportItemDto';
|
|
||||||
import {
|
|
||||||
FileReportItemDtoFromJSON,
|
|
||||||
FileReportItemDtoFromJSONTyped,
|
|
||||||
FileReportItemDtoToJSON,
|
|
||||||
} from './FileReportItemDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FileReportDto
|
|
||||||
*/
|
|
||||||
export interface FileReportDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<string>}
|
|
||||||
* @memberof FileReportDto
|
|
||||||
*/
|
|
||||||
extras: Array<string>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<FileReportItemDto>}
|
|
||||||
* @memberof FileReportDto
|
|
||||||
*/
|
|
||||||
orphans: Array<FileReportItemDto>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FileReportDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFileReportDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "extras" in value;
|
|
||||||
isInstance = isInstance && "orphans" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportDtoFromJSON(json: any): FileReportDto {
|
|
||||||
return FileReportDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileReportDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'extras': json['extras'],
|
|
||||||
'orphans': ((json['orphans'] as Array<any>).map(FileReportItemDtoFromJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportDtoToJSON(value?: FileReportDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'extras': value.extras,
|
|
||||||
'orphans': ((value.orphans as Array<any>).map(FileReportItemDtoToJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { FileReportItemDto } from './FileReportItemDto';
|
|
||||||
import {
|
|
||||||
FileReportItemDtoFromJSON,
|
|
||||||
FileReportItemDtoFromJSONTyped,
|
|
||||||
FileReportItemDtoToJSON,
|
|
||||||
} from './FileReportItemDto';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FileReportFixDto
|
|
||||||
*/
|
|
||||||
export interface FileReportFixDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {Array<FileReportItemDto>}
|
|
||||||
* @memberof FileReportFixDto
|
|
||||||
*/
|
|
||||||
items: Array<FileReportItemDto>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FileReportFixDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFileReportFixDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "items" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportFixDtoFromJSON(json: any): FileReportFixDto {
|
|
||||||
return FileReportFixDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportFixDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileReportFixDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'items': ((json['items'] as Array<any>).map(FileReportItemDtoFromJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportFixDtoToJSON(value?: FileReportFixDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'items': ((value.items as Array<any>).map(FileReportItemDtoToJSON)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { PathEntityType } from './PathEntityType';
|
|
||||||
import {
|
|
||||||
PathEntityTypeFromJSON,
|
|
||||||
PathEntityTypeFromJSONTyped,
|
|
||||||
PathEntityTypeToJSON,
|
|
||||||
} from './PathEntityType';
|
|
||||||
import type { PathType } from './PathType';
|
|
||||||
import {
|
|
||||||
PathTypeFromJSON,
|
|
||||||
PathTypeFromJSONTyped,
|
|
||||||
PathTypeToJSON,
|
|
||||||
} from './PathType';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface FileReportItemDto
|
|
||||||
*/
|
|
||||||
export interface FileReportItemDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FileReportItemDto
|
|
||||||
*/
|
|
||||||
checksum?: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FileReportItemDto
|
|
||||||
*/
|
|
||||||
entityId: string;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {PathEntityType}
|
|
||||||
* @memberof FileReportItemDto
|
|
||||||
*/
|
|
||||||
entityType: PathEntityType;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {PathType}
|
|
||||||
* @memberof FileReportItemDto
|
|
||||||
*/
|
|
||||||
pathType: PathType;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {string}
|
|
||||||
* @memberof FileReportItemDto
|
|
||||||
*/
|
|
||||||
pathValue: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the FileReportItemDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfFileReportItemDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "entityId" in value;
|
|
||||||
isInstance = isInstance && "entityType" in value;
|
|
||||||
isInstance = isInstance && "pathType" in value;
|
|
||||||
isInstance = isInstance && "pathValue" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportItemDtoFromJSON(json: any): FileReportItemDto {
|
|
||||||
return FileReportItemDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FileReportItemDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': !exists(json, 'checksum') ? undefined : json['checksum'],
|
|
||||||
'entityId': json['entityId'],
|
|
||||||
'entityType': PathEntityTypeFromJSON(json['entityType']),
|
|
||||||
'pathType': PathTypeFromJSON(json['pathType']),
|
|
||||||
'pathValue': json['pathValue'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FileReportItemDtoToJSON(value?: FileReportItemDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'checksum': value.checksum,
|
|
||||||
'entityId': value.entityId,
|
|
||||||
'entityType': PathEntityTypeToJSON(value.entityType),
|
|
||||||
'pathType': PathTypeToJSON(value.pathType),
|
|
||||||
'pathValue': value.pathValue,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
*/
|
|
||||||
export const JobCommand = {
|
|
||||||
Start: 'start',
|
|
||||||
Pause: 'pause',
|
|
||||||
Resume: 'resume',
|
|
||||||
Empty: 'empty',
|
|
||||||
ClearFailed: 'clear-failed'
|
|
||||||
} as const;
|
|
||||||
export type JobCommand = typeof JobCommand[keyof typeof JobCommand];
|
|
||||||
|
|
||||||
|
|
||||||
export function JobCommandFromJSON(json: any): JobCommand {
|
|
||||||
return JobCommandFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function JobCommandFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobCommand {
|
|
||||||
return json as JobCommand;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function JobCommandToJSON(value?: JobCommand | null): any {
|
|
||||||
return value as any;
|
|
||||||
}
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Immich
|
|
||||||
* Immich API
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.94.1
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
||||||
* https://openapi-generator.tech
|
|
||||||
* Do not edit the class manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
|
||||||
import type { JobCommand } from './JobCommand';
|
|
||||||
import {
|
|
||||||
JobCommandFromJSON,
|
|
||||||
JobCommandFromJSONTyped,
|
|
||||||
JobCommandToJSON,
|
|
||||||
} from './JobCommand';
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @export
|
|
||||||
* @interface JobCommandDto
|
|
||||||
*/
|
|
||||||
export interface JobCommandDto {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {JobCommand}
|
|
||||||
* @memberof JobCommandDto
|
|
||||||
*/
|
|
||||||
command: JobCommand;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @type {boolean}
|
|
||||||
* @memberof JobCommandDto
|
|
||||||
*/
|
|
||||||
force: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if a given object implements the JobCommandDto interface.
|
|
||||||
*/
|
|
||||||
export function instanceOfJobCommandDto(value: object): boolean {
|
|
||||||
let isInstance = true;
|
|
||||||
isInstance = isInstance && "command" in value;
|
|
||||||
isInstance = isInstance && "force" in value;
|
|
||||||
|
|
||||||
return isInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function JobCommandDtoFromJSON(json: any): JobCommandDto {
|
|
||||||
return JobCommandDtoFromJSONTyped(json, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function JobCommandDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobCommandDto {
|
|
||||||
if ((json === undefined) || (json === null)) {
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'command': JobCommandFromJSON(json['command']),
|
|
||||||
'force': json['force'],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function JobCommandDtoToJSON(value?: JobCommandDto | null): any {
|
|
||||||
if (value === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (value === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
|
|
||||||
'command': JobCommandToJSON(value.command),
|
|
||||||
'force': value.force,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user