You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-05 06:00:24 +02:00
updated api
This commit is contained in:
3
mobile/openapi/README.md
generated
3
mobile/openapi/README.md
generated
@ -144,7 +144,7 @@ Class | Method | HTTP request | Description
|
|||||||
*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets |
|
*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets |
|
||||||
*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories |
|
*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories |
|
||||||
*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} |
|
*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} |
|
||||||
*NotificationsApi* | [**getNotificationTemplate**](doc//NotificationsApi.md#getnotificationtemplate) | **GET** /notifications/templates/{name} |
|
*NotificationsApi* | [**getNotificationTemplate**](doc//NotificationsApi.md#getnotificationtemplate) | **POST** /notifications/templates/{name} |
|
||||||
*NotificationsApi* | [**sendTestEmail**](doc//NotificationsApi.md#sendtestemail) | **POST** /notifications/test-email |
|
*NotificationsApi* | [**sendTestEmail**](doc//NotificationsApi.md#sendtestemail) | **POST** /notifications/test-email |
|
||||||
*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
||||||
*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
||||||
@ -452,6 +452,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [TagUpsertDto](doc//TagUpsertDto.md)
|
- [TagUpsertDto](doc//TagUpsertDto.md)
|
||||||
- [TagsResponse](doc//TagsResponse.md)
|
- [TagsResponse](doc//TagsResponse.md)
|
||||||
- [TagsUpdate](doc//TagsUpdate.md)
|
- [TagsUpdate](doc//TagsUpdate.md)
|
||||||
|
- [TemplateDto](doc//TemplateDto.md)
|
||||||
- [TemplateResponseDto](doc//TemplateResponseDto.md)
|
- [TemplateResponseDto](doc//TemplateResponseDto.md)
|
||||||
- [TestEmailResponseDto](doc//TestEmailResponseDto.md)
|
- [TestEmailResponseDto](doc//TestEmailResponseDto.md)
|
||||||
- [TimeBucketResponseDto](doc//TimeBucketResponseDto.md)
|
- [TimeBucketResponseDto](doc//TimeBucketResponseDto.md)
|
||||||
|
1
mobile/openapi/lib/api.dart
generated
1
mobile/openapi/lib/api.dart
generated
@ -265,6 +265,7 @@ part 'model/tag_update_dto.dart';
|
|||||||
part 'model/tag_upsert_dto.dart';
|
part 'model/tag_upsert_dto.dart';
|
||||||
part 'model/tags_response.dart';
|
part 'model/tags_response.dart';
|
||||||
part 'model/tags_update.dart';
|
part 'model/tags_update.dart';
|
||||||
|
part 'model/template_dto.dart';
|
||||||
part 'model/template_response_dto.dart';
|
part 'model/template_response_dto.dart';
|
||||||
part 'model/test_email_response_dto.dart';
|
part 'model/test_email_response_dto.dart';
|
||||||
part 'model/time_bucket_response_dto.dart';
|
part 'model/time_bucket_response_dto.dart';
|
||||||
|
18
mobile/openapi/lib/api/notifications_api.dart
generated
18
mobile/openapi/lib/api/notifications_api.dart
generated
@ -16,28 +16,30 @@ class NotificationsApi {
|
|||||||
|
|
||||||
final ApiClient apiClient;
|
final ApiClient apiClient;
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /notifications/templates/{name}' operation and returns the [Response].
|
/// Performs an HTTP 'POST /notifications/templates/{name}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] name (required):
|
/// * [String] name (required):
|
||||||
Future<Response> getNotificationTemplateWithHttpInfo(String name,) async {
|
///
|
||||||
|
/// * [TemplateDto] templateDto (required):
|
||||||
|
Future<Response> getNotificationTemplateWithHttpInfo(String name, TemplateDto templateDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/notifications/templates/{name}'
|
final path = r'/notifications/templates/{name}'
|
||||||
.replaceAll('{name}', name);
|
.replaceAll('{name}', name);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody = templateDto;
|
||||||
|
|
||||||
final queryParams = <QueryParam>[];
|
final queryParams = <QueryParam>[];
|
||||||
final headerParams = <String, String>{};
|
final headerParams = <String, String>{};
|
||||||
final formParams = <String, String>{};
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
const contentTypes = <String>[];
|
const contentTypes = <String>['application/json'];
|
||||||
|
|
||||||
|
|
||||||
return apiClient.invokeAPI(
|
return apiClient.invokeAPI(
|
||||||
path,
|
path,
|
||||||
'GET',
|
'POST',
|
||||||
queryParams,
|
queryParams,
|
||||||
postBody,
|
postBody,
|
||||||
headerParams,
|
headerParams,
|
||||||
@ -49,8 +51,10 @@ class NotificationsApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] name (required):
|
/// * [String] name (required):
|
||||||
Future<TemplateResponseDto?> getNotificationTemplate(String name,) async {
|
///
|
||||||
final response = await getNotificationTemplateWithHttpInfo(name,);
|
/// * [TemplateDto] templateDto (required):
|
||||||
|
Future<TemplateResponseDto?> getNotificationTemplate(String name, TemplateDto templateDto,) async {
|
||||||
|
final response = await getNotificationTemplateWithHttpInfo(name, templateDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
2
mobile/openapi/lib/api_client.dart
generated
2
mobile/openapi/lib/api_client.dart
generated
@ -584,6 +584,8 @@ class ApiClient {
|
|||||||
return TagsResponse.fromJson(value);
|
return TagsResponse.fromJson(value);
|
||||||
case 'TagsUpdate':
|
case 'TagsUpdate':
|
||||||
return TagsUpdate.fromJson(value);
|
return TagsUpdate.fromJson(value);
|
||||||
|
case 'TemplateDto':
|
||||||
|
return TemplateDto.fromJson(value);
|
||||||
case 'TemplateResponseDto':
|
case 'TemplateResponseDto':
|
||||||
return TemplateResponseDto.fromJson(value);
|
return TemplateResponseDto.fromJson(value);
|
||||||
case 'TestEmailResponseDto':
|
case 'TestEmailResponseDto':
|
||||||
|
99
mobile/openapi/lib/model/template_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/template_dto.dart
generated
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element, unused_import
|
||||||
|
// ignore_for_file: always_put_required_named_parameters_first
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
// ignore_for_file: lines_longer_than_80_chars
|
||||||
|
|
||||||
|
part of openapi.api;
|
||||||
|
|
||||||
|
class TemplateDto {
|
||||||
|
/// Returns a new [TemplateDto] instance.
|
||||||
|
TemplateDto({
|
||||||
|
required this.tempTemplate,
|
||||||
|
});
|
||||||
|
|
||||||
|
String tempTemplate;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is TemplateDto &&
|
||||||
|
other.tempTemplate == tempTemplate;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(tempTemplate.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'TemplateDto[tempTemplate=$tempTemplate]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'tempTemplate'] = this.tempTemplate;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [TemplateDto] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static TemplateDto? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "TemplateDto");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return TemplateDto(
|
||||||
|
tempTemplate: mapValueOfType<String>(json, r'tempTemplate')!,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<TemplateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <TemplateDto>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = TemplateDto.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, TemplateDto> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, TemplateDto>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = TemplateDto.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of TemplateDto-objects as value to a dart map
|
||||||
|
static Map<String, List<TemplateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<TemplateDto>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = TemplateDto.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'tempTemplate',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3431,7 +3431,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/notifications/templates/{name}": {
|
"/notifications/templates/{name}": {
|
||||||
"get": {
|
"post": {
|
||||||
"operationId": "getNotificationTemplate",
|
"operationId": "getNotificationTemplate",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@ -3443,6 +3443,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/TemplateDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -12417,6 +12427,17 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"TemplateDto": {
|
||||||
|
"properties": {
|
||||||
|
"tempTemplate": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"tempTemplate"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"TemplateResponseDto": {
|
"TemplateResponseDto": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"html": {
|
"html": {
|
||||||
|
@ -639,6 +639,9 @@ export type MemoryUpdateDto = {
|
|||||||
memoryAt?: string;
|
memoryAt?: string;
|
||||||
seenAt?: string;
|
seenAt?: string;
|
||||||
};
|
};
|
||||||
|
export type TemplateDto = {
|
||||||
|
tempTemplate: string;
|
||||||
|
};
|
||||||
export type TemplateResponseDto = {
|
export type TemplateResponseDto = {
|
||||||
html: string;
|
html: string;
|
||||||
name: string;
|
name: string;
|
||||||
@ -2237,15 +2240,18 @@ export function addMemoryAssets({ id, bulkIdsDto }: {
|
|||||||
body: bulkIdsDto
|
body: bulkIdsDto
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
export function getNotificationTemplate({ name }: {
|
export function getNotificationTemplate({ name, templateDto }: {
|
||||||
name: string;
|
name: string;
|
||||||
|
templateDto: TemplateDto;
|
||||||
}, opts?: Oazapfts.RequestOpts) {
|
}, opts?: Oazapfts.RequestOpts) {
|
||||||
return oazapfts.ok(oazapfts.fetchJson<{
|
return oazapfts.ok(oazapfts.fetchJson<{
|
||||||
status: 200;
|
status: 200;
|
||||||
data: TemplateResponseDto;
|
data: TemplateResponseDto;
|
||||||
}>(`/notifications/templates/${encodeURIComponent(name)}`, {
|
}>(`/notifications/templates/${encodeURIComponent(name)}`, oazapfts.json({
|
||||||
...opts
|
...opts,
|
||||||
}));
|
method: "POST",
|
||||||
|
body: templateDto
|
||||||
|
})));
|
||||||
}
|
}
|
||||||
export function sendTestEmail({ systemConfigSmtpDto }: {
|
export function sendTestEmail({ systemConfigSmtpDto }: {
|
||||||
systemConfigSmtpDto: SystemConfigSmtpDto;
|
systemConfigSmtpDto: SystemConfigSmtpDto;
|
||||||
|
Reference in New Issue
Block a user