api.ts 143 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. /**
  4. * Immich
  5. * Immich API
  6. *
  7. * The version of the OpenAPI document: 1.17.0
  8. *
  9. *
  10. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  11. * https://openapi-generator.tech
  12. * Do not edit the class manually.
  13. */
  14. import { Configuration } from './configuration';
  15. import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
  16. // Some imports not used depending on template conditions
  17. // @ts-ignore
  18. import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
  19. // @ts-ignore
  20. import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
  21. /**
  22. *
  23. * @export
  24. * @interface AddAssetsDto
  25. */
  26. export interface AddAssetsDto {
  27. /**
  28. *
  29. * @type {Array<string>}
  30. * @memberof AddAssetsDto
  31. */
  32. 'assetIds': Array<string>;
  33. }
  34. /**
  35. *
  36. * @export
  37. * @interface AddUsersDto
  38. */
  39. export interface AddUsersDto {
  40. /**
  41. *
  42. * @type {Array<string>}
  43. * @memberof AddUsersDto
  44. */
  45. 'sharedUserIds': Array<string>;
  46. }
  47. /**
  48. *
  49. * @export
  50. * @interface AdminSignupResponseDto
  51. */
  52. export interface AdminSignupResponseDto {
  53. /**
  54. *
  55. * @type {string}
  56. * @memberof AdminSignupResponseDto
  57. */
  58. 'id': string;
  59. /**
  60. *
  61. * @type {string}
  62. * @memberof AdminSignupResponseDto
  63. */
  64. 'email': string;
  65. /**
  66. *
  67. * @type {string}
  68. * @memberof AdminSignupResponseDto
  69. */
  70. 'firstName': string;
  71. /**
  72. *
  73. * @type {string}
  74. * @memberof AdminSignupResponseDto
  75. */
  76. 'lastName': string;
  77. /**
  78. *
  79. * @type {string}
  80. * @memberof AdminSignupResponseDto
  81. */
  82. 'createdAt': string;
  83. }
  84. /**
  85. *
  86. * @export
  87. * @interface AlbumResponseDto
  88. */
  89. export interface AlbumResponseDto {
  90. /**
  91. *
  92. * @type {string}
  93. * @memberof AlbumResponseDto
  94. */
  95. 'id': string;
  96. /**
  97. *
  98. * @type {string}
  99. * @memberof AlbumResponseDto
  100. */
  101. 'ownerId': string;
  102. /**
  103. *
  104. * @type {string}
  105. * @memberof AlbumResponseDto
  106. */
  107. 'albumName': string;
  108. /**
  109. *
  110. * @type {string}
  111. * @memberof AlbumResponseDto
  112. */
  113. 'createdAt': string;
  114. /**
  115. *
  116. * @type {string}
  117. * @memberof AlbumResponseDto
  118. */
  119. 'albumThumbnailAssetId': string | null;
  120. /**
  121. *
  122. * @type {boolean}
  123. * @memberof AlbumResponseDto
  124. */
  125. 'shared': boolean;
  126. /**
  127. *
  128. * @type {Array<UserResponseDto>}
  129. * @memberof AlbumResponseDto
  130. */
  131. 'sharedUsers': Array<UserResponseDto>;
  132. /**
  133. *
  134. * @type {Array<AssetResponseDto>}
  135. * @memberof AlbumResponseDto
  136. */
  137. 'assets': Array<AssetResponseDto>;
  138. }
  139. /**
  140. *
  141. * @export
  142. * @interface AssetFileUploadResponseDto
  143. */
  144. export interface AssetFileUploadResponseDto {
  145. /**
  146. *
  147. * @type {string}
  148. * @memberof AssetFileUploadResponseDto
  149. */
  150. 'id': string;
  151. }
  152. /**
  153. *
  154. * @export
  155. * @interface AssetResponseDto
  156. */
  157. export interface AssetResponseDto {
  158. /**
  159. *
  160. * @type {AssetTypeEnum}
  161. * @memberof AssetResponseDto
  162. */
  163. 'type': AssetTypeEnum;
  164. /**
  165. *
  166. * @type {string}
  167. * @memberof AssetResponseDto
  168. */
  169. 'id': string;
  170. /**
  171. *
  172. * @type {string}
  173. * @memberof AssetResponseDto
  174. */
  175. 'deviceAssetId': string;
  176. /**
  177. *
  178. * @type {string}
  179. * @memberof AssetResponseDto
  180. */
  181. 'ownerId': string;
  182. /**
  183. *
  184. * @type {string}
  185. * @memberof AssetResponseDto
  186. */
  187. 'deviceId': string;
  188. /**
  189. *
  190. * @type {string}
  191. * @memberof AssetResponseDto
  192. */
  193. 'originalPath': string;
  194. /**
  195. *
  196. * @type {string}
  197. * @memberof AssetResponseDto
  198. */
  199. 'resizePath': string | null;
  200. /**
  201. *
  202. * @type {string}
  203. * @memberof AssetResponseDto
  204. */
  205. 'createdAt': string;
  206. /**
  207. *
  208. * @type {string}
  209. * @memberof AssetResponseDto
  210. */
  211. 'modifiedAt': string;
  212. /**
  213. *
  214. * @type {boolean}
  215. * @memberof AssetResponseDto
  216. */
  217. 'isFavorite': boolean;
  218. /**
  219. *
  220. * @type {string}
  221. * @memberof AssetResponseDto
  222. */
  223. 'mimeType': string | null;
  224. /**
  225. *
  226. * @type {string}
  227. * @memberof AssetResponseDto
  228. */
  229. 'duration': string;
  230. /**
  231. *
  232. * @type {string}
  233. * @memberof AssetResponseDto
  234. */
  235. 'webpPath': string | null;
  236. /**
  237. *
  238. * @type {string}
  239. * @memberof AssetResponseDto
  240. */
  241. 'encodedVideoPath': string | null;
  242. /**
  243. *
  244. * @type {ExifResponseDto}
  245. * @memberof AssetResponseDto
  246. */
  247. 'exifInfo'?: ExifResponseDto;
  248. /**
  249. *
  250. * @type {SmartInfoResponseDto}
  251. * @memberof AssetResponseDto
  252. */
  253. 'smartInfo'?: SmartInfoResponseDto;
  254. }
  255. /**
  256. *
  257. * @export
  258. * @enum {string}
  259. */
  260. export const AssetTypeEnum = {
  261. Image: 'IMAGE',
  262. Video: 'VIDEO',
  263. Audio: 'AUDIO',
  264. Other: 'OTHER'
  265. } as const;
  266. export type AssetTypeEnum = typeof AssetTypeEnum[keyof typeof AssetTypeEnum];
  267. /**
  268. *
  269. * @export
  270. * @interface CheckDuplicateAssetDto
  271. */
  272. export interface CheckDuplicateAssetDto {
  273. /**
  274. *
  275. * @type {string}
  276. * @memberof CheckDuplicateAssetDto
  277. */
  278. 'deviceAssetId': string;
  279. /**
  280. *
  281. * @type {string}
  282. * @memberof CheckDuplicateAssetDto
  283. */
  284. 'deviceId': string;
  285. }
  286. /**
  287. *
  288. * @export
  289. * @interface CheckDuplicateAssetResponseDto
  290. */
  291. export interface CheckDuplicateAssetResponseDto {
  292. /**
  293. *
  294. * @type {boolean}
  295. * @memberof CheckDuplicateAssetResponseDto
  296. */
  297. 'isExist': boolean;
  298. }
  299. /**
  300. *
  301. * @export
  302. * @interface CreateAlbumDto
  303. */
  304. export interface CreateAlbumDto {
  305. /**
  306. *
  307. * @type {string}
  308. * @memberof CreateAlbumDto
  309. */
  310. 'albumName': string;
  311. /**
  312. *
  313. * @type {Array<string>}
  314. * @memberof CreateAlbumDto
  315. */
  316. 'sharedWithUserIds'?: Array<string>;
  317. /**
  318. *
  319. * @type {Array<string>}
  320. * @memberof CreateAlbumDto
  321. */
  322. 'assetIds'?: Array<string>;
  323. }
  324. /**
  325. *
  326. * @export
  327. * @interface CreateDeviceInfoDto
  328. */
  329. export interface CreateDeviceInfoDto {
  330. /**
  331. *
  332. * @type {DeviceTypeEnum}
  333. * @memberof CreateDeviceInfoDto
  334. */
  335. 'deviceType': DeviceTypeEnum;
  336. /**
  337. *
  338. * @type {string}
  339. * @memberof CreateDeviceInfoDto
  340. */
  341. 'deviceId': string;
  342. /**
  343. *
  344. * @type {boolean}
  345. * @memberof CreateDeviceInfoDto
  346. */
  347. 'isAutoBackup'?: boolean;
  348. }
  349. /**
  350. *
  351. * @export
  352. * @interface CreateProfileImageResponseDto
  353. */
  354. export interface CreateProfileImageResponseDto {
  355. /**
  356. *
  357. * @type {string}
  358. * @memberof CreateProfileImageResponseDto
  359. */
  360. 'userId': string;
  361. /**
  362. *
  363. * @type {string}
  364. * @memberof CreateProfileImageResponseDto
  365. */
  366. 'profileImagePath': string;
  367. }
  368. /**
  369. *
  370. * @export
  371. * @interface CreateUserDto
  372. */
  373. export interface CreateUserDto {
  374. /**
  375. *
  376. * @type {string}
  377. * @memberof CreateUserDto
  378. */
  379. 'email': string;
  380. /**
  381. *
  382. * @type {string}
  383. * @memberof CreateUserDto
  384. */
  385. 'password': string;
  386. /**
  387. *
  388. * @type {string}
  389. * @memberof CreateUserDto
  390. */
  391. 'firstName': string;
  392. /**
  393. *
  394. * @type {string}
  395. * @memberof CreateUserDto
  396. */
  397. 'lastName': string;
  398. }
  399. /**
  400. *
  401. * @export
  402. * @interface CuratedLocationsResponseDto
  403. */
  404. export interface CuratedLocationsResponseDto {
  405. /**
  406. *
  407. * @type {string}
  408. * @memberof CuratedLocationsResponseDto
  409. */
  410. 'id': string;
  411. /**
  412. *
  413. * @type {string}
  414. * @memberof CuratedLocationsResponseDto
  415. */
  416. 'city': string;
  417. /**
  418. *
  419. * @type {string}
  420. * @memberof CuratedLocationsResponseDto
  421. */
  422. 'resizePath': string;
  423. /**
  424. *
  425. * @type {string}
  426. * @memberof CuratedLocationsResponseDto
  427. */
  428. 'deviceAssetId': string;
  429. /**
  430. *
  431. * @type {string}
  432. * @memberof CuratedLocationsResponseDto
  433. */
  434. 'deviceId': string;
  435. }
  436. /**
  437. *
  438. * @export
  439. * @interface CuratedObjectsResponseDto
  440. */
  441. export interface CuratedObjectsResponseDto {
  442. /**
  443. *
  444. * @type {string}
  445. * @memberof CuratedObjectsResponseDto
  446. */
  447. 'id': string;
  448. /**
  449. *
  450. * @type {string}
  451. * @memberof CuratedObjectsResponseDto
  452. */
  453. 'object': string;
  454. /**
  455. *
  456. * @type {string}
  457. * @memberof CuratedObjectsResponseDto
  458. */
  459. 'resizePath': string;
  460. /**
  461. *
  462. * @type {string}
  463. * @memberof CuratedObjectsResponseDto
  464. */
  465. 'deviceAssetId': string;
  466. /**
  467. *
  468. * @type {string}
  469. * @memberof CuratedObjectsResponseDto
  470. */
  471. 'deviceId': string;
  472. }
  473. /**
  474. *
  475. * @export
  476. * @interface DeleteAssetDto
  477. */
  478. export interface DeleteAssetDto {
  479. /**
  480. *
  481. * @type {Array<string>}
  482. * @memberof DeleteAssetDto
  483. */
  484. 'ids': Array<string>;
  485. }
  486. /**
  487. *
  488. * @export
  489. * @interface DeleteAssetResponseDto
  490. */
  491. export interface DeleteAssetResponseDto {
  492. /**
  493. *
  494. * @type {DeleteAssetStatus}
  495. * @memberof DeleteAssetResponseDto
  496. */
  497. 'status': DeleteAssetStatus;
  498. /**
  499. *
  500. * @type {string}
  501. * @memberof DeleteAssetResponseDto
  502. */
  503. 'id': string;
  504. }
  505. /**
  506. *
  507. * @export
  508. * @enum {string}
  509. */
  510. export const DeleteAssetStatus = {
  511. Success: 'SUCCESS',
  512. Failed: 'FAILED'
  513. } as const;
  514. export type DeleteAssetStatus = typeof DeleteAssetStatus[keyof typeof DeleteAssetStatus];
  515. /**
  516. *
  517. * @export
  518. * @interface DeviceInfoResponseDto
  519. */
  520. export interface DeviceInfoResponseDto {
  521. /**
  522. *
  523. * @type {number}
  524. * @memberof DeviceInfoResponseDto
  525. */
  526. 'id': number;
  527. /**
  528. *
  529. * @type {DeviceTypeEnum}
  530. * @memberof DeviceInfoResponseDto
  531. */
  532. 'deviceType': DeviceTypeEnum;
  533. /**
  534. *
  535. * @type {string}
  536. * @memberof DeviceInfoResponseDto
  537. */
  538. 'userId': string;
  539. /**
  540. *
  541. * @type {string}
  542. * @memberof DeviceInfoResponseDto
  543. */
  544. 'deviceId': string;
  545. /**
  546. *
  547. * @type {string}
  548. * @memberof DeviceInfoResponseDto
  549. */
  550. 'createdAt': string;
  551. /**
  552. *
  553. * @type {boolean}
  554. * @memberof DeviceInfoResponseDto
  555. */
  556. 'isAutoBackup': boolean;
  557. }
  558. /**
  559. *
  560. * @export
  561. * @enum {string}
  562. */
  563. export const DeviceTypeEnum = {
  564. Ios: 'IOS',
  565. Android: 'ANDROID',
  566. Web: 'WEB'
  567. } as const;
  568. export type DeviceTypeEnum = typeof DeviceTypeEnum[keyof typeof DeviceTypeEnum];
  569. /**
  570. *
  571. * @export
  572. * @interface ExifResponseDto
  573. */
  574. export interface ExifResponseDto {
  575. /**
  576. *
  577. * @type {string}
  578. * @memberof ExifResponseDto
  579. */
  580. 'id'?: string | null;
  581. /**
  582. *
  583. * @type {string}
  584. * @memberof ExifResponseDto
  585. */
  586. 'make'?: string | null;
  587. /**
  588. *
  589. * @type {string}
  590. * @memberof ExifResponseDto
  591. */
  592. 'model'?: string | null;
  593. /**
  594. *
  595. * @type {string}
  596. * @memberof ExifResponseDto
  597. */
  598. 'imageName'?: string | null;
  599. /**
  600. *
  601. * @type {number}
  602. * @memberof ExifResponseDto
  603. */
  604. 'exifImageWidth'?: number | null;
  605. /**
  606. *
  607. * @type {number}
  608. * @memberof ExifResponseDto
  609. */
  610. 'exifImageHeight'?: number | null;
  611. /**
  612. *
  613. * @type {number}
  614. * @memberof ExifResponseDto
  615. */
  616. 'fileSizeInByte'?: number | null;
  617. /**
  618. *
  619. * @type {string}
  620. * @memberof ExifResponseDto
  621. */
  622. 'orientation'?: string | null;
  623. /**
  624. *
  625. * @type {string}
  626. * @memberof ExifResponseDto
  627. */
  628. 'dateTimeOriginal'?: string | null;
  629. /**
  630. *
  631. * @type {string}
  632. * @memberof ExifResponseDto
  633. */
  634. 'modifyDate'?: string | null;
  635. /**
  636. *
  637. * @type {string}
  638. * @memberof ExifResponseDto
  639. */
  640. 'lensModel'?: string | null;
  641. /**
  642. *
  643. * @type {number}
  644. * @memberof ExifResponseDto
  645. */
  646. 'fNumber'?: number | null;
  647. /**
  648. *
  649. * @type {number}
  650. * @memberof ExifResponseDto
  651. */
  652. 'focalLength'?: number | null;
  653. /**
  654. *
  655. * @type {number}
  656. * @memberof ExifResponseDto
  657. */
  658. 'iso'?: number | null;
  659. /**
  660. *
  661. * @type {number}
  662. * @memberof ExifResponseDto
  663. */
  664. 'exposureTime'?: number | null;
  665. /**
  666. *
  667. * @type {number}
  668. * @memberof ExifResponseDto
  669. */
  670. 'latitude'?: number | null;
  671. /**
  672. *
  673. * @type {number}
  674. * @memberof ExifResponseDto
  675. */
  676. 'longitude'?: number | null;
  677. /**
  678. *
  679. * @type {string}
  680. * @memberof ExifResponseDto
  681. */
  682. 'city'?: string | null;
  683. /**
  684. *
  685. * @type {string}
  686. * @memberof ExifResponseDto
  687. */
  688. 'state'?: string | null;
  689. /**
  690. *
  691. * @type {string}
  692. * @memberof ExifResponseDto
  693. */
  694. 'country'?: string | null;
  695. }
  696. /**
  697. *
  698. * @export
  699. * @interface LoginCredentialDto
  700. */
  701. export interface LoginCredentialDto {
  702. /**
  703. *
  704. * @type {string}
  705. * @memberof LoginCredentialDto
  706. */
  707. 'email': string;
  708. /**
  709. *
  710. * @type {string}
  711. * @memberof LoginCredentialDto
  712. */
  713. 'password': string;
  714. }
  715. /**
  716. *
  717. * @export
  718. * @interface LoginResponseDto
  719. */
  720. export interface LoginResponseDto {
  721. /**
  722. *
  723. * @type {string}
  724. * @memberof LoginResponseDto
  725. */
  726. 'accessToken': string;
  727. /**
  728. *
  729. * @type {string}
  730. * @memberof LoginResponseDto
  731. */
  732. 'userId': string;
  733. /**
  734. *
  735. * @type {string}
  736. * @memberof LoginResponseDto
  737. */
  738. 'userEmail': string;
  739. /**
  740. *
  741. * @type {string}
  742. * @memberof LoginResponseDto
  743. */
  744. 'firstName': string;
  745. /**
  746. *
  747. * @type {string}
  748. * @memberof LoginResponseDto
  749. */
  750. 'lastName': string;
  751. /**
  752. *
  753. * @type {string}
  754. * @memberof LoginResponseDto
  755. */
  756. 'profileImagePath': string;
  757. /**
  758. *
  759. * @type {boolean}
  760. * @memberof LoginResponseDto
  761. */
  762. 'isAdmin': boolean;
  763. /**
  764. *
  765. * @type {boolean}
  766. * @memberof LoginResponseDto
  767. */
  768. 'shouldChangePassword': boolean;
  769. }
  770. /**
  771. *
  772. * @export
  773. * @interface LogoutResponseDto
  774. */
  775. export interface LogoutResponseDto {
  776. /**
  777. *
  778. * @type {boolean}
  779. * @memberof LogoutResponseDto
  780. */
  781. 'successful': boolean;
  782. }
  783. /**
  784. *
  785. * @export
  786. * @interface RemoveAssetsDto
  787. */
  788. export interface RemoveAssetsDto {
  789. /**
  790. *
  791. * @type {Array<string>}
  792. * @memberof RemoveAssetsDto
  793. */
  794. 'assetIds': Array<string>;
  795. }
  796. /**
  797. *
  798. * @export
  799. * @interface SearchAssetDto
  800. */
  801. export interface SearchAssetDto {
  802. /**
  803. *
  804. * @type {string}
  805. * @memberof SearchAssetDto
  806. */
  807. 'searchTerm': string;
  808. }
  809. /**
  810. *
  811. * @export
  812. * @interface ServerInfoResponseDto
  813. */
  814. export interface ServerInfoResponseDto {
  815. /**
  816. *
  817. * @type {number}
  818. * @memberof ServerInfoResponseDto
  819. */
  820. 'diskSizeRaw': number;
  821. /**
  822. *
  823. * @type {number}
  824. * @memberof ServerInfoResponseDto
  825. */
  826. 'diskUseRaw': number;
  827. /**
  828. *
  829. * @type {number}
  830. * @memberof ServerInfoResponseDto
  831. */
  832. 'diskAvailableRaw': number;
  833. /**
  834. *
  835. * @type {number}
  836. * @memberof ServerInfoResponseDto
  837. */
  838. 'diskUsagePercentage': number;
  839. /**
  840. *
  841. * @type {string}
  842. * @memberof ServerInfoResponseDto
  843. */
  844. 'diskSize': string;
  845. /**
  846. *
  847. * @type {string}
  848. * @memberof ServerInfoResponseDto
  849. */
  850. 'diskUse': string;
  851. /**
  852. *
  853. * @type {string}
  854. * @memberof ServerInfoResponseDto
  855. */
  856. 'diskAvailable': string;
  857. }
  858. /**
  859. *
  860. * @export
  861. * @interface ServerPingResponse
  862. */
  863. export interface ServerPingResponse {
  864. /**
  865. *
  866. * @type {string}
  867. * @memberof ServerPingResponse
  868. */
  869. 'res': string;
  870. }
  871. /**
  872. *
  873. * @export
  874. * @interface ServerVersionReponseDto
  875. */
  876. export interface ServerVersionReponseDto {
  877. /**
  878. *
  879. * @type {number}
  880. * @memberof ServerVersionReponseDto
  881. */
  882. 'major': number;
  883. /**
  884. *
  885. * @type {number}
  886. * @memberof ServerVersionReponseDto
  887. */
  888. 'minor': number;
  889. /**
  890. *
  891. * @type {number}
  892. * @memberof ServerVersionReponseDto
  893. */
  894. 'patch': number;
  895. /**
  896. *
  897. * @type {number}
  898. * @memberof ServerVersionReponseDto
  899. */
  900. 'build': number;
  901. }
  902. /**
  903. *
  904. * @export
  905. * @interface SignUpDto
  906. */
  907. export interface SignUpDto {
  908. /**
  909. *
  910. * @type {string}
  911. * @memberof SignUpDto
  912. */
  913. 'email': string;
  914. /**
  915. *
  916. * @type {string}
  917. * @memberof SignUpDto
  918. */
  919. 'password': string;
  920. /**
  921. *
  922. * @type {string}
  923. * @memberof SignUpDto
  924. */
  925. 'firstName': string;
  926. /**
  927. *
  928. * @type {string}
  929. * @memberof SignUpDto
  930. */
  931. 'lastName': string;
  932. }
  933. /**
  934. *
  935. * @export
  936. * @interface SmartInfoResponseDto
  937. */
  938. export interface SmartInfoResponseDto {
  939. /**
  940. *
  941. * @type {string}
  942. * @memberof SmartInfoResponseDto
  943. */
  944. 'id'?: string;
  945. /**
  946. *
  947. * @type {Array<string>}
  948. * @memberof SmartInfoResponseDto
  949. */
  950. 'tags'?: Array<string> | null;
  951. /**
  952. *
  953. * @type {Array<string>}
  954. * @memberof SmartInfoResponseDto
  955. */
  956. 'objects'?: Array<string> | null;
  957. }
  958. /**
  959. *
  960. * @export
  961. * @enum {string}
  962. */
  963. export const ThumbnailFormat = {
  964. Jpeg: 'JPEG',
  965. Webp: 'WEBP'
  966. } as const;
  967. export type ThumbnailFormat = typeof ThumbnailFormat[keyof typeof ThumbnailFormat];
  968. /**
  969. *
  970. * @export
  971. * @interface UpdateAlbumDto
  972. */
  973. export interface UpdateAlbumDto {
  974. /**
  975. *
  976. * @type {string}
  977. * @memberof UpdateAlbumDto
  978. */
  979. 'albumName': string;
  980. /**
  981. *
  982. * @type {string}
  983. * @memberof UpdateAlbumDto
  984. */
  985. 'ownerId': string;
  986. }
  987. /**
  988. *
  989. * @export
  990. * @interface UpdateDeviceInfoDto
  991. */
  992. export interface UpdateDeviceInfoDto {
  993. /**
  994. *
  995. * @type {DeviceTypeEnum}
  996. * @memberof UpdateDeviceInfoDto
  997. */
  998. 'deviceType': DeviceTypeEnum;
  999. /**
  1000. *
  1001. * @type {string}
  1002. * @memberof UpdateDeviceInfoDto
  1003. */
  1004. 'deviceId': string;
  1005. /**
  1006. *
  1007. * @type {boolean}
  1008. * @memberof UpdateDeviceInfoDto
  1009. */
  1010. 'isAutoBackup'?: boolean;
  1011. }
  1012. /**
  1013. *
  1014. * @export
  1015. * @interface UpdateUserDto
  1016. */
  1017. export interface UpdateUserDto {
  1018. /**
  1019. *
  1020. * @type {string}
  1021. * @memberof UpdateUserDto
  1022. */
  1023. 'id': string;
  1024. /**
  1025. *
  1026. * @type {string}
  1027. * @memberof UpdateUserDto
  1028. */
  1029. 'password'?: string;
  1030. /**
  1031. *
  1032. * @type {string}
  1033. * @memberof UpdateUserDto
  1034. */
  1035. 'firstName'?: string;
  1036. /**
  1037. *
  1038. * @type {string}
  1039. * @memberof UpdateUserDto
  1040. */
  1041. 'lastName'?: string;
  1042. /**
  1043. *
  1044. * @type {boolean}
  1045. * @memberof UpdateUserDto
  1046. */
  1047. 'isAdmin'?: boolean;
  1048. /**
  1049. *
  1050. * @type {boolean}
  1051. * @memberof UpdateUserDto
  1052. */
  1053. 'shouldChangePassword'?: boolean;
  1054. /**
  1055. *
  1056. * @type {string}
  1057. * @memberof UpdateUserDto
  1058. */
  1059. 'profileImagePath'?: string;
  1060. }
  1061. /**
  1062. *
  1063. * @export
  1064. * @interface UserCountResponseDto
  1065. */
  1066. export interface UserCountResponseDto {
  1067. /**
  1068. *
  1069. * @type {number}
  1070. * @memberof UserCountResponseDto
  1071. */
  1072. 'userCount': number;
  1073. }
  1074. /**
  1075. *
  1076. * @export
  1077. * @interface UserResponseDto
  1078. */
  1079. export interface UserResponseDto {
  1080. /**
  1081. *
  1082. * @type {string}
  1083. * @memberof UserResponseDto
  1084. */
  1085. 'id': string;
  1086. /**
  1087. *
  1088. * @type {string}
  1089. * @memberof UserResponseDto
  1090. */
  1091. 'email': string;
  1092. /**
  1093. *
  1094. * @type {string}
  1095. * @memberof UserResponseDto
  1096. */
  1097. 'firstName': string;
  1098. /**
  1099. *
  1100. * @type {string}
  1101. * @memberof UserResponseDto
  1102. */
  1103. 'lastName': string;
  1104. /**
  1105. *
  1106. * @type {string}
  1107. * @memberof UserResponseDto
  1108. */
  1109. 'createdAt': string;
  1110. /**
  1111. *
  1112. * @type {string}
  1113. * @memberof UserResponseDto
  1114. */
  1115. 'profileImagePath': string;
  1116. /**
  1117. *
  1118. * @type {boolean}
  1119. * @memberof UserResponseDto
  1120. */
  1121. 'shouldChangePassword': boolean;
  1122. /**
  1123. *
  1124. * @type {boolean}
  1125. * @memberof UserResponseDto
  1126. */
  1127. 'isAdmin': boolean;
  1128. }
  1129. /**
  1130. *
  1131. * @export
  1132. * @interface ValidateAccessTokenResponseDto
  1133. */
  1134. export interface ValidateAccessTokenResponseDto {
  1135. /**
  1136. *
  1137. * @type {boolean}
  1138. * @memberof ValidateAccessTokenResponseDto
  1139. */
  1140. 'authStatus': boolean;
  1141. }
  1142. /**
  1143. * AlbumApi - axios parameter creator
  1144. * @export
  1145. */
  1146. export const AlbumApiAxiosParamCreator = function (configuration?: Configuration) {
  1147. return {
  1148. /**
  1149. *
  1150. * @param {string} albumId
  1151. * @param {AddAssetsDto} addAssetsDto
  1152. * @param {*} [options] Override http request option.
  1153. * @throws {RequiredError}
  1154. */
  1155. addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1156. // verify required parameter 'albumId' is not null or undefined
  1157. assertParamExists('addAssetsToAlbum', 'albumId', albumId)
  1158. // verify required parameter 'addAssetsDto' is not null or undefined
  1159. assertParamExists('addAssetsToAlbum', 'addAssetsDto', addAssetsDto)
  1160. const localVarPath = `/album/{albumId}/assets`
  1161. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1162. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1163. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1164. let baseOptions;
  1165. if (configuration) {
  1166. baseOptions = configuration.baseOptions;
  1167. }
  1168. const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
  1169. const localVarHeaderParameter = {} as any;
  1170. const localVarQueryParameter = {} as any;
  1171. // authentication bearer required
  1172. // http bearer authentication required
  1173. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1174. localVarHeaderParameter['Content-Type'] = 'application/json';
  1175. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1176. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1177. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1178. localVarRequestOptions.data = serializeDataIfNeeded(addAssetsDto, localVarRequestOptions, configuration)
  1179. return {
  1180. url: toPathString(localVarUrlObj),
  1181. options: localVarRequestOptions,
  1182. };
  1183. },
  1184. /**
  1185. *
  1186. * @param {string} albumId
  1187. * @param {AddUsersDto} addUsersDto
  1188. * @param {*} [options] Override http request option.
  1189. * @throws {RequiredError}
  1190. */
  1191. addUsersToAlbum: async (albumId: string, addUsersDto: AddUsersDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1192. // verify required parameter 'albumId' is not null or undefined
  1193. assertParamExists('addUsersToAlbum', 'albumId', albumId)
  1194. // verify required parameter 'addUsersDto' is not null or undefined
  1195. assertParamExists('addUsersToAlbum', 'addUsersDto', addUsersDto)
  1196. const localVarPath = `/album/{albumId}/users`
  1197. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1198. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1199. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1200. let baseOptions;
  1201. if (configuration) {
  1202. baseOptions = configuration.baseOptions;
  1203. }
  1204. const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
  1205. const localVarHeaderParameter = {} as any;
  1206. const localVarQueryParameter = {} as any;
  1207. // authentication bearer required
  1208. // http bearer authentication required
  1209. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1210. localVarHeaderParameter['Content-Type'] = 'application/json';
  1211. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1212. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1213. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1214. localVarRequestOptions.data = serializeDataIfNeeded(addUsersDto, localVarRequestOptions, configuration)
  1215. return {
  1216. url: toPathString(localVarUrlObj),
  1217. options: localVarRequestOptions,
  1218. };
  1219. },
  1220. /**
  1221. *
  1222. * @param {CreateAlbumDto} createAlbumDto
  1223. * @param {*} [options] Override http request option.
  1224. * @throws {RequiredError}
  1225. */
  1226. createAlbum: async (createAlbumDto: CreateAlbumDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1227. // verify required parameter 'createAlbumDto' is not null or undefined
  1228. assertParamExists('createAlbum', 'createAlbumDto', createAlbumDto)
  1229. const localVarPath = `/album`;
  1230. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1231. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1232. let baseOptions;
  1233. if (configuration) {
  1234. baseOptions = configuration.baseOptions;
  1235. }
  1236. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  1237. const localVarHeaderParameter = {} as any;
  1238. const localVarQueryParameter = {} as any;
  1239. // authentication bearer required
  1240. // http bearer authentication required
  1241. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1242. localVarHeaderParameter['Content-Type'] = 'application/json';
  1243. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1244. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1245. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1246. localVarRequestOptions.data = serializeDataIfNeeded(createAlbumDto, localVarRequestOptions, configuration)
  1247. return {
  1248. url: toPathString(localVarUrlObj),
  1249. options: localVarRequestOptions,
  1250. };
  1251. },
  1252. /**
  1253. *
  1254. * @param {string} albumId
  1255. * @param {*} [options] Override http request option.
  1256. * @throws {RequiredError}
  1257. */
  1258. deleteAlbum: async (albumId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1259. // verify required parameter 'albumId' is not null or undefined
  1260. assertParamExists('deleteAlbum', 'albumId', albumId)
  1261. const localVarPath = `/album/{albumId}`
  1262. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1263. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1264. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1265. let baseOptions;
  1266. if (configuration) {
  1267. baseOptions = configuration.baseOptions;
  1268. }
  1269. const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
  1270. const localVarHeaderParameter = {} as any;
  1271. const localVarQueryParameter = {} as any;
  1272. // authentication bearer required
  1273. // http bearer authentication required
  1274. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1275. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1276. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1277. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1278. return {
  1279. url: toPathString(localVarUrlObj),
  1280. options: localVarRequestOptions,
  1281. };
  1282. },
  1283. /**
  1284. *
  1285. * @param {string} albumId
  1286. * @param {*} [options] Override http request option.
  1287. * @throws {RequiredError}
  1288. */
  1289. getAlbumInfo: async (albumId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1290. // verify required parameter 'albumId' is not null or undefined
  1291. assertParamExists('getAlbumInfo', 'albumId', albumId)
  1292. const localVarPath = `/album/{albumId}`
  1293. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1294. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1295. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1296. let baseOptions;
  1297. if (configuration) {
  1298. baseOptions = configuration.baseOptions;
  1299. }
  1300. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1301. const localVarHeaderParameter = {} as any;
  1302. const localVarQueryParameter = {} as any;
  1303. // authentication bearer required
  1304. // http bearer authentication required
  1305. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1306. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1307. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1308. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1309. return {
  1310. url: toPathString(localVarUrlObj),
  1311. options: localVarRequestOptions,
  1312. };
  1313. },
  1314. /**
  1315. *
  1316. * @param {boolean} [shared]
  1317. * @param {*} [options] Override http request option.
  1318. * @throws {RequiredError}
  1319. */
  1320. getAllAlbums: async (shared?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1321. const localVarPath = `/album`;
  1322. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1323. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1324. let baseOptions;
  1325. if (configuration) {
  1326. baseOptions = configuration.baseOptions;
  1327. }
  1328. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1329. const localVarHeaderParameter = {} as any;
  1330. const localVarQueryParameter = {} as any;
  1331. // authentication bearer required
  1332. // http bearer authentication required
  1333. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1334. if (shared !== undefined) {
  1335. localVarQueryParameter['shared'] = shared;
  1336. }
  1337. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1338. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1339. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1340. return {
  1341. url: toPathString(localVarUrlObj),
  1342. options: localVarRequestOptions,
  1343. };
  1344. },
  1345. /**
  1346. *
  1347. * @param {string} albumId
  1348. * @param {RemoveAssetsDto} removeAssetsDto
  1349. * @param {*} [options] Override http request option.
  1350. * @throws {RequiredError}
  1351. */
  1352. removeAssetFromAlbum: async (albumId: string, removeAssetsDto: RemoveAssetsDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1353. // verify required parameter 'albumId' is not null or undefined
  1354. assertParamExists('removeAssetFromAlbum', 'albumId', albumId)
  1355. // verify required parameter 'removeAssetsDto' is not null or undefined
  1356. assertParamExists('removeAssetFromAlbum', 'removeAssetsDto', removeAssetsDto)
  1357. const localVarPath = `/album/{albumId}/assets`
  1358. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1359. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1360. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1361. let baseOptions;
  1362. if (configuration) {
  1363. baseOptions = configuration.baseOptions;
  1364. }
  1365. const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
  1366. const localVarHeaderParameter = {} as any;
  1367. const localVarQueryParameter = {} as any;
  1368. // authentication bearer required
  1369. // http bearer authentication required
  1370. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1371. localVarHeaderParameter['Content-Type'] = 'application/json';
  1372. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1373. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1374. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1375. localVarRequestOptions.data = serializeDataIfNeeded(removeAssetsDto, localVarRequestOptions, configuration)
  1376. return {
  1377. url: toPathString(localVarUrlObj),
  1378. options: localVarRequestOptions,
  1379. };
  1380. },
  1381. /**
  1382. *
  1383. * @param {string} albumId
  1384. * @param {string} userId
  1385. * @param {*} [options] Override http request option.
  1386. * @throws {RequiredError}
  1387. */
  1388. removeUserFromAlbum: async (albumId: string, userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1389. // verify required parameter 'albumId' is not null or undefined
  1390. assertParamExists('removeUserFromAlbum', 'albumId', albumId)
  1391. // verify required parameter 'userId' is not null or undefined
  1392. assertParamExists('removeUserFromAlbum', 'userId', userId)
  1393. const localVarPath = `/album/{albumId}/user/{userId}`
  1394. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)))
  1395. .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
  1396. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1397. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1398. let baseOptions;
  1399. if (configuration) {
  1400. baseOptions = configuration.baseOptions;
  1401. }
  1402. const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
  1403. const localVarHeaderParameter = {} as any;
  1404. const localVarQueryParameter = {} as any;
  1405. // authentication bearer required
  1406. // http bearer authentication required
  1407. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1408. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1409. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1410. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1411. return {
  1412. url: toPathString(localVarUrlObj),
  1413. options: localVarRequestOptions,
  1414. };
  1415. },
  1416. /**
  1417. *
  1418. * @param {string} albumId
  1419. * @param {UpdateAlbumDto} updateAlbumDto
  1420. * @param {*} [options] Override http request option.
  1421. * @throws {RequiredError}
  1422. */
  1423. updateAlbumInfo: async (albumId: string, updateAlbumDto: UpdateAlbumDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1424. // verify required parameter 'albumId' is not null or undefined
  1425. assertParamExists('updateAlbumInfo', 'albumId', albumId)
  1426. // verify required parameter 'updateAlbumDto' is not null or undefined
  1427. assertParamExists('updateAlbumInfo', 'updateAlbumDto', updateAlbumDto)
  1428. const localVarPath = `/album/{albumId}`
  1429. .replace(`{${"albumId"}}`, encodeURIComponent(String(albumId)));
  1430. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1431. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1432. let baseOptions;
  1433. if (configuration) {
  1434. baseOptions = configuration.baseOptions;
  1435. }
  1436. const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
  1437. const localVarHeaderParameter = {} as any;
  1438. const localVarQueryParameter = {} as any;
  1439. // authentication bearer required
  1440. // http bearer authentication required
  1441. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1442. localVarHeaderParameter['Content-Type'] = 'application/json';
  1443. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1444. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1445. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1446. localVarRequestOptions.data = serializeDataIfNeeded(updateAlbumDto, localVarRequestOptions, configuration)
  1447. return {
  1448. url: toPathString(localVarUrlObj),
  1449. options: localVarRequestOptions,
  1450. };
  1451. },
  1452. }
  1453. };
  1454. /**
  1455. * AlbumApi - functional programming interface
  1456. * @export
  1457. */
  1458. export const AlbumApiFp = function(configuration?: Configuration) {
  1459. const localVarAxiosParamCreator = AlbumApiAxiosParamCreator(configuration)
  1460. return {
  1461. /**
  1462. *
  1463. * @param {string} albumId
  1464. * @param {AddAssetsDto} addAssetsDto
  1465. * @param {*} [options] Override http request option.
  1466. * @throws {RequiredError}
  1467. */
  1468. async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
  1469. const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, options);
  1470. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1471. },
  1472. /**
  1473. *
  1474. * @param {string} albumId
  1475. * @param {AddUsersDto} addUsersDto
  1476. * @param {*} [options] Override http request option.
  1477. * @throws {RequiredError}
  1478. */
  1479. async addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
  1480. const localVarAxiosArgs = await localVarAxiosParamCreator.addUsersToAlbum(albumId, addUsersDto, options);
  1481. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1482. },
  1483. /**
  1484. *
  1485. * @param {CreateAlbumDto} createAlbumDto
  1486. * @param {*} [options] Override http request option.
  1487. * @throws {RequiredError}
  1488. */
  1489. async createAlbum(createAlbumDto: CreateAlbumDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
  1490. const localVarAxiosArgs = await localVarAxiosParamCreator.createAlbum(createAlbumDto, options);
  1491. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1492. },
  1493. /**
  1494. *
  1495. * @param {string} albumId
  1496. * @param {*} [options] Override http request option.
  1497. * @throws {RequiredError}
  1498. */
  1499. async deleteAlbum(albumId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
  1500. const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAlbum(albumId, options);
  1501. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1502. },
  1503. /**
  1504. *
  1505. * @param {string} albumId
  1506. * @param {*} [options] Override http request option.
  1507. * @throws {RequiredError}
  1508. */
  1509. async getAlbumInfo(albumId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
  1510. const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, options);
  1511. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1512. },
  1513. /**
  1514. *
  1515. * @param {boolean} [shared]
  1516. * @param {*} [options] Override http request option.
  1517. * @throws {RequiredError}
  1518. */
  1519. async getAllAlbums(shared?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AlbumResponseDto>>> {
  1520. const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAlbums(shared, options);
  1521. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1522. },
  1523. /**
  1524. *
  1525. * @param {string} albumId
  1526. * @param {RemoveAssetsDto} removeAssetsDto
  1527. * @param {*} [options] Override http request option.
  1528. * @throws {RequiredError}
  1529. */
  1530. async removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
  1531. const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetFromAlbum(albumId, removeAssetsDto, options);
  1532. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1533. },
  1534. /**
  1535. *
  1536. * @param {string} albumId
  1537. * @param {string} userId
  1538. * @param {*} [options] Override http request option.
  1539. * @throws {RequiredError}
  1540. */
  1541. async removeUserFromAlbum(albumId: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
  1542. const localVarAxiosArgs = await localVarAxiosParamCreator.removeUserFromAlbum(albumId, userId, options);
  1543. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1544. },
  1545. /**
  1546. *
  1547. * @param {string} albumId
  1548. * @param {UpdateAlbumDto} updateAlbumDto
  1549. * @param {*} [options] Override http request option.
  1550. * @throws {RequiredError}
  1551. */
  1552. async updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlbumResponseDto>> {
  1553. const localVarAxiosArgs = await localVarAxiosParamCreator.updateAlbumInfo(albumId, updateAlbumDto, options);
  1554. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  1555. },
  1556. }
  1557. };
  1558. /**
  1559. * AlbumApi - factory interface
  1560. * @export
  1561. */
  1562. export const AlbumApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  1563. const localVarFp = AlbumApiFp(configuration)
  1564. return {
  1565. /**
  1566. *
  1567. * @param {string} albumId
  1568. * @param {AddAssetsDto} addAssetsDto
  1569. * @param {*} [options] Override http request option.
  1570. * @throws {RequiredError}
  1571. */
  1572. addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: any): AxiosPromise<AlbumResponseDto> {
  1573. return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(axios, basePath));
  1574. },
  1575. /**
  1576. *
  1577. * @param {string} albumId
  1578. * @param {AddUsersDto} addUsersDto
  1579. * @param {*} [options] Override http request option.
  1580. * @throws {RequiredError}
  1581. */
  1582. addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: any): AxiosPromise<AlbumResponseDto> {
  1583. return localVarFp.addUsersToAlbum(albumId, addUsersDto, options).then((request) => request(axios, basePath));
  1584. },
  1585. /**
  1586. *
  1587. * @param {CreateAlbumDto} createAlbumDto
  1588. * @param {*} [options] Override http request option.
  1589. * @throws {RequiredError}
  1590. */
  1591. createAlbum(createAlbumDto: CreateAlbumDto, options?: any): AxiosPromise<AlbumResponseDto> {
  1592. return localVarFp.createAlbum(createAlbumDto, options).then((request) => request(axios, basePath));
  1593. },
  1594. /**
  1595. *
  1596. * @param {string} albumId
  1597. * @param {*} [options] Override http request option.
  1598. * @throws {RequiredError}
  1599. */
  1600. deleteAlbum(albumId: string, options?: any): AxiosPromise<void> {
  1601. return localVarFp.deleteAlbum(albumId, options).then((request) => request(axios, basePath));
  1602. },
  1603. /**
  1604. *
  1605. * @param {string} albumId
  1606. * @param {*} [options] Override http request option.
  1607. * @throws {RequiredError}
  1608. */
  1609. getAlbumInfo(albumId: string, options?: any): AxiosPromise<AlbumResponseDto> {
  1610. return localVarFp.getAlbumInfo(albumId, options).then((request) => request(axios, basePath));
  1611. },
  1612. /**
  1613. *
  1614. * @param {boolean} [shared]
  1615. * @param {*} [options] Override http request option.
  1616. * @throws {RequiredError}
  1617. */
  1618. getAllAlbums(shared?: boolean, options?: any): AxiosPromise<Array<AlbumResponseDto>> {
  1619. return localVarFp.getAllAlbums(shared, options).then((request) => request(axios, basePath));
  1620. },
  1621. /**
  1622. *
  1623. * @param {string} albumId
  1624. * @param {RemoveAssetsDto} removeAssetsDto
  1625. * @param {*} [options] Override http request option.
  1626. * @throws {RequiredError}
  1627. */
  1628. removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: any): AxiosPromise<void> {
  1629. return localVarFp.removeAssetFromAlbum(albumId, removeAssetsDto, options).then((request) => request(axios, basePath));
  1630. },
  1631. /**
  1632. *
  1633. * @param {string} albumId
  1634. * @param {string} userId
  1635. * @param {*} [options] Override http request option.
  1636. * @throws {RequiredError}
  1637. */
  1638. removeUserFromAlbum(albumId: string, userId: string, options?: any): AxiosPromise<void> {
  1639. return localVarFp.removeUserFromAlbum(albumId, userId, options).then((request) => request(axios, basePath));
  1640. },
  1641. /**
  1642. *
  1643. * @param {string} albumId
  1644. * @param {UpdateAlbumDto} updateAlbumDto
  1645. * @param {*} [options] Override http request option.
  1646. * @throws {RequiredError}
  1647. */
  1648. updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: any): AxiosPromise<AlbumResponseDto> {
  1649. return localVarFp.updateAlbumInfo(albumId, updateAlbumDto, options).then((request) => request(axios, basePath));
  1650. },
  1651. };
  1652. };
  1653. /**
  1654. * AlbumApi - object-oriented interface
  1655. * @export
  1656. * @class AlbumApi
  1657. * @extends {BaseAPI}
  1658. */
  1659. export class AlbumApi extends BaseAPI {
  1660. /**
  1661. *
  1662. * @param {string} albumId
  1663. * @param {AddAssetsDto} addAssetsDto
  1664. * @param {*} [options] Override http request option.
  1665. * @throws {RequiredError}
  1666. * @memberof AlbumApi
  1667. */
  1668. public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig) {
  1669. return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(this.axios, this.basePath));
  1670. }
  1671. /**
  1672. *
  1673. * @param {string} albumId
  1674. * @param {AddUsersDto} addUsersDto
  1675. * @param {*} [options] Override http request option.
  1676. * @throws {RequiredError}
  1677. * @memberof AlbumApi
  1678. */
  1679. public addUsersToAlbum(albumId: string, addUsersDto: AddUsersDto, options?: AxiosRequestConfig) {
  1680. return AlbumApiFp(this.configuration).addUsersToAlbum(albumId, addUsersDto, options).then((request) => request(this.axios, this.basePath));
  1681. }
  1682. /**
  1683. *
  1684. * @param {CreateAlbumDto} createAlbumDto
  1685. * @param {*} [options] Override http request option.
  1686. * @throws {RequiredError}
  1687. * @memberof AlbumApi
  1688. */
  1689. public createAlbum(createAlbumDto: CreateAlbumDto, options?: AxiosRequestConfig) {
  1690. return AlbumApiFp(this.configuration).createAlbum(createAlbumDto, options).then((request) => request(this.axios, this.basePath));
  1691. }
  1692. /**
  1693. *
  1694. * @param {string} albumId
  1695. * @param {*} [options] Override http request option.
  1696. * @throws {RequiredError}
  1697. * @memberof AlbumApi
  1698. */
  1699. public deleteAlbum(albumId: string, options?: AxiosRequestConfig) {
  1700. return AlbumApiFp(this.configuration).deleteAlbum(albumId, options).then((request) => request(this.axios, this.basePath));
  1701. }
  1702. /**
  1703. *
  1704. * @param {string} albumId
  1705. * @param {*} [options] Override http request option.
  1706. * @throws {RequiredError}
  1707. * @memberof AlbumApi
  1708. */
  1709. public getAlbumInfo(albumId: string, options?: AxiosRequestConfig) {
  1710. return AlbumApiFp(this.configuration).getAlbumInfo(albumId, options).then((request) => request(this.axios, this.basePath));
  1711. }
  1712. /**
  1713. *
  1714. * @param {boolean} [shared]
  1715. * @param {*} [options] Override http request option.
  1716. * @throws {RequiredError}
  1717. * @memberof AlbumApi
  1718. */
  1719. public getAllAlbums(shared?: boolean, options?: AxiosRequestConfig) {
  1720. return AlbumApiFp(this.configuration).getAllAlbums(shared, options).then((request) => request(this.axios, this.basePath));
  1721. }
  1722. /**
  1723. *
  1724. * @param {string} albumId
  1725. * @param {RemoveAssetsDto} removeAssetsDto
  1726. * @param {*} [options] Override http request option.
  1727. * @throws {RequiredError}
  1728. * @memberof AlbumApi
  1729. */
  1730. public removeAssetFromAlbum(albumId: string, removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig) {
  1731. return AlbumApiFp(this.configuration).removeAssetFromAlbum(albumId, removeAssetsDto, options).then((request) => request(this.axios, this.basePath));
  1732. }
  1733. /**
  1734. *
  1735. * @param {string} albumId
  1736. * @param {string} userId
  1737. * @param {*} [options] Override http request option.
  1738. * @throws {RequiredError}
  1739. * @memberof AlbumApi
  1740. */
  1741. public removeUserFromAlbum(albumId: string, userId: string, options?: AxiosRequestConfig) {
  1742. return AlbumApiFp(this.configuration).removeUserFromAlbum(albumId, userId, options).then((request) => request(this.axios, this.basePath));
  1743. }
  1744. /**
  1745. *
  1746. * @param {string} albumId
  1747. * @param {UpdateAlbumDto} updateAlbumDto
  1748. * @param {*} [options] Override http request option.
  1749. * @throws {RequiredError}
  1750. * @memberof AlbumApi
  1751. */
  1752. public updateAlbumInfo(albumId: string, updateAlbumDto: UpdateAlbumDto, options?: AxiosRequestConfig) {
  1753. return AlbumApiFp(this.configuration).updateAlbumInfo(albumId, updateAlbumDto, options).then((request) => request(this.axios, this.basePath));
  1754. }
  1755. }
  1756. /**
  1757. * AssetApi - axios parameter creator
  1758. * @export
  1759. */
  1760. export const AssetApiAxiosParamCreator = function (configuration?: Configuration) {
  1761. return {
  1762. /**
  1763. * Check duplicated asset before uploading - for Web upload used
  1764. * @summary
  1765. * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto
  1766. * @param {*} [options] Override http request option.
  1767. * @throws {RequiredError}
  1768. */
  1769. checkDuplicateAsset: async (checkDuplicateAssetDto: CheckDuplicateAssetDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1770. // verify required parameter 'checkDuplicateAssetDto' is not null or undefined
  1771. assertParamExists('checkDuplicateAsset', 'checkDuplicateAssetDto', checkDuplicateAssetDto)
  1772. const localVarPath = `/asset/check`;
  1773. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1774. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1775. let baseOptions;
  1776. if (configuration) {
  1777. baseOptions = configuration.baseOptions;
  1778. }
  1779. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  1780. const localVarHeaderParameter = {} as any;
  1781. const localVarQueryParameter = {} as any;
  1782. // authentication bearer required
  1783. // http bearer authentication required
  1784. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1785. localVarHeaderParameter['Content-Type'] = 'application/json';
  1786. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1787. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1788. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1789. localVarRequestOptions.data = serializeDataIfNeeded(checkDuplicateAssetDto, localVarRequestOptions, configuration)
  1790. return {
  1791. url: toPathString(localVarUrlObj),
  1792. options: localVarRequestOptions,
  1793. };
  1794. },
  1795. /**
  1796. *
  1797. * @param {DeleteAssetDto} deleteAssetDto
  1798. * @param {*} [options] Override http request option.
  1799. * @throws {RequiredError}
  1800. */
  1801. deleteAsset: async (deleteAssetDto: DeleteAssetDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1802. // verify required parameter 'deleteAssetDto' is not null or undefined
  1803. assertParamExists('deleteAsset', 'deleteAssetDto', deleteAssetDto)
  1804. const localVarPath = `/asset`;
  1805. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1806. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1807. let baseOptions;
  1808. if (configuration) {
  1809. baseOptions = configuration.baseOptions;
  1810. }
  1811. const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
  1812. const localVarHeaderParameter = {} as any;
  1813. const localVarQueryParameter = {} as any;
  1814. // authentication bearer required
  1815. // http bearer authentication required
  1816. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1817. localVarHeaderParameter['Content-Type'] = 'application/json';
  1818. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1819. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1820. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1821. localVarRequestOptions.data = serializeDataIfNeeded(deleteAssetDto, localVarRequestOptions, configuration)
  1822. return {
  1823. url: toPathString(localVarUrlObj),
  1824. options: localVarRequestOptions,
  1825. };
  1826. },
  1827. /**
  1828. *
  1829. * @param {string} aid
  1830. * @param {string} did
  1831. * @param {boolean} [isThumb]
  1832. * @param {boolean} [isWeb]
  1833. * @param {*} [options] Override http request option.
  1834. * @throws {RequiredError}
  1835. */
  1836. downloadFile: async (aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1837. // verify required parameter 'aid' is not null or undefined
  1838. assertParamExists('downloadFile', 'aid', aid)
  1839. // verify required parameter 'did' is not null or undefined
  1840. assertParamExists('downloadFile', 'did', did)
  1841. const localVarPath = `/asset/download`;
  1842. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1843. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1844. let baseOptions;
  1845. if (configuration) {
  1846. baseOptions = configuration.baseOptions;
  1847. }
  1848. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1849. const localVarHeaderParameter = {} as any;
  1850. const localVarQueryParameter = {} as any;
  1851. // authentication bearer required
  1852. // http bearer authentication required
  1853. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1854. if (aid !== undefined) {
  1855. localVarQueryParameter['aid'] = aid;
  1856. }
  1857. if (did !== undefined) {
  1858. localVarQueryParameter['did'] = did;
  1859. }
  1860. if (isThumb !== undefined) {
  1861. localVarQueryParameter['isThumb'] = isThumb;
  1862. }
  1863. if (isWeb !== undefined) {
  1864. localVarQueryParameter['isWeb'] = isWeb;
  1865. }
  1866. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1867. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1868. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1869. return {
  1870. url: toPathString(localVarUrlObj),
  1871. options: localVarRequestOptions,
  1872. };
  1873. },
  1874. /**
  1875. * Get all AssetEntity belong to the user
  1876. * @summary
  1877. * @param {*} [options] Override http request option.
  1878. * @throws {RequiredError}
  1879. */
  1880. getAllAssets: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1881. const localVarPath = `/asset`;
  1882. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1883. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1884. let baseOptions;
  1885. if (configuration) {
  1886. baseOptions = configuration.baseOptions;
  1887. }
  1888. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1889. const localVarHeaderParameter = {} as any;
  1890. const localVarQueryParameter = {} as any;
  1891. // authentication bearer required
  1892. // http bearer authentication required
  1893. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1894. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1895. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1896. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1897. return {
  1898. url: toPathString(localVarUrlObj),
  1899. options: localVarRequestOptions,
  1900. };
  1901. },
  1902. /**
  1903. * Get a single asset\'s information
  1904. * @summary
  1905. * @param {string} assetId
  1906. * @param {*} [options] Override http request option.
  1907. * @throws {RequiredError}
  1908. */
  1909. getAssetById: async (assetId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1910. // verify required parameter 'assetId' is not null or undefined
  1911. assertParamExists('getAssetById', 'assetId', assetId)
  1912. const localVarPath = `/asset/assetById/{assetId}`
  1913. .replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
  1914. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1915. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1916. let baseOptions;
  1917. if (configuration) {
  1918. baseOptions = configuration.baseOptions;
  1919. }
  1920. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1921. const localVarHeaderParameter = {} as any;
  1922. const localVarQueryParameter = {} as any;
  1923. // authentication bearer required
  1924. // http bearer authentication required
  1925. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1926. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1927. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1928. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1929. return {
  1930. url: toPathString(localVarUrlObj),
  1931. options: localVarRequestOptions,
  1932. };
  1933. },
  1934. /**
  1935. *
  1936. * @param {*} [options] Override http request option.
  1937. * @throws {RequiredError}
  1938. */
  1939. getAssetSearchTerms: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1940. const localVarPath = `/asset/searchTerm`;
  1941. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1942. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1943. let baseOptions;
  1944. if (configuration) {
  1945. baseOptions = configuration.baseOptions;
  1946. }
  1947. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1948. const localVarHeaderParameter = {} as any;
  1949. const localVarQueryParameter = {} as any;
  1950. // authentication bearer required
  1951. // http bearer authentication required
  1952. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1953. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1954. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1955. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1956. return {
  1957. url: toPathString(localVarUrlObj),
  1958. options: localVarRequestOptions,
  1959. };
  1960. },
  1961. /**
  1962. *
  1963. * @param {string} assetId
  1964. * @param {ThumbnailFormat} [format]
  1965. * @param {*} [options] Override http request option.
  1966. * @throws {RequiredError}
  1967. */
  1968. getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  1969. // verify required parameter 'assetId' is not null or undefined
  1970. assertParamExists('getAssetThumbnail', 'assetId', assetId)
  1971. const localVarPath = `/asset/thumbnail/{assetId}`
  1972. .replace(`{${"assetId"}}`, encodeURIComponent(String(assetId)));
  1973. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  1974. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  1975. let baseOptions;
  1976. if (configuration) {
  1977. baseOptions = configuration.baseOptions;
  1978. }
  1979. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  1980. const localVarHeaderParameter = {} as any;
  1981. const localVarQueryParameter = {} as any;
  1982. // authentication bearer required
  1983. // http bearer authentication required
  1984. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  1985. if (format !== undefined) {
  1986. localVarQueryParameter['format'] = format;
  1987. }
  1988. setSearchParams(localVarUrlObj, localVarQueryParameter);
  1989. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  1990. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  1991. return {
  1992. url: toPathString(localVarUrlObj),
  1993. options: localVarRequestOptions,
  1994. };
  1995. },
  1996. /**
  1997. *
  1998. * @param {*} [options] Override http request option.
  1999. * @throws {RequiredError}
  2000. */
  2001. getCuratedLocations: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2002. const localVarPath = `/asset/allLocation`;
  2003. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2004. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2005. let baseOptions;
  2006. if (configuration) {
  2007. baseOptions = configuration.baseOptions;
  2008. }
  2009. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  2010. const localVarHeaderParameter = {} as any;
  2011. const localVarQueryParameter = {} as any;
  2012. // authentication bearer required
  2013. // http bearer authentication required
  2014. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2015. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2016. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2017. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2018. return {
  2019. url: toPathString(localVarUrlObj),
  2020. options: localVarRequestOptions,
  2021. };
  2022. },
  2023. /**
  2024. *
  2025. * @param {*} [options] Override http request option.
  2026. * @throws {RequiredError}
  2027. */
  2028. getCuratedObjects: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2029. const localVarPath = `/asset/allObjects`;
  2030. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2031. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2032. let baseOptions;
  2033. if (configuration) {
  2034. baseOptions = configuration.baseOptions;
  2035. }
  2036. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  2037. const localVarHeaderParameter = {} as any;
  2038. const localVarQueryParameter = {} as any;
  2039. // authentication bearer required
  2040. // http bearer authentication required
  2041. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2042. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2043. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2044. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2045. return {
  2046. url: toPathString(localVarUrlObj),
  2047. options: localVarRequestOptions,
  2048. };
  2049. },
  2050. /**
  2051. * Get all asset of a device that are in the database, ID only.
  2052. * @summary
  2053. * @param {string} deviceId
  2054. * @param {*} [options] Override http request option.
  2055. * @throws {RequiredError}
  2056. */
  2057. getUserAssetsByDeviceId: async (deviceId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2058. // verify required parameter 'deviceId' is not null or undefined
  2059. assertParamExists('getUserAssetsByDeviceId', 'deviceId', deviceId)
  2060. const localVarPath = `/asset/{deviceId}`
  2061. .replace(`{${"deviceId"}}`, encodeURIComponent(String(deviceId)));
  2062. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2063. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2064. let baseOptions;
  2065. if (configuration) {
  2066. baseOptions = configuration.baseOptions;
  2067. }
  2068. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  2069. const localVarHeaderParameter = {} as any;
  2070. const localVarQueryParameter = {} as any;
  2071. // authentication bearer required
  2072. // http bearer authentication required
  2073. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2074. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2075. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2076. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2077. return {
  2078. url: toPathString(localVarUrlObj),
  2079. options: localVarRequestOptions,
  2080. };
  2081. },
  2082. /**
  2083. *
  2084. * @param {SearchAssetDto} searchAssetDto
  2085. * @param {*} [options] Override http request option.
  2086. * @throws {RequiredError}
  2087. */
  2088. searchAsset: async (searchAssetDto: SearchAssetDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2089. // verify required parameter 'searchAssetDto' is not null or undefined
  2090. assertParamExists('searchAsset', 'searchAssetDto', searchAssetDto)
  2091. const localVarPath = `/asset/search`;
  2092. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2093. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2094. let baseOptions;
  2095. if (configuration) {
  2096. baseOptions = configuration.baseOptions;
  2097. }
  2098. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2099. const localVarHeaderParameter = {} as any;
  2100. const localVarQueryParameter = {} as any;
  2101. // authentication bearer required
  2102. // http bearer authentication required
  2103. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2104. localVarHeaderParameter['Content-Type'] = 'application/json';
  2105. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2106. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2107. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2108. localVarRequestOptions.data = serializeDataIfNeeded(searchAssetDto, localVarRequestOptions, configuration)
  2109. return {
  2110. url: toPathString(localVarUrlObj),
  2111. options: localVarRequestOptions,
  2112. };
  2113. },
  2114. /**
  2115. *
  2116. * @param {string} aid
  2117. * @param {string} did
  2118. * @param {boolean} [isThumb]
  2119. * @param {boolean} [isWeb]
  2120. * @param {*} [options] Override http request option.
  2121. * @throws {RequiredError}
  2122. */
  2123. serveFile: async (aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2124. // verify required parameter 'aid' is not null or undefined
  2125. assertParamExists('serveFile', 'aid', aid)
  2126. // verify required parameter 'did' is not null or undefined
  2127. assertParamExists('serveFile', 'did', did)
  2128. const localVarPath = `/asset/file`;
  2129. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2130. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2131. let baseOptions;
  2132. if (configuration) {
  2133. baseOptions = configuration.baseOptions;
  2134. }
  2135. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  2136. const localVarHeaderParameter = {} as any;
  2137. const localVarQueryParameter = {} as any;
  2138. // authentication bearer required
  2139. // http bearer authentication required
  2140. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2141. if (aid !== undefined) {
  2142. localVarQueryParameter['aid'] = aid;
  2143. }
  2144. if (did !== undefined) {
  2145. localVarQueryParameter['did'] = did;
  2146. }
  2147. if (isThumb !== undefined) {
  2148. localVarQueryParameter['isThumb'] = isThumb;
  2149. }
  2150. if (isWeb !== undefined) {
  2151. localVarQueryParameter['isWeb'] = isWeb;
  2152. }
  2153. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2154. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2155. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2156. return {
  2157. url: toPathString(localVarUrlObj),
  2158. options: localVarRequestOptions,
  2159. };
  2160. },
  2161. /**
  2162. *
  2163. * @param {any} assetData
  2164. * @param {*} [options] Override http request option.
  2165. * @throws {RequiredError}
  2166. */
  2167. uploadFile: async (assetData: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2168. // verify required parameter 'assetData' is not null or undefined
  2169. assertParamExists('uploadFile', 'assetData', assetData)
  2170. const localVarPath = `/asset/upload`;
  2171. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2172. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2173. let baseOptions;
  2174. if (configuration) {
  2175. baseOptions = configuration.baseOptions;
  2176. }
  2177. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2178. const localVarHeaderParameter = {} as any;
  2179. const localVarQueryParameter = {} as any;
  2180. const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
  2181. // authentication bearer required
  2182. // http bearer authentication required
  2183. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2184. if (assetData !== undefined) {
  2185. localVarFormParams.append('assetData', assetData as any);
  2186. }
  2187. localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
  2188. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2189. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2190. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2191. localVarRequestOptions.data = localVarFormParams;
  2192. return {
  2193. url: toPathString(localVarUrlObj),
  2194. options: localVarRequestOptions,
  2195. };
  2196. },
  2197. }
  2198. };
  2199. /**
  2200. * AssetApi - functional programming interface
  2201. * @export
  2202. */
  2203. export const AssetApiFp = function(configuration?: Configuration) {
  2204. const localVarAxiosParamCreator = AssetApiAxiosParamCreator(configuration)
  2205. return {
  2206. /**
  2207. * Check duplicated asset before uploading - for Web upload used
  2208. * @summary
  2209. * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto
  2210. * @param {*} [options] Override http request option.
  2211. * @throws {RequiredError}
  2212. */
  2213. async checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CheckDuplicateAssetResponseDto>> {
  2214. const localVarAxiosArgs = await localVarAxiosParamCreator.checkDuplicateAsset(checkDuplicateAssetDto, options);
  2215. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2216. },
  2217. /**
  2218. *
  2219. * @param {DeleteAssetDto} deleteAssetDto
  2220. * @param {*} [options] Override http request option.
  2221. * @throws {RequiredError}
  2222. */
  2223. async deleteAsset(deleteAssetDto: DeleteAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DeleteAssetResponseDto>>> {
  2224. const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAsset(deleteAssetDto, options);
  2225. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2226. },
  2227. /**
  2228. *
  2229. * @param {string} aid
  2230. * @param {string} did
  2231. * @param {boolean} [isThumb]
  2232. * @param {boolean} [isWeb]
  2233. * @param {*} [options] Override http request option.
  2234. * @throws {RequiredError}
  2235. */
  2236. async downloadFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
  2237. const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(aid, did, isThumb, isWeb, options);
  2238. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2239. },
  2240. /**
  2241. * Get all AssetEntity belong to the user
  2242. * @summary
  2243. * @param {*} [options] Override http request option.
  2244. * @throws {RequiredError}
  2245. */
  2246. async getAllAssets(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AssetResponseDto>>> {
  2247. const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssets(options);
  2248. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2249. },
  2250. /**
  2251. * Get a single asset\'s information
  2252. * @summary
  2253. * @param {string} assetId
  2254. * @param {*} [options] Override http request option.
  2255. * @throws {RequiredError}
  2256. */
  2257. async getAssetById(assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetResponseDto>> {
  2258. const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, options);
  2259. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2260. },
  2261. /**
  2262. *
  2263. * @param {*} [options] Override http request option.
  2264. * @throws {RequiredError}
  2265. */
  2266. async getAssetSearchTerms(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
  2267. const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetSearchTerms(options);
  2268. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2269. },
  2270. /**
  2271. *
  2272. * @param {string} assetId
  2273. * @param {ThumbnailFormat} [format]
  2274. * @param {*} [options] Override http request option.
  2275. * @throws {RequiredError}
  2276. */
  2277. async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
  2278. const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, options);
  2279. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2280. },
  2281. /**
  2282. *
  2283. * @param {*} [options] Override http request option.
  2284. * @throws {RequiredError}
  2285. */
  2286. async getCuratedLocations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CuratedLocationsResponseDto>>> {
  2287. const localVarAxiosArgs = await localVarAxiosParamCreator.getCuratedLocations(options);
  2288. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2289. },
  2290. /**
  2291. *
  2292. * @param {*} [options] Override http request option.
  2293. * @throws {RequiredError}
  2294. */
  2295. async getCuratedObjects(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CuratedObjectsResponseDto>>> {
  2296. const localVarAxiosArgs = await localVarAxiosParamCreator.getCuratedObjects(options);
  2297. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2298. },
  2299. /**
  2300. * Get all asset of a device that are in the database, ID only.
  2301. * @summary
  2302. * @param {string} deviceId
  2303. * @param {*} [options] Override http request option.
  2304. * @throws {RequiredError}
  2305. */
  2306. async getUserAssetsByDeviceId(deviceId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>> {
  2307. const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAssetsByDeviceId(deviceId, options);
  2308. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2309. },
  2310. /**
  2311. *
  2312. * @param {SearchAssetDto} searchAssetDto
  2313. * @param {*} [options] Override http request option.
  2314. * @throws {RequiredError}
  2315. */
  2316. async searchAsset(searchAssetDto: SearchAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AssetResponseDto>>> {
  2317. const localVarAxiosArgs = await localVarAxiosParamCreator.searchAsset(searchAssetDto, options);
  2318. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2319. },
  2320. /**
  2321. *
  2322. * @param {string} aid
  2323. * @param {string} did
  2324. * @param {boolean} [isThumb]
  2325. * @param {boolean} [isWeb]
  2326. * @param {*} [options] Override http request option.
  2327. * @throws {RequiredError}
  2328. */
  2329. async serveFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
  2330. const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(aid, did, isThumb, isWeb, options);
  2331. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2332. },
  2333. /**
  2334. *
  2335. * @param {any} assetData
  2336. * @param {*} [options] Override http request option.
  2337. * @throws {RequiredError}
  2338. */
  2339. async uploadFile(assetData: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
  2340. const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetData, options);
  2341. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2342. },
  2343. }
  2344. };
  2345. /**
  2346. * AssetApi - factory interface
  2347. * @export
  2348. */
  2349. export const AssetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  2350. const localVarFp = AssetApiFp(configuration)
  2351. return {
  2352. /**
  2353. * Check duplicated asset before uploading - for Web upload used
  2354. * @summary
  2355. * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto
  2356. * @param {*} [options] Override http request option.
  2357. * @throws {RequiredError}
  2358. */
  2359. checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: any): AxiosPromise<CheckDuplicateAssetResponseDto> {
  2360. return localVarFp.checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(axios, basePath));
  2361. },
  2362. /**
  2363. *
  2364. * @param {DeleteAssetDto} deleteAssetDto
  2365. * @param {*} [options] Override http request option.
  2366. * @throws {RequiredError}
  2367. */
  2368. deleteAsset(deleteAssetDto: DeleteAssetDto, options?: any): AxiosPromise<Array<DeleteAssetResponseDto>> {
  2369. return localVarFp.deleteAsset(deleteAssetDto, options).then((request) => request(axios, basePath));
  2370. },
  2371. /**
  2372. *
  2373. * @param {string} aid
  2374. * @param {string} did
  2375. * @param {boolean} [isThumb]
  2376. * @param {boolean} [isWeb]
  2377. * @param {*} [options] Override http request option.
  2378. * @throws {RequiredError}
  2379. */
  2380. downloadFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: any): AxiosPromise<object> {
  2381. return localVarFp.downloadFile(aid, did, isThumb, isWeb, options).then((request) => request(axios, basePath));
  2382. },
  2383. /**
  2384. * Get all AssetEntity belong to the user
  2385. * @summary
  2386. * @param {*} [options] Override http request option.
  2387. * @throws {RequiredError}
  2388. */
  2389. getAllAssets(options?: any): AxiosPromise<Array<AssetResponseDto>> {
  2390. return localVarFp.getAllAssets(options).then((request) => request(axios, basePath));
  2391. },
  2392. /**
  2393. * Get a single asset\'s information
  2394. * @summary
  2395. * @param {string} assetId
  2396. * @param {*} [options] Override http request option.
  2397. * @throws {RequiredError}
  2398. */
  2399. getAssetById(assetId: string, options?: any): AxiosPromise<AssetResponseDto> {
  2400. return localVarFp.getAssetById(assetId, options).then((request) => request(axios, basePath));
  2401. },
  2402. /**
  2403. *
  2404. * @param {*} [options] Override http request option.
  2405. * @throws {RequiredError}
  2406. */
  2407. getAssetSearchTerms(options?: any): AxiosPromise<Array<string>> {
  2408. return localVarFp.getAssetSearchTerms(options).then((request) => request(axios, basePath));
  2409. },
  2410. /**
  2411. *
  2412. * @param {string} assetId
  2413. * @param {ThumbnailFormat} [format]
  2414. * @param {*} [options] Override http request option.
  2415. * @throws {RequiredError}
  2416. */
  2417. getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: any): AxiosPromise<object> {
  2418. return localVarFp.getAssetThumbnail(assetId, format, options).then((request) => request(axios, basePath));
  2419. },
  2420. /**
  2421. *
  2422. * @param {*} [options] Override http request option.
  2423. * @throws {RequiredError}
  2424. */
  2425. getCuratedLocations(options?: any): AxiosPromise<Array<CuratedLocationsResponseDto>> {
  2426. return localVarFp.getCuratedLocations(options).then((request) => request(axios, basePath));
  2427. },
  2428. /**
  2429. *
  2430. * @param {*} [options] Override http request option.
  2431. * @throws {RequiredError}
  2432. */
  2433. getCuratedObjects(options?: any): AxiosPromise<Array<CuratedObjectsResponseDto>> {
  2434. return localVarFp.getCuratedObjects(options).then((request) => request(axios, basePath));
  2435. },
  2436. /**
  2437. * Get all asset of a device that are in the database, ID only.
  2438. * @summary
  2439. * @param {string} deviceId
  2440. * @param {*} [options] Override http request option.
  2441. * @throws {RequiredError}
  2442. */
  2443. getUserAssetsByDeviceId(deviceId: string, options?: any): AxiosPromise<Array<string>> {
  2444. return localVarFp.getUserAssetsByDeviceId(deviceId, options).then((request) => request(axios, basePath));
  2445. },
  2446. /**
  2447. *
  2448. * @param {SearchAssetDto} searchAssetDto
  2449. * @param {*} [options] Override http request option.
  2450. * @throws {RequiredError}
  2451. */
  2452. searchAsset(searchAssetDto: SearchAssetDto, options?: any): AxiosPromise<Array<AssetResponseDto>> {
  2453. return localVarFp.searchAsset(searchAssetDto, options).then((request) => request(axios, basePath));
  2454. },
  2455. /**
  2456. *
  2457. * @param {string} aid
  2458. * @param {string} did
  2459. * @param {boolean} [isThumb]
  2460. * @param {boolean} [isWeb]
  2461. * @param {*} [options] Override http request option.
  2462. * @throws {RequiredError}
  2463. */
  2464. serveFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: any): AxiosPromise<object> {
  2465. return localVarFp.serveFile(aid, did, isThumb, isWeb, options).then((request) => request(axios, basePath));
  2466. },
  2467. /**
  2468. *
  2469. * @param {any} assetData
  2470. * @param {*} [options] Override http request option.
  2471. * @throws {RequiredError}
  2472. */
  2473. uploadFile(assetData: any, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
  2474. return localVarFp.uploadFile(assetData, options).then((request) => request(axios, basePath));
  2475. },
  2476. };
  2477. };
  2478. /**
  2479. * AssetApi - object-oriented interface
  2480. * @export
  2481. * @class AssetApi
  2482. * @extends {BaseAPI}
  2483. */
  2484. export class AssetApi extends BaseAPI {
  2485. /**
  2486. * Check duplicated asset before uploading - for Web upload used
  2487. * @summary
  2488. * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto
  2489. * @param {*} [options] Override http request option.
  2490. * @throws {RequiredError}
  2491. * @memberof AssetApi
  2492. */
  2493. public checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig) {
  2494. return AssetApiFp(this.configuration).checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(this.axios, this.basePath));
  2495. }
  2496. /**
  2497. *
  2498. * @param {DeleteAssetDto} deleteAssetDto
  2499. * @param {*} [options] Override http request option.
  2500. * @throws {RequiredError}
  2501. * @memberof AssetApi
  2502. */
  2503. public deleteAsset(deleteAssetDto: DeleteAssetDto, options?: AxiosRequestConfig) {
  2504. return AssetApiFp(this.configuration).deleteAsset(deleteAssetDto, options).then((request) => request(this.axios, this.basePath));
  2505. }
  2506. /**
  2507. *
  2508. * @param {string} aid
  2509. * @param {string} did
  2510. * @param {boolean} [isThumb]
  2511. * @param {boolean} [isWeb]
  2512. * @param {*} [options] Override http request option.
  2513. * @throws {RequiredError}
  2514. * @memberof AssetApi
  2515. */
  2516. public downloadFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig) {
  2517. return AssetApiFp(this.configuration).downloadFile(aid, did, isThumb, isWeb, options).then((request) => request(this.axios, this.basePath));
  2518. }
  2519. /**
  2520. * Get all AssetEntity belong to the user
  2521. * @summary
  2522. * @param {*} [options] Override http request option.
  2523. * @throws {RequiredError}
  2524. * @memberof AssetApi
  2525. */
  2526. public getAllAssets(options?: AxiosRequestConfig) {
  2527. return AssetApiFp(this.configuration).getAllAssets(options).then((request) => request(this.axios, this.basePath));
  2528. }
  2529. /**
  2530. * Get a single asset\'s information
  2531. * @summary
  2532. * @param {string} assetId
  2533. * @param {*} [options] Override http request option.
  2534. * @throws {RequiredError}
  2535. * @memberof AssetApi
  2536. */
  2537. public getAssetById(assetId: string, options?: AxiosRequestConfig) {
  2538. return AssetApiFp(this.configuration).getAssetById(assetId, options).then((request) => request(this.axios, this.basePath));
  2539. }
  2540. /**
  2541. *
  2542. * @param {*} [options] Override http request option.
  2543. * @throws {RequiredError}
  2544. * @memberof AssetApi
  2545. */
  2546. public getAssetSearchTerms(options?: AxiosRequestConfig) {
  2547. return AssetApiFp(this.configuration).getAssetSearchTerms(options).then((request) => request(this.axios, this.basePath));
  2548. }
  2549. /**
  2550. *
  2551. * @param {string} assetId
  2552. * @param {ThumbnailFormat} [format]
  2553. * @param {*} [options] Override http request option.
  2554. * @throws {RequiredError}
  2555. * @memberof AssetApi
  2556. */
  2557. public getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig) {
  2558. return AssetApiFp(this.configuration).getAssetThumbnail(assetId, format, options).then((request) => request(this.axios, this.basePath));
  2559. }
  2560. /**
  2561. *
  2562. * @param {*} [options] Override http request option.
  2563. * @throws {RequiredError}
  2564. * @memberof AssetApi
  2565. */
  2566. public getCuratedLocations(options?: AxiosRequestConfig) {
  2567. return AssetApiFp(this.configuration).getCuratedLocations(options).then((request) => request(this.axios, this.basePath));
  2568. }
  2569. /**
  2570. *
  2571. * @param {*} [options] Override http request option.
  2572. * @throws {RequiredError}
  2573. * @memberof AssetApi
  2574. */
  2575. public getCuratedObjects(options?: AxiosRequestConfig) {
  2576. return AssetApiFp(this.configuration).getCuratedObjects(options).then((request) => request(this.axios, this.basePath));
  2577. }
  2578. /**
  2579. * Get all asset of a device that are in the database, ID only.
  2580. * @summary
  2581. * @param {string} deviceId
  2582. * @param {*} [options] Override http request option.
  2583. * @throws {RequiredError}
  2584. * @memberof AssetApi
  2585. */
  2586. public getUserAssetsByDeviceId(deviceId: string, options?: AxiosRequestConfig) {
  2587. return AssetApiFp(this.configuration).getUserAssetsByDeviceId(deviceId, options).then((request) => request(this.axios, this.basePath));
  2588. }
  2589. /**
  2590. *
  2591. * @param {SearchAssetDto} searchAssetDto
  2592. * @param {*} [options] Override http request option.
  2593. * @throws {RequiredError}
  2594. * @memberof AssetApi
  2595. */
  2596. public searchAsset(searchAssetDto: SearchAssetDto, options?: AxiosRequestConfig) {
  2597. return AssetApiFp(this.configuration).searchAsset(searchAssetDto, options).then((request) => request(this.axios, this.basePath));
  2598. }
  2599. /**
  2600. *
  2601. * @param {string} aid
  2602. * @param {string} did
  2603. * @param {boolean} [isThumb]
  2604. * @param {boolean} [isWeb]
  2605. * @param {*} [options] Override http request option.
  2606. * @throws {RequiredError}
  2607. * @memberof AssetApi
  2608. */
  2609. public serveFile(aid: string, did: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig) {
  2610. return AssetApiFp(this.configuration).serveFile(aid, did, isThumb, isWeb, options).then((request) => request(this.axios, this.basePath));
  2611. }
  2612. /**
  2613. *
  2614. * @param {any} assetData
  2615. * @param {*} [options] Override http request option.
  2616. * @throws {RequiredError}
  2617. * @memberof AssetApi
  2618. */
  2619. public uploadFile(assetData: any, options?: AxiosRequestConfig) {
  2620. return AssetApiFp(this.configuration).uploadFile(assetData, options).then((request) => request(this.axios, this.basePath));
  2621. }
  2622. }
  2623. /**
  2624. * AuthenticationApi - axios parameter creator
  2625. * @export
  2626. */
  2627. export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) {
  2628. return {
  2629. /**
  2630. *
  2631. * @param {SignUpDto} signUpDto
  2632. * @param {*} [options] Override http request option.
  2633. * @throws {RequiredError}
  2634. */
  2635. adminSignUp: async (signUpDto: SignUpDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2636. // verify required parameter 'signUpDto' is not null or undefined
  2637. assertParamExists('adminSignUp', 'signUpDto', signUpDto)
  2638. const localVarPath = `/auth/admin-sign-up`;
  2639. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2640. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2641. let baseOptions;
  2642. if (configuration) {
  2643. baseOptions = configuration.baseOptions;
  2644. }
  2645. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2646. const localVarHeaderParameter = {} as any;
  2647. const localVarQueryParameter = {} as any;
  2648. localVarHeaderParameter['Content-Type'] = 'application/json';
  2649. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2650. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2651. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2652. localVarRequestOptions.data = serializeDataIfNeeded(signUpDto, localVarRequestOptions, configuration)
  2653. return {
  2654. url: toPathString(localVarUrlObj),
  2655. options: localVarRequestOptions,
  2656. };
  2657. },
  2658. /**
  2659. *
  2660. * @param {LoginCredentialDto} loginCredentialDto
  2661. * @param {*} [options] Override http request option.
  2662. * @throws {RequiredError}
  2663. */
  2664. login: async (loginCredentialDto: LoginCredentialDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2665. // verify required parameter 'loginCredentialDto' is not null or undefined
  2666. assertParamExists('login', 'loginCredentialDto', loginCredentialDto)
  2667. const localVarPath = `/auth/login`;
  2668. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2669. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2670. let baseOptions;
  2671. if (configuration) {
  2672. baseOptions = configuration.baseOptions;
  2673. }
  2674. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2675. const localVarHeaderParameter = {} as any;
  2676. const localVarQueryParameter = {} as any;
  2677. localVarHeaderParameter['Content-Type'] = 'application/json';
  2678. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2679. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2680. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2681. localVarRequestOptions.data = serializeDataIfNeeded(loginCredentialDto, localVarRequestOptions, configuration)
  2682. return {
  2683. url: toPathString(localVarUrlObj),
  2684. options: localVarRequestOptions,
  2685. };
  2686. },
  2687. /**
  2688. *
  2689. * @param {*} [options] Override http request option.
  2690. * @throws {RequiredError}
  2691. */
  2692. logout: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2693. const localVarPath = `/auth/logout`;
  2694. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2695. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2696. let baseOptions;
  2697. if (configuration) {
  2698. baseOptions = configuration.baseOptions;
  2699. }
  2700. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2701. const localVarHeaderParameter = {} as any;
  2702. const localVarQueryParameter = {} as any;
  2703. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2704. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2705. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2706. return {
  2707. url: toPathString(localVarUrlObj),
  2708. options: localVarRequestOptions,
  2709. };
  2710. },
  2711. /**
  2712. *
  2713. * @param {*} [options] Override http request option.
  2714. * @throws {RequiredError}
  2715. */
  2716. validateAccessToken: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2717. const localVarPath = `/auth/validateToken`;
  2718. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2719. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2720. let baseOptions;
  2721. if (configuration) {
  2722. baseOptions = configuration.baseOptions;
  2723. }
  2724. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2725. const localVarHeaderParameter = {} as any;
  2726. const localVarQueryParameter = {} as any;
  2727. // authentication bearer required
  2728. // http bearer authentication required
  2729. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2730. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2731. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2732. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2733. return {
  2734. url: toPathString(localVarUrlObj),
  2735. options: localVarRequestOptions,
  2736. };
  2737. },
  2738. }
  2739. };
  2740. /**
  2741. * AuthenticationApi - functional programming interface
  2742. * @export
  2743. */
  2744. export const AuthenticationApiFp = function(configuration?: Configuration) {
  2745. const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration)
  2746. return {
  2747. /**
  2748. *
  2749. * @param {SignUpDto} signUpDto
  2750. * @param {*} [options] Override http request option.
  2751. * @throws {RequiredError}
  2752. */
  2753. async adminSignUp(signUpDto: SignUpDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminSignupResponseDto>> {
  2754. const localVarAxiosArgs = await localVarAxiosParamCreator.adminSignUp(signUpDto, options);
  2755. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2756. },
  2757. /**
  2758. *
  2759. * @param {LoginCredentialDto} loginCredentialDto
  2760. * @param {*} [options] Override http request option.
  2761. * @throws {RequiredError}
  2762. */
  2763. async login(loginCredentialDto: LoginCredentialDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoginResponseDto>> {
  2764. const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginCredentialDto, options);
  2765. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2766. },
  2767. /**
  2768. *
  2769. * @param {*} [options] Override http request option.
  2770. * @throws {RequiredError}
  2771. */
  2772. async logout(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogoutResponseDto>> {
  2773. const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options);
  2774. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2775. },
  2776. /**
  2777. *
  2778. * @param {*} [options] Override http request option.
  2779. * @throws {RequiredError}
  2780. */
  2781. async validateAccessToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAccessTokenResponseDto>> {
  2782. const localVarAxiosArgs = await localVarAxiosParamCreator.validateAccessToken(options);
  2783. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2784. },
  2785. }
  2786. };
  2787. /**
  2788. * AuthenticationApi - factory interface
  2789. * @export
  2790. */
  2791. export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  2792. const localVarFp = AuthenticationApiFp(configuration)
  2793. return {
  2794. /**
  2795. *
  2796. * @param {SignUpDto} signUpDto
  2797. * @param {*} [options] Override http request option.
  2798. * @throws {RequiredError}
  2799. */
  2800. adminSignUp(signUpDto: SignUpDto, options?: any): AxiosPromise<AdminSignupResponseDto> {
  2801. return localVarFp.adminSignUp(signUpDto, options).then((request) => request(axios, basePath));
  2802. },
  2803. /**
  2804. *
  2805. * @param {LoginCredentialDto} loginCredentialDto
  2806. * @param {*} [options] Override http request option.
  2807. * @throws {RequiredError}
  2808. */
  2809. login(loginCredentialDto: LoginCredentialDto, options?: any): AxiosPromise<LoginResponseDto> {
  2810. return localVarFp.login(loginCredentialDto, options).then((request) => request(axios, basePath));
  2811. },
  2812. /**
  2813. *
  2814. * @param {*} [options] Override http request option.
  2815. * @throws {RequiredError}
  2816. */
  2817. logout(options?: any): AxiosPromise<LogoutResponseDto> {
  2818. return localVarFp.logout(options).then((request) => request(axios, basePath));
  2819. },
  2820. /**
  2821. *
  2822. * @param {*} [options] Override http request option.
  2823. * @throws {RequiredError}
  2824. */
  2825. validateAccessToken(options?: any): AxiosPromise<ValidateAccessTokenResponseDto> {
  2826. return localVarFp.validateAccessToken(options).then((request) => request(axios, basePath));
  2827. },
  2828. };
  2829. };
  2830. /**
  2831. * AuthenticationApi - object-oriented interface
  2832. * @export
  2833. * @class AuthenticationApi
  2834. * @extends {BaseAPI}
  2835. */
  2836. export class AuthenticationApi extends BaseAPI {
  2837. /**
  2838. *
  2839. * @param {SignUpDto} signUpDto
  2840. * @param {*} [options] Override http request option.
  2841. * @throws {RequiredError}
  2842. * @memberof AuthenticationApi
  2843. */
  2844. public adminSignUp(signUpDto: SignUpDto, options?: AxiosRequestConfig) {
  2845. return AuthenticationApiFp(this.configuration).adminSignUp(signUpDto, options).then((request) => request(this.axios, this.basePath));
  2846. }
  2847. /**
  2848. *
  2849. * @param {LoginCredentialDto} loginCredentialDto
  2850. * @param {*} [options] Override http request option.
  2851. * @throws {RequiredError}
  2852. * @memberof AuthenticationApi
  2853. */
  2854. public login(loginCredentialDto: LoginCredentialDto, options?: AxiosRequestConfig) {
  2855. return AuthenticationApiFp(this.configuration).login(loginCredentialDto, options).then((request) => request(this.axios, this.basePath));
  2856. }
  2857. /**
  2858. *
  2859. * @param {*} [options] Override http request option.
  2860. * @throws {RequiredError}
  2861. * @memberof AuthenticationApi
  2862. */
  2863. public logout(options?: AxiosRequestConfig) {
  2864. return AuthenticationApiFp(this.configuration).logout(options).then((request) => request(this.axios, this.basePath));
  2865. }
  2866. /**
  2867. *
  2868. * @param {*} [options] Override http request option.
  2869. * @throws {RequiredError}
  2870. * @memberof AuthenticationApi
  2871. */
  2872. public validateAccessToken(options?: AxiosRequestConfig) {
  2873. return AuthenticationApiFp(this.configuration).validateAccessToken(options).then((request) => request(this.axios, this.basePath));
  2874. }
  2875. }
  2876. /**
  2877. * DeviceInfoApi - axios parameter creator
  2878. * @export
  2879. */
  2880. export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configuration) {
  2881. return {
  2882. /**
  2883. *
  2884. * @param {CreateDeviceInfoDto} createDeviceInfoDto
  2885. * @param {*} [options] Override http request option.
  2886. * @throws {RequiredError}
  2887. */
  2888. createDeviceInfo: async (createDeviceInfoDto: CreateDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2889. // verify required parameter 'createDeviceInfoDto' is not null or undefined
  2890. assertParamExists('createDeviceInfo', 'createDeviceInfoDto', createDeviceInfoDto)
  2891. const localVarPath = `/device-info`;
  2892. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2893. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2894. let baseOptions;
  2895. if (configuration) {
  2896. baseOptions = configuration.baseOptions;
  2897. }
  2898. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  2899. const localVarHeaderParameter = {} as any;
  2900. const localVarQueryParameter = {} as any;
  2901. // authentication bearer required
  2902. // http bearer authentication required
  2903. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2904. localVarHeaderParameter['Content-Type'] = 'application/json';
  2905. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2906. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2907. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2908. localVarRequestOptions.data = serializeDataIfNeeded(createDeviceInfoDto, localVarRequestOptions, configuration)
  2909. return {
  2910. url: toPathString(localVarUrlObj),
  2911. options: localVarRequestOptions,
  2912. };
  2913. },
  2914. /**
  2915. *
  2916. * @param {UpdateDeviceInfoDto} updateDeviceInfoDto
  2917. * @param {*} [options] Override http request option.
  2918. * @throws {RequiredError}
  2919. */
  2920. updateDeviceInfo: async (updateDeviceInfoDto: UpdateDeviceInfoDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  2921. // verify required parameter 'updateDeviceInfoDto' is not null or undefined
  2922. assertParamExists('updateDeviceInfo', 'updateDeviceInfoDto', updateDeviceInfoDto)
  2923. const localVarPath = `/device-info`;
  2924. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  2925. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  2926. let baseOptions;
  2927. if (configuration) {
  2928. baseOptions = configuration.baseOptions;
  2929. }
  2930. const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
  2931. const localVarHeaderParameter = {} as any;
  2932. const localVarQueryParameter = {} as any;
  2933. // authentication bearer required
  2934. // http bearer authentication required
  2935. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  2936. localVarHeaderParameter['Content-Type'] = 'application/json';
  2937. setSearchParams(localVarUrlObj, localVarQueryParameter);
  2938. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  2939. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  2940. localVarRequestOptions.data = serializeDataIfNeeded(updateDeviceInfoDto, localVarRequestOptions, configuration)
  2941. return {
  2942. url: toPathString(localVarUrlObj),
  2943. options: localVarRequestOptions,
  2944. };
  2945. },
  2946. }
  2947. };
  2948. /**
  2949. * DeviceInfoApi - functional programming interface
  2950. * @export
  2951. */
  2952. export const DeviceInfoApiFp = function(configuration?: Configuration) {
  2953. const localVarAxiosParamCreator = DeviceInfoApiAxiosParamCreator(configuration)
  2954. return {
  2955. /**
  2956. *
  2957. * @param {CreateDeviceInfoDto} createDeviceInfoDto
  2958. * @param {*} [options] Override http request option.
  2959. * @throws {RequiredError}
  2960. */
  2961. async createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
  2962. const localVarAxiosArgs = await localVarAxiosParamCreator.createDeviceInfo(createDeviceInfoDto, options);
  2963. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2964. },
  2965. /**
  2966. *
  2967. * @param {UpdateDeviceInfoDto} updateDeviceInfoDto
  2968. * @param {*} [options] Override http request option.
  2969. * @throws {RequiredError}
  2970. */
  2971. async updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceInfoResponseDto>> {
  2972. const localVarAxiosArgs = await localVarAxiosParamCreator.updateDeviceInfo(updateDeviceInfoDto, options);
  2973. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  2974. },
  2975. }
  2976. };
  2977. /**
  2978. * DeviceInfoApi - factory interface
  2979. * @export
  2980. */
  2981. export const DeviceInfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  2982. const localVarFp = DeviceInfoApiFp(configuration)
  2983. return {
  2984. /**
  2985. *
  2986. * @param {CreateDeviceInfoDto} createDeviceInfoDto
  2987. * @param {*} [options] Override http request option.
  2988. * @throws {RequiredError}
  2989. */
  2990. createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
  2991. return localVarFp.createDeviceInfo(createDeviceInfoDto, options).then((request) => request(axios, basePath));
  2992. },
  2993. /**
  2994. *
  2995. * @param {UpdateDeviceInfoDto} updateDeviceInfoDto
  2996. * @param {*} [options] Override http request option.
  2997. * @throws {RequiredError}
  2998. */
  2999. updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: any): AxiosPromise<DeviceInfoResponseDto> {
  3000. return localVarFp.updateDeviceInfo(updateDeviceInfoDto, options).then((request) => request(axios, basePath));
  3001. },
  3002. };
  3003. };
  3004. /**
  3005. * DeviceInfoApi - object-oriented interface
  3006. * @export
  3007. * @class DeviceInfoApi
  3008. * @extends {BaseAPI}
  3009. */
  3010. export class DeviceInfoApi extends BaseAPI {
  3011. /**
  3012. *
  3013. * @param {CreateDeviceInfoDto} createDeviceInfoDto
  3014. * @param {*} [options] Override http request option.
  3015. * @throws {RequiredError}
  3016. * @memberof DeviceInfoApi
  3017. */
  3018. public createDeviceInfo(createDeviceInfoDto: CreateDeviceInfoDto, options?: AxiosRequestConfig) {
  3019. return DeviceInfoApiFp(this.configuration).createDeviceInfo(createDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
  3020. }
  3021. /**
  3022. *
  3023. * @param {UpdateDeviceInfoDto} updateDeviceInfoDto
  3024. * @param {*} [options] Override http request option.
  3025. * @throws {RequiredError}
  3026. * @memberof DeviceInfoApi
  3027. */
  3028. public updateDeviceInfo(updateDeviceInfoDto: UpdateDeviceInfoDto, options?: AxiosRequestConfig) {
  3029. return DeviceInfoApiFp(this.configuration).updateDeviceInfo(updateDeviceInfoDto, options).then((request) => request(this.axios, this.basePath));
  3030. }
  3031. }
  3032. /**
  3033. * ServerInfoApi - axios parameter creator
  3034. * @export
  3035. */
  3036. export const ServerInfoApiAxiosParamCreator = function (configuration?: Configuration) {
  3037. return {
  3038. /**
  3039. *
  3040. * @param {*} [options] Override http request option.
  3041. * @throws {RequiredError}
  3042. */
  3043. getServerInfo: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3044. const localVarPath = `/server-info`;
  3045. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3046. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3047. let baseOptions;
  3048. if (configuration) {
  3049. baseOptions = configuration.baseOptions;
  3050. }
  3051. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3052. const localVarHeaderParameter = {} as any;
  3053. const localVarQueryParameter = {} as any;
  3054. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3055. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3056. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3057. return {
  3058. url: toPathString(localVarUrlObj),
  3059. options: localVarRequestOptions,
  3060. };
  3061. },
  3062. /**
  3063. *
  3064. * @param {*} [options] Override http request option.
  3065. * @throws {RequiredError}
  3066. */
  3067. getServerVersion: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3068. const localVarPath = `/server-info/version`;
  3069. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3070. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3071. let baseOptions;
  3072. if (configuration) {
  3073. baseOptions = configuration.baseOptions;
  3074. }
  3075. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3076. const localVarHeaderParameter = {} as any;
  3077. const localVarQueryParameter = {} as any;
  3078. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3079. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3080. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3081. return {
  3082. url: toPathString(localVarUrlObj),
  3083. options: localVarRequestOptions,
  3084. };
  3085. },
  3086. /**
  3087. *
  3088. * @param {*} [options] Override http request option.
  3089. * @throws {RequiredError}
  3090. */
  3091. pingServer: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3092. const localVarPath = `/server-info/ping`;
  3093. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3094. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3095. let baseOptions;
  3096. if (configuration) {
  3097. baseOptions = configuration.baseOptions;
  3098. }
  3099. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3100. const localVarHeaderParameter = {} as any;
  3101. const localVarQueryParameter = {} as any;
  3102. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3103. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3104. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3105. return {
  3106. url: toPathString(localVarUrlObj),
  3107. options: localVarRequestOptions,
  3108. };
  3109. },
  3110. }
  3111. };
  3112. /**
  3113. * ServerInfoApi - functional programming interface
  3114. * @export
  3115. */
  3116. export const ServerInfoApiFp = function(configuration?: Configuration) {
  3117. const localVarAxiosParamCreator = ServerInfoApiAxiosParamCreator(configuration)
  3118. return {
  3119. /**
  3120. *
  3121. * @param {*} [options] Override http request option.
  3122. * @throws {RequiredError}
  3123. */
  3124. async getServerInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerInfoResponseDto>> {
  3125. const localVarAxiosArgs = await localVarAxiosParamCreator.getServerInfo(options);
  3126. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3127. },
  3128. /**
  3129. *
  3130. * @param {*} [options] Override http request option.
  3131. * @throws {RequiredError}
  3132. */
  3133. async getServerVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerVersionReponseDto>> {
  3134. const localVarAxiosArgs = await localVarAxiosParamCreator.getServerVersion(options);
  3135. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3136. },
  3137. /**
  3138. *
  3139. * @param {*} [options] Override http request option.
  3140. * @throws {RequiredError}
  3141. */
  3142. async pingServer(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ServerPingResponse>> {
  3143. const localVarAxiosArgs = await localVarAxiosParamCreator.pingServer(options);
  3144. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3145. },
  3146. }
  3147. };
  3148. /**
  3149. * ServerInfoApi - factory interface
  3150. * @export
  3151. */
  3152. export const ServerInfoApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  3153. const localVarFp = ServerInfoApiFp(configuration)
  3154. return {
  3155. /**
  3156. *
  3157. * @param {*} [options] Override http request option.
  3158. * @throws {RequiredError}
  3159. */
  3160. getServerInfo(options?: any): AxiosPromise<ServerInfoResponseDto> {
  3161. return localVarFp.getServerInfo(options).then((request) => request(axios, basePath));
  3162. },
  3163. /**
  3164. *
  3165. * @param {*} [options] Override http request option.
  3166. * @throws {RequiredError}
  3167. */
  3168. getServerVersion(options?: any): AxiosPromise<ServerVersionReponseDto> {
  3169. return localVarFp.getServerVersion(options).then((request) => request(axios, basePath));
  3170. },
  3171. /**
  3172. *
  3173. * @param {*} [options] Override http request option.
  3174. * @throws {RequiredError}
  3175. */
  3176. pingServer(options?: any): AxiosPromise<ServerPingResponse> {
  3177. return localVarFp.pingServer(options).then((request) => request(axios, basePath));
  3178. },
  3179. };
  3180. };
  3181. /**
  3182. * ServerInfoApi - object-oriented interface
  3183. * @export
  3184. * @class ServerInfoApi
  3185. * @extends {BaseAPI}
  3186. */
  3187. export class ServerInfoApi extends BaseAPI {
  3188. /**
  3189. *
  3190. * @param {*} [options] Override http request option.
  3191. * @throws {RequiredError}
  3192. * @memberof ServerInfoApi
  3193. */
  3194. public getServerInfo(options?: AxiosRequestConfig) {
  3195. return ServerInfoApiFp(this.configuration).getServerInfo(options).then((request) => request(this.axios, this.basePath));
  3196. }
  3197. /**
  3198. *
  3199. * @param {*} [options] Override http request option.
  3200. * @throws {RequiredError}
  3201. * @memberof ServerInfoApi
  3202. */
  3203. public getServerVersion(options?: AxiosRequestConfig) {
  3204. return ServerInfoApiFp(this.configuration).getServerVersion(options).then((request) => request(this.axios, this.basePath));
  3205. }
  3206. /**
  3207. *
  3208. * @param {*} [options] Override http request option.
  3209. * @throws {RequiredError}
  3210. * @memberof ServerInfoApi
  3211. */
  3212. public pingServer(options?: AxiosRequestConfig) {
  3213. return ServerInfoApiFp(this.configuration).pingServer(options).then((request) => request(this.axios, this.basePath));
  3214. }
  3215. }
  3216. /**
  3217. * UserApi - axios parameter creator
  3218. * @export
  3219. */
  3220. export const UserApiAxiosParamCreator = function (configuration?: Configuration) {
  3221. return {
  3222. /**
  3223. *
  3224. * @param {any} file
  3225. * @param {*} [options] Override http request option.
  3226. * @throws {RequiredError}
  3227. */
  3228. createProfileImage: async (file: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3229. // verify required parameter 'file' is not null or undefined
  3230. assertParamExists('createProfileImage', 'file', file)
  3231. const localVarPath = `/user/profile-image`;
  3232. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3233. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3234. let baseOptions;
  3235. if (configuration) {
  3236. baseOptions = configuration.baseOptions;
  3237. }
  3238. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  3239. const localVarHeaderParameter = {} as any;
  3240. const localVarQueryParameter = {} as any;
  3241. const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
  3242. // authentication bearer required
  3243. // http bearer authentication required
  3244. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  3245. if (file !== undefined) {
  3246. localVarFormParams.append('file', file as any);
  3247. }
  3248. localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
  3249. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3250. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3251. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3252. localVarRequestOptions.data = localVarFormParams;
  3253. return {
  3254. url: toPathString(localVarUrlObj),
  3255. options: localVarRequestOptions,
  3256. };
  3257. },
  3258. /**
  3259. *
  3260. * @param {CreateUserDto} createUserDto
  3261. * @param {*} [options] Override http request option.
  3262. * @throws {RequiredError}
  3263. */
  3264. createUser: async (createUserDto: CreateUserDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3265. // verify required parameter 'createUserDto' is not null or undefined
  3266. assertParamExists('createUser', 'createUserDto', createUserDto)
  3267. const localVarPath = `/user`;
  3268. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3269. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3270. let baseOptions;
  3271. if (configuration) {
  3272. baseOptions = configuration.baseOptions;
  3273. }
  3274. const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
  3275. const localVarHeaderParameter = {} as any;
  3276. const localVarQueryParameter = {} as any;
  3277. // authentication bearer required
  3278. // http bearer authentication required
  3279. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  3280. localVarHeaderParameter['Content-Type'] = 'application/json';
  3281. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3282. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3283. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3284. localVarRequestOptions.data = serializeDataIfNeeded(createUserDto, localVarRequestOptions, configuration)
  3285. return {
  3286. url: toPathString(localVarUrlObj),
  3287. options: localVarRequestOptions,
  3288. };
  3289. },
  3290. /**
  3291. *
  3292. * @param {boolean} isAll
  3293. * @param {*} [options] Override http request option.
  3294. * @throws {RequiredError}
  3295. */
  3296. getAllUsers: async (isAll: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3297. // verify required parameter 'isAll' is not null or undefined
  3298. assertParamExists('getAllUsers', 'isAll', isAll)
  3299. const localVarPath = `/user`;
  3300. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3301. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3302. let baseOptions;
  3303. if (configuration) {
  3304. baseOptions = configuration.baseOptions;
  3305. }
  3306. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3307. const localVarHeaderParameter = {} as any;
  3308. const localVarQueryParameter = {} as any;
  3309. // authentication bearer required
  3310. // http bearer authentication required
  3311. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  3312. if (isAll !== undefined) {
  3313. localVarQueryParameter['isAll'] = isAll;
  3314. }
  3315. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3316. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3317. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3318. return {
  3319. url: toPathString(localVarUrlObj),
  3320. options: localVarRequestOptions,
  3321. };
  3322. },
  3323. /**
  3324. *
  3325. * @param {*} [options] Override http request option.
  3326. * @throws {RequiredError}
  3327. */
  3328. getMyUserInfo: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3329. const localVarPath = `/user/me`;
  3330. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3331. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3332. let baseOptions;
  3333. if (configuration) {
  3334. baseOptions = configuration.baseOptions;
  3335. }
  3336. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3337. const localVarHeaderParameter = {} as any;
  3338. const localVarQueryParameter = {} as any;
  3339. // authentication bearer required
  3340. // http bearer authentication required
  3341. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  3342. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3343. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3344. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3345. return {
  3346. url: toPathString(localVarUrlObj),
  3347. options: localVarRequestOptions,
  3348. };
  3349. },
  3350. /**
  3351. *
  3352. * @param {string} userId
  3353. * @param {*} [options] Override http request option.
  3354. * @throws {RequiredError}
  3355. */
  3356. getProfileImage: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3357. // verify required parameter 'userId' is not null or undefined
  3358. assertParamExists('getProfileImage', 'userId', userId)
  3359. const localVarPath = `/user/profile-image/{userId}`
  3360. .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
  3361. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3362. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3363. let baseOptions;
  3364. if (configuration) {
  3365. baseOptions = configuration.baseOptions;
  3366. }
  3367. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3368. const localVarHeaderParameter = {} as any;
  3369. const localVarQueryParameter = {} as any;
  3370. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3371. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3372. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3373. return {
  3374. url: toPathString(localVarUrlObj),
  3375. options: localVarRequestOptions,
  3376. };
  3377. },
  3378. /**
  3379. *
  3380. * @param {string} userId
  3381. * @param {*} [options] Override http request option.
  3382. * @throws {RequiredError}
  3383. */
  3384. getUserById: async (userId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3385. // verify required parameter 'userId' is not null or undefined
  3386. assertParamExists('getUserById', 'userId', userId)
  3387. const localVarPath = `/user/info/{userId}`
  3388. .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
  3389. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3390. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3391. let baseOptions;
  3392. if (configuration) {
  3393. baseOptions = configuration.baseOptions;
  3394. }
  3395. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3396. const localVarHeaderParameter = {} as any;
  3397. const localVarQueryParameter = {} as any;
  3398. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3399. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3400. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3401. return {
  3402. url: toPathString(localVarUrlObj),
  3403. options: localVarRequestOptions,
  3404. };
  3405. },
  3406. /**
  3407. *
  3408. * @param {*} [options] Override http request option.
  3409. * @throws {RequiredError}
  3410. */
  3411. getUserCount: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3412. const localVarPath = `/user/count`;
  3413. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3414. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3415. let baseOptions;
  3416. if (configuration) {
  3417. baseOptions = configuration.baseOptions;
  3418. }
  3419. const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
  3420. const localVarHeaderParameter = {} as any;
  3421. const localVarQueryParameter = {} as any;
  3422. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3423. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3424. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3425. return {
  3426. url: toPathString(localVarUrlObj),
  3427. options: localVarRequestOptions,
  3428. };
  3429. },
  3430. /**
  3431. *
  3432. * @param {UpdateUserDto} updateUserDto
  3433. * @param {*} [options] Override http request option.
  3434. * @throws {RequiredError}
  3435. */
  3436. updateUser: async (updateUserDto: UpdateUserDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
  3437. // verify required parameter 'updateUserDto' is not null or undefined
  3438. assertParamExists('updateUser', 'updateUserDto', updateUserDto)
  3439. const localVarPath = `/user`;
  3440. // use dummy base URL string because the URL constructor only accepts absolute URLs.
  3441. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
  3442. let baseOptions;
  3443. if (configuration) {
  3444. baseOptions = configuration.baseOptions;
  3445. }
  3446. const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
  3447. const localVarHeaderParameter = {} as any;
  3448. const localVarQueryParameter = {} as any;
  3449. // authentication bearer required
  3450. // http bearer authentication required
  3451. await setBearerAuthToObject(localVarHeaderParameter, configuration)
  3452. localVarHeaderParameter['Content-Type'] = 'application/json';
  3453. setSearchParams(localVarUrlObj, localVarQueryParameter);
  3454. let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
  3455. localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
  3456. localVarRequestOptions.data = serializeDataIfNeeded(updateUserDto, localVarRequestOptions, configuration)
  3457. return {
  3458. url: toPathString(localVarUrlObj),
  3459. options: localVarRequestOptions,
  3460. };
  3461. },
  3462. }
  3463. };
  3464. /**
  3465. * UserApi - functional programming interface
  3466. * @export
  3467. */
  3468. export const UserApiFp = function(configuration?: Configuration) {
  3469. const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration)
  3470. return {
  3471. /**
  3472. *
  3473. * @param {any} file
  3474. * @param {*} [options] Override http request option.
  3475. * @throws {RequiredError}
  3476. */
  3477. async createProfileImage(file: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateProfileImageResponseDto>> {
  3478. const localVarAxiosArgs = await localVarAxiosParamCreator.createProfileImage(file, options);
  3479. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3480. },
  3481. /**
  3482. *
  3483. * @param {CreateUserDto} createUserDto
  3484. * @param {*} [options] Override http request option.
  3485. * @throws {RequiredError}
  3486. */
  3487. async createUser(createUserDto: CreateUserDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
  3488. const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(createUserDto, options);
  3489. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3490. },
  3491. /**
  3492. *
  3493. * @param {boolean} isAll
  3494. * @param {*} [options] Override http request option.
  3495. * @throws {RequiredError}
  3496. */
  3497. async getAllUsers(isAll: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserResponseDto>>> {
  3498. const localVarAxiosArgs = await localVarAxiosParamCreator.getAllUsers(isAll, options);
  3499. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3500. },
  3501. /**
  3502. *
  3503. * @param {*} [options] Override http request option.
  3504. * @throws {RequiredError}
  3505. */
  3506. async getMyUserInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
  3507. const localVarAxiosArgs = await localVarAxiosParamCreator.getMyUserInfo(options);
  3508. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3509. },
  3510. /**
  3511. *
  3512. * @param {string} userId
  3513. * @param {*} [options] Override http request option.
  3514. * @throws {RequiredError}
  3515. */
  3516. async getProfileImage(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
  3517. const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileImage(userId, options);
  3518. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3519. },
  3520. /**
  3521. *
  3522. * @param {string} userId
  3523. * @param {*} [options] Override http request option.
  3524. * @throws {RequiredError}
  3525. */
  3526. async getUserById(userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
  3527. const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(userId, options);
  3528. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3529. },
  3530. /**
  3531. *
  3532. * @param {*} [options] Override http request option.
  3533. * @throws {RequiredError}
  3534. */
  3535. async getUserCount(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserCountResponseDto>> {
  3536. const localVarAxiosArgs = await localVarAxiosParamCreator.getUserCount(options);
  3537. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3538. },
  3539. /**
  3540. *
  3541. * @param {UpdateUserDto} updateUserDto
  3542. * @param {*} [options] Override http request option.
  3543. * @throws {RequiredError}
  3544. */
  3545. async updateUser(updateUserDto: UpdateUserDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponseDto>> {
  3546. const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(updateUserDto, options);
  3547. return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
  3548. },
  3549. }
  3550. };
  3551. /**
  3552. * UserApi - factory interface
  3553. * @export
  3554. */
  3555. export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
  3556. const localVarFp = UserApiFp(configuration)
  3557. return {
  3558. /**
  3559. *
  3560. * @param {any} file
  3561. * @param {*} [options] Override http request option.
  3562. * @throws {RequiredError}
  3563. */
  3564. createProfileImage(file: any, options?: any): AxiosPromise<CreateProfileImageResponseDto> {
  3565. return localVarFp.createProfileImage(file, options).then((request) => request(axios, basePath));
  3566. },
  3567. /**
  3568. *
  3569. * @param {CreateUserDto} createUserDto
  3570. * @param {*} [options] Override http request option.
  3571. * @throws {RequiredError}
  3572. */
  3573. createUser(createUserDto: CreateUserDto, options?: any): AxiosPromise<UserResponseDto> {
  3574. return localVarFp.createUser(createUserDto, options).then((request) => request(axios, basePath));
  3575. },
  3576. /**
  3577. *
  3578. * @param {boolean} isAll
  3579. * @param {*} [options] Override http request option.
  3580. * @throws {RequiredError}
  3581. */
  3582. getAllUsers(isAll: boolean, options?: any): AxiosPromise<Array<UserResponseDto>> {
  3583. return localVarFp.getAllUsers(isAll, options).then((request) => request(axios, basePath));
  3584. },
  3585. /**
  3586. *
  3587. * @param {*} [options] Override http request option.
  3588. * @throws {RequiredError}
  3589. */
  3590. getMyUserInfo(options?: any): AxiosPromise<UserResponseDto> {
  3591. return localVarFp.getMyUserInfo(options).then((request) => request(axios, basePath));
  3592. },
  3593. /**
  3594. *
  3595. * @param {string} userId
  3596. * @param {*} [options] Override http request option.
  3597. * @throws {RequiredError}
  3598. */
  3599. getProfileImage(userId: string, options?: any): AxiosPromise<object> {
  3600. return localVarFp.getProfileImage(userId, options).then((request) => request(axios, basePath));
  3601. },
  3602. /**
  3603. *
  3604. * @param {string} userId
  3605. * @param {*} [options] Override http request option.
  3606. * @throws {RequiredError}
  3607. */
  3608. getUserById(userId: string, options?: any): AxiosPromise<UserResponseDto> {
  3609. return localVarFp.getUserById(userId, options).then((request) => request(axios, basePath));
  3610. },
  3611. /**
  3612. *
  3613. * @param {*} [options] Override http request option.
  3614. * @throws {RequiredError}
  3615. */
  3616. getUserCount(options?: any): AxiosPromise<UserCountResponseDto> {
  3617. return localVarFp.getUserCount(options).then((request) => request(axios, basePath));
  3618. },
  3619. /**
  3620. *
  3621. * @param {UpdateUserDto} updateUserDto
  3622. * @param {*} [options] Override http request option.
  3623. * @throws {RequiredError}
  3624. */
  3625. updateUser(updateUserDto: UpdateUserDto, options?: any): AxiosPromise<UserResponseDto> {
  3626. return localVarFp.updateUser(updateUserDto, options).then((request) => request(axios, basePath));
  3627. },
  3628. };
  3629. };
  3630. /**
  3631. * UserApi - object-oriented interface
  3632. * @export
  3633. * @class UserApi
  3634. * @extends {BaseAPI}
  3635. */
  3636. export class UserApi extends BaseAPI {
  3637. /**
  3638. *
  3639. * @param {any} file
  3640. * @param {*} [options] Override http request option.
  3641. * @throws {RequiredError}
  3642. * @memberof UserApi
  3643. */
  3644. public createProfileImage(file: any, options?: AxiosRequestConfig) {
  3645. return UserApiFp(this.configuration).createProfileImage(file, options).then((request) => request(this.axios, this.basePath));
  3646. }
  3647. /**
  3648. *
  3649. * @param {CreateUserDto} createUserDto
  3650. * @param {*} [options] Override http request option.
  3651. * @throws {RequiredError}
  3652. * @memberof UserApi
  3653. */
  3654. public createUser(createUserDto: CreateUserDto, options?: AxiosRequestConfig) {
  3655. return UserApiFp(this.configuration).createUser(createUserDto, options).then((request) => request(this.axios, this.basePath));
  3656. }
  3657. /**
  3658. *
  3659. * @param {boolean} isAll
  3660. * @param {*} [options] Override http request option.
  3661. * @throws {RequiredError}
  3662. * @memberof UserApi
  3663. */
  3664. public getAllUsers(isAll: boolean, options?: AxiosRequestConfig) {
  3665. return UserApiFp(this.configuration).getAllUsers(isAll, options).then((request) => request(this.axios, this.basePath));
  3666. }
  3667. /**
  3668. *
  3669. * @param {*} [options] Override http request option.
  3670. * @throws {RequiredError}
  3671. * @memberof UserApi
  3672. */
  3673. public getMyUserInfo(options?: AxiosRequestConfig) {
  3674. return UserApiFp(this.configuration).getMyUserInfo(options).then((request) => request(this.axios, this.basePath));
  3675. }
  3676. /**
  3677. *
  3678. * @param {string} userId
  3679. * @param {*} [options] Override http request option.
  3680. * @throws {RequiredError}
  3681. * @memberof UserApi
  3682. */
  3683. public getProfileImage(userId: string, options?: AxiosRequestConfig) {
  3684. return UserApiFp(this.configuration).getProfileImage(userId, options).then((request) => request(this.axios, this.basePath));
  3685. }
  3686. /**
  3687. *
  3688. * @param {string} userId
  3689. * @param {*} [options] Override http request option.
  3690. * @throws {RequiredError}
  3691. * @memberof UserApi
  3692. */
  3693. public getUserById(userId: string, options?: AxiosRequestConfig) {
  3694. return UserApiFp(this.configuration).getUserById(userId, options).then((request) => request(this.axios, this.basePath));
  3695. }
  3696. /**
  3697. *
  3698. * @param {*} [options] Override http request option.
  3699. * @throws {RequiredError}
  3700. * @memberof UserApi
  3701. */
  3702. public getUserCount(options?: AxiosRequestConfig) {
  3703. return UserApiFp(this.configuration).getUserCount(options).then((request) => request(this.axios, this.basePath));
  3704. }
  3705. /**
  3706. *
  3707. * @param {UpdateUserDto} updateUserDto
  3708. * @param {*} [options] Override http request option.
  3709. * @throws {RequiredError}
  3710. * @memberof UserApi
  3711. */
  3712. public updateUser(updateUserDto: UpdateUserDto, options?: AxiosRequestConfig) {
  3713. return UserApiFp(this.configuration).updateUser(updateUserDto, options).then((request) => request(this.axios, this.basePath));
  3714. }
  3715. }