merge main

This commit is contained in:
Alex
2024-10-31 11:14:26 -05:00
1524 changed files with 81920 additions and 46265 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
OPENAPI_GENERATOR_VERSION=v7.5.0
OPENAPI_GENERATOR_VERSION=v7.8.0
# usage: ./bin/generate-open-api.sh
@@ -8,12 +8,14 @@ function dart {
cd ./templates/mobile/serialization/native
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENERATOR_VERSION/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
patch --no-backup-if-mismatch -u native_class.mustache <native_class.mustache.patch
cd ../../../..
cd ../../../../
npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile
# Post generate patches
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api.dart <./patch/api.dart.patch
patch --no-backup-if-mismatch -u ../mobile/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch
# Don't include analysis_options.yaml for the generated openapi files
# so that language servers can properly exclude the mobile/openapi directory
rm ../mobile/openapi/analysis_options.yaml
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.5.0"
"version": "7.8.0"
}
}
+2 -1
View File
@@ -1,8 +1,9 @@
@@ -15,6 +15,7 @@
@@ -15,6 +15,8 @@
import 'dart:io';
import 'package:collection/collection.dart';
+import 'package:flutter/foundation.dart';
+import 'package:immich_mobile/utils/openapi_patching.dart';
import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
@@ -0,0 +1,9 @@
# Include code from immich_mobile
@@ -13,5 +13,5 @@
http: '>=0.13.0 <2.0.0'
intl: any
meta: '>=1.1.8 <2.0.0'
-dev_dependencies:
- test: '>=1.21.6 <1.22.0'
+ immich_mobile:
+ path: ../
@@ -111,6 +111,7 @@ class {{{classname}}} {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static {{{classname}}}? fromJson(dynamic value) {
upgradeDto(value, "{{{classname}}}");
if (value is Map) {
final json = value.cast<String, dynamic>();
@@ -1,5 +1,5 @@
--- native_class.mustache 2023-08-31 23:09:59.584269162 +0200
+++ native_class1.mustache 2023-08-31 22:59:53.633083270 +0200
--- native_class.mustache 2024-09-19 11:41:07.855683995 -0400
+++ native_class_temp.mustache 2024-09-19 11:41:57.113249395 -0400
@@ -91,14 +91,14 @@
{{/isDateTime}}
{{#isNullable}}
@@ -17,10 +17,14 @@
}
{{/defaultValue}}
{{/required}}
@@ -114,17 +114,6 @@
@@ -111,20 +111,10 @@
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static {{{classname}}}? fromJson(dynamic value) {
+ upgradeDto(value, "{{{classname}}}");
if (value is Map) {
final json = value.cast<String, dynamic>();
- // Ensure that the map contains the required keys.
- // Note 1: the values aren't checked for validity beyond being non-null.
- // Note 2: this code is stripped in release mode!
@@ -35,9 +39,9 @@
return {{{classname}}}(
{{#vars}}
{{#isDateTime}}
@@ -215,6 +204,10 @@
@@ -215,6 +205,10 @@
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
: {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()),
: {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'),
{{/isNumber}}
+ {{#isDouble}}
+ {{{name}}}: (mapValueOfType<num>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}).toDouble(),
@@ -46,7 +50,7 @@
{{^isNumber}}
{{^isEnum}}
{{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
@@ -223,6 +216,7 @@
@@ -223,6 +217,7 @@
{{{name}}}: {{{enumName}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
{{/isEnum}}
{{/isNumber}}
+1 -1
View File
@@ -1 +1 @@
20.16.0
22.11.0
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@immich/sdk",
"version": "1.111.0",
"version": "1.119.1",
"description": "Auto-generated TypeScript SDK for the Immich API",
"type": "module",
"main": "./build/index.js",
@@ -19,7 +19,7 @@
"@oazapfts/runtime": "^1.0.2"
},
"devDependencies": {
"@types/node": "^20.14.12",
"@types/node": "^22.8.1",
"typescript": "^5.3.3"
},
"repository": {
@@ -28,6 +28,6 @@
"directory": "open-api/typescript-sdk"
},
"volta": {
"node": "20.16.0"
"node": "22.11.0"
}
}
File diff suppressed because it is too large Load Diff