mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
update api
This commit is contained in:
parent
c88bde3cab
commit
59f7f3c23e
4 changed files with 27 additions and 23 deletions
38
mobile/openapi/lib/api/upload_api.dart
generated
38
mobile/openapi/lib/api/upload_api.dart
generated
|
|
@ -286,19 +286,19 @@ class UploadApi {
|
||||||
/// * [String] reprDigest (required):
|
/// * [String] reprDigest (required):
|
||||||
/// RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.
|
/// RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.
|
||||||
///
|
///
|
||||||
/// * [String] uploadComplete (required):
|
|
||||||
/// Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.
|
|
||||||
///
|
|
||||||
/// * [String] uploadDraftInteropVersion (required):
|
|
||||||
/// Indicates the version of the RUFH protocol supported by the client.
|
|
||||||
///
|
|
||||||
/// * [String] xImmichAssetData (required):
|
/// * [String] xImmichAssetData (required):
|
||||||
/// RFC 9651 structured dictionary containing asset metadata with the following keys: - device-asset-id (string, required): Unique device asset identifier - device-id (string, required): Device identifier - file-created-at (string/date, required): ISO 8601 date string or Unix timestamp - file-modified-at (string/date, required): ISO 8601 date string or Unix timestamp - filename (string, required): Original filename - is-favorite (boolean, optional): Favorite status - live-photo-video-id (string, optional): Live photo ID for assets from iOS devices - icloud-id (string, optional): iCloud identifier for assets from iOS devices
|
/// RFC 9651 structured dictionary containing asset metadata with the following keys: - device-asset-id (string, required): Unique device asset identifier - device-id (string, required): Device identifier - file-created-at (string/date, required): ISO 8601 date string or Unix timestamp - file-modified-at (string/date, required): ISO 8601 date string or Unix timestamp - filename (string, required): Original filename - is-favorite (boolean, optional): Favorite status - live-photo-video-id (string, optional): Live photo ID for assets from iOS devices - icloud-id (string, optional): iCloud identifier for assets from iOS devices
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
///
|
///
|
||||||
/// * [String] slug:
|
/// * [String] slug:
|
||||||
Future<Response> startUploadWithHttpInfo(String contentLength, String reprDigest, String uploadComplete, String uploadDraftInteropVersion, String xImmichAssetData, { String? key, String? slug, }) async {
|
///
|
||||||
|
/// * [String] uploadComplete:
|
||||||
|
/// Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.
|
||||||
|
///
|
||||||
|
/// * [String] uploadDraftInteropVersion:
|
||||||
|
/// Indicates the version of the RUFH protocol supported by the client.
|
||||||
|
Future<Response> startUploadWithHttpInfo(String contentLength, String reprDigest, String xImmichAssetData, { String? key, String? slug, String? uploadComplete, String? uploadDraftInteropVersion, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final apiPath = r'/upload';
|
final apiPath = r'/upload';
|
||||||
|
|
||||||
|
|
@ -318,8 +318,12 @@ class UploadApi {
|
||||||
|
|
||||||
headerParams[r'content-length'] = parameterToString(contentLength);
|
headerParams[r'content-length'] = parameterToString(contentLength);
|
||||||
headerParams[r'repr-digest'] = parameterToString(reprDigest);
|
headerParams[r'repr-digest'] = parameterToString(reprDigest);
|
||||||
headerParams[r'upload-complete'] = parameterToString(uploadComplete);
|
if (uploadComplete != null) {
|
||||||
headerParams[r'upload-draft-interop-version'] = parameterToString(uploadDraftInteropVersion);
|
headerParams[r'upload-complete'] = parameterToString(uploadComplete);
|
||||||
|
}
|
||||||
|
if (uploadDraftInteropVersion != null) {
|
||||||
|
headerParams[r'upload-draft-interop-version'] = parameterToString(uploadDraftInteropVersion);
|
||||||
|
}
|
||||||
headerParams[r'x-immich-asset-data'] = parameterToString(xImmichAssetData);
|
headerParams[r'x-immich-asset-data'] = parameterToString(xImmichAssetData);
|
||||||
|
|
||||||
const contentTypes = <String>[];
|
const contentTypes = <String>[];
|
||||||
|
|
@ -346,20 +350,20 @@ class UploadApi {
|
||||||
/// * [String] reprDigest (required):
|
/// * [String] reprDigest (required):
|
||||||
/// RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.
|
/// RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.
|
||||||
///
|
///
|
||||||
/// * [String] uploadComplete (required):
|
|
||||||
/// Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.
|
|
||||||
///
|
|
||||||
/// * [String] uploadDraftInteropVersion (required):
|
|
||||||
/// Indicates the version of the RUFH protocol supported by the client.
|
|
||||||
///
|
|
||||||
/// * [String] xImmichAssetData (required):
|
/// * [String] xImmichAssetData (required):
|
||||||
/// RFC 9651 structured dictionary containing asset metadata with the following keys: - device-asset-id (string, required): Unique device asset identifier - device-id (string, required): Device identifier - file-created-at (string/date, required): ISO 8601 date string or Unix timestamp - file-modified-at (string/date, required): ISO 8601 date string or Unix timestamp - filename (string, required): Original filename - is-favorite (boolean, optional): Favorite status - live-photo-video-id (string, optional): Live photo ID for assets from iOS devices - icloud-id (string, optional): iCloud identifier for assets from iOS devices
|
/// RFC 9651 structured dictionary containing asset metadata with the following keys: - device-asset-id (string, required): Unique device asset identifier - device-id (string, required): Device identifier - file-created-at (string/date, required): ISO 8601 date string or Unix timestamp - file-modified-at (string/date, required): ISO 8601 date string or Unix timestamp - filename (string, required): Original filename - is-favorite (boolean, optional): Favorite status - live-photo-video-id (string, optional): Live photo ID for assets from iOS devices - icloud-id (string, optional): iCloud identifier for assets from iOS devices
|
||||||
///
|
///
|
||||||
/// * [String] key:
|
/// * [String] key:
|
||||||
///
|
///
|
||||||
/// * [String] slug:
|
/// * [String] slug:
|
||||||
Future<UploadOkDto?> startUpload(String contentLength, String reprDigest, String uploadComplete, String uploadDraftInteropVersion, String xImmichAssetData, { String? key, String? slug, }) async {
|
///
|
||||||
final response = await startUploadWithHttpInfo(contentLength, reprDigest, uploadComplete, uploadDraftInteropVersion, xImmichAssetData, key: key, slug: slug, );
|
/// * [String] uploadComplete:
|
||||||
|
/// Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.
|
||||||
|
///
|
||||||
|
/// * [String] uploadDraftInteropVersion:
|
||||||
|
/// Indicates the version of the RUFH protocol supported by the client.
|
||||||
|
Future<UploadOkDto?> startUpload(String contentLength, String reprDigest, String xImmichAssetData, { String? key, String? slug, String? uploadComplete, String? uploadDraftInteropVersion, }) async {
|
||||||
|
final response = await startUploadWithHttpInfo(contentLength, reprDigest, xImmichAssetData, key: key, slug: slug, uploadComplete: uploadComplete, uploadDraftInteropVersion: uploadDraftInteropVersion, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9427,7 +9427,7 @@
|
||||||
"name": "upload-complete",
|
"name": "upload-complete",
|
||||||
"in": "header",
|
"in": "header",
|
||||||
"description": "Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.",
|
"description": "Structured boolean indicating whether this request completes the file. Use Upload-Incomplete instead for version <= 3.",
|
||||||
"required": true,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
@ -9436,7 +9436,7 @@
|
||||||
"name": "upload-draft-interop-version",
|
"name": "upload-draft-interop-version",
|
||||||
"in": "header",
|
"in": "header",
|
||||||
"description": "Indicates the version of the RUFH protocol supported by the client.",
|
"description": "Indicates the version of the RUFH protocol supported by the client.",
|
||||||
"required": true,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4540,8 +4540,8 @@ export function startUpload({ contentLength, key, reprDigest, slug, uploadComple
|
||||||
key?: string;
|
key?: string;
|
||||||
reprDigest: string;
|
reprDigest: string;
|
||||||
slug?: string;
|
slug?: string;
|
||||||
uploadComplete: string;
|
uploadComplete?: string;
|
||||||
uploadDraftInteropVersion: string;
|
uploadDraftInteropVersion?: string;
|
||||||
xImmichAssetData: string;
|
xImmichAssetData: string;
|
||||||
}, opts?: Oazapfts.RequestOpts) {
|
}, opts?: Oazapfts.RequestOpts) {
|
||||||
return oazapfts.ok(oazapfts.fetchJson<{
|
return oazapfts.ok(oazapfts.fetchJson<{
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ export class AssetUploadController {
|
||||||
'RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.',
|
'RFC 9651 structured dictionary containing an `sha` (bytesequence) checksum used to detect duplicate files and validate data integrity.',
|
||||||
required: true,
|
required: true,
|
||||||
})
|
})
|
||||||
@ApiHeader(apiInteropVersion)
|
@ApiHeader({ ...apiInteropVersion, required: false })
|
||||||
@ApiHeader(apiUploadComplete)
|
@ApiHeader({ ...apiUploadComplete, required: false })
|
||||||
@ApiHeader(apiContentLength)
|
@ApiHeader(apiContentLength)
|
||||||
@ApiOkResponse({ type: UploadOkDto })
|
@ApiOkResponse({ type: UploadOkDto })
|
||||||
startUpload(@Auth() auth: AuthDto, @Req() req: Request, @Res() res: Response): Promise<void> {
|
startUpload(@Auth() auth: AuthDto, @Req() req: Request, @Res() res: Response): Promise<void> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue