From 9323cc76d90baeb7b6e9ed555dce03a443b0db0d Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Fri, 24 Feb 2023 17:01:10 +0100 Subject: [PATCH] feat(server): improve API specification (#1853) --- mobile/openapi/README.md | Bin 13609 -> 14376 bytes mobile/openapi/doc/APIKeyApi.md | Bin 4939 -> 8454 bytes mobile/openapi/doc/AlbumApi.md | Bin 17814 -> 21920 bytes mobile/openapi/doc/AssetApi.md | Bin 35081 -> 43423 bytes mobile/openapi/doc/AuthenticationApi.md | Bin 5949 -> 7290 bytes mobile/openapi/doc/DeviceInfoApi.md | Bin 1733 -> 2052 bytes mobile/openapi/doc/JobApi.md | Bin 2895 -> 3533 bytes mobile/openapi/doc/OAuthApi.md | Bin 4869 -> 6275 bytes mobile/openapi/doc/ServerInfoApi.md | Bin 3631 -> 4334 bytes mobile/openapi/doc/ShareApi.md | Bin 4972 -> 8624 bytes mobile/openapi/doc/SystemConfigApi.md | Bin 5492 -> 6768 bytes mobile/openapi/doc/TagApi.md | Bin 4723 -> 8238 bytes mobile/openapi/doc/UserApi.md | Bin 12524 -> 14757 bytes mobile/openapi/lib/api/album_api.dart | Bin 20291 -> 20865 bytes mobile/openapi/lib/api/asset_api.dart | Bin 43392 -> 45334 bytes mobile/openapi/lib/api/share_api.dart | Bin 7705 -> 7938 bytes mobile/openapi/test/album_api_test.dart | Bin 2450 -> 2501 bytes mobile/openapi/test/asset_api_test.dart | Bin 4976 -> 5155 bytes mobile/openapi/test/share_api_test.dart | Bin 1217 -> 1231 bytes .../src/api-v1/album/album.controller.ts | 6 +- .../src/api-v1/asset/asset.controller.ts | 18 +- .../immich/src/api-v1/job/job.controller.ts | 3 +- .../immich/src/controllers/auth.controller.ts | 4 +- .../src/controllers/device-info.controller.ts | 3 +- .../controllers/system-config.controller.ts | 3 +- .../immich/src/controllers/user.controller.ts | 9 +- .../src/decorators/authenticated.decorator.ts | 4 +- server/apps/immich/src/main.ts | 2 + server/immich-openapi-specs.json | 499 +++++++++++++++-- web/src/api/open-api/api.ts | 524 ++++++++++++++---- .../album-page/__tests__/album-card.spec.ts | 1 + .../components/album-page/album-card.svelte | 11 +- .../components/album-page/album-viewer.svelte | 10 +- .../asset-viewer/asset-viewer.svelte | 3 +- .../asset-viewer/photo-viewer.svelte | 5 +- .../individual-shared-viewer.svelte | 12 +- .../shared-album-list-tile.svelte | 11 +- web/src/lib/utils/asset-utils.ts | 48 +- web/src/lib/utils/file-uploader.ts | 6 +- web/src/routes/share/[key]/+page.server.ts | 2 +- .../[key]/photos/[assetId]/+page.server.ts | 4 +- 41 files changed, 965 insertions(+), 223 deletions(-) diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 219df96e7d85290933f3d993304d0dc9256f965a..25bec3aaf1909d0329222346a316973c1dc4f5b6 100644 GIT binary patch delta 799 zcmbV~OHRWu5QZ1*a*B~yq^-aeNU-1~l~8C^L@OE=T}39Hq^6A>Tt`q4%5`9e#GNFKu*2Ynj-k;)#^9?dO8OgP#Iu=crNWyDl!nDw}BhrIYX zskvokx6bAi9ELcb+j2E`)W5k7TAtS)4ggtumFUIi3leUqeRUO zf+>ht5nUlJRHkj+i!wy%e3@IT!!t0(;N`C){4l|K&t=PEkbF)4)}RYhTzr>4RB9^l zcWfkm4;K|znMlfV`wGWUX*%czy>>owt(>HwN)lQT?RcghNIIZRWGSQ?Bk>3|WHGB; zQHMxrs5rMkL?98zIQ|bD*s)f0gR&bjmiBNDKlV00ckVYgp%TE^hDO6*q}XU2EE(+E rQn!?Ao}eM~N;-=uktAe`fLmJy))Y45Qk8ZrVjRbz9))B|)7|+3-@p)< delta 27 hcmZ2curh0d8S~~#tWOR3xRjL@97{_w@{72D005N;2+jZi diff --git a/mobile/openapi/doc/APIKeyApi.md b/mobile/openapi/doc/APIKeyApi.md index 72af85513a2ae531a0b37d4852e573345fdd2423..ecf2fcc674ba15804de10f212f94782f9db8332f 100644 GIT binary patch literal 8454 zcmeHMZBOGk5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yo#2}{n1%q4^I eXZ@1FBH!IF8`6_58LVFR1(&f0n~MMGrsE%V6~T-E delta 231 zcmZp3I<2;08q?%vLCww4tbZ9L{qhwOOG`5Hi!!ScOEUBG6pB&{OEZg7QzjSi8cvo| zcrke`M+{JT(B|*lws@3pF5oR^+}td<504t4kv@~{6i!U8=i{0@TODtF&JM^==Hu%iL}Jy(qY diff --git a/mobile/openapi/doc/AlbumApi.md b/mobile/openapi/doc/AlbumApi.md index 02405ec988255d51c9d838c7405a77721ac7cf54..e7d544708e9c9821a9e0ee8c3c6e0e980f05eed9 100644 GIT binary patch literal 21920 zcmeHPZBN@s5dQ98u@WbdM8r`~_u&LBQVMAs0R=($P;rQwcmW@d*JnFzQ_6q8XLi@| z+HoLhLz@&wYKeEpvoEtV&(6+l)|d!+;Dnw{|JwfLaL^7t%UWAw`@(Tqa>H5ssLMj9 zf9qUx>*L3dt`jAeHwZ3lXeu5vgUheV?5kcVp&6oJHJs67LgdiC_&P zZCKU;Pi}ALqVMF|Sc`84Ly1B{1MJquq+ zsM+=-?j&4xvDjBtWp?xMBRn)5YJV$zIi!n5=GOal}hU%ZKE4piD|4o)Rk}?uPl?5 zFMAx9vhrm|<4IPULBt2*6PFAAO(X`AQ<0IPkxTgsG?JrYI8{#hg|8UUTt3nU&C|?H z5OM2{{)eXN;S57J)rGRzRn>9;*#sZ8dpqx@tTh-jDEFjEu(nw{wG+oY4n+|2U09|f zWlgr#bvLpakZrJAKB`;tvj%I~`Qi*he=Y;rYO&to?jhR|!IgJCgn^Vc@HK}5N6Z<* zFh<^2SWFRYvP)TN;hh~P=In*dAPaVqL|$;sdg7J`sB`(1GxQT!@EzadL1NP~1s{C% z`jXMhcS#be7N}yowyqej*KOF#cE8VK*fwyht$#Q?J-%q~>~u~}E_#Q1o%ieYt#SK* zs`lRugFf|-eZKMfH|&}RJc96G;K9NsYTd(;7)FxsTSX$G^wnCO-7(v?+5LhCFuh4N zj>6m%%0Z;XdG8Bx>+#vThI!xPBR#L`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v)FMrVwEQ9ks4H|7GSd|DQd3h>Q-J2A zq^2d7=1i7im({`Nh5(46K$k#FocxhrZ*wMx0h64LLNvs^u^M`M`a!OaF21gMxhcvJ z!Ob(cVpun`3fC|W(}39gkw1!Yat)U(p@7g36J^|7A;ifvOalU#B0@J`771e{CLjP! CB?cY< delta 57 zcmV-90LK6NIK3{gJ_wV~6DzZc2`~baVihs72@EO)ll=lKv-%S(0h0>_N|ToxRnpt08Um?Wb#b3cWKQApay|gG*!7;#7Av?8FA+fY1BfluKDzPLpKhH`b zIX^!;Gj;NLCbfFUf=ut!N=Kl)orXF@TwPNy5iF`;tDqj~9~u-7G$!8LHB#N03ur}Y zUUGhJZfahMLQ-l@ez`(PzCv+oNoj#XK~ZX2W`%-As$RODf>UZ@QEHKoY^;W!o_>(4 Tql>SrUT%sqL~!$JRw+gRv|n4@ delta 17 YcmZn>ILf=hnt5|HOCi(d*KCrE05;DBm;e9( diff --git a/mobile/openapi/doc/JobApi.md b/mobile/openapi/doc/JobApi.md index 11a6544e0754c60eb0087458ee88d31f79b24f31..edb412cd579d33f46a7f6ea8375dbbb1c14205b1 100644 GIT binary patch delta 528 zcmX>vc2;^rJoDtoj6$-G0iFuksg(+er6n2pMVVEJC7JnoRtm}a`PrGNlWW=4>KzL* zy;Cb4f%0}5>JV{tO}#|0sDiD6dZd47P(09>cyHH8b!#qteTCAzvYVr_{uv)FMrVwEQ9ks4H|7GSd|DQd3h>Q-J2A zq^2d7=1gv5m(|7Rh5(46K$k#FRNoxS+`uTOqYw>oY^;W!o_>(4ql>SrUT%sqL~!#R e7T#eS0Fz^xl{Ry7=rR!qgvobUj3%dZy#N3>ORtIm delta 34 qcmX>reO_!sJoDyymO94GGHg7|lj~U&HfM0@GEJ6YGo1XC=LG=D!V6UZ diff --git a/mobile/openapi/doc/OAuthApi.md b/mobile/openapi/doc/OAuthApi.md index d1bcec668519d3707343f4dd16caf7bc2b3c6af1..4070fe87950d3bdcc9d6ea1307e8057704ad5327 100644 GIT binary patch literal 6275 zcmeHLZExC05dQ98F;Xf4Rx!H!m|P=K!nIK@0TJ?{%0-D|FR&N0>sv2vxJ&>0J?r&? z?UFZ@o>D1D2s|@8Gdnx;%&d1vrc8t>56pMaUFcai<({{*Lx0FHCOu=+9Uf8|MmOP< zc~@6gaj3M%=c!bh8U=l~(9$tlj6h@0hf@=ccZ$TQz%Qg_{JAQ+qBToi)C|p z%@a0aF;^_obssEO63(JiLBv$`6oTtgNa><);5hjF`x#S|#p@{XvDH{&%-{W4sHdS2crdKCsMVMU2P`fR3dM(vWjCFv*d|N=0>)%+M2AHH$lYS9e_D_LoM5b%wels z(N)Q!u5+pXxvHJbRZTlWrJ@}%PqwGk^TRvba!pr_y`ai=fveW_np$*Hn=m-~M{0U= zHm$)SS6s@o*ZO`0B%W8_w#TEY&oZV;VFs9pn=LnIbkp(RU_drC78vw$(0$J^^QkI0 z@6vTn^{}QFW{iFbjE8ip(KDwsmN!g*7qdx-#@kJKFX4d7V9K^B=$aibMvkOgLES+1?w_%t{hU3PoD{^{xEcyQD|F^$yO|JB<6eIX))`{=|Rt=bhS zU>yzxM!N8DDHkf&`@znKQn{r~bax7ZfWB^d1NWP>`>4gdM0@X%UHOKiQRbDQopwj~zx=j%jSjZQI9)-S8*JylW@fM z=&i>+VAblP7}VYPo-0{Z*JE`yp7D&_WKXeV840O#yrWPo@m8g{!vz~IMxP~*0i5$x zFL9@_S8TeL@v_K6gU_p5&o=KtxG)krFc-k&+7+nG`iXBp?j6X6`N*=qGgr|OYhC$u zBHH3e_c{@kC*iG6L?s-3=rx$Dlr7IMR_zZ(R=jemjSDY!f+z!S4U4~dUG;O>Z+F?_kc diff --git a/mobile/openapi/doc/ServerInfoApi.md b/mobile/openapi/doc/ServerInfoApi.md index 4089a3bafac934a179357610089b57c3873a2c83..df57bc9a79459d43e2f540c40399e3cd5f9bc80c 100644 GIT binary patch delta 758 zcmbV~%TB^T6ow;l;brB{g)zstXq%8By7WR)OBF&C0%c){A+?;A3D6F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hN~oDyJ{{fMFWtuxR%`%mOllB(O&EDs8q^p}s2A-)EsN82``R7g0L{{IF|CU_kH delta 222 zcmZ4I@L6R;0Mq0pGHRQJSkE#_`sFJmmX>7X7iCr@mSpDVDHNp^mSz^Erc7>>Fx>3J zZpR2z>#{kE+aAAKpUsB6dLXq5o23Pn@u=P0C?UZ(d6IB4$lS?U+}xWVh^69J-_E#s PiHs=|ez#8cVSfPt8X8ej diff --git a/mobile/openapi/doc/UserApi.md b/mobile/openapi/doc/UserApi.md index 01b6bd1ad3d49479fead36cc04a6a35213a116ec..d8337ed6423879faf2ba2b4fdd35688646145e4c 100644 GIT binary patch literal 14757 zcmeHOZExC05dQ98u@Wa?tYUQcG3iAjgtn+nf(ZFgPB3o@X`a$TYhl@PDHi`Arq&u28Y=S@U;_;g02 z9rTqLw5B}eu|~BJqO8}9AbGX6%8MiEPG>#4EFH;qH*@T=Y$WjtRvi(0(Q;m6>MApn z&BL6uVQaZ z^0AK(&iH}dbB_o3Hi%6S$Rz4S!kLHz$@jG)5y5<@-e8}ZX`1Y5#|v0JrCLWp_Y|NX z`K+k-u@H|A-%K><{Vks*dQ}6VSA=M^vfo*v(SC3Aw)-Bj9om8V#B_?!gYWB#j}+7K z8DgLL0iQUZn9j|6ld133U=tBY9D$fGm@{D>=Qg*$UADfO3=*oDAe%OEJj-Q}edKsy zWO-wb6_C$ikvbHp`pF52P)SkPf1qL zJSop|#D3v_cx2>H3Uxx1!|R2Jc(@(NVpI-_2BM;oNr5;%mt3%L>VE0YZrePeh>D*dcu<~gW5#G`y zA;lyg*mDFc@!cehwf+pTrO|F~PO+sTuZe_zd#l$PENvo(cAYRndu{=?7{}ytG9ETD zTNCEjBcjR#v-u`H)3hIuQ^J#<7;my^^AfyCyY(1fuSYuq`c;`tmDwP@dwF<3quc-p zqaH?F<@XX`lALz)l&0)nyM>gL|6V|fQdyG5C}pk9U#_1CU?9h1IAU=;B;7wTR^-k` z0T%C&M7=D0qZ6F!H^a>&>h&WJ)*zoeB;4eD|fYcek1_8qd zCuH+eab^o1G7tM-x^rTdH$yQ)ax-EszmzC!7^_hI|6Vx2u=4c=2-cT(fAVoeJNaza zPELR}ygyW#;*PTH73qa{-hLMCVD5><_6q;z#XaTPnC;v#$X0qT!M{xZPVf)6{e?2Vs)TZfHK0`q zWwvy7-6iOMFQJS9Up;$ADbN!C+AU&aCfEzWP}&%P&Rkh!)kt|3!TD>&V5ktCgF dKY%2wL5U|QgUqQ=VnvpUkfJJsd^TnG{{m+f(-8mw delta 148 zcmZ2l{3db3Cf3Q$yy}~Ovi)M*EW|0uyxEyonQ5{Rr{Uzi7B4o>6L`l6lApXl&3Chc zNI4@|W{={l%@@TWGMm|?b|XZ8%RC3ESKO?u;0YGpyhqWJ7j8nQK_yJ>^UapVAHimC ME;RcC5e3=^03IAS2mk;8 diff --git a/mobile/openapi/lib/api/album_api.dart b/mobile/openapi/lib/api/album_api.dart index f3e2b96d94c78cd137fd893eb5d65b44a4c253ef..8f42545b8bd803821811a990b912aff99a0b9a73 100644 GIT binary patch delta 461 zcmX>+kFjwveo8+&mF`1Lim`4Gm(+WiB zC~UUp)neM5#!)Cad8&aZ*d3P@{kV}FuvuPdAtSc}5MXt|=6z;rj6gqVPd=r{3o=6* zWH^_Cf?H`xX;G?;Z)r|RWSRS#17x!&`>RHAp*Tj9NfAYdx{jtoVzB~> z*yMix^vymRM_FMWW&s&7dA*6`WOY4dbYIIWMNVFz_ZoZnAzTlOg*^sV=q7-|P1;Zq OJ>2dvZI&?6mIeU7laU7i delta 255 zcmZo%%y@VnL_`5erA#6@}4Zg@)~B)f0kf$Ljrm=CYQ77b18r{S%HYnA5*oN zHlJrVXM|}3*)PuNhpu%Y(Ed%F1nhq~S&zeY@_p_Im|?~|dFTd#+;EJ?9K#K2{4ruM zZ40#(C(l=vLDvd$gS`&NWC69W$l<^V4~NZnk^>nhFG%E&2Kf(YgST8fd32LOj_TG>M0b=Tibi!EO@+i_1r)JK9Ga8QHzrT^)iXpmJ`mk_ zh{K;CI~p_co=mo{(|{U;*Ztjk#^@G6+|M)ly`DTde$bj+VmNd1atl}rl%1SqDl*y1 zh?g5Z3EJy$Zk}f($H=V!1US>;-^m+H;z8!&^@oh90*d({Pb8UYa-gJ5qM~5)2lJhr zu<#G`m!167MQ}2IDf{GtPHq${KoOzu^bbcwZ0@yYVw}wDs4;mRhcqx5X@imyI8)ZS zSYZotg)pBU^m(`n-_MGMQ6^V8IG17YhM9(qtOirx1 zjU!Z%%BDk;)9dtM2L5MJp1ifr8r?vU7ewnZ%7@A4*`qd}Z!BhqhbzcI!JRHB{s+2d z^V80a_`bZWK}L9PmYu-M2}?tpC1-jv@*w3Woz01}A{p@n+U6Ux sH*&zVPnMinIr-y~>nJ8nPMj4uc|DK#Wc_80privX(seekUv`lR05!2n9smFU delta 794 zcmZ{iUr1A77{)n=xgDEZ$0VnDY^!kF8E$S&owAVzIum9M8f8%zZfwFNChEEnOa~T{ z*vcmgmBbNU)in92DA5SIZ_tGoMmXtyE4mv+=X@LV2X_0u@AG^=p6_{hz|MSPU$nBA znybbT>%qv80TkFQ-VGfmenmSYEmVjJb$DN4mzG+55p*yqTZp+xZApfr@hq(w290V5|i`=vfrj>P%!_% zLaPhY9cGO;J`o=adrDBd9R@H;BP^XF2`bBwXL*ri+;1u={zinuPOpK+;_?2H@N<|x z8@h0sB!a;{Ej`bJVS&!F|Get;pVR(=s1#=&R z;Yh=Obc@k$nQk$}K{H}63rOx?Pt;Jju0&s{B~{2L_UL!}6&eP<*%nGDx8>EW`%hbL zxoBH3&t1XHOo;gBcomItA=y(RY`(WyB1}Hx;7&Fj{U^h&(}wZz*o`noEjqkR3N+82 z2i;|HA?1nqvOpRieUmD%dYE*si42LQ1{n(MezHl&=v=#u(dWB}rTpNPI&7sA#Jiqh Fe*;NuFwX!0 diff --git a/mobile/openapi/lib/api/share_api.dart b/mobile/openapi/lib/api/share_api.dart index eeaa5630883059808d5c6b897ff5ee7b366caa0e..ce0e4d8d026a9bb877bb9d19ab2b44ad53ae8af1 100644 GIT binary patch delta 190 zcmbPf(`2_{58q@t5nbl&)XK>TOrn#|^2rEPD+HGmW#*;ZD*#1x6ly2$XY!qF#(y** zGfhDQD5RihtB_ZklcT9n&7}Yag{7%Ql>v!GiMhpki76?LIXN2fNMai5>N*PQK%GDe zNNQ?YgZ0&JJ}9cn$O06xn*2(@2-98}K}T+o1}lg|CO67X*?fUbmua({$Zt*n6&^iF delta 62 zcmZp&n`yIQ58vd!93qoh_$4RnaQaNHuOpNmURzAMN(Sz1B^B)@q% S_dUkV_EJWSo5MucZ~_3;3>C@% diff --git a/mobile/openapi/test/album_api_test.dart b/mobile/openapi/test/album_api_test.dart index 8d22634b42a8c16e4149fcaed28e2f31bc6173f2..eb6f87395e594edd9ed378596bfe8d9eadb55db2 100644 GIT binary patch delta 101 zcmbOvd{lUY29tn}LbXD0Nl|8Ax<{9 delta 48 zcmV-00MGx$6Ot3KC<2pm2^X_Z0_6e*Phx6iV|0^21uOy}eUs4y7_*ZF76FrC2OP82 G2JixddJp0N diff --git a/mobile/openapi/test/asset_api_test.dart b/mobile/openapi/test/asset_api_test.dart index 877b5b0aa3190a58ccfdcd1967c43befbd189898..cf428cb1862b6d58a9e15bab90cb0c829b32cbd9 100644 GIT binary patch delta 335 zcmeyMwpe3>921|8LbXD0Nl|8Ax86AxB^XK54#MH4!WcG*f}j?J;0 u%FJlywDH(rngde%m}e(ek8kGxk7mRU0W%CEHnR)fW#mSLna&FDE}S#Vs=@RU^2h zC^IizA+fkPwZt=JvLmbb { + ) { this.albumService.checkDownloadAccess(authUser); const { stream, fileName, fileSize, fileCount, complete } = await this.albumService.downloadArchive( diff --git a/server/apps/immich/src/api-v1/asset/asset.controller.ts b/server/apps/immich/src/api-v1/asset/asset.controller.ts index 4c4cdd0e93..d63e99f83c 100644 --- a/server/apps/immich/src/api-v1/asset/asset.controller.ts +++ b/server/apps/immich/src/api-v1/asset/asset.controller.ts @@ -28,7 +28,7 @@ import { Response as Res } from 'express'; import { DeleteAssetDto } from './dto/delete-asset.dto'; import { SearchAssetDto } from './dto/search-asset.dto'; import { CheckDuplicateAssetDto } from './dto/check-duplicate-asset.dto'; -import { ApiBearerAuth, ApiBody, ApiConsumes, ApiHeader, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiHeader, ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { CuratedObjectsResponseDto } from './response-dto/curated-objects-response.dto'; import { CuratedLocationsResponseDto } from './response-dto/curated-locations-response.dto'; import { AssetResponseDto, ImmichReadStream } from '@app/domain'; @@ -62,7 +62,6 @@ function asStreamableFile({ stream, type, length }: ImmichReadStream) { return new StreamableFile(stream, { type, length }); } -@ApiBearerAuth() @ApiTags('Asset') @Controller('asset') export class AssetController { @@ -108,21 +107,23 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/download/:assetId') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadFile( @GetAuthUser() authUser: AuthUserDto, @Response({ passthrough: true }) res: Res, @Param('assetId') assetId: string, - ): Promise { + ) { return this.assetService.downloadFile(authUser, assetId).then(asStreamableFile); } @Authenticated({ isShared: true }) @Post('/download-files') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadFiles( @GetAuthUser() authUser: AuthUserDto, @Response({ passthrough: true }) res: Res, @Body(new ValidationPipe()) dto: DownloadFilesDto, - ): Promise { + ) { this.assetService.checkDownloadAccess(authUser); await this.assetService.checkAssetsAccess(authUser, [...dto.assetIds]); const { stream, fileName, fileSize, fileCount, complete } = await this.assetService.downloadFiles(dto); @@ -138,11 +139,12 @@ export class AssetController { */ @Authenticated({ isShared: true }) @Get('/download-library') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadLibrary( @GetAuthUser() authUser: AuthUserDto, @Query(new ValidationPipe({ transform: true })) dto: DownloadDto, @Response({ passthrough: true }) res: Res, - ): Promise { + ) { this.assetService.checkDownloadAccess(authUser); const { stream, fileName, fileSize, fileCount, complete } = await this.assetService.downloadLibrary(authUser, dto); res.attachment(fileName); @@ -155,13 +157,14 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/file/:assetId') @Header('Cache-Control', 'max-age=31536000') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async serveFile( @GetAuthUser() authUser: AuthUserDto, @Headers() headers: Record, @Response({ passthrough: true }) res: Res, @Query(new ValidationPipe({ transform: true })) query: ServeFileDto, @Param('assetId') assetId: string, - ): Promise { + ) { await this.assetService.checkAssetsAccess(authUser, [assetId]); return this.assetService.serveFile(authUser, assetId, query, res, headers); } @@ -169,13 +172,14 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/thumbnail/:assetId') @Header('Cache-Control', 'max-age=31536000') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async getAssetThumbnail( @GetAuthUser() authUser: AuthUserDto, @Headers() headers: Record, @Response({ passthrough: true }) res: Res, @Param('assetId') assetId: string, @Query(new ValidationPipe({ transform: true })) query: GetAssetThumbnailDto, - ): Promise { + ) { await this.assetService.checkAssetsAccess(authUser, [assetId]); return this.assetService.getAssetThumbnail(assetId, query, res, headers); } diff --git a/server/apps/immich/src/api-v1/job/job.controller.ts b/server/apps/immich/src/api-v1/job/job.controller.ts index a6228ddcc1..6abcdb5428 100644 --- a/server/apps/immich/src/api-v1/job/job.controller.ts +++ b/server/apps/immich/src/api-v1/job/job.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, Param, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { Authenticated } from '../../decorators/authenticated.decorator'; import { AllJobStatusResponseDto } from './response-dto/all-job-status-response.dto'; import { GetJobDto } from './dto/get-job.dto'; @@ -8,7 +8,6 @@ import { JobCommandDto } from './dto/job-command.dto'; @Authenticated({ admin: true }) @ApiTags('Job') -@ApiBearerAuth() @Controller('jobs') export class JobController { constructor(private readonly jobService: JobService) {} diff --git a/server/apps/immich/src/controllers/auth.controller.ts b/server/apps/immich/src/controllers/auth.controller.ts index 5ba2716b54..d244807671 100644 --- a/server/apps/immich/src/controllers/auth.controller.ts +++ b/server/apps/immich/src/controllers/auth.controller.ts @@ -14,7 +14,7 @@ import { ValidateAccessTokenResponseDto, } from '@app/domain'; import { Body, Controller, Ip, Post, Req, Res, ValidationPipe } from '@nestjs/common'; -import { ApiBadRequestResponse, ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiBadRequestResponse, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { GetAuthUser } from '../decorators/auth-user.decorator'; import { Authenticated } from '../decorators/authenticated.decorator'; @@ -45,7 +45,6 @@ export class AuthController { } @Authenticated() - @ApiBearerAuth() @Post('validateToken') // eslint-disable-next-line @typescript-eslint/no-unused-vars validateAccessToken(@GetAuthUser() authUser: AuthUserDto): ValidateAccessTokenResponseDto { @@ -53,7 +52,6 @@ export class AuthController { } @Authenticated() - @ApiBearerAuth() @Post('change-password') async changePassword(@GetAuthUser() authUser: AuthUserDto, @Body() dto: ChangePasswordDto): Promise { return this.authService.changePassword(authUser, dto); diff --git a/server/apps/immich/src/controllers/device-info.controller.ts b/server/apps/immich/src/controllers/device-info.controller.ts index 7b2b5e8adb..f651edd2b5 100644 --- a/server/apps/immich/src/controllers/device-info.controller.ts +++ b/server/apps/immich/src/controllers/device-info.controller.ts @@ -5,12 +5,11 @@ import { UpsertDeviceInfoDto as UpsertDto, } from '@app/domain'; import { Body, Controller, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { GetAuthUser } from '../decorators/auth-user.decorator'; import { Authenticated } from '../decorators/authenticated.decorator'; @Authenticated() -@ApiBearerAuth() @ApiTags('Device Info') @Controller('device-info') export class DeviceInfoController { diff --git a/server/apps/immich/src/controllers/system-config.controller.ts b/server/apps/immich/src/controllers/system-config.controller.ts index d815683258..924a40a09f 100644 --- a/server/apps/immich/src/controllers/system-config.controller.ts +++ b/server/apps/immich/src/controllers/system-config.controller.ts @@ -1,10 +1,9 @@ import { SystemConfigDto, SystemConfigService, SystemConfigTemplateStorageOptionDto } from '@app/domain'; import { Body, Controller, Get, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { Authenticated } from '../decorators/authenticated.decorator'; @ApiTags('System Config') -@ApiBearerAuth() @Authenticated({ admin: true }) @Controller('system-config') export class SystemConfigController { diff --git a/server/apps/immich/src/controllers/user.controller.ts b/server/apps/immich/src/controllers/user.controller.ts index 723bfcadfb..99817fe3b0 100644 --- a/server/apps/immich/src/controllers/user.controller.ts +++ b/server/apps/immich/src/controllers/user.controller.ts @@ -23,7 +23,7 @@ import { UpdateUserDto } from '@app/domain'; import { FileInterceptor } from '@nestjs/platform-express'; import { profileImageUploadOption } from '../config/profile-image-upload.config'; import { Response as Res } from 'express'; -import { ApiBearerAuth, ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; import { UserResponseDto } from '@app/domain'; import { UserCountResponseDto } from '@app/domain'; import { CreateProfileImageDto } from '@app/domain'; @@ -36,7 +36,6 @@ export class UserController { constructor(private readonly userService: UserService) {} @Authenticated() - @ApiBearerAuth() @Get() async getAllUsers( @GetAuthUser() authUser: AuthUserDto, @@ -51,14 +50,12 @@ export class UserController { } @Authenticated() - @ApiBearerAuth() @Get('me') async getMyUserInfo(@GetAuthUser() authUser: AuthUserDto): Promise { return await this.userService.getUserInfo(authUser); } @Authenticated({ admin: true }) - @ApiBearerAuth() @Post() async createUser( @Body(new ValidationPipe({ transform: true })) createUserDto: CreateUserDto, @@ -72,21 +69,18 @@ export class UserController { } @Authenticated({ admin: true }) - @ApiBearerAuth() @Delete('/:userId') async deleteUser(@GetAuthUser() authUser: AuthUserDto, @Param('userId') userId: string): Promise { return await this.userService.deleteUser(authUser, userId); } @Authenticated({ admin: true }) - @ApiBearerAuth() @Post('/:userId/restore') async restoreUser(@GetAuthUser() authUser: AuthUserDto, @Param('userId') userId: string): Promise { return await this.userService.restoreUser(authUser, userId); } @Authenticated() - @ApiBearerAuth() @Put() async updateUser( @GetAuthUser() authUser: AuthUserDto, @@ -97,7 +91,6 @@ export class UserController { @UseInterceptors(FileInterceptor('file', profileImageUploadOption)) @Authenticated() - @ApiBearerAuth() @ApiConsumes('multipart/form-data') @ApiBody({ description: 'A new avatar for the user', diff --git a/server/apps/immich/src/decorators/authenticated.decorator.ts b/server/apps/immich/src/decorators/authenticated.decorator.ts index 212b65bdbb..c176f95f73 100644 --- a/server/apps/immich/src/decorators/authenticated.decorator.ts +++ b/server/apps/immich/src/decorators/authenticated.decorator.ts @@ -1,4 +1,5 @@ import { applyDecorators, SetMetadata } from '@nestjs/common'; +import { ApiBearerAuth, ApiCookieAuth, ApiQuery } from '@nestjs/swagger'; interface AuthenticatedOptions { admin?: boolean; @@ -12,7 +13,7 @@ export enum Metadata { } export const Authenticated = (options?: AuthenticatedOptions) => { - const decorators = [SetMetadata(Metadata.AUTH_ROUTE, true)]; + const decorators: MethodDecorator[] = [ApiBearerAuth(), ApiCookieAuth(), SetMetadata(Metadata.AUTH_ROUTE, true)]; options = options || {}; @@ -22,6 +23,7 @@ export const Authenticated = (options?: AuthenticatedOptions) => { if (options.isShared) { decorators.push(SetMetadata(Metadata.SHARED_ROUTE, true)); + decorators.push(ApiQuery({ name: 'key', type: String, required: false })); } return applyDecorators(...decorators); diff --git a/server/apps/immich/src/main.ts b/server/apps/immich/src/main.ts index 37dd5ecfad..185ae2b184 100644 --- a/server/apps/immich/src/main.ts +++ b/server/apps/immich/src/main.ts @@ -11,6 +11,7 @@ import { RedisIoAdapter } from './middlewares/redis-io.adapter.middleware'; import { json } from 'body-parser'; import { patchOpenAPI } from './utils/patch-open-api.util'; import { getLogLevels, MACHINE_LEARNING_ENABLED } from '@app/common'; +import { IMMICH_ACCESS_COOKIE } from '@app/domain'; const logger = new Logger('ImmichServer'); @@ -42,6 +43,7 @@ async function bootstrap() { scheme: 'Bearer', in: 'header', }) + .addCookieAuth(IMMICH_ACCESS_COOKIE) .addServer('/api') .build(); diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index 37c2df60cb..a89e62a3ac 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -30,6 +30,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "get": { @@ -53,6 +61,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -84,6 +100,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "put": { @@ -123,6 +147,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -145,6 +177,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -238,6 +278,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -275,6 +318,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -298,6 +344,14 @@ }, "tags": [ "Authentication" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -334,6 +388,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -446,6 +503,14 @@ }, "tags": [ "OAuth" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -468,6 +533,14 @@ }, "tags": [ "OAuth" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -493,6 +566,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -500,7 +581,16 @@ "get": { "operationId": "getMySharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -515,6 +605,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -546,6 +644,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -568,6 +674,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "patch": { @@ -607,6 +721,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -633,6 +755,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -668,6 +793,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -695,6 +823,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -722,6 +853,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -761,6 +895,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -796,6 +933,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -831,6 +971,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -889,6 +1032,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -957,6 +1103,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -993,6 +1142,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1031,6 +1183,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1070,7 +1225,16 @@ "post": { "operationId": "uploadFile", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "description": "Asset Upload Information", @@ -1100,6 +1264,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1116,18 +1283,27 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1136,6 +1312,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1144,7 +1323,16 @@ "post": { "operationId": "downloadFiles", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1156,15 +1344,19 @@ } }, "responses": { - "201": { - "description": "", + "200": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" + }, + "201": { + "description": "" } }, "tags": [ @@ -1173,6 +1365,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1189,18 +1384,27 @@ "schema": { "type": "number" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1209,6 +1413,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1243,18 +1450,27 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1263,6 +1479,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1287,18 +1506,27 @@ "schema": { "$ref": "#/components/schemas/ThumbnailFormat" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1307,6 +1535,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1337,6 +1568,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1367,6 +1601,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1397,6 +1634,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1437,6 +1677,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1474,6 +1717,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1501,6 +1747,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1557,6 +1806,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -1595,6 +1847,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1635,6 +1890,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1674,6 +1932,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1690,6 +1951,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -1710,6 +1979,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1756,6 +2028,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1764,7 +2039,16 @@ "post": { "operationId": "checkDuplicateAsset", "description": "Check duplicated asset before uploading - for Web upload used", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1793,6 +2077,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1830,6 +2117,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1867,6 +2157,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1875,7 +2168,16 @@ "patch": { "operationId": "addAssetsToSharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1904,6 +2206,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1912,7 +2217,16 @@ "patch": { "operationId": "removeAssetsFromSharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1941,6 +2255,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1974,6 +2291,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "get": { @@ -1997,6 +2322,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2028,6 +2361,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "patch": { @@ -2067,6 +2408,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -2089,6 +2438,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2115,6 +2472,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2152,6 +2512,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2198,6 +2561,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2244,6 +2610,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2260,6 +2629,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -2290,6 +2667,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2334,6 +2714,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2350,6 +2733,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -2370,6 +2761,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2397,6 +2791,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2441,6 +2838,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2478,6 +2878,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2502,18 +2905,27 @@ "schema": { "type": "number" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/zip": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -2522,6 +2934,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2559,6 +2974,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2648,6 +3066,14 @@ }, "tags": [ "Server Info" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2674,6 +3100,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2720,6 +3149,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2744,6 +3176,11 @@ "bearerFormat": "JWT", "type": "http", "in": "header" + }, + "cookie": { + "type": "apiKey", + "in": "cookie", + "name": "immich_access_token" } }, "schemas": { diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 79c6913b11..45571fd946 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -2328,6 +2328,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2364,6 +2370,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2397,6 +2409,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2426,6 +2444,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2462,6 +2486,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2668,10 +2698,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, options: AxiosRequestConfig = {}): Promise => { + addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('addAssetsToAlbum', 'albumId', albumId) // verify required parameter 'addAssetsDto' is not null or undefined @@ -2693,6 +2724,12 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2736,6 +2773,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2775,6 +2814,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2814,6 +2855,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2854,6 +2897,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2869,10 +2914,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadArchive: async (albumId: string, skip?: number, options: AxiosRequestConfig = {}): Promise => { + downloadArchive: async (albumId: string, skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('downloadArchive', 'albumId', albumId) const localVarPath = `/album/{albumId}/download` @@ -2892,10 +2938,16 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2929,6 +2981,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2943,10 +2997,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlbumInfo: async (albumId: string, options: AxiosRequestConfig = {}): Promise => { + getAlbumInfo: async (albumId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('getAlbumInfo', 'albumId', albumId) const localVarPath = `/album/{albumId}` @@ -2966,6 +3021,12 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3001,6 +3062,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (shared !== undefined) { localVarQueryParameter['shared'] = shared; } @@ -3049,6 +3112,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3093,6 +3158,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3133,6 +3200,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3161,11 +3230,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, options); + async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3213,11 +3283,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadArchive(albumId: string, skip?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(albumId, skip, options); + async downloadArchive(albumId: string, skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(albumId, skip, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3232,11 +3303,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAlbumInfo(albumId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, options); + async getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3297,11 +3369,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: any): AxiosPromise { - return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(axios, basePath)); + addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3344,11 +3417,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadArchive(albumId: string, skip?: number, options?: any): AxiosPromise { - return localVarFp.downloadArchive(albumId, skip, options).then((request) => request(axios, basePath)); + downloadArchive(albumId: string, skip?: number, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadArchive(albumId, skip, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3361,11 +3435,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlbumInfo(albumId: string, options?: any): AxiosPromise { - return localVarFp.getAlbumInfo(albumId, options).then((request) => request(axios, basePath)); + getAlbumInfo(albumId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.getAlbumInfo(albumId, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3421,12 +3496,13 @@ export class AlbumApi extends BaseAPI { * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3478,12 +3554,13 @@ export class AlbumApi extends BaseAPI { * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public downloadArchive(albumId: string, skip?: number, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).downloadArchive(albumId, skip, options).then((request) => request(this.axios, this.basePath)); + public downloadArchive(albumId: string, skip?: number, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).downloadArchive(albumId, skip, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3499,12 +3576,13 @@ export class AlbumApi extends BaseAPI { /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public getAlbumInfo(albumId: string, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).getAlbumInfo(albumId, options).then((request) => request(this.axios, this.basePath)); + public getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).getAlbumInfo(albumId, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3566,10 +3644,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToSharedLink: async (addAssetsDto: AddAssetsDto, options: AxiosRequestConfig = {}): Promise => { + addAssetsToSharedLink: async (addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'addAssetsDto' is not null or undefined assertParamExists('addAssetsToSharedLink', 'addAssetsDto', addAssetsDto) const localVarPath = `/asset/shared-link/add`; @@ -3588,6 +3667,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3605,10 +3690,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - checkDuplicateAsset: async (checkDuplicateAssetDto: CheckDuplicateAssetDto, options: AxiosRequestConfig = {}): Promise => { + checkDuplicateAsset: async (checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'checkDuplicateAssetDto' is not null or undefined assertParamExists('checkDuplicateAsset', 'checkDuplicateAssetDto', checkDuplicateAssetDto) const localVarPath = `/asset/check`; @@ -3627,6 +3713,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3666,6 +3758,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3705,6 +3799,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3744,6 +3840,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3761,10 +3859,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFile: async (assetId: string, options: AxiosRequestConfig = {}): Promise => { + downloadFile: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('downloadFile', 'assetId', assetId) const localVarPath = `/asset/download/{assetId}` @@ -3784,6 +3883,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3798,10 +3903,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFiles: async (downloadFilesDto: DownloadFilesDto, options: AxiosRequestConfig = {}): Promise => { + downloadFiles: async (downloadFilesDto: DownloadFilesDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'downloadFilesDto' is not null or undefined assertParamExists('downloadFiles', 'downloadFilesDto', downloadFilesDto) const localVarPath = `/asset/download-files`; @@ -3820,6 +3926,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3837,10 +3949,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadLibrary: async (skip?: number, options: AxiosRequestConfig = {}): Promise => { + downloadLibrary: async (skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/download-library`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3857,10 +3970,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3897,6 +4016,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isFavorite !== undefined) { localVarQueryParameter['isFavorite'] = isFavorite; } @@ -3923,10 +4044,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetById: async (assetId: string, options: AxiosRequestConfig = {}): Promise => { + getAssetById: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('getAssetById', 'assetId', assetId) const localVarPath = `/asset/assetById/{assetId}` @@ -3946,6 +4068,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3982,6 +4110,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4021,6 +4151,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4057,6 +4189,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4090,6 +4224,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4105,10 +4241,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, options: AxiosRequestConfig = {}): Promise => { + getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('getAssetThumbnail', 'assetId', assetId) const localVarPath = `/asset/thumbnail/{assetId}` @@ -4128,10 +4265,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (format !== undefined) { localVarQueryParameter['format'] = format; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4165,6 +4308,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4198,6 +4343,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4235,6 +4382,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4249,10 +4398,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeAssetsFromSharedLink: async (removeAssetsDto: RemoveAssetsDto, options: AxiosRequestConfig = {}): Promise => { + removeAssetsFromSharedLink: async (removeAssetsDto: RemoveAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'removeAssetsDto' is not null or undefined assertParamExists('removeAssetsFromSharedLink', 'removeAssetsDto', removeAssetsDto) const localVarPath = `/asset/shared-link/remove`; @@ -4271,6 +4421,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4310,6 +4466,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4329,10 +4487,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - serveFile: async (assetId: string, isThumb?: boolean, isWeb?: boolean, options: AxiosRequestConfig = {}): Promise => { + serveFile: async (assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('serveFile', 'assetId', assetId) const localVarPath = `/asset/file/{assetId}` @@ -4352,6 +4511,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isThumb !== undefined) { localVarQueryParameter['isThumb'] = isThumb; } @@ -4360,6 +4521,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isWeb'] = isWeb; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4400,6 +4565,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4424,13 +4591,14 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetType' is not null or undefined assertParamExists('uploadFile', 'assetType', assetType) // verify required parameter 'assetData' is not null or undefined @@ -4464,6 +4632,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + if (assetType !== undefined) { localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", })); @@ -4535,21 +4709,23 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToSharedLink(addAssetsDto, options); + async addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToSharedLink(addAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.checkDuplicateAsset(checkDuplicateAssetDto, options); + async checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkDuplicateAsset(checkDuplicateAssetDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4585,31 +4761,34 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadFile(assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(assetId, options); + async downloadFile(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(assetId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadFiles(downloadFilesDto: DownloadFilesDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFiles(downloadFilesDto, options); + async downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFiles(downloadFilesDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadLibrary(skip?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadLibrary(skip, options); + async downloadLibrary(skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadLibrary(skip, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4627,11 +4806,12 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetById(assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, options); + async getAssetById(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4676,11 +4856,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, options); + async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4714,11 +4895,12 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetsFromSharedLink(removeAssetsDto, options); + async removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetsFromSharedLink(removeAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4736,11 +4918,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(assetId, isThumb, isWeb, options); + async serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(assetId, isThumb, isWeb, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4764,14 +4947,15 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options); + async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -4787,20 +4971,22 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: any): AxiosPromise { - return localVarFp.addAssetsToSharedLink(addAssetsDto, options).then((request) => request(axios, basePath)); + addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.addAssetsToSharedLink(addAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: any): AxiosPromise { - return localVarFp.checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(axios, basePath)); + checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: any): AxiosPromise { + return localVarFp.checkDuplicateAsset(checkDuplicateAssetDto, key, options).then((request) => request(axios, basePath)); }, /** * Checks if multiple assets exist on the server and returns all existing - used by background backup @@ -4832,29 +5018,32 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFile(assetId: string, options?: any): AxiosPromise { - return localVarFp.downloadFile(assetId, options).then((request) => request(axios, basePath)); + downloadFile(assetId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadFile(assetId, key, options).then((request) => request(axios, basePath)); }, /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFiles(downloadFilesDto: DownloadFilesDto, options?: any): AxiosPromise { - return localVarFp.downloadFiles(downloadFilesDto, options).then((request) => request(axios, basePath)); + downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadFiles(downloadFilesDto, key, options).then((request) => request(axios, basePath)); }, /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadLibrary(skip?: number, options?: any): AxiosPromise { - return localVarFp.downloadLibrary(skip, options).then((request) => request(axios, basePath)); + downloadLibrary(skip?: number, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadLibrary(skip, key, options).then((request) => request(axios, basePath)); }, /** * Get all AssetEntity belong to the user @@ -4870,11 +5059,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetById(assetId: string, options?: any): AxiosPromise { - return localVarFp.getAssetById(assetId, options).then((request) => request(axios, basePath)); + getAssetById(assetId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.getAssetById(assetId, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4914,11 +5104,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: any): AxiosPromise { - return localVarFp.getAssetThumbnail(assetId, format, options).then((request) => request(axios, basePath)); + getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: any): AxiosPromise { + return localVarFp.getAssetThumbnail(assetId, format, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4948,11 +5139,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: any): AxiosPromise { - return localVarFp.removeAssetsFromSharedLink(removeAssetsDto, options).then((request) => request(axios, basePath)); + removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.removeAssetsFromSharedLink(removeAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4968,11 +5160,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: any): AxiosPromise { - return localVarFp.serveFile(assetId, isThumb, isWeb, options).then((request) => request(axios, basePath)); + serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: any): AxiosPromise { + return localVarFp.serveFile(assetId, isThumb, isWeb, key, options).then((request) => request(axios, basePath)); }, /** * Update an asset @@ -4994,14 +5187,15 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { - return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath)); + uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { + return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath)); }, }; }; @@ -5016,23 +5210,25 @@ export class AssetApi extends BaseAPI { /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).addAssetsToSharedLink(addAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).addAssetsToSharedLink(addAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(this.axios, this.basePath)); + public checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).checkDuplicateAsset(checkDuplicateAssetDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5071,34 +5267,37 @@ export class AssetApi extends BaseAPI { /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadFile(assetId: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadFile(assetId, options).then((request) => request(this.axios, this.basePath)); + public downloadFile(assetId: string, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadFile(assetId, key, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadFiles(downloadFilesDto: DownloadFilesDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadFiles(downloadFilesDto, options).then((request) => request(this.axios, this.basePath)); + public downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadFiles(downloadFilesDto, key, options).then((request) => request(this.axios, this.basePath)); } /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadLibrary(skip?: number, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadLibrary(skip, options).then((request) => request(this.axios, this.basePath)); + public downloadLibrary(skip?: number, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadLibrary(skip, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5117,12 +5316,13 @@ export class AssetApi extends BaseAPI { /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public getAssetById(assetId: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetById(assetId, options).then((request) => request(this.axios, this.basePath)); + public getAssetById(assetId: string, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).getAssetById(assetId, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5171,12 +5371,13 @@ export class AssetApi extends BaseAPI { * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetThumbnail(assetId, format, options).then((request) => request(this.axios, this.basePath)); + public getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).getAssetThumbnail(assetId, format, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5213,12 +5414,13 @@ export class AssetApi extends BaseAPI { /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).removeAssetsFromSharedLink(removeAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).removeAssetsFromSharedLink(removeAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5237,12 +5439,13 @@ export class AssetApi extends BaseAPI { * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).serveFile(assetId, isThumb, isWeb, options).then((request) => request(this.axios, this.basePath)); + public serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).serveFile(assetId, isThumb, isWeb, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5267,6 +5470,7 @@ export class AssetApi extends BaseAPI { * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] @@ -5274,8 +5478,8 @@ export class AssetApi extends BaseAPI { * @throws {RequiredError} * @memberof AssetApi */ - public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath)); + public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath)); } } @@ -5346,6 +5550,8 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -5413,6 +5619,12 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5446,6 +5658,8 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5664,6 +5878,8 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -5768,6 +5984,8 @@ export const JobApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5808,6 +6026,8 @@ export const JobApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6011,6 +6231,12 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6072,6 +6298,12 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6341,6 +6573,12 @@ export const ServerInfoApiAxiosParamCreator = function (configuration?: Configur const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6552,6 +6790,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6584,6 +6828,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6597,10 +6847,11 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMySharedLink: async (options: AxiosRequestConfig = {}): Promise => { + getMySharedLink: async (key?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/share/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6613,6 +6864,16 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6646,6 +6907,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6679,6 +6946,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6722,11 +6995,12 @@ export const ShareApiFp = function(configuration?: Configuration) { }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMySharedLink(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMySharedLink(options); + async getMySharedLink(key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMySharedLink(key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -6779,11 +7053,12 @@ export const ShareApiFactory = function (configuration?: Configuration, basePath }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMySharedLink(options?: any): AxiosPromise { - return localVarFp.getMySharedLink(options).then((request) => request(axios, basePath)); + getMySharedLink(key?: string, options?: any): AxiosPromise { + return localVarFp.getMySharedLink(key, options).then((request) => request(axios, basePath)); }, /** * @@ -6837,12 +7112,13 @@ export class ShareApi extends BaseAPI { /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ShareApi */ - public getMySharedLink(options?: AxiosRequestConfig) { - return ShareApiFp(this.configuration).getMySharedLink(options).then((request) => request(this.axios, this.basePath)); + public getMySharedLink(key?: string, options?: AxiosRequestConfig) { + return ShareApiFp(this.configuration).getMySharedLink(key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -6897,6 +7173,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6930,6 +7208,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6963,6 +7243,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6999,6 +7281,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7184,6 +7468,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7216,6 +7506,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7248,6 +7544,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7281,6 +7583,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7317,6 +7625,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7545,6 +7859,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (file !== undefined) { localVarFormParams.append('file', file as any); @@ -7588,6 +7904,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7628,6 +7946,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7664,6 +7984,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isAll !== undefined) { localVarQueryParameter['isAll'] = isAll; } @@ -7701,6 +8023,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7838,6 +8162,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7874,6 +8200,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; diff --git a/web/src/lib/components/album-page/__tests__/album-card.spec.ts b/web/src/lib/components/album-page/__tests__/album-card.spec.ts index 61706ebf05..411d3fbfe3 100644 --- a/web/src/lib/components/album-page/__tests__/album-card.spec.ts +++ b/web/src/lib/components/album-page/__tests__/album-card.spec.ts @@ -93,6 +93,7 @@ describe('AlbumCard component', () => { expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledWith( 'thumbnailIdOne', ThumbnailFormat.Jpeg, + undefined, { responseType: 'blob' } ); expect(createObjectURLMock).toHaveBeenCalledWith(thumbnailBlob); diff --git a/web/src/lib/components/album-page/album-card.svelte b/web/src/lib/components/album-page/album-card.svelte index 0dedd6a781..584faf0692 100644 --- a/web/src/lib/components/album-page/album-card.svelte +++ b/web/src/lib/components/album-page/album-card.svelte @@ -34,9 +34,14 @@ return; } - const { data } = await api.assetApi.getAssetThumbnail(thubmnailId, ThumbnailFormat.Jpeg, { - responseType: 'blob' - }); + const { data } = await api.assetApi.getAssetThumbnail( + thubmnailId, + ThumbnailFormat.Jpeg, + undefined, + { + responseType: 'blob' + } + ); if (data instanceof Blob) { return URL.createObjectURL(data); diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 228760e24d..558b1a9574 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -170,11 +170,7 @@ { assetIds: assets.map((a) => a.id) }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); if (data.album) { @@ -269,10 +265,8 @@ const { data, status, headers } = await api.albumApi.downloadArchive( album.id, skip || undefined, + sharedLink?.key, { - params: { - key: sharedLink?.key - }, responseType: 'blob', onDownloadProgress: function (progressEvent) { const request = this as XMLHttpRequest; diff --git a/web/src/lib/components/asset-viewer/asset-viewer.svelte b/web/src/lib/components/asset-viewer/asset-viewer.svelte index d06016b4d6..4197d73265 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer.svelte @@ -145,8 +145,7 @@ $downloadAssets[imageFileName] = 0; - const { data, status } = await api.assetApi.downloadFile(assetId, { - params: { key }, + const { data, status } = await api.assetApi.downloadFile(assetId, key, { responseType: 'blob', onDownloadProgress: (progressEvent) => { if (progressEvent.lengthComputable) { diff --git a/web/src/lib/components/asset-viewer/photo-viewer.svelte b/web/src/lib/components/asset-viewer/photo-viewer.svelte index c3f8094920..875a3ba221 100644 --- a/web/src/lib/components/asset-viewer/photo-viewer.svelte +++ b/web/src/lib/components/asset-viewer/photo-viewer.svelte @@ -26,10 +26,7 @@ const loadAssetData = async () => { try { - const { data } = await api.assetApi.serveFile(asset.id, false, true, { - params: { - key: publicSharedKey - }, + const { data } = await api.assetApi.serveFile(asset.id, false, true, publicSharedKey, { responseType: 'blob' }); diff --git a/web/src/lib/components/share-page/individual-shared-viewer.svelte b/web/src/lib/components/share-page/individual-shared-viewer.svelte index 50aaec3ca5..be588209ab 100644 --- a/web/src/lib/components/share-page/individual-shared-viewer.svelte +++ b/web/src/lib/components/share-page/individual-shared-viewer.svelte @@ -54,11 +54,7 @@ { assetIds }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); notificationController.show({ @@ -76,11 +72,7 @@ { assetIds: assets.filter((a) => !selectedAssets.has(a)).map((a) => a.id) }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); assets = assets.filter((a) => !selectedAssets.has(a)); diff --git a/web/src/lib/components/sharing-page/shared-album-list-tile.svelte b/web/src/lib/components/sharing-page/shared-album-list-tile.svelte index 2bdab95c65..5cb5deeb7f 100644 --- a/web/src/lib/components/sharing-page/shared-album-list-tile.svelte +++ b/web/src/lib/components/sharing-page/shared-album-list-tile.svelte @@ -11,9 +11,14 @@ return noThumbnailUrl; } - const { data } = await api.assetApi.getAssetThumbnail(thubmnailId, ThumbnailFormat.Webp, { - responseType: 'blob' - }); + const { data } = await api.assetApi.getAssetThumbnail( + thubmnailId, + ThumbnailFormat.Webp, + undefined, + { + responseType: 'blob' + } + ); if (data instanceof Blob) { return URL.createObjectURL(data); } diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts index dc13c4f959..043b0ee4ce 100644 --- a/web/src/lib/utils/asset-utils.ts +++ b/web/src/lib/utils/asset-utils.ts @@ -18,19 +18,17 @@ export const addAssetsToAlbum = async ( assetIds: Array, key: string | undefined = undefined ): Promise => - api.albumApi - .addAssetsToAlbum(albumId, { assetIds }, { params: { key } }) - .then(({ data: dto }) => { - if (dto.successfullyAdded > 0) { - // This might be 0 if the user tries to add an asset that is already in the album - notificationController.show({ - message: `Added ${dto.successfullyAdded} to ${dto.album?.albumName}`, - type: NotificationType.Info - }); - } + api.albumApi.addAssetsToAlbum(albumId, { assetIds }, key).then(({ data: dto }) => { + if (dto.successfullyAdded > 0) { + // This might be 0 if the user tries to add an asset that is already in the album + notificationController.show({ + message: `Added ${dto.successfullyAdded} to ${dto.album?.albumName}`, + type: NotificationType.Info + }); + } - return dto; - }); + return dto; + }); export async function bulkDownload( fileName: string, @@ -53,24 +51,20 @@ export async function bulkDownload( let total = 0; - const { data, status, headers } = await api.assetApi.downloadFiles( - { assetIds }, - { - params: { key }, - responseType: 'blob', - onDownloadProgress: function (progressEvent) { - const request = this as XMLHttpRequest; - if (!total) { - total = Number(request.getResponseHeader('X-Immich-Content-Length-Hint')) || 0; - } + const { data, status, headers } = await api.assetApi.downloadFiles({ assetIds }, key, { + responseType: 'blob', + onDownloadProgress: function (progressEvent) { + const request = this as XMLHttpRequest; + if (!total) { + total = Number(request.getResponseHeader('X-Immich-Content-Length-Hint')) || 0; + } - if (total) { - const current = progressEvent.loaded; - downloadAssets.set({ [downloadFileName]: Math.floor((current / total) * 100) }); - } + if (total) { + const current = progressEvent.loaded; + downloadAssets.set({ [downloadFileName]: Math.floor((current / total) * 100) }); } } - ); + }); const isNotComplete = headers['x-immich-archive-complete'] === 'false'; const fileCount = Number(headers['x-immich-archive-file-count']) || 0; diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.ts index 3d3529d5a4..bad793e5da 100644 --- a/web/src/lib/utils/file-uploader.ts +++ b/web/src/lib/utils/file-uploader.ts @@ -108,11 +108,7 @@ async function fileUploader( deviceAssetId: String(deviceAssetId), deviceId: 'WEB' }, - { - params: { - key: sharedKey - } - } + sharedKey ); if (status === 200 && data.isExist && data.id) { diff --git a/web/src/routes/share/[key]/+page.server.ts b/web/src/routes/share/[key]/+page.server.ts index 199f338cc0..e89ce1eea5 100644 --- a/web/src/routes/share/[key]/+page.server.ts +++ b/web/src/routes/share/[key]/+page.server.ts @@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ params, parent }) => { const { key } = params; try { - const { data: sharedLink } = await api.shareApi.getMySharedLink({ params: { key } }); + const { data: sharedLink } = await api.shareApi.getMySharedLink(key); const assetCount = sharedLink.assets.length; const assetId = sharedLink.album?.albumThumbnailAssetId || sharedLink.assets[0]?.id; diff --git a/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts b/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts index 90d7722201..5e17efb180 100644 --- a/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts +++ b/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts @@ -7,9 +7,7 @@ import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ params }) => { try { const { key, assetId } = params; - const { data: asset } = await api.assetApi.getAssetById(assetId, { - params: { key } - }); + const { data: asset } = await api.assetApi.getAssetById(assetId, key); if (!asset) { return error(404, 'Asset not found');