BackendScriptApi.html 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: BackendScriptApi</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: BackendScriptApi</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>BackendScriptApi</h2>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <dl class="details">
  24. <dt class="tag-source">Source:</dt>
  25. <dd class="tag-source"><ul class="dummy"><li>
  26. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line24">line 24</a>
  27. </li></ul></dd>
  28. </dl>
  29. </div>
  30. <h3 class="subsection-title">Members</h3>
  31. <h4 class="name" id="axios"><span class="type-signature"></span>axios<span class="type-signature"></span></h4>
  32. <h5 class="subsection-title">Properties:</h5>
  33. <table class="props">
  34. <thead>
  35. <tr>
  36. <th>Name</th>
  37. <th>Type</th>
  38. <th class="last">Description</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr>
  43. <td class="name"><code>Axios</code></td>
  44. <td class="type">
  45. <span class="param-type">axios</span>
  46. </td>
  47. <td class="description last">library for HTTP requests. See https://axios-http.com/ for documentation</td>
  48. </tr>
  49. </tbody>
  50. </table>
  51. <dl class="details">
  52. <dt class="tag-source">Source:</dt>
  53. <dd class="tag-source"><ul class="dummy"><li>
  54. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line37">line 37</a>
  55. </li></ul></dd>
  56. </dl>
  57. <h4 class="name" id="currentNote"><span class="type-signature"></span>currentNote<span class="type-signature"></span></h4>
  58. <h5 class="subsection-title">Properties:</h5>
  59. <table class="props">
  60. <thead>
  61. <tr>
  62. <th>Name</th>
  63. <th>Type</th>
  64. <th class="last">Description</th>
  65. </tr>
  66. </thead>
  67. <tbody>
  68. <tr>
  69. <td class="name"><code>note</code></td>
  70. <td class="type">
  71. <span class="param-type"><a href="Note.html">Note</a></span>
  72. </td>
  73. <td class="description last">where script is currently executing. Don't mix this up with concept of active note</td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. <dl class="details">
  78. <dt class="tag-source">Source:</dt>
  79. <dd class="tag-source"><ul class="dummy"><li>
  80. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line28">line 28</a>
  81. </li></ul></dd>
  82. </dl>
  83. <h4 class="name" id="dayjs"><span class="type-signature"></span>dayjs<span class="type-signature"></span></h4>
  84. <h5 class="subsection-title">Properties:</h5>
  85. <table class="props">
  86. <thead>
  87. <tr>
  88. <th>Name</th>
  89. <th>Type</th>
  90. <th class="last">Description</th>
  91. </tr>
  92. </thead>
  93. <tbody>
  94. <tr>
  95. <td class="name"><code>day.js</code></td>
  96. <td class="type">
  97. <span class="param-type">dayjs</span>
  98. </td>
  99. <td class="description last">library for date manipulation. See https://day.js.org/ for documentation</td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <dl class="details">
  104. <dt class="tag-source">Source:</dt>
  105. <dd class="tag-source"><ul class="dummy"><li>
  106. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line39">line 39</a>
  107. </li></ul></dd>
  108. </dl>
  109. <h4 class="name" id="originEntity"><span class="type-signature"></span>originEntity<span class="type-signature"></span></h4>
  110. <h5 class="subsection-title">Properties:</h5>
  111. <table class="props">
  112. <thead>
  113. <tr>
  114. <th>Name</th>
  115. <th>Type</th>
  116. <th class="last">Description</th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <tr>
  121. <td class="name"><code>entity</code></td>
  122. <td class="type">
  123. <span class="param-type">Entity</span>
  124. </td>
  125. <td class="description last">whose event triggered this executions</td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. <dl class="details">
  130. <dt class="tag-source">Source:</dt>
  131. <dd class="tag-source"><ul class="dummy"><li>
  132. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line30">line 30</a>
  133. </li></ul></dd>
  134. </dl>
  135. <h4 class="name" id="sql"><span class="type-signature"></span>sql<span class="type-signature"></span></h4>
  136. <h5 class="subsection-title">Properties:</h5>
  137. <table class="props">
  138. <thead>
  139. <tr>
  140. <th>Name</th>
  141. <th>Type</th>
  142. <th class="last">Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td class="name"><code>sql</code></td>
  148. <td class="type">
  149. <span class="param-type"><a href="module-sql.html">module:sql</a></span>
  150. </td>
  151. <td class="description last"></td>
  152. </tr>
  153. </tbody>
  154. </table>
  155. <dl class="details">
  156. <dt class="tag-source">Source:</dt>
  157. <dd class="tag-source"><ul class="dummy"><li>
  158. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line407">line 407</a>
  159. </li></ul></dd>
  160. </dl>
  161. <h4 class="name" id="startNote"><span class="type-signature"></span>startNote<span class="type-signature"></span></h4>
  162. <h5 class="subsection-title">Properties:</h5>
  163. <table class="props">
  164. <thead>
  165. <tr>
  166. <th>Name</th>
  167. <th>Type</th>
  168. <th class="last">Description</th>
  169. </tr>
  170. </thead>
  171. <tbody>
  172. <tr>
  173. <td class="name"><code>note</code></td>
  174. <td class="type">
  175. <span class="param-type"><a href="Note.html">Note</a></span>
  176. </td>
  177. <td class="description last">where script started executing</td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <dl class="details">
  182. <dt class="tag-source">Source:</dt>
  183. <dd class="tag-source"><ul class="dummy"><li>
  184. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line26">line 26</a>
  185. </li></ul></dd>
  186. </dl>
  187. <h4 class="name" id="xml2js"><span class="type-signature"></span>xml2js<span class="type-signature"></span></h4>
  188. <h5 class="subsection-title">Properties:</h5>
  189. <table class="props">
  190. <thead>
  191. <tr>
  192. <th>Name</th>
  193. <th>Type</th>
  194. <th class="last">Description</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td class="name"><code>xml2js</code></td>
  200. <td class="type">
  201. <span class="param-type">axios</span>
  202. </td>
  203. <td class="description last">library for XML parsing. See https://github.com/Leonidas-from-XIV/node-xml2js for documentation</td>
  204. </tr>
  205. </tbody>
  206. </table>
  207. <dl class="details">
  208. <dt class="tag-source">Source:</dt>
  209. <dd class="tag-source"><ul class="dummy"><li>
  210. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line41">line 41</a>
  211. </li></ul></dd>
  212. </dl>
  213. <h3 class="subsection-title">Methods</h3>
  214. <h4 class="name" id="createDataNote"><span class="type-signature"></span>createDataNote<span class="signature">(parentNoteId, title, content)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  215. <div class="description">
  216. Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
  217. JSON MIME type. See also createNewNote() for more options.
  218. </div>
  219. <h5>Parameters:</h5>
  220. <table class="params">
  221. <thead>
  222. <tr>
  223. <th>Name</th>
  224. <th>Type</th>
  225. <th class="last">Description</th>
  226. </tr>
  227. </thead>
  228. <tbody>
  229. <tr>
  230. <td class="name"><code>parentNoteId</code></td>
  231. <td class="type">
  232. <span class="param-type">string</span>
  233. </td>
  234. <td class="description last"></td>
  235. </tr>
  236. <tr>
  237. <td class="name"><code>title</code></td>
  238. <td class="type">
  239. <span class="param-type">string</span>
  240. </td>
  241. <td class="description last"></td>
  242. </tr>
  243. <tr>
  244. <td class="name"><code>content</code></td>
  245. <td class="type">
  246. <span class="param-type">object</span>
  247. </td>
  248. <td class="description last"></td>
  249. </tr>
  250. </tbody>
  251. </table>
  252. <dl class="details">
  253. <dt class="tag-source">Source:</dt>
  254. <dd class="tag-source"><ul class="dummy"><li>
  255. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line200">line 200</a>
  256. </li></ul></dd>
  257. </dl>
  258. <h5>Returns:</h5>
  259. <div class="param-desc">
  260. object having "note" and "branch" keys representing respective objects
  261. </div>
  262. <dl>
  263. <dt>
  264. Type
  265. </dt>
  266. <dd>
  267. <span class="param-type">Object</span>
  268. </dd>
  269. </dl>
  270. <h4 class="name" id="createNewNote"><span class="type-signature"></span>createNewNote<span class="signature">(params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  271. <h5>Parameters:</h5>
  272. <table class="params">
  273. <thead>
  274. <tr>
  275. <th>Name</th>
  276. <th>Type</th>
  277. <th>Attributes</th>
  278. <th class="last">Description</th>
  279. </tr>
  280. </thead>
  281. <tbody>
  282. <tr>
  283. <td class="name"><code>params</code></td>
  284. <td class="type">
  285. <span class="param-type"><a href="global.html#CreateNewNoteParams">CreateNewNoteParams</a></span>
  286. </td>
  287. <td class="attributes">
  288. &lt;optional><br>
  289. </td>
  290. <td class="description last"></td>
  291. </tr>
  292. </tbody>
  293. </table>
  294. <dl class="details">
  295. <dt class="tag-source">Source:</dt>
  296. <dd class="tag-source"><ul class="dummy"><li>
  297. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line227">line 227</a>
  298. </li></ul></dd>
  299. </dl>
  300. <h5>Returns:</h5>
  301. <div class="param-desc">
  302. object contains newly created entities note and branch
  303. </div>
  304. <dl>
  305. <dt>
  306. Type
  307. </dt>
  308. <dd>
  309. <span class="param-type">Object</span>
  310. </dd>
  311. </dl>
  312. <h4 class="name" id="createNote"><span class="type-signature"></span>createNote<span class="signature">(parentNoteId, title, content<span class="signature-attributes">opt</span>, extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  313. <h5>Parameters:</h5>
  314. <table class="params">
  315. <thead>
  316. <tr>
  317. <th>Name</th>
  318. <th>Type</th>
  319. <th>Attributes</th>
  320. <th>Default</th>
  321. <th class="last">Description</th>
  322. </tr>
  323. </thead>
  324. <tbody>
  325. <tr>
  326. <td class="name"><code>parentNoteId</code></td>
  327. <td class="type">
  328. <span class="param-type">string</span>
  329. </td>
  330. <td class="attributes">
  331. </td>
  332. <td class="default">
  333. </td>
  334. <td class="description last">create new note under this parent</td>
  335. </tr>
  336. <tr>
  337. <td class="name"><code>title</code></td>
  338. <td class="type">
  339. <span class="param-type">string</span>
  340. </td>
  341. <td class="attributes">
  342. </td>
  343. <td class="default">
  344. </td>
  345. <td class="description last"></td>
  346. </tr>
  347. <tr>
  348. <td class="name"><code>content</code></td>
  349. <td class="type">
  350. <span class="param-type">string</span>
  351. </td>
  352. <td class="attributes">
  353. &lt;optional><br>
  354. </td>
  355. <td class="default">
  356. ""
  357. </td>
  358. <td class="description last"></td>
  359. </tr>
  360. <tr>
  361. <td class="name"><code>extraOptions</code></td>
  362. <td class="type">
  363. <span class="param-type"><a href="global.html#CreateNoteExtraOptions">CreateNoteExtraOptions</a></span>
  364. </td>
  365. <td class="attributes">
  366. &lt;optional><br>
  367. </td>
  368. <td class="default">
  369. {}
  370. </td>
  371. <td class="description last"></td>
  372. </tr>
  373. </tbody>
  374. </table>
  375. <dl class="details">
  376. <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs</li></ul></dd>
  377. <dt class="tag-source">Source:</dt>
  378. <dd class="tag-source"><ul class="dummy"><li>
  379. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line255">line 255</a>
  380. </li></ul></dd>
  381. </dl>
  382. <h5>Returns:</h5>
  383. <div class="param-desc">
  384. object contains newly created entities note and branch
  385. </div>
  386. <dl>
  387. <dt>
  388. Type
  389. </dt>
  390. <dd>
  391. <span class="param-type">Object</span>
  392. </dd>
  393. </dl>
  394. <h4 class="name" id="createTextNote"><span class="type-signature"></span>createTextNote<span class="signature">(parentNoteId, title, content)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  395. <div class="description">
  396. Create text note. See also createNewNote() for more options.
  397. </div>
  398. <h5>Parameters:</h5>
  399. <table class="params">
  400. <thead>
  401. <tr>
  402. <th>Name</th>
  403. <th>Type</th>
  404. <th class="last">Description</th>
  405. </tr>
  406. </thead>
  407. <tbody>
  408. <tr>
  409. <td class="name"><code>parentNoteId</code></td>
  410. <td class="type">
  411. <span class="param-type">string</span>
  412. </td>
  413. <td class="description last"></td>
  414. </tr>
  415. <tr>
  416. <td class="name"><code>title</code></td>
  417. <td class="type">
  418. <span class="param-type">string</span>
  419. </td>
  420. <td class="description last"></td>
  421. </tr>
  422. <tr>
  423. <td class="name"><code>content</code></td>
  424. <td class="type">
  425. <span class="param-type">string</span>
  426. </td>
  427. <td class="description last"></td>
  428. </tr>
  429. </tbody>
  430. </table>
  431. <dl class="details">
  432. <dt class="tag-source">Source:</dt>
  433. <dd class="tag-source"><ul class="dummy"><li>
  434. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line184">line 184</a>
  435. </li></ul></dd>
  436. </dl>
  437. <h5>Returns:</h5>
  438. <div class="param-desc">
  439. - object having "note" and "branch" keys representing respective objects
  440. </div>
  441. <dl>
  442. <dt>
  443. Type
  444. </dt>
  445. <dd>
  446. <span class="param-type">Object</span>
  447. </dd>
  448. </dl>
  449. <h4 class="name" id="ensureNoteIsAbsentFromParent"><span class="type-signature"></span>ensureNoteIsAbsentFromParent<span class="signature">(noteId, parentNoteId)</span><span class="type-signature"> &rarr; {void}</span></h4>
  450. <div class="description">
  451. If there's a branch between note and parent note, remove it. Otherwise do nothing.
  452. </div>
  453. <h5>Parameters:</h5>
  454. <table class="params">
  455. <thead>
  456. <tr>
  457. <th>Name</th>
  458. <th>Type</th>
  459. <th class="last">Description</th>
  460. </tr>
  461. </thead>
  462. <tbody>
  463. <tr>
  464. <td class="name"><code>noteId</code></td>
  465. <td class="type">
  466. <span class="param-type">string</span>
  467. </td>
  468. <td class="description last"></td>
  469. </tr>
  470. <tr>
  471. <td class="name"><code>parentNoteId</code></td>
  472. <td class="type">
  473. <span class="param-type">string</span>
  474. </td>
  475. <td class="description last"></td>
  476. </tr>
  477. </tbody>
  478. </table>
  479. <dl class="details">
  480. <dt class="tag-source">Source:</dt>
  481. <dd class="tag-source"><ul class="dummy"><li>
  482. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line155">line 155</a>
  483. </li></ul></dd>
  484. </dl>
  485. <h5>Returns:</h5>
  486. <dl>
  487. <dt>
  488. Type
  489. </dt>
  490. <dd>
  491. <span class="param-type">void</span>
  492. </dd>
  493. </dl>
  494. <h4 class="name" id="ensureNoteIsPresentInParent"><span class="type-signature"></span>ensureNoteIsPresentInParent<span class="signature">(noteId, parentNoteId, prefix)</span><span class="type-signature"> &rarr; {void}</span></h4>
  495. <div class="description">
  496. If there's no branch between note and parent note, create one. Otherwise do nothing.
  497. </div>
  498. <h5>Parameters:</h5>
  499. <table class="params">
  500. <thead>
  501. <tr>
  502. <th>Name</th>
  503. <th>Type</th>
  504. <th class="last">Description</th>
  505. </tr>
  506. </thead>
  507. <tbody>
  508. <tr>
  509. <td class="name"><code>noteId</code></td>
  510. <td class="type">
  511. <span class="param-type">string</span>
  512. </td>
  513. <td class="description last"></td>
  514. </tr>
  515. <tr>
  516. <td class="name"><code>parentNoteId</code></td>
  517. <td class="type">
  518. <span class="param-type">string</span>
  519. </td>
  520. <td class="description last"></td>
  521. </tr>
  522. <tr>
  523. <td class="name"><code>prefix</code></td>
  524. <td class="type">
  525. <span class="param-type">string</span>
  526. </td>
  527. <td class="description last">if branch will be create between note and parent note, set this prefix</td>
  528. </tr>
  529. </tbody>
  530. </table>
  531. <dl class="details">
  532. <dt class="tag-source">Source:</dt>
  533. <dd class="tag-source"><ul class="dummy"><li>
  534. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line145">line 145</a>
  535. </li></ul></dd>
  536. </dl>
  537. <h5>Returns:</h5>
  538. <dl>
  539. <dt>
  540. Type
  541. </dt>
  542. <dd>
  543. <span class="param-type">void</span>
  544. </dd>
  545. </dl>
  546. <h4 class="name" id="escapeHtml"><span class="type-signature"></span>escapeHtml<span class="signature">(string)</span><span class="type-signature"> &rarr; {string}</span></h4>
  547. <h5>Parameters:</h5>
  548. <table class="params">
  549. <thead>
  550. <tr>
  551. <th>Name</th>
  552. <th>Type</th>
  553. <th class="last">Description</th>
  554. </tr>
  555. </thead>
  556. <tbody>
  557. <tr>
  558. <td class="name"><code>string</code></td>
  559. <td class="type">
  560. <span class="param-type">string</span>
  561. </td>
  562. <td class="description last">to escape</td>
  563. </tr>
  564. </tbody>
  565. </table>
  566. <dl class="details">
  567. <dt class="tag-source">Source:</dt>
  568. <dd class="tag-source"><ul class="dummy"><li>
  569. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line395">line 395</a>
  570. </li></ul></dd>
  571. </dl>
  572. <h5>Returns:</h5>
  573. <div class="param-desc">
  574. escaped string
  575. </div>
  576. <dl>
  577. <dt>
  578. Type
  579. </dt>
  580. <dd>
  581. <span class="param-type">string</span>
  582. </dd>
  583. </dl>
  584. <h4 class="name" id="getAppInfo"><span class="type-signature"></span>getAppInfo<span class="signature">()</span><span class="type-signature"> &rarr; {Object|*}</span></h4>
  585. <dl class="details">
  586. <dt class="tag-source">Source:</dt>
  587. <dd class="tag-source"><ul class="dummy"><li>
  588. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line418">line 418</a>
  589. </li></ul></dd>
  590. </dl>
  591. <h5>Returns:</h5>
  592. <div class="param-desc">
  593. - object representing basic info about running Trilium version
  594. </div>
  595. <dl>
  596. <dt>
  597. Type
  598. </dt>
  599. <dd>
  600. <span class="param-type">Object</span>
  601. |
  602. <span class="param-type">*</span>
  603. </dd>
  604. </dl>
  605. <h4 class="name" id="getAttribute"><span class="type-signature"></span>getAttribute<span class="signature">(attributeId)</span><span class="type-signature"> &rarr; {<a href="Attribute.html">Attribute</a>|null}</span></h4>
  606. <h5>Parameters:</h5>
  607. <table class="params">
  608. <thead>
  609. <tr>
  610. <th>Name</th>
  611. <th>Type</th>
  612. <th class="last">Description</th>
  613. </tr>
  614. </thead>
  615. <tbody>
  616. <tr>
  617. <td class="name"><code>attributeId</code></td>
  618. <td class="type">
  619. <span class="param-type">string</span>
  620. </td>
  621. <td class="description last"></td>
  622. </tr>
  623. </tbody>
  624. </table>
  625. <dl class="details">
  626. <dt class="tag-source">Source:</dt>
  627. <dd class="tag-source"><ul class="dummy"><li>
  628. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line75">line 75</a>
  629. </li></ul></dd>
  630. </dl>
  631. <h5>Returns:</h5>
  632. <dl>
  633. <dt>
  634. Type
  635. </dt>
  636. <dd>
  637. <span class="param-type"><a href="Attribute.html">Attribute</a></span>
  638. |
  639. <span class="param-type">null</span>
  640. </dd>
  641. </dl>
  642. <h4 class="name" id="getBranch"><span class="type-signature"></span>getBranch<span class="signature">(branchId)</span><span class="type-signature"> &rarr; {<a href="Branch.html">Branch</a>|null}</span></h4>
  643. <h5>Parameters:</h5>
  644. <table class="params">
  645. <thead>
  646. <tr>
  647. <th>Name</th>
  648. <th>Type</th>
  649. <th class="last">Description</th>
  650. </tr>
  651. </thead>
  652. <tbody>
  653. <tr>
  654. <td class="name"><code>branchId</code></td>
  655. <td class="type">
  656. <span class="param-type">string</span>
  657. </td>
  658. <td class="description last"></td>
  659. </tr>
  660. </tbody>
  661. </table>
  662. <dl class="details">
  663. <dt class="tag-source">Source:</dt>
  664. <dd class="tag-source"><ul class="dummy"><li>
  665. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line68">line 68</a>
  666. </li></ul></dd>
  667. </dl>
  668. <h5>Returns:</h5>
  669. <dl>
  670. <dt>
  671. Type
  672. </dt>
  673. <dd>
  674. <span class="param-type"><a href="Branch.html">Branch</a></span>
  675. |
  676. <span class="param-type">null</span>
  677. </dd>
  678. </dl>
  679. <h4 class="name" id="getDateNote"><span class="type-signature"></span>getDateNote<span class="signature">(date)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  680. <div class="description">
  681. Returns day note for given date. If such note doesn't exist, it is created.
  682. </div>
  683. <h5>Parameters:</h5>
  684. <table class="params">
  685. <thead>
  686. <tr>
  687. <th>Name</th>
  688. <th>Type</th>
  689. <th class="last">Description</th>
  690. </tr>
  691. </thead>
  692. <tbody>
  693. <tr>
  694. <td class="name"><code>date</code></td>
  695. <td class="type">
  696. <span class="param-type">string</span>
  697. </td>
  698. <td class="description last">in YYYY-MM-DD format</td>
  699. </tr>
  700. </tbody>
  701. </table>
  702. <dl class="details">
  703. <dt class="tag-source">Source:</dt>
  704. <dd class="tag-source"><ul class="dummy"><li>
  705. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line313">line 313</a>
  706. </li></ul></dd>
  707. </dl>
  708. <h5>Returns:</h5>
  709. <dl>
  710. <dt>
  711. Type
  712. </dt>
  713. <dd>
  714. <span class="param-type"><a href="Note.html">Note</a></span>
  715. |
  716. <span class="param-type">null</span>
  717. </dd>
  718. </dl>
  719. <h4 class="name" id="getInstanceName"><span class="type-signature"></span>getInstanceName<span class="signature">()</span><span class="type-signature"> &rarr; {string|null}</span></h4>
  720. <div class="description">
  721. Instance name identifies particular Trilium instance. It can be useful for scripts
  722. if some action needs to happen on only one specific instance.
  723. </div>
  724. <dl class="details">
  725. <dt class="tag-source">Source:</dt>
  726. <dd class="tag-source"><ul class="dummy"><li>
  727. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line54">line 54</a>
  728. </li></ul></dd>
  729. </dl>
  730. <h5>Returns:</h5>
  731. <dl>
  732. <dt>
  733. Type
  734. </dt>
  735. <dd>
  736. <span class="param-type">string</span>
  737. |
  738. <span class="param-type">null</span>
  739. </dd>
  740. </dl>
  741. <h4 class="name" id="getMonthNote"><span class="type-signature"></span>getMonthNote<span class="signature">(date)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  742. <div class="description">
  743. Returns month note for given date. If such note doesn't exist, it is created.
  744. </div>
  745. <h5>Parameters:</h5>
  746. <table class="params">
  747. <thead>
  748. <tr>
  749. <th>Name</th>
  750. <th>Type</th>
  751. <th class="last">Description</th>
  752. </tr>
  753. </thead>
  754. <tbody>
  755. <tr>
  756. <td class="name"><code>date</code></td>
  757. <td class="type">
  758. <span class="param-type">string</span>
  759. </td>
  760. <td class="description last">in YYYY-MM format</td>
  761. </tr>
  762. </tbody>
  763. </table>
  764. <dl class="details">
  765. <dt class="tag-source">Source:</dt>
  766. <dd class="tag-source"><ul class="dummy"><li>
  767. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line340">line 340</a>
  768. </li></ul></dd>
  769. </dl>
  770. <h5>Returns:</h5>
  771. <dl>
  772. <dt>
  773. Type
  774. </dt>
  775. <dd>
  776. <span class="param-type"><a href="Note.html">Note</a></span>
  777. |
  778. <span class="param-type">null</span>
  779. </dd>
  780. </dl>
  781. <h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">(noteId)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  782. <h5>Parameters:</h5>
  783. <table class="params">
  784. <thead>
  785. <tr>
  786. <th>Name</th>
  787. <th>Type</th>
  788. <th class="last">Description</th>
  789. </tr>
  790. </thead>
  791. <tbody>
  792. <tr>
  793. <td class="name"><code>noteId</code></td>
  794. <td class="type">
  795. <span class="param-type">string</span>
  796. </td>
  797. <td class="description last"></td>
  798. </tr>
  799. </tbody>
  800. </table>
  801. <dl class="details">
  802. <dt class="tag-source">Source:</dt>
  803. <dd class="tag-source"><ul class="dummy"><li>
  804. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line61">line 61</a>
  805. </li></ul></dd>
  806. </dl>
  807. <h5>Returns:</h5>
  808. <dl>
  809. <dt>
  810. Type
  811. </dt>
  812. <dd>
  813. <span class="param-type"><a href="Note.html">Note</a></span>
  814. |
  815. <span class="param-type">null</span>
  816. </dd>
  817. </dl>
  818. <h4 class="name" id="getNotesWithLabel"><span class="type-signature"></span>getNotesWithLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Note.html">Note</a>>}</span></h4>
  819. <div class="description">
  820. Retrieves notes with given label name & value
  821. </div>
  822. <h5>Parameters:</h5>
  823. <table class="params">
  824. <thead>
  825. <tr>
  826. <th>Name</th>
  827. <th>Type</th>
  828. <th>Attributes</th>
  829. <th class="last">Description</th>
  830. </tr>
  831. </thead>
  832. <tbody>
  833. <tr>
  834. <td class="name"><code>name</code></td>
  835. <td class="type">
  836. <span class="param-type">string</span>
  837. </td>
  838. <td class="attributes">
  839. </td>
  840. <td class="description last">attribute name</td>
  841. </tr>
  842. <tr>
  843. <td class="name"><code>value</code></td>
  844. <td class="type">
  845. <span class="param-type">string</span>
  846. </td>
  847. <td class="attributes">
  848. &lt;optional><br>
  849. </td>
  850. <td class="description last">attribute value</td>
  851. </tr>
  852. </tbody>
  853. </table>
  854. <dl class="details">
  855. <dt class="tag-source">Source:</dt>
  856. <dd class="tag-source"><ul class="dummy"><li>
  857. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line124">line 124</a>
  858. </li></ul></dd>
  859. </dl>
  860. <h5>Returns:</h5>
  861. <dl>
  862. <dt>
  863. Type
  864. </dt>
  865. <dd>
  866. <span class="param-type">Array.&lt;<a href="Note.html">Note</a>></span>
  867. </dd>
  868. </dl>
  869. <h4 class="name" id="getNoteWithLabel"><span class="type-signature"></span>getNoteWithLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  870. <div class="description">
  871. Retrieves first note with given label name & value
  872. </div>
  873. <h5>Parameters:</h5>
  874. <table class="params">
  875. <thead>
  876. <tr>
  877. <th>Name</th>
  878. <th>Type</th>
  879. <th>Attributes</th>
  880. <th class="last">Description</th>
  881. </tr>
  882. </thead>
  883. <tbody>
  884. <tr>
  885. <td class="name"><code>name</code></td>
  886. <td class="type">
  887. <span class="param-type">string</span>
  888. </td>
  889. <td class="attributes">
  890. </td>
  891. <td class="description last">attribute name</td>
  892. </tr>
  893. <tr>
  894. <td class="name"><code>value</code></td>
  895. <td class="type">
  896. <span class="param-type">string</span>
  897. </td>
  898. <td class="attributes">
  899. &lt;optional><br>
  900. </td>
  901. <td class="description last">attribute value</td>
  902. </tr>
  903. </tbody>
  904. </table>
  905. <dl class="details">
  906. <dt class="tag-source">Source:</dt>
  907. <dd class="tag-source"><ul class="dummy"><li>
  908. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line134">line 134</a>
  909. </li></ul></dd>
  910. </dl>
  911. <h5>Returns:</h5>
  912. <dl>
  913. <dt>
  914. Type
  915. </dt>
  916. <dd>
  917. <span class="param-type"><a href="Note.html">Note</a></span>
  918. |
  919. <span class="param-type">null</span>
  920. </dd>
  921. </dl>
  922. <h4 class="name" id="getRootCalendarNote"><span class="type-signature"></span>getRootCalendarNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  923. <div class="description">
  924. Returns root note of the calendar.
  925. </div>
  926. <dl class="details">
  927. <dt class="tag-source">Source:</dt>
  928. <dd class="tag-source"><ul class="dummy"><li>
  929. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line304">line 304</a>
  930. </li></ul></dd>
  931. </dl>
  932. <h5>Returns:</h5>
  933. <dl>
  934. <dt>
  935. Type
  936. </dt>
  937. <dd>
  938. <span class="param-type"><a href="Note.html">Note</a></span>
  939. |
  940. <span class="param-type">null</span>
  941. </dd>
  942. </dl>
  943. <h4 class="name" id="getTodayNote"><span class="type-signature"></span>getTodayNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  944. <div class="description">
  945. Returns today's day note. If such note doesn't exist, it is created.
  946. </div>
  947. <dl class="details">
  948. <dt class="tag-source">Source:</dt>
  949. <dd class="tag-source"><ul class="dummy"><li>
  950. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line321">line 321</a>
  951. </li></ul></dd>
  952. </dl>
  953. <h5>Returns:</h5>
  954. <dl>
  955. <dt>
  956. Type
  957. </dt>
  958. <dd>
  959. <span class="param-type"><a href="Note.html">Note</a></span>
  960. |
  961. <span class="param-type">null</span>
  962. </dd>
  963. </dl>
  964. <h4 class="name" id="getWeekNote"><span class="type-signature"></span>getWeekNote<span class="signature">(date, options)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  965. <div class="description">
  966. Returns note for the first date of the week of the given date.
  967. </div>
  968. <h5>Parameters:</h5>
  969. <table class="params">
  970. <thead>
  971. <tr>
  972. <th>Name</th>
  973. <th>Type</th>
  974. <th class="last">Description</th>
  975. </tr>
  976. </thead>
  977. <tbody>
  978. <tr>
  979. <td class="name"><code>date</code></td>
  980. <td class="type">
  981. <span class="param-type">string</span>
  982. </td>
  983. <td class="description last">in YYYY-MM-DD format</td>
  984. </tr>
  985. <tr>
  986. <td class="name"><code>options</code></td>
  987. <td class="type">
  988. <span class="param-type">object</span>
  989. </td>
  990. <td class="description last">"startOfTheWeek" - either "monday" (default) or "sunday"</td>
  991. </tr>
  992. </tbody>
  993. </table>
  994. <dl class="details">
  995. <dt class="tag-source">Source:</dt>
  996. <dd class="tag-source"><ul class="dummy"><li>
  997. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line331">line 331</a>
  998. </li></ul></dd>
  999. </dl>
  1000. <h5>Returns:</h5>
  1001. <dl>
  1002. <dt>
  1003. Type
  1004. </dt>
  1005. <dd>
  1006. <span class="param-type"><a href="Note.html">Note</a></span>
  1007. |
  1008. <span class="param-type">null</span>
  1009. </dd>
  1010. </dl>
  1011. <h4 class="name" id="getYearNote"><span class="type-signature"></span>getYearNote<span class="signature">(year)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  1012. <div class="description">
  1013. Returns year note for given year. If such note doesn't exist, it is created.
  1014. </div>
  1015. <h5>Parameters:</h5>
  1016. <table class="params">
  1017. <thead>
  1018. <tr>
  1019. <th>Name</th>
  1020. <th>Type</th>
  1021. <th class="last">Description</th>
  1022. </tr>
  1023. </thead>
  1024. <tbody>
  1025. <tr>
  1026. <td class="name"><code>year</code></td>
  1027. <td class="type">
  1028. <span class="param-type">string</span>
  1029. </td>
  1030. <td class="description last">in YYYY format</td>
  1031. </tr>
  1032. </tbody>
  1033. </table>
  1034. <dl class="details">
  1035. <dt class="tag-source">Source:</dt>
  1036. <dd class="tag-source"><ul class="dummy"><li>
  1037. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line349">line 349</a>
  1038. </li></ul></dd>
  1039. </dl>
  1040. <h5>Returns:</h5>
  1041. <dl>
  1042. <dt>
  1043. Type
  1044. </dt>
  1045. <dd>
  1046. <span class="param-type"><a href="Note.html">Note</a></span>
  1047. |
  1048. <span class="param-type">null</span>
  1049. </dd>
  1050. </dl>
  1051. <h4 class="name" id="log"><span class="type-signature"></span>log<span class="signature">(message)</span><span class="type-signature"></span></h4>
  1052. <div class="description">
  1053. Log given message to trilium logs.
  1054. </div>
  1055. <h5>Parameters:</h5>
  1056. <table class="params">
  1057. <thead>
  1058. <tr>
  1059. <th>Name</th>
  1060. <th>Type</th>
  1061. <th class="last">Description</th>
  1062. </tr>
  1063. </thead>
  1064. <tbody>
  1065. <tr>
  1066. <td class="name"><code>message</code></td>
  1067. <td class="type">
  1068. </td>
  1069. <td class="description last"></td>
  1070. </tr>
  1071. </tbody>
  1072. </table>
  1073. <dl class="details">
  1074. <dt class="tag-source">Source:</dt>
  1075. <dd class="tag-source"><ul class="dummy"><li>
  1076. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line296">line 296</a>
  1077. </li></ul></dd>
  1078. </dl>
  1079. <h4 class="name" id="randomString"><span class="type-signature"></span>randomString<span class="signature">(length)</span><span class="type-signature"> &rarr; {string}</span></h4>
  1080. <div class="description">
  1081. Return randomly generated string of given length. This random string generation is NOT cryptographically secure.
  1082. </div>
  1083. <h5>Parameters:</h5>
  1084. <table class="params">
  1085. <thead>
  1086. <tr>
  1087. <th>Name</th>
  1088. <th>Type</th>
  1089. <th class="last">Description</th>
  1090. </tr>
  1091. </thead>
  1092. <tbody>
  1093. <tr>
  1094. <td class="name"><code>length</code></td>
  1095. <td class="type">
  1096. <span class="param-type">number</span>
  1097. </td>
  1098. <td class="description last">of the string</td>
  1099. </tr>
  1100. </tbody>
  1101. </table>
  1102. <dl class="details">
  1103. <dt class="tag-source">Source:</dt>
  1104. <dd class="tag-source"><ul class="dummy"><li>
  1105. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line388">line 388</a>
  1106. </li></ul></dd>
  1107. </dl>
  1108. <h5>Returns:</h5>
  1109. <div class="param-desc">
  1110. random string
  1111. </div>
  1112. <dl>
  1113. <dt>
  1114. Type
  1115. </dt>
  1116. <dd>
  1117. <span class="param-type">string</span>
  1118. </dd>
  1119. </dl>
  1120. <h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="signature">()</span><span class="type-signature"></span></h4>
  1121. <dl class="details">
  1122. <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- this is now no-op since all the changes should be gracefully handled per widget</li></ul></dd>
  1123. <dt class="tag-source">Source:</dt>
  1124. <dd class="tag-source"><ul class="dummy"><li>
  1125. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line413">line 413</a>
  1126. </li></ul></dd>
  1127. </dl>
  1128. <h4 class="name" id="searchForNote"><span class="type-signature"></span>searchForNote<span class="signature">(query, searchParams<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
  1129. <div class="description">
  1130. This is a powerful search method - you can search by attributes and their values, e.g.:
  1131. "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
  1132. </div>
  1133. <h5>Parameters:</h5>
  1134. <table class="params">
  1135. <thead>
  1136. <tr>
  1137. <th>Name</th>
  1138. <th>Type</th>
  1139. <th>Attributes</th>
  1140. <th class="last">Description</th>
  1141. </tr>
  1142. </thead>
  1143. <tbody>
  1144. <tr>
  1145. <td class="name"><code>query</code></td>
  1146. <td class="type">
  1147. <span class="param-type">string</span>
  1148. </td>
  1149. <td class="attributes">
  1150. </td>
  1151. <td class="description last"></td>
  1152. </tr>
  1153. <tr>
  1154. <td class="name"><code>searchParams</code></td>
  1155. <td class="type">
  1156. <span class="param-type">Object</span>
  1157. </td>
  1158. <td class="attributes">
  1159. &lt;optional><br>
  1160. </td>
  1161. <td class="description last"></td>
  1162. </tr>
  1163. </tbody>
  1164. </table>
  1165. <dl class="details">
  1166. <dt class="tag-source">Source:</dt>
  1167. <dd class="tag-source"><ul class="dummy"><li>
  1168. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line110">line 110</a>
  1169. </li></ul></dd>
  1170. </dl>
  1171. <h5>Returns:</h5>
  1172. <dl>
  1173. <dt>
  1174. Type
  1175. </dt>
  1176. <dd>
  1177. <span class="param-type"><a href="Note.html">Note</a></span>
  1178. |
  1179. <span class="param-type">null</span>
  1180. </dd>
  1181. </dl>
  1182. <h4 class="name" id="searchForNotes"><span class="type-signature"></span>searchForNotes<span class="signature">(query, searchParams<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Note.html">Note</a>>}</span></h4>
  1183. <div class="description">
  1184. This is a powerful search method - you can search by attributes and their values, e.g.:
  1185. "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
  1186. </div>
  1187. <h5>Parameters:</h5>
  1188. <table class="params">
  1189. <thead>
  1190. <tr>
  1191. <th>Name</th>
  1192. <th>Type</th>
  1193. <th>Attributes</th>
  1194. <th class="last">Description</th>
  1195. </tr>
  1196. </thead>
  1197. <tbody>
  1198. <tr>
  1199. <td class="name"><code>query</code></td>
  1200. <td class="type">
  1201. <span class="param-type">string</span>
  1202. </td>
  1203. <td class="attributes">
  1204. </td>
  1205. <td class="description last"></td>
  1206. </tr>
  1207. <tr>
  1208. <td class="name"><code>searchParams</code></td>
  1209. <td class="type">
  1210. <span class="param-type">Object</span>
  1211. </td>
  1212. <td class="attributes">
  1213. &lt;optional><br>
  1214. </td>
  1215. <td class="description last"></td>
  1216. </tr>
  1217. </tbody>
  1218. </table>
  1219. <dl class="details">
  1220. <dt class="tag-source">Source:</dt>
  1221. <dd class="tag-source"><ul class="dummy"><li>
  1222. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line86">line 86</a>
  1223. </li></ul></dd>
  1224. </dl>
  1225. <h5>Returns:</h5>
  1226. <dl>
  1227. <dt>
  1228. Type
  1229. </dt>
  1230. <dd>
  1231. <span class="param-type">Array.&lt;<a href="Note.html">Note</a>></span>
  1232. </dd>
  1233. </dl>
  1234. <h4 class="name" id="setNoteToParent"><span class="type-signature"></span>setNoteToParent<span class="signature">(noteId, prefix, parentNoteId)</span><span class="type-signature"></span></h4>
  1235. <div class="description">
  1236. This method finds note by its noteId and prefix and either sets it to the given parentNoteId
  1237. or removes the branch (if parentNoteId is not given).
  1238. This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
  1239. </div>
  1240. <h5>Parameters:</h5>
  1241. <table class="params">
  1242. <thead>
  1243. <tr>
  1244. <th>Name</th>
  1245. <th>Type</th>
  1246. <th class="last">Description</th>
  1247. </tr>
  1248. </thead>
  1249. <tbody>
  1250. <tr>
  1251. <td class="name"><code>noteId</code></td>
  1252. <td class="type">
  1253. <span class="param-type">string</span>
  1254. </td>
  1255. <td class="description last"></td>
  1256. </tr>
  1257. <tr>
  1258. <td class="name"><code>prefix</code></td>
  1259. <td class="type">
  1260. <span class="param-type">string</span>
  1261. </td>
  1262. <td class="description last"></td>
  1263. </tr>
  1264. <tr>
  1265. <td class="name"><code>parentNoteId</code></td>
  1266. <td class="type">
  1267. <span class="param-type">string</span>
  1268. |
  1269. <span class="param-type">null</span>
  1270. </td>
  1271. <td class="description last"></td>
  1272. </tr>
  1273. </tbody>
  1274. </table>
  1275. <dl class="details">
  1276. <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- this method is pretty confusing and serves specialized purpose only</li></ul></dd>
  1277. <dt class="tag-source">Source:</dt>
  1278. <dd class="tag-source"><ul class="dummy"><li>
  1279. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line369">line 369</a>
  1280. </li></ul></dd>
  1281. </dl>
  1282. <h4 class="name" id="sortNotesByTitle"><span class="type-signature"></span>sortNotesByTitle<span class="signature">(parentNoteId)</span><span class="type-signature"></span></h4>
  1283. <h5>Parameters:</h5>
  1284. <table class="params">
  1285. <thead>
  1286. <tr>
  1287. <th>Name</th>
  1288. <th>Type</th>
  1289. <th class="last">Description</th>
  1290. </tr>
  1291. </thead>
  1292. <tbody>
  1293. <tr>
  1294. <td class="name"><code>parentNoteId</code></td>
  1295. <td class="type">
  1296. <span class="param-type">string</span>
  1297. </td>
  1298. <td class="description last">this note's child notes will be sorted</td>
  1299. </tr>
  1300. </tbody>
  1301. </table>
  1302. <dl class="details">
  1303. <dt class="tag-source">Source:</dt>
  1304. <dd class="tag-source"><ul class="dummy"><li>
  1305. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line355">line 355</a>
  1306. </li></ul></dd>
  1307. </dl>
  1308. <h4 class="name" id="toggleNoteInParent"><span class="type-signature"></span>toggleNoteInParent<span class="signature">(present, noteId, parentNoteId, prefix)</span><span class="type-signature"> &rarr; {void}</span></h4>
  1309. <div class="description">
  1310. Based on the value, either create or remove branch between note and parent note.
  1311. </div>
  1312. <h5>Parameters:</h5>
  1313. <table class="params">
  1314. <thead>
  1315. <tr>
  1316. <th>Name</th>
  1317. <th>Type</th>
  1318. <th class="last">Description</th>
  1319. </tr>
  1320. </thead>
  1321. <tbody>
  1322. <tr>
  1323. <td class="name"><code>present</code></td>
  1324. <td class="type">
  1325. <span class="param-type">boolean</span>
  1326. </td>
  1327. <td class="description last">true if we want the branch to exist, false if we want it gone</td>
  1328. </tr>
  1329. <tr>
  1330. <td class="name"><code>noteId</code></td>
  1331. <td class="type">
  1332. <span class="param-type">string</span>
  1333. </td>
  1334. <td class="description last"></td>
  1335. </tr>
  1336. <tr>
  1337. <td class="name"><code>parentNoteId</code></td>
  1338. <td class="type">
  1339. <span class="param-type">string</span>
  1340. </td>
  1341. <td class="description last"></td>
  1342. </tr>
  1343. <tr>
  1344. <td class="name"><code>prefix</code></td>
  1345. <td class="type">
  1346. <span class="param-type">string</span>
  1347. </td>
  1348. <td class="description last">if branch will be create between note and parent note, set this prefix</td>
  1349. </tr>
  1350. </tbody>
  1351. </table>
  1352. <dl class="details">
  1353. <dt class="tag-source">Source:</dt>
  1354. <dd class="tag-source"><ul class="dummy"><li>
  1355. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line167">line 167</a>
  1356. </li></ul></dd>
  1357. </dl>
  1358. <h5>Returns:</h5>
  1359. <dl>
  1360. <dt>
  1361. Type
  1362. </dt>
  1363. <dd>
  1364. <span class="param-type">void</span>
  1365. </dd>
  1366. </dl>
  1367. <h4 class="name" id="transactional"><span class="type-signature"></span>transactional<span class="signature">(func)</span><span class="type-signature"> &rarr; {?}</span></h4>
  1368. <div class="description">
  1369. This functions wraps code which is supposed to be running in transaction. If transaction already
  1370. exists, then we'll use that transaction.
  1371. </div>
  1372. <h5>Parameters:</h5>
  1373. <table class="params">
  1374. <thead>
  1375. <tr>
  1376. <th>Name</th>
  1377. <th>Type</th>
  1378. <th class="last">Description</th>
  1379. </tr>
  1380. </thead>
  1381. <tbody>
  1382. <tr>
  1383. <td class="name"><code>func</code></td>
  1384. <td class="type">
  1385. <span class="param-type">function</span>
  1386. </td>
  1387. <td class="description last"></td>
  1388. </tr>
  1389. </tbody>
  1390. </table>
  1391. <dl class="details">
  1392. <dt class="tag-source">Source:</dt>
  1393. <dd class="tag-source"><ul class="dummy"><li>
  1394. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line379">line 379</a>
  1395. </li></ul></dd>
  1396. </dl>
  1397. <h5>Returns:</h5>
  1398. <div class="param-desc">
  1399. result of func callback
  1400. </div>
  1401. <dl>
  1402. <dt>
  1403. Type
  1404. </dt>
  1405. <dd>
  1406. <span class="param-type">?</span>
  1407. </dd>
  1408. </dl>
  1409. <h4 class="name" id="unescapeHtml"><span class="type-signature"></span>unescapeHtml<span class="signature">(string)</span><span class="type-signature"> &rarr; {string}</span></h4>
  1410. <h5>Parameters:</h5>
  1411. <table class="params">
  1412. <thead>
  1413. <tr>
  1414. <th>Name</th>
  1415. <th>Type</th>
  1416. <th class="last">Description</th>
  1417. </tr>
  1418. </thead>
  1419. <tbody>
  1420. <tr>
  1421. <td class="name"><code>string</code></td>
  1422. <td class="type">
  1423. <span class="param-type">string</span>
  1424. </td>
  1425. <td class="description last">to unescape</td>
  1426. </tr>
  1427. </tbody>
  1428. </table>
  1429. <dl class="details">
  1430. <dt class="tag-source">Source:</dt>
  1431. <dd class="tag-source"><ul class="dummy"><li>
  1432. <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line402">line 402</a>
  1433. </li></ul></dd>
  1434. </dl>
  1435. <h5>Returns:</h5>
  1436. <div class="param-desc">
  1437. unescaped string
  1438. </div>
  1439. <dl>
  1440. <dt>
  1441. Type
  1442. </dt>
  1443. <dd>
  1444. <span class="param-type">string</span>
  1445. </dd>
  1446. </dl>
  1447. </article>
  1448. </section>
  1449. </div>
  1450. <nav>
  1451. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
  1452. </nav>
  1453. <br class="clear">
  1454. <footer>
  1455. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a>
  1456. </footer>
  1457. <script> prettyPrint(); </script>
  1458. <script src="scripts/linenumber.js"> </script>
  1459. </body>
  1460. </html>