From 2509b2f868f1ce811e6c26c60904d088319a3c19 Mon Sep 17 00:00:00 2001 From: dphuang2 Date: Fri, 23 Feb 2024 18:37:49 -0800 Subject: [PATCH] upgrade vitest + make konfig-integration-tests an ESM module --- generator/konfig-integration-tests/Earthfile | 2 +- .../{apiServer.js => apiServer.cjs} | 0 .../konfig-integration-tests/package.json | 1 + .../sdks/python-decentro/python/.coverage | Bin 90112 -> 94208 bytes .../sdks/python-newscatcher/python/.coverage | Bin 122880 -> 126976 bytes .../csharp-newscatcher.test.ts.snap | 44 +- ...lable-ref-using-all-of-schema.test.ts.snap | 10 +- .../csharp-snaptrade.test.ts.snap | 20 +- .../__snapshots__/csharp-splitit.test.ts.snap | 20 +- .../__snapshots__/go-decentro.test.ts.snap | 38 +- .../__snapshots__/go-newscatcher.test.ts.snap | 60 +- .../__snapshots__/go-splitit.test.ts.snap | 20 +- ...va-merge-anyof-object-schemas.test.ts.snap | 30 +- .../java-merge-anyof-strings.test.ts.snap | 30 +- ...java-merging-schemas-with-ref.test.ts.snap | 30 +- ...lable-ref-using-all-of-schema.test.ts.snap | 30 +- .../__snapshots__/java-snaptrade.test.ts.snap | 24 +- .../__snapshots__/java-splitit.test.ts.snap | 44 +- ...-use-schema-title-if-possible.test.ts.snap | 30 +- .../__snapshots__/php-splitit.test.ts.snap | 24 +- .../python-async-default-timeout.test.ts.snap | 36 +- ...eout-with-top-level-operation.test.ts.snap | 36 +- .../python-async-timeout.test.ts.snap | 36 +- .../__snapshots__/python-carbon.test.ts.snap | 1318 ++++++------- .../python-circular-reference.test.ts.snap | 44 +- .../python-decentro.test.ts.snap | 232 +-- .../python-invalid-response.test.ts.snap | 82 +- .../python-leap-workflows.test.ts.snap | 108 +- .../python-newscatcher.test.ts.snap | 1174 ++++++------ ...c-additional-properties-anyof.test.ts.snap | 38 +- ...ntic-any-schema-dict-response.test.ts.snap | 40 +- ...on-pydantic-array-with-object.test.ts.snap | 38 +- ...ython-pydantic-empty-response.test.ts.snap | 36 +- .../python-pydantic-enum-str.test.ts.snap | 40 +- ...tic-free-form-object-property.test.ts.snap | 40 +- ...tic-free-form-object-response.test.ts.snap | 48 +- ...python-pydantic-list-in-union.test.ts.snap | 38 +- ...python-pydantic-list-response.test.ts.snap | 38 +- ...ested-union-with-list-and-str.test.ts.snap | 40 +- ...thon-pydantic-nullable-string.test.ts.snap | 40 +- ...-with-top-level-configuration.test.ts.snap | 36 +- ...recursively-convert-to-models.test.ts.snap | 50 +- ...ntic-reserved-namespace-model.test.ts.snap | 40 +- ...on-pydantic-response-as-param.test.ts.snap | 64 +- .../python-pydantic-responses.test.ts.snap | 76 +- ...hema-with-underscores-in-name.test.ts.snap | 40 +- .../python-pydantic-union.test.ts.snap | 40 +- .../python-readme-header-snippet.test.ts.snap | 38 +- .../__snapshots__/python-splitit.test.ts.snap | 408 ++-- .../python-typeddict-responses.test.ts.snap | 62 +- ...on-union-string-discriminator.test.ts.snap | 40 +- .../__snapshots__/ruby-snaptrade.test.ts.snap | 12 +- .../swift-safehealth.test.ts.snap | 188 +- .../swift-snaptrade.test.ts.snap | 906 ++++----- ...typescript-array-query-string.test.ts.snap | 34 +- .../typescript-bellhop.test.ts.snap | 474 ++--- .../typescript-carbon.test.ts.snap | 1086 +++++------ .../typescript-file-upload-node.test.ts.snap | 34 +- ...ypescript-humanloop-old-axios.test.ts.snap | 1654 ++++++++--------- .../typescript-humanloop.test.ts.snap | 1654 ++++++++--------- ...ript-leap-workflows-old-axios.test.ts.snap | 60 +- .../typescript-leap-workflows.test.ts.snap | 60 +- ...ipart-form-data-array-request.test.ts.snap | 32 +- ...rt-form-data-free-form-object.test.ts.snap | 32 +- ...escript-newscatcher-old-axios.test.ts.snap | 764 ++++---- .../typescript-newscatcher.test.ts.snap | 764 ++++---- ...pescript-no-relative-npm-link.test.ts.snap | 30 +- .../typescript-oauth-token.test.ts.snap | 32 +- .../typescript-optional-api-key.test.ts.snap | 36 +- ...pt-preserve-allof-description.test.ts.snap | 36 +- ...y-params-not-included-in-body.test.ts.snap | 52 +- ...typescript-relative-npm-links.test.ts.snap | 30 +- ...elf-referencing-infinite-loop.test.ts.snap | 32 +- .../typescript-snaptrade.test.ts.snap | 974 +++++----- .../typescript-splitit-old-axios.test.ts.snap | 312 ++-- .../typescript-splitit.test.ts.snap | 312 ++-- ...-use-classname-for-return-doc.test.ts.snap | 32 +- generator/konfig-integration-tests/util.ts | 2 +- 78 files changed, 7244 insertions(+), 7243 deletions(-) rename generator/konfig-integration-tests/{apiServer.js => apiServer.cjs} (100%) diff --git a/generator/konfig-integration-tests/Earthfile b/generator/konfig-integration-tests/Earthfile index a0459da5cb..fe7e05f618 100644 --- a/generator/konfig-integration-tests/Earthfile +++ b/generator/konfig-integration-tests/Earthfile @@ -8,7 +8,7 @@ integration-tests: COPY tsconfig.json vitest.config.ts util.ts . COPY sdks sdks COPY tests tests - COPY apiServer.js . + COPY apiServer.cjs . COPY scripts scripts RUN --secret AWS_ACCESS_KEY_ID --secret AWS_SECRET_ACCESS_KEY ./scripts/install-aws-cli.sh # can be overridden at runtime (e.g. "docker run konfig-integration-tests:latest --testName=TestName") diff --git a/generator/konfig-integration-tests/apiServer.js b/generator/konfig-integration-tests/apiServer.cjs similarity index 100% rename from generator/konfig-integration-tests/apiServer.js rename to generator/konfig-integration-tests/apiServer.cjs diff --git a/generator/konfig-integration-tests/package.json b/generator/konfig-integration-tests/package.json index 09be801e9d..c0b169aeac 100644 --- a/generator/konfig-integration-tests/package.json +++ b/generator/konfig-integration-tests/package.json @@ -4,6 +4,7 @@ "description": "Suite of integration tests for Konfig", "main": "index.js", "license": "MIT", + "type": "module", "private": true, "devDependencies": { "@types/express": "^4.17.21", diff --git a/generator/konfig-integration-tests/sdks/python-decentro/python/.coverage b/generator/konfig-integration-tests/sdks/python-decentro/python/.coverage index 296e54e508b160b68c68d152bb02c8527146f29e..236afc54a2f56b607d2784935a0c7dd7e033a784 100644 GIT binary patch literal 94208 zcmeI53w#_^y~k&EXLo02=aKibCEKQXHIGf3zG!KawxrLLzFSILwwq*gOpLY3$4)}t8r~*_0ssL5s zpIZTAyW}b?E@q>*MEvc&S|sf6(8965^4cA(t9P|}cCB91*6NAHd8$PZeCq2xt3Bb+ zF;Bl1_H+e$HBTVe8R+mw0>N%iq(?LN9?-Q;RM9~kRCQ>_27EjU`2wAAR7C5BQ}l-e zeg5#E=ddQXnZx8!}9X*;}=kX`5ups< zami^)j#4ys)IczBWI#(Kew`TBfZex^7#iM zA-wH_#P=413Vrm?J`NehB#}33gY`%Ky-=F;`vYOfvQP%cY5)(~vC|Jb``beU5$wNc z6T2s>dy>4d6C}4y?P0GPygOv?Z6RF`K(&ghEq%Ee>#6GT>!=jct32(YP_O0>#_9$* zVxtbf8PGkLVPdV+oIHm_?ds z{Z6b9fdf5NkSTS@qABMzPa6Lgm00Ha8~Q;Lbk;t9XDqv;M6sOlSdTX0bg|m#T7N`~ z1o|`&+6BX4$2#WMJsn{UzJ$88rplhq4Nz+N7NEbVm&~K4oKeQQ3TtawV<4UxW95ub zhf2NAZ(_$cZR4CI<;$eMY=r_BT02%hLE2g5K%22&K!sZ@1>0jPn0v+BI%16sl&tzT z1OL+xRe&l$6`%@G1*ig40jdC1fGR*0pbAh0r~?0Z3fNg2>q7m1oBA6@Jqv&6hbll7 zpbAh0r~*_0ssL4hDnJ#W3Qz^80#t!3Qvu0lpRJm=cr>c4y|gfX6Ts4jg$+wZxGI}^ zhEdO`uV0xLNU5m;Q~|00Re&l$6`%@G1*ig40jdC1fGR*0FcpyOvsrT#z$V&Dh4>(V z19srlKcL+T)wk6*)K}F%Ncrwt#ovm1gp)!O{}7++GMukC+Z^9=WOIG?=j>~2_p^Uu zTbcXJb6*B))Ru5ebia4E4r@TXorAspV9$U**zH{(hYaymZ~tJV2Vy$44lNi7hvM5_bK4gP`Z_|ry;^KNn6INZ0Q-6S zLY-Q#`5T(A-#^#~(LPvcb=Viy^nO@6rup!KmHt7avKVN$XE-gajxlPA0CaC=f-Y)o zOel+3D++;iYi6~?7wt!bQ{4 z+X+Nf1QSuaxkKy6PmJ)j`*jU5DGp$oLy!q7ws9?Hi36b71c8zwA$^>7z{w_v1N}7I zLYHiWbwLT0EVM-yaEkx_xva5*z&Gl^*VUiv?;~8sTzuxZ~2%|}nQu_QqNIUwW3Qz^80#pI209Al0Koy`0Pz9(0Q~|2M zKdu6H*3QUi{XeT-VBmlHp$bq1r~*_0ssL4hDnJ#W3Qz^80#pI209D{0PyxGL7SR0v zL05!P-%#FCo>5LHk1C&3b}Ac`m9ky>v-CUZl=L&{2hxc2HR&!~K~1LH9@9ce;n%y1U1Hz`f1g>R#z)#FxdNi%*H)5WgrsB;G6DB@T(l z#71$Ja7lPscvkqH@VM|L;WNU=gbxbCLPY2ls)bzs0{?sdIsOOyN&c(+!~6sM-TeFb z_wZr9k)OpoU1wdVTu-~6a(&bFMb|^FdtG_@@<5L_9KJEl9+Z?Q5Fx&XivqJ-K-m~{^{nqeLpMKwY z=FFQ`?OVoJbMyBrnb%w`x3I^{7#wtNg|jMKj|k5$N72jR+f%OG$hxJempW?+L@!^0 zqKoc6^1b5jA1`~c`Sb~p2hzVRXEA(Rxfma0I#BB(q=UF9RRr-3i!Wfu zZymD_vny)gi<@iEALw=Hzm+B{DV_$y#UlM9U;P}|^`9Gh2ZXAEa|H|M%eV=Pr&FGQ-CTnRS<%ZyAQ=)Yc0_ z;o-5di(_MBXW`%2X&mTNhKrbPM#>stmNYf(x6f*1m>-`TbT+aj@Cz>$4-4m{5w7R~ z_Tx+`Gt5?+XKea6)KmKk+C*_9Dl;q>p{*7>b8e_;n30$D9I;8jp+)3t#v^>BpJ-;{UpTHNrjc z8%O0`pQ&aVj<8Jo$=hzOy!6qp9x6W9_2&hGARvVWl->f5f;v`u)5zEvsYrT+m3oX%f2Voq(uEqv<^e&Nubj9z#L7-M zSJx7bmCblVWq;==#6;OgL!X686L?rrDe8yF5&PYc z&`b*i;WO)*4>NZ#Un#RQ+kD^NWOEkXcL}X7K%ZyEnl3%xe8( zyuJ*_^k{!IO$`jq;F`gQe7>ci@B^%Lqn>Ic=^)mzk~YDn!-{pt#oCQ%NA_f+OXNY8JkU;u-Ui~n++SVS-&2eb?dNcZN=u=Yq43o7MnF|uvxtt zo0b-Anwzm%wF;Y+E3vue8f;dqz-IY!Y_7f}XDJ#R~s;jV>JsX=@v#=>G#ipbLo8n?@ii)r)EX1au0Gs@LZ1VE3$<4(k zCkLBsc+e%dMphO!s)~)GU?bxZ5mu7$mfMYuC}JZB*zi0yE*CaVCpHcTHXMhI-HwgT z#=#f>p8uaXZk5Sdhq6%xr~*_0ssL4hDnJ#W3Qz^80#pI209Al0@J1?gUotAV=oZ7nMc0yiGvbu5h4zL0$KWl92kjnajxQad zv4V>ZrrV+0e4k|~>^+QMURoarMzrp*KN1K9>m!;T(Y<=-Vcpw580mqSPOU==M#7=^ zw%6SD1%kegP;al+fezGtv3LD?@g+=rGk7HI59)rrtIrw^bo%s&KQf@h)pZbm-{%zY zNBjN0`1^x3;A|)Uj#tx9e36h3!oYN+V>VN_eTE57{AJ7*oh|S4_8X+%p=#key3p6} zAM69y*YSI5djrA4pz|Rkmy6cSQ0L2=!IFvZb9|rSjCovib4GyaUaNS?G6Ll5gu*z> z`tsRKrB1$@7^pR)j*IRmsqKtknG3WfMim#GX;E-lTy!S109s7EyiX5$WB@8d;4CEm z-t07-iy9jfFV6$m z*B-Qe)h0SiXVmwrt8NUhdo7O8 zMZDEGadZRq7ElM#%9(2{=c30ZDEfEIJrg;tBQMr)ViX4QGiveH7|q;m?3KoDagu7{ z{mO~rCu?eNe+YLh7EPY%h`NY{(xPV*@oq&-PYY5`hV;tP6|BBaf5Z>@Y1frf36LH` zN>^8z-SHj7bIp{LDV_1{88Q+R(DeZgSNvhEYarN}sQ69)Y$ZPO8k2NNP{>2q8gsa4 zE6F-(N=DN&*JemIPn9vnE!SnpaApiMUg3aGVi_m+=CX{+L{rg%gDxfBFts}9L{QU9 zmt;uAIcf5zxawk~fs3Y{@VwmfnK4bFSv+pqGB#(K^i?e!4u!!7>Wq3WdXRh}H63rf zT~eDNRp~UiAnbf}|9=T{AEWBZOUi!v$MOp4VJY8ztN2@Sk8o0G;veF3U54`&XPe_& zj%=>a{+xY{?SA%8Y%3ge`94N%3CBeD6C5Kk9W-xzsW zKv$m;bk=lKRlq7Ijb$ZrD?n6AkSH?P5B=&$pcj=Hs!Uj))EQHQmw+grpgu7oBu>5? zP)HW^@nJf+Rnga{Mf_%iNDzUmkf20*M~~L$N4Gy3#R9M_CCHLe84iSd6BS|}4{RjM zB$LhG716>8EY$^AB+H}@d<*SB?Cx2Vi11i+CR#->5tBETm^Zr^iUXMD5M)Br%3)3K zhx>%l-8Y8B0nluMKuM7hj?)e}*#vPw8#L`^NH)T{jGO;AL>6$03F>00>{0)}kU7k# zo0M-VvaCtpl$o`O>4ZFXakKtVa*WE$z zy5UAye=rj0K+~~l$DPb-Y5G_DrT&Ei*Kp17F6@g0GedeJgv4CXq53Qt^!z+Q&}^B zMV!^Mfsh+|6NAiqI_1q zC~uekU1Hoj#7BjT!XExH*O==%=Yx*d9Gke$ajgBI?Q1rf?Pk9FZo2=M@ff3Q14zG? zp!C=oQtuD5P7;@|2g1#nMwptZ=B)!tk`-3Wg;Rx0#jI=vOp=}P$uSdSvF81s#++*b zl;nK(G@z)=_pAlRR)U^6C1aw2QoaTdNoJmj-NEESc5~H%QMDQN zKb=?rR4xVDOleC^MT=yuSVB1Y)61G@tkf(9PLd^R8qU;Ws(cZ!W>&*0?gDT_QLdmQFORrkmk5=iku!|2*5r7~99}E%x8JPP;Zb?{}PatmW=e z*DLqSXXM4w9qvp9Is)Ih)DXo>Nh# zWSZ+Tr>sxktvAOYR%K3EpB@;Tb!Fz1^;5B$9@~;RW&Nb6DQ??rEa0MAMwIn4?dB~s z8o6l46@eVT({h1P%SHEH3B-`s8jYn~^hk!lPTOd;O#fG*`Trv3Mn*lTd|grH9_a}w z$K55K6!U~2|9!sHHQ@ZAv%>LS?rE;Ve$@68TP=GZYl8!3^fBfff&med6QFoS=)^{d zx#}0v&dBirV-3MUn*?L>(c?z;jQ~Y*y%UCt_`5AkWe0(YwPEtU% z0V~M@YD!fTthj*M445QqrgWHz0;*yYP?F5{xc;0z(LEc1ljOa%={X_6(fog|{S%Di z^V~UZz5NsFcI6B5n7mhdRN~z2;*(;bbBFV7ezWVi@B#kS8Fl*UPE-M^!2eeP;tvzX zMaOjG%kjb52I3DBo(U}!clAaS7Y&dcsEvcZlR;V!@uBdULW9C(nc)hPbi`6xkJlUJ zTy!IGSC|CUGN`ea_#_@q`pF^34{GcoJ~=)uD!Auv;xB29Ynk%IJU2YND_Tn08_kC< zD#Y&_!D%^d1A7zkmlvex1c%#5{O#9MA)39Z4VjT~QxiL-xL%(bm0*l=s&xwHaOCn# z%0E-Vf^%L?{JtxTb57(mJ#?|L3b#frv&(#@9| zKp;L~X1=0e{JVtmjeIUzp9z|cdvyX&y#JS&K%dE=?f%SJE0hiwhAM6#KCdv1u;yUJ z0pbHy=|EG4EB2xL|D94fqxL8xid{Y^eFHY=hbll7pbAh0r~*_0ssL4hDnJ$ZXH~$+ z?t;6RNv=i3%RzMOQ-X|gjqrWyiAB4*_vk|N_29ZMxmW@EtVVffW>O{}Uxz4{cL3!e s!PR|JXlZ>#kTslmT@Zq=Xa{(bO97^Uw=M%hocVs>^k#<0mhssC0}ma;D*ylh delta 6872 zcmaKxdvH|M9mnt4J$LusyLa!+y@xz^H@n#-5W*t_!ut_ohzKMiAa8UD5CSz4G*G1t zl5>TsfWXdGuVXtZosqHaIEd7lc1FSKOxr*D0JXMdIto78TFXf4h@ELi`#U$;uxIa0 z^G9IL=X=lNcYf#h`<;`4E8@T#;>jc`%cX7!WD{q%Ki{kc^+5rC#_0diZ|H;PjFJ!a z6zPB#qX~YM!~@#P0#@IE{|lx1TJ?=+x2A&Xj7oG`gRM5yu%@r;{=SB;?b~;CIcO}( zm4VcxNo=+7tfdJZFW(5Tj88ibl{}Wh7Si9qy5qK>RZAUwI%YiNQ3etrCNSM z8kAOrUkOJ;Tf_@6L-s=}u{DFAUuVk>=gL%+CR=DZwih@KX+ZQg4GZNTZFbeK}+c2WoO8DZ4{ik=-T38`**Lm|7 zjbUq!?%Mkp3w3_K0qLZIO4uUB_pZI!EQm{}cY-4wO6#LW2wS?RFZ=Zlort5X zddCO4fv^>p3nK-XddJp+ag{)gP!0z&@LG6^Tqb=xdJ@czC)Z;yx>{rSIW8k*&hF{p46D5H3TDUz z#JQeDdS+$tYoVlID8c9a=B|FnsKr(XKLZxB_5_ejCi%vT9((?$m1(g2VpxirA7PZ0 zO!}9 zq3dxj$Iv)3+wa7+xUkxO?w_LX(d)76ucf_v;hasQhn@E`NH)A_1K3H!6KUBe{r14S z*q)b_P3nnsH~C9zG@}t)U7XFFvmx}1b0UO7WCERutzHj(fz)~982ju&`^}HX_|21{ zou5<~p2)$z>ZvYpcGKT>u!-p{QE-8{&>`sk+70c2=wNi0`o6j*@~cRba#l&pr{oIB zmXvUR=x?FB#PebXKY^9tJ%L{b>d?c&d+=f54-Lh!U>Su6&w)&PkFzL^B81k*fNm(H z;Pk^0m!_)#F7<421#li*9Uxz?4GJTw2%_vjvw>sVIU*_h?@4C^3T=P{e~S zUXGdvf>@vjIW*Y1(;3)=L_&iB-|u#;&`g8?g}Lw8jK2IvZ>kU;74*Bc3tBANt6owU zM}DaMSJ@z+m65bG{8Z@6&x?iLWBb>I0f-0Ksxj zkT1s*EOjYndI~7GSis!TE!Y#R9+%C;WKeL?U_?=4j-3Rsqi_JXkaxSzOe`KeU*yYX zbv-c7EWnNvI&}iHcNO->Z0W}HusNd+U~e%zZB8B!?OCqfHREqN`vYt4(E7NrR%&qbSTFG*$zed7K9J zg3A2*W;Xy<1R?E~(*<|^n`VT^EE z!1o0|mR5$(gw@b?@uy;mzD|2d3rD-uH`S`he&sL9LizjBSHkJwJHZ)&r_jI9t+`x} zPfB#)!g$y%&&17w5P0@%?wNo|BiO3slQlDMp=HuO)d1W}4?73zpuk9DYl-)Jc9`75 zFqKZhR@O&w(@nb$%RX{5tjWb%>_iw^BRRZza8QnK7zH;?q8IJ@hSVfY&B zkn?#A8Dyci1ZAHea-OR|Dp^2%&2-3az7`>i{0;P^QHQP7KBk2Yt~bVGYo$MPV`X?= zBP+iug)TwAOFOSsNB66j)tQl}l^e=x`6sd{Z418{t_>X(uZwr!S8!>tKk#9o6`e+s z(3Q(gBsA3l2gDN_3aw6K?I7XLZQh>l#<*6eRm(xer;EI*%#1Gs$RE#33*mT{FNOB$ z+^L85LvD~SyA4<)$F7#3N6e}vo`InKyUy1JI8p3YfZSXmHTT$)K1&jsXamMYe8!yl z1f|W2#lX12%>52-I__M`TLE+P9LDY)MmDQ%0nRTT%6<2S5Qb#g0!7BYS^&_qpRRvK&E$N~c)z$Eogg$e4*+L22f)D4 zL~7;&_C`id=5Z)1LU%>YjL=ajW-jsfO&TVShZ{N_{`#tU6a>e zOM%nQ0LCqHm<`LzYWrv^_LvkUv~e2< zx(nSQ-wk^N8%t<>D+oB7-W2q|t;6l269fsr9wLQ#g;s0VatGj1Gj%7ldp&UY%|bR~tATR|3T(sPG$0ODtt#$wn7L0ou=th0xy29jp_d)- zk2^rX`3HN(KI~-YLGheg0g#&+gC`*h-Co>nLE?kpsn;oxN=iaag1$+6RU^@T>U-+6 z$dhng*ebsjY6`t8nc+S1Lg@^=rmG>}`e(%2>uD9XX7QN|to;~S=aVAy=9b7>pWF@f z2w6jY-+t{y8!L<;wq$-JDDm8zr{aCnaUj1OBg?4gQHlXK@htT|ggcO6zDI8JnOr{e z=wyjcagz^|2AS(q;^pI{O6K?!HjKLQcb<>M0OkzO9~(w4FzzKtCJo-_umTDDt3=Hd zw&$vJUC=jbztI*%e;l2tzNjW62b2$#Me+}%>#)}sC6m@;Yn{i&!_|4pXXRXVp7dEf z2#%3zpLGLpuLKgQ@mV-fw|FH7kY*}E6-+T;E9>Vk>FBraNhYbT; hwH#v41eVXA9tKxGWO(1H-KT@iy3gk1qnm^_{SWFAaFYN4 diff --git a/generator/konfig-integration-tests/sdks/python-newscatcher/python/.coverage b/generator/konfig-integration-tests/sdks/python-newscatcher/python/.coverage index b5e1155104372408e63ade9df274ff4a2c563879..48b52d20529ee0f197ec930c0861d992cff98d0a 100644 GIT binary patch literal 126976 zcmeHw3!D?xz5khHlFTHNnSDRm2g_Sn0xXZ^xr+!2q9BMOh#~A|cO$!-CCLgXu$h2b zD_X0zVtp)XYb||fTcyt{+uL62zn6bO+iEMeY;V1lYpc-uKpt-Xzu%cWW|Iw~wLS6v zC!gJ%-<)%1@}2Mb{m%Qb@`|Otkhi+UAL#Ies_RG&;W*M*T}=paz<(9|$3Hd@`1l35 zoKDUpI>^M%A3Bw*h-AHkDAzfcDYepr&e4t+qz>`3j)!d?u?Yfj~;?hzsvOVP4(C!TdJWbw!_U&A-V&VKN7gk?6|H7pUt2MvsvG!{C)YewduMYS( zS9f^>)h)huZ?&(p+1KO=`8r#xLv7x8?Czkq84Eh_gQ5;2PNesv+l4&R&Vrfoj@bRel6tP64E^2Azoi=C&s8A8@qj6b->%=4R|}7yg?1cSYPuv`?#Gw zc3W|NK6k5^zLO`=1b>b}Zv!65S6SQw4{GuUni2hmfTy#m%^RFh?Mb|0lOJ$y32AQ| z@OQXE{_1vLCwOI-sT}+Z~~GR{{VUVw}EG^#}`_!-5L8W9XrXJ zhqyBqJ$7>ofa~M>QAI&|+#7tMU_uZFDNVvVgX&;-X1zfx8LT8| zMeXg?{uXL7cz3myIH1jXn{ma-@C4A%s{OHufRw4WAy~jry`kN|VX&@IjR|_eKp-!O zM{DWsY(i5B;yX0?Z}0{@t=@^TP%T?vtw^9clSOOs!m3QFlTZQo{3xU_EwONbjmuGsNSUmUS zm>{S&-d0>#$f=q|V7`R^mO(FpK1mZuDG1IVewQcIR-KL=y#e?bi?w)mVJ6@R!95wj ztvlD6DCAp9Df=Ce>Epk75M=a8LcY|ywe|*2JLD!^9$x@V7V==N1gOS{%^ryC+2HRE zQT@eBs-9T(B=KqwNM6UehgjoibTIGb{$S7t#VQtC!C7(N>M?DeAm&2BG1VLV{&ugY zQ!5+bj>SRvO<%B@Vn{EQ8j{ZlZpCM`-Y|w@iWe@J&0h&d7q>4EIyyX^&9U+di(&1l zkoTi;;_qmg2;5jb28=QYCYtih_(Nl%m}AACKd}oq!KZe3nl*FBMA1EQbDKBqaaw6~ zktgI0`8vGS7=?nNinZAjtZoW;ArQ*aabwKqQUgpa_hkIWROqB+7C4 zGCl?a1_K5I1_K5I1_K5I1_K5I1_K5I1_K5I1_Pf?1|*ZYLWxiDn51y#^5WPefEg2~ zOq^kdw=yZmh;mGM_tW`;25N%=g8_p9g8_p9g8_p9g8_p9g8_p9g8_p9gMl~$lDUG5 z_X3#g=5jIC31EQ;HsuILt5VJ=?5c8;|%Mri_R(sTjyunb=6>Q!ZbaibFwSiBkcXJSybHbX5K+Maf^YV20 z+)eF1Z)eEW;cxb~yP89OcfcF$g2i24Se4QZ&j`4KURdJNmhexz_5?z{rgm=-mXN5^ z%Xkvm^eKA-1U{`4fcvu@c#LXHi|+Oi;+|UqxO=i4cZ&xW6E&x54&pB=2K_q^qlp!#;+t=v}x!njxDFiShn1Bg*VYO~BA~dYGD|r~v!E;FX@%6IMGF)$ zT|U$%IR`KeXQE9>OnQ<;1ppPZ1Ej}dkpYXs1WRaZm)G4L^0i|kiB4vmXq6OqQ+F@~ z+Z+HElLS~qCY)$k5QO3Y5NvW~ShVbeCBIPVbH`UYBOxmB4%vP>g4S zBBiwI4zwpqELi|lZ1R{mDo;zu8%O{WZ2*W(9s}D1Kx3j?Yc`-w={XX z=zbFJ4W6JE(FhhmQ^*7jRx9EyAcSJ&0ZJ|tC`n=v2r&Z?3lku~2d!UOP0YB!WJzYc zJO@CW|3ogJQC^|e!gr~f58uVx;H#h+zVepBS8g4A<&>Ko8;Q-HkKF(zj@#_{_7~+J zN_n!$d71OSrGw@_m=|*Y*K{*iKvq~Uuza5X!0{x%(NQXQ+V2tC>_hGVs5bID&D=ln zy`W3rpW6N}S7-2%O`oi&@sTlX5T&=Zwf27jLtRS8q)WbhhPss2 z{?B8Wa>=%K-0Hvwa^GB4;UmM@Xj2lCF2!P$Y;%?8>~gE${y^ri{m=d1aAWE>m#>6vJkpSCTo`?a1bznOHeDRlMM<1Knm4zJ~DF<%zxP!Uf0%UPbZAUx!OXZF1N0W$Quaw1CY;- zllPMQ)LcF?iVZ+bKNA{B2NnR9e=F$)>V~NXX;3>XX;3>XX;3>XX;3>XX;3>XX;4E*n9z|5J6 z6W9N9%2@(`#>Zg5V8CF&V8CF&V8CF&V8CF&V8CF&V8CF&VBmit17@>R#EJiS{vUkG zl{4~wd7u1%yh>goH#jZQJJRdYtI~_oFQlJH`=xJ6UvZpryyf__<0Z!r9A3u~#~jBP zN1lV&-?zVI|1bMt`_Jq@v_EP8vi(c2cfhUoZT5h@&3>(YiG7}Zs@NxP5!=M;#7o7Q zqDvepmWsK8UvLYJ!g!%VAhvJX?zZi+-DvByHQBDQU1pnYbJ<4O%592`x1P4XWqs9p z*!rAxg|*OXvHaa~%<_`upyel){g!X>Z}PwA`}hui1%DAgi=W63<8yec`Kj~{T)aCeSgQ=cX~*5{x%32yNw3D-}}7|$C3TVs@C3Q;Y4-%P1Kh} z4?Vxy_6FH&D=Ga;V+DDqFWUS0Z_B^t8kI>?UQ%a~W9sh5%^yUg(bo@j9Dzs2{%%f4 zAS{I7sDj{x@*Ck7>uWV-fS1vSQsY)xH^Ym_oA-)0 zfLm~b(0}bLu^Yv1Vf{o-2!WUv68e9X7X)c^Q0V{ezW8TWUI6_9LjUjLUi+>WHsKwc zg#LAM7f6*|8byst{W3o$R;8a38m)UP{Ftp|bKeW*XzRf}lmA5FMH}>K0W$Kf_o_Xu z#lvrCw$X2fk~E(4TK_2dSuC=-;@iB4;DWH5-#m$@c3p^m-a9`0ySd zFe`F}_l{F!m zXgC|-YU&2ON;RA-JjhawhlYitb($$~i=Lac+(zb}NH-eL(g8i^gY1JUSowPRwfglm zA=53x4S|(z3_M04+0}X1p=E5lPP2>wO!z1!d`~>#Pa(tZgPE*C^B>YSq6eNGl(?8^ z;Q@}O44qixJw^zIt+=6SV zg{(z!Ewzv}Am*)s^vt;iq?&7z>HdbW8pBpYYUN%H(#WfImSUB!0UuD0_2)2k}Syf=PBx)jZ035GAx%wsXgHH-D;aS4WAqM66Vc+bUfkGKe= zf<@r_ihUtQSctd3B3y(KE<*cR08-fkq#Nz$Lb#fGAzr1~&wOe>^J&;8WIv7YYxRxz z#PpIyYCvEOF<|-g;A-qV`s1%Yd}RMq9WPXcE9QddoVnDq?@-&U!_iZq6>EQsMP-zP zsIR}F^3#^)r7C3Kq%mSmObu9lrPH#VJ$oUbZbX8~e))?RTYxCJw*iPfW6PfctFho|1mWReC+ufeaokH z_O*Xd&X+8D8UmB4wN3t)TH7Rit4U~WE|7{`nzc;?xn^RL5ZPXfp|zT|O~8950CB>2 zl*XgoT>w(S1!#BTI26YT{eR)CV?mV1nuIYJZwwmHXbc>U1|*I`aTJJ7VI+o+M57!5 zQqc&ss_8j3AlKBOQT`@YW(~*C;SdUCRyE#J4e4R60!gkiSq;l{qD@RYX+cLPCT1M|nsW7f6#Y7re zO2f{hZivZ$_ItYIFVg3=k7BU7yaax(z62kcZn$zW1XdPfAgvNwi{M%=GKq!Y78DBo z0~U2$0b1gUf|wXx zAAKApS~qOOOZ;f{n`FEyYd*ry-)qYQHz%*UN6f|d$VKC{<)B|qb&plSNQz02!G#sf zWAkCJ4~XUD4a+{}(V|mj z(-x52XLp<4FKB!q-#_o|-qXE5;4UvCWIb7L4Rgo$&TAp$uhNOvU)dV|@dtoC+*3@R z8)(=bh6UC5()v$08pTZMIDIcFbjaZn(n_S9J~F+oZmn6GM99IXwpu4~v)~tAD-DY$ zwjJ74@*uZ|l#?(wI{vh}dvUJzQ+PR=G}`(U5_Xp0Ril}l=qU*kiA1@u`>T&zOV*pn z*#-!?;jnulX$+GA1lE5m-cQQb<5H7FRmV44$+4eX$tC@>IdaKae_!3-mi~BBusN9!9QABKKtlcGI0|}Haxp?OUuAL-&tRJqUGYucFXl(yRzRwp>q$wNBUZ`!Yhr!6aTymrv5d$WwTs?;#Fed+aV#7^n*$g2#<9 zL&$Qo(0B61a(l_6i)F6AcYq^HSMMFL2;{7J&XpfHCF!hFQg1W?$eke*=tT5gh4k$F zhBz?y(i4B}JX!Mgz{`JlVdtTSQxkgY!sb3t&ync<9zx!O#@Ks*ism(vhWd9-J~oe- z=MJ1ae#H6ClWU^0o@gLbiL=ohf>&MMb7q;X(bjnU<@r72Fd-1O7h6te%za@Qp25j` zX8+~QmqPP5|g#$z5$mOLJmjk27cRcOV8QI zG_SqT_#^N4n2ym1r%x{E2Yij|$(yrC<8x&vCI~-n1dpyo9q&#fxulQQsv7&a`fx?5 z!11C8k1gAQIE29xYeNC33E8m(9+z z&Uc+}IbV17JAdbV(fOawpE>`{x!?Ju^9ko8&M!Idaqf2B?A+np?Cf&-oEw~Lomax1 z1&f>w&U)u$=LOCY&SB0%r|g6i4y9Al-=)7uuSvg`UXl(;&qHs<52f!)-;ll{JuKZP z-6h>7g{93>r{tBcl~zhir1?_4iD7K+m0t3 zy^b$B?r`jK+~f#2e2(>ws~wj+7DA6mo#O(>a7T$laae&?<6|&jFkmoXFkmoXFkmoX zFpy0Q2)s!&k*|}lYr;OVPZPdIzNQIJkS8?ZtK_Si@Hlx~6TU*eq6uFnU)F@j$YYxD zD0x&99wCot!d|jh6M9LnCOk|Y)`W-1Lz?g)c~BD`AP;E5m&lhi;eK+zChQ@5G~qsS zpC){fd{Gm=K)#>}_mX=x;U032CfrT#)`ZWK&uhY6xx|johXQpCO;ogj>n2ns5ubMH6l&H*3N!vP%zE(D|NPPq0Z*b)VbjX>U4KgClsPiFi4$1 zfI6EtQKzemI(|QOIyGrG+|PFLj!msngU% zoedkP!~wi26d)Sr_Qu#)R{V!I(2o_nKFeslP6PW(j@A*T-2F3kvg@t)R{1WI^)Mv=Yk8U zGj1Gp#*U@Vm@(8DJ(@bBMp0+vNa~CjL7kc!>I@%Fo$6}pR8>)@vXVL#71S9vj5_7z z)F~^YPH8E1N=m3xTuhy!BI*J)P90ICjv!FSW}}YPN*#-ZIy_Guvza<36Ayg=BJC5($)-%%z+y09FkmoXFkmoX zFkmoXFkmoXFkmoXFkmoXFz`t;faCw^vsOOoUooC%FkmoXFkmoXFkmoXFkmoXFkmoX zFkmoXFkmpik^y7XX;3>XX;3>XX;3>XX;3>XX;3>XajYZ$=s|1$Cm zqTC3p_FJ5fv<6-J6Dr*R)*bL{Ms#1t zb15fh8#+YxWjqGm#T=QxJJ93}>M45+j}{)2MZl1)d(=ukGM70huP4yd<_`KgeC?iq zp0vBwQa&<`&H1OvqtRn$;p*@KcQ>eoe55u@pe0SSo8bY+X^epfFmD?S`@`Re&yn&dPOXr2Uq@D8aN`i}@vy6dS z8Bnk0L4L+MRdu+4t6Wv#Bg0u^(w*d-qdNIWIotfz9r9zA3iOa~V0K!^5KgkHqpw*Y zwC`k3Ei9-N-iYekm@~}C4#EZ%k_hf8)-?)UYEp0r>RSv?R;Srj5>#r2itxUR#p4L( z398E?$djtfM=BUY(q$6gWY`p=DX1eyQAIvd$Sgy52fV>9e`nAOs$)@Yd?c406s<@G zASRXPBTmt^D(DRaUCmqDJ)Ldcp3Z+sg+P}ycGGE6OngKbPkgqZ_5YA}&10-1Eh_&m zzux>4(}i3_xmdp0`3q;RwA}GU`>*UZqEGl9`6-{a)n}|P02^+Thv1i?IyTYjRkv1= z0_tt5gO8LBf$?8Z7whmhd)r;Q1SnGH@sS>uV49(35w{R%>vlusGT@Fimg4^I7LTvp z+nnkRWR|GY`G`O3@p}RxUsJmmU$nbD1h`AB<)n7n`R3QyQBue9B~z1SQ#Z5+;5DXT zK|PlxvZnU#V8|Qrb+!(n9dogAGcF6@xnl|t1kM^5=0%$Q$2bEl^Rh&f=uI>yVhv<@EXf;}`$=w7wjlTn+JJm^ir0M*jWB1A@)tjPO z@Zdr-wX{sR2E-fG8GK|@_9D($zOPqZe8iKzz|#tLk2;^e2%j`6h_N1x(P3lZO@)2_Le|DCb z+HI3m{50tE)kc1&IeU~QwXUso9-PZy%d<>t&hHJtUdwR)e>u5=C|l(da)o?FckyTW>&?G6Uu4?F9pv)iw)BtMP|lN`W+wd_ zLlw>EM}ait zsrDiOR>}~VuA@s;3IWUrCSU?y+F#<{;BCR$SexI!5$z?n01%B~f+#t@5lcH5{l)$q zwJ4vNE~R7AC!al!nJ#I-^k8yxnWY>Z+@RB{;#Q{(%c^n?U>eRuo06FHB#8B*4OE1Sl~KrNUuota9ZWJng<_I=jW) z;SG5}^k5R1?SRO^L{)+?nWn>oeZ*?M2q?xgL6K5gbqCrLC6+7zDmHmc9F?a9dixWA zL>mBNlgFeE>#49II*F7sNwQ?eYP<_r6)b?JkO>+n4ie36)MYCVP;!|-NfLuVh#7!b zm;iy14O+jlnwW8c$&$=?c@BU$nQ);in6dp|LLMMWi~NFI@BD_dKw9N^80P+u5_b#l z3+ru%ZFSZMEKy4nzt{ZV=5eNG?hrQ(ZusYa)Z#i|sE!FkT2Df}f|oiprWQ}h3S`MH zsrYcPnl~Acjbp-Ddh-E!L$kkd5_Ac%spxcVZT57+(7$W&fQ^>2N&Y^(i%*^D0%kX} zVfG(+2~2?ciGaQPQ-D3aZ>X^rbcaom@zHcAbN5i`1Ymy#TlV8wS;`Q)S~{LRHeEZw z8wkMUqjrB2YHi^KfX&60w^VG1t85(Ln#mSdTPW1!9txauEP$(G3r<(RPz%Q}OGIq= zyHYudD_8Dlz{RHTZ%ACISVf}%6PtcyiYcQ~%^L}sFq;873hW;)yr+!-X4#C4eC!uM zjhI>kxI36w^ZDaWFSO?j2iV)Q9CqdcyRaJIvnhBe>zN8`u?ldp>1?66^!a*GC17Eb zS80v2Oc{G#1ps5y0vZ|^+HvtP0L8K?n<;C@_J1kqCQ7UPOL?;MUg@mlcKn;8+P*_P zDy|fs6-sT_S^KP|mM#1%{4(>8%*Cd4Tpw2kw|xAMTC)`BSj;4UNL1?6Ca9!VjYnJx zATMPCl3H6D!1(0cL6a5AmH7{CSDQ8>8X@S%iar>V9&KplPwAitO$ z@>t=N5i+uydof^SScQ$vVjrZA!Xm)Lrq`RQV{&G_TD}mV%x0H_=Uf<}R$c_?=CebW zrdg@k-^c|3@G>R3OFnc%RwfMqU2D?WEFSTzUWEno;QEt5&j2FqpxLN@iQ z;?ffLTcw?Uq+S7fx)Up}O zNJ})2;;_=jKFg+O3%KO)U1IpNXc~ZH(hv2vzvtYK<3 zA6f7bweS<#UQ4TUrIj%$6^S|Oa6Ymys}QDU?N>3}bWS5Nv2He=q5GMyJ&!?3<*JL} zer|)fN>MYnS_WG!p6|96TE_Cpu8dAwu^3NFa)&yKk6e~jCNNZ&!UEj0b#_+5gf4{( z8SZkJA*YMY3>pNuCYc^0mCdL9h0tYl+SP*A`O@hOddm)G_}ewo>$3y z2bol0pyw3~H+$3A>V|E@+`i7PZk%9A_AuNLGFBROZwNL8d~_QW{oHf%RfgLe#-PP^ zaZYAaWG}-FA@!gVOu2QtRo<5+j3vOKhJBH_8OHZ*ZuU2IcX&Hd@3&#Ce?H5~PONqq z$Cg@4B)dOO>-ZCGm!u#}sV;8S=Kmic%60M~d4}_I(hJfg$1V0__DjVlL`k^b_6yrc z>rTrF%WD2V_*!$w^ixwVcNIDC@dy7u(L2?GX6RR`WzvC6JA7jFrqHU^Hvz2d8TW~y zOw@K$uVXW~=)yPG27unggi$SP96V%|3N_^#ashRs2M~L*7IFIYxasQw@TRN&1aH&Nl0n^ce?SI5o-V-o0(vV@t8DxsdWvt;u=8Nz=X!kD3g_LwQ4osV>8w} z^h~uh21~C7glrb-42@97UiDRgZ6TA?)w13XSHQAW0Flj5c?O6&{>rZeaBOCSCG+D{ z4qd2%m<5hm3FuZbN!@eVZfsekzIs@>0+6!FtUnwnQaSqy0C*EyDhF3#Q&T6c5u2-k%`N;_pR1I?h*Kwpez*-!%D$Zc{9Xbq*u`-F{g0La8SS^0;a=(=?G@6jcOt`y zkO}DLT=Q`m!6M`!k*I1HG$IBVc^GeVZn@N>+HqZ>5WjKQ|S8;GD zgFzFrhqz>mBt8dnI!+v_VoaQFIA|=+|1Tr!iLzFHMlN)Qq+dwm9e3H^v0o?tP%IR- z*$hPKfbINW`8DRBndh5+WO8v|9HJK>%?syJ&SYE>()S7^`rfdv`8CXn zYFVR8pPuw6!^wE(T*fku;TcdAm`-)8@BmE*8&gW|6Kq#GKEmjfcp&8GH zh}Zy2d}DpxR>h*414r~`1*+I~|Ah>X6_4{YX!B$t8%ojC*{!kt(Z**(EiDxrDEkEr zPkv5Riv~}=eHiEX&CQBZBvHEQ=aW8^J*8X%AC|rkVkzfh&6}^o*X{|pb+byzXK*dv z#jJr1Iw(G^22So$YhXQDc7aT(iIbZdmP`p_O^g!6>)^p`$aZ6>Qm3GVZ~$l;n^H5C zv6R&G;Yq`@87o{`e|S7m$>-Ivd}JkK=03Ea5<41Js#P#+JzJ3iz!eN9ttXUl2rA=g zeT_Pjk6fB<1g4tu8ip&nGqadt)JwJb|C@<&iM+@8y0ccg+wqd4#@-=5DV7VLu^or8 z|NpSMEcd|4e;)Hs%%e@WaR0$cWOG_W|D$=RdD~!O1j~(k;!8Gk1;0A|CIFQ^^Rm-2 zyTRkyx>-Z>Ze+GU?@)90GXc-o;jUJ|Y1EA7t`3@59@mN#Gf_*n0KRE#rWJWYZ9x~# zMvm1PVi@BS%_}xDqfR$vWKeBYzq5r}asxB!lC!%9Qy1U=r=T04u~|Hn22D5Jyfg%` z*i1uC6dW1qr)qu>u(3H7D;1k=a<38qR3n&}C+(Juv86*)xCs!knIEY~lv*iKi@E?8 zn+=i%WwdF)a{K^{%@UqLz;tPt+X;}^?5~=dvnD2r&+Y(BSv9*kq5B^`twEjA4(NSM z>@<;k44z>1A?Tqsq)y%lpj)#UblNNcb>{Ved2=>n&RiEP@d0*5b*=b8OEI-btp?6$ z187;ZpY@06u6}ZZIowe<@T$?j-2<=GaS|6pEf`X;xDJZyc&TB@|mFIqlpKWwiTpAsuST66#7 z#%8z^hE|IjVss#4nMCIKKXyMTcK$Vd?7KT_LonzYbOoC?23=iSLv8-f+D`B0V3Q{V zN7n{oUM`&%wkxzlCtdoAVZ5Q6S`Q+^_h6(wRN+W$a+9uyj)_DFY$QkZOO4Dlap!NeeNXBR% zK}~h&w5Y^@v3@}NOSsG2D3*EXU~D*;eZN`=Q_21*it&;1^^`oRnc;L`nv7|~IH`HT zYKEh+LnBP)pI0-?(RFiQI=mrIvnS*MJ#)ZW-VueJnz_3}zIMPNvo2Y5^ytqF9m8+~ zN~%q%xPYtC42LT-Y53rgBpj8#l;O1LbE5=sOBfEB4-GCQpS_6njNMEdV~@gVLKm~k zFkG>gXIeQB--`@V_Y!CxUiOJq2N^Czr>c^1w)qp;QEdrAohs3!dIZP+i^(pcERuIR zUvrL-u6O*#QEp!?J}n#2|;SRI|C12t%16$dWe0qu~Ga+nFrY)6}TKWWCsx;h-{POMJQOZ4@} zdPp;McBmCFC7ji~11+-{oV=-(W3?F83$Z#llmg70z$MUNWz|owjo4+zR;fyWZ9bFU z*g>O-88xpIHveWe$e(FO3927veG6cj583HpLSMpm2lvsWrS*A?HqKH-;CSn&@HH?I z3RMBnvzbDWNQAil>SxK#RBZq(s|FV{X-E1n&3tG;lbyCtgHB`|vr(&63#0&>%>a|C zF}UbTX%MLmuso0KG&3QZmR$dM{xMxO1I=vagMR#1z`P?@H34!qQ&+TlP5Qu@It`Xe zX3-Go`R5sPRRX|!vR#!k=NH3z06&{UKs9YRcUIB319A!r6MD7E+CQFE%-9YLvzZw3 z54-|o71;jY!8wTXo_tC^Ebo{1$q&e@eN+01KXh`w#6;+P`f7lKpP`t@ds9fW6Irt$m4o zo_(s=CvFkj#OuUM#hIc@94VHHxq@GC3ys2fp+X?GZ`$s*?Xuly>$El5uCZNan{9L1 zM%l`3ijB9Pw!US3)q2?aoOOk@&}y;#-Ez$GlI5V~Czkz|Z}D&Pzvuh-4t@oH5kHHc z$PeRlc&quW`2@^gc+vd4`C`+1razlrH9c>7+O*HqYr5C8oBI{_Q|@tYF*lVfg_qYp z(hi;z%XSF;?rT=tOr_i5YU*~pD(OEGJ-ff-$iMIJSo=;7sm|X9L1VYkp!a*f*Woy_ z|5(-9n=G6ND+s7Bi5_}>we1bE*H%*cm&OY6PG7Y5^WT<#%{3~Mro5!iBFEI-kDEV; zMx(DE=r{t8j{V)7kU&@n!BGXV3FSA!FV^3P&#v!T^ec71cVvHUJ4Ue)le`rIE4O0c zG5AGEoxTO2MB29q{l|NrS@+BLdpFsJeem<|o9`Sr)6n$X?$T%jKDlS|f#YYM&Gh%* z5B5IzcJPq_jG6ejkD6m#C7febPhs$Zo(~T7R*}2k!Hc;x^cadq@yq`Peiu_;8UZh( z52ePfvTlYKkvH!ZZveO82BH7jSzzQn%+c0^dnW&h z!izTO(*k7VTklnST8oF@N>3*~a7QOn-hJ}!mjl0C_RCX0Se}eQCHDbaf;bRPD^Iwh z9nn)<^TsWrdWN!EX7^&K7eZG} z6Pod!W?)xp0;#MC$wb5109R8t;8m*OT;V~MYCJS79Iew#fm`(4tmQT`_e8qUfR+yE zIUi&nRKd#E!>`q^rwN&E8Ey!ybYtK#0?Dq?4ZQOgbojIG#!r~7=Uw|M)!E?@B>e+Xw zZPwxFDbR|wzr~_5O2YCS2(Fxi!I}kD%|;8HH#=s5(bBq>gYQRsQN4=a-hTAtkbkwW zpMCAYUI!{d;`5}I{4o_mr!g8vEz}#EPDRdFm8`P>u{>+9I1}80nbgGUQLLvXHUq@G z8AAWsoarFdOiwD;8@bcKXXG@UVR6D#j6PN9ua)aSs;tw9fI@oF6iiBK3VPH>OR@0T zJ-h#y8U;S~{Efcl(>nXwKPcx*7CjAt$<*2=|4XfH628?Wv^Ez=MJ~&Dtj5JrjU9VLVFX(e5q)so(;%J8>L}qXt4QMn5jz$9# zN1-?hM5izk!$+b~jsU4>1X|VfoEng8YS1Wu6DzZZW9V=Qg)*xe@2Q6LuvUR2SDA7u zF@7Z`!}H%ahbs@O`4!+ZwgP=hp6-pQdHyi;9EP4_AN!xi@7`PsM`laq;8|9Vo@lpa za5c4z-j`BgTv3XNG_sV2ok!gelmG1Zbje?&&ubsWU~_p1{9JtrJ~G{KbL^5#1#cGOGFjyK@~g@Q^B|4SI$vK9I6m}cTl#DHW{lP zo_RTXHeSu4al&YhN8vyEI7+l`*oc?-(dswJcvaSXgrC3HmIrQ5UUiR{i|>((#%aqz zzntnGtAddflOTheC!5CRi%yK?qJ7g_AbL0T@6*d=YfHOw8~JFkV1ze*=w ze`Ra<#~%Rpa8EILZlGa%n2;QNY5gZ0jbf&BoW2(oI^=K(X(dulADLcPx7I98BIMvx zTdkA0S?~+5m4?L=+Yaq2d63&f%1M|T9e-Ngz1UWJ3NJ^KMq8gk!p;)BYBZA*Jtbix zkti2-fAw)|$$Aqx+W;Xq9Cj}xjbYfo4S@CEiuaQ;ID3kaMODW)TFJ4WTgfH;vpI6f zS$|*M-agWb4$y>J>OYhdZOj; zlSNTPibYf?Q9w~Z@gf`QyI>Rg-_EBH@rUh=E&ugM$>PWJhcD(w-c~@Woa;$Rm?Kun z`fFl+x^Wp7KCz6;Au1IA;b-2AI-FK`;4tfSLJmm%Wt`mtmqnHx1E5JIJjhdcq3%!(fPtTF){vJZ!gT~l< ze~RWcl7{+sPChn|nCA|hJbuLa&Xa4Rvz}-mQ;DxGgjr+?a7)kG$270K(D)&ct5NaJ&5Cng9#ZUm36MIG-> zBe|rH)~Xu&xcYEKslf4~SWq1vc>r~y)^Qfv|H?7t*UEFs_myubdzHJD9m*!9Nx52n zMSfo1B5#ndfscC&UGGke&6|o^A_h8XS>twT;W{goGG1_{w)1YIw&2Gz9T&$ z1*J98QfZzf!lR9k!GOVl!GOVl!GOVl!GOVl!GOU)7BFB}$MYt!fP5W$wx*~Tz(q6J zr}YQ?=gfwgufKlbI$bYYcp!Yb7YBJ>Vc=ZJI zzI@$Uq>h2B3FNET3$bOO2f8qz%lP&I+Y~sE3xDbHkMc`4brjqrldtTx!*U8l{bg+Z z+hLP6ym$;>!47lX@#0ZHW45cq>BS?^A6J$O%b-kR4cSY3L|WJWw&;VNIk2X{ByJ(S zsa)sjr@Xc@hXU~zI9psW1E5pw|@I&&>W)SAtVUs-kv4`=;L|B<>67$GI*e3>C zo@2m+LjMuKS57Y;KolY@b;4L*f<7w;EVD(f?iczyp5dxs(z;2UNA@7Tu_Kx)o`9~X z_08Wfcay_r3fBn>3`}AfxesGNZ&M*Gz%hvzkT2qON&9=RLJ#5X14Nn!>(ET%Hu43H z+u{5IY#a}zn;`G)E6(ZwLxV9!n@`d%P9AEW|uk4AJJy|^2R z&V#APCUGSBe6q7|-y68$Grrwj(8njjyjqk$2R&{1Foo45jwW~NI!5<#m#I#RNmNV7 z9ryzEhv*>X+&&njtbAWL;xMQWly)m8#~k)2yFsH33e5O4!Lsz-_&D0bxhE5Zy)B;d24 z5Du7zh)I1L?FhBQv_53@Gr--fT$oCSdU-1bX`gOf;)T&~q0vQ{>V*%wnX<}Lc^B0m zGmW*A_If&Cz7O6L0n2-a%Y}(H_*50c_R+`w#sPC!Fh*GG2kn7glDr;B9lMlA6z*x_ z*a~C#Ys4Rm7GaU?PV4`*=3CbA_nVJ$Pn%t)e{{FMq|zDEC%^z6uw!Pp{PiE6E<<*y z)A@*>;i{y;uaLTtO2(N~UUecLac3>=wCS!bxX^ynr%hF0S`yi*Ht><2tVf8tXT%E>8IZA$0XU?!fB~`QuxKJJbn)r<@(0kf&7#rwqDoNn|EdIIs(0 z_l96oz}FS>`8)Mn6BI*VGOJbVx}B4C=o0%UmqCv;E8>z%Cw0gYJDfqKKrMnEbXMDQ zYb&)fAuER7d{#*sTT!10S`myVup%vkwn5zmld~KKEtqZ5kzC}jBW}>i3`H=K!iqTE z4ktQz@!Yl$hILr2eb*sNZU__Kbfo}>m{=Vdk<30~xRP~HH3vq!SZ$xLWgO|4aL|p_ zBIH<>kq#;kM*UbFJfzDkG+>ERNrAycRtH!l)N0TMps@W>1wdl6XgC2WNO?*Wk-AMl z)dJ}K$P!CT;KMxM0VBSwDvHz+2Pb0*j5)K~rAL=BBq-7+VGfLeXF;Zwz=p{u!ALx- zc88W}4NkvO==NZ>Pmn$nO^~Edz+9MwkPSI}0vx7bF3f;n1u8vQ!tTP14Ko_@Z=FT1}LEf#Lqx>7aBqQF1TtKtF?dA`aTCEZ##yZpUMh zrm-0o*U>f@oR*|pSRU7&>}4JdO_#8n8O{Vrr7oVHoiKwvGAcWgGj@>kbqtTxNTW%Y zeCrraGfLu0ody_B$SWBhTX7C_nq|&rc>2yc!08fq7LNZ5jzvV-DF0TT?fi<jzU7%&(x7%&(x7%&(x7%&(x7{~?&VAOvajPJ3T9!iI4gM(&v<*8Ev&Nz0{ zLzAtK*mQnvI$Rx~nw<@(Qk#x$bYjC=@Hq1wDHuYZYy)w)#q5>#Nkd(7Lgi{D0@%S?#}hWwV{jW}UTQwo^am9OiJsR$lI$<@EbDI9ok_XT7({#TJROlVd2|{JN=$|kKfZ$>j~&6hI#9TJBDv>ci0PZb4^!y$TzwD zweVkz`x-b9`;@u$@Ss|szYe3X@w;1U8$E$hPIvSRYkh!oV^IHEzpuF>=yNuCTgYd& z1iV47uf^%v=&5ZBdg^-pz)_gA$OhyYzXqPQ27k~R{m$^a4D7^i?&Z$#<>8y_0bGkO zLTl_s{A#$FU~Xw^t^vv~Yin-Bkpp+=FAn-r-I?m%pfCKfXB;=Z#AWPzT(c&BB#2*0~Fj%w|OvyDN&`Qt7z`7>LZ@JuUK_A(7LFBu} z!jH5go3|H~m6@(uM-&Cq*SDO3laPpvoDO5&9STTxS!(^pSS2H)+} zBL}qEXfqWNGTeS_Xii`FLO_~UZNp#zgR`c|R}-&mL}LOTFc9zsk<04aT57SW1n@W1 z`qq2=?gr23@LAn0q+5|db;b&|g4t!MR41weuCdXeLo2e`3rb2%A%Un-IJUyV9;ZT) znC!)kMou+*+<`WK#F3oNNk;C7dC7>4gwMd|l-q3uvr1BZPWU?4*l>W??3}%zPal(} zTLkt?_|F>m5%@^V1QHU0Gl$>m4mLWIvE#!4e5ln{Fs)B2;245yEdI4^Uuhy9HdE6~}+5mUV4Zu6S z0VlzboGMkto)OrDpV6>>D8Up-T(Fy821XaLF9JxPz#Q=@a-K~K=z>~Z2t z2pFPR8{7eBt=|JDAuSy~)N(pCz_H~Ti+^z`na5c51B?O2z`q{@7L(az$K`*s`aekh2!7bc7+?%A1{ed3 z0mcAhfHA-rU<@z@7z2y}#=v)z0m*FXr$)MXj8RRNl7et2fJvjrjh^IyuQIDgka|S@ z^t<_i3^ikbF~AsL3@`>51B?O20AqkLz!+c*Fa{U{5e6hnKU1U@!0fP;2;oWqD_mex zyYOZG)RXFG>Oa)?)xYWo@IkgQ1{ed30mcAhfHA-rU<@z@7z2y}#sFi0G4P#WphW8n zI14m0{N{P#CucGIWKV>jtiEPx7_y7&A&d&8T4kczp!`~TPh2lwfe*2bF~AsL3@`>5 z1B?O20AqkLz!>;O7|7Q~aiNu_isb>A<*dR}SLgLqto60jdmAbmJS{LCVbJFfA1EiY zb-@vs46Quq2?PTbfx5MUiq=iRMmW;q*${x)PGL$hfA~;^;gGx4>#A+?dRl@N!A-56 zin^fB<@W?yVd_H<%-PlkkMO$!9+&{GF?t-PatnHEVNyG|u&pTw)2aKNcnt1TNcj*5C{9?B#v5K3u4rDvZ`mb?z1*v!V&+kP8G|jUIO$nVJ*0g&9Nx znB0p2T3;=n3sq2sM${n*R)Z%P)dRqGj#`WQ^cL}|rgEYFQ~@{p>O4&qjlp263+6lY z!fb(H5H643@ACsvT*xiea=6e?s-U6~oM=js*u~{+JRxANmdk~P)5Qj}R|YDu2S|+O zidG*{y=83vzuuIa9b*hI1{ed30mcAhfHA-rU<@z@7z2y}#=yS~0~V77$$0#~Nj-(& zKie1si~+^~V}LQh7+?%A1{ed30mcAhfHA-r_%~$0Vvz+r{vWUZ2U{^)1MuH4lG!IQ z1{ed30mcAhfHA-rU<@z@7z2y}#sFgg6>Y=q|BpGoKrr{;C+Y_<^WS0hP4!jvSL!d+ z=hSD^AE=M0d(=DCUFx;!4t1-#UiGPss$0E8y+B={&Q@otlhiTlaCLxMqUNcxYEycY zW6D32_msaVZ!5o7URHjo98`Xy{789Bc~H4WxlOr2`JSRFo0Wjlq7c>l=QgtkaVwfyL6*;wbUVPkXj^51B?O20AnDN7~naxU`CIj$MnEHv`-H_iXPPid(mD!@CbTD4?K(>)&mcrhxEXM z=s`X30D3?V+>h?p1NWi(^uQjpM-OzOPCalhx>pa}gYMA-yU}hva5uVJ58Q?B(gSy* zJN3XF=ng$_JGxyD+=gz`1Gl1E^}sFY7Cmq?x>*nGLc8?9P3R^)a3i`=58Qxm&;!?_ z>-E5O=sG>H6YbOk*P?6nz%}R^J#aO;S`T~=eNPWug|5;ASE4KRz!m5UJ+K4q&;#4i zc0CY6Aw8fWO%HUS4jX3@OzrJNY}-b})~!TbemN0awh*y-GZC9M5wUS25gRrTv3@-f zZEZvZgG2-ZMELzgtXoG!Yby~x9}z7rL^L-O(bPo5+O~FA@vnGiDGmeL4}-rV%l9DiKqr z5HWc&5tAknF>xXh6DANbemoJCl|+miN5t5%M2s0jL`4M=qel}_UQWcQQACU!NyLZ| zL<}EJ#IRvR3>`|ukRe129!$ibK|~B3NW_2vMD*`ZgwshxSs4+fr9|}WM?~MgM3j^e zQCv(!Q4tY^g+vq-5RsoxM4vuH51B?O20AqkLz!+c*Fa{U{nZ*EW z|Ie)WU}zWvi~+^~V}LQh7+?%A1{ed30mcAhfHClGFo4_t`=VzNjPAE8+Z7~ll0K4Z zV4Qok<8eosaGhZ1+wGs&J+@bEQ>;%|`*Sx~j#-+_Z=2_v_M4`mXSoB(sI)9t8Pfdi zu56ly1x3jss;=6$K+x9=>rKj=Ic)>g+c7J`9_pt}K< zo^7iM)cU=xWbsXWh2OmaFrmlrf}mv?0ty3qP*b>2zjOiewfSrD0=qGS9?%?Is89Ow zU~X>4E8&hz7Z!cB;efZ<+vN5eDcXfy$3Ut^Wl-!SSisbJP2xf&=|vRNp*9#V8OlvN z8sKFW{q>4tF_pNQtwDuW(q94i^tgblDVhw9C{3}ZFH3B6M3XfE{80Mg05jQ|jSH!1 zg5q*{Tf9M+3vgs<92XMO;tpM~9y@3dfIyGa$T;`T{|tX;o_FTxfL~0M$XZDq`Z0`E3g}`uwhdo_U;+nT&$;p^ESn04!DX6AWF;!wdn0nbtoe z(rt;@E3V`zO9M9%jc@S8DSSbCEik4%>)Jd4tkUCbTTou2XVWZD+@VUEXJf60R2c?b zHExpXVn?164~%*`976?6aau7KnnaZqUA61o-X>3-D>3&R^wW*k+)QbVeG;W(#!G+x473822TeXQ?$d|EzQ>yaj%rL!FDw3qq zTQb87r%Wg!N*v43&eA4vp>=83j1>9r1m_lkkCTs*%utOp0}gnLwFz9PIa7&FX@P|} zBi$GM45`~yPPtZ*qu)wSN;rKu?~C`L+<3OKCPaTp+6u5d`(N)thF zQ>(|-7W6h@J3%sS0`xYfSf9mB5)iO~CIQh_F3l#w*HiVJhAdjMC+LRUnj4~FvjaHT zM3aL+ZKJ2zjY~C}LjV$rXudol`DpVuMUxOK4`8S|h6osUJv4SiaUeT&yYRKtdmGyP zB>#@%#cTrzRNG)E@YB%>F<@aU2bR%J6F`gvc>M+oygoql_0aBz zGca4tw7(k@AN7n|Oz`?GG{4)BB;xXaFnUT^K zW(lWNQ^o)ms+qW`g?;UcrZE+O-9wefhEmLiJ74*@t->kNB^gOx@e3{dE2$xbEJXA{)z2gCk)XV?RBehBSZ)L9hB$WTRiyw%W zIsW80OSq9g$*;Emmwk-w3ELp+)!duhIhIE(qSV5L5KZT#Vi0twYpIU_0=6$Q8gf@nr!Nb&%|>H zRe&uGIqhCtmxg8n7ODjyohO6y%AElaM$)&((|fP{>41uAhA@R4Cc3ZeX#k9Bz9!bO zEzyNVI@{$>rA^jpFc}Nk*;8nf73*e}NLF}86-}B9n5dS&VwfWJA*7Q9nIcWgonN7m7c=@XjkOT^k@4a4kut7s*j!lH1sF@(LJAW zo*!cmAoK`;S`ne?87dBm_*$v2ImRok=HbL~*l0CH1O7JMkQg6*JCOi-f9wbGxbFOHdnh;nJ!Fd1eV6gz1=Y@{0$x=!oMg{GxJrIY-4#3>o; zx6h{UolcWChS&t}G>v}BcN$EF{Q6Y-lgh+^g>$17;Vx}s>CZ@+j75*HJo-K<8HypA za_P@1rQ+OO^zswMgyZVAbg6G7Ls;jlZENrH<(O@LcyZJO$Z zYLkI9Yb~SICgGf7Le5MZ-3W->G!clso5h?mghPfyVP zC40x_GuRD4shatj08O@^@-=|dm1%^gHXz9bc&WA{gmW}{6;opJW4{#OO-!u4C+tAr0Jg+FD**}B9vLwtNtGprCaB^|02kGMWYN4- z60F4fH!bgC09Q^`uOp+wlEB3ZG+O>e0E=q-bno5UlK9G60l=sZm+BpufvbWG0a7K+ zDAYY=Qv4;6mAxF0QEkjmfy}^G&N9G6wKG}FeI_y%sf^P~F91-pXhvab7tvcauhwTN z0Ho?$zZ@X;`Qw%VE^k_hi_a-0Ms2kEAyQk859l+V0+&t3whH6FW#po)=wnv8|o{XwGmus#diQSB$`dyST5wrM64-m11{5sbD`y#2sx>u zWvw=y3vHs>g&^vU;?*~)PeFLv_0y;^x&|9x!*>Wh=rg)no63dSG8uGA#YR_Zg* z8GDk3qpLE;LnkG_iG`O~u6qeq61s~=r?5*sj}@Eo=*!J=OvZTZGs6x>SwVj(ihqsn zlqOkDf5m}+4SAA5j!r{|r$`~@w8Kmm((m0DrLvddK#OoEbTK`-h}ejr^KtpVFItJj zD;@u9-siYLI4D$F4w>35)pC`z7ac__rBePuKHGk^9oYib6R=j|Np7vVL~T_*RBGjy zPg6#xzes(Q@09)9AH_;glAaVU+#Ll{foOlq`*CS;LYm-wN%!R&>DvpbT~1NzchXnh8#x`hC3K|Nm~JE>!N9KZ8;J`=wFhZc%pZ5Iz^`VE+Ge?BBPS*mhW7 zvi9X}v>dh!Hs4@+!!#7#eVUU0H*-qkVeC^n=AG(goP;(CN(<@l@|{!=jbFSrR>7=| z2UVxM<{VM=Gi&upS>LJUwgYUcGt>~+;k-;F<`Xgy+N5oOit3E&z4fb375mX#VZ1hw zfghu{0&+LaK1p8#IXFm7xEuhdVaBFN)EjD3wDK*0CGFkRQ$>4H)w?!fGvM`QYGkK2 z`n*kmn`*ybT}i*h>eY<^i|)9y=%OF-&?4RK^ES{XD%M{#0g<5^OHn9BgFCj+6T z%zHUZ%TOMA5!oN%tHqlfpO{D3i!5(hmYSb4?LsfwuD71#-cxLGO7#8c2KsXq5?o28pGeaOx*qok z7)if2FYKZsOeNG6w9{`njr7xRHZuZARG@V*duYd3w~DWSC$5IhO@mz}PmpsT z{rN{p%)~dT+)aOaIbA;pA<=dV<19UQr8SPCkRa26?$jjcD3&(olHgS8=y$3lah241 znP}A)(Qkk59azlot)TCK4ZQ>m3(bpLIc+O-4RW;wy-lFON}AlifeYiJl|$3i3YZ87 zm>EKU{9r1bO|Gz?Pk)Tw>A?YE^ANJYAKMrMjDfGmfTnVxvNU8u+iC)}es62g>uZV2 z=Iq7o|JzI=Qa@9UD~FW*%0A_8Ww|m>sgkYIC(^sp+tO>&ucV(tzku&c4~fUc55>QV zuZuqsJ>ooZx;RwK5s~AV<3q=v9futM>G-MR3CDwuyBxb5S2-?s_#KUoRgQU%nU3)= zu3)3kC|oMc7p4dm!XTkY$mV^#i?8NK^8I)Oy$p8Qci1=ETkN&=i|q^T)9e-Y!S)in zYUgYxY#-X*wjHv)U|VYIW3yWSX+2_n9eO1E+`8ZT1MUOvzqx~4Gq;pGhnvcc=K6A3 zoXv8|a@6uC%WIYwE$5m)Gym26w)sW#)8>8VPV+71ou=QKeqnmpG}koVR0JQdZ_+l- zBouGsyIdDvWH%RWg}w1x@!qj_-|9KFzxl2I*x$VJlXm3Hy&O&ryPTXl-udHZ@vZ$w z%2sZ%ngng)7IL(z=am;PvcHG+*b9sPUfmCUaFIg*K=WJh=SUyhBr>$jGsNZea>&SZtq+B%bV~ec4SsI!O7B1 z_~a3IqohsT2v9;z8~Lt}+Mikd^0Cf!_P$^I@>$FE-6yMRU)WjHQ-z=0KK8&zC!bIC z|9^LP?*2G%UpKxoy15Qp!dykgk+LW8=>zRwywX{Qc71|(W{|T-aPTnx@x6zC3&>G& z0p9JoC-K@c+Xna$Wy2m}J;=QEeAlX}LK_aY@oPq#_#gyxf_&G{asm(<65zX@+85cT z=J@e3Ki~C-$f13g@$2v%>-etKN-Km)TXl-6)ya!|II>E8gwUSK4?7;P7j8KCs->sl zr8~y{g~02nGR6gjG2g~R&UN-w>ZV|t^TO1{ zb~NK?veAH+b{jd5vk#(RC2Qbqlh=@lOtuUcoGf+WlSdFlyEgMuY#Ends#``kj`$uN z@$Hd_KaLr8y_Cu-^y9tSM$dug<02PFT1U5u#N*)u-S57lqPaw4J~u??Vf?!G3-E7` zl^iD@MfQ8nPrAI!wi-T2S-nSC1u}0Hv5=KGxRO}NB@oQH1mZL6Vh9bmI2P~k@fYE9 z7eQ=guYk~?6$VSODHp<_(hH+JOZgLF7lZv&_E?M{?b= z)0x5v-9_k3phNA|TaWurMi~0YgpU*NfZflePvJ+mfvCk1Y7E!$7vQhE0BiqJ2<0!; zwSNhO2P}!Ppg0!evx{}@Uxe>j1osH%Ln!ZjINHy#5MQtmU(m)cz!xmQ<}n|K=411i zhtJQ`&0{Wv2h25^$9eeddAfO=i|;uX?h)odC~poN{i9^oAVPI8ZV7W74Z`e%o^0)7O zYyXqYua&mae1d8Kjcp`PQQ6)WGwNo5b}P^QD_(&_lLZh>Xfum#SX7Pi2i zqRRT0j`eh6^(y#y>*3FP{a^m>sdsjFidYe%+Y@^9hgArR>Yfg)g+^mDsK}YBl5Hv= zR;KO|rhv?wLQHHj4o)T}HVJ|`llZQcSrZ{NU}8+U-pifOeA9wtNeC5*y``RDp`C>^=m47U;wy{*L zZ4CaZG1%HFAe3LBTia*|4;URIL~)ekv*o(Ajl%bg0^<0QI5ZO5-3SQfjlgy%49CIY zeAnMiwqX!dhMD=H_`0FkfQI0cL$Cn}gK=;$1Z92@K0gQ>3&X2MoYQ z`TKC1)gPbj4`(6Ga^icO5FfTO2q|UetWtb^DUOC0pS5(99@29A!I5G8@R4IrcZStG zw=X`}7att?`?Zp%2KsK73cVRU4j%EpcgH z*b=b{wqq4M5LUsD;Vq}hBleaEej4Z2u}y}vhbQ0YITgv~kZU@yIUa_;o`-RWwf&%qI^;sUS8YK@+Y398gnCRJu16lW6|OO(Q&n(g{UO(E zRNaBPF|e+y@cpP5rrt$pPT5CmZRp4^ZRotNX(n{uDc`}$e=K-zOrWbnc=*neJJ9Xn zzlOIDa=ZV>T7S*`!_eq;CRFqM_Ko%3H~(l&(b4*Ujuiv}Q!HSG5_lZsaqt{F)_2~{ zcYXYE5q>G&9M$!IzOQiZ!@2$Ea)YkULuK+BRM=rcHp%uoWP7@Lk*VY8B2yO9Ao=fj z=7Szlw!s7Y+9o1&Kg+b51sCnUA6}G~`gO(d1no%_bVe5P7I&>v^vdn@OyM8v$Y%9FIyFx#M4)s)azgcx<`>6-? zLwlg`hmN(IkB|#ae13Kp;HzGPKA4KCUno90ihr&e4z$i`{&WJ$Mh8i*s`{X5a!0=+ z-oyz)p0i`n0jv|{;wdQqt4Gw|sV}I{s*kIC)LrT}b)8zPu2BA{yr^tcYLpA1PGEvE zOes;aCriR|-g%NDHKyk^qlp8)JYm zz!+c*Fa{U{i~+^~V}LP`0Sq{_k(^n`LyzH_t#L4EtXZf-`}F#NUr(u;^6tB5tv1xM zb#!-}=){dY@0eCUY7P$FRBabwDpa$Oj~>OfJ{D0MM)vkX?aO1fd~GP~jY5y$T8NF^ z?NEgQRmRtL+sA1`$eSMiSKegT2E$DXdT5VB8w8;|^dK(%JG6mh=K=f)4s8J0xgXG2 z99n;}b05^l6=!Qs*cpKKkQ$MOm2c*M(LNn!g)j>nQDP!+YN?r}>SI%FYmW#|EB7K+jB z_zI|P>I2<`&B6$D8{R+G^x4}`LwIdBl4in031;DPbgNG8OxH`FM`};ow?c6+wtb?$ z8L5`pf=;x&XFhazE(Gk*s}>V|3lNi7g`=f>e1pr$PshP<1FA?SKT#ppg0%*JOm3tAz%4u8PpS4bn}jDyffS$fRS z;t*E{N~)D(Z4Ucm)u269D)iSg3#Di$ejKUu+N_EA4SsZOVg%#5nCSLIe4FMM_TSy! zv%lvQy757LiLMHI%@nSv(%WkE)(E|!j$D;=tpNSeF#*?rLWt1y2}kwSq$1P-b828# zzX#k+&4#{eSTC=_r}V8&gqeWwj?ma@rwwaQVL&EkWucQNWm)Z3Q3)R9~lWPLo!8qY-BPP z;}~cjQcKF@7=|2&2N}Q-98tN@iInmz8U`%!(?A-ALE~%#?d6UlQv;_QMx+%&z6FIQ z&~!er^eUdK#NPE<9^|7a&y1k^=r6&gK%NeT`qSi$;7T2fDs*?JoWSaSGBu<=kR_$O zPF2`-e@X0R!3>6!(>a6hi~|=PMLiWV%qX;prbb1rFn&aGQiOi_l=#|M$l{|=!*>Tg zP9-ELiBO*HAWC^;@T76JoiR`t%8b#|sZ=0&!1rV*tf5d_21k6#k>6SY6fG&Q)fkKa zI4|Hz81AM`gb|V`w2mgNBz^h%o}gT_0CK8xMtybU-~}A~MM$wcU{>cTcguf~$4Mda zSN2CN55R2yORSG_$GFwv=fH2q$?- zgO?*ScPpjZUZu-#TNllpSCbmXF^0?4OXfz2e%5cCyY=c(Lg;r-8&Xk!T4>T)< z7G@gUq2^Jl?66(H)GCHjxW8XR3=x>3~s( zHX0I)OvRn#iIJ8OIfs;ao5*zcv8ll4V#V;KJBd59wHhPn@f?MNG9o8&X1D?FKy5r1 zTAQIXr!>F*xc$G#Y(uJ7Ijk&|Uy!Fsk4t^UYaO3D>V(&XS^VRCvHc2Lk8Pv%eQOQ( zGB?Zegr&&56K-MKzYPP>OJV|4TT$&LLE0(;6~;DH0c?o!x^hR22K^`p&*2|^bw3SFtT+KEn$ObtE z%F|mLFd6NOhrCug`Y6QgORw?3tXLpoJb zio#&R(RFKD^(TzQ7*n_4)er`!E2iRV@}ov}EjIgsbiL2%mxbL3<1$0#nSsa - - - + + + \`\`\` @@ -119,9 +119,9 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://java-merge-anyof-object-schemas.konfigthis.com\\"; + configuration.host = "https://java-merge-anyof-object-schemas.konfigthis.com"; - configuration.apiKey = \\"YOUR API KEY\\"; + configuration.apiKey = "YOUR API KEY"; JavaMergeAnyofObjectSchemasClient client = new JavaMergeAnyofObjectSchemasClient(configuration); try { ABC result = client @@ -133,10 +133,10 @@ public class Example { System.out.println(result.getB()); System.out.println(result.getC()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -152,10 +152,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-merge-anyof-strings.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-merge-anyof-strings.test.ts.snap index 198610ea81..89eefe399c 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-merge-anyof-strings.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-merge-anyof-strings.test.ts.snap @@ -59,7 +59,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:java-merge-anyof-strings:1.0.0\\" + implementation "com.konfigthis:java-merge-anyof-strings:1.0.0" } \`\`\` @@ -79,10 +79,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -119,9 +119,9 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://java-merge-anyof-strings.konfigthis.com\\"; + configuration.host = "https://java-merge-anyof-strings.konfigthis.com"; - configuration.apiKey = \\"YOUR API KEY\\"; + configuration.apiKey = "YOUR API KEY"; JavaMergeAnyofStringsClient client = new JavaMergeAnyofStringsClient(configuration); try { TestFetchResponse result = client @@ -131,10 +131,10 @@ public class Example { System.out.println(result); System.out.println(result.getValue()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -150,10 +150,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-merging-schemas-with-ref.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-merging-schemas-with-ref.test.ts.snap index b625f31b55..866e0b3679 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-merging-schemas-with-ref.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-merging-schemas-with-ref.test.ts.snap @@ -59,7 +59,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:java-merging-schemas-with-ref:1.0.0\\" + implementation "com.konfigthis:java-merging-schemas-with-ref:1.0.0" } \`\`\` @@ -79,10 +79,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -119,9 +119,9 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://java-merging-schemas-with-ref.konfigthis.com\\"; + configuration.host = "https://java-merging-schemas-with-ref.konfigthis.com"; - configuration.apiKey = \\"YOUR API KEY\\"; + configuration.apiKey = "YOUR API KEY"; JavaMergingSchemasWithRefClient client = new JavaMergingSchemasWithRefClient(configuration); try { A1 result = client @@ -131,10 +131,10 @@ public class Example { System.out.println(result); System.out.println(result.getA()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -150,10 +150,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-nullable-ref-using-all-of-schema.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-nullable-ref-using-all-of-schema.test.ts.snap index 316d872578..20bed1d171 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-nullable-ref-using-all-of-schema.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-nullable-ref-using-all-of-schema.test.ts.snap @@ -59,7 +59,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:java-nullable-ref-using-all-of-schema:1.0.0\\" + implementation "com.konfigthis:java-nullable-ref-using-all-of-schema:1.0.0" } \`\`\` @@ -79,10 +79,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -119,9 +119,9 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://java-nullable-ref-using-all-of-schema.konfigthis.com\\"; + configuration.host = "https://java-nullable-ref-using-all-of-schema.konfigthis.com"; - configuration.apiKey = \\"YOUR API KEY\\"; + configuration.apiKey = "YOUR API KEY"; JavaNullableRefUsingAllOfSchemaClient client = new JavaNullableRefUsingAllOfSchemaClient(configuration); Double input = 3.4D; try { @@ -131,10 +131,10 @@ public class Example { .input(input) .execute(); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -151,10 +151,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-snaptrade.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-snaptrade.test.ts.snap index d08342c16a..7c28564043 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-snaptrade.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-snaptrade.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`java-snaptrade 1`] = ` -"
+"
[![Visit SnapTrade](https://raw.githubusercontent.com/konfig-dev/konfig/HEAD/sdks/java/header.png)](https://snaptrade.com) @@ -65,7 +65,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:snaptrade-java-sdk:4.13.3\\" + implementation "com.konfigthis:snaptrade-java-sdk:4.13.3" } \`\`\` @@ -85,10 +85,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -123,13 +123,13 @@ public class Example { public static void main(String[] args) { // 1) Initialize default client with clientID and consumerKey Configuration configuration = new Configuration(); - configuration.clientId = System.getenv(\\"SNAPTRADE_CLIENT_ID\\"); - configuration.consumerKey = System.getenv(\\"SNAPTRADE_CONSUMER_KEY\\"); + configuration.clientId = System.getenv("SNAPTRADE_CLIENT_ID"); + configuration.consumerKey = System.getenv("SNAPTRADE_CONSUMER_KEY"); Snaptrade snaptrade = new Snaptrade(configuration); // 2) Check that the client is able to make a request to the API server Status status = snaptrade.apiStatus.check().execute(); - System.out.printf(\\"SnapTrade is online: %s\\\\n\\", status.getOnline()); + System.out.printf("SnapTrade is online: %s\\n", status.getOnline()); // 3) Create a new user on SnapTrade // The userId should be provided by you and refer to permanent value such as a @@ -141,7 +141,7 @@ public class Example { new SnapTradeRegisterUserRequestBody().userId(userId.toString()); // Note: A user secret is only generated once. It's required to access resources // for certain endpoints - System.out.printf(\\"userID: %s, userSecret: %s\\\\n\\", userIDandSecret.getUserId(), + System.out.printf("userID: %s, userSecret: %s\\n", userIDandSecret.getUserId(), userIDandSecret.getUserSecret()); // 4) Get a redirect URI. Users will need this to connect their brokerage to the @@ -150,12 +150,12 @@ public class Example { .loginSnapTradeUser(userIDandSecret.getUserId(), userIDandSecret.getUserSecret()) .execute(); - System.out.println(response.get(\\"redirectURI\\")); + System.out.println(response.get("redirectURI")); // 5) Make a portfolio group and query List portfolioGroupsFromPost = snaptrade.portfolioManagement.create( userIDandSecret.getUserId(), userIDandSecret.getUserSecret()).id(UUID.randomUUID()) - .name(\\"MyPortfolio\\").execute(); + .name("MyPortfolio").execute(); System.out.println(portfolioGroupsFromPost); List portfolioGroups = snaptrade.portfolioManagement.list(userIDandSecret.getUserId(), userIDandSecret.getUserSecret()).execute(); diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-splitit.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-splitit.test.ts.snap index eaa5f9f628..b738387340 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-splitit.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-splitit.test.ts.snap @@ -58,7 +58,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:splitit-web-java-sdk:2.2.2\\" + implementation "com.konfigthis:splitit-web-java-sdk:2.2.2" } \`\`\` @@ -78,10 +78,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -118,17 +118,17 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://web-api-v3.production.splitit.com\\"; - // Configure OAuth2 client credentials for \\"application\\" OAuth flow - String clientId = System.getenv(\\"CLIENT_ID\\"); - String clientSecret = System.getenv(\\"CLIENT_SECRET\\"); - configuration.clientId = \\"clientId\\"; - configuration.clientSecret = \\"clientSecret\\"; + configuration.host = "https://web-api-v3.production.splitit.com"; + // Configure OAuth2 client credentials for "application" OAuth flow + String clientId = System.getenv("CLIENT_ID"); + String clientSecret = System.getenv("CLIENT_SECRET"); + configuration.clientId = "clientId"; + configuration.clientSecret = "clientSecret"; JavaSplitit client = new JavaSplitit(configuration); - String installmentPlanNumber = \\"installmentPlanNumber_example\\"; - String xSplititIdempotencyKey = \\"xSplititIdempotencyKey_example\\"; - String xSplititTouchPoint = \\"\\"; // TouchPoint + String installmentPlanNumber = "installmentPlanNumber_example"; + String xSplititIdempotencyKey = "xSplititIdempotencyKey_example"; + String xSplititTouchPoint = ""; // TouchPoint try { InstallmentPlanCancelResponse result = client .installmentPlan @@ -137,10 +137,10 @@ public class Example { System.out.println(result); System.out.println(result.getInstallmentPlanNumber()); } catch (ApiException e) { - System.err.println(\\"Exception when calling InstallmentPlanApi#cancel\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling InstallmentPlanApi#cancel"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -156,10 +156,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling InstallmentPlanApi#cancel\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling InstallmentPlanApi#cancel"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/java-use-schema-title-if-possible.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/java-use-schema-title-if-possible.test.ts.snap index 74fef78c26..912911e5d4 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/java-use-schema-title-if-possible.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/java-use-schema-title-if-possible.test.ts.snap @@ -59,7 +59,7 @@ repositories { } dependencies { - implementation \\"com.konfigthis:java-use-schema-title-if-possible:1.0.0\\" + implementation "com.konfigthis:java-use-schema-title-if-possible:1.0.0" } \`\`\` @@ -79,10 +79,10 @@ Also make sure your library or application has internet permissions in your \`An \`\`\`xml - - - + + + \`\`\` @@ -119,9 +119,9 @@ import java.util.UUID; public class Example { public static void main(String[] args) { Configuration configuration = new Configuration(); - configuration.host = \\"https://java-use-schema-title-if-possible.konfigthis.com\\"; + configuration.host = "https://java-use-schema-title-if-possible.konfigthis.com"; - configuration.apiKey = \\"YOUR API KEY\\"; + configuration.apiKey = "YOUR API KEY"; JavaUseSchemaTitleIfPossibleClient client = new JavaUseSchemaTitleIfPossibleClient(configuration); try { AB result = client @@ -132,10 +132,10 @@ public class Example { System.out.println(result.getA()); System.out.println(result.getB()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } @@ -151,10 +151,10 @@ public class Example { System.out.println(response.getRoundTripTime()); System.out.println(response.getRequest()); } catch (ApiException e) { - System.err.println(\\"Exception when calling TestApi#fetch\\"); - System.err.println(\\"Status code: \\" + e.getStatusCode()); - System.err.println(\\"Reason: \\" + e.getResponseBody()); - System.err.println(\\"Response headers: \\" + e.getResponseHeaders()); + System.err.println("Exception when calling TestApi#fetch"); + System.err.println("Status code: " + e.getStatusCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } diff --git a/generator/konfig-integration-tests/tests/__snapshots__/php-splitit.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/php-splitit.test.ts.snap index 1f92c8c2e5..82bf9787a2 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/php-splitit.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/php-splitit.test.ts.snap @@ -18,14 +18,14 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow \`\`\`json { - \\"repositories\\": [ + "repositories": [ { - \\"type\\": \\"vcs\\", - \\"url\\": \\"https://github.com/konfig-dev/konfig/tree/main/php.git\\" + "type": "vcs", + "url": "https://github.com/konfig-dev/konfig/tree/main/php.git" } ], - \\"require\\": { - \\"konfig/konfig/tree/main/php\\": \\"2.3.0\\" + "require": { + "konfig/konfig/tree/main/php": "2.3.0" } } \`\`\` @@ -49,14 +49,14 @@ Please follow the [installation procedure](#installation--usage) and then run th installmentPlan->cancel( @@ -65,7 +65,7 @@ try { $x_splitit_touch_point ); print_r($result->$getInstallmentPlanNumber()); -} catch (\\\\Exception $e) { +} catch (\\Exception $e) { echo 'Exception when calling InstallmentPlanApi->cancel: ', $e->getMessage(), PHP_EOL; } \`\`\` diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-async-default-timeout.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-async-default-timeout.test.ts.snap index a553a7336a..18cdf2ce9d 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-async-default-timeout.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-async-default-timeout.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-async-default-timeout 1`] = ` -"# python-async-default-timeout +"# python-async-default-timeout A simple API based for testing python-async-default-timeout. @@ -10,7 +10,7 @@ A simple API based for testing python-async-default-timeout. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,31 +24,31 @@ A simple API based for testing python-async-default-timeout. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-async-default-timeout==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_async_default_timeout import PythonAsyncDefaultTimeoutClient, ApiException pythonasyncdefaulttimeoutclient = PythonAsyncDefaultTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonasyncdefaulttimeoutclient.test.fetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -56,7 +56,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -66,7 +66,7 @@ from pprint import pprint from python_async_default_timeout import PythonAsyncDefaultTimeoutClient, ApiException pythonasyncdefaulttimeoutclient = PythonAsyncDefaultTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -75,7 +75,7 @@ async def main(): # Fetches a JSON value based on input parameter fetch_response = await pythonasyncdefaulttimeoutclient.test.afetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -86,7 +86,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -95,7 +95,7 @@ from pprint import pprint from python_async_default_timeout import PythonAsyncDefaultTimeoutClient, ApiException pythonasyncdefaulttimeoutclient = PythonAsyncDefaultTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -105,7 +105,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -114,18 +114,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonasyncdefaulttimeoutclient.test.fetch\` +## Reference +### \`pythonasyncdefaulttimeoutclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonasyncdefaulttimeoutclient.test.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -134,7 +134,7 @@ fetch_response = pythonasyncdefaulttimeoutclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout-with-top-level-operation.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout-with-top-level-operation.test.ts.snap index 6645f00281..4c6433a604 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout-with-top-level-operation.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout-with-top-level-operation.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-async-timeout-with-top-level-operation 1`] = ` -"# python-async-timeout-with-top-level-operation +"# python-async-timeout-with-top-level-operation A simple API based for testing python-async-timeout-with-top-level-operation. @@ -10,7 +10,7 @@ A simple API based for testing python-async-timeout-with-top-level-operation. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-async-timeout-with-top-level-operation. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-async-timeout-with-top-level-operation==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_async_timeout_with_top_level_operation import ( pythonasynctimeoutwithtopleveloperationclient = ( PythonAsyncTimeoutWithTopLevelOperationClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -56,7 +56,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling .fetch: %s\\\\n\\" % e) + print("Exception when calling .fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -64,7 +64,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -78,7 +78,7 @@ from python_async_timeout_with_top_level_operation import ( pythonasynctimeoutwithtopleveloperationclient = ( PythonAsyncTimeoutWithTopLevelOperationClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -88,7 +88,7 @@ async def main(): # Fetches a JSON value based on input parameter fetch_response = await pythonasynctimeoutwithtopleveloperationclient.afetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -99,7 +99,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -112,7 +112,7 @@ from python_async_timeout_with_top_level_operation import ( pythonasynctimeoutwithtopleveloperationclient = ( PythonAsyncTimeoutWithTopLevelOperationClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -123,7 +123,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -132,18 +132,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonasynctimeoutwithtopleveloperationclient.fetch\` +## Reference +### \`pythonasynctimeoutwithtopleveloperationclient.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonasynctimeoutwithtopleveloperationclient.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -152,7 +152,7 @@ fetch_response = pythonasynctimeoutwithtopleveloperationclient.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout.test.ts.snap index d7691110c9..8c0ba89bad 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-async-timeout.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-async-timeout 1`] = ` -"# python-async-timeout +"# python-async-timeout A simple API based for testing python-async-timeout. @@ -10,7 +10,7 @@ A simple API based for testing python-async-timeout. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,31 +24,31 @@ A simple API based for testing python-async-timeout. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-async-timeout==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_async_timeout import PythonAsyncTimeoutClient, ApiException pythonasynctimeoutclient = PythonAsyncTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonasynctimeoutclient.test.fetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -56,7 +56,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -66,7 +66,7 @@ from pprint import pprint from python_async_timeout import PythonAsyncTimeoutClient, ApiException pythonasynctimeoutclient = PythonAsyncTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -75,7 +75,7 @@ async def main(): # Fetches a JSON value based on input parameter fetch_response = await pythonasynctimeoutclient.test.afetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -86,7 +86,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -95,7 +95,7 @@ from pprint import pprint from python_async_timeout import PythonAsyncTimeoutClient, ApiException pythonasynctimeoutclient = PythonAsyncTimeoutClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -105,7 +105,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -114,18 +114,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonasynctimeoutclient.test.fetch\` +## Reference +### \`pythonasynctimeoutclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonasynctimeoutclient.test.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -134,7 +134,7 @@ fetch_response = pythonasynctimeoutclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-carbon.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-carbon.test.ts.snap index ed70fd38e5..8a4162bd45 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-carbon.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-carbon.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-carbon 1`] = ` -"
+"
[![Visit Carbon](https://raw.githubusercontent.com/Carbon-for-Developers/carbon-sdks/HEAD/python/header.png)](https://carbon.ai) -# Carbon +# Carbon Connect external data to LLMs, no matter the source. @@ -15,7 +15,7 @@ Connect external data to LLMs, no matter the source.
-## Table of Contents +## Table of Contents @@ -74,17 +74,17 @@ Connect external data to LLMs, no matter the source. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install carbon-python-sdk==0.1.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from carbon import Carbon @@ -92,8 +92,8 @@ from carbon import Carbon # Generally this is done in the backend to avoid exposing API key to the client carbon = Carbon( - api_key=\\"YOUR_API_KEY\\", - customer_id=\\"YOUR_CUSTOMER_ID\\", + api_key="YOUR_API_KEY", + customer_id="YOUR_CUSTOMER_ID", ) token = carbon.auth.get_access_token() @@ -108,7 +108,7 @@ white_labeling = carbon.auth.get_white_labeling() # etc. \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -118,9 +118,9 @@ from pprint import pprint from carbon import Carbon, ApiException carbon = Carbon( - access_token=\\"YOUR_API_KEY\\", - api_key=\\"YOUR_API_KEY\\", - customer_id=\\"YOUR_API_KEY\\", + access_token="YOUR_API_KEY", + api_key="YOUR_API_KEY", + customer_id="YOUR_API_KEY", ) @@ -130,10 +130,10 @@ async def main(): get_access_token_response = await carbon.auth.aget_access_token() print(get_access_token_response) except ApiException as e: - print(\\"Exception when calling AuthApi.get_access_token: %s\\\\n\\" % e) + print("Exception when calling AuthApi.get_access_token: %s\\n" % e) pprint(e.body) if e.status == 422: - pprint(e.body[\\"detail\\"]) + pprint(e.body["detail"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -143,7 +143,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -152,25 +152,25 @@ from pprint import pprint from carbon import Carbon, ApiException carbon = Carbon( - access_token=\\"YOUR_API_KEY\\", - api_key=\\"YOUR_API_KEY\\", - customer_id=\\"YOUR_API_KEY\\", + access_token="YOUR_API_KEY", + api_key="YOUR_API_KEY", + customer_id="YOUR_API_KEY", ) try: # Get Access Token get_access_token_response = carbon.auth.raw.get_access_token() pprint(get_access_token_response.body) - pprint(get_access_token_response.body[\\"access_token\\"]) - pprint(get_access_token_response.body[\\"refresh_token\\"]) + pprint(get_access_token_response.body["access_token"]) + pprint(get_access_token_response.body["refresh_token"]) pprint(get_access_token_response.headers) pprint(get_access_token_response.status) pprint(get_access_token_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling AuthApi.get_access_token: %s\\\\n\\" % e) + print("Exception when calling AuthApi.get_access_token: %s\\n" % e) pprint(e.body) if e.status == 422: - pprint(e.body[\\"detail\\"]) + pprint(e.body["detail"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -178,22 +178,22 @@ except ApiException as e: \`\`\` -## Reference -### \`carbon.auth.get_access_token\` +## Reference +### \`carbon.auth.get_access_token\` Get Access Token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_access_token_response = carbon.auth.get_access_token() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TokenResponse\`](./carbon/pydantic/token_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/auth/v1/access_token\` \`get\` @@ -201,7 +201,7 @@ get_access_token_response = carbon.auth.get_access_token() --- -### \`carbon.auth.get_white_labeling\` +### \`carbon.auth.get_white_labeling\` Returns whether or not the organization is white labeled and which integrations are white labeled @@ -209,17 +209,17 @@ Returns whether or not the organization is white labeled and which integrations :param db: the database session :return: a WhiteLabelingResponse -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_white_labeling_response = carbon.auth.get_white_labeling() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`WhiteLabelingResponse\`](./carbon/pydantic/white_labeling_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/auth/v1/white_labeling\` \`get\` @@ -227,46 +227,46 @@ get_white_labeling_response = carbon.auth.get_white_labeling() --- -### \`carbon.data_sources.query_user_data_sources\` +### \`carbon.data_sources.query_user_data_sources\` User Data Sources -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python query_user_data_sources_response = carbon.data_sources.query_user_data_sources( pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, - order_by=\\"created_at\\", - order_dir=\\"desc\\", + order_by="created_at", + order_dir="desc", filters={ - \\"source\\": \\"GOOGLE_DRIVE\\", + "source": "GOOGLE_DRIVE", }, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -##### order_by: [\`OrganizationUserDataSourceOrderByColumns\`](./carbon/type/organization_user_data_source_order_by_columns.py) +##### order_by: [\`OrganizationUserDataSourceOrderByColumns\`](./carbon/type/organization_user_data_source_order_by_columns.py) -##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) +##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) -##### filters: [\`OrganizationUserDataSourceFilters\`](./carbon/type/organization_user_data_source_filters.py) +##### filters: [\`OrganizationUserDataSourceFilters\`](./carbon/type/organization_user_data_source_filters.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OrganizationUserDataSourceQueryInput\`](./carbon/type/organization_user_data_source_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`OrganizationUserDataSourceResponse\`](./carbon/pydantic/organization_user_data_source_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_data_sources\` \`post\` @@ -274,11 +274,11 @@ query_user_data_sources_response = carbon.data_sources.query_user_data_sources( --- -### \`carbon.data_sources.revoke_access_token\` +### \`carbon.data_sources.revoke_access_token\` Revoke Access Token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python revoke_access_token_response = carbon.data_sources.revoke_access_token( @@ -286,18 +286,18 @@ revoke_access_token_response = carbon.data_sources.revoke_access_token( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`RevokeAccessTokenInput\`](./carbon/type/revoke_access_token_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/revoke_access_token\` \`post\` @@ -305,40 +305,40 @@ revoke_access_token_response = carbon.data_sources.revoke_access_token( --- -### \`carbon.embeddings.get_documents\` +### \`carbon.embeddings.get_documents\` For pre-filtering documents, using \`tags_v2\` is preferred to using \`tags\` (which is now deprecated). If both \`tags_v2\` and \`tags\` are specified, \`tags\` is ignored. \`tags_v2\` enables -building complex filters through the use of \\"AND\\", \\"OR\\", and negation logic. Take the below input as an example: +building complex filters through the use of "AND", "OR", and negation logic. Take the below input as an example: \`\`\`json { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"holy-bible\\", - \\"negate\\": false + "key": "subject", + "value": "holy-bible", + "negate": false }, { - \\"key\\": \\"person-of-interest\\", - \\"value\\": \\"jesus christ\\", - \\"negate\\": false + "key": "person-of-interest", + "value": "jesus christ", + "negate": false }, { - \\"key\\": \\"genre\\", - \\"value\\": \\"religion\\", - \\"negate\\": true + "key": "genre", + "value": "religion", + "negate": true } { - \\"AND\\": [ + "AND": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"tao-te-ching\\", - \\"negate\\": false + "key": "subject", + "value": "tao-te-ching", + "negate": false }, { - \\"key\\": \\"author\\", - \\"value\\": \\"lao-tzu\\", - \\"negate\\": false + "key": "author", + "value": "lao-tzu", + "negate": false } ] } @@ -346,29 +346,29 @@ building complex filters through the use of \\"AND\\", \\"OR\\", and negation lo } \`\`\` In this case, files will be filtered such that: -1. \\"subject\\" = \\"holy-bible\\" OR -2. \\"person-of-interest\\" = \\"jesus christ\\" OR -3. \\"genre\\" != \\"religion\\" OR -4. \\"subject\\" = \\"tao-te-ching\\" AND \\"author\\" = \\"lao-tzu\\" - -Note that the top level of the query must be either an \\"OR\\" or \\"AND\\" array. Currently, nesting is limited to 3. -For tag blocks (those with \\"key\\", \\"value\\", and \\"negate\\" keys), the following typing rules apply: -1. \\"key\\" isn't optional and must be a \`string\` -2. \\"value\\" isn't optional and can be \`any\` or list[\`any\`] -3. \\"negate\\" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in +1. "subject" = "holy-bible" OR +2. "person-of-interest" = "jesus christ" OR +3. "genre" != "religion" OR +4. "subject" = "tao-te-ching" AND "author" = "lao-tzu" + +Note that the top level of the query must be either an "OR" or "AND" array. Currently, nesting is limited to 3. +For tag blocks (those with "key", "value", and "negate" keys), the following typing rules apply: +1. "key" isn't optional and must be a \`string\` +2. "value" isn't optional and can be \`any\` or list[\`any\`] +3. "negate" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in the resulting query. It is \`false\` by default. When querying embeddings, you can optionally specify the \`media_type\` parameter in your request. By default (if -not set), it is equal to \\"TEXT\\". This means that the query will be performed over files that have -been parsed as text (for now, this covers all files except image files). If it is equal to \\"IMAGE\\", +not set), it is equal to "TEXT". This means that the query will be performed over files that have +been parsed as text (for now, this covers all files except image files). If it is equal to "IMAGE", the query will be performed over image files (for now, \`.jpg\` and \`.png\` files). You can think of this field as an additional filter on top of any filters set in \`file_ids\` and When \`hybrid_search\` is set to true, a combination of keyword search and semantic search are used to rank and select candidate embeddings during information retrieval. By default, these search methods are weighted -equally during the ranking process. To adjust the weight (or \\"importance\\") of each search method, you can use +equally during the ranking process. To adjust the weight (or "importance") of each search method, you can use the \`hybrid_search_tuning_parameters\` property. The description for the different tuning parameters are: - \`weight_a\`: weight to assign to semantic search - \`weight_b\`: weight to assign to keyword search @@ -381,9 +381,9 @@ In order to use hybrid search for a customer across a set of documents, two flag body for this request is below: \`\`\` { - \\"configuration_key_name\\": \\"sparse_vectors\\", - \\"value\\": { - \\"enabled\\": true + "configuration_key_name": "sparse_vectors", + "value": { + "enabled": true } } \`\`\` @@ -402,14 +402,14 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_documents_response = carbon.embeddings.get_documents( - query=\\"a\\", + query="a", k=1, tags={ - \\"key\\": \\"string_example\\", + "key": "string_example", }, query_vector=[3.14], file_ids=[1], @@ -420,67 +420,67 @@ get_documents_response = carbon.embeddings.get_documents( include_raw_file=True, hybrid_search=True, hybrid_search_tuning_parameters={ - \\"weight_a\\": 0.5, - \\"weight_b\\": 0.5, + "weight_a": 0.5, + "weight_b": 0.5, }, - media_type=\\"TEXT\\", - embedding_model=\\"OPENAI\\", + media_type="TEXT", + embedding_model="OPENAI", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`str\` +##### query: \`str\` Query for which to get related chunks and embeddings. -##### k: \`int\` +##### k: \`int\` Number of related chunks to return. -##### tags: [\`GetEmbeddingDocumentsBodyTags\`](./carbon/type/get_embedding_documents_body_tags.py) +##### tags: [\`GetEmbeddingDocumentsBodyTags\`](./carbon/type/get_embedding_documents_body_tags.py) -##### query_vector: [\`GetEmbeddingDocumentsBodyQueryVector\`](./carbon/type/get_embedding_documents_body_query_vector.py) +##### query_vector: [\`GetEmbeddingDocumentsBodyQueryVector\`](./carbon/type/get_embedding_documents_body_query_vector.py) -##### file_ids: [\`GetEmbeddingDocumentsBodyFileIds\`](./carbon/type/get_embedding_documents_body_file_ids.py) +##### file_ids: [\`GetEmbeddingDocumentsBodyFileIds\`](./carbon/type/get_embedding_documents_body_file_ids.py) -##### parent_file_ids: [\`GetEmbeddingDocumentsBodyParentFileIds\`](./carbon/type/get_embedding_documents_body_parent_file_ids.py) +##### parent_file_ids: [\`GetEmbeddingDocumentsBodyParentFileIds\`](./carbon/type/get_embedding_documents_body_parent_file_ids.py) -##### tags_v2: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags_v2: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` A set of tags to limit the search to. Use this instead of \`tags\`, which is deprecated. -##### include_tags: \`Optional[bool]\` +##### include_tags: \`Optional[bool]\` Flag to control whether or not to include tags for each chunk in the response. -##### include_vectors: \`Optional[bool]\` +##### include_vectors: \`Optional[bool]\` Flag to control whether or not to include embedding vectors in the response. -##### include_raw_file: \`Optional[bool]\` +##### include_raw_file: \`Optional[bool]\` Flag to control whether or not to include a signed URL to the raw file containing each chunk in the response. -##### hybrid_search: \`Optional[bool]\` +##### hybrid_search: \`Optional[bool]\` Flag to control whether or not to perform hybrid search. -##### hybrid_search_tuning_parameters: [\`HybridSearchTuningParamsNullable\`](./carbon/type/hybrid_search_tuning_params_nullable.py) +##### hybrid_search_tuning_parameters: [\`HybridSearchTuningParamsNullable\`](./carbon/type/hybrid_search_tuning_params_nullable.py) -##### media_type: [\`FileContentTypesNullable\`](./carbon/type/file_content_types_nullable.py) +##### media_type: [\`FileContentTypesNullable\`](./carbon/type/file_content_types_nullable.py) -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`GetEmbeddingDocumentsBody\`](./carbon/type/get_embedding_documents_body.py) -#### 🔄 Return +#### 🔄 Return [\`DocumentResponseList\`](./carbon/pydantic/document_response_list.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/embeddings\` \`post\` @@ -488,50 +488,50 @@ Flag to control whether or not to perform hybrid search. --- -### \`carbon.embeddings.get_embeddings_and_chunks\` +### \`carbon.embeddings.get_embeddings_and_chunks\` Retrieve Embeddings And Content -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_embeddings_and_chunks_response = carbon.embeddings.get_embeddings_and_chunks( filters={ - \\"user_file_id\\": 1, - \\"embedding_model\\": \\"OPENAI\\", + "user_file_id": 1, + "embedding_model": "OPENAI", }, pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, - order_by=\\"created_at\\", - order_dir=\\"desc\\", + order_by="created_at", + order_dir="desc", include_vectors=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: [\`EmbeddingsAndChunksFilters\`](./carbon/type/embeddings_and_chunks_filters.py) +##### filters: [\`EmbeddingsAndChunksFilters\`](./carbon/type/embeddings_and_chunks_filters.py) -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -##### order_by: [\`EmbeddingsAndChunksOrderByColumns\`](./carbon/type/embeddings_and_chunks_order_by_columns.py) +##### order_by: [\`EmbeddingsAndChunksOrderByColumns\`](./carbon/type/embeddings_and_chunks_order_by_columns.py) -##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) +##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) -##### include_vectors: \`bool\` +##### include_vectors: \`bool\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`EmbeddingsAndChunksQueryInput\`](./carbon/type/embeddings_and_chunks_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`EmbeddingsAndChunksResponse\`](./carbon/pydantic/embeddings_and_chunks_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/text_chunks\` \`post\` @@ -539,23 +539,23 @@ get_embeddings_and_chunks_response = carbon.embeddings.get_embeddings_and_chunks --- -### \`carbon.embeddings.upload_chunks_and_embeddings\` +### \`carbon.embeddings.upload_chunks_and_embeddings\` Upload Chunks And Embeddings -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python upload_chunks_and_embeddings_response = carbon.embeddings.upload_chunks_and_embeddings( - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", chunks_and_embeddings=[ { - \\"file_id\\": 1, - \\"chunks_and_embeddings\\": [ + "file_id": 1, + "chunks_and_embeddings": [ { - \\"chunk_number\\": 1, - \\"chunk\\": \\"chunk_example\\", - \\"embedding\\": [3.14], + "chunk_number": 1, + "chunk": "chunk_example", + "embedding": [3.14], } ], } @@ -564,22 +564,22 @@ upload_chunks_and_embeddings_response = carbon.embeddings.upload_chunks_and_embe ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### chunks_and_embeddings: List[\`SingleChunksAndEmbeddingsUploadInput\`] +##### chunks_and_embeddings: List[\`SingleChunksAndEmbeddingsUploadInput\`] -##### overwrite_existing: \`bool\` +##### overwrite_existing: \`bool\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ChunksAndEmbeddingsUploadInput\`](./carbon/type/chunks_and_embeddings_upload_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_chunks_and_embeddings\` \`post\` @@ -587,7 +587,7 @@ upload_chunks_and_embeddings_response = carbon.embeddings.upload_chunks_and_embe --- -### \`carbon.files.create_user_file_tags\` +### \`carbon.files.create_user_file_tags\` A tag is a key-value pair that can be added to a file. This pair can then be used for searches (e.g. embedding searches) in order to narrow down the scope of the search. @@ -599,33 +599,33 @@ A file can have any number of tags. The following are reserved keys that cannot Carbon currently supports two data types for tag values - \`string\` and \`list\`. Keys can only be \`string\`. If values other than \`string\` and \`list\` are used, -they're automatically converted to strings (e.g. 4 will become \\"4\\"). +they're automatically converted to strings (e.g. 4 will become "4"). -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python create_user_file_tags_response = carbon.files.create_user_file_tags( tags={ - \\"key\\": \\"string_example\\", + "key": "string_example", }, organization_user_file_id=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tags: [\`OrganizationUserFileTagCreateTags\`](./carbon/type/organization_user_file_tag_create_tags.py) +##### tags: [\`OrganizationUserFileTagCreateTags\`](./carbon/type/organization_user_file_tag_create_tags.py) -##### organization_user_file_id: \`int\` +##### organization_user_file_id: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OrganizationUserFileTagCreate\`](./carbon/type/organization_user_file_tag_create.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/create_user_file_tags\` \`post\` @@ -633,11 +633,11 @@ create_user_file_tags_response = carbon.files.create_user_file_tags( --- -### \`carbon.files.delete\` +### \`carbon.files.delete\` Delete File Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python delete_response = carbon.files.delete( @@ -645,15 +645,15 @@ delete_response = carbon.files.delete( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_id: \`int\` +##### file_id: \`int\` -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/deletefile/{file_id}\` \`delete\` @@ -661,33 +661,33 @@ delete_response = carbon.files.delete( --- -### \`carbon.files.delete_file_tags\` +### \`carbon.files.delete_file_tags\` Delete File Tags -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python delete_file_tags_response = carbon.files.delete_file_tags( - tags=[\\"string_example\\"], + tags=["string_example"], organization_user_file_id=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tags: [\`OrganizationUserFileTagsRemoveTags\`](./carbon/type/organization_user_file_tags_remove_tags.py) +##### tags: [\`OrganizationUserFileTagsRemoveTags\`](./carbon/type/organization_user_file_tags_remove_tags.py) -##### organization_user_file_id: \`int\` +##### organization_user_file_id: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OrganizationUserFileTagsRemove\`](./carbon/type/organization_user_file_tags_remove.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_user_file_tags\` \`post\` @@ -695,36 +695,36 @@ delete_file_tags_response = carbon.files.delete_file_tags( --- -### \`carbon.files.delete_many\` +### \`carbon.files.delete_many\` Delete Files Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python delete_many_response = carbon.files.delete_many( file_ids=[1], - sync_statuses=[\\"string_example\\"], + sync_statuses=["string_example"], delete_non_synced_only=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_ids: [\`DeleteFilesQueryInputFileIds\`](./carbon/type/delete_files_query_input_file_ids.py) +##### file_ids: [\`DeleteFilesQueryInputFileIds\`](./carbon/type/delete_files_query_input_file_ids.py) -##### sync_statuses: List[[\`ExternalFileSyncStatuses\`](./carbon/type/external_file_sync_statuses.py)] +##### sync_statuses: List[[\`ExternalFileSyncStatuses\`](./carbon/type/external_file_sync_statuses.py)] -##### delete_non_synced_only: \`bool\` +##### delete_non_synced_only: \`bool\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`DeleteFilesQueryInput\`](./carbon/type/delete_files_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_files\` \`post\` @@ -732,11 +732,11 @@ delete_many_response = carbon.files.delete_many( --- -### \`carbon.files.get_parsed_file\` +### \`carbon.files.get_parsed_file\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_parsed_file_response = carbon.files.get_parsed_file( @@ -744,15 +744,15 @@ get_parsed_file_response = carbon.files.get_parsed_file( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_id: \`int\` +##### file_id: \`int\` -#### 🔄 Return +#### 🔄 Return [\`PresignedURLResponse\`](./carbon/pydantic/presigned_url_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/parsed_file/{file_id}\` \`get\` @@ -760,11 +760,11 @@ get_parsed_file_response = carbon.files.get_parsed_file( --- -### \`carbon.files.get_raw_file\` +### \`carbon.files.get_raw_file\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_raw_file_response = carbon.files.get_raw_file( @@ -772,15 +772,15 @@ get_raw_file_response = carbon.files.get_raw_file( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_id: \`int\` +##### file_id: \`int\` -#### 🔄 Return +#### 🔄 Return [\`PresignedURLResponse\`](./carbon/pydantic/presigned_url_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/raw_file/{file_id}\` \`get\` @@ -788,40 +788,40 @@ get_raw_file_response = carbon.files.get_raw_file( --- -### \`carbon.files.query_user_files\` +### \`carbon.files.query_user_files\` For pre-filtering documents, using \`tags_v2\` is preferred to using \`tags\` (which is now deprecated). If both \`tags_v2\` and \`tags\` are specified, \`tags\` is ignored. \`tags_v2\` enables -building complex filters through the use of \\"AND\\", \\"OR\\", and negation logic. Take the below input as an example: +building complex filters through the use of "AND", "OR", and negation logic. Take the below input as an example: \`\`\`json { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"holy-bible\\", - \\"negate\\": false + "key": "subject", + "value": "holy-bible", + "negate": false }, { - \\"key\\": \\"person-of-interest\\", - \\"value\\": \\"jesus christ\\", - \\"negate\\": false + "key": "person-of-interest", + "value": "jesus christ", + "negate": false }, { - \\"key\\": \\"genre\\", - \\"value\\": \\"religion\\", - \\"negate\\": true + "key": "genre", + "value": "religion", + "negate": true } { - \\"AND\\": [ + "AND": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"tao-te-ching\\", - \\"negate\\": false + "key": "subject", + "value": "tao-te-ching", + "negate": false }, { - \\"key\\": \\"author\\", - \\"value\\": \\"lao-tzu\\", - \\"negate\\": false + "key": "author", + "value": "lao-tzu", + "negate": false } ] } @@ -829,28 +829,28 @@ building complex filters through the use of \\"AND\\", \\"OR\\", and negation lo } \`\`\` In this case, files will be filtered such that: -1. \\"subject\\" = \\"holy-bible\\" OR -2. \\"person-of-interest\\" = \\"jesus christ\\" OR -3. \\"genre\\" != \\"religion\\" OR -4. \\"subject\\" = \\"tao-te-ching\\" AND \\"author\\" = \\"lao-tzu\\" - -Note that the top level of the query must be either an \\"OR\\" or \\"AND\\" array. Currently, nesting is limited to 3. -For tag blocks (those with \\"key\\", \\"value\\", and \\"negate\\" keys), the following typing rules apply: -1. \\"key\\" isn't optional and must be a \`string\` -2. \\"value\\" isn't optional and can be \`any\` or list[\`any\`] -3. \\"negate\\" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in +1. "subject" = "holy-bible" OR +2. "person-of-interest" = "jesus christ" OR +3. "genre" != "religion" OR +4. "subject" = "tao-te-ching" AND "author" = "lao-tzu" + +Note that the top level of the query must be either an "OR" or "AND" array. Currently, nesting is limited to 3. +For tag blocks (those with "key", "value", and "negate" keys), the following typing rules apply: +1. "key" isn't optional and must be a \`string\` +2. "value" isn't optional and can be \`any\` or list[\`any\`] +3. "negate" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in the resulting query. It is \`false\` by default. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python query_user_files_response = carbon.files.query_user_files( pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, - order_by=\\"created_at\\", - order_dir=\\"desc\\", + order_by="created_at", + order_dir="desc", filters={}, include_raw_file=True, include_parsed_text_file=True, @@ -858,32 +858,32 @@ query_user_files_response = carbon.files.query_user_files( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./carbon/type/organization_user_files_to_sync_order_by_types.py) +##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./carbon/type/organization_user_files_to_sync_order_by_types.py) -##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) +##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) -##### filters: [\`OrganizationUserFilesToSyncFilters\`](./carbon/type/organization_user_files_to_sync_filters.py) +##### filters: [\`OrganizationUserFilesToSyncFilters\`](./carbon/type/organization_user_files_to_sync_filters.py) -##### include_raw_file: \`Optional[bool]\` +##### include_raw_file: \`Optional[bool]\` -##### include_parsed_text_file: \`Optional[bool]\` +##### include_parsed_text_file: \`Optional[bool]\` -##### include_additional_files: \`Optional[bool]\` +##### include_additional_files: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OrganizationUserFilesToSyncQueryInput\`](./carbon/type/organization_user_files_to_sync_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`UserFilesV2\`](./carbon/pydantic/user_files_v2.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_files_v2\` \`post\` @@ -891,20 +891,20 @@ query_user_files_response = carbon.files.query_user_files( --- -### \`carbon.files.query_user_files_deprecated\` +### \`carbon.files.query_user_files_deprecated\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python query_user_files_deprecated_response = carbon.files.query_user_files_deprecated( pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, - order_by=\\"created_at\\", - order_dir=\\"desc\\", + order_by="created_at", + order_dir="desc", filters={}, include_raw_file=True, include_parsed_text_file=True, @@ -912,32 +912,32 @@ query_user_files_deprecated_response = carbon.files.query_user_files_deprecated( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./carbon/type/organization_user_files_to_sync_order_by_types.py) +##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./carbon/type/organization_user_files_to_sync_order_by_types.py) -##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) +##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) -##### filters: [\`OrganizationUserFilesToSyncFilters\`](./carbon/type/organization_user_files_to_sync_filters.py) +##### filters: [\`OrganizationUserFilesToSyncFilters\`](./carbon/type/organization_user_files_to_sync_filters.py) -##### include_raw_file: \`Optional[bool]\` +##### include_raw_file: \`Optional[bool]\` -##### include_parsed_text_file: \`Optional[bool]\` +##### include_parsed_text_file: \`Optional[bool]\` -##### include_additional_files: \`Optional[bool]\` +##### include_additional_files: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OrganizationUserFilesToSyncQueryInput\`](./carbon/type/organization_user_files_to_sync_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`FilesQueryUserFilesDeprecatedResponse\`](./carbon/pydantic/files_query_user_files_deprecated_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_files\` \`post\` @@ -945,11 +945,11 @@ query_user_files_deprecated_response = carbon.files.query_user_files_deprecated( --- -### \`carbon.files.resync\` +### \`carbon.files.resync\` Resync File -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python resync_response = carbon.files.resync( @@ -959,22 +959,22 @@ resync_response = carbon.files.resync( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_id: \`int\` +##### file_id: \`int\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ResyncFileQueryInput\`](./carbon/type/resync_file_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/resync_file\` \`post\` @@ -982,7 +982,7 @@ resync_response = carbon.files.resync( --- -### \`carbon.files.upload\` +### \`carbon.files.upload\` This endpoint is used to directly upload local files to Carbon. The \`POST\` request should be a multipart form request. Note that the \`set_page_as_boundary\` query parameter is applicable only to PDFs for now. When this value is set, @@ -1010,16 +1010,16 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python upload_response = carbon.files.upload( - file=open(\\"/path/to/file\\", \\"rb\\"), + file=open("/path/to/file", "rb"), chunk_size=1, chunk_overlap=1, skip_embedding_generation=False, set_page_as_boundary=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", use_ocr=False, generate_sparse_vectors=False, prepend_filename_to_chunks=False, @@ -1027,54 +1027,54 @@ upload_response = carbon.files.upload( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file: \`IO\` +##### file: \`IO\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` Chunk size in tiktoken tokens to be used when processing file. -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` Chunk overlap in tiktoken tokens to be used when processing file. -##### skip_embedding_generation: \`bool\` +##### skip_embedding_generation: \`bool\` Flag to control whether or not embeddings should be generated and stored when processing file. -##### set_page_as_boundary: \`bool\` +##### set_page_as_boundary: \`bool\` Flag to control whether or not to set the a page's worth of content as the maximum amount of content that can appear in a chunk. Only valid for PDFs. See description route description for more information. -##### embedding_model: [\`TextEmbeddingGenerators\`](./carbon/type/.py) +##### embedding_model: [\`TextEmbeddingGenerators\`](./carbon/type/.py) Embedding model that will be used to embed file chunks. -##### use_ocr: \`bool\` +##### use_ocr: \`bool\` Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text. -##### generate_sparse_vectors: \`bool\` +##### generate_sparse_vectors: \`bool\` Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search. -##### prepend_filename_to_chunks: \`bool\` +##### prepend_filename_to_chunks: \`bool\` Whether or not to prepend the file's name to chunks. -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` Number of objects per chunk. For json files only. -#### ⚙️ Request Body +#### ⚙️ Request Body [\`BodyCreateUploadFileUploadfilePost\`](./carbon/type/body_create_upload_file_uploadfile_post.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/uploadfile\` \`post\` @@ -1082,21 +1082,21 @@ Number of objects per chunk. For json files only. --- -### \`carbon.files.upload_from_url\` +### \`carbon.files.upload_from_url\` Create Upload File From Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python upload_from_url_response = carbon.files.upload_from_url( - url=\\"string_example\\", - file_name=\\"string_example\\", + url="string_example", + file_name="string_example", chunk_size=1, chunk_overlap=1, skip_embedding_generation=False, set_page_as_boundary=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, use_textract=False, prepend_filename_to_chunks=False, @@ -1104,38 +1104,38 @@ upload_from_url_response = carbon.files.upload_from_url( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -##### file_name: \`Optional[str]\` +##### file_name: \`Optional[str]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`bool\` +##### skip_embedding_generation: \`bool\` -##### set_page_as_boundary: \`bool\` +##### set_page_as_boundary: \`bool\` -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### generate_sparse_vectors: \`bool\` +##### generate_sparse_vectors: \`bool\` -##### use_textract: \`bool\` +##### use_textract: \`bool\` -##### prepend_filename_to_chunks: \`bool\` +##### prepend_filename_to_chunks: \`bool\` -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UploadFileFromUrlInput\`](./carbon/type/upload_file_from_url_input.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_file_from_url\` \`post\` @@ -1143,7 +1143,7 @@ upload_from_url_response = carbon.files.upload_from_url( --- -### \`carbon.files.upload_text\` +### \`carbon.files.upload_text\` Carbon supports multiple models for use in generating embeddings for files. For images, we support Vertex AI's multimodal model; for text, we support OpenAI's \`text-embedding-ada-002\` and Cohere's embed-multilingual-v3.0. @@ -1156,47 +1156,47 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python upload_text_response = carbon.files.upload_text( - contents=\\"string_example\\", - name=\\"string_example\\", + contents="string_example", + name="string_example", chunk_size=1, chunk_overlap=1, skip_embedding_generation=False, overwrite_file_id=1, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### contents: \`str\` +##### contents: \`str\` -##### name: \`Optional[str]\` +##### name: \`Optional[str]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`bool\` +##### skip_embedding_generation: \`bool\` -##### overwrite_file_id: \`Optional[int]\` +##### overwrite_file_id: \`Optional[int]\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`RawTextInput\`](./carbon/type/raw_text_input.py) -#### 🔄 Return +#### 🔄 Return [\`UserFile\`](./carbon/pydantic/user_file.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_text\` \`post\` @@ -1204,17 +1204,17 @@ upload_text_response = carbon.files.upload_text( --- -### \`carbon.health.check\` +### \`carbon.health.check\` Health -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python check_response = carbon.health.check() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/health\` \`get\` @@ -1222,58 +1222,58 @@ check_response = carbon.health.check() --- -### \`carbon.integrations.connect_freshdesk\` +### \`carbon.integrations.connect_freshdesk\` Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Make sure that your API key has the permission to read solutions from your account and you are on a paid plan. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will -trigger an automatic sync of the articles in your \\"solutions\\" tab. Additional parameters below can be used to associate +trigger an automatic sync of the articles in your "solutions" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python connect_freshdesk_response = carbon.integrations.connect_freshdesk( - domain=\\"string_example\\", - api_key=\\"string_example\\", + domain="string_example", + api_key="string_example", tags={}, chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### domain: \`str\` +##### domain: \`str\` -##### api_key: \`str\` +##### api_key: \`str\` -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`FreshDeskConnectRequest\`](./carbon/type/fresh_desk_connect_request.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/freshdesk\` \`post\` @@ -1281,7 +1281,7 @@ connect_freshdesk_response = carbon.integrations.connect_freshdesk( --- -### \`carbon.integrations.create_aws_iam_user\` +### \`carbon.integrations.create_aws_iam_user\` Create a new IAM user with permissions to:
    @@ -1291,29 +1291,29 @@ the same permissions.
Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python create_aws_iam_user_response = carbon.integrations.create_aws_iam_user( - access_key=\\"string_example\\", - access_key_secret=\\"string_example\\", + access_key="string_example", + access_key_secret="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### access_key: \`str\` +##### access_key: \`str\` -##### access_key_secret: \`str\` +##### access_key_secret: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`S3AuthRequest\`](./carbon/type/s3_auth_request.py) -#### 🔄 Return +#### 🔄 Return [\`OrganizationUserDataSourceAPI\`](./carbon/pydantic/organization_user_data_source_api.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/s3\` \`post\` @@ -1321,65 +1321,65 @@ create_aws_iam_user_response = carbon.integrations.create_aws_iam_user( --- -### \`carbon.integrations.get_oauth_url\` +### \`carbon.integrations.get_oauth_url\` Get Oauth Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_oauth_url_response = carbon.integrations.get_oauth_url( - service=\\"GOOGLE_DRIVE\\", + service="GOOGLE_DRIVE", tags=None, - scope=\\"string_example\\", + scope="string_example", chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", - zendesk_subdomain=\\"string_example\\", - microsoft_tenant=\\"string_example\\", - sharepoint_site_name=\\"string_example\\", - confluence_subdomain=\\"string_example\\", + embedding_model="OPENAI", + zendesk_subdomain="string_example", + microsoft_tenant="string_example", + sharepoint_site_name="string_example", + confluence_subdomain="string_example", generate_sparse_vectors=False, prepend_filename_to_chunks=False, max_items_per_chunk=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### service: [\`DataSourceType\`](./carbon/type/data_source_type.py) +##### service: [\`DataSourceType\`](./carbon/type/data_source_type.py) -##### tags: [\`Union[bool, date, datetime, dict, float, int, list, str, None]\`](./carbon/type/typing_union_bool_date_datetime_dict_float_int_list_str_none.py) +##### tags: [\`Union[bool, date, datetime, dict, float, int, list, str, None]\`](./carbon/type/typing_union_bool_date_datetime_dict_float_int_list_str_none.py) -##### scope: \`Optional[str]\` +##### scope: \`Optional[str]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -##### zendesk_subdomain: \`Optional[str]\` +##### zendesk_subdomain: \`Optional[str]\` -##### microsoft_tenant: \`Optional[str]\` +##### microsoft_tenant: \`Optional[str]\` -##### sharepoint_site_name: \`Optional[str]\` +##### sharepoint_site_name: \`Optional[str]\` -##### confluence_subdomain: \`Optional[str]\` +##### confluence_subdomain: \`Optional[str]\` -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OAuthURLRequest\`](./carbon/type/o_auth_url_request.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/oauth_url\` \`post\` @@ -1387,7 +1387,7 @@ get_oauth_url_response = carbon.integrations.get_oauth_url( --- -### \`carbon.integrations.list_confluence_pages\` +### \`carbon.integrations.list_confluence_pages\` To begin listing a user's Confluence pages, at least a \`data_source_id\` of a connected Confluence account must be specified. This base request returns a list of root pages for @@ -1397,29 +1397,29 @@ the user's page directory, additional requests to this endpoint can be made with convenience, the \`has_children\` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the \`parent_id\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_confluence_pages_response = carbon.integrations.list_confluence_pages( data_source_id=1, - parent_id=\\"string_example\\", + parent_id="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -##### parent_id: \`Optional[str]\` +##### parent_id: \`Optional[str]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ListRequest\`](./carbon/type/list_request.py) -#### 🔄 Return +#### 🔄 Return [\`ListResponse\`](./carbon/pydantic/list_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/confluence/list\` \`post\` @@ -1427,40 +1427,40 @@ list_confluence_pages_response = carbon.integrations.list_confluence_pages( --- -### \`carbon.integrations.list_data_source_items\` +### \`carbon.integrations.list_data_source_items\` List Data Source Items -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_data_source_items_response = carbon.integrations.list_data_source_items( data_source_id=1, - parent_id=\\"string_example\\", + parent_id="string_example", pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -##### parent_id: \`Optional[str]\` +##### parent_id: \`Optional[str]\` -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ListDataSourceItemsRequest\`](./carbon/type/list_data_source_items_request.py) -#### 🔄 Return +#### 🔄 Return [\`ListDataSourceItemsResponse\`](./carbon/pydantic/list_data_source_items_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/items/list\` \`post\` @@ -1468,18 +1468,18 @@ list_data_source_items_response = carbon.integrations.list_data_source_items( --- -### \`carbon.integrations.list_folders\` +### \`carbon.integrations.list_folders\` After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes -both system folders like \\"inbox\\" and user created folders. +both system folders like "inbox" and user created folders. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_folders_response = carbon.integrations.list_folders() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/outlook/user_folders\` \`get\` @@ -1487,18 +1487,18 @@ list_folders_response = carbon.integrations.list_folders() --- -### \`carbon.integrations.list_labels\` +### \`carbon.integrations.list_labels\` After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels -will have the type \\"user\\" and Gmail's default labels will have the type \\"system\\" +will have the type "user" and Gmail's default labels will have the type "system" -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_labels_response = carbon.integrations.list_labels() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/gmail/user_labels\` \`get\` @@ -1506,60 +1506,60 @@ list_labels_response = carbon.integrations.list_labels() --- -### \`carbon.integrations.sync_confluence\` +### \`carbon.integrations.sync_confluence\` After listing pages in a user's Confluence account, the set of selected page \`ids\` and the connected account's \`data_source_id\` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_confluence_response = carbon.integrations.sync_confluence( data_source_id=1, - ids=[\\"string_example\\"], + ids=["string_example"], tags={}, chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, max_items_per_chunk=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -##### ids: [\`SyncFilesRequestIds\`](./carbon/type/sync_files_request_ids.py) +##### ids: [\`SyncFilesRequestIds\`](./carbon/type/sync_files_request_ids.py) -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SyncFilesRequest\`](./carbon/type/sync_files_request.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/confluence/sync\` \`post\` @@ -1567,11 +1567,11 @@ sync_confluence_response = carbon.integrations.sync_confluence( --- -### \`carbon.integrations.sync_data_source_items\` +### \`carbon.integrations.sync_data_source_items\` Sync Data Source Items -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_data_source_items_response = carbon.integrations.sync_data_source_items( @@ -1579,18 +1579,18 @@ sync_data_source_items_response = carbon.integrations.sync_data_source_items( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SyncDirectoryRequest\`](./carbon/type/sync_directory_request.py) -#### 🔄 Return +#### 🔄 Return [\`OrganizationUserDataSourceAPI\`](./carbon/pydantic/organization_user_data_source_api.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/items/sync\` \`post\` @@ -1598,57 +1598,57 @@ sync_data_source_items_response = carbon.integrations.sync_data_source_items( --- -### \`carbon.integrations.sync_files\` +### \`carbon.integrations.sync_files\` Sync Files -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_files_response = carbon.integrations.sync_files( data_source_id=1, - ids=[\\"string_example\\"], + ids=["string_example"], tags={}, chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, max_items_per_chunk=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`int\` +##### data_source_id: \`int\` -##### ids: [\`SyncFilesRequestIds\`](./carbon/type/sync_files_request_ids.py) +##### ids: [\`SyncFilesRequestIds\`](./carbon/type/sync_files_request_ids.py) -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./carbon/type/embedding_generators_nullable.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SyncFilesRequest\`](./carbon/type/sync_files_request.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/files/sync\` \`post\` @@ -1656,13 +1656,13 @@ sync_files_response = carbon.integrations.sync_files( --- -### \`carbon.integrations.sync_gmail\` +### \`carbon.integrations.sync_gmail\` Once you have successfully connected your gmail account, you can choose which emails to sync with us using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. -label: Inbuilt Gmail labels, for example \\"Important\\" or a custom label you created. +label: Inbuilt Gmail labels, for example "Important" or a custom label you created. after or before: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. is: Can have the following values - starred, important, snoozed, and unread @@ -1672,32 +1672,32 @@ Using keys or values outside of the specified values can lead to unexpected beha An example of a basic query with filters can be \`\`\`json { - \\"filters\\": { - \\"key\\": \\"label\\", - \\"value\\": \\"Test\\" + "filters": { + "key": "label", + "value": "Test" } } \`\`\` -Which will list all emails that have the label \\"Test\\". +Which will list all emails that have the label "Test". You can use AND and OR operation in the following way: \`\`\`json { - \\"filters\\": { - \\"AND\\": [ + "filters": { + "AND": [ { - \\"key\\": \\"after\\", - \\"value\\": \\"2024/01/07\\" + "key": "after", + "value": "2024/01/07" }, { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"label\\", - \\"value\\": \\"Personal\\" + "key": "label", + "value": "Personal" }, { - \\"key\\": \\"is\\", - \\"value\\": \\"starred\\" + "key": "is", + "value": "starred" } ] } @@ -1705,11 +1705,11 @@ You can use AND and OR operation in the following way: } } \`\`\` -This will return emails after 7th of Jan that are either starred or have the label \\"Personal\\". +This will return emails after 7th of Jan that are either starred or have the label "Personal". Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_gmail_response = carbon.integrations.sync_gmail( @@ -1718,38 +1718,38 @@ sync_gmail_response = carbon.integrations.sync_gmail( chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` +##### filters: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`GmailSyncInput\`](./carbon/type/gmail_sync_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/gmail/sync\` \`post\` @@ -1757,10 +1757,10 @@ sync_gmail_response = carbon.integrations.sync_gmail( --- -### \`carbon.integrations.sync_outlook\` +### \`carbon.integrations.sync_outlook\` Once you have successfully connected your Outlook account, you can choose which emails to sync with us -using the filters and folder parameter. \\"folder\\" should be the folder you want to sync from Outlook. By default +using the filters and folder parameter. "folder" should be the folder you want to sync from Outlook. By default we get messages from your inbox folder. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. @@ -1772,21 +1772,21 @@ For now, we support a limited set of keys listed below. An example of a basic query with filters can be \`\`\`json { - \\"filters\\": { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "filters": { + "key": "category", + "value": "Test" } } \`\`\` -Which will list all emails that have the category \\"Test\\". +Which will list all emails that have the category "Test". Specifying a custom folder in the same query \`\`\`json { - \\"folder\\": \\"Folder Name\\", - \\"filters\\": { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "folder": "Folder Name", + "filters": { + "key": "category", + "value": "Test" } } \`\`\` @@ -1794,21 +1794,21 @@ Specifying a custom folder in the same query You can use AND and OR operation in the following way: \`\`\`json { - \\"filters\\": { - \\"AND\\": [ + "filters": { + "AND": [ { - \\"key\\": \\"after\\", - \\"value\\": \\"2024/01/07\\" + "key": "after", + "value": "2024/01/07" }, { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"category\\", - \\"value\\": \\"Personal\\" + "key": "category", + "value": "Personal" }, { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "key": "category", + "value": "Test" }, ] } @@ -1820,50 +1820,50 @@ This will return emails after 7th of Jan that have either Personal or Test as ca Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_outlook_response = carbon.integrations.sync_outlook( filters={}, tags={}, - folder=\\"Inbox\\", + folder="Inbox", chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` +##### filters: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### folder: \`Optional[str]\` +##### folder: \`Optional[str]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`OutlookSyncInput\`](./carbon/type/outlook_sync_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/outlook/sync\` \`post\` @@ -1871,51 +1871,51 @@ sync_outlook_response = carbon.integrations.sync_outlook( --- -### \`carbon.integrations.sync_rss_feed\` +### \`carbon.integrations.sync_rss_feed\` Rss Feed -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_rss_feed_response = carbon.integrations.sync_rss_feed( - url=\\"string_example\\", + url="string_example", tags={}, chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`RSSFeedInput\`](./carbon/type/rss_feed_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/rss_feed\` \`post\` @@ -1923,13 +1923,13 @@ sync_rss_feed_response = carbon.integrations.sync_rss_feed( --- -### \`carbon.integrations.sync_s3_files\` +### \`carbon.integrations.sync_s3_files\` After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name and object key as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python sync_s3_files_response = carbon.integrations.sync_s3_files( @@ -1938,41 +1938,41 @@ sync_s3_files_response = carbon.integrations.sync_s3_files( chunk_size=1500, chunk_overlap=20, skip_embedding_generation=False, - embedding_model=\\"OPENAI\\", + embedding_model="OPENAI", generate_sparse_vectors=False, prepend_filename_to_chunks=False, max_items_per_chunk=1, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### ids: List[\`S3GetFileInput\`] +##### ids: List[\`S3GetFileInput\`] -##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` +##### tags: \`Optional[Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) +##### embedding_model: [\`EmbeddingGenerators\`](./carbon/type/embedding_generators.py) -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -##### max_items_per_chunk: \`Optional[int]\` +##### max_items_per_chunk: \`Optional[int]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`S3FileSyncInput\`](./carbon/type/s3_file_sync_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/s3/files\` \`post\` @@ -1980,21 +1980,21 @@ sync_s3_files_response = carbon.integrations.sync_s3_files( --- -### \`carbon.organizations.get\` +### \`carbon.organizations.get\` Get Organization -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = carbon.organizations.get() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`OrganizationResponse\`](./carbon/pydantic/organization_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/organization\` \`get\` @@ -2002,30 +2002,30 @@ get_response = carbon.organizations.get() --- -### \`carbon.users.get\` +### \`carbon.users.get\` User Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = carbon.users.get( - customer_id=\\"string_example\\", + customer_id="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### customer_id: \`str\` +##### customer_id: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UserRequestContent\`](./carbon/type/user_request_content.py) -#### 🔄 Return +#### 🔄 Return [\`UserResponse\`](./carbon/pydantic/user_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user\` \`post\` @@ -2033,33 +2033,33 @@ get_response = carbon.users.get( --- -### \`carbon.users.toggle_user_features\` +### \`carbon.users.toggle_user_features\` Toggle User Features -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python toggle_user_features_response = carbon.users.toggle_user_features( - configuration_key_name=\\"string_example\\", + configuration_key_name="string_example", value={}, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### configuration_key_name: \`str\` +##### configuration_key_name: \`str\` -##### value: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` +##### value: \`Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ModifyUserConfigurationInput\`](./carbon/type/modify_user_configuration_input.py) -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/modify_user_configuration\` \`post\` @@ -2067,7 +2067,7 @@ toggle_user_features_response = carbon.users.toggle_user_features( --- -### \`carbon.utilities.fetch_urls\` +### \`carbon.utilities.fetch_urls\` Extracts all URLs from a webpage. @@ -2077,23 +2077,23 @@ Args: Returns: FetchURLsResponse: A response object with a list of URLs extracted from the webpage and the webpage content. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_urls_response = carbon.utilities.fetch_urls( - url=\\"url_example\\", + url="url_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -#### 🔄 Return +#### 🔄 Return [\`FetchURLsResponse\`](./carbon/pydantic/fetch_urls_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/fetch_urls\` \`get\` @@ -2101,7 +2101,7 @@ fetch_urls_response = carbon.utilities.fetch_urls( --- -### \`carbon.utilities.fetch_youtube_transcripts\` +### \`carbon.utilities.fetch_youtube_transcripts\` Fetches english transcripts from YouTube videos. @@ -2112,26 +2112,26 @@ Args: Returns: dict: A dictionary with the transcript of the YouTube video. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_youtube_transcripts_response = carbon.utilities.fetch_youtube_transcripts( - id=\\"id_example\\", + id="id_example", raw=False, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`str\` +##### id: \`str\` -##### raw: \`bool\` +##### raw: \`bool\` -#### 🔄 Return +#### 🔄 Return [\`YoutubeTranscriptResponse\`](./carbon/pydantic/youtube_transcript_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/fetch_youtube_transcript\` \`get\` @@ -2139,7 +2139,7 @@ fetch_youtube_transcripts_response = carbon.utilities.fetch_youtube_transcripts( --- -### \`carbon.utilities.process_sitemap\` +### \`carbon.utilities.process_sitemap\` Retrieves all URLs from a sitemap, which can subsequently be utilized with our \`web_scrape\` endpoint. @@ -2149,19 +2149,19 @@ Retrieves all URLs from a sitemap, which can subsequently be utilized with our \ Returns: dict: A dictionary with a list of URLs extracted from the sitemap.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python process_sitemap_response = carbon.utilities.process_sitemap( - url=\\"url_example\\", + url="url_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/process_sitemap\` \`get\` @@ -2169,7 +2169,7 @@ process_sitemap_response = carbon.utilities.process_sitemap( --- -### \`carbon.utilities.scrape_sitemap\` +### \`carbon.utilities.scrape_sitemap\` Extracts all URLs from a sitemap and performs a web scrape on each of them. @@ -2179,13 +2179,13 @@ Args: Returns: dict: A response object with the status of the scraping job message.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python scrape_sitemap_response = carbon.utilities.scrape_sitemap( - url=\\"string_example\\", + url="string_example", tags={ - \\"key\\": \\"string_example\\", + "key": "string_example", }, max_pages_to_scrape=100, chunk_size=1500, @@ -2200,36 +2200,36 @@ scrape_sitemap_response = carbon.utilities.scrape_sitemap( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -##### tags: [\`SitemapScrapeRequestTags\`](./carbon/type/sitemap_scrape_request_tags.py) +##### tags: [\`SitemapScrapeRequestTags\`](./carbon/type/sitemap_scrape_request_tags.py) -##### max_pages_to_scrape: \`Optional[int]\` +##### max_pages_to_scrape: \`Optional[int]\` -##### chunk_size: \`Optional[int]\` +##### chunk_size: \`Optional[int]\` -##### chunk_overlap: \`Optional[int]\` +##### chunk_overlap: \`Optional[int]\` -##### skip_embedding_generation: \`Optional[bool]\` +##### skip_embedding_generation: \`Optional[bool]\` -##### enable_auto_sync: \`Optional[bool]\` +##### enable_auto_sync: \`Optional[bool]\` -##### generate_sparse_vectors: \`Optional[bool]\` +##### generate_sparse_vectors: \`Optional[bool]\` -##### prepend_filename_to_chunks: \`Optional[bool]\` +##### prepend_filename_to_chunks: \`Optional[bool]\` -##### html_tags_to_skip: [\`SitemapScrapeRequestHtmlTagsToSkip\`](./carbon/type/sitemap_scrape_request_html_tags_to_skip.py) +##### html_tags_to_skip: [\`SitemapScrapeRequestHtmlTagsToSkip\`](./carbon/type/sitemap_scrape_request_html_tags_to_skip.py) -##### css_classes_to_skip: [\`SitemapScrapeRequestCssClassesToSkip\`](./carbon/type/sitemap_scrape_request_css_classes_to_skip.py) +##### css_classes_to_skip: [\`SitemapScrapeRequestCssClassesToSkip\`](./carbon/type/sitemap_scrape_request_css_classes_to_skip.py) -##### css_selectors_to_skip: [\`SitemapScrapeRequestCssSelectorsToSkip\`](./carbon/type/sitemap_scrape_request_css_selectors_to_skip.py) +##### css_selectors_to_skip: [\`SitemapScrapeRequestCssSelectorsToSkip\`](./carbon/type/sitemap_scrape_request_css_selectors_to_skip.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SitemapScrapeRequest\`](./carbon/type/sitemap_scrape_request.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/scrape_sitemap\` \`post\` @@ -2237,7 +2237,7 @@ scrape_sitemap_response = carbon.utilities.scrape_sitemap( --- -### \`carbon.utilities.scrape_web\` +### \`carbon.utilities.scrape_web\` Conduct a web scrape on a given webpage URL. Our web scraper is fully compatible with JavaScript and supports recursion depth, enabling you to efficiently extract all content from the target website. @@ -2248,33 +2248,33 @@ Conduct a web scrape on a given webpage URL. Our web scraper is fully compatible Returns: dict: A response object with the status of the scraping job message.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python scrape_web_response = carbon.utilities.scrape_web( body=[ { - \\"url\\": \\"url_example\\", - \\"recursion_depth\\": 3, - \\"max_pages_to_scrape\\": 100, - \\"chunk_size\\": 1500, - \\"chunk_overlap\\": 20, - \\"skip_embedding_generation\\": False, - \\"enable_auto_sync\\": False, - \\"generate_sparse_vectors\\": False, - \\"prepend_filename_to_chunks\\": False, - \\"html_tags_to_skip\\": [], - \\"css_classes_to_skip\\": [], - \\"css_selectors_to_skip\\": [], + "url": "url_example", + "recursion_depth": 3, + "max_pages_to_scrape": 100, + "chunk_size": 1500, + "chunk_overlap": 20, + "skip_embedding_generation": False, + "enable_auto_sync": False, + "generate_sparse_vectors": False, + "prepend_filename_to_chunks": False, + "html_tags_to_skip": [], + "css_classes_to_skip": [], + "css_selectors_to_skip": [], } ], ) \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UtilitiesScrapeWebRequest\`](./carbon/type/utilities_scrape_web_request.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/web_scrape\` \`post\` @@ -2282,7 +2282,7 @@ scrape_web_response = carbon.utilities.scrape_web( --- -### \`carbon.utilities.search_urls\` +### \`carbon.utilities.search_urls\` Perform a web search and obtain a list of relevant URLs. @@ -2304,23 +2304,23 @@ Args: Returns: FetchURLsResponse: A response object with a list of URLs for a given search query. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python search_urls_response = carbon.utilities.search_urls( - query=\\"query_example\\", + query="query_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`str\` +##### query: \`str\` -#### 🔄 Return +#### 🔄 Return [\`FetchURLsResponse\`](./carbon/pydantic/fetch_urls_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/search_urls\` \`get\` @@ -2328,30 +2328,30 @@ search_urls_response = carbon.utilities.search_urls( --- -### \`carbon.webhooks.add_url\` +### \`carbon.webhooks.add_url\` Add Webhook Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python add_url_response = carbon.webhooks.add_url( - url=\\"string_example\\", + url="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`str\` +##### url: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`AddWebhookProps\`](./carbon/type/add_webhook_props.py) -#### 🔄 Return +#### 🔄 Return [\`Webhook\`](./carbon/pydantic/webhook.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/add_webhook\` \`post\` @@ -2359,11 +2359,11 @@ add_url_response = carbon.webhooks.add_url( --- -### \`carbon.webhooks.delete_url\` +### \`carbon.webhooks.delete_url\` Delete Webhook Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python delete_url_response = carbon.webhooks.delete_url( @@ -2371,15 +2371,15 @@ delete_url_response = carbon.webhooks.delete_url( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### webhook_id: \`int\` +##### webhook_id: \`int\` -#### 🔄 Return +#### 🔄 Return [\`GenericSuccessResponse\`](./carbon/pydantic/generic_success_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_webhook/{webhook_id}\` \`delete\` @@ -2387,46 +2387,46 @@ delete_url_response = carbon.webhooks.delete_url( --- -### \`carbon.webhooks.urls\` +### \`carbon.webhooks.urls\` Webhook Urls -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python urls_response = carbon.webhooks.urls( pagination={ - \\"limit\\": 10, - \\"offset\\": 0, + "limit": 10, + "offset": 0, }, - order_by=\\"created_at\\", - order_dir=\\"desc\\", + order_by="created_at", + order_dir="desc", filters={ - \\"ids\\": [], + "ids": [], }, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./carbon/type/pagination.py) +##### pagination: [\`Pagination\`](./carbon/type/pagination.py) -##### order_by: [\`WebhookOrderByColumns\`](./carbon/type/webhook_order_by_columns.py) +##### order_by: [\`WebhookOrderByColumns\`](./carbon/type/webhook_order_by_columns.py) -##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) +##### order_dir: [\`OrderDir\`](./carbon/type/order_dir.py) -##### filters: [\`WebhookFilters\`](./carbon/type/webhook_filters.py) +##### filters: [\`WebhookFilters\`](./carbon/type/webhook_filters.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`WebhookQueryInput\`](./carbon/type/webhook_query_input.py) -#### 🔄 Return +#### 🔄 Return [\`WebhookQueryResponse\`](./carbon/pydantic/webhook_query_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/webhooks\` \`post\` @@ -2435,7 +2435,7 @@ urls_response = carbon.webhooks.urls( --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-circular-reference.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-circular-reference.test.ts.snap index 958eecada7..63c036a114 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-circular-reference.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-circular-reference.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-circular-reference 1`] = ` -"# python-circular-reference +"# python-circular-reference A simple API based for testing python-circular-reference. @@ -10,7 +10,7 @@ A simple API based for testing python-circular-reference. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,24 +24,24 @@ A simple API based for testing python-circular-reference. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-circular-reference==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_circular_reference import PythonCircularReferenceClient, ApiException pythoncircularreferenceclient = PythonCircularReferenceClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -49,7 +49,7 @@ try: fetch_response = pythoncircularreferenceclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -57,7 +57,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -67,7 +67,7 @@ from pprint import pprint from python_circular_reference import PythonCircularReferenceClient, ApiException pythoncircularreferenceclient = PythonCircularReferenceClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -77,7 +77,7 @@ async def main(): fetch_response = await pythoncircularreferenceclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -88,7 +88,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -97,21 +97,21 @@ from pprint import pprint from python_circular_reference import PythonCircularReferenceClient, ApiException pythoncircularreferenceclient = PythonCircularReferenceClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythoncircularreferenceclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"required\\"]) - pprint(fetch_response.body[\\"value\\"]) - pprint(fetch_response.body[\\"array\\"]) + pprint(fetch_response.body["required"]) + pprint(fetch_response.body["value"]) + pprint(fetch_response.body["array"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -120,22 +120,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythoncircularreferenceclient.test.fetch\` +## Reference +### \`pythoncircularreferenceclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythoncircularreferenceclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_circular_reference/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -144,7 +144,7 @@ fetch_response = pythoncircularreferenceclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-decentro.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-decentro.test.ts.snap index 65b4eee86b..ea38ebdd08 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-decentro.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-decentro.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-decentro 1`] = ` -"# decentro-in-collections-python-sdk +"# decentro-in-collections-python-sdk Collections @@ -10,7 +10,7 @@ Collections [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/decentro-in/decentro-in-collections-sdk/tree/master/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://decentro.tech) -## Table of Contents +## Table of Contents @@ -28,36 +28,36 @@ Collections -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install decentro-in-collections-python-sdk==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from decentro_in_collections_client import Decentro, ApiException decentro = Decentro( - client_id=\\"YOUR_API_KEY\\", - client_secret=\\"YOUR_API_KEY\\", - module_secret=\\"YOUR_API_KEY\\", - provider_secret=\\"YOUR_API_KEY\\", + client_id="YOUR_API_KEY", + client_secret="YOUR_API_KEY", + module_secret="YOUR_API_KEY", + provider_secret="YOUR_API_KEY", ) try: # Generate payment link generate_payment_link_response = decentro.collections.generate_payment_link( - reference_id=\\"ABCDEF12345\\", - payee_account=\\"00000000000000000\\", + reference_id="ABCDEF12345", + payee_account="00000000000000000", amount=4, - purpose_message=\\"Welcome to Decentro\\", + purpose_message="Welcome to Decentro", generate_qr=0, expiry_time=10, customized_qr_with_logo=0, @@ -65,20 +65,20 @@ try: ) print(generate_payment_link_response) except ApiException as e: - print(\\"Exception when calling CollectionsApi.generate_payment_link: %s\\\\n\\" % e) + print("Exception when calling CollectionsApi.generate_payment_link: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"decentroTxnId\\"]) - pprint(e.body[\\"status\\"]) - pprint(e.body[\\"responseCode\\"]) - pprint(e.body[\\"message\\"]) + pprint(e.body["decentroTxnId"]) + pprint(e.body["status"]) + pprint(e.body["responseCode"]) + pprint(e.body["message"]) pprint(e.headers) pprint(e.status) pprint(e.reason) pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -88,10 +88,10 @@ from pprint import pprint from decentro_in_collections_client import Decentro, ApiException decentro = Decentro( - client_id=\\"YOUR_API_KEY\\", - client_secret=\\"YOUR_API_KEY\\", - module_secret=\\"YOUR_API_KEY\\", - provider_secret=\\"YOUR_API_KEY\\", + client_id="YOUR_API_KEY", + client_secret="YOUR_API_KEY", + module_secret="YOUR_API_KEY", + provider_secret="YOUR_API_KEY", ) @@ -100,10 +100,10 @@ async def main(): # Generate payment link generate_payment_link_response = ( await decentro.collections.agenerate_payment_link( - reference_id=\\"ABCDEF12345\\", - payee_account=\\"00000000000000000\\", + reference_id="ABCDEF12345", + payee_account="00000000000000000", amount=4, - purpose_message=\\"Welcome to Decentro\\", + purpose_message="Welcome to Decentro", generate_qr=0, expiry_time=10, customized_qr_with_logo=0, @@ -112,13 +112,13 @@ async def main(): ) print(generate_payment_link_response) except ApiException as e: - print(\\"Exception when calling CollectionsApi.generate_payment_link: %s\\\\n\\" % e) + print("Exception when calling CollectionsApi.generate_payment_link: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"decentroTxnId\\"]) - pprint(e.body[\\"status\\"]) - pprint(e.body[\\"responseCode\\"]) - pprint(e.body[\\"message\\"]) + pprint(e.body["decentroTxnId"]) + pprint(e.body["status"]) + pprint(e.body["responseCode"]) + pprint(e.body["message"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -128,7 +128,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -137,42 +137,42 @@ from pprint import pprint from decentro_in_collections_client import Decentro, ApiException decentro = Decentro( - client_id=\\"YOUR_API_KEY\\", - client_secret=\\"YOUR_API_KEY\\", - module_secret=\\"YOUR_API_KEY\\", - provider_secret=\\"YOUR_API_KEY\\", + client_id="YOUR_API_KEY", + client_secret="YOUR_API_KEY", + module_secret="YOUR_API_KEY", + provider_secret="YOUR_API_KEY", ) try: # Generate payment link generate_payment_link_response = decentro.collections.raw.generate_payment_link( - reference_id=\\"ABCDEF12345\\", - payee_account=\\"00000000000000000\\", + reference_id="ABCDEF12345", + payee_account="00000000000000000", amount=4, - purpose_message=\\"Welcome to Decentro\\", + purpose_message="Welcome to Decentro", generate_qr=0, expiry_time=10, customized_qr_with_logo=0, generate_uri=0, ) pprint(generate_payment_link_response.body) - pprint(generate_payment_link_response.body[\\"decentroTxnId\\"]) - pprint(generate_payment_link_response.body[\\"status\\"]) - pprint(generate_payment_link_response.body[\\"responseCode\\"]) - pprint(generate_payment_link_response.body[\\"message\\"]) - pprint(generate_payment_link_response.body[\\"data\\"]) - pprint(generate_payment_link_response.body[\\"responseKey\\"]) + pprint(generate_payment_link_response.body["decentroTxnId"]) + pprint(generate_payment_link_response.body["status"]) + pprint(generate_payment_link_response.body["responseCode"]) + pprint(generate_payment_link_response.body["message"]) + pprint(generate_payment_link_response.body["data"]) + pprint(generate_payment_link_response.body["responseKey"]) pprint(generate_payment_link_response.headers) pprint(generate_payment_link_response.status) pprint(generate_payment_link_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling CollectionsApi.generate_payment_link: %s\\\\n\\" % e) + print("Exception when calling CollectionsApi.generate_payment_link: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"decentroTxnId\\"]) - pprint(e.body[\\"status\\"]) - pprint(e.body[\\"responseCode\\"]) - pprint(e.body[\\"message\\"]) + pprint(e.body["decentroTxnId"]) + pprint(e.body["status"]) + pprint(e.body["responseCode"]) + pprint(e.body["message"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -180,19 +180,19 @@ except ApiException as e: \`\`\` -## Reference -### \`decentro.collections.generate_payment_link\` +## Reference +### \`decentro.collections.generate_payment_link\` Generate payment link -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python generate_payment_link_response = decentro.collections.generate_payment_link( - reference_id=\\"ABCDEF12345\\", - payee_account=\\"00000000000000000\\", + reference_id="ABCDEF12345", + payee_account="00000000000000000", amount=4, - purpose_message=\\"Welcome to Decentro\\", + purpose_message="Welcome to Decentro", generate_qr=0, expiry_time=10, customized_qr_with_logo=0, @@ -200,32 +200,32 @@ generate_payment_link_response = decentro.collections.generate_payment_link( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### reference_id: \`str\` +##### reference_id: \`str\` -##### payee_account: \`str\` +##### payee_account: \`str\` -##### amount: \`Union[int, float]\` +##### amount: \`Union[int, float]\` -##### purpose_message: \`str\` +##### purpose_message: \`str\` -##### generate_qr: \`int\` +##### generate_qr: \`int\` -##### expiry_time: \`int\` +##### expiry_time: \`int\` -##### customized_qr_with_logo: \`int\` +##### customized_qr_with_logo: \`int\` -##### generate_uri: \`int\` +##### generate_uri: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`GeneratePaymentLinkRequest\`](./decentro_in_collections_client/type/generate_payment_link_request.py) -#### 🔄 Return +#### 🔄 Return [\`GeneratePaymentLinkResponse\`](./decentro_in_collections_client/pydantic/generate_payment_link_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v2/payments/upi/link\` \`post\` @@ -233,27 +233,27 @@ generate_payment_link_response = decentro.collections.generate_payment_link( --- -### \`decentro.collections.get_transaction_status\` +### \`decentro.collections.get_transaction_status\` Get transaction status -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_transaction_status_response = decentro.collections.get_transaction_status( - transaction_id=\\"transaction_id_example\\", + transaction_id="transaction_id_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### transaction_id: \`str\` +##### transaction_id: \`str\` -#### 🔄 Return +#### 🔄 Return [\`GetTransactionStatusResponse\`](./decentro_in_collections_client/pydantic/get_transaction_status_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v2/payments/transaction/{transaction_id}/status\` \`get\` @@ -261,45 +261,45 @@ get_transaction_status_response = decentro.collections.get_transaction_status( --- -### \`decentro.collections.issue_collect_request\` +### \`decentro.collections.issue_collect_request\` Issue collect request -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python issue_collect_request_response = decentro.collections.issue_collect_request( - reference_id=\\"ABCDEF12345\\", - payer_upi=\\"test001@abc\\", - payee_account=\\"00000000000000000\\", + reference_id="ABCDEF12345", + payer_upi="test001@abc", + payee_account="00000000000000000", amount=1, - purpose_message=\\"Welcome to Decentro\\", + purpose_message="Welcome to Decentro", expiry_time=30, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### reference_id: \`str\` +##### reference_id: \`str\` -##### payer_upi: \`str\` +##### payer_upi: \`str\` -##### payee_account: \`str\` +##### payee_account: \`str\` -##### amount: \`Union[int, float]\` +##### amount: \`Union[int, float]\` -##### purpose_message: \`str\` +##### purpose_message: \`str\` -##### expiry_time: \`int\` +##### expiry_time: \`int\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`IssueCollectRequestRequest\`](./decentro_in_collections_client/type/issue_collect_request_request.py) -#### 🔄 Return +#### 🔄 Return [\`IssueCollectRequestResponse\`](./decentro_in_collections_client/pydantic/issue_collect_request_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v2/payments/collection\` \`post\` @@ -307,39 +307,39 @@ issue_collect_request_response = decentro.collections.issue_collect_request( --- -### \`decentro.collections.issue_upi_refund\` +### \`decentro.collections.issue_upi_refund\` Issue UPI Refund -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python issue_upi_refund_response = decentro.collections.issue_upi_refund( - reference_id=\\"ABCDEF12345\\", - transaction_id=\\"4CE9587AE3D143CDAC72E7D0CF14D028\\", - bank_reference_number=\\"111111111111\\", - purpose_message=\\"Welcome to Decentro\\", + reference_id="ABCDEF12345", + transaction_id="4CE9587AE3D143CDAC72E7D0CF14D028", + bank_reference_number="111111111111", + purpose_message="Welcome to Decentro", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### reference_id: \`str\` +##### reference_id: \`str\` -##### transaction_id: \`str\` +##### transaction_id: \`str\` -##### bank_reference_number: \`str\` +##### bank_reference_number: \`str\` -##### purpose_message: \`str\` +##### purpose_message: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`IssueUpiRefundRequest\`](./decentro_in_collections_client/type/issue_upi_refund_request.py) -#### 🔄 Return +#### 🔄 Return [\`IssueUpiRefundResponse\`](./decentro_in_collections_client/pydantic/issue_upi_refund_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v2/payments/upi/refund\` \`post\` @@ -347,36 +347,36 @@ issue_upi_refund_response = decentro.collections.issue_upi_refund( --- -### \`decentro.collections.validate_upi_handle\` +### \`decentro.collections.validate_upi_handle\` Validate UPI handle -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python validate_upi_handle_response = decentro.collections.validate_upi_handle( - reference_id=\\"ABCDEF12345\\", - upi_id=\\"test001@abc\\", - type=\\"BASIC\\", + reference_id="ABCDEF12345", + upi_id="test001@abc", + type="BASIC", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### reference_id: \`str\` +##### reference_id: \`str\` -##### upi_id: \`str\` +##### upi_id: \`str\` -##### type: \`str\` +##### type: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`ValidateUpiHandleRequest\`](./decentro_in_collections_client/type/validate_upi_handle_request.py) -#### 🔄 Return +#### 🔄 Return [\`ValidateUpiHandleResponse\`](./decentro_in_collections_client/pydantic/validate_upi_handle_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v2/payments/vpa/validate\` \`post\` diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-invalid-response.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-invalid-response.test.ts.snap index 3c7f62ae16..9b6cc7ec0d 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-invalid-response.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-invalid-response.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-invalid-response 1`] = ` -"# python-invalid-response +"# python-invalid-response A simple API based for testing python-invalid-response. @@ -10,7 +10,7 @@ A simple API based for testing python-invalid-response. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -30,24 +30,24 @@ A simple API based for testing python-invalid-response. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-invalid-response==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_invalid_response import PythonInvalidResponseClient, ApiException pythoninvalidresponseclient = PythonInvalidResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -56,7 +56,7 @@ try: ) print(dict_instead_of_list_or_scalar_response) except ApiException as e: - print(\\"Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\\\n\\" % e) + print("Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -64,7 +64,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -74,7 +74,7 @@ from pprint import pprint from python_invalid_response import PythonInvalidResponseClient, ApiException pythoninvalidresponseclient = PythonInvalidResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -85,7 +85,7 @@ async def main(): ) print(dict_instead_of_list_or_scalar_response) except ApiException as e: - print(\\"Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\\\n\\" % e) + print("Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -96,7 +96,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -105,7 +105,7 @@ from pprint import pprint from python_invalid_response import PythonInvalidResponseClient, ApiException pythoninvalidresponseclient = PythonInvalidResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -117,7 +117,7 @@ try: pprint(dict_instead_of_list_or_scalar_response.status) pprint(dict_instead_of_list_or_scalar_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\\\n\\" % e) + print("Exception when calling TestApi.dict_instead_of_list_or_scalar: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -126,12 +126,12 @@ except ApiException as e: \`\`\` -## Reference -### \`pythoninvalidresponseclient.test.dict_instead_of_list_or_scalar\` +## Reference +### \`pythoninvalidresponseclient.test.dict_instead_of_list_or_scalar\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python dict_instead_of_list_or_scalar_response = ( @@ -139,11 +139,11 @@ dict_instead_of_list_or_scalar_response = ( ) \`\`\` -#### 🔄 Return +#### 🔄 Return [\`DictInsteadOfListOrScalar\`](./python_invalid_response/pydantic/dict_instead_of_list_or_scalar.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/dict-instead-of-list-or-scalar\` \`get\` @@ -151,21 +151,21 @@ dict_instead_of_list_or_scalar_response = ( --- -### \`pythoninvalidresponseclient.test.invalid_array\` +### \`pythoninvalidresponseclient.test.invalid_array\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python invalid_array_response = pythoninvalidresponseclient.test.invalid_array() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`InvalidArray\`](./python_invalid_response/pydantic/invalid_array.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/invalid-array\` \`get\` @@ -173,21 +173,21 @@ invalid_array_response = pythoninvalidresponseclient.test.invalid_array() --- -### \`pythoninvalidresponseclient.test.invalid_object\` +### \`pythoninvalidresponseclient.test.invalid_object\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python invalid_object_response = pythoninvalidresponseclient.test.invalid_object() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`InvalidObject\`](./python_invalid_response/pydantic/invalid_object.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/invalid-object\` \`get\` @@ -195,21 +195,21 @@ invalid_object_response = pythoninvalidresponseclient.test.invalid_object() --- -### \`pythoninvalidresponseclient.test.invalid_scalar\` +### \`pythoninvalidresponseclient.test.invalid_scalar\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python invalid_scalar_response = pythoninvalidresponseclient.test.invalid_scalar() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`InvalidScalar\`](./python_invalid_response/pydantic/invalid_scalar.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/invalid-scalar\` \`get\` @@ -217,11 +217,11 @@ invalid_scalar_response = pythoninvalidresponseclient.test.invalid_scalar() --- -### \`pythoninvalidresponseclient.test.list_instead_of_scalar\` +### \`pythoninvalidresponseclient.test.list_instead_of_scalar\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_instead_of_scalar_response = ( @@ -229,7 +229,7 @@ list_instead_of_scalar_response = ( ) \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/list-instead-of-scalar\` \`get\` @@ -237,11 +237,11 @@ list_instead_of_scalar_response = ( --- -### \`pythoninvalidresponseclient.test.object_instead_of_scalar\` +### \`pythoninvalidresponseclient.test.object_instead_of_scalar\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python object_instead_of_scalar_response = ( @@ -249,7 +249,7 @@ object_instead_of_scalar_response = ( ) \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/object-instead-of-scalar\` \`get\` @@ -257,11 +257,11 @@ object_instead_of_scalar_response = ( --- -### \`pythoninvalidresponseclient.test.only_one_property_is_invalid\` +### \`pythoninvalidresponseclient.test.only_one_property_is_invalid\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python only_one_property_is_invalid_response = ( @@ -269,11 +269,11 @@ only_one_property_is_invalid_response = ( ) \`\`\` -#### 🔄 Return +#### 🔄 Return [\`OnlyOnePropertyIsInvalid\`](./python_invalid_response/pydantic/only_one_property_is_invalid.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/only-one-property-is-invalid\` \`get\` @@ -282,7 +282,7 @@ only_one_property_is_invalid_response = ( --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-leap-workflows.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-leap-workflows.test.ts.snap index d0554b1187..75fd89def1 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-leap-workflows.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-leap-workflows.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`leap-workflows/python-leap-workflows 1`] = ` -"# leap-workflows-python-sdk +"# leap-workflows-python-sdk The Leap Workflows API allows developers to run workflows, fetch workflow runs, and provide other utility functions related to workflow runs. Please use the X-Api-Key for authenticated requests. @@ -10,7 +10,7 @@ The Leap Workflows API allows developers to run workflows, fetch workflow runs, [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/leap-ai/workflows-sdks/tree/main/sdks/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://tryleap.ai/) -## Table of Contents +## Table of Contents @@ -24,47 +24,47 @@ The Leap Workflows API allows developers to run workflows, fetch workflow runs, -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install leap-workflows-python-sdk==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from leap_workflows import Leap, ApiException leap = Leap( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # Get a workflow run get_workflow_run_response = leap.workflow_runs.get_workflow_run( - workflow_run_id=\\"workflow_run_id_example\\", + workflow_run_id="workflow_run_id_example", ) pprint(get_workflow_run_response.body) - pprint(get_workflow_run_response.body[\\"id\\"]) - pprint(get_workflow_run_response.body[\\"version_id\\"]) - pprint(get_workflow_run_response.body[\\"status\\"]) - pprint(get_workflow_run_response.body[\\"created_at\\"]) - pprint(get_workflow_run_response.body[\\"started_at\\"]) - pprint(get_workflow_run_response.body[\\"ended_at\\"]) - pprint(get_workflow_run_response.body[\\"workflow_id\\"]) - pprint(get_workflow_run_response.body[\\"error\\"]) - pprint(get_workflow_run_response.body[\\"input\\"]) - pprint(get_workflow_run_response.body[\\"output\\"]) + pprint(get_workflow_run_response.body["id"]) + pprint(get_workflow_run_response.body["version_id"]) + pprint(get_workflow_run_response.body["status"]) + pprint(get_workflow_run_response.body["created_at"]) + pprint(get_workflow_run_response.body["started_at"]) + pprint(get_workflow_run_response.body["ended_at"]) + pprint(get_workflow_run_response.body["workflow_id"]) + pprint(get_workflow_run_response.body["error"]) + pprint(get_workflow_run_response.body["input"]) + pprint(get_workflow_run_response.body["output"]) pprint(get_workflow_run_response.headers) pprint(get_workflow_run_response.status) pprint(get_workflow_run_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling WorkflowRunsApi.get_workflow_run: %s\\\\n\\" % e) + print("Exception when calling WorkflowRunsApi.get_workflow_run: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -72,7 +72,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -82,7 +82,7 @@ from pprint import pprint from leap_workflows import Leap, ApiException leap = Leap( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) @@ -90,24 +90,24 @@ async def main(): try: # Get a workflow run get_workflow_run_response = await leap.workflow_runs.aget_workflow_run( - workflow_run_id=\\"workflow_run_id_example\\", + workflow_run_id="workflow_run_id_example", ) pprint(get_workflow_run_response.body) - pprint(get_workflow_run_response.body[\\"id\\"]) - pprint(get_workflow_run_response.body[\\"version_id\\"]) - pprint(get_workflow_run_response.body[\\"status\\"]) - pprint(get_workflow_run_response.body[\\"created_at\\"]) - pprint(get_workflow_run_response.body[\\"started_at\\"]) - pprint(get_workflow_run_response.body[\\"ended_at\\"]) - pprint(get_workflow_run_response.body[\\"workflow_id\\"]) - pprint(get_workflow_run_response.body[\\"error\\"]) - pprint(get_workflow_run_response.body[\\"input\\"]) - pprint(get_workflow_run_response.body[\\"output\\"]) + pprint(get_workflow_run_response.body["id"]) + pprint(get_workflow_run_response.body["version_id"]) + pprint(get_workflow_run_response.body["status"]) + pprint(get_workflow_run_response.body["created_at"]) + pprint(get_workflow_run_response.body["started_at"]) + pprint(get_workflow_run_response.body["ended_at"]) + pprint(get_workflow_run_response.body["workflow_id"]) + pprint(get_workflow_run_response.body["error"]) + pprint(get_workflow_run_response.body["input"]) + pprint(get_workflow_run_response.body["output"]) pprint(get_workflow_run_response.headers) pprint(get_workflow_run_response.status) pprint(get_workflow_run_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling WorkflowRunsApi.get_workflow_run: %s\\\\n\\" % e) + print("Exception when calling WorkflowRunsApi.get_workflow_run: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -119,30 +119,30 @@ asyncio.run(main()) \`\`\` -## Reference -### \`leap.workflow_runs.get_workflow_run\` +## Reference +### \`leap.workflow_runs.get_workflow_run\` This endpoint retrieves the details of a specific workflow run using its \`workflow_run_id\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_workflow_run_response = leap.workflow_runs.get_workflow_run( - workflow_run_id=\\"workflow_run_id_example\\", + workflow_run_id="workflow_run_id_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflow_run_id: \`str\` +##### workflow_run_id: \`str\` The ID of the workflow run to retrieve. -#### 🔄 Return +#### 🔄 Return [\`WorkflowRunEntity\`](./leap_workflows/type/workflow_run_entity.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs/{workflow_run_id}\` \`get\` @@ -150,43 +150,43 @@ The ID of the workflow run to retrieve. --- -### \`leap.workflow_runs.workflow\` +### \`leap.workflow_runs.workflow\` This endpoint lets the user run a specified workflow with the provided workflow definition. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python workflow_response = leap.workflow_runs.workflow( - workflow_id=\\"123e4567-e89b-12d3-a456-426614174000\\", - webhook_url=\\"https://myapp.com/webhook\\", + workflow_id="123e4567-e89b-12d3-a456-426614174000", + webhook_url="https://myapp.com/webhook", input={ - \\"first_name\\": \\"Sam\\", - \\"last_name\\": \\"Altman\\", + "first_name": "Sam", + "last_name": "Altman", }, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflow_id: \`str\` +##### workflow_id: \`str\` The UUID of the workflow to be run. -##### webhook_url: \`str\` +##### webhook_url: \`str\` The URL to which the workflow results should be sent to on completion. -##### input: [\`WorkflowRunPostRequestInput\`](./leap_workflows/type/workflow_run_post_request_input.py) +##### input: [\`WorkflowRunPostRequestInput\`](./leap_workflows/type/workflow_run_post_request_input.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`WorkflowRunPostRequest\`](./leap_workflows/type/workflow_run_post_request.py) -#### 🔄 Return +#### 🔄 Return [\`WorkflowRunEntity\`](./leap_workflows/type/workflow_run_entity.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs\` \`post\` @@ -195,7 +195,7 @@ The URL to which the workflow results should be sent to on completion. --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-newscatcher.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-newscatcher.test.ts.snap index bf49c7dcfe..6b0f7aec16 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-newscatcher.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-newscatcher.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-newscatcher 1`] = ` -"# newscatcherapi-python-sdk +"# newscatcherapi-python-sdk

Visit our website https://newscatcherapi.com @@ -9,7 +9,7 @@ exports[`python-newscatcher 1`] = ` [![PyPI](https://img.shields.io/badge/PyPI-v6.0.1-blue)](https://pypi.org/project/newscatcherapi-python-sdk/6.0.1) [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/newscatcher-sdks/tree/main/v3/python#readme) -## Table of Contents +## Table of Contents @@ -34,58 +34,58 @@ exports[`python-newscatcher 1`] = ` -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install newscatcherapi-python-sdk==6.0.1 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from newscatcherapi_client import Newscatcher, ApiException newscatcher = Newscatcher( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # [Get] Search By Author Request get_response = newscatcher.authors.get( - author_name=\\"author_name_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + author_name="author_name_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -93,17 +93,17 @@ try: ) print(get_response) except ApiException as e: - print(\\"Exception when calling AuthorsApi.get: %s\\\\n\\" % e) + print("Exception when calling AuthorsApi.get: %s\\n" % e) pprint(e.body) if e.status == 422: - pprint(e.body[\\"detail\\"]) + pprint(e.body["detail"]) pprint(e.headers) pprint(e.status) pprint(e.reason) pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -113,7 +113,7 @@ from pprint import pprint from newscatcherapi_client import Newscatcher, ApiException newscatcher = Newscatcher( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) @@ -121,35 +121,35 @@ async def main(): try: # [Get] Search By Author Request get_response = await newscatcher.authors.aget( - author_name=\\"author_name_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + author_name="author_name_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -157,10 +157,10 @@ async def main(): ) print(get_response) except ApiException as e: - print(\\"Exception when calling AuthorsApi.get: %s\\\\n\\" % e) + print("Exception when calling AuthorsApi.get: %s\\n" % e) pprint(e.body) if e.status == 422: - pprint(e.body[\\"detail\\"]) + pprint(e.body["detail"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -170,7 +170,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -179,41 +179,41 @@ from pprint import pprint from newscatcherapi_client import Newscatcher, ApiException newscatcher = Newscatcher( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # [Get] Search By Author Request get_response = newscatcher.authors.raw.get( - author_name=\\"author_name_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + author_name="author_name_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -224,10 +224,10 @@ try: pprint(get_response.status) pprint(get_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling AuthorsApi.get: %s\\\\n\\" % e) + print("Exception when calling AuthorsApi.get: %s\\n" % e) pprint(e.body) if e.status == 422: - pprint(e.body[\\"detail\\"]) + pprint(e.body["detail"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -235,44 +235,44 @@ except ApiException as e: \`\`\` -## Reference -### \`newscatcher.authors.get\` +## Reference +### \`newscatcher.authors.get\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.authors.get( - author_name=\\"author_name_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + author_name="author_name_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -280,81 +280,81 @@ get_response = newscatcher.authors.get( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### author_name: \`str\` +##### author_name: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### ner_name: \`str\` +##### ner_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### 🔄 Return +#### 🔄 Return [\`AuthorsGetResponse\`](./newscatcherapi_client/pydantic/authors_get_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`get\` @@ -362,43 +362,43 @@ get_response = newscatcher.authors.get( --- -### \`newscatcher.authors.post\` +### \`newscatcher.authors.post\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.authors.post( - author_name=\\"string_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + author_name="string_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -406,84 +406,84 @@ post_response = newscatcher.authors.post( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### author_name: \`str\` +##### author_name: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### ner_name: \`str\` +##### ner_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`AuthorSearchRequest\`](./newscatcherapi_client/type/author_search_request.py) -#### 🔄 Return +#### 🔄 Return [\`AuthorsPostResponse\`](./newscatcherapi_client/pydantic/authors_post_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`post\` @@ -491,43 +491,43 @@ post_response = newscatcher.authors.post( --- -### \`newscatcher.latest_headlines.get\` +### \`newscatcher.latest_headlines.get\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.latest_headlines.get( - when=\\"7d\\", + when="7d", by_parse_date=False, - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - ranked_only=\\"string_example\\", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + ranked_only="string_example", is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - theme=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + theme="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, clustering_enabled=True, clustering_threshold=3.14, - clustering_variable=\\"string_example\\", + clustering_variable="string_example", include_nlp_data=True, has_nlp=True, - org_entity_name=\\"string_example\\", - per_entity_name=\\"string_example\\", - loc_entity_name=\\"string_example\\", - misc_entity_name=\\"string_example\\", + org_entity_name="string_example", + per_entity_name="string_example", + loc_entity_name="string_example", + misc_entity_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -535,79 +535,79 @@ get_response = newscatcher.latest_headlines.get( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`str\` +##### when: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### theme: \`str\` +##### theme: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### clustering_enabled: \`bool\` +##### clustering_enabled: \`bool\` -##### clustering_threshold: \`Union[int, float]\` +##### clustering_threshold: \`Union[int, float]\` -##### clustering_variable: \`str\` +##### clustering_variable: \`str\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### org_entity_name: \`str\` +##### org_entity_name: \`str\` -##### per_entity_name: \`str\` +##### per_entity_name: \`str\` -##### loc_entity_name: \`str\` +##### loc_entity_name: \`str\` -##### misc_entity_name: \`str\` +##### misc_entity_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### 🔄 Return +#### 🔄 Return [\`LatestHeadlinesGetResponse\`](./newscatcherapi_client/pydantic/latest_headlines_get_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`get\` @@ -615,43 +615,43 @@ get_response = newscatcher.latest_headlines.get( --- -### \`newscatcher.latest_headlines.post\` +### \`newscatcher.latest_headlines.post\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.latest_headlines.post( - when=\\"7d\\", + when="7d", by_parse_date=False, - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - sources=\\"string_example\\", - predefined_sources=\\"string_example\\", - not_sources=\\"string_example\\", - ranked_only=\\"string_example\\", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + sources="string_example", + predefined_sources="string_example", + not_sources="string_example", + ranked_only="string_example", is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - theme=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + theme="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, clustering_enabled=True, clustering_threshold=3.14, - clustering_variable=\\"string_example\\", + clustering_variable="string_example", include_nlp_data=True, has_nlp=True, - org_entity_name=\\"string_example\\", - per_entity_name=\\"string_example\\", - loc_entity_name=\\"string_example\\", - misc_entity_name=\\"string_example\\", + org_entity_name="string_example", + per_entity_name="string_example", + loc_entity_name="string_example", + misc_entity_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -659,82 +659,82 @@ post_response = newscatcher.latest_headlines.post( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`str\` +##### when: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### theme: \`str\` +##### theme: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### clustering_enabled: \`bool\` +##### clustering_enabled: \`bool\` -##### clustering_threshold: \`Union[int, float]\` +##### clustering_threshold: \`Union[int, float]\` -##### clustering_variable: \`str\` +##### clustering_variable: \`str\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### org_entity_name: \`str\` +##### org_entity_name: \`str\` -##### per_entity_name: \`str\` +##### per_entity_name: \`str\` -##### loc_entity_name: \`str\` +##### loc_entity_name: \`str\` -##### misc_entity_name: \`str\` +##### misc_entity_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`LatestHeadlinesRequest\`](./newscatcherapi_client/type/latest_headlines_request.py) -#### 🔄 Return +#### 🔄 Return [\`LatestHeadlinesPostResponse\`](./newscatcherapi_client/pydantic/latest_headlines_post_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`post\` @@ -742,50 +742,50 @@ post_response = newscatcher.latest_headlines.post( --- -### \`newscatcher.search.get\` +### \`newscatcher.search.get\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.search.get( - q=\\"q_example\\", - search_in=\\"title_content\\", - predefined_sources=\\"string_example\\", - sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + q="q_example", + search_in="title_content", + predefined_sources="string_example", + sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, clustering_enabled=True, clustering_threshold=3.14, - clustering_variable=\\"string_example\\", + clustering_variable="string_example", include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - org_entity_name=\\"string_example\\", - per_entity_name=\\"string_example\\", - loc_entity_name=\\"string_example\\", - misc_entity_name=\\"string_example\\", + theme="string_example", + org_entity_name="string_example", + per_entity_name="string_example", + loc_entity_name="string_example", + misc_entity_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -793,95 +793,95 @@ get_response = newscatcher.search.get( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`str\` +##### q: \`str\` -##### search_in: \`str\` +##### search_in: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### clustering_enabled: \`bool\` +##### clustering_enabled: \`bool\` -##### clustering_threshold: \`Union[int, float]\` +##### clustering_threshold: \`Union[int, float]\` -##### clustering_variable: \`str\` +##### clustering_variable: \`str\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### org_entity_name: \`str\` +##### org_entity_name: \`str\` -##### per_entity_name: \`str\` +##### per_entity_name: \`str\` -##### loc_entity_name: \`str\` +##### loc_entity_name: \`str\` -##### misc_entity_name: \`str\` +##### misc_entity_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### 🔄 Return +#### 🔄 Return [\`SearchGetResponse\`](./newscatcherapi_client/pydantic/search_get_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`get\` @@ -889,50 +889,50 @@ get_response = newscatcher.search.get( --- -### \`newscatcher.search.post\` +### \`newscatcher.search.post\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.search.post( - q=\\"string_example\\", - search_in=\\"title_content\\", - predefined_sources=\\"string_example\\", - sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", - published_date_precision=\\"string_example\\", + q="string_example", + search_in="title_content", + predefined_sources="string_example", + sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", + published_date_precision="string_example", by_parse_date=False, - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, clustering_enabled=True, clustering_threshold=3.14, - clustering_variable=\\"string_example\\", + clustering_variable="string_example", include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - org_entity_name=\\"string_example\\", - per_entity_name=\\"string_example\\", - loc_entity_name=\\"string_example\\", - misc_entity_name=\\"string_example\\", + theme="string_example", + org_entity_name="string_example", + per_entity_name="string_example", + loc_entity_name="string_example", + misc_entity_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -940,98 +940,98 @@ post_response = newscatcher.search.post( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`str\` +##### q: \`str\` -##### search_in: \`str\` +##### search_in: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### clustering_enabled: \`bool\` +##### clustering_enabled: \`bool\` -##### clustering_threshold: \`Union[int, float]\` +##### clustering_threshold: \`Union[int, float]\` -##### clustering_variable: \`str\` +##### clustering_variable: \`str\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### org_entity_name: \`str\` +##### org_entity_name: \`str\` -##### per_entity_name: \`str\` +##### per_entity_name: \`str\` -##### loc_entity_name: \`str\` +##### loc_entity_name: \`str\` -##### misc_entity_name: \`str\` +##### misc_entity_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SearchRequest\`](./newscatcherapi_client/type/search_request.py) -#### 🔄 Return +#### 🔄 Return [\`SearchPostResponse\`](./newscatcherapi_client/pydantic/search_post_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`post\` @@ -1039,47 +1039,47 @@ post_response = newscatcher.search.post( --- -### \`newscatcher.search_similar.get\` +### \`newscatcher.search_similar.get\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.search_similar.get( - q=\\"q_example\\", - search_in=\\"title_content\\", + q="q_example", + search_in="title_content", include_similar_documents=False, similar_documents_number=5, - similar_documents_fields=\\"title,content\\", - predefined_sources=\\"string_example\\", - sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", + similar_documents_fields="title,content", + predefined_sources="string_example", + sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", by_parse_date=False, - published_date_precision=\\"string_example\\", - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + published_date_precision="string_example", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -1087,89 +1087,89 @@ get_response = newscatcher.search_similar.get( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`str\` +##### q: \`str\` -##### search_in: \`str\` +##### search_in: \`str\` -##### include_similar_documents: \`bool\` +##### include_similar_documents: \`bool\` -##### similar_documents_number: \`int\` +##### similar_documents_number: \`int\` -##### similar_documents_fields: \`str\` +##### similar_documents_fields: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### ner_name: \`str\` +##### ner_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### 🔄 Return +#### 🔄 Return [\`SearchSimilarGetResponse\`](./newscatcherapi_client/pydantic/search_similar_get_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`get\` @@ -1177,47 +1177,47 @@ get_response = newscatcher.search_similar.get( --- -### \`newscatcher.search_similar.post\` +### \`newscatcher.search_similar.post\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.search_similar.post( - q=\\"string_example\\", - search_in=\\"title_content\\", + q="string_example", + search_in="title_content", include_similar_documents=False, similar_documents_number=5, - similar_documents_fields=\\"title,content\\", - predefined_sources=\\"string_example\\", - sources=\\"string_example\\", - not_sources=\\"string_example\\", - lang=\\"string_example\\", - not_lang=\\"string_example\\", - countries=\\"string_example\\", - not_countries=\\"string_example\\", - from_=\\"string_example\\", - to_=\\"string_example\\", + similar_documents_fields="title,content", + predefined_sources="string_example", + sources="string_example", + not_sources="string_example", + lang="string_example", + not_lang="string_example", + countries="string_example", + not_countries="string_example", + from_="string_example", + to_="string_example", by_parse_date=False, - published_date_precision=\\"string_example\\", - sort_by=\\"relevancy\\", - ranked_only=\\"string_example\\", + published_date_precision="string_example", + sort_by="relevancy", + ranked_only="string_example", from_rank=1, to_rank=1, is_headline=True, is_paid_content=True, - parent_url=\\"string_example\\", - all_links=\\"string_example\\", - all_domain_links=\\"string_example\\", + parent_url="string_example", + all_links="string_example", + all_domain_links="string_example", word_count_min=0, word_count_max=0, page=1, page_size=100, include_nlp_data=True, has_nlp=True, - theme=\\"string_example\\", - ner_name=\\"string_example\\", + theme="string_example", + ner_name="string_example", title_sentiment_min=3.14, title_sentiment_max=3.14, content_sentiment_min=3.14, @@ -1225,92 +1225,92 @@ post_response = newscatcher.search_similar.post( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`str\` +##### q: \`str\` -##### search_in: \`str\` +##### search_in: \`str\` -##### include_similar_documents: \`bool\` +##### include_similar_documents: \`bool\` -##### similar_documents_number: \`int\` +##### similar_documents_number: \`int\` -##### similar_documents_fields: \`str\` +##### similar_documents_fields: \`str\` -##### predefined_sources: \`str\` +##### predefined_sources: \`str\` -##### sources: \`str\` +##### sources: \`str\` -##### not_sources: \`str\` +##### not_sources: \`str\` -##### lang: \`str\` +##### lang: \`str\` -##### not_lang: \`str\` +##### not_lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -##### not_countries: \`str\` +##### not_countries: \`str\` -##### from_: Union[\`str\`, \`datetime\`] +##### from_: Union[\`str\`, \`datetime\`] -##### to_: Union[\`str\`, \`datetime\`] +##### to_: Union[\`str\`, \`datetime\`] -##### by_parse_date: \`bool\` +##### by_parse_date: \`bool\` -##### published_date_precision: \`str\` +##### published_date_precision: \`str\` -##### sort_by: \`str\` +##### sort_by: \`str\` -##### ranked_only: \`str\` +##### ranked_only: \`str\` -##### from_rank: \`int\` +##### from_rank: \`int\` -##### to_rank: \`int\` +##### to_rank: \`int\` -##### is_headline: \`bool\` +##### is_headline: \`bool\` -##### is_paid_content: \`bool\` +##### is_paid_content: \`bool\` -##### parent_url: \`str\` +##### parent_url: \`str\` -##### all_links: \`str\` +##### all_links: \`str\` -##### all_domain_links: \`str\` +##### all_domain_links: \`str\` -##### word_count_min: \`int\` +##### word_count_min: \`int\` -##### word_count_max: \`int\` +##### word_count_max: \`int\` -##### page: \`int\` +##### page: \`int\` -##### page_size: \`int\` +##### page_size: \`int\` -##### include_nlp_data: \`bool\` +##### include_nlp_data: \`bool\` -##### has_nlp: \`bool\` +##### has_nlp: \`bool\` -##### theme: \`str\` +##### theme: \`str\` -##### ner_name: \`str\` +##### ner_name: \`str\` -##### title_sentiment_min: \`Union[int, float]\` +##### title_sentiment_min: \`Union[int, float]\` -##### title_sentiment_max: \`Union[int, float]\` +##### title_sentiment_max: \`Union[int, float]\` -##### content_sentiment_min: \`Union[int, float]\` +##### content_sentiment_min: \`Union[int, float]\` -##### content_sentiment_max: \`Union[int, float]\` +##### content_sentiment_max: \`Union[int, float]\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`MoreLikeThisRequest\`](./newscatcherapi_client/type/more_like_this_request.py) -#### 🔄 Return +#### 🔄 Return [\`SearchSimilarPostResponse\`](./newscatcherapi_client/pydantic/search_similar_post_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`post\` @@ -1318,30 +1318,30 @@ post_response = newscatcher.search_similar.post( --- -### \`newscatcher.sources.get\` +### \`newscatcher.sources.get\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.sources.get( - lang=\\"string_example\\", - countries=\\"string_example\\", + lang="string_example", + countries="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`str\` +##### lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -#### 🔄 Return +#### 🔄 Return [\`SourceResponse\`](./newscatcherapi_client/pydantic/source_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`get\` @@ -1349,33 +1349,33 @@ get_response = newscatcher.sources.get( --- -### \`newscatcher.sources.post\` +### \`newscatcher.sources.post\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.sources.post( - lang=\\"string_example\\", - countries=\\"string_example\\", + lang="string_example", + countries="string_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`str\` +##### lang: \`str\` -##### countries: \`str\` +##### countries: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`SourcesRequest\`](./newscatcherapi_client/type/sources_request.py) -#### 🔄 Return +#### 🔄 Return [\`SourceResponse\`](./newscatcherapi_client/pydantic/source_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`post\` @@ -1383,21 +1383,21 @@ post_response = newscatcher.sources.post( --- -### \`newscatcher.subscription.get\` +### \`newscatcher.subscription.get\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = newscatcher.subscription.get() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`SubscriptionResponse\`](./newscatcherapi_client/pydantic/subscription_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`get\` @@ -1405,21 +1405,21 @@ get_response = newscatcher.subscription.get() --- -### \`newscatcher.subscription.post\` +### \`newscatcher.subscription.post\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = newscatcher.subscription.post() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`SubscriptionResponse\`](./newscatcherapi_client/pydantic/subscription_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`post\` @@ -1428,7 +1428,7 @@ post_response = newscatcher.subscription.post() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-additional-properties-anyof.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-additional-properties-anyof.test.ts.snap index 7d0fc6fb27..291d639210 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-additional-properties-anyof.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-additional-properties-anyof.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-additional-properties-anyof 1`] = ` -"# python-pydantic-additional-properties-anyof +"# python-pydantic-additional-properties-anyof A simple API based for testing python-pydantic-additional-properties-anyof. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-additional-properties-anyof. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-additional-properties-anyof. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-additional-properties-anyof==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_pydantic_additional_properties_anyof import ( pythonpydanticadditionalpropertiesanyofclient = ( PythonPydanticAdditionalPropertiesAnyofClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -54,7 +54,7 @@ try: fetch_response = pythonpydanticadditionalpropertiesanyofclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -62,7 +62,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -76,7 +76,7 @@ from python_pydantic_additional_properties_anyof import ( pythonpydanticadditionalpropertiesanyofclient = ( PythonPydanticAdditionalPropertiesAnyofClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -89,7 +89,7 @@ async def main(): ) print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -100,7 +100,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -113,7 +113,7 @@ from python_pydantic_additional_properties_anyof import ( pythonpydanticadditionalpropertiesanyofclient = ( PythonPydanticAdditionalPropertiesAnyofClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -125,7 +125,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -134,22 +134,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticadditionalpropertiesanyofclient.test.fetch\` +## Reference +### \`pythonpydanticadditionalpropertiesanyofclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticadditionalpropertiesanyofclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_additional_properties_anyof/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -158,7 +158,7 @@ fetch_response = pythonpydanticadditionalpropertiesanyofclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-any-schema-dict-response.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-any-schema-dict-response.test.ts.snap index a3e76a1ded..39f8333e14 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-any-schema-dict-response.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-any-schema-dict-response.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-any-schema-dict-response 1`] = ` -"# python-pydantic-any-schema-dict-response +"# python-pydantic-any-schema-dict-response A simple API based for testing python-pydantic-any-schema-dict-response. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-any-schema-dict-response. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-any-schema-dict-response. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-any-schema-dict-response==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_pydantic_any_schema_dict_response import ( ) pythonpydanticanyschemadictresponseclient = PythonPydanticAnySchemaDictResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonpydanticanyschemadictresponseclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_pydantic_any_schema_dict_response import ( ) pythonpydanticanyschemadictresponseclient = PythonPydanticAnySchemaDictResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonpydanticanyschemadictresponseclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,19 +106,19 @@ from python_pydantic_any_schema_dict_response import ( ) pythonpydanticanyschemadictresponseclient = PythonPydanticAnySchemaDictResponseClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticanyschemadictresponseclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"any\\"]) + pprint(fetch_response.body["any"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -127,22 +127,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticanyschemadictresponseclient.test.fetch\` +## Reference +### \`pythonpydanticanyschemadictresponseclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticanyschemadictresponseclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_any_schema_dict_response/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -151,7 +151,7 @@ fetch_response = pythonpydanticanyschemadictresponseclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-array-with-object.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-array-with-object.test.ts.snap index 510e8b3974..d45980c412 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-array-with-object.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-array-with-object.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-array-with-object 1`] = ` -"# python-pydantic-array-with-object +"# python-pydantic-array-with-object A simple API based for testing python-pydantic-array-with-object. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-array-with-object. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-array-with-object. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-array-with-object==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_pydantic_array_with_object import ( ) pythonpydanticarraywithobjectclient = PythonPydanticArrayWithObjectClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonpydanticarraywithobjectclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_pydantic_array_with_object import ( ) pythonpydanticarraywithobjectclient = PythonPydanticArrayWithObjectClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonpydanticarraywithobjectclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,7 +106,7 @@ from python_pydantic_array_with_object import ( ) pythonpydanticarraywithobjectclient = PythonPydanticArrayWithObjectClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -117,7 +117,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -126,22 +126,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticarraywithobjectclient.test.fetch\` +## Reference +### \`pythonpydanticarraywithobjectclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticarraywithobjectclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_array_with_object/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -150,7 +150,7 @@ fetch_response = pythonpydanticarraywithobjectclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-empty-response.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-empty-response.test.ts.snap index 507d4138d1..b8c9b01273 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-empty-response.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-empty-response.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-empty-response 1`] = ` -"# python-pydantic-empty-response +"# python-pydantic-empty-response A simple API based for testing python-pydantic-empty-response. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-empty-response. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,31 +24,31 @@ A simple API based for testing python-pydantic-empty-response. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-empty-response==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic_empty_response import PythonPydanticEmptyResponse, ApiException pythonpydanticemptyresponse = PythonPydanticEmptyResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter pythonpydanticemptyresponse.test.fetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -56,7 +56,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -66,7 +66,7 @@ from pprint import pprint from python_pydantic_empty_response import PythonPydanticEmptyResponse, ApiException pythonpydanticemptyresponse = PythonPydanticEmptyResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -75,7 +75,7 @@ async def main(): # Fetches a JSON value based on input parameter await pythonpydanticemptyresponse.test.afetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -86,7 +86,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -95,7 +95,7 @@ from pprint import pprint from python_pydantic_empty_response import PythonPydanticEmptyResponse, ApiException pythonpydanticemptyresponse = PythonPydanticEmptyResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -105,7 +105,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -114,18 +114,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticemptyresponse.test.fetch\` +## Reference +### \`pythonpydanticemptyresponse.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python pythonpydanticemptyresponse.test.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -134,7 +134,7 @@ pythonpydanticemptyresponse.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-enum-str.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-enum-str.test.ts.snap index af78882e58..cb1e60d5f1 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-enum-str.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-enum-str.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-enum-str 1`] = ` -"# python-pydantic-enum-str +"# python-pydantic-enum-str A simple API based for testing python-pydantic-enum-str. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-enum-str. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,24 +24,24 @@ A simple API based for testing python-pydantic-enum-str. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-enum-str==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic_enum_str import PythonPydanticEnumStrClient, ApiException pythonpydanticenumstrclient = PythonPydanticEnumStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -49,7 +49,7 @@ try: fetch_response = pythonpydanticenumstrclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -57,7 +57,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -67,7 +67,7 @@ from pprint import pprint from python_pydantic_enum_str import PythonPydanticEnumStrClient, ApiException pythonpydanticenumstrclient = PythonPydanticEnumStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -77,7 +77,7 @@ async def main(): fetch_response = await pythonpydanticenumstrclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -88,7 +88,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -97,19 +97,19 @@ from pprint import pprint from python_pydantic_enum_str import PythonPydanticEnumStrClient, ApiException pythonpydanticenumstrclient = PythonPydanticEnumStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticenumstrclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"value\\"]) + pprint(fetch_response.body["value"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -118,22 +118,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticenumstrclient.test.fetch\` +## Reference +### \`pythonpydanticenumstrclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticenumstrclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_enum_str/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -142,7 +142,7 @@ fetch_response = pythonpydanticenumstrclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-property.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-property.test.ts.snap index 100cd0309e..04e18fb288 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-property.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-property.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-free-form-object-property 1`] = ` -"# python-pydantic-free-form-object-property +"# python-pydantic-free-form-object-property A simple API based for testing python-pydantic-free-form-object-property. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-free-form-object-property. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-free-form-object-property. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-free-form-object-property==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_pydantic_free_form_object_property import ( ) pythonpydanticfreeformobjectpropertyclient = PythonPydanticFreeFormObjectPropertyClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonpydanticfreeformobjectpropertyclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_pydantic_free_form_object_property import ( ) pythonpydanticfreeformobjectpropertyclient = PythonPydanticFreeFormObjectPropertyClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonpydanticfreeformobjectpropertyclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,19 +106,19 @@ from python_pydantic_free_form_object_property import ( ) pythonpydanticfreeformobjectpropertyclient = PythonPydanticFreeFormObjectPropertyClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticfreeformobjectpropertyclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"free_form_object\\"]) + pprint(fetch_response.body["free_form_object"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -127,22 +127,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticfreeformobjectpropertyclient.test.fetch\` +## Reference +### \`pythonpydanticfreeformobjectpropertyclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticfreeformobjectpropertyclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_free_form_object_property/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -151,7 +151,7 @@ fetch_response = pythonpydanticfreeformobjectpropertyclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-response.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-response.test.ts.snap index 375d3cb79d..7babd1257c 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-response.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-free-form-object-response.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-free-form-object-response 1`] = ` -"# python-pydantic-free-form-object-response +"# python-pydantic-free-form-object-response A simple API based for testing python-pydantic-free-form-object-response. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-free-form-object-response. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-free-form-object-response. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-free-form-object-response==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,16 +44,16 @@ from python_pydantic_free_form_object_response import ( ) pythonpydanticfreeformobjectresponse = PythonPydanticFreeFormObjectResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticfreeformobjectresponse.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -61,7 +61,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -74,7 +74,7 @@ from python_pydantic_free_form_object_response import ( ) pythonpydanticfreeformobjectresponse = PythonPydanticFreeFormObjectResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -82,10 +82,10 @@ async def main(): try: # Fetches a JSON value based on input parameter fetch_response = await pythonpydanticfreeformobjectresponse.test.afetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -96,7 +96,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -108,19 +108,19 @@ from python_pydantic_free_form_object_response import ( ) pythonpydanticfreeformobjectresponse = PythonPydanticFreeFormObjectResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticfreeformobjectresponse.test.raw.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -129,26 +129,26 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticfreeformobjectresponse.test.fetch\` +## Reference +### \`pythonpydanticfreeformobjectresponse.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticfreeformobjectresponse.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### input_parameter: \`str\` +##### input_parameter: \`str\` The input parameter to process. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -157,7 +157,7 @@ The input parameter to process. --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-in-union.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-in-union.test.ts.snap index 95d1fd4e3c..100c6e8fc0 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-in-union.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-in-union.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-list-in-union 1`] = ` -"# python-pydantic-list-in-union +"# python-pydantic-list-in-union A simple API based for testing python-pydantic-list-in-union. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-list-in-union. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,24 +24,24 @@ A simple API based for testing python-pydantic-list-in-union. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-list-in-union==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic_list_in_union import PythonPydanticListInUnion, ApiException pythonpydanticlistinunion = PythonPydanticListInUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -49,7 +49,7 @@ try: fetch_response = pythonpydanticlistinunion.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -57,7 +57,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -67,7 +67,7 @@ from pprint import pprint from python_pydantic_list_in_union import PythonPydanticListInUnion, ApiException pythonpydanticlistinunion = PythonPydanticListInUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -77,7 +77,7 @@ async def main(): fetch_response = await pythonpydanticlistinunion.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -88,7 +88,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -97,7 +97,7 @@ from pprint import pprint from python_pydantic_list_in_union import PythonPydanticListInUnion, ApiException pythonpydanticlistinunion = PythonPydanticListInUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -108,7 +108,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -117,22 +117,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticlistinunion.test.fetch\` +## Reference +### \`pythonpydanticlistinunion.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticlistinunion.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`Response\`](./python_pydantic_list_in_union/pydantic/response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -141,7 +141,7 @@ fetch_response = pythonpydanticlistinunion.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-response.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-response.test.ts.snap index 04fae9650b..22b000d713 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-response.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-list-response.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-list-response 1`] = ` -"# python-pydantic-list-response +"# python-pydantic-list-response A simple API based for testing python-pydantic-list-response. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-list-response. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,24 +24,24 @@ A simple API based for testing python-pydantic-list-response. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-list-response==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic_list_response import PythonPydanticListResponse, ApiException pythonpydanticlistresponse = PythonPydanticListResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -49,7 +49,7 @@ try: fetch_response = pythonpydanticlistresponse.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -57,7 +57,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -67,7 +67,7 @@ from pprint import pprint from python_pydantic_list_response import PythonPydanticListResponse, ApiException pythonpydanticlistresponse = PythonPydanticListResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -77,7 +77,7 @@ async def main(): fetch_response = await pythonpydanticlistresponse.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -88,7 +88,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -97,7 +97,7 @@ from pprint import pprint from python_pydantic_list_response import PythonPydanticListResponse, ApiException pythonpydanticlistresponse = PythonPydanticListResponse( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -108,7 +108,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -117,22 +117,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticlistresponse.test.fetch\` +## Reference +### \`pythonpydanticlistresponse.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticlistresponse.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_list_response/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -141,7 +141,7 @@ fetch_response = pythonpydanticlistresponse.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nested-union-with-list-and-str.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nested-union-with-list-and-str.test.ts.snap index 718d3775df..f29263b427 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nested-union-with-list-and-str.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nested-union-with-list-and-str.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-nested-union-with-list-and-str 1`] = ` -"# python-pydantic-nested-union-with-list-and-str +"# python-pydantic-nested-union-with-list-and-str A simple API based for testing python-pydantic-nested-union-with-list-and-str. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-nested-union-with-list-and-str. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-nested-union-with-list-and-str. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-nested-union-with-list-and-str==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_pydantic_nested_union_with_list_and_str import ( pythonpydanticnestedunionwithlistandstrclient = ( PythonPydanticNestedUnionWithListAndStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -54,7 +54,7 @@ try: fetch_response = pythonpydanticnestedunionwithlistandstrclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -62,7 +62,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -76,7 +76,7 @@ from python_pydantic_nested_union_with_list_and_str import ( pythonpydanticnestedunionwithlistandstrclient = ( PythonPydanticNestedUnionWithListAndStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -89,7 +89,7 @@ async def main(): ) print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -100,7 +100,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -113,7 +113,7 @@ from python_pydantic_nested_union_with_list_and_str import ( pythonpydanticnestedunionwithlistandstrclient = ( PythonPydanticNestedUnionWithListAndStrClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -121,12 +121,12 @@ try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticnestedunionwithlistandstrclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"test_messages\\"]) + pprint(fetch_response.body["test_messages"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -135,22 +135,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticnestedunionwithlistandstrclient.test.fetch\` +## Reference +### \`pythonpydanticnestedunionwithlistandstrclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticnestedunionwithlistandstrclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_nested_union_with_list_and_str/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -159,7 +159,7 @@ fetch_response = pythonpydanticnestedunionwithlistandstrclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nullable-string.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nullable-string.test.ts.snap index e003a9fd62..dfeb42a31f 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nullable-string.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-nullable-string.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-nullable-string 1`] = ` -"# python-pydantic-nullable-string +"# python-pydantic-nullable-string A simple API based for testing python-pydantic-nullable-string. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-nullable-string. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-nullable-string. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-nullable-string==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_pydantic_nullable_string import ( ) pythonpydanticnullablestringclient = PythonPydanticNullableStringClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonpydanticnullablestringclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_pydantic_nullable_string import ( ) pythonpydanticnullablestringclient = PythonPydanticNullableStringClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonpydanticnullablestringclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,19 +106,19 @@ from python_pydantic_nullable_string import ( ) pythonpydanticnullablestringclient = PythonPydanticNullableStringClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticnullablestringclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"value\\"]) + pprint(fetch_response.body["value"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -127,22 +127,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticnullablestringclient.test.fetch\` +## Reference +### \`pythonpydanticnullablestringclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticnullablestringclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_nullable_string/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -151,7 +151,7 @@ fetch_response = pythonpydanticnullablestringclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-raw-http-doc-with-top-level-configuration.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-raw-http-doc-with-top-level-configuration.test.ts.snap index 5d6b5b386b..5561b9ffad 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-raw-http-doc-with-top-level-configuration.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-raw-http-doc-with-top-level-configuration.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-raw-http-doc-with-top-level-configuration 1`] = ` -"# python-pydantic-raw-http-doc-with-top-level-configuration +"# python-pydantic-raw-http-doc-with-top-level-configuration A simple API based for testing python-pydantic-raw-http-doc-with-top-level-configuration. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-raw-http-doc-with-top-level-confi [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-raw-http-doc-with-top-level-confi -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-raw-http-doc-with-top-level-configuration==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_pydantic_raw_http_doc_with_top_level_configuration import ( pythonpydanticrawhttpdocwithtoplevelconfiguration = ( PythonPydanticRawHttpDocWithTopLevelConfiguration( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -56,7 +56,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling .fetch: %s\\\\n\\" % e) + print("Exception when calling .fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -64,7 +64,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -78,7 +78,7 @@ from python_pydantic_raw_http_doc_with_top_level_configuration import ( pythonpydanticrawhttpdocwithtoplevelconfiguration = ( PythonPydanticRawHttpDocWithTopLevelConfiguration( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -90,7 +90,7 @@ async def main(): await pythonpydanticrawhttpdocwithtoplevelconfiguration.afetch() ) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -101,7 +101,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -114,7 +114,7 @@ from python_pydantic_raw_http_doc_with_top_level_configuration import ( pythonpydanticrawhttpdocwithtoplevelconfiguration = ( PythonPydanticRawHttpDocWithTopLevelConfiguration( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -125,7 +125,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -134,18 +134,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticrawhttpdocwithtoplevelconfiguration.fetch\` +## Reference +### \`pythonpydanticrawhttpdocwithtoplevelconfiguration.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticrawhttpdocwithtoplevelconfiguration.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -154,7 +154,7 @@ fetch_response = pythonpydanticrawhttpdocwithtoplevelconfiguration.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-recursively-convert-to-models.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-recursively-convert-to-models.test.ts.snap index 3fc5c9cd28..43345582ab 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-recursively-convert-to-models.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-recursively-convert-to-models.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-recursively-convert-to-models 1`] = ` -"# python-pydantic-recursively-convert-to-models +"# python-pydantic-recursively-convert-to-models A simple API based for testing python-pydantic-recursively-convert-to-models. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-recursively-convert-to-models. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -25,17 +25,17 @@ A simple API based for testing python-pydantic-recursively-convert-to-models. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-recursively-convert-to-models==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_pydantic_recursively_convert_to_models import ( ) pythonpydanticrecursivelyconverttomodels = PythonPydanticRecursivelyConvertToModels( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -53,7 +53,7 @@ try: fetch_response = pythonpydanticrecursivelyconverttomodels.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -61,7 +61,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -74,7 +74,7 @@ from python_pydantic_recursively_convert_to_models import ( ) pythonpydanticrecursivelyconverttomodels = PythonPydanticRecursivelyConvertToModels( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -84,7 +84,7 @@ async def main(): fetch_response = await pythonpydanticrecursivelyconverttomodels.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -95,7 +95,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -107,20 +107,20 @@ from python_pydantic_recursively_convert_to_models import ( ) pythonpydanticrecursivelyconverttomodels = PythonPydanticRecursivelyConvertToModels( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticrecursivelyconverttomodels.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"a\\"]) - pprint(fetch_response.body[\\"b\\"]) + pprint(fetch_response.body["a"]) + pprint(fetch_response.body["b"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -129,22 +129,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticrecursivelyconverttomodels.test.fetch\` +## Reference +### \`pythonpydanticrecursivelyconverttomodels.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticrecursivelyconverttomodels.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_recursively_convert_to_models/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/object\` \`get\` @@ -152,21 +152,21 @@ fetch_response = pythonpydanticrecursivelyconverttomodels.test.fetch() --- -### \`pythonpydanticrecursivelyconverttomodels.test.list\` +### \`pythonpydanticrecursivelyconverttomodels.test.list\` Fetches a list value -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python list_response = pythonpydanticrecursivelyconverttomodels.test.list() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`ListInner\`](./python_pydantic_recursively_convert_to_models/pydantic/list_inner.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/list\` \`get\` @@ -175,7 +175,7 @@ list_response = pythonpydanticrecursivelyconverttomodels.test.list() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-reserved-namespace-model.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-reserved-namespace-model.test.ts.snap index a3ec824a08..c0839ed327 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-reserved-namespace-model.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-reserved-namespace-model.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-reserved-namespace-model 1`] = ` -"# python-pydantic-reserved-namespace-model +"# python-pydantic-reserved-namespace-model A simple API based for testing python-pydantic-reserved-namespace-model. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-reserved-namespace-model. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-reserved-namespace-model. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-reserved-namespace-model==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_pydantic_reserved_namespace_model import ( ) pythonpydanticreservednamespacemodel = PythonPydanticReservedNamespaceModel( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonpydanticreservednamespacemodel.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_pydantic_reserved_namespace_model import ( ) pythonpydanticreservednamespacemodel = PythonPydanticReservedNamespaceModel( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonpydanticreservednamespacemodel.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,19 +106,19 @@ from python_pydantic_reserved_namespace_model import ( ) pythonpydanticreservednamespacemodel = PythonPydanticReservedNamespaceModel( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticreservednamespacemodel.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"model_config\\"]) + pprint(fetch_response.body["model_config"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -127,22 +127,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticreservednamespacemodel.test.fetch\` +## Reference +### \`pythonpydanticreservednamespacemodel.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticreservednamespacemodel.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_reserved_namespace_model/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -151,7 +151,7 @@ fetch_response = pythonpydanticreservednamespacemodel.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-response-as-param.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-response-as-param.test.ts.snap index a0e1c999d6..c37e5d1d16 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-response-as-param.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-response-as-param.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-response-as-param 1`] = ` -"# python-pydantic-response-as-param +"# python-pydantic-response-as-param A simple API based for testing python-pydantic-response-as-param. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-response-as-param. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -25,17 +25,17 @@ A simple API based for testing python-pydantic-response-as-param. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-response-as-param==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,20 +45,20 @@ from python_pydantic_response_as_param import ( ) pythonpydanticresponseasparamclient = PythonPydanticResponseAsParamClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # Attack a monster attack_monster_response = ( pythonpydanticresponseasparamclient.adventure.attack_monster( - monster=\\"string_example\\", + monster="string_example", sword={}, ) ) print(attack_monster_response) except ApiException as e: - print(\\"Exception when calling AdventureApi.attack_monster: %s\\\\n\\" % e) + print("Exception when calling AdventureApi.attack_monster: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -66,7 +66,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -79,7 +79,7 @@ from python_pydantic_response_as_param import ( ) pythonpydanticresponseasparamclient = PythonPydanticResponseAsParamClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) @@ -88,13 +88,13 @@ async def main(): # Attack a monster attack_monster_response = ( await pythonpydanticresponseasparamclient.adventure.aattack_monster( - monster=\\"string_example\\", + monster="string_example", sword={}, ) ) print(attack_monster_response) except ApiException as e: - print(\\"Exception when calling AdventureApi.attack_monster: %s\\\\n\\" % e) + print("Exception when calling AdventureApi.attack_monster: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -105,7 +105,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -117,24 +117,24 @@ from python_pydantic_response_as_param import ( ) pythonpydanticresponseasparamclient = PythonPydanticResponseAsParamClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # Attack a monster attack_monster_response = ( pythonpydanticresponseasparamclient.adventure.raw.attack_monster( - monster=\\"string_example\\", + monster="string_example", sword={}, ) ) pprint(attack_monster_response.body) - pprint(attack_monster_response.body[\\"message\\"]) + pprint(attack_monster_response.body["message"]) pprint(attack_monster_response.headers) pprint(attack_monster_response.status) pprint(attack_monster_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling AdventureApi.attack_monster: %s\\\\n\\" % e) + print("Exception when calling AdventureApi.attack_monster: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -143,35 +143,35 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticresponseasparamclient.adventure.attack_monster\` +## Reference +### \`pythonpydanticresponseasparamclient.adventure.attack_monster\` Attack a monster with the (pydantic) sword from your equipment -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python attack_monster_response = pythonpydanticresponseasparamclient.adventure.attack_monster( - monster=\\"string_example\\", + monster="string_example", sword={}, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### monster: \`str\` +##### monster: \`str\` -##### sword: [\`Sword\`](./python_pydantic_response_as_param/type/sword.py) +##### sword: [\`Sword\`](./python_pydantic_response_as_param/type/sword.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`Attack\`](./python_pydantic_response_as_param/type/attack.py) -#### 🔄 Return +#### 🔄 Return [\`AttackResult\`](./python_pydantic_response_as_param/pydantic/attack_result.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/attack-monster\` \`post\` @@ -179,11 +179,11 @@ attack_monster_response = pythonpydanticresponseasparamclient.adventure.attack_m --- -### \`pythonpydanticresponseasparamclient.adventure.retrieve_equipment\` +### \`pythonpydanticresponseasparamclient.adventure.retrieve_equipment\` Receive a pydantic response which will subsequently be used as a parameter in another endpoint. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python retrieve_equipment_response = ( @@ -191,11 +191,11 @@ retrieve_equipment_response = ( ) \`\`\` -#### 🔄 Return +#### 🔄 Return [\`Equipment\`](./python_pydantic_response_as_param/pydantic/equipment.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/retrieve-equipment\` \`get\` @@ -204,7 +204,7 @@ retrieve_equipment_response = ( --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-responses.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-responses.test.ts.snap index 7d9f91332b..08239bd0e3 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-responses.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-responses.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-responses 1`] = ` -"# python-pydantic-responses-python-sdk +"# python-pydantic-responses-python-sdk A simple API based on python pydantic responses. @@ -10,7 +10,7 @@ A simple API based on python pydantic responses. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -25,46 +25,46 @@ A simple API based on python pydantic responses. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-responses-python-sdk==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic import PythonPydanticResponses, ApiException pythonpydanticresponses = PythonPydanticResponses( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticresponses.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -74,7 +74,7 @@ from pprint import pprint from python_pydantic import PythonPydanticResponses, ApiException pythonpydanticresponses = PythonPydanticResponses( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -82,16 +82,16 @@ async def main(): try: # Fetches a JSON value based on input parameter fetch_response = await pythonpydanticresponses.test.afetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -101,7 +101,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -110,28 +110,28 @@ from pprint import pprint from python_pydantic import PythonPydanticResponses, ApiException pythonpydanticresponses = PythonPydanticResponses( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticresponses.test.raw.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) pprint(fetch_response.body) - pprint(fetch_response.body[\\"property_a\\"]) - pprint(fetch_response.body[\\"property_b\\"]) - pprint(fetch_response.body[\\"property_c\\"]) + pprint(fetch_response.body["property_a"]) + pprint(fetch_response.body["property_b"]) + pprint(fetch_response.body["property_c"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -139,30 +139,30 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticresponses.test.fetch\` +## Reference +### \`pythonpydanticresponses.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticresponses.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### input_parameter: \`str\` +##### input_parameter: \`str\` The input parameter to process. -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -170,21 +170,21 @@ The input parameter to process. --- -### \`pythonpydanticresponses.test.reserved_word\` +### \`pythonpydanticresponses.test.reserved_word\` Reserved word in Python -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python reserved_word_response = pythonpydanticresponses.test.reserved_word() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestReservedWord\`](./python_pydantic/pydantic/test_reserved_word.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/reserved-word\` \`get\` @@ -193,7 +193,7 @@ reserved_word_response = pythonpydanticresponses.test.reserved_word() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-schema-with-underscores-in-name.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-schema-with-underscores-in-name.test.ts.snap index 1b6b128f77..95662fc9d4 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-schema-with-underscores-in-name.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-schema-with-underscores-in-name.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-schema-with-underscores-in-name 1`] = ` -"# python-pydantic-schema-with-underscores-in-name +"# python-pydantic-schema-with-underscores-in-name A simple API based for testing python-pydantic-schema-with-underscores-in-name. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-schema-with-underscores-in-name. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-pydantic-schema-with-underscores-in-name. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-schema-with-underscores-in-name==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -45,7 +45,7 @@ from python_pydantic_schema_with_underscores_in_name import ( pythonpydanticschemawithunderscoresinnameclient = ( PythonPydanticSchemaWithUnderscoresInNameClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -54,7 +54,7 @@ try: fetch_response = pythonpydanticschemawithunderscoresinnameclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -62,7 +62,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -76,7 +76,7 @@ from python_pydantic_schema_with_underscores_in_name import ( pythonpydanticschemawithunderscoresinnameclient = ( PythonPydanticSchemaWithUnderscoresInNameClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -89,7 +89,7 @@ async def main(): ) print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -100,7 +100,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -113,7 +113,7 @@ from python_pydantic_schema_with_underscores_in_name import ( pythonpydanticschemawithunderscoresinnameclient = ( PythonPydanticSchemaWithUnderscoresInNameClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) ) @@ -121,12 +121,12 @@ try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticschemawithunderscoresinnameclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"value\\"]) + pprint(fetch_response.body["value"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -135,22 +135,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticschemawithunderscoresinnameclient.test.fetch\` +## Reference +### \`pythonpydanticschemawithunderscoresinnameclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticschemawithunderscoresinnameclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_schema_with_underscores_in_name/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -159,7 +159,7 @@ fetch_response = pythonpydanticschemawithunderscoresinnameclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-union.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-union.test.ts.snap index ec3e9de10c..4aabcccb5d 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-union.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-pydantic-union.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-pydantic-union 1`] = ` -"# python-pydantic-union +"# python-pydantic-union A simple API based for testing python-pydantic-union. @@ -10,7 +10,7 @@ A simple API based for testing python-pydantic-union. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,24 +24,24 @@ A simple API based for testing python-pydantic-union. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-pydantic-union==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_pydantic_union import PythonPydanticUnion, ApiException pythonpydanticunion = PythonPydanticUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -49,7 +49,7 @@ try: fetch_response = pythonpydanticunion.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -57,7 +57,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -67,7 +67,7 @@ from pprint import pprint from python_pydantic_union import PythonPydanticUnion, ApiException pythonpydanticunion = PythonPydanticUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -77,7 +77,7 @@ async def main(): fetch_response = await pythonpydanticunion.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -88,7 +88,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -97,19 +97,19 @@ from pprint import pprint from python_pydantic_union import PythonPydanticUnion, ApiException pythonpydanticunion = PythonPydanticUnion( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonpydanticunion.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"value\\"]) + pprint(fetch_response.body["value"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -118,22 +118,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonpydanticunion.test.fetch\` +## Reference +### \`pythonpydanticunion.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonpydanticunion.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_pydantic_union/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -142,7 +142,7 @@ fetch_response = pythonpydanticunion.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-readme-header-snippet.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-readme-header-snippet.test.ts.snap index ddd1b7bfd4..207a400b58 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-readme-header-snippet.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-readme-header-snippet.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-readme-header-snippet 1`] = ` -"# python-readme-header-snippet +"# python-readme-header-snippet A simple API based for testing python-readme-header-snippet. @@ -23,7 +23,7 @@ A simple API based for testing python-readme-header-snippet. > chat_response = humanloop.chat( > # parameters > ) -> print(chat_response.body[\\"project_id\\"]) +> print(chat_response.body["project_id"]) > \`\`\` > > ### After (\`>= 1.0.0\`) @@ -40,7 +40,7 @@ A simple API based for testing python-readme-header-snippet. > > See the [Raw HTTP Response](#raw-http-response) for accessing raw HTTP response values like headers and status codes. -## Table of Contents +## Table of Contents @@ -54,31 +54,31 @@ A simple API based for testing python-readme-header-snippet. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-readme-header-snippet==1.0.0-beta.1 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_readme_header_snippet import PythonReadmeHeaderSnippetClient, ApiException pythonreadmeheadersnippetclient = PythonReadmeHeaderSnippetClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonreadmeheadersnippetclient.test.fetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -86,7 +86,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -96,7 +96,7 @@ from pprint import pprint from python_readme_header_snippet import PythonReadmeHeaderSnippetClient, ApiException pythonreadmeheadersnippetclient = PythonReadmeHeaderSnippetClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -105,7 +105,7 @@ async def main(): # Fetches a JSON value based on input parameter fetch_response = await pythonreadmeheadersnippetclient.test.afetch() except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -116,7 +116,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -125,7 +125,7 @@ from pprint import pprint from python_readme_header_snippet import PythonReadmeHeaderSnippetClient, ApiException pythonreadmeheadersnippetclient = PythonReadmeHeaderSnippetClient( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: @@ -135,7 +135,7 @@ try: pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -144,18 +144,18 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonreadmeheadersnippetclient.test.fetch\` +## Reference +### \`pythonreadmeheadersnippetclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonreadmeheadersnippetclient.test.fetch() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -164,7 +164,7 @@ fetch_response = pythonreadmeheadersnippetclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-splitit.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-splitit.test.ts.snap index 1147dccfa5..5fa5add8fe 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-splitit.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-splitit.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`splitit/python-splitit 1`] = ` -"# splitit-web-python-sdk +"# splitit-web-python-sdk Splitit's Web API @@ -9,7 +9,7 @@ Splitit's Web API [![PyPI](https://img.shields.io/badge/PyPI-v2.6.1-blue)](https://pypi.org/project/splitit-web-python-sdk/2.6.1) [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) -## Table of Contents +## Table of Contents @@ -31,60 +31,60 @@ Splitit's Web API -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install splitit-web-python-sdk==2.6.1 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_splitit_client import PythonSplitit, ApiException pythonsplitit = PythonSplitit( - client_id=\\"YOUR_CLIENT_ID\\", - client_secret=\\"YOUR_CLIENT_SECRET\\", + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", ) try: cancel_response = pythonsplitit.installment_plan.cancel( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", ) pprint(cancel_response.body) - pprint(cancel_response.body[\\"installment_plan_number\\"]) + pprint(cancel_response.body["installment_plan_number"]) pprint(cancel_response.headers) pprint(cancel_response.status) pprint(cancel_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling InstallmentPlanApi.cancel: %s\\\\n\\" % e) + print("Exception when calling InstallmentPlanApi.cancel: %s\\n" % e) pprint(e.body) if e.status == 401: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 403: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 404: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -94,38 +94,38 @@ from pprint import pprint from python_splitit_client import PythonSplitit, ApiException pythonsplitit = PythonSplitit( - client_id=\\"YOUR_CLIENT_ID\\", - client_secret=\\"YOUR_CLIENT_SECRET\\", + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", ) async def main(): try: cancel_response = await pythonsplitit.installment_plan.acancel( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", ) pprint(cancel_response.body) - pprint(cancel_response.body[\\"installment_plan_number\\"]) + pprint(cancel_response.body["installment_plan_number"]) pprint(cancel_response.headers) pprint(cancel_response.status) pprint(cancel_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling InstallmentPlanApi.cancel: %s\\\\n\\" % e) + print("Exception when calling InstallmentPlanApi.cancel: %s\\n" % e) pprint(e.body) if e.status == 401: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 403: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) if e.status == 404: - pprint(e.body[\\"trace_id\\"]) - pprint(e.body[\\"error\\"]) + pprint(e.body["trace_id"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -136,36 +136,36 @@ asyncio.run(main()) \`\`\` -## Reference -### \`pythonsplitit.installment_plan.cancel\` +## Reference +### \`pythonsplitit.installment_plan.cancel\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python cancel_response = pythonsplitit.installment_plan.cancel( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanCancelResponse\`](./python_splitit_client/type/installment_plan_cancel_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/cancel\` \`post\` @@ -173,54 +173,54 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.check_eligibility\` +### \`pythonsplitit.installment_plan.check_eligibility\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python check_eligibility_response = pythonsplitit.installment_plan.check_eligibility( - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", plan_data={ - \\"total_amount\\": 3.14, - \\"number_of_installments\\": 1, - \\"purchase_method\\": \\"InStore\\", + "total_amount": 3.14, + "number_of_installments": 1, + "purchase_method": "InStore", }, card_details={ - \\"card_brand\\": \\"Mastercard\\", - \\"card_type\\": \\"Credit\\", + "card_brand": "Mastercard", + "card_type": "Credit", }, billing_address={}, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### plan_data: [\`PlanData\`](./python_splitit_client/type/plan_data.py) +##### plan_data: [\`PlanData\`](./python_splitit_client/type/plan_data.py) -##### card_details: [\`CardData\`](./python_splitit_client/type/card_data.py) +##### card_details: [\`CardData\`](./python_splitit_client/type/card_data.py) -##### billing_address: [\`AddressData\`](./python_splitit_client/type/address_data.py) +##### billing_address: [\`AddressData\`](./python_splitit_client/type/address_data.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`CheckInstallmentsEligibilityRequest\`](./python_splitit_client/type/check_installments_eligibility_request.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentsEligibilityResponse\`](./python_splitit_client/type/installments_eligibility_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/check-eligibility\` \`post\` @@ -228,35 +228,35 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.get\` +### \`pythonsplitit.installment_plan.get\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python get_response = pythonsplitit.installment_plan.get( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanGetResponse\`](./python_splitit_client/type/installment_plan_get_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}\` \`get\` @@ -264,75 +264,75 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.post\` +### \`pythonsplitit.installment_plan.post\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post_response = pythonsplitit.installment_plan.post( auto_capture=True, - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", attempt3d_secure=True, shopper={}, plan_data={ - \\"total_amount\\": 3.14, - \\"purchase_method\\": \\"InStore\\", + "total_amount": 3.14, + "purchase_method": "InStore", }, billing_address={}, redirect_urls={}, ux_settings={}, events_endpoints={}, processing_data={}, - x_splitit_test_mode=\\"None\\", + x_splitit_test_mode="None", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### auto_capture: \`bool\` +##### auto_capture: \`bool\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### attempt3d_secure: \`bool\` +##### attempt3d_secure: \`bool\` -##### shopper: [\`ShopperData\`](./python_splitit_client/type/shopper_data.py) +##### shopper: [\`ShopperData\`](./python_splitit_client/type/shopper_data.py) -##### plan_data: [\`PlanDataModel\`](./python_splitit_client/type/plan_data_model.py) +##### plan_data: [\`PlanDataModel\`](./python_splitit_client/type/plan_data_model.py) -##### billing_address: [\`AddressDataModel\`](./python_splitit_client/type/address_data_model.py) +##### billing_address: [\`AddressDataModel\`](./python_splitit_client/type/address_data_model.py) -##### redirect_urls: [\`InitiateRedirectionEndpointsModel\`](./python_splitit_client/type/initiate_redirection_endpoints_model.py) +##### redirect_urls: [\`InitiateRedirectionEndpointsModel\`](./python_splitit_client/type/initiate_redirection_endpoints_model.py) -##### ux_settings: [\`UxSettingsModel\`](./python_splitit_client/type/ux_settings_model.py) +##### ux_settings: [\`UxSettingsModel\`](./python_splitit_client/type/ux_settings_model.py) -##### events_endpoints: [\`EventsEndpointsModel\`](./python_splitit_client/type/events_endpoints_model.py) +##### events_endpoints: [\`EventsEndpointsModel\`](./python_splitit_client/type/events_endpoints_model.py) -##### processing_data: [\`ProcessingData\`](./python_splitit_client/type/processing_data.py) +##### processing_data: [\`ProcessingData\`](./python_splitit_client/type/processing_data.py) -##### x_splitit_test_mode: \`str\` +##### x_splitit_test_mode: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`InstallmentPlanInitiateRequest\`](./python_splitit_client/type/installment_plan_initiate_request.py) -#### 🔄 Return +#### 🔄 Return [\`InitiatePlanResponse\`](./python_splitit_client/type/initiate_plan_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/initiate\` \`post\` @@ -340,80 +340,80 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.post2\` +### \`pythonsplitit.installment_plan.post2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python post2_response = pythonsplitit.installment_plan.post2( auto_capture=True, terms_and_conditions_accepted=True, - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", attempt3d_secure=True, shopper={}, plan_data={ - \\"total_amount\\": 3.14, - \\"purchase_method\\": \\"InStore\\", + "total_amount": 3.14, + "purchase_method": "InStore", }, billing_address={}, payment_method={ - \\"type\\": \\"Card\\", + "type": "Card", }, redirect_urls={}, processing_data={}, events_endpoints={}, - x_splitit_test_mode=\\"None\\", + x_splitit_test_mode="None", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### auto_capture: \`bool\` +##### auto_capture: \`bool\` -##### terms_and_conditions_accepted: \`bool\` +##### terms_and_conditions_accepted: \`bool\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### attempt3d_secure: \`bool\` +##### attempt3d_secure: \`bool\` -##### shopper: [\`ShopperData\`](./python_splitit_client/type/shopper_data.py) +##### shopper: [\`ShopperData\`](./python_splitit_client/type/shopper_data.py) -##### plan_data: [\`PlanDataModel\`](./python_splitit_client/type/plan_data_model.py) +##### plan_data: [\`PlanDataModel\`](./python_splitit_client/type/plan_data_model.py) -##### billing_address: [\`AddressDataModel\`](./python_splitit_client/type/address_data_model.py) +##### billing_address: [\`AddressDataModel\`](./python_splitit_client/type/address_data_model.py) -##### payment_method: [\`PaymentMethodModel\`](./python_splitit_client/type/payment_method_model.py) +##### payment_method: [\`PaymentMethodModel\`](./python_splitit_client/type/payment_method_model.py) -##### redirect_urls: [\`RedirectionEndpointsModel\`](./python_splitit_client/type/redirection_endpoints_model.py) +##### redirect_urls: [\`RedirectionEndpointsModel\`](./python_splitit_client/type/redirection_endpoints_model.py) -##### processing_data: [\`ProcessingData\`](./python_splitit_client/type/processing_data.py) +##### processing_data: [\`ProcessingData\`](./python_splitit_client/type/processing_data.py) -##### events_endpoints: [\`EventsEndpointsModel\`](./python_splitit_client/type/events_endpoints_model.py) +##### events_endpoints: [\`EventsEndpointsModel\`](./python_splitit_client/type/events_endpoints_model.py) -##### x_splitit_test_mode: \`str\` +##### x_splitit_test_mode: \`str\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`InstallmentPlanCreateRequest\`](./python_splitit_client/type/installment_plan_create_request.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanCreateResponse\`](./python_splitit_client/type/installment_plan_create_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans\` \`post\` @@ -421,44 +421,44 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.refund\` +### \`pythonsplitit.installment_plan.refund\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python refund_response = pythonsplitit.installment_plan.refund( amount=3.14, - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", - refund_strategy=\\"FutureInstallmentsFirst\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", + refund_strategy="FutureInstallmentsFirst", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### amount: \`Union[int, float]\` +##### amount: \`Union[int, float]\` -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### refund_strategy: [\`RefundStrategy\`](./python_splitit_client/type/refund_strategy.py) +##### refund_strategy: [\`RefundStrategy\`](./python_splitit_client/type/refund_strategy.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`InstallmentPlanRefundRequest\`](./python_splitit_client/type/installment_plan_refund_request.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanRefundResponse\`](./python_splitit_client/type/installment_plan_refund_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/refund\` \`post\` @@ -466,43 +466,43 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.search\` +### \`pythonsplitit.installment_plan.search\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python search_response = pythonsplitit.installment_plan.search( - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", - installment_plan_number=\\"string_example\\", - ref_order_number=\\"string_example\\", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", + installment_plan_number="string_example", + ref_order_number="string_example", extended_params={ - \\"key\\": \\"string_example\\", + "key": "string_example", }, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### ref_order_number: \`str\` +##### ref_order_number: \`str\` -##### extended_params: [\`Dict[str, str]\`](./python_splitit_client/type/.py) +##### extended_params: [\`Dict[str, str]\`](./python_splitit_client/type/.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanSearchResponse\`](./python_splitit_client/type/installment_plan_search_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/search\` \`get\` @@ -510,50 +510,50 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.update_order\` +### \`pythonsplitit.installment_plan.update_order\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python update_order_response = pythonsplitit.installment_plan.update_order( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", - tracking_number=\\"string_example\\", - ref_order_number=\\"string_example\\", - shipping_status=\\"Pending\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", + tracking_number="string_example", + ref_order_number="string_example", + shipping_status="Pending", capture=True, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### tracking_number: \`str\` +##### tracking_number: \`str\` -##### ref_order_number: \`str\` +##### ref_order_number: \`str\` -##### shipping_status: [\`ShippingStatus\`](./python_splitit_client/type/shipping_status.py) +##### shipping_status: [\`ShippingStatus\`](./python_splitit_client/type/shipping_status.py) -##### capture: \`bool\` +##### capture: \`bool\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UpdateOrderRequest\`](./python_splitit_client/type/update_order_request.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanUpdateResponse\`](./python_splitit_client/type/installment_plan_update_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/updateorder\` \`put\` @@ -561,52 +561,52 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.update_order2\` +### \`pythonsplitit.installment_plan.update_order2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python update_order2_response = pythonsplitit.installment_plan.update_order2( body=None, - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", - ref_order_number=\\"string_example\\", - tracking_number=\\"string_example\\", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", + ref_order_number="string_example", + tracking_number="string_example", capture=True, - shipping_status=\\"Shipped\\", + shipping_status="Shipped", identifier={}, ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -##### ref_order_number: \`str\` +##### ref_order_number: \`str\` -##### tracking_number: \`str\` +##### tracking_number: \`str\` -##### capture: \`bool\` +##### capture: \`bool\` -##### shipping_status: [\`ShippingStatus2\`](./python_splitit_client/type/shipping_status2.py) +##### shipping_status: [\`ShippingStatus2\`](./python_splitit_client/type/shipping_status2.py) -##### identifier: [\`IdentifierContract\`](./python_splitit_client/type/identifier_contract.py) +##### identifier: [\`IdentifierContract\`](./python_splitit_client/type/identifier_contract.py) -#### ⚙️ Request Body +#### ⚙️ Request Body [\`InstallmentPlanUpdateRequestByIdentifier\`](./python_splitit_client/type/installment_plan_update_request_by_identifier.py) -#### 🔄 Return +#### 🔄 Return [\`InstallmentPlanUpdateResponse\`](./python_splitit_client/type/installment_plan_update_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/updateorder\` \`put\` @@ -614,35 +614,35 @@ TouchPoint --- -### \`pythonsplitit.installment_plan.verify_authorization\` +### \`pythonsplitit.installment_plan.verify_authorization\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python verify_authorization_response = pythonsplitit.installment_plan.verify_authorization( - installment_plan_number=\\"installmentPlanNumber_example\\", - x_splitit_idempotency_key=\\"X-Splitit-IdempotencyKey_example\\", - x_splitit_touch_point=\\"\\", + installment_plan_number="installmentPlanNumber_example", + x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example", + x_splitit_touch_point="", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installment_plan_number: \`str\` +##### installment_plan_number: \`str\` -##### x_splitit_idempotency_key: \`str\` +##### x_splitit_idempotency_key: \`str\` -##### x_splitit_touch_point: \`str\` +##### x_splitit_touch_point: \`str\` TouchPoint -#### 🔄 Return +#### 🔄 Return [\`VerifyAuthorizationResponse\`](./python_splitit_client/type/verify_authorization_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/verifyauthorization\` \`get\` @@ -651,7 +651,7 @@ TouchPoint --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-typeddict-responses.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-typeddict-responses.test.ts.snap index b4085336ee..44f0a34385 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-typeddict-responses.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-typeddict-responses.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-typeddict-responses 1`] = ` -"# python-typeddict-responses-python-sdk +"# python-typeddict-responses-python-sdk A simple API based on python typeddict responses. @@ -10,7 +10,7 @@ A simple API based on python typeddict responses. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -23,52 +23,52 @@ A simple API based on python typeddict responses. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-typeddict-responses-python-sdk==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint from python_typeddict import PythonTypedDictResponses, ApiException pythontypeddictresponses = PythonTypedDictResponses( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythontypeddictresponses.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) pprint(fetch_response.body) - pprint(fetch_response.body[\\"property_a\\"]) - pprint(fetch_response.body[\\"property_b\\"]) - pprint(fetch_response.body[\\"property_c\\"]) + pprint(fetch_response.body["property_a"]) + pprint(fetch_response.body["property_b"]) + pprint(fetch_response.body["property_c"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -78,7 +78,7 @@ from pprint import pprint from python_typeddict import PythonTypedDictResponses, ApiException pythontypeddictresponses = PythonTypedDictResponses( - api_key_auth=\\"YOUR_API_KEY\\", + api_key_auth="YOUR_API_KEY", ) @@ -86,22 +86,22 @@ async def main(): try: # Fetches a JSON value based on input parameter fetch_response = await pythontypeddictresponses.test.afetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) pprint(fetch_response.body) - pprint(fetch_response.body[\\"property_a\\"]) - pprint(fetch_response.body[\\"property_b\\"]) - pprint(fetch_response.body[\\"property_c\\"]) + pprint(fetch_response.body["property_a"]) + pprint(fetch_response.body["property_b"]) + pprint(fetch_response.body["property_c"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) if e.status == 400: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) if e.status == 500: - pprint(e.body[\\"error\\"]) + pprint(e.body["error"]) pprint(e.headers) pprint(e.status) pprint(e.reason) @@ -112,30 +112,30 @@ asyncio.run(main()) \`\`\` -## Reference -### \`pythontypeddictresponses.test.fetch\` +## Reference +### \`pythontypeddictresponses.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythontypeddictresponses.test.fetch( - input_parameter=\\"inputParameter_example\\", + input_parameter="inputParameter_example", ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### input_parameter: \`str\` +##### input_parameter: \`str\` The input parameter to process. -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_typeddict/type/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -144,7 +144,7 @@ The input parameter to process. --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/python-union-string-discriminator.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/python-union-string-discriminator.test.ts.snap index c601659ebf..36b4d26321 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/python-union-string-discriminator.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/python-union-string-discriminator.test.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`python-union-string-discriminator 1`] = ` -"# python-union-string-discriminator +"# python-union-string-discriminator A simple API based for testing python-union-string-discriminator. @@ -10,7 +10,7 @@ A simple API based for testing python-union-string-discriminator. [![README.md](https://img.shields.io/badge/README-Click%20Here-green)](https://github.com/konfig-dev/konfig/tree/main/python#readme) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -24,17 +24,17 @@ A simple API based for testing python-union-string-discriminator. -## Requirements +## Requirements Python >=3.7 -## Installation +## Installation \`\`\`sh pip install python-union-string-discriminator==1.0.0 \`\`\` -## Getting Started +## Getting Started \`\`\`python from pprint import pprint @@ -44,7 +44,7 @@ from python_union_string_discriminator import ( ) pythonunionstringdiscriminatorclient = PythonUnionStringDiscriminatorClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: @@ -52,7 +52,7 @@ try: fetch_response = pythonunionstringdiscriminatorclient.test.fetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -60,7 +60,7 @@ except ApiException as e: pprint(e.round_trip_time) \`\`\` -## Async +## Async \`async\` support is available by prepending \`a\` to any method. @@ -73,7 +73,7 @@ from python_union_string_discriminator import ( ) pythonunionstringdiscriminatorclient = PythonUnionStringDiscriminatorClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) @@ -83,7 +83,7 @@ async def main(): fetch_response = await pythonunionstringdiscriminatorclient.test.afetch() print(fetch_response) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -94,7 +94,7 @@ async def main(): asyncio.run(main()) \`\`\` -## Raw HTTP Response +## Raw HTTP Response To access raw HTTP response values, use the \`.raw\` namespace. @@ -106,19 +106,19 @@ from python_union_string_discriminator import ( ) pythonunionstringdiscriminatorclient = PythonUnionStringDiscriminatorClient( - api_key=\\"YOUR_API_KEY\\", + api_key="YOUR_API_KEY", ) try: # Fetches a JSON value based on input parameter fetch_response = pythonunionstringdiscriminatorclient.test.raw.fetch() pprint(fetch_response.body) - pprint(fetch_response.body[\\"value\\"]) + pprint(fetch_response.body["value"]) pprint(fetch_response.headers) pprint(fetch_response.status) pprint(fetch_response.round_trip_time) except ApiException as e: - print(\\"Exception when calling TestApi.fetch: %s\\\\n\\" % e) + print("Exception when calling TestApi.fetch: %s\\n" % e) pprint(e.body) pprint(e.headers) pprint(e.status) @@ -127,22 +127,22 @@ except ApiException as e: \`\`\` -## Reference -### \`pythonunionstringdiscriminatorclient.test.fetch\` +## Reference +### \`pythonunionstringdiscriminatorclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`python fetch_response = pythonunionstringdiscriminatorclient.test.fetch() \`\`\` -#### 🔄 Return +#### 🔄 Return [\`TestFetchResponse\`](./python_union_string_discriminator/pydantic/test_fetch_response.py) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`get\` @@ -151,7 +151,7 @@ fetch_response = pythonunionstringdiscriminatorclient.test.fetch() --- -## Author +## Author This Python package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/ruby-snaptrade.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/ruby-snaptrade.test.ts.snap index e6d2ee6909..7ea9464559 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/ruby-snaptrade.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/ruby-snaptrade.test.ts.snap @@ -20,12 +20,12 @@ gem 'snaptrade', '~> 2.0.4' \`\`\`ruby require 'snaptrade' -SnapTrade.client_id = \\"YOUR_CLIENT_ID\\" -SnapTrade.consumer_key = \\"YOUR_CONSUMER_KEY\\" +SnapTrade.client_id = "YOUR_CLIENT_ID" +SnapTrade.consumer_key = "YOUR_CONSUMER_KEY" -user_id = \\"John.doe@snaptrade.com\\" -user_secret = \\"USERSECRET123\\" -brokerage_authorizations = \\"917c8734-8470-4a3e-a18f-57c3f2ee6631\\" +user_id = "John.doe@snaptrade.com" +user_secret = "USERSECRET123" +brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631" begin # List all accounts for the user, plus balances, positions, and orders for each account. @@ -36,7 +36,7 @@ begin ) p result rescue SnapTrade::ApiError => e - puts \\"Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}\\" + puts "Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}" end \`\`\` diff --git a/generator/konfig-integration-tests/tests/__snapshots__/swift-safehealth.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/swift-safehealth.test.ts.snap index 0ebc46e339..eb2470d4b3 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/swift-safehealth.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/swift-safehealth.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`swift-safehealth 1`] = ` -"
+"
[![Visit Safe Health](./header.png)](https://www.safehealthsystems.com) -# [Safe Health](https://www.safehealthsystems.com) +# [Safe Health](https://www.safehealthsystems.com) Send push notifications to a user's device @@ -15,7 +15,7 @@ Send push notifications to a user's device
-## Table of Contents +## Table of Contents @@ -33,25 +33,25 @@ Send push notifications to a user's device -## Installation +## Installation -### Swift Package Manager +### Swift Package Manager 1. In Xcode, select *File > Add Packages…* and enter \`https://github.com/konfig-dev/safehealth-push-swift-sdk\` as the repository URL. 1. Select the latest version number from our [tags page](https://github.com/konfig-dev/safehealth-push-swift-sdk/tags). 1. Add the *SafehealthPush* product to the [target of your app](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app). -### Carthage +### Carthage 1. Add this line to your \`Cartfile\`: \`\`\`shell -github \\"konfig-dev/safehealth-push-swift-sdk\\" +github "konfig-dev/safehealth-push-swift-sdk" \`\`\` 2. Follow the [Carthage installation instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). 3. In the future, to update to the latest version of the SDK, run the following command: \`carthage update safehealth-push-swift-sdk\` -### CocoaPods +### CocoaPods 1. Add \`source 'https://github.com/CocoaPods/Specs.git'\` to your \`Podfile\` 2. Add \`pod 'SafehealthPush', '~> 0.1.5'\` to your \`Podfile\` @@ -79,17 +79,17 @@ Pod installation complete! There is 1 dependency from the Podfile and 2 total po 4. In the future, to update to the latest version of the SDK, run: \`pod update SafehealthPush\` -## Getting Started +## Getting Started \`\`\`swift import SafehealthPush let safehealthpush = SafehealthPushClient( - identityAccessToken: \\"AUTHORIZATION\\", - safeAccount: \\"X_SF_ACCOUNT\\", - safeTenant: \\"X_SF_TENANT\\" + identityAccessToken: "AUTHORIZATION", + safeAccount: "X_SF_ACCOUNT", + safeTenant: "X_SF_TENANT" // Defining the base path is optional and defaults to https://api.dev-1.sf.safecdx.io/v1beta/notification-push - // basePath: \\"https://api.dev-1.sf.safecdx.io/v1beta/notification-push\\" + // basePath: "https://api.dev-1.sf.safecdx.io/v1beta/notification-push" ) let userId = UUID().uuidString @@ -100,14 +100,14 @@ let deleteResponse = try await safehealthpush.device.delete( ) \`\`\` -## Reference +## Reference -### \`safehealthpush.device.delete\` +### \`safehealthpush.device.delete\` Deletes the identified device from the specified user's devices. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let userId = UUID().uuidString @@ -118,19 +118,19 @@ let deleteResponse = try await safehealthpush.device.delete( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` Identifies the user to whom the device is associated. -##### deviceId: \`String\` +##### deviceId: \`String\` Identifies the device to be deleted. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/users/{userId}/devices/{deviceId}\` \`DELETE\` @@ -139,11 +139,11 @@ Identifies the device to be deleted. --- -### \`safehealthpush.device.list\` +### \`safehealthpush.device.list\` Retrieves a pageable list of devices associated with the specified user. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let userId = UUID().uuidString @@ -156,24 +156,24 @@ let listResponse = try await safehealthpush.device.list( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` Identifies the user for whom to retrieve devices. -##### page: \`Int\` +##### page: \`Int\` -##### limit: \`Int\` +##### limit: \`Int\` -#### 🔄 Return +#### 🔄 Return [DeviceListResponse](./SafehealthPush/Models/DeviceListResponse.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/users/{userId}/devices\` \`GET\` @@ -182,29 +182,29 @@ Identifies the user for whom to retrieve devices. --- -### \`safehealthpush.device.store\` +### \`safehealthpush.device.store\` Stores a new device associated with the specified user. If a device with any matching token(s) already exists for that user, it will be removed. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let userId = UUID().uuidString let device = Device( - id: \\"id_example\\", + id: "id_example", createdAt: Date(), updatedAt: Date(), platform: Platform.unknown, web: Web( operatingSystem: OperatingSystem.unknown, browserName: BrowserName.unknown, - hostname: \\"hostname_example\\", + hostname: "hostname_example", defaults: WebPushDefaults( channels: WebChannels( firebaseCloudMessaging: WebFirebaseCloudMessaging( - projectId: \\"projectId_example\\", - appId: \\"appId_example\\", - token: \\"token_example\\" + projectId: "projectId_example", + appId: "appId_example", + token: "token_example" ) ) ) @@ -212,29 +212,29 @@ let device = Device( mobile: Mobile( os: MobileOperatingSystem.appleIos, ios: AppleIos( - bundleId: \\"bundleId_example\\", - teamId: \\"teamId_example\\", + bundleId: "bundleId_example", + teamId: "teamId_example", signingCertificateType: SigningCertificate.development, channels: AppleIosChannels( simpleNotificationService: AppleSimpleNotificationService( apnsVoip: ApplePushNotificationServiceVoIp( - applicationArn: \\"applicationArn_example\\", - token: \\"token_example\\" + applicationArn: "applicationArn_example", + token: "token_example" ) ), firebaseCloudMessaging: AppleFirebaseCloudMessaging( - projectId: \\"projectId_example\\", - applicationId: \\"applicationId_example\\", - token: \\"token_example\\" + projectId: "projectId_example", + applicationId: "applicationId_example", + token: "token_example" ) ) ), android: Android( channels: AndroidChannels( firebaseCloudMessaging: AndroidFirebaseCloudMessaging( - projectId: \\"projectId_example\\", - applicationId: \\"applicationId_example\\", - token: \\"token_example\\" + projectId: "projectId_example", + applicationId: "applicationId_example", + token: "token_example" ) ) ) @@ -246,21 +246,21 @@ let storeResponse = try await safehealthpush.device.store( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` Identifies the user to whom this device will be associated. -##### device: [\`Device\`](./SafehealthPush/Models/Device.swift) +##### device: [\`Device\`](./SafehealthPush/Models/Device.swift) -#### 🔄 Return +#### 🔄 Return [DeviceCreateResponse](./SafehealthPush/Models/DeviceCreateResponse.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/users/{userId}/devices\` \`POST\` @@ -269,30 +269,30 @@ Identifies the user to whom this device will be associated. --- -### \`safehealthpush.userDevice.create\` +### \`safehealthpush.userDevice.create\` Creates a UserDevice entity. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let id = \\"id_example\\" +let id = "id_example" let createdAt = Date() let updatedAt = Date() -let deviceId = \\"deviceId_example\\" -let appVersion = \\"appVersion_example\\" -let deviceModel = \\"deviceModel_example\\" -let deviceToken = \\"deviceToken_example\\" -let deviceType = \\"deviceType_example\\" -let idfaId = \\"idfaId_example\\" +let deviceId = "deviceId_example" +let appVersion = "appVersion_example" +let deviceModel = "deviceModel_example" +let deviceToken = "deviceToken_example" +let deviceType = "deviceType_example" +let idfaId = "idfaId_example" let isLoggedIn = true -let osVersion = \\"osVersion_example\\" -let voipToken = \\"voipToken_example\\" -let userId = \\"userId_example\\" -let tenantId = \\"tenantId_example\\" -let userUUID = \\"userUUID_example\\" -let nationalHealthId = \\"nationalHealthId_example\\" -let language = \\"language_example\\" +let osVersion = "osVersion_example" +let voipToken = "voipToken_example" +let userId = "userId_example" +let tenantId = "tenantId_example" +let userUUID = "userUUID_example" +let nationalHealthId = "nationalHealthId_example" +let language = "language_example" let createResponse = try await safehealthpush.userDevice.create( id: id, createdAt: createdAt, @@ -314,64 +314,64 @@ let createResponse = try await safehealthpush.userDevice.create( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`String\` +##### id: \`String\` -##### createdAt: \`Date\` +##### createdAt: \`Date\` -##### updatedAt: \`Date\` +##### updatedAt: \`Date\` -##### deviceId: \`String\` +##### deviceId: \`String\` -##### appVersion: \`String\` +##### appVersion: \`String\` -##### deviceModel: \`String\` +##### deviceModel: \`String\` -##### deviceToken: \`String\` +##### deviceToken: \`String\` -##### deviceType: \`String\` +##### deviceType: \`String\` -##### idfaId: \`String\` +##### idfaId: \`String\` -##### isLoggedIn: \`Bool\` +##### isLoggedIn: \`Bool\` -##### osVersion: \`String\` +##### osVersion: \`String\` -##### voipToken: \`String\` +##### voipToken: \`String\` -##### userId: \`String\` +##### userId: \`String\` -##### tenantId: \`String\` +##### tenantId: \`String\` -##### userUUID: \`String\` +##### userUUID: \`String\` -##### nationalHealthId: \`String\` +##### nationalHealthId: \`String\` -##### language: \`String\` +##### language: \`String\` -#### 🔄 Return +#### 🔄 Return [UserDevice](./SafehealthPush/Models/UserDevice.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/device\` \`POST\` @@ -380,31 +380,31 @@ let createResponse = try await safehealthpush.userDevice.create( --- -### \`safehealthpush.userDevice.delete\` +### \`safehealthpush.userDevice.delete\` Deletes UserDevice entity by device token. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let deviceToken = \\"deviceToken_example\\" +let deviceToken = "deviceToken_example" let deleteResponse = try await safehealthpush.userDevice.delete( deviceToken: deviceToken ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### deviceToken: \`String\` +##### deviceToken: \`String\` Identifying token passed when creating UserDevice. -#### 🔄 Return +#### 🔄 Return [UserDevice](./SafehealthPush/Models/UserDevice.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/device\` \`DELETE\` @@ -414,7 +414,7 @@ Identifying token passed when creating UserDevice. -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/swift-snaptrade.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/swift-snaptrade.test.ts.snap index 171ad02099..cf5a805805 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/swift-snaptrade.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/swift-snaptrade.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`swift-snaptrade 1`] = ` -"
+"
[![Visit SnapTrade](./header.png)](https://snaptrade.com) -# [SnapTrade](https://snaptrade.com) +# [SnapTrade](https://snaptrade.com) Connect brokerage accounts to your app for live positions and trading @@ -13,7 +13,7 @@ Connect brokerage accounts to your app for live positions and trading
-## Table of Contents +## Table of Contents @@ -70,25 +70,25 @@ Connect brokerage accounts to your app for live positions and trading -## Installation +## Installation -### Swift Package Manager +### Swift Package Manager 1. In Xcode, select *File > Add Packages…* and enter \`https://github.com/passiv/snaptrade-sdks/tree/main/swift\` as the repository URL. 1. Select the latest version number from our [tags page](https://github.com/passiv/snaptrade-sdks/tree/main/swift/tags). 1. Add the *SnapTrade* product to the [target of your app](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app). -### Carthage +### Carthage 1. Add this line to your \`Cartfile\`: \`\`\`shell -github \\"passiv/snaptrade-sdks/tree/main/swift\\" +github "passiv/snaptrade-sdks/tree/main/swift" \`\`\` 2. Follow the [Carthage installation instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos). 3. In the future, to update to the latest version of the SDK, run the following command: \`carthage update snaptrade-sdks/tree/main/swift\` -### CocoaPods +### CocoaPods 1. Add \`source 'https://github.com/CocoaPods/Specs.git'\` to your \`Podfile\` 2. Add \`pod 'SnapTrade', '~> 1.0.0'\` to your \`Podfile\` @@ -116,37 +116,37 @@ Pod installation complete! There is 1 dependency from the Podfile and 2 total po 4. In the future, to update to the latest version of the SDK, run: \`pod update SnapTrade\` -## Getting Started +## Getting Started \`\`\`swift import SnapTrade let snaptrade = SnapTradeClient( // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1 - // basePath: \\"https://api.snaptrade.com/api/v1\\" + // basePath: "https://api.snaptrade.com/api/v1" ) let checkResponse = try await snaptrade.apiStatus.check() \`\`\` -## Reference +## Reference -### \`snaptrade.apiStatus.check\` +### \`snaptrade.apiStatus.check\` Check whether the API is operational and verify timestamps. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let checkResponse = try await snaptrade.apiStatus.check() \`\`\` -#### 🔄 Return +#### 🔄 Return [Status](./SnapTrade/Models/Status.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/\` \`GET\` @@ -155,15 +155,15 @@ let checkResponse = try await snaptrade.apiStatus.check() --- -### \`snaptrade.accountInformation.getAllUserHoldings\` +### \`snaptrade.accountInformation.getAllUserHoldings\` List all accounts for the user, plus balances, positions, and orders for each account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let brokerageAuthorizations = UUID().uuidString let getAllUserHoldingsResponse = try await snaptrade.accountInformation.getAllUserHoldings( userId: userId, @@ -172,24 +172,24 @@ let getAllUserHoldingsResponse = try await snaptrade.accountInformation.getAllUs ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### brokerageAuthorizations: \`String\` +##### brokerageAuthorizations: \`String\` Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations). -#### 🔄 Return +#### 🔄 Return [AccountHoldings](./SnapTrade/Models/AccountHoldings.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/holdings\` \`GET\` @@ -198,15 +198,15 @@ Optional. Comma seperated list of authorization IDs (only use if filtering is ne --- -### \`snaptrade.accountInformation.getUserAccountBalance\` +### \`snaptrade.accountInformation.getUserAccountBalance\` A list of account balances for the specified account (one per currency that the account holds). -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let getUserAccountBalanceResponse = try await snaptrade.accountInformation.getUserAccountBalance( userId: userId, @@ -215,24 +215,24 @@ let getUserAccountBalanceResponse = try await snaptrade.accountInformation.getUs ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get balances. -#### 🔄 Return +#### 🔄 Return [Balance](./SnapTrade/Models/Balance.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/balances\` \`GET\` @@ -241,15 +241,15 @@ The ID of the account to get balances. --- -### \`snaptrade.accountInformation.getUserAccountDetails\` +### \`snaptrade.accountInformation.getUserAccountDetails\` Return details of a specific investment account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let getUserAccountDetailsResponse = try await snaptrade.accountInformation.getUserAccountDetails( userId: userId, @@ -258,24 +258,24 @@ let getUserAccountDetailsResponse = try await snaptrade.accountInformation.getUs ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get detail of. -#### 🔄 Return +#### 🔄 Return [Account](./SnapTrade/Models/Account.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}\` \`GET\` @@ -284,17 +284,17 @@ The ID of the account to get detail of. --- -### \`snaptrade.accountInformation.getUserAccountOrders\` +### \`snaptrade.accountInformation.getUserAccountOrders\` Fetch all recent orders from a user's account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString -let state = \\"state_example\\" +let state = "state_example" let days = 987 let getUserAccountOrdersResponse = try await snaptrade.accountInformation.getUserAccountOrders( userId: userId, @@ -305,34 +305,34 @@ let getUserAccountOrdersResponse = try await snaptrade.accountInformation.getUse ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get orders. -##### state: \`String\` +##### state: \`String\` -defaults value is set to \\\\\\"all\\\\\\" +defaults value is set to \\"all\\" -##### days: \`Int\` +##### days: \`Int\` Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in. -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./SnapTrade/Models/AccountOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/orders\` \`GET\` @@ -341,15 +341,15 @@ Number of days in the past to fetch the most recent orders. Defaults to the last --- -### \`snaptrade.accountInformation.getUserAccountPositions\` +### \`snaptrade.accountInformation.getUserAccountPositions\` List account positions -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let getUserAccountPositionsResponse = try await snaptrade.accountInformation.getUserAccountPositions( userId: userId, @@ -358,24 +358,24 @@ let getUserAccountPositionsResponse = try await snaptrade.accountInformation.get ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get positions. -#### 🔄 Return +#### 🔄 Return [Position](./SnapTrade/Models/Position.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/positions\` \`GET\` @@ -384,16 +384,16 @@ The ID of the account to get positions. --- -### \`snaptrade.accountInformation.getUserHoldings\` +### \`snaptrade.accountInformation.getUserHoldings\` List balances, positions and orders for the specified account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let accountId = UUID().uuidString -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let getUserHoldingsResponse = try await snaptrade.accountInformation.getUserHoldings( accountId: accountId, userId: userId, @@ -401,24 +401,24 @@ let getUserHoldingsResponse = try await snaptrade.accountInformation.getUserHold ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to fetch holdings for. -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [AccountHoldingsAccount](./SnapTrade/Models/AccountHoldingsAccount.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/holdings\` \`GET\` @@ -427,34 +427,34 @@ The ID of the account to fetch holdings for. --- -### \`snaptrade.accountInformation.listUserAccounts\` +### \`snaptrade.accountInformation.listUserAccounts\` List accounts -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let listUserAccountsResponse = try await snaptrade.accountInformation.listUserAccounts( userId: userId, userSecret: userSecret ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [Account](./SnapTrade/Models/Account.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts\` \`GET\` @@ -463,15 +463,15 @@ let listUserAccountsResponse = try await snaptrade.accountInformation.listUserAc --- -### \`snaptrade.accountInformation.updateUserAccount\` +### \`snaptrade.accountInformation.updateUserAccount\` Update details of an investment account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let updateUserAccountResponse = try await snaptrade.accountInformation.updateUserAccount( userId: userId, @@ -480,24 +480,24 @@ let updateUserAccountResponse = try await snaptrade.accountInformation.updateUse ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to update. -#### 🔄 Return +#### 🔄 Return [Account](./SnapTrade/Models/Account.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}\` \`PUT\` @@ -506,29 +506,29 @@ The ID of the account to update. --- -### \`snaptrade.authentication.deleteSnapTradeUser\` +### \`snaptrade.authentication.deleteSnapTradeUser\` Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" +let userId = "userId_example" let deleteSnapTradeUserResponse = try await snaptrade.authentication.deleteSnapTradeUser( userId: userId ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -#### 🔄 Return +#### 🔄 Return [DeleteUserResponse](./SnapTrade/Models/DeleteUserResponse.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/deleteUser\` \`DELETE\` @@ -537,34 +537,34 @@ let deleteSnapTradeUserResponse = try await snaptrade.authentication.deleteSnapT --- -### \`snaptrade.authentication.getUserJWT\` +### \`snaptrade.authentication.getUserJWT\` Generate encrypted JWT token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let getUserJWTResponse = try await snaptrade.authentication.getUserJWT( userId: userId, userSecret: userSecret ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [EncryptedResponse](./SnapTrade/Models/EncryptedResponse.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/encryptedJWT\` \`GET\` @@ -573,17 +573,17 @@ let getUserJWTResponse = try await snaptrade.authentication.getUserJWT( --- -### \`snaptrade.authentication.listSnapTradeUsers\` +### \`snaptrade.authentication.listSnapTradeUsers\` Returns a list of users you've registered over the SnapTrade API. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let listSnapTradeUsersResponse = try await snaptrade.authentication.listSnapTradeUsers() \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/listUsers\` \`GET\` @@ -592,21 +592,21 @@ let listSnapTradeUsersResponse = try await snaptrade.authentication.listSnapTrad --- -### \`snaptrade.authentication.loginSnapTradeUser\` +### \`snaptrade.authentication.loginSnapTradeUser\` Logs in a SnapTrade user and returns an authenticated connection portal URL for them to use to connect a brokerage account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let broker = \\"broker_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" +let broker = "broker_example" let immediateRedirect = true -let customRedirect = \\"customRedirect_example\\" -let reconnect = \\"reconnect_example\\" -let connectionType = \\"connectionType_example\\" -let connectionPortalVersion = \\"connectionPortalVersion_example\\" +let customRedirect = "customRedirect_example" +let reconnect = "reconnect_example" +let connectionType = "connectionType_example" +let connectionPortalVersion = "connectionPortalVersion_example" let loginSnapTradeUserResponse = try await snaptrade.authentication.loginSnapTradeUser( userId: userId, userSecret: userSecret, @@ -619,49 +619,49 @@ let loginSnapTradeUserResponse = try await snaptrade.authentication.loginSnapTra ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### broker: \`String\` +##### broker: \`String\` Slug of the brokerage to connect the user to -##### immediateRedirect: \`Bool\` +##### immediateRedirect: \`Bool\` When set to True, user will be redirected back to the partner's site instead of the connection portal -##### customRedirect: \`String\` +##### customRedirect: \`String\` URL to redirect the user to after the user connects their brokerage account -##### reconnect: \`String\` +##### reconnect: \`String\` The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information. -##### connectionType: \`String\` +##### connectionType: \`String\` Sets whether the connection should be read or trade -##### connectionPortalVersion: \`String\` +##### connectionPortalVersion: \`String\` Sets the version of the connection portal to render, with a default to 'v2' -#### 🔄 Return +#### 🔄 Return [AuthenticationLoginSnapTradeUser200Response](./SnapTrade/Models/AuthenticationLoginSnapTradeUser200Response.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/login\` \`POST\` @@ -670,31 +670,31 @@ Sets the version of the connection portal to render, with a default to 'v2' --- -### \`snaptrade.authentication.registerSnapTradeUser\` +### \`snaptrade.authentication.registerSnapTradeUser\` Create SnapTrade user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" +let userId = "userId_example" let registerSnapTradeUserResponse = try await snaptrade.authentication.registerSnapTradeUser( userId: userId ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it's unique to a user -#### 🔄 Return +#### 🔄 Return [UserIDandSecret](./SnapTrade/Models/UserIDandSecret.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/registerUser\` \`POST\` @@ -703,38 +703,38 @@ SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as --- -### \`snaptrade.authentication.resetSnapTradeUserSecret\` +### \`snaptrade.authentication.resetSnapTradeUserSecret\` Obtain a new user secret for a user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let resetSnapTradeUserSecretResponse = try await snaptrade.authentication.resetSnapTradeUserSecret( userId: userId, userSecret: userSecret ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it's unique to a user -##### userSecret: \`String\` +##### userSecret: \`String\` SnapTrade User Secret randomly generated by SnapTrade. This should be considered priviledged information and if compromised, you should delete and re-create this SnapTrade user. -#### 🔄 Return +#### 🔄 Return [UserIDandSecret](./SnapTrade/Models/UserIDandSecret.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/resetUserSecret\` \`POST\` @@ -743,16 +743,16 @@ SnapTrade User Secret randomly generated by SnapTrade. This should be considered --- -### \`snaptrade.connections.detailBrokerageAuthorization\` +### \`snaptrade.connections.detailBrokerageAuthorization\` Get brokerage authorization details -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let authorizationId = UUID().uuidString -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let detailBrokerageAuthorizationResponse = try await snaptrade.connections.detailBrokerageAuthorization( authorizationId: authorizationId, userId: userId, @@ -760,24 +760,24 @@ let detailBrokerageAuthorizationResponse = try await snaptrade.connections.detai ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorizationId: \`String\` +##### authorizationId: \`String\` The ID of a brokerage authorization object. -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorization](./SnapTrade/Models/BrokerageAuthorization.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations/{authorizationId}\` \`GET\` @@ -786,34 +786,34 @@ The ID of a brokerage authorization object. --- -### \`snaptrade.connections.listBrokerageAuthorizations\` +### \`snaptrade.connections.listBrokerageAuthorizations\` List all brokerage authorizations for the user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let listBrokerageAuthorizationsResponse = try await snaptrade.connections.listBrokerageAuthorizations( userId: userId, userSecret: userSecret ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorization](./SnapTrade/Models/BrokerageAuthorization.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations\` \`GET\` @@ -822,16 +822,16 @@ let listBrokerageAuthorizationsResponse = try await snaptrade.connections.listBr --- -### \`snaptrade.connections.removeBrokerageAuthorization\` +### \`snaptrade.connections.removeBrokerageAuthorization\` Delete brokerage authorization -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let authorizationId = UUID().uuidString -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let removeBrokerageAuthorizationResponse = try await snaptrade.connections.removeBrokerageAuthorization( authorizationId: authorizationId, userId: userId, @@ -839,20 +839,20 @@ let removeBrokerageAuthorizationResponse = try await snaptrade.connections.remov ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorizationId: \`String\` +##### authorizationId: \`String\` The ID of the Authorization to delete. -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations/{authorizationId}\` \`DELETE\` @@ -861,16 +861,16 @@ The ID of the Authorization to delete. --- -### \`snaptrade.connections.sessionEvents\` +### \`snaptrade.connections.sessionEvents\` List all session events for the partner -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let partnerClientId = \\"partnerClientId_example\\" -let userId = \\"userId_example\\" -let sessionId = \\"sessionId_example\\" +let partnerClientId = "partnerClientId_example" +let userId = "userId_example" +let sessionId = "sessionId_example" let sessionEventsResponse = try await snaptrade.connections.sessionEvents( partnerClientId: partnerClientId, userId: userId, @@ -878,26 +878,26 @@ let sessionEventsResponse = try await snaptrade.connections.sessionEvents( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### partnerClientId: \`String\` +##### partnerClientId: \`String\` -##### userId: \`String\` +##### userId: \`String\` Optional comma seperated list of user IDs used to filter the request on specific users -##### sessionId: \`String\` +##### sessionId: \`String\` Optional comma seperated list of session IDs used to filter the request on specific users -#### 🔄 Return +#### 🔄 Return [ConnectionsSessionEvents200ResponseInner](./SnapTrade/Models/ConnectionsSessionEvents200ResponseInner.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessionEvents\` \`GET\` @@ -906,34 +906,34 @@ Optional comma seperated list of session IDs used to filter the request on speci --- -### \`snaptrade.errorLogs.listUserErrors\` +### \`snaptrade.errorLogs.listUserErrors\` Retrieve error logs on behalf of your SnapTrade users -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let listUserErrorsResponse = try await snaptrade.errorLogs.listUserErrors( userId: userId, userSecret: userSecret ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [UserErrorLog](./SnapTrade/Models/UserErrorLog.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/listUserErrors\` \`GET\` @@ -942,24 +942,24 @@ let listUserErrorsResponse = try await snaptrade.errorLogs.listUserErrors( --- -### \`snaptrade.options.getOptionStrategy\` +### \`snaptrade.options.getOptionStrategy\` Creates an option strategy object that will be used to place an option strategy order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let underlyingSymbolId = \\"underlyingSymbolId_example\\" +let underlyingSymbolId = "underlyingSymbolId_example" let legs = [ OptionLeg( - action: \\"action_example\\", - optionSymbolId: \\"optionSymbolId_example\\", + action: "action_example", + optionSymbolId: "optionSymbolId_example", quantity: 123 ) ] -let strategyType = \\"strategyType_example\\" -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let strategyType = "strategyType_example" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let getOptionStrategyResponse = try await snaptrade.options.getOptionStrategy( underlyingSymbolId: underlyingSymbolId, @@ -971,33 +971,33 @@ let getOptionStrategyResponse = try await snaptrade.options.getOptionStrategy( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### underlying_symbol_id: \`String\` +##### underlying_symbol_id: \`String\` -##### legs: \`[OptionLeg]\` +##### legs: \`[OptionLeg]\` -##### strategy_type: \`String\` +##### strategy_type: \`String\` -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to create the option strategy object in. -#### 🔄 Return +#### 🔄 Return [StrategyQuotes](./SnapTrade/Models/StrategyQuotes.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy\` \`POST\` @@ -1006,15 +1006,15 @@ The ID of the account to create the option strategy object in. --- -### \`snaptrade.options.getOptionsChain\` +### \`snaptrade.options.getOptionsChain\` Get the options chain -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let symbol = UUID().uuidString let getOptionsChainResponse = try await snaptrade.options.getOptionsChain( @@ -1025,29 +1025,29 @@ let getOptionsChainResponse = try await snaptrade.options.getOptionsChain( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get the options chain from. -##### symbol: \`String\` +##### symbol: \`String\` Universal symbol ID if symbol -#### 🔄 Return +#### 🔄 Return [OptionChainInner](./SnapTrade/Models/OptionChainInner.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionsChain\` \`GET\` @@ -1056,15 +1056,15 @@ Universal symbol ID if symbol --- -### \`snaptrade.options.getOptionsStrategyQuote\` +### \`snaptrade.options.getOptionsStrategyQuote\` Get latest market data of option strategy -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let optionStrategyId = UUID().uuidString let getOptionsStrategyQuoteResponse = try await snaptrade.options.getOptionsStrategyQuote( @@ -1075,29 +1075,29 @@ let getOptionsStrategyQuoteResponse = try await snaptrade.options.getOptionsStra ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account the strategy will be placed in. -##### optionStrategyId: \`String\` +##### optionStrategyId: \`String\` Option strategy id obtained from response when creating option strategy object -#### 🔄 Return +#### 🔄 Return [StrategyQuotes](./SnapTrade/Models/StrategyQuotes.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy/{optionStrategyId}\` \`GET\` @@ -1106,15 +1106,15 @@ Option strategy id obtained from response when creating option strategy object --- -### \`snaptrade.options.listOptionHoldings\` +### \`snaptrade.options.listOptionHoldings\` Get the options holdings in the account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let listOptionHoldingsResponse = try await snaptrade.options.listOptionHoldings( userId: userId, @@ -1123,24 +1123,24 @@ let listOptionHoldingsResponse = try await snaptrade.options.listOptionHoldings( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to fetch options holdings for. -#### 🔄 Return +#### 🔄 Return [OptionsPosition](./SnapTrade/Models/OptionsPosition.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/options\` \`GET\` @@ -1149,11 +1149,11 @@ The ID of the account to fetch options holdings for. --- -### \`snaptrade.options.placeOptionStrategy\` +### \`snaptrade.options.placeOptionStrategy\` Place an option strategy order on the brokerage -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let orderType = OrderType( @@ -1162,8 +1162,8 @@ let orderType = OrderType( let timeInForce = TimeInForceStrict( ) -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString let optionStrategyId = UUID().uuidString let price = 987 @@ -1178,40 +1178,40 @@ let placeOptionStrategyResponse = try await snaptrade.options.placeOptionStrateg ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### order_type: \`OrderType\` +##### order_type: \`OrderType\` -##### time_in_force: \`TimeInForceStrict\` +##### time_in_force: \`TimeInForceStrict\` -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to execute the strategy in. -##### optionStrategyId: \`String\` +##### optionStrategyId: \`String\` Option strategy id obtained from response when creating option strategy object -##### price: \`Double\` +##### price: \`Double\` Trade Price if limit or stop limit order -#### 🔄 Return +#### 🔄 Return [StrategyOrderRecord](./SnapTrade/Models/StrategyOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute\` \`POST\` @@ -1220,31 +1220,31 @@ Trade Price if limit or stop limit order --- -### \`snaptrade.referenceData.getCurrencyExchangeRatePair\` +### \`snaptrade.referenceData.getCurrencyExchangeRatePair\` Return the exchange rate of a currency pair -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let currencyPair = \\"currencyPair_example\\" +let currencyPair = "currencyPair_example" let getCurrencyExchangeRatePairResponse = try await snaptrade.referenceData.getCurrencyExchangeRatePair( currencyPair: currencyPair ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### currencyPair: \`String\` +##### currencyPair: \`String\` A currency pair based on currency code for example, {CAD-USD} -#### 🔄 Return +#### 🔄 Return [ExchangeRatePairs](./SnapTrade/Models/ExchangeRatePairs.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies/rates/{currencyPair}\` \`GET\` @@ -1253,21 +1253,21 @@ A currency pair based on currency code for example, {CAD-USD} --- -### \`snaptrade.referenceData.getPartnerInfo\` +### \`snaptrade.referenceData.getPartnerInfo\` Get metadata related to Snaptrade partner -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let getPartnerInfoResponse = try await snaptrade.referenceData.getPartnerInfo() \`\`\` -#### 🔄 Return +#### 🔄 Return [PartnerData](./SnapTrade/Models/PartnerData.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/partners\` \`GET\` @@ -1276,21 +1276,21 @@ let getPartnerInfoResponse = try await snaptrade.referenceData.getPartnerInfo() --- -### \`snaptrade.referenceData.getSecurityTypes\` +### \`snaptrade.referenceData.getSecurityTypes\` List security types available on SnapTrade. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let getSecurityTypesResponse = try await snaptrade.referenceData.getSecurityTypes() \`\`\` -#### 🔄 Return +#### 🔄 Return [SecurityType](./SnapTrade/Models/SecurityType.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/securityTypes\` \`GET\` @@ -1299,21 +1299,21 @@ let getSecurityTypesResponse = try await snaptrade.referenceData.getSecurityType --- -### \`snaptrade.referenceData.getStockExchanges\` +### \`snaptrade.referenceData.getStockExchanges\` List exchanges -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let getStockExchangesResponse = try await snaptrade.referenceData.getStockExchanges() \`\`\` -#### 🔄 Return +#### 🔄 Return [Exchange](./SnapTrade/Models/Exchange.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/exchanges\` \`GET\` @@ -1322,29 +1322,29 @@ let getStockExchangesResponse = try await snaptrade.referenceData.getStockExchan --- -### \`snaptrade.referenceData.getSymbols\` +### \`snaptrade.referenceData.getSymbols\` Search for symbols -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let substring = \\"substring_example\\" +let substring = "substring_example" let getSymbolsResponse = try await snaptrade.referenceData.getSymbols( substring: substring ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### substring: \`String\` +##### substring: \`String\` -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./SnapTrade/Models/UniversalSymbol.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/symbols\` \`POST\` @@ -1353,31 +1353,31 @@ let getSymbolsResponse = try await snaptrade.referenceData.getSymbols( --- -### \`snaptrade.referenceData.getSymbolsByTicker\` +### \`snaptrade.referenceData.getSymbolsByTicker\` Get details of a symbol by the ticker or the universal_symbol_id -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let query = \\"query_example\\" +let query = "query_example" let getSymbolsByTickerResponse = try await snaptrade.referenceData.getSymbolsByTicker( query: query ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`String\` +##### query: \`String\` The ticker or universal_symbol_id of the UniversalSymbol to get. -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./SnapTrade/Models/UniversalSymbol.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/symbols/{query}\` \`GET\` @@ -1386,31 +1386,31 @@ The ticker or universal_symbol_id of the UniversalSymbol to get. --- -### \`snaptrade.referenceData.listAllBrokerageAuthorizationType\` +### \`snaptrade.referenceData.listAllBrokerageAuthorizationType\` List of all brokerage authorization types -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let brokerage = \\"brokerage_example\\" +let brokerage = "brokerage_example" let listAllBrokerageAuthorizationTypeResponse = try await snaptrade.referenceData.listAllBrokerageAuthorizationType( brokerage: brokerage ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### brokerage: \`String\` +##### brokerage: \`String\` Comma separated value of brokerage slugs -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorizationTypeReadOnly](./SnapTrade/Models/BrokerageAuthorizationTypeReadOnly.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/brokerageAuthorizationTypes\` \`GET\` @@ -1419,21 +1419,21 @@ Comma separated value of brokerage slugs --- -### \`snaptrade.referenceData.listAllBrokerages\` +### \`snaptrade.referenceData.listAllBrokerages\` List brokerages -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let listAllBrokeragesResponse = try await snaptrade.referenceData.listAllBrokerages() \`\`\` -#### 🔄 Return +#### 🔄 Return [Brokerage](./SnapTrade/Models/Brokerage.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/brokerages\` \`GET\` @@ -1442,21 +1442,21 @@ let listAllBrokeragesResponse = try await snaptrade.referenceData.listAllBrokera --- -### \`snaptrade.referenceData.listAllCurrencies\` +### \`snaptrade.referenceData.listAllCurrencies\` List currencies -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let listAllCurrenciesResponse = try await snaptrade.referenceData.listAllCurrencies() \`\`\` -#### 🔄 Return +#### 🔄 Return [Currency](./SnapTrade/Models/Currency.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies\` \`GET\` @@ -1465,21 +1465,21 @@ let listAllCurrenciesResponse = try await snaptrade.referenceData.listAllCurrenc --- -### \`snaptrade.referenceData.listAllCurrenciesRates\` +### \`snaptrade.referenceData.listAllCurrenciesRates\` List currency exchange rates -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let listAllCurrenciesRatesResponse = try await snaptrade.referenceData.listAllCurrenciesRates() \`\`\` -#### 🔄 Return +#### 🔄 Return [ExchangeRatePairs](./SnapTrade/Models/ExchangeRatePairs.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies/rates\` \`GET\` @@ -1488,17 +1488,17 @@ let listAllCurrenciesRatesResponse = try await snaptrade.referenceData.listAllCu --- -### \`snaptrade.referenceData.symbolSearchUserAccount\` +### \`snaptrade.referenceData.symbolSearchUserAccount\` Search for symbols available in an account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString -let substring = \\"substring_example\\" +let substring = "substring_example" let symbolSearchUserAccountResponse = try await snaptrade.referenceData.symbolSearchUserAccount( userId: userId, userSecret: userSecret, @@ -1507,27 +1507,27 @@ let symbolSearchUserAccountResponse = try await snaptrade.referenceData.symbolSe ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to search for symbols within. -##### substring: \`String\` +##### substring: \`String\` -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./SnapTrade/Models/UniversalSymbol.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/symbols\` \`POST\` @@ -1536,17 +1536,17 @@ The ID of the account to search for symbols within. --- -### \`snaptrade.trading.cancelUserAccountOrder\` +### \`snaptrade.trading.cancelUserAccountOrder\` Cancel open order in account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let accountId = UUID().uuidString -let brokerageOrderId = \\"brokerageOrderId_example\\" +let brokerageOrderId = "brokerageOrderId_example" let cancelUserAccountOrderResponse = try await snaptrade.trading.cancelUserAccountOrder( userId: userId, userSecret: userSecret, @@ -1555,27 +1555,27 @@ let cancelUserAccountOrderResponse = try await snaptrade.trading.cancelUserAccou ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to cancel the order in. -##### brokerage_order_id: \`String\` +##### brokerage_order_id: \`String\` -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./SnapTrade/Models/AccountOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/orders/cancel\` \`POST\` @@ -1584,16 +1584,16 @@ The ID of the account to cancel the order in. --- -### \`snaptrade.trading.getOrderImpact\` +### \`snaptrade.trading.getOrderImpact\` Check impact of trades on account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let accountId = \\"accountId_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" +let accountId = "accountId_example" let action = Action( ) @@ -1606,7 +1606,7 @@ let timeInForce = TimeInForceStrict( ) let units = -let universalSymbolId = \\"universalSymbolId_example\\" +let universalSymbolId = "universalSymbolId_example" let notionalValue = let getOrderImpactResponse = try await snaptrade.trading.getOrderImpact( userId: userId, @@ -1623,50 +1623,50 @@ let getOrderImpactResponse = try await snaptrade.trading.getOrderImpact( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### account_id: \`String\` +##### account_id: \`String\` -##### action: \`Action\` +##### action: \`Action\` -##### order_type: \`OrderType\` +##### order_type: \`OrderType\` -##### price: \`Double\` +##### price: \`Double\` Trade Price if limit or stop limit order -##### stop: \`Double\` +##### stop: \`Double\` Stop Price. If stop loss or stop limit order, the price to trigger the stop -##### time_in_force: \`TimeInForceStrict\` +##### time_in_force: \`TimeInForceStrict\` -##### units: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) +##### units: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) -##### universal_symbol_id: \`String\` +##### universal_symbol_id: \`String\` -##### notional_value: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) +##### notional_value: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) -#### 🔄 Return +#### 🔄 Return [ManualTradeAndImpact](./SnapTrade/Models/ManualTradeAndImpact.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/impact\` \`POST\` @@ -1675,17 +1675,17 @@ Stop Price. If stop loss or stop limit order, the price to trigger the stop --- -### \`snaptrade.trading.getUserAccountQuotes\` +### \`snaptrade.trading.getUserAccountQuotes\` Get symbol quotes -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let symbols = \\"symbols_example\\" -let accountId = \\"accountId_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" +let symbols = "symbols_example" +let accountId = "accountId_example" let useTicker = true let getUserAccountQuotesResponse = try await snaptrade.trading.getUserAccountQuotes( userId: userId, @@ -1696,34 +1696,34 @@ let getUserAccountQuotesResponse = try await snaptrade.trading.getUserAccountQuo ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### symbols: \`String\` +##### symbols: \`String\` List of universal_symbol_id or tickers to get quotes for. -##### accountId: \`String\` +##### accountId: \`String\` The ID of the account to get quotes. -##### useTicker: \`Bool\` +##### useTicker: \`Bool\` Should be set to True if providing tickers. -#### 🔄 Return +#### 🔄 Return [SymbolsQuotesInner](./SnapTrade/Models/SymbolsQuotesInner.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/quotes\` \`GET\` @@ -1732,16 +1732,16 @@ Should be set to True if providing tickers. --- -### \`snaptrade.trading.placeForceOrder\` +### \`snaptrade.trading.placeForceOrder\` Place a trade with NO validation. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let accountId = \\"accountId_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" +let accountId = "accountId_example" let action = Action( ) @@ -1754,7 +1754,7 @@ let timeInForce = TimeInForceStrict( ) let units = -let universalSymbolId = \\"universalSymbolId_example\\" +let universalSymbolId = "universalSymbolId_example" let notionalValue = let placeForceOrderResponse = try await snaptrade.trading.placeForceOrder( userId: userId, @@ -1771,50 +1771,50 @@ let placeForceOrderResponse = try await snaptrade.trading.placeForceOrder( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### account_id: \`String\` +##### account_id: \`String\` -##### action: \`Action\` +##### action: \`Action\` -##### order_type: \`OrderType\` +##### order_type: \`OrderType\` -##### price: \`Double\` +##### price: \`Double\` Trade Price if limit or stop limit order -##### stop: \`Double\` +##### stop: \`Double\` Stop Price. If stop loss or stop limit order, the price to trigger the stop -##### time_in_force: \`TimeInForceStrict\` +##### time_in_force: \`TimeInForceStrict\` -##### units: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) +##### units: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) -##### universal_symbol_id: \`String\` +##### universal_symbol_id: \`String\` -##### notional_value: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) +##### notional_value: [\`Double\`](./SnapTrade/Models/ModelDouble.swift) -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./SnapTrade/Models/AccountOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/place\` \`POST\` @@ -1823,15 +1823,15 @@ Stop Price. If stop loss or stop limit order, the price to trigger the stop --- -### \`snaptrade.trading.placeOCOOrder\` +### \`snaptrade.trading.placeOCOOrder\` Place a OCO (One Cancels Other) order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let firstTradeId = TODO let secondTradeId = TODO let placeOCOOrderResponse = try await snaptrade.trading.placeOCOOrder( @@ -1842,29 +1842,29 @@ let placeOCOOrderResponse = try await snaptrade.trading.placeOCOOrder( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### first_trade_id: \`AnyCodable\` +##### first_trade_id: \`AnyCodable\` The ID of first trade object obtained from trade/impact endpoint -##### second_trade_id: \`AnyCodable\` +##### second_trade_id: \`AnyCodable\` The ID of second trade object obtained from trade/impact endpoint -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./SnapTrade/Models/AccountOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/oco\` \`POST\` @@ -1873,16 +1873,16 @@ The ID of second trade object obtained from trade/impact endpoint --- -### \`snaptrade.trading.placeOrder\` +### \`snaptrade.trading.placeOrder\` Place order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift let tradeId = UUID().uuidString -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" let placeOrderResponse = try await snaptrade.trading.placeOrder( tradeId: tradeId, userId: userId, @@ -1890,24 +1890,24 @@ let placeOrderResponse = try await snaptrade.trading.placeOrder( ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tradeId: \`String\` +##### tradeId: \`String\` The ID of trade object obtained from trade/impact endpoint -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./SnapTrade/Models/AccountOrderRecord.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/{tradeId}\` \`POST\` @@ -1916,20 +1916,20 @@ The ID of trade object obtained from trade/impact endpoint --- -### \`snaptrade.transactionsAndReporting.getActivities\` +### \`snaptrade.transactionsAndReporting.getActivities\` Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let startDate = \\"startDate_example\\" -let endDate = \\"endDate_example\\" -let accounts = \\"accounts_example\\" -let brokerageAuthorizations = \\"brokerageAuthorizations_example\\" -let type = \\"type_example\\" +let userId = "userId_example" +let userSecret = "userSecret_example" +let startDate = "startDate_example" +let endDate = "endDate_example" +let accounts = "accounts_example" +let brokerageAuthorizations = "brokerageAuthorizations_example" +let type = "type_example" let getActivitiesResponse = try await snaptrade.transactionsAndReporting.getActivities( userId: userId, userSecret: userSecret, @@ -1941,40 +1941,40 @@ let getActivitiesResponse = try await snaptrade.transactionsAndReporting.getActi ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### startDate: \`String\` +##### startDate: \`String\` -##### endDate: \`String\` +##### endDate: \`String\` -##### accounts: \`String\` +##### accounts: \`String\` Optional comma seperated list of account IDs used to filter the request on specific accounts -##### brokerageAuthorizations: \`String\` +##### brokerageAuthorizations: \`String\` Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations -##### type: \`String\` +##### type: \`String\` Optional comma seperated list of types to filter activities by. This is not an exhaustive list, if we fail to match to these types, we will return the raw description from the brokerage. Potential values include - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT -#### 🔄 Return +#### 🔄 Return [UniversalActivity](./SnapTrade/Models/UniversalActivity.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/activities\` \`GET\` @@ -1983,20 +1983,20 @@ Optional comma seperated list of types to filter activities by. This is not an e --- -### \`snaptrade.transactionsAndReporting.getReportingCustomRange\` +### \`snaptrade.transactionsAndReporting.getReportingCustomRange\` Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`swift -let startDate = \\"startDate_example\\" -let endDate = \\"endDate_example\\" -let userId = \\"userId_example\\" -let userSecret = \\"userSecret_example\\" -let accounts = \\"accounts_example\\" +let startDate = "startDate_example" +let endDate = "endDate_example" +let userId = "userId_example" +let userSecret = "userSecret_example" +let accounts = "accounts_example" let detailed = true -let frequency = \\"frequency_example\\" +let frequency = "frequency_example" let getReportingCustomRangeResponse = try await snaptrade.transactionsAndReporting.getReportingCustomRange( startDate: startDate, endDate: endDate, @@ -2008,40 +2008,40 @@ let getReportingCustomRangeResponse = try await snaptrade.transactionsAndReporti ) \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### startDate: \`String\` +##### startDate: \`String\` -##### endDate: \`String\` +##### endDate: \`String\` -##### userId: \`String\` +##### userId: \`String\` -##### userSecret: \`String\` +##### userSecret: \`String\` -##### accounts: \`String\` +##### accounts: \`String\` Optional comma seperated list of account IDs used to filter the request on specific accounts -##### detailed: \`Bool\` +##### detailed: \`Bool\` Optional, increases frequency of data points for the total value and contribution charts if set to true -##### frequency: \`String\` +##### frequency: \`String\` Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly. -#### 🔄 Return +#### 🔄 Return [PerformanceCustom](./SnapTrade/Models/PerformanceCustom.swift) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/performance/custom\` \`GET\` @@ -2051,7 +2051,7 @@ Optional frequency for the rate of return chart (defaults to monthly). Possible -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-array-query-string.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-array-query-string.test.ts.snap index 902da92a00..de88ef2d03 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-array-query-string.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-array-query-string.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-array-query-string 1`] = ` -"# typescript-array-query-string +"# typescript-array-query-string A simple API based for testing typescript-array-query-string. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-array-query-string/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-array-query-string. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,15 +52,15 @@ yarn add typescript-array-query-string
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptArrayQueryStringClient } from \\"typescript-array-query-string\\"; +import { TypescriptArrayQueryStringClient } from "typescript-array-query-string"; const typescriptarrayquerystringclient = new TypescriptArrayQueryStringClient({ // Defining the base path is optional and defaults to https://typescript-array-query-string.konfigthis.com - // basePath: \\"https://typescript-array-query-string.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-array-query-string.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = await typescriptarrayquerystringclient.test.fetch({}); @@ -68,24 +68,24 @@ const fetchResponse = await typescriptarrayquerystringclient.test.fetch({}); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptarrayquerystringclient.test.fetch\` +### \`typescriptarrayquerystringclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptarrayquerystringclient.test.fetch({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\`[] +##### id: \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -94,7 +94,7 @@ const fetchResponse = await typescriptarrayquerystringclient.test.fetch({}); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-bellhop.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-bellhop.test.ts.snap index 50e9c69576..dbc3ecae3f 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-bellhop.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-bellhop.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-bellhop 1`] = ` -"
+"
[![Visit Bellhop](./header.png)](https://www.getbellhops.com) -# [Bellhop](https://www.getbellhops.com) +# [Bellhop](https://www.getbellhops.com) Bellhop's Partner API @@ -14,7 +14,7 @@ Bellhop's Partner API
-## Table of Contents +## Table of Contents @@ -41,13 +41,13 @@ Bellhop's Partner API -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -74,60 +74,60 @@ yarn add bellhop-partners-typescript
-## Getting Started +## Getting Started \`\`\`typescript -import { Bellhop } from \\"bellhop-partners-typescript\\"; +import { Bellhop } from "bellhop-partners-typescript"; const bellhop = new Bellhop({ // Defining the base path is optional and defaults to https://partners.bellhops.dev/v5 - // basePath: \\"https://partners.bellhops.dev/v5\\", - accessToken: \\"ACCESS_TOKEN\\", + // basePath: "https://partners.bellhops.dev/v5", + accessToken: "ACCESS_TOKEN", }); const getAuthTokenResponse = await bellhop.authorization.getAuthToken({ useCache: true, - client_id: \\"client_id_example\\", - client_secret: \\"client_secret_example\\", - audience: \\"audience_example\\", + client_id: "client_id_example", + client_secret: "client_secret_example", + audience: "audience_example", }); console.log(getAuthTokenResponse); \`\`\` -## Reference +## Reference -### \`bellhop.authorization.getAuthToken\` +### \`bellhop.authorization.getAuthToken\` Get Auth Token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getAuthTokenResponse = await bellhop.authorization.getAuthToken({ useCache: true, - client_id: \\"client_id_example\\", - client_secret: \\"client_secret_example\\", - audience: \\"audience_example\\", + client_id: "client_id_example", + client_secret: "client_secret_example", + audience: "audience_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### client_id: \`string\` +##### client_id: \`string\` -##### client_secret: \`string\` +##### client_secret: \`string\` -##### audience: \`string\` +##### audience: \`string\` -##### useCache: \`boolean\` +##### useCache: \`boolean\` -#### 🔄 Return +#### 🔄 Return [Auth0TokenResponse](./models/auth0-token-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorize\` \`POST\` @@ -136,23 +136,23 @@ const getAuthTokenResponse = await bellhop.authorization.getAuthToken({ --- -### \`bellhop.leads.cancel\` +### \`bellhop.leads.cancel\` Cancel Lead -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const cancelResponse = await bellhop.leads.cancel({ - code: \\"code_example\\", + code: "code_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### code: \`string\` +##### code: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/leads/{code}\` \`DELETE\` @@ -161,86 +161,86 @@ const cancelResponse = await bellhop.leads.cancel({ --- -### \`bellhop.leads.create\` +### \`bellhop.leads.create\` Create Lead -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await bellhop.leads.create({ - first_name: \\"first_name_example\\", - last_name: \\"last_name_example\\", - lead_type: \\"string_example\\", - lead_record_type: \\"string_example\\", - origin_postal_code: \\"85001\\", - origin_state: \\"AZ\\", - destination_postal_code: \\"85001\\", - destination_state: \\"AZ\\", - load_date: \\"2021-01-01\\", - close_date: \\"2021-01-01\\", + first_name: "first_name_example", + last_name: "last_name_example", + lead_type: "string_example", + lead_record_type: "string_example", + origin_postal_code: "85001", + origin_state: "AZ", + destination_postal_code: "85001", + destination_state: "AZ", + load_date: "2021-01-01", + close_date: "2021-01-01", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### first_name: \`string\` +##### first_name: \`string\` -##### last_name: \`string\` +##### last_name: \`string\` -##### lead_type: [\`LeadType\`](./models/lead-type.ts) +##### lead_type: [\`LeadType\`](./models/lead-type.ts) -##### lead_record_type: [\`LeadRecordType\`](./models/lead-record-type.ts) +##### lead_record_type: [\`LeadRecordType\`](./models/lead-record-type.ts) -##### description: \`string\` +##### description: \`string\` -##### external_id: \`string\` +##### external_id: \`string\` -##### lead_source: \`string\` +##### lead_source: \`string\` -##### email: \`string\` +##### email: \`string\` -##### phone: \`string\` +##### phone: \`string\` -##### origin_postal_code: \`string\` +##### origin_postal_code: \`string\` -##### origin_street: \`string\` +##### origin_street: \`string\` -##### origin_city: \`string\` +##### origin_city: \`string\` -##### origin_state: \`string\` +##### origin_state: \`string\` -##### origin_square_feet: \`number\` +##### origin_square_feet: \`number\` -##### destination_postal_code: \`string\` +##### destination_postal_code: \`string\` -##### destination_street: \`string\` +##### destination_street: \`string\` -##### destination_city: \`string\` +##### destination_city: \`string\` -##### destination_state: \`string\` +##### destination_state: \`string\` -##### clickid: \`string\` +##### clickid: \`string\` -##### gclid: \`string\` +##### gclid: \`string\` -##### utm_medium: \`string\` +##### utm_medium: \`string\` -##### utm_source: \`string\` +##### utm_source: \`string\` -##### utm_campaign: \`string\` +##### utm_campaign: \`string\` -##### msclkid: \`string\` +##### msclkid: \`string\` -##### load_date: \`string\` +##### load_date: \`string\` -##### close_date: \`string\` +##### close_date: \`string\` -#### 🔄 Return +#### 🔄 Return [LeadResponse](./models/lead-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/leads\` \`POST\` @@ -249,27 +249,27 @@ const createResponse = await bellhop.leads.create({ --- -### \`bellhop.leads.get\` +### \`bellhop.leads.get\` Get Lead -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await bellhop.leads.get({ - code: \\"code_example\\", + code: "code_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### code: \`string\` +##### code: \`string\` -#### 🔄 Return +#### 🔄 Return [LeadResponse](./models/lead-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/leads/{code}\` \`GET\` @@ -278,25 +278,25 @@ const getResponse = await bellhop.leads.get({ --- -### \`bellhop.leads.list\` +### \`bellhop.leads.list\` List Leads -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await bellhop.leads.list({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### email: \`string\` +##### email: \`string\` -#### 🔄 Return +#### 🔄 Return [LeadResponse](./models/lead-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/leads\` \`GET\` @@ -305,34 +305,34 @@ const listResponse = await bellhop.leads.list({}); --- -### \`bellhop.leads.update\` +### \`bellhop.leads.update\` Update Lead -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await bellhop.leads.update({ - code: \\"code_example\\", - description: \\"description_example\\", + code: "code_example", + description: "description_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` -##### code: \`string\` +##### code: \`string\` -##### close_date: \`string\` +##### close_date: \`string\` -##### load_date: \`string\` +##### load_date: \`string\` -#### 🔄 Return +#### 🔄 Return [LeadResponse](./models/lead-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/leads/{code}\` \`PATCH\` @@ -341,7 +341,7 @@ const updateResponse = await bellhop.leads.update({ --- -### \`bellhop.locations.createQuoting\` +### \`bellhop.locations.createQuoting\` Create quoting location object from address @@ -349,70 +349,70 @@ Create Quoting Location standardizes input address via USPS and generates geo-location details Google Maps APIs. The location id is a hash of the required fields on the location object. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createQuotingResponse = await bellhop.locations.createQuoting({ - line_1: \\"line_1_example\\", - city: \\"city_example\\", - state: \\"state_example\\", - postal_code: \\"postal_code_example\\", - country: \\"US\\", - property_type: \\"string_example\\", + line_1: "line_1_example", + city: "city_example", + state: "state_example", + postal_code: "postal_code_example", + country: "US", + property_type: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### line_1: \`string\` +##### line_1: \`string\` -##### city: \`string\` +##### city: \`string\` -##### state: \`string\` +##### state: \`string\` -##### postal_code: \`string\` +##### postal_code: \`string\` -##### property_type: [\`PropertyType\`](./models/property-type.ts) +##### property_type: [\`PropertyType\`](./models/property-type.ts) Type of the property. -##### line_2: \`string\` +##### line_2: \`string\` -##### country: \`string\` +##### country: \`string\` -##### rooms: \`number\` +##### rooms: \`number\` Number of rooms in the property. -##### area: \`number\` +##### area: \`number\` Total area of the property in square feet. -##### garage: \`boolean\` +##### garage: \`boolean\` Indicates whether the property has a garage or not. -##### stories: \`number\` +##### stories: \`number\` Number of stories or floors in the property. -##### floor: \`number\` +##### floor: \`number\` Floor number of the property. -##### attic: \`boolean\` +##### attic: \`boolean\` Indicates whether the property has an attic or not. -##### basement: \`boolean\` +##### basement: \`boolean\` Indicates whether the property has a basement or not. -#### 🔄 Return +#### 🔄 Return [LocationResponse](./models/location-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/locations\` \`POST\` @@ -421,29 +421,29 @@ Indicates whether the property has a basement or not. --- -### \`bellhop.orders.create\` +### \`bellhop.orders.create\` Creates an order from a quote -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await bellhop.orders.create({ - quoteId: \\"quoteId_example\\", + quoteId: "quoteId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### quoteId: \`string\` +##### quoteId: \`string\` Quote ID to generate order from -#### 🔄 Return +#### 🔄 Return [OrderResponseV2](./models/order-response-v2.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/orders/{quote_id}\` \`POST\` @@ -452,29 +452,29 @@ Quote ID to generate order from --- -### \`bellhop.postalCodes.getServiceability\` +### \`bellhop.postalCodes.getServiceability\` Get Postal Codes Serviceability -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getServiceabilityResponse = await bellhop.postalCodes.getServiceability({ - originPostalCode: \\"originPostalCode_example\\", + originPostalCode: "originPostalCode_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### originPostalCode: \`string\` +##### originPostalCode: \`string\` -##### destinationPostalCode: \`string\` +##### destinationPostalCode: \`string\` -#### 🔄 Return +#### 🔄 Return [PostalCodesServiceabilityResponse](./models/postal-codes-serviceability-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/postal-codes/serviceability\` \`GET\` @@ -483,7 +483,7 @@ const getServiceabilityResponse = await bellhop.postalCodes.getServiceability({ --- -### \`bellhop.quoteServiceGroups.changeLocations\` +### \`bellhop.quoteServiceGroups.changeLocations\` Overwrite the locations on a service group @@ -491,32 +491,32 @@ The locations included in the request are overwritten as the locations on the service group maintaining the sequence in the request. This action triggers a re-estimation of the service group using the new locations. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const changeLocationsResponse = await bellhop.quoteServiceGroups.changeLocations({ - serviceGroupId: \\"service_group_id_example\\", + serviceGroupId: "service_group_id_example", requestBody: [ - \\"a627084cd72247bf9217363f8772aa5f\\", - \\"12fb179d05294c3e8f433c315966a515\\", + "a627084cd72247bf9217363f8772aa5f", + "12fb179d05294c3e8f433c315966a515", ], }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the service group -##### requestBody: \`string\`[] +##### requestBody: \`string\`[] -#### 🔄 Return +#### 🔄 Return [ServiceGroupResponse](./models/service-group-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/service_groups/{service_group_id}/locations\` \`PUT\` @@ -525,7 +525,7 @@ UUID of the service group --- -### \`bellhop.quoteServiceGroups.create\` +### \`bellhop.quoteServiceGroups.create\` Creates a new service group @@ -536,43 +536,43 @@ locations, and start date time. The workers, duration, and end date time will be estimated based on the locations and inventory attached to the quote. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await bellhop.quoteServiceGroups.create({ - quoteId: \\"quoteId_example\\", - service_codes: [\\"LOADINGUNLOADING\\"], + quoteId: "quoteId_example", + service_codes: ["LOADINGUNLOADING"], locations: [ - \\"a4cef656c2a04ca4aa6d19cee4eb9b7e\\", - \\"b4cef656c2a04ca4aa6d19cee4eb9b7e\\", + "a4cef656c2a04ca4aa6d19cee4eb9b7e", + "b4cef656c2a04ca4aa6d19cee4eb9b7e", ], - start_datetime: \\"2021-01-01T12:00:00\\", + start_datetime: "2021-01-01T12:00:00", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### service_codes: [\`ServiceType\`](./models/service-type.ts)[] +##### service_codes: [\`ServiceType\`](./models/service-type.ts)[] List of service codes -##### locations: \`string\`[] +##### locations: \`string\`[] List of location ids -##### start_datetime: \`string\` +##### start_datetime: \`string\` Start datetime of service group -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the quote -#### 🔄 Return +#### 🔄 Return [ServiceGroupResponse](./models/service-group-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service-groups\` \`POST\` @@ -581,7 +581,7 @@ UUID of the quote --- -### \`bellhop.quoteServiceGroups.createFlexible\` +### \`bellhop.quoteServiceGroups.createFlexible\` Creates an array of flexible service groups from a service group @@ -589,45 +589,45 @@ Generate an array of flexible service groups. The services and locations will be copied from the source service group. One flexible service group will be created for each day and hour combination in the input. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createFlexibleResponse = await bellhop.quoteServiceGroups.createFlexible({ - quoteId: \\"quoteId_example\\", - serviceGroupId: \\"serviceGroupId_example\\", - start_date: \\"1970-01-01\\", - end_date: \\"1970-01-01\\", + quoteId: "quoteId_example", + serviceGroupId: "serviceGroupId_example", + start_date: "1970-01-01", + end_date: "1970-01-01", local_hours: [8, 9, 10, 11, 12], }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### start_date: \`string\` +##### start_date: \`string\` Date of earliest flexible service quote to generate -##### end_date: \`string\` +##### end_date: \`string\` Date of latest flexible service quote to generate -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the source quote -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the Service Group to use as a template for the flexible service groups -##### local_hours: \`number\`[] +##### local_hours: \`number\`[] List of hours in local time to generate quotes for: [8, 9, 10, 11, 12] -#### 🔄 Return +#### 🔄 Return [FlexibleQuoteResponse](./models/flexible-quote-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service_groups/{service_group_id}/flexible\` \`POST\` @@ -636,30 +636,30 @@ List of hours in local time to generate quotes for: [8, 9, 10, 11, 12] --- -### \`bellhop.quoteServiceGroups.delete\` +### \`bellhop.quoteServiceGroups.delete\` Delete a service group by quote ID and service group ID -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await bellhop.quoteServiceGroups.delete({ - quoteId: \\"quoteId_example\\", - serviceGroupId: \\"serviceGroupId_example\\", + quoteId: "quoteId_example", + serviceGroupId: "serviceGroupId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the quote -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the service group to be deleted -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service-group/{service_group_id}\` \`DELETE\` @@ -668,34 +668,34 @@ UUID of the service group to be deleted --- -### \`bellhop.quoteServiceGroups.get\` +### \`bellhop.quoteServiceGroups.get\` Fetch a service group by quote ID and service group ID -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await bellhop.quoteServiceGroups.get({ - quoteId: \\"quoteId_example\\", - serviceGroupId: \\"serviceGroupId_example\\", + quoteId: "quoteId_example", + serviceGroupId: "serviceGroupId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the quote -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the service group -#### 🔄 Return +#### 🔄 Return [ServiceGroupResponse](./models/service-group-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service-group/{service_group_id}\` \`GET\` @@ -704,39 +704,39 @@ UUID of the service group --- -### \`bellhop.quoteServiceGroups.replace\` +### \`bellhop.quoteServiceGroups.replace\` Replaces a service group with a flexible service group Replaces the existing service group with the selected flexible service group. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const replaceResponse = await bellhop.quoteServiceGroups.replace({ - quoteId: \\"quoteId_example\\", - serviceGroupId: \\"serviceGroupId_example\\", - flexible_quote_id: \\"flexible_quote_id_example\\", + quoteId: "quoteId_example", + serviceGroupId: "serviceGroupId_example", + flexible_quote_id: "flexible_quote_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### flexible_quote_id: \`string\` +##### flexible_quote_id: \`string\` -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the quote -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the service group -#### 🔄 Return +#### 🔄 Return [ServiceGroupResponse](./models/service-group-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service-groups/{service_group_id}\` \`PATCH\` @@ -745,7 +745,7 @@ UUID of the service group --- -### \`bellhop.quoteServiceGroups.update\` +### \`bellhop.quoteServiceGroups.update\` Update the service configuration on a service group @@ -756,44 +756,44 @@ Only the included service codes will be retained on the service group. Any excluded services will be removed. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await bellhop.quoteServiceGroups.update({ - quoteId: \\"quoteId_example\\", - serviceGroupId: \\"serviceGroupId_example\\", + quoteId: "quoteId_example", + serviceGroupId: "serviceGroupId_example", service_workers: [ { - service_code: \\"string_example\\", + service_code: "string_example", workers: 1, }, ], }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### service_workers: [\`ServiceWorkers\`](./models/service-workers.ts)[] +##### service_workers: [\`ServiceWorkers\`](./models/service-workers.ts)[] Mapping of service code and number of workers. Only the included service codes will be retained on the service group. Any excluded services will be removed. -##### quoteId: \`string\` +##### quoteId: \`string\` UUID of the quote -##### serviceGroupId: \`string\` +##### serviceGroupId: \`string\` UUID of the service group -##### duration: \`number\` +##### duration: \`number\` Duration for all services in group -#### 🔄 Return +#### 🔄 Return [ServiceGroupResponse](./models/service-group-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes/{quote_id}/service-groups/{service_group_id}/services\` \`PUT\` @@ -802,7 +802,7 @@ Duration for all services in group --- -### \`bellhop.quotes.create\` +### \`bellhop.quotes.create\` Creates a quote @@ -811,53 +811,53 @@ The LOCALFULLSERVICE service code will generate a service group with LOADINGUNLOADING and TRANSIT services. All other service codes generate service groups with a single service. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await bellhop.quotes.create({ customer: { - first_name: \\"first_name_example\\", - last_name: \\"last_name_example\\", - phone: \\"phone_example\\", - email: \\"email_example\\", + first_name: "first_name_example", + last_name: "last_name_example", + phone: "phone_example", + email: "email_example", }, - start_datetime: \\"2024-01-22T17:33:27.541275\\", - service_code: \\"LOCALFULLSERVICE\\", + start_datetime: "2024-01-22T17:33:27.541275", + service_code: "LOCALFULLSERVICE", locations: { key: { - line_1: \\"line_1_example\\", - city: \\"city_example\\", - state: \\"state_example\\", - postal_code: \\"postal_code_example\\", - country: \\"US\\", + line_1: "line_1_example", + city: "city_example", + state: "state_example", + postal_code: "postal_code_example", + country: "US", }, }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### customer: [\`CreateCustomerAccountRequest\`](./models/create-customer-account-request.ts) +##### customer: [\`CreateCustomerAccountRequest\`](./models/create-customer-account-request.ts) Customer information -##### start_datetime: \`string\` +##### start_datetime: \`string\` Start date and time of the quote -##### service_code: \`string\` +##### service_code: \`string\` Services to be quoted -##### locations: Record +##### locations: Record Mapping locations and their sequence -#### 🔄 Return +#### 🔄 Return [QuoteResponse](./models/quote-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/quotes\` \`POST\` @@ -866,7 +866,7 @@ Mapping locations and their sequence --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-carbon.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-carbon.test.ts.snap index cb8de9c4f7..cf52e72165 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-carbon.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-carbon.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-carbon 1`] = ` -"
+"
[![Visit Carbon](./header.png)](https://carbon.ai) -# [Carbon](https://carbon.ai) +# [Carbon](https://carbon.ai) Connect external data to LLMs, no matter the source. @@ -13,7 +13,7 @@ Connect external data to LLMs, no matter the source.
-## Table of Contents +## Table of Contents @@ -67,13 +67,13 @@ Connect external data to LLMs, no matter the source. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -100,16 +100,16 @@ yarn add carbon-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -import { Carbon } from \\"carbon-typescript-sdk\\"; +import { Carbon } from "carbon-typescript-sdk"; // Generally this is done in the backend to avoid exposing API key to the client const carbonWithApiKey = new Carbon({ - apiKey: \\"API_KEY\\", - customerId: \\"CUSTOMER_ID\\", + apiKey: "API_KEY", + customerId: "CUSTOMER_ID", }); const accessToken = await carbonWithApiKey.auth.getAccessToken(); @@ -126,24 +126,24 @@ const whiteLabeling = await carbon.auth.getWhiteLabeling(); // etc. \`\`\` -## Reference +## Reference -### \`carbon.auth.getAccessToken\` +### \`carbon.auth.getAccessToken\` Get Access Token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getAccessTokenResponse = await carbon.auth.getAccessToken(); \`\`\` -#### 🔄 Return +#### 🔄 Return [TokenResponse](./models/token-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/auth/v1/access_token\` \`GET\` @@ -152,7 +152,7 @@ const getAccessTokenResponse = await carbon.auth.getAccessToken(); --- -### \`carbon.auth.getWhiteLabeling\` +### \`carbon.auth.getWhiteLabeling\` Returns whether or not the organization is white labeled and which integrations are white labeled @@ -160,17 +160,17 @@ Returns whether or not the organization is white labeled and which integrations :param db: the database session :return: a WhiteLabelingResponse -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getWhiteLabelingResponse = await carbon.auth.getWhiteLabeling(); \`\`\` -#### 🔄 Return +#### 🔄 Return [WhiteLabelingResponse](./models/white-labeling-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/auth/v1/white_labeling\` \`GET\` @@ -179,32 +179,32 @@ const getWhiteLabelingResponse = await carbon.auth.getWhiteLabeling(); --- -### \`carbon.dataSources.queryUserDataSources\` +### \`carbon.dataSources.queryUserDataSources\` User Data Sources -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const queryUserDataSourcesResponse = await carbon.dataSources.queryUserDataSources({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -##### order_by: [\`OrganizationUserDataSourceOrderByColumns\`](./models/organization-user-data-source-order-by-columns.ts) +##### order_by: [\`OrganizationUserDataSourceOrderByColumns\`](./models/organization-user-data-source-order-by-columns.ts) -##### order_dir: [\`OrderDir\`](./models/order-dir.ts) +##### order_dir: [\`OrderDir\`](./models/order-dir.ts) -##### filters: [\`OrganizationUserDataSourceFilters\`](./models/organization-user-data-source-filters.ts) +##### filters: [\`OrganizationUserDataSourceFilters\`](./models/organization-user-data-source-filters.ts) -#### 🔄 Return +#### 🔄 Return [OrganizationUserDataSourceResponse](./models/organization-user-data-source-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_data_sources\` \`POST\` @@ -213,11 +213,11 @@ const queryUserDataSourcesResponse = --- -### \`carbon.dataSources.revokeAccessToken\` +### \`carbon.dataSources.revokeAccessToken\` Revoke Access Token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const revokeAccessTokenResponse = await carbon.dataSources.revokeAccessToken({ @@ -225,15 +225,15 @@ const revokeAccessTokenResponse = await carbon.dataSources.revokeAccessToken({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/revoke_access_token\` \`POST\` @@ -242,40 +242,40 @@ const revokeAccessTokenResponse = await carbon.dataSources.revokeAccessToken({ --- -### \`carbon.embeddings.getDocuments\` +### \`carbon.embeddings.getDocuments\` For pre-filtering documents, using \`tags_v2\` is preferred to using \`tags\` (which is now deprecated). If both \`tags_v2\` and \`tags\` are specified, \`tags\` is ignored. \`tags_v2\` enables -building complex filters through the use of \\"AND\\", \\"OR\\", and negation logic. Take the below input as an example: +building complex filters through the use of "AND", "OR", and negation logic. Take the below input as an example: \`\`\`json { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"holy-bible\\", - \\"negate\\": false + "key": "subject", + "value": "holy-bible", + "negate": false }, { - \\"key\\": \\"person-of-interest\\", - \\"value\\": \\"jesus christ\\", - \\"negate\\": false + "key": "person-of-interest", + "value": "jesus christ", + "negate": false }, { - \\"key\\": \\"genre\\", - \\"value\\": \\"religion\\", - \\"negate\\": true + "key": "genre", + "value": "religion", + "negate": true } { - \\"AND\\": [ + "AND": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"tao-te-ching\\", - \\"negate\\": false + "key": "subject", + "value": "tao-te-ching", + "negate": false }, { - \\"key\\": \\"author\\", - \\"value\\": \\"lao-tzu\\", - \\"negate\\": false + "key": "author", + "value": "lao-tzu", + "negate": false } ] } @@ -283,29 +283,29 @@ building complex filters through the use of \\"AND\\", \\"OR\\", and negation lo } \`\`\` In this case, files will be filtered such that: -1. \\"subject\\" = \\"holy-bible\\" OR -2. \\"person-of-interest\\" = \\"jesus christ\\" OR -3. \\"genre\\" != \\"religion\\" OR -4. \\"subject\\" = \\"tao-te-ching\\" AND \\"author\\" = \\"lao-tzu\\" - -Note that the top level of the query must be either an \\"OR\\" or \\"AND\\" array. Currently, nesting is limited to 3. -For tag blocks (those with \\"key\\", \\"value\\", and \\"negate\\" keys), the following typing rules apply: -1. \\"key\\" isn't optional and must be a \`string\` -2. \\"value\\" isn't optional and can be \`any\` or list[\`any\`] -3. \\"negate\\" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in +1. "subject" = "holy-bible" OR +2. "person-of-interest" = "jesus christ" OR +3. "genre" != "religion" OR +4. "subject" = "tao-te-ching" AND "author" = "lao-tzu" + +Note that the top level of the query must be either an "OR" or "AND" array. Currently, nesting is limited to 3. +For tag blocks (those with "key", "value", and "negate" keys), the following typing rules apply: +1. "key" isn't optional and must be a \`string\` +2. "value" isn't optional and can be \`any\` or list[\`any\`] +3. "negate" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in the resulting query. It is \`false\` by default. When querying embeddings, you can optionally specify the \`media_type\` parameter in your request. By default (if -not set), it is equal to \\"TEXT\\". This means that the query will be performed over files that have -been parsed as text (for now, this covers all files except image files). If it is equal to \\"IMAGE\\", +not set), it is equal to "TEXT". This means that the query will be performed over files that have +been parsed as text (for now, this covers all files except image files). If it is equal to "IMAGE", the query will be performed over image files (for now, \`.jpg\` and \`.png\` files). You can think of this field as an additional filter on top of any filters set in \`file_ids\` and When \`hybrid_search\` is set to true, a combination of keyword search and semantic search are used to rank and select candidate embeddings during information retrieval. By default, these search methods are weighted -equally during the ranking process. To adjust the weight (or \\"importance\\") of each search method, you can use +equally during the ranking process. To adjust the weight (or "importance") of each search method, you can use the \`hybrid_search_tuning_parameters\` property. The description for the different tuning parameters are: - \`weight_a\`: weight to assign to semantic search - \`weight_b\`: weight to assign to keyword search @@ -318,9 +318,9 @@ In order to use hybrid search for a customer across a set of documents, two flag body for this request is below: \`\`\` { - \\"configuration_key_name\\": \\"sparse_vectors\\", - \\"value\\": { - \\"enabled\\": true + "configuration_key_name": "sparse_vectors", + "value": { + "enabled": true } } \`\`\` @@ -339,74 +339,74 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getDocumentsResponse = await carbon.embeddings.getDocuments({ - query: \\"query_example\\", + query: "query_example", k: 1, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`string\` +##### query: \`string\` Query for which to get related chunks and embeddings. -##### k: \`number\` +##### k: \`number\` Number of related chunks to return. -##### tags: Record +##### tags: Record A set of tags to limit the search to. Deprecated and may be removed in the future. -##### query_vector: \`number\`[] +##### query_vector: \`number\`[] Optional query vector for which to get related chunks and embeddings. It must have been generated by the same model used to generate the embeddings across which the search is being conducted. Cannot provide both \`query\` and \`query_vector\`. -##### file_ids: \`number\`[] +##### file_ids: \`number\`[] Optional list of file IDs to limit the search to -##### parent_file_ids: \`number\`[] +##### parent_file_ids: \`number\`[] Optional list of parent file IDs to limit the search to. A parent file describes a file to which another file belongs (e.g. a folder) -##### tags_v2: \`object\` +##### tags_v2: \`object\` A set of tags to limit the search to. Use this instead of \`tags\`, which is deprecated. -##### include_tags: \`boolean\` +##### include_tags: \`boolean\` Flag to control whether or not to include tags for each chunk in the response. -##### include_vectors: \`boolean\` +##### include_vectors: \`boolean\` Flag to control whether or not to include embedding vectors in the response. -##### include_raw_file: \`boolean\` +##### include_raw_file: \`boolean\` Flag to control whether or not to include a signed URL to the raw file containing each chunk in the response. -##### hybrid_search: \`boolean\` +##### hybrid_search: \`boolean\` Flag to control whether or not to perform hybrid search. -##### hybrid_search_tuning_parameters: [\`HybridSearchTuningParamsNullable\`](./models/hybrid-search-tuning-params-nullable.ts) +##### hybrid_search_tuning_parameters: [\`HybridSearchTuningParamsNullable\`](./models/hybrid-search-tuning-params-nullable.ts) -##### media_type: [\`FileContentTypesNullable\`](./models/file-content-types-nullable.ts) +##### media_type: [\`FileContentTypesNullable\`](./models/file-content-types-nullable.ts) Used to filter the kind of files (e.g. \`TEXT\` or \`IMAGE\`) over which to perform the search. Also plays a role in determining what embedding model is used to embed the query. If \`IMAGE\` is chosen as the media type, then the embedding model used will be an embedding model that is not text-only, *regardless* of what value is passed for \`embedding_model\`. -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -#### 🔄 Return +#### 🔄 Return [DocumentResponseList](./models/document-response-list.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/embeddings\` \`POST\` @@ -415,11 +415,11 @@ Used to filter the kind of files (e.g. \`TEXT\` or \`IMAGE\`) over which to perf --- -### \`carbon.embeddings.getEmbeddingsAndChunks\` +### \`carbon.embeddings.getEmbeddingsAndChunks\` Retrieve Embeddings And Content -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getEmbeddingsAndChunksResponse = @@ -431,23 +431,23 @@ const getEmbeddingsAndChunksResponse = }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: [\`EmbeddingsAndChunksFilters\`](./models/embeddings-and-chunks-filters.ts) +##### filters: [\`EmbeddingsAndChunksFilters\`](./models/embeddings-and-chunks-filters.ts) -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -##### order_by: [\`EmbeddingsAndChunksOrderByColumns\`](./models/embeddings-and-chunks-order-by-columns.ts) +##### order_by: [\`EmbeddingsAndChunksOrderByColumns\`](./models/embeddings-and-chunks-order-by-columns.ts) -##### order_dir: [\`OrderDir\`](./models/order-dir.ts) +##### order_dir: [\`OrderDir\`](./models/order-dir.ts) -##### include_vectors: \`boolean\` +##### include_vectors: \`boolean\` -#### 🔄 Return +#### 🔄 Return [EmbeddingsAndChunksResponse](./models/embeddings-and-chunks-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/text_chunks\` \`POST\` @@ -456,23 +456,23 @@ const getEmbeddingsAndChunksResponse = --- -### \`carbon.embeddings.uploadChunksAndEmbeddings\` +### \`carbon.embeddings.uploadChunksAndEmbeddings\` Upload Chunks And Embeddings -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadChunksAndEmbeddingsResponse = await carbon.embeddings.uploadChunksAndEmbeddings({ - embedding_model: \\"string_example\\", + embedding_model: "string_example", chunks_and_embeddings: [ { file_id: 1, chunks_and_embeddings: [ { chunk_number: 1, - chunk: \\"chunk_example\\", + chunk: "chunk_example", embedding: [3.14], }, ], @@ -482,19 +482,19 @@ const uploadChunksAndEmbeddingsResponse = }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### chunks_and_embeddings: [\`SingleChunksAndEmbeddingsUploadInput\`](./models/single-chunks-and-embeddings-upload-input.ts)[] +##### chunks_and_embeddings: [\`SingleChunksAndEmbeddingsUploadInput\`](./models/single-chunks-and-embeddings-upload-input.ts)[] -##### overwrite_existing: \`boolean\` +##### overwrite_existing: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_chunks_and_embeddings\` \`POST\` @@ -503,7 +503,7 @@ const uploadChunksAndEmbeddingsResponse = --- -### \`carbon.files.createUserFileTags\` +### \`carbon.files.createUserFileTags\` A tag is a key-value pair that can be added to a file. This pair can then be used for searches (e.g. embedding searches) in order to narrow down the scope of the search. @@ -515,30 +515,30 @@ A file can have any number of tags. The following are reserved keys that cannot Carbon currently supports two data types for tag values - \`string\` and \`list\`. Keys can only be \`string\`. If values other than \`string\` and \`list\` are used, -they're automatically converted to strings (e.g. 4 will become \\"4\\"). +they're automatically converted to strings (e.g. 4 will become "4"). -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createUserFileTagsResponse = await carbon.files.createUserFileTags({ tags: { - key: \\"string_example\\", + key: "string_example", }, organization_user_file_id: 1, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tags: Record +##### tags: Record -##### organization_user_file_id: \`number\` +##### organization_user_file_id: \`number\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/create_user_file_tags\` \`POST\` @@ -547,11 +547,11 @@ const createUserFileTagsResponse = await carbon.files.createUserFileTags({ --- -### \`carbon.files.delete\` +### \`carbon.files.delete\` Delete File Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await carbon.files.delete({ @@ -559,15 +559,15 @@ const deleteResponse = await carbon.files.delete({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### fileId: \`number\` +##### fileId: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/deletefile/{file_id}\` \`DELETE\` @@ -576,30 +576,30 @@ const deleteResponse = await carbon.files.delete({ --- -### \`carbon.files.deleteFileTags\` +### \`carbon.files.deleteFileTags\` Delete File Tags -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteFileTagsResponse = await carbon.files.deleteFileTags({ - tags: [\\"tags_example\\"], + tags: ["tags_example"], organization_user_file_id: 1, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tags: \`string\`[] +##### tags: \`string\`[] -##### organization_user_file_id: \`number\` +##### organization_user_file_id: \`number\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_user_file_tags\` \`POST\` @@ -608,11 +608,11 @@ const deleteFileTagsResponse = await carbon.files.deleteFileTags({ --- -### \`carbon.files.deleteMany\` +### \`carbon.files.deleteMany\` Delete Files Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteManyResponse = await carbon.files.deleteMany({ @@ -620,19 +620,19 @@ const deleteManyResponse = await carbon.files.deleteMany({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_ids: \`number\`[] +##### file_ids: \`number\`[] -##### sync_statuses: [\`ExternalFileSyncStatuses\`](./models/external-file-sync-statuses.ts)[] +##### sync_statuses: [\`ExternalFileSyncStatuses\`](./models/external-file-sync-statuses.ts)[] -##### delete_non_synced_only: \`boolean\` +##### delete_non_synced_only: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_files\` \`POST\` @@ -641,11 +641,11 @@ const deleteManyResponse = await carbon.files.deleteMany({ --- -### \`carbon.files.getParsedFile\` +### \`carbon.files.getParsedFile\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getParsedFileResponse = await carbon.files.getParsedFile({ @@ -653,15 +653,15 @@ const getParsedFileResponse = await carbon.files.getParsedFile({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### fileId: \`number\` +##### fileId: \`number\` -#### 🔄 Return +#### 🔄 Return [PresignedURLResponse](./models/presigned-urlresponse.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/parsed_file/{file_id}\` \`GET\` @@ -670,11 +670,11 @@ const getParsedFileResponse = await carbon.files.getParsedFile({ --- -### \`carbon.files.getRawFile\` +### \`carbon.files.getRawFile\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getRawFileResponse = await carbon.files.getRawFile({ @@ -682,15 +682,15 @@ const getRawFileResponse = await carbon.files.getRawFile({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### fileId: \`number\` +##### fileId: \`number\` -#### 🔄 Return +#### 🔄 Return [PresignedURLResponse](./models/presigned-urlresponse.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/raw_file/{file_id}\` \`GET\` @@ -699,40 +699,40 @@ const getRawFileResponse = await carbon.files.getRawFile({ --- -### \`carbon.files.queryUserFiles\` +### \`carbon.files.queryUserFiles\` For pre-filtering documents, using \`tags_v2\` is preferred to using \`tags\` (which is now deprecated). If both \`tags_v2\` and \`tags\` are specified, \`tags\` is ignored. \`tags_v2\` enables -building complex filters through the use of \\"AND\\", \\"OR\\", and negation logic. Take the below input as an example: +building complex filters through the use of "AND", "OR", and negation logic. Take the below input as an example: \`\`\`json { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"holy-bible\\", - \\"negate\\": false + "key": "subject", + "value": "holy-bible", + "negate": false }, { - \\"key\\": \\"person-of-interest\\", - \\"value\\": \\"jesus christ\\", - \\"negate\\": false + "key": "person-of-interest", + "value": "jesus christ", + "negate": false }, { - \\"key\\": \\"genre\\", - \\"value\\": \\"religion\\", - \\"negate\\": true + "key": "genre", + "value": "religion", + "negate": true } { - \\"AND\\": [ + "AND": [ { - \\"key\\": \\"subject\\", - \\"value\\": \\"tao-te-ching\\", - \\"negate\\": false + "key": "subject", + "value": "tao-te-ching", + "negate": false }, { - \\"key\\": \\"author\\", - \\"value\\": \\"lao-tzu\\", - \\"negate\\": false + "key": "author", + "value": "lao-tzu", + "negate": false } ] } @@ -740,45 +740,45 @@ building complex filters through the use of \\"AND\\", \\"OR\\", and negation lo } \`\`\` In this case, files will be filtered such that: -1. \\"subject\\" = \\"holy-bible\\" OR -2. \\"person-of-interest\\" = \\"jesus christ\\" OR -3. \\"genre\\" != \\"religion\\" OR -4. \\"subject\\" = \\"tao-te-ching\\" AND \\"author\\" = \\"lao-tzu\\" - -Note that the top level of the query must be either an \\"OR\\" or \\"AND\\" array. Currently, nesting is limited to 3. -For tag blocks (those with \\"key\\", \\"value\\", and \\"negate\\" keys), the following typing rules apply: -1. \\"key\\" isn't optional and must be a \`string\` -2. \\"value\\" isn't optional and can be \`any\` or list[\`any\`] -3. \\"negate\\" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in +1. "subject" = "holy-bible" OR +2. "person-of-interest" = "jesus christ" OR +3. "genre" != "religion" OR +4. "subject" = "tao-te-ching" AND "author" = "lao-tzu" + +Note that the top level of the query must be either an "OR" or "AND" array. Currently, nesting is limited to 3. +For tag blocks (those with "key", "value", and "negate" keys), the following typing rules apply: +1. "key" isn't optional and must be a \`string\` +2. "value" isn't optional and can be \`any\` or list[\`any\`] +3. "negate" is optional and must be \`true\` or \`false\`. If present and \`true\`, then the filter block is negated in the resulting query. It is \`false\` by default. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const queryUserFilesResponse = await carbon.files.queryUserFiles({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./models/organization-user-files-to-sync-order-by-types.ts) +##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./models/organization-user-files-to-sync-order-by-types.ts) -##### order_dir: [\`OrderDir\`](./models/order-dir.ts) +##### order_dir: [\`OrderDir\`](./models/order-dir.ts) -##### filters: [\`OrganizationUserFilesToSyncFilters\`](./models/organization-user-files-to-sync-filters.ts) +##### filters: [\`OrganizationUserFilesToSyncFilters\`](./models/organization-user-files-to-sync-filters.ts) -##### include_raw_file: \`boolean\` +##### include_raw_file: \`boolean\` -##### include_parsed_text_file: \`boolean\` +##### include_parsed_text_file: \`boolean\` -##### include_additional_files: \`boolean\` +##### include_additional_files: \`boolean\` -#### 🔄 Return +#### 🔄 Return [UserFilesV2](./models/user-files-v2.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_files_v2\` \`POST\` @@ -787,38 +787,38 @@ const queryUserFilesResponse = await carbon.files.queryUserFiles({}); --- -### \`carbon.files.queryUserFilesDeprecated\` +### \`carbon.files.queryUserFilesDeprecated\` This route is deprecated. Use \`/user_files_v2\` instead. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const queryUserFilesDeprecatedResponse = await carbon.files.queryUserFilesDeprecated({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./models/organization-user-files-to-sync-order-by-types.ts) +##### order_by: [\`OrganizationUserFilesToSyncOrderByTypes\`](./models/organization-user-files-to-sync-order-by-types.ts) -##### order_dir: [\`OrderDir\`](./models/order-dir.ts) +##### order_dir: [\`OrderDir\`](./models/order-dir.ts) -##### filters: [\`OrganizationUserFilesToSyncFilters\`](./models/organization-user-files-to-sync-filters.ts) +##### filters: [\`OrganizationUserFilesToSyncFilters\`](./models/organization-user-files-to-sync-filters.ts) -##### include_raw_file: \`boolean\` +##### include_raw_file: \`boolean\` -##### include_parsed_text_file: \`boolean\` +##### include_parsed_text_file: \`boolean\` -##### include_additional_files: \`boolean\` +##### include_additional_files: \`boolean\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user_files\` \`POST\` @@ -827,11 +827,11 @@ const queryUserFilesDeprecatedResponse = --- -### \`carbon.files.resync\` +### \`carbon.files.resync\` Resync File -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const resyncResponse = await carbon.files.resync({ @@ -839,19 +839,19 @@ const resyncResponse = await carbon.files.resync({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file_id: \`number\` +##### file_id: \`number\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/resync_file\` \`POST\` @@ -860,7 +860,7 @@ const resyncResponse = await carbon.files.resync({ --- -### \`carbon.files.upload\` +### \`carbon.files.upload\` This endpoint is used to directly upload local files to Carbon. The \`POST\` request should be a multipart form request. Note that the \`set_page_as_boundary\` query parameter is applicable only to PDFs for now. When this value is set, @@ -888,7 +888,7 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadResponse = await carbon.files.upload({ @@ -897,55 +897,55 @@ const uploadResponse = await carbon.files.upload({ useOcr: false, generateSparseVectors: false, prependFilenameToChunks: false, - file: fs.readFileSync(\\"/path/to/file\\"), + file: fs.readFileSync("/path/to/file"), }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file: \`Uint8Array | File | buffer.File\` +##### file: \`Uint8Array | File | buffer.File\` -##### chunkSize: \`number\` +##### chunkSize: \`number\` Chunk size in tiktoken tokens to be used when processing file. -##### chunkOverlap: \`number\` +##### chunkOverlap: \`number\` Chunk overlap in tiktoken tokens to be used when processing file. -##### skipEmbeddingGeneration: \`boolean\` +##### skipEmbeddingGeneration: \`boolean\` Flag to control whether or not embeddings should be generated and stored when processing file. -##### setPageAsBoundary: \`boolean\` +##### setPageAsBoundary: \`boolean\` -Flag to control whether or not to set the a page\\\\'s worth of content as the maximum amount of content that can appear in a chunk. Only valid for PDFs. See description route description for more information. +Flag to control whether or not to set the a page\\'s worth of content as the maximum amount of content that can appear in a chunk. Only valid for PDFs. See description route description for more information. -##### embeddingModel: [\`TextEmbeddingGenerators\`](./models/text-embedding-generators.ts) +##### embeddingModel: [\`TextEmbeddingGenerators\`](./models/text-embedding-generators.ts) Embedding model that will be used to embed file chunks. -##### useOcr: \`boolean\` +##### useOcr: \`boolean\` Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text. -##### generateSparseVectors: \`boolean\` +##### generateSparseVectors: \`boolean\` Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search. -##### prependFilenameToChunks: \`boolean\` +##### prependFilenameToChunks: \`boolean\` -Whether or not to prepend the file\\\\'s name to chunks. +Whether or not to prepend the file\\'s name to chunks. -##### maxItemsPerChunk: \`number\` +##### maxItemsPerChunk: \`number\` Number of objects per chunk. For json files only. -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/uploadfile\` \`POST\` @@ -954,15 +954,15 @@ Number of objects per chunk. For json files only. --- -### \`carbon.files.uploadFromUrl\` +### \`carbon.files.uploadFromUrl\` Create Upload File From Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadFromUrlResponse = await carbon.files.uploadFromUrl({ - url: \\"url_example\\", + url: "url_example", skip_embedding_generation: false, set_page_as_boundary: false, generate_sparse_vectors: false, @@ -971,35 +971,35 @@ const uploadFromUrlResponse = await carbon.files.uploadFromUrl({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -##### file_name: \`string\` +##### file_name: \`string\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### set_page_as_boundary: \`boolean\` +##### set_page_as_boundary: \`boolean\` -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### use_textract: \`boolean\` +##### use_textract: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### max_items_per_chunk: \`number\` +##### max_items_per_chunk: \`number\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_file_from_url\` \`POST\` @@ -1008,7 +1008,7 @@ const uploadFromUrlResponse = await carbon.files.uploadFromUrl({ --- -### \`carbon.files.uploadText\` +### \`carbon.files.uploadText\` Carbon supports multiple models for use in generating embeddings for files. For images, we support Vertex AI's multimodal model; for text, we support OpenAI's \`text-embedding-ada-002\` and Cohere's embed-multilingual-v3.0. @@ -1021,39 +1021,39 @@ specified as the \`embedding_model\` in \`/embeddings\`, then only files C and D the set of all files you want considered for a query have embeddings generated via the same model. For now, **do not** set \`VERTEX_MULTIMODAL\` as an \`embedding_model\`. This model is used automatically by Carbon when it detects an image file. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadTextResponse = await carbon.files.uploadText({ - contents: \\"contents_example\\", + contents: "contents_example", skip_embedding_generation: false, generate_sparse_vectors: false, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### contents: \`string\` +##### contents: \`string\` -##### name: \`string\` +##### name: \`string\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### overwrite_file_id: \`number\` +##### overwrite_file_id: \`number\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -#### 🔄 Return +#### 🔄 Return [UserFile](./models/user-file.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload_text\` \`POST\` @@ -1062,17 +1062,17 @@ const uploadTextResponse = await carbon.files.uploadText({ --- -### \`carbon.health.check\` +### \`carbon.health.check\` Health -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const checkResponse = await carbon.health.check(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/health\` \`GET\` @@ -1081,19 +1081,19 @@ const checkResponse = await carbon.health.check(); --- -### \`carbon.integrations.connectFreshdesk\` +### \`carbon.integrations.connectFreshdesk\` Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will -trigger an automatic sync of the articles in your \\"solutions\\" tab. Additional parameters below can be used to associate +trigger an automatic sync of the articles in your "solutions" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const connectFreshdeskResponse = await carbon.integrations.connectFreshdesk({ - domain: \\"domain_example\\", - api_key: \\"api_key_example\\", + domain: "domain_example", + api_key: "api_key_example", chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, @@ -1102,31 +1102,31 @@ const connectFreshdeskResponse = await carbon.integrations.connectFreshdesk({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### domain: \`string\` +##### domain: \`string\` -##### api_key: \`string\` +##### api_key: \`string\` -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/freshdesk\` \`POST\` @@ -1135,7 +1135,7 @@ const connectFreshdeskResponse = await carbon.integrations.connectFreshdesk({ --- -### \`carbon.integrations.createAwsIamUser\` +### \`carbon.integrations.createAwsIamUser\` Create a new IAM user with permissions to:
    @@ -1145,26 +1145,26 @@ the same permissions.
Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createAwsIamUserResponse = await carbon.integrations.createAwsIamUser({ - access_key: \\"access_key_example\\", - access_key_secret: \\"access_key_secret_example\\", + access_key: "access_key_example", + access_key_secret: "access_key_secret_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### access_key: \`string\` +##### access_key: \`string\` -##### access_key_secret: \`string\` +##### access_key_secret: \`string\` -#### 🔄 Return +#### 🔄 Return [OrganizationUserDataSourceAPI](./models/organization-user-data-source-api.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/s3\` \`POST\` @@ -1173,15 +1173,15 @@ const createAwsIamUserResponse = await carbon.integrations.createAwsIamUser({ --- -### \`carbon.integrations.getOauthUrl\` +### \`carbon.integrations.getOauthUrl\` Get Oauth Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getOauthUrlResponse = await carbon.integrations.getOauthUrl({ - service: \\"string_example\\", + service: "string_example", chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, @@ -1190,37 +1190,37 @@ const getOauthUrlResponse = await carbon.integrations.getOauthUrl({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### service: [\`DataSourceType\`](./models/data-source-type.ts) +##### service: [\`DataSourceType\`](./models/data-source-type.ts) -##### tags: +##### tags: -##### scope: \`string\` +##### scope: \`string\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -##### zendesk_subdomain: \`string\` +##### zendesk_subdomain: \`string\` -##### microsoft_tenant: \`string\` +##### microsoft_tenant: \`string\` -##### sharepoint_site_name: \`string\` +##### sharepoint_site_name: \`string\` -##### confluence_subdomain: \`string\` +##### confluence_subdomain: \`string\` -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### max_items_per_chunk: \`number\` +##### max_items_per_chunk: \`number\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/oauth_url\` \`POST\` @@ -1229,7 +1229,7 @@ const getOauthUrlResponse = await carbon.integrations.getOauthUrl({ --- -### \`carbon.integrations.listConfluencePages\` +### \`carbon.integrations.listConfluencePages\` To begin listing a user's Confluence pages, at least a \`data_source_id\` of a connected Confluence account must be specified. This base request returns a list of root pages for @@ -1239,7 +1239,7 @@ the user's page directory, additional requests to this endpoint can be made with convenience, the \`has_children\` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the \`parent_id\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listConfluencePagesResponse = @@ -1248,17 +1248,17 @@ const listConfluencePagesResponse = }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -##### parent_id: \`string\` +##### parent_id: \`string\` -#### 🔄 Return +#### 🔄 Return [ListResponse](./models/list-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/confluence/list\` \`POST\` @@ -1267,11 +1267,11 @@ const listConfluencePagesResponse = --- -### \`carbon.integrations.listDataSourceItems\` +### \`carbon.integrations.listDataSourceItems\` List Data Source Items -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDataSourceItemsResponse = @@ -1280,19 +1280,19 @@ const listDataSourceItemsResponse = }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -##### parent_id: \`string\` +##### parent_id: \`string\` -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -#### 🔄 Return +#### 🔄 Return [ListDataSourceItemsResponse](./models/list-data-source-items-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/items/list\` \`POST\` @@ -1301,19 +1301,19 @@ const listDataSourceItemsResponse = --- -### \`carbon.integrations.syncConfluence\` +### \`carbon.integrations.syncConfluence\` After listing pages in a user's Confluence account, the set of selected page \`ids\` and the connected account's \`data_source_id\` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncConfluenceResponse = await carbon.integrations.syncConfluence({ data_source_id: 1, - ids: [\\"ids_example\\"], + ids: ["ids_example"], chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, @@ -1322,33 +1322,33 @@ const syncConfluenceResponse = await carbon.integrations.syncConfluence({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -##### ids: \`string\`[] +##### ids: \`string\`[] -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### max_items_per_chunk: \`number\` +##### max_items_per_chunk: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/confluence/sync\` \`POST\` @@ -1357,11 +1357,11 @@ const syncConfluenceResponse = await carbon.integrations.syncConfluence({ --- -### \`carbon.integrations.syncDataSourceItems\` +### \`carbon.integrations.syncDataSourceItems\` Sync Data Source Items -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncDataSourceItemsResponse = @@ -1370,15 +1370,15 @@ const syncDataSourceItemsResponse = }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -#### 🔄 Return +#### 🔄 Return [OrganizationUserDataSourceAPI](./models/organization-user-data-source-api.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/items/sync\` \`POST\` @@ -1387,16 +1387,16 @@ const syncDataSourceItemsResponse = --- -### \`carbon.integrations.syncFiles\` +### \`carbon.integrations.syncFiles\` Sync Files -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncFilesResponse = await carbon.integrations.syncFiles({ data_source_id: 1, - ids: [\\"ids_example\\"], + ids: ["ids_example"], chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, @@ -1405,33 +1405,33 @@ const syncFilesResponse = await carbon.integrations.syncFiles({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### data_source_id: \`number\` +##### data_source_id: \`number\` -##### ids: \`string\`[] +##### ids: \`string\`[] -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) +##### embedding_model: [\`EmbeddingGeneratorsNullable\`](./models/embedding-generators-nullable.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### max_items_per_chunk: \`number\` +##### max_items_per_chunk: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/files/sync\` \`POST\` @@ -1440,13 +1440,13 @@ const syncFilesResponse = await carbon.integrations.syncFiles({ --- -### \`carbon.integrations.syncGmail\` +### \`carbon.integrations.syncGmail\` Once you have successfully connected your gmail account, you can choose which emails to sync with us using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. -label: Inbuilt Gmail labels, for example \\"Important\\" or a custom label you created. +label: Inbuilt Gmail labels, for example "Important" or a custom label you created. after or before: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. is: Can have the following values - starred, important, snoozed, and unread @@ -1456,32 +1456,32 @@ Using keys or values outside of the specified values can lead to unexpected beha An example of a basic query with filters can be \`\`\`json { - \\"filters\\": { - \\"key\\": \\"label\\", - \\"value\\": \\"Test\\" + "filters": { + "key": "label", + "value": "Test" } } \`\`\` -Which will list all emails that have the label \\"Test\\". +Which will list all emails that have the label "Test". You can use AND and OR operation in the following way: \`\`\`json { - \\"filters\\": { - \\"AND\\": [ + "filters": { + "AND": [ { - \\"key\\": \\"after\\", - \\"value\\": \\"2024/01/07\\" + "key": "after", + "value": "2024/01/07" }, { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"label\\", - \\"value\\": \\"Personal\\" + "key": "label", + "value": "Personal" }, { - \\"key\\": \\"is\\", - \\"value\\": \\"starred\\" + "key": "is", + "value": "starred" } ] } @@ -1489,11 +1489,11 @@ You can use AND and OR operation in the following way: } } \`\`\` -This will return emails after 7th of Jan that are either starred or have the label \\"Personal\\". +This will return emails after 7th of Jan that are either starred or have the label "Personal". Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncGmailResponse = await carbon.integrations.syncGmail({ @@ -1506,29 +1506,29 @@ const syncGmailResponse = await carbon.integrations.syncGmail({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: \`object\` +##### filters: \`object\` -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/gmail/sync\` \`POST\` @@ -1537,10 +1537,10 @@ const syncGmailResponse = await carbon.integrations.syncGmail({ --- -### \`carbon.integrations.syncOutlook\` +### \`carbon.integrations.syncOutlook\` Once you have successfully connected your Outlook account, you can choose which emails to sync with us -using the filters and folder parameter. \\"folder\\" should be the folder you want to sync from Outlook. By default +using the filters and folder parameter. "folder" should be the folder you want to sync from Outlook. By default we get messages from your inbox folder. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. @@ -1552,21 +1552,21 @@ For now, we support a limited set of keys listed below. An example of a basic query with filters can be \`\`\`json { - \\"filters\\": { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "filters": { + "key": "category", + "value": "Test" } } \`\`\` -Which will list all emails that have the category \\"Test\\". +Which will list all emails that have the category "Test". Specifying a custom folder in the same query \`\`\`json { - \\"folder\\": \\"Folder Name\\", - \\"filters\\": { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "folder": "Folder Name", + "filters": { + "key": "category", + "value": "Test" } } \`\`\` @@ -1574,21 +1574,21 @@ Specifying a custom folder in the same query You can use AND and OR operation in the following way: \`\`\`json { - \\"filters\\": { - \\"AND\\": [ + "filters": { + "AND": [ { - \\"key\\": \\"after\\", - \\"value\\": \\"2024/01/07\\" + "key": "after", + "value": "2024/01/07" }, { - \\"OR\\": [ + "OR": [ { - \\"key\\": \\"category\\", - \\"value\\": \\"Personal\\" + "key": "category", + "value": "Personal" }, { - \\"key\\": \\"category\\", - \\"value\\": \\"Test\\" + "key": "category", + "value": "Test" }, ] } @@ -1600,11 +1600,11 @@ This will return emails after 7th of Jan that have either Personal or Test as ca Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncOutlookResponse = await carbon.integrations.syncOutlook({ - folder: \\"Inbox\\", + folder: "Inbox", filters: {}, chunk_size: 1500, chunk_overlap: 20, @@ -1614,31 +1614,31 @@ const syncOutlookResponse = await carbon.integrations.syncOutlook({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### filters: \`object\` +##### filters: \`object\` -##### tags: \`object\` +##### tags: \`object\` -##### folder: \`string\` +##### folder: \`string\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/outlook/sync\` \`POST\` @@ -1647,15 +1647,15 @@ const syncOutlookResponse = await carbon.integrations.syncOutlook({ --- -### \`carbon.integrations.syncRssFeed\` +### \`carbon.integrations.syncRssFeed\` Rss Feed -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncRssFeedResponse = await carbon.integrations.syncRssFeed({ - url: \\"url_example\\", + url: "url_example", chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, @@ -1664,29 +1664,29 @@ const syncRssFeedResponse = await carbon.integrations.syncRssFeed({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/rss_feed\` \`POST\` @@ -1695,13 +1695,13 @@ const syncRssFeedResponse = await carbon.integrations.syncRssFeed({ --- -### \`carbon.integrations.syncS3Files\` +### \`carbon.integrations.syncS3Files\` After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name and object key as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const syncS3FilesResponse = await carbon.integrations.syncS3Files({ @@ -1714,31 +1714,31 @@ const syncS3FilesResponse = await carbon.integrations.syncS3Files({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### ids: [\`S3GetFileInput\`](./models/s3-get-file-input.ts)[] +##### ids: [\`S3GetFileInput\`](./models/s3-get-file-input.ts)[] -##### tags: \`object\` +##### tags: \`object\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) +##### embedding_model: [\`EmbeddingGenerators\`](./models/embedding-generators.ts) -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### max_items_per_chunk: \`number\` +##### max_items_per_chunk: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/integrations/s3/files\` \`POST\` @@ -1747,21 +1747,21 @@ const syncS3FilesResponse = await carbon.integrations.syncS3Files({ --- -### \`carbon.organizations.get\` +### \`carbon.organizations.get\` Get Organization -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await carbon.organizations.get(); \`\`\` -#### 🔄 Return +#### 🔄 Return [OrganizationResponse](./models/organization-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/organization\` \`GET\` @@ -1770,27 +1770,27 @@ const getResponse = await carbon.organizations.get(); --- -### \`carbon.users.get\` +### \`carbon.users.get\` User Endpoint -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await carbon.users.get({ - customer_id: \\"customer_id_example\\", + customer_id: "customer_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### customer_id: \`string\` +##### customer_id: \`string\` -#### 🔄 Return +#### 🔄 Return [UserResponse](./models/user-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/user\` \`POST\` @@ -1799,30 +1799,30 @@ const getResponse = await carbon.users.get({ --- -### \`carbon.users.toggleUserFeatures\` +### \`carbon.users.toggleUserFeatures\` Toggle User Features -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const toggleUserFeaturesResponse = await carbon.users.toggleUserFeatures({ - configuration_key_name: \\"configuration_key_name_example\\", + configuration_key_name: "configuration_key_name_example", value: {}, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### configuration_key_name: \`string\` +##### configuration_key_name: \`string\` -##### value: \`object\` +##### value: \`object\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/modify_user_configuration\` \`POST\` @@ -1831,7 +1831,7 @@ const toggleUserFeaturesResponse = await carbon.users.toggleUserFeatures({ --- -### \`carbon.utilities.fetchUrls\` +### \`carbon.utilities.fetchUrls\` Extracts all URLs from a webpage. @@ -1841,23 +1841,23 @@ Args: Returns: FetchURLsResponse: A response object with a list of URLs extracted from the webpage and the webpage content. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchUrlsResponse = await carbon.utilities.fetchUrls({ - url: \\"url_example\\", + url: "url_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -#### 🔄 Return +#### 🔄 Return [FetchURLsResponse](./models/fetch-urls-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/fetch_urls\` \`GET\` @@ -1866,7 +1866,7 @@ const fetchUrlsResponse = await carbon.utilities.fetchUrls({ --- -### \`carbon.utilities.fetchYoutubeTranscripts\` +### \`carbon.utilities.fetchYoutubeTranscripts\` Fetches english transcripts from YouTube videos. @@ -1877,27 +1877,27 @@ Args: Returns: dict: A dictionary with the transcript of the YouTube video. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchYoutubeTranscriptsResponse = await carbon.utilities.fetchYoutubeTranscripts({ - id: \\"id_example\\", + id: "id_example", raw: false, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -##### raw: \`boolean\` +##### raw: \`boolean\` -#### 🔄 Return +#### 🔄 Return [YoutubeTranscriptResponse](./models/youtube-transcript-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/fetch_youtube_transcript\` \`GET\` @@ -1906,7 +1906,7 @@ const fetchYoutubeTranscriptsResponse = --- -### \`carbon.utilities.processSitemap\` +### \`carbon.utilities.processSitemap\` Retrieves all URLs from a sitemap, which can subsequently be utilized with our \`web_scrape\` endpoint. @@ -1916,19 +1916,19 @@ Retrieves all URLs from a sitemap, which can subsequently be utilized with our \ Returns: dict: A dictionary with a list of URLs extracted from the sitemap.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const processSitemapResponse = await carbon.utilities.processSitemap({ - url: \\"url_example\\", + url: "url_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/process_sitemap\` \`GET\` @@ -1937,7 +1937,7 @@ const processSitemapResponse = await carbon.utilities.processSitemap({ --- -### \`carbon.utilities.scrapeSitemap\` +### \`carbon.utilities.scrapeSitemap\` Extracts all URLs from a sitemap and performs a web scrape on each of them. @@ -1947,11 +1947,11 @@ Args: Returns: dict: A response object with the status of the scraping job message.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const scrapeSitemapResponse = await carbon.utilities.scrapeSitemap({ - url: \\"url_example\\", + url: "url_example", max_pages_to_scrape: 100, chunk_size: 1500, chunk_overlap: 20, @@ -1965,33 +1965,33 @@ const scrapeSitemapResponse = await carbon.utilities.scrapeSitemap({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -##### tags: Record +##### tags: Record -##### max_pages_to_scrape: \`number\` +##### max_pages_to_scrape: \`number\` -##### chunk_size: \`number\` +##### chunk_size: \`number\` -##### chunk_overlap: \`number\` +##### chunk_overlap: \`number\` -##### skip_embedding_generation: \`boolean\` +##### skip_embedding_generation: \`boolean\` -##### enable_auto_sync: \`boolean\` +##### enable_auto_sync: \`boolean\` -##### generate_sparse_vectors: \`boolean\` +##### generate_sparse_vectors: \`boolean\` -##### prepend_filename_to_chunks: \`boolean\` +##### prepend_filename_to_chunks: \`boolean\` -##### html_tags_to_skip: \`string\`[] +##### html_tags_to_skip: \`string\`[] -##### css_classes_to_skip: \`string\`[] +##### css_classes_to_skip: \`string\`[] -##### css_selectors_to_skip: \`string\`[] +##### css_selectors_to_skip: \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/scrape_sitemap\` \`POST\` @@ -2000,7 +2000,7 @@ const scrapeSitemapResponse = await carbon.utilities.scrapeSitemap({ --- -### \`carbon.utilities.scrapeWeb\` +### \`carbon.utilities.scrapeWeb\` Conduct a web scrape on a given webpage URL. Our web scraper is fully compatible with JavaScript and supports recursion depth, enabling you to efficiently extract all content from the target website. @@ -2011,12 +2011,12 @@ Conduct a web scrape on a given webpage URL. Our web scraper is fully compatible Returns: dict: A response object with the status of the scraping job message.--> -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const scrapeWebResponse = await carbon.utilities.scrapeWeb([ { - url: \\"url_example\\", + url: "url_example", recursion_depth: 3, max_pages_to_scrape: 100, chunk_size: 1500, @@ -2032,11 +2032,11 @@ const scrapeWebResponse = await carbon.utilities.scrapeWeb([ ]); \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`WebscrapeRequest\`](./models/webscrape-request.ts)[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/web_scrape\` \`POST\` @@ -2045,7 +2045,7 @@ const scrapeWebResponse = await carbon.utilities.scrapeWeb([ --- -### \`carbon.utilities.searchUrls\` +### \`carbon.utilities.searchUrls\` Perform a web search and obtain a list of relevant URLs. @@ -2067,23 +2067,23 @@ Args: Returns: FetchURLsResponse: A response object with a list of URLs for a given search query. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const searchUrlsResponse = await carbon.utilities.searchUrls({ - query: \\"query_example\\", + query: "query_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`string\` +##### query: \`string\` -#### 🔄 Return +#### 🔄 Return [FetchURLsResponse](./models/fetch-urls-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/search_urls\` \`GET\` @@ -2092,27 +2092,27 @@ const searchUrlsResponse = await carbon.utilities.searchUrls({ --- -### \`carbon.webhooks.addUrl\` +### \`carbon.webhooks.addUrl\` Add Webhook Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const addUrlResponse = await carbon.webhooks.addUrl({ - url: \\"url_example\\", + url: "url_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### url: \`string\` +##### url: \`string\` -#### 🔄 Return +#### 🔄 Return [Webhook](./models/webhook.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/add_webhook\` \`POST\` @@ -2121,11 +2121,11 @@ const addUrlResponse = await carbon.webhooks.addUrl({ --- -### \`carbon.webhooks.deleteUrl\` +### \`carbon.webhooks.deleteUrl\` Delete Webhook Url -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteUrlResponse = await carbon.webhooks.deleteUrl({ @@ -2133,15 +2133,15 @@ const deleteUrlResponse = await carbon.webhooks.deleteUrl({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### webhookId: \`number\` +##### webhookId: \`number\` -#### 🔄 Return +#### 🔄 Return [GenericSuccessResponse](./models/generic-success-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/delete_webhook/{webhook_id}\` \`DELETE\` @@ -2150,31 +2150,31 @@ const deleteUrlResponse = await carbon.webhooks.deleteUrl({ --- -### \`carbon.webhooks.urls\` +### \`carbon.webhooks.urls\` Webhook Urls -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const urlsResponse = await carbon.webhooks.urls({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### pagination: [\`Pagination\`](./models/pagination.ts) +##### pagination: [\`Pagination\`](./models/pagination.ts) -##### order_by: [\`WebhookOrderByColumns\`](./models/webhook-order-by-columns.ts) +##### order_by: [\`WebhookOrderByColumns\`](./models/webhook-order-by-columns.ts) -##### order_dir: [\`OrderDir\`](./models/order-dir.ts) +##### order_dir: [\`OrderDir\`](./models/order-dir.ts) -##### filters: [\`WebhookFilters\`](./models/webhook-filters.ts) +##### filters: [\`WebhookFilters\`](./models/webhook-filters.ts) -#### 🔄 Return +#### 🔄 Return [WebhookQueryResponse](./models/webhook-query-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/webhooks\` \`POST\` @@ -2183,7 +2183,7 @@ const urlsResponse = await carbon.webhooks.urls({}); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-file-upload-node.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-file-upload-node.test.ts.snap index 7828afee8c..c2239a6332 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-file-upload-node.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-file-upload-node.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-file-upload-node 1`] = ` -"# typescript-file-upload-node +"# typescript-file-upload-node A simple API based for testing typescript-file-upload-node. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-file-upload-node/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-file-upload-node. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,15 +52,15 @@ yarn add typescript-file-upload-node
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptFileUploadNodeClient } from \\"typescript-file-upload-node\\"; +import { TypescriptFileUploadNodeClient } from "typescript-file-upload-node"; const typescriptfileuploadnodeclient = new TypescriptFileUploadNodeClient({ // Defining the base path is optional and defaults to https://typescript-file-upload-node.konfigthis.com - // basePath: \\"https://typescript-file-upload-node.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-file-upload-node.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = await typescriptfileuploadnodeclient.test.fetch({}); @@ -68,24 +68,24 @@ const fetchResponse = await typescriptfileuploadnodeclient.test.fetch({}); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptfileuploadnodeclient.test.fetch\` +### \`typescriptfileuploadnodeclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptfileuploadnodeclient.test.fetch({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### file: \`Uint8Array | File | buffer.File\` +##### file: \`Uint8Array | File | buffer.File\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -94,7 +94,7 @@ const fetchResponse = await typescriptfileuploadnodeclient.test.fetch({}); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop-old-axios.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop-old-axios.test.ts.snap index 706fd8526c..a5c92f8744 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop-old-axios.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop-old-axios.test.ts.snap @@ -1,17 +1,17 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-humanloop-old-axios 1`] = ` -"
+"
[![Visit Humanloop](./header.png)](https://humanloop.com) -# [Humanloop](https://humanloop.com) +# [Humanloop](https://humanloop.com) [![npm](https://img.shields.io/badge/npm-v0.5.0alpha.41-blue)](https://www.npmjs.com/package/humanloop/v/0.5.0-alpha.41)
-## Table of Contents +## Table of Contents @@ -89,13 +89,13 @@ exports[`typescript-humanloop-old-axios 1`] = ` -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -122,47 +122,47 @@ yarn add humanloop
-## Streaming Support +## Streaming Support This SDK supports streaming, see example usage in a NextJS application [here](https://github.com/konfig-dev/humanloop-streaming-example/blob/main/pages/api/edge-streaming.ts#L16) -## Getting Started +## Getting Started \`\`\`typescript -import { Humanloop } from \\"humanloop\\"; +import { Humanloop } from "humanloop"; const humanloop = new Humanloop({ // Defining the base path is optional and defaults to https://api.humanloop.com/v4 - // basePath: \\"https://api.humanloop.com/v4\\", + // basePath: "https://api.humanloop.com/v4", // Use native Fetch API instead of axios // useFetch: true, - openaiApiKey: \\"openaiApiKey\\", - anthropicApiKey: \\"anthropicApiKey\\", - apiKey: \\"API_KEY\\", + openaiApiKey: "openaiApiKey", + anthropicApiKey: "anthropicApiKey", + apiKey: "API_KEY", }); const chatResponse = await humanloop.chat({ - project: \\"sdk-example\\", + project: "sdk-example", messages: [ { - role: \\"user\\", - content: \\"Explain asynchronous programming.\\", + role: "user", + content: "Explain asynchronous programming.", }, ], model_config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, chat_template: [ { - role: \\"system\\", + role: "system", content: - \\"You are a helpful assistant who replies in the style of {{persona}}.\\", + "You are a helpful assistant who replies in the style of {{persona}}.", }, ], }, inputs: { - persona: \\"the pirate Blackbeard\\", + persona: "the pirate Blackbeard", }, stream: false, }); @@ -170,16 +170,16 @@ const chatResponse = await humanloop.chat({ console.log(chatResponse); const completeResponse = await humanloop.complete({ - project: \\"sdk-example\\", + project: "sdk-example", inputs: { - text: \\"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]\\", + text: "Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]", }, model_config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, prompt_template: - \\"Summarize this for a second-grade student:\\\\n\\\\nText:\\\\n{{text}}\\\\n\\\\nSummary:\\\\n\\", + "Summarize this for a second-grade student:\\n\\nText:\\n{{text}}\\n\\nSummary:\\n", }, stream: false, }); @@ -187,55 +187,55 @@ const completeResponse = await humanloop.complete({ console.log(completeResponse); const feedbackResponse = await humanloop.feedback({ - type: \\"rating\\", - value: \\"good\\", - data_id: \\"data_[...]\\", - user: \\"user@example.com\\", + type: "rating", + value: "good", + data_id: "data_[...]", + user: "user@example.com", }); console.log(feedbackResponse); const logResponse = await humanloop.log({ - project: \\"sdk-example\\", + project: "sdk-example", inputs: { - text: \\"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]\\", + text: "Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]", }, output: - \\"Llamas can be friendly and curious if they are trained to be around people, but if they are treated too much like pets when they are young, they can become difficult to handle when they grow up. This means they might spit, kick, and wrestle with their necks.\\", - source: \\"sdk\\", + "Llamas can be friendly and curious if they are trained to be around people, but if they are treated too much like pets when they are young, they can become difficult to handle when they grow up. This means they might spit, kick, and wrestle with their necks.", + source: "sdk", config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, prompt_template: - \\"Summarize this for a second-grade student:\\\\n\\\\nText:\\\\n{{text}}\\\\n\\\\nSummary:\\\\n\\", - type: \\"model\\", + "Summarize this for a second-grade student:\\n\\nText:\\n{{text}}\\n\\nSummary:\\n", + type: "model", }, }); console.log(logResponse); \`\`\` -## Reference +## Reference -### \`humanloop.chat\` +### \`humanloop.chat\` Get a chat response by providing details of the model configuration in the request. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.chat({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, model_config: { - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -245,89 +245,89 @@ const createResponse = await humanloop.chat({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### model_config: [\`ModelConfigChatRequest\`](./models/model-config-chat-request.ts) +##### model_config: [\`ModelConfigChatRequest\`](./models/model-config-chat-request.ts) The model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat\` \`POST\` @@ -336,19 +336,19 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.chatDeployed\` +### \`humanloop.chatDeployed\` Get a chat response using the project's active deployment. The active deployment can be a specific model configuration or an experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDeployedResponse = await humanloop.chatDeployed({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, @@ -356,89 +356,89 @@ const createDeployedResponse = await humanloop.chatDeployed({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### environment: \`string\` +##### environment: \`string\` The environment name used to create a chat response. If not specified, the default environment will be used. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-deployed\` \`POST\` @@ -447,108 +447,108 @@ The environment name used to create a chat response. If not specified, the defau --- -### \`humanloop.chatExperiment\` +### \`humanloop.chatExperiment\` Get a chat response for a specific experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createExperimentResponse = await humanloop.chatExperiment({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, - experiment_id: \\"experiment_id_example\\", + experiment_id: "experiment_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### experiment_id: \`string\` +##### experiment_id: \`string\` If an experiment ID is provided a model configuration will be sampled from the experiments active model configurations. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses, where each chat response will use a model configuration sampled from the experiment. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-experiment\` \`POST\` @@ -557,108 +557,108 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.chatModelConfig\` +### \`humanloop.chatModelConfig\` Get chat response for a specific model configuration. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createModelConfigResponse = await humanloop.chatModelConfig({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, - model_config_id: \\"model_config_id_example\\", + model_config_id: "model_config_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### model_config_id: \`string\` +##### model_config_id: \`string\` Identifies the model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-model-config\` \`POST\` @@ -667,107 +667,107 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.complete\` +### \`humanloop.complete\` Create a completion by providing details of the model configuration in the request. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.complete({ num_samples: 1, stream: false, model_config: { - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, presence_penalty: 0, frequency_penalty: 0, - prompt_template: \\"{{question}}\\", + prompt_template: "{{question}}", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion\` \`POST\` @@ -776,13 +776,13 @@ End-user ID passed through to provider call. --- -### \`humanloop.completeDeployed\` +### \`humanloop.completeDeployed\` Create a completion using the project's active deployment. The active deployment can be a specific model configuration or an experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDeployedResponse = await humanloop.completeDeployed({ @@ -791,85 +791,85 @@ const createDeployedResponse = await humanloop.completeDeployed({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### environment: \`string\` +##### environment: \`string\` The environment name used to create a chat response. If not specified, the default environment will be used. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-deployed\` \`POST\` @@ -878,99 +878,99 @@ The environment name used to create a chat response. If not specified, the defau --- -### \`humanloop.completeExperiment\` +### \`humanloop.completeExperiment\` Create a completion for a specific experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createExperimentResponse = await humanloop.completeExperiment({ num_samples: 1, stream: false, - experiment_id: \\"experiment_id_example\\", + experiment_id: "experiment_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experiment_id: \`string\` +##### experiment_id: \`string\` If an experiment ID is provided a model configuration will be sampled from the experiments active model configurations. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses, where each chat response will use a model configuration sampled from the experiment. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-experiment\` \`POST\` @@ -979,99 +979,99 @@ End-user ID passed through to provider call. --- -### \`humanloop.completeModelConfiguration\` +### \`humanloop.completeModelConfiguration\` Create a completion for a specific model configuration. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createModelConfigResponse = await humanloop.completeModelConfiguration({ num_samples: 1, stream: false, - model_config_id: \\"model_config_id_example\\", + model_config_id: "model_config_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model_config_id: \`string\` +##### model_config_id: \`string\` Identifies the model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-model-config\` \`POST\` @@ -1080,23 +1080,23 @@ End-user ID passed through to provider call. --- -### \`humanloop.datapoints.delete\` +### \`humanloop.datapoints.delete\` Delete a list of testsets by their IDs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.datapoints.delete([ - \\"requestBody_example\\", + "requestBody_example", ]); \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints\` \`DELETE\` @@ -1105,29 +1105,29 @@ const deleteResponse = await humanloop.datapoints.delete([ --- -### \`humanloop.datapoints.get\` +### \`humanloop.datapoints.get\` Get a datapoint by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.datapoints.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of datapoint. Starts with \`evtc_\`. -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints/{id}\` \`GET\` @@ -1136,7 +1136,7 @@ String ID of datapoint. Starts with \`evtc_\`. --- -### \`humanloop.datapoints.update\` +### \`humanloop.datapoints.update\` Edit the input, messages and criteria fields of a datapoint. The fields passed in the request are the ones edited. @@ -1144,37 +1144,37 @@ The fields passed in the request are the ones edited. Passing \`null\` as a value for a field will delete that field. In order to signify not changing a field, it should be omitted from the request body. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.datapoints.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of datapoint. Starts with \`evtc_\`. -##### inputs: Record +##### inputs: Record The inputs to the prompt template for this datapoint. -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The chat messages for this datapoint. -##### target: Record +##### target: Record Object with criteria necessary to evaluate this datapoint. -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints/{id}\` \`PATCH\` @@ -1183,37 +1183,37 @@ Object with criteria necessary to evaluate this datapoint. --- -### \`humanloop.datasets.create\` +### \`humanloop.datasets.create\` Create a new dataset for a project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.datasets.create({ - projectId: \\"projectId_example\\", - description: \\"description_example\\", - name: \\"name_example\\", + projectId: "projectId_example", + description: "description_example", + name: "name_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` The description of the dataset. -##### name: \`string\` +##### name: \`string\` The name of the dataset. -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/datasets\` \`POST\` @@ -1222,34 +1222,34 @@ The name of the dataset. --- -### \`humanloop.datasets.createDatapoint\` +### \`humanloop.datasets.createDatapoint\` Create a new testcase for a testset. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDatapointResponse = await humanloop.datasets.createDatapoint({ - datasetId: \\"dataset_id_example\\", + datasetId: "dataset_id_example", requestBody: { - log_ids: [\\"log_ids_example\\"], + log_ids: ["log_ids_example"], }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### datasetId: \`string\` +##### datasetId: \`string\` String ID of dataset. Starts with \`evts_\`. -##### requestBody: [\`DatasetsCreateDatapointRequest\`](./models/datasets-create-datapoint-request.ts) +##### requestBody: [\`DatasetsCreateDatapointRequest\`](./models/datasets-create-datapoint-request.ts) -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{dataset_id}/datapoints\` \`POST\` @@ -1258,29 +1258,29 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.delete\` +### \`humanloop.datasets.delete\` Delete a dataset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.datasets.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of dataset. Starts with \`evts_\`. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`DELETE\` @@ -1289,29 +1289,29 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.get\` +### \`humanloop.datasets.get\` Get a single dataset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.datasets.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of dataset. Starts with \`evts_\`. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`GET\` @@ -1320,27 +1320,27 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.listAllForProject\` +### \`humanloop.datasets.listAllForProject\` Get all datasets for a project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.datasets.listAllForProject({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/datasets\` \`GET\` @@ -1349,35 +1349,35 @@ const listAllForProjectResponse = await humanloop.datasets.listAllForProject({ --- -### \`humanloop.datasets.listDatapoints\` +### \`humanloop.datasets.listDatapoints\` Get datapoints for a dataset. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDatapointsResponse = await humanloop.datasets.listDatapoints({ - datasetId: \\"datasetId_example\\", + datasetId: "datasetId_example", page: 0, size: 50, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### datasetId: \`string\` +##### datasetId: \`string\` String ID of dataset. Starts with \`evts_\`. -##### page: \`number\` +##### page: \`number\` -##### size: \`number\` +##### size: \`number\` -#### 🔄 Return +#### 🔄 Return [PaginatedDataDatapointResponse](./models/paginated-data-datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{dataset_id}/datapoints\` \`GET\` @@ -1386,37 +1386,37 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.update\` +### \`humanloop.datasets.update\` Update a testset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.datasets.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of testset. Starts with \`evts_\`. -##### description: \`string\` +##### description: \`string\` The description of the dataset. -##### name: \`string\` +##### name: \`string\` The name of the dataset. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`PATCH\` @@ -1425,48 +1425,48 @@ The name of the dataset. --- -### \`humanloop.evaluations.create\` +### \`humanloop.evaluations.create\` Create an evaluation. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.evaluations.create({ - projectId: \\"projectId_example\\", - config_id: \\"config_id_example\\", - evaluator_ids: [\\"evaluator_ids_example\\"], - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + config_id: "config_id_example", + evaluator_ids: ["evaluator_ids_example"], + dataset_id: "dataset_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### config_id: \`string\` +##### config_id: \`string\` ID of the config to evaluate. Starts with \`config_\`. -##### evaluator_ids: \`string\`[] +##### evaluator_ids: \`string\`[] IDs of evaluators to run on the dataset. IDs start with \`evfn_\` -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of the dataset to use in this evaluation. Starts with \`evts_\`. -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. Ensure you provide an API key for the provider for the model config you are evaluating, or have one saved to your organization. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/evaluations\` \`POST\` @@ -1475,33 +1475,33 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.evaluations.get\` +### \`humanloop.evaluations.get\` Get evaluation by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.evaluations.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of evaluation run. Starts with \`ev_\`. -##### evaluatorAggregates: \`boolean\` +##### evaluatorAggregates: \`boolean\` Whether to include evaluator aggregates in the response. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}\` \`GET\` @@ -1510,35 +1510,35 @@ Whether to include evaluator aggregates in the response. --- -### \`humanloop.evaluations.listAllForProject\` +### \`humanloop.evaluations.listAllForProject\` Get all the evaluations associated with your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.evaluations.listAllForProject( { - projectId: \\"projectId_example\\", + projectId: "projectId_example", } ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### evaluatorAggregates: \`boolean\` +##### evaluatorAggregates: \`boolean\` Whether to include evaluator aggregates in the response. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/evaluations\` \`GET\` @@ -1547,39 +1547,39 @@ Whether to include evaluator aggregates in the response. --- -### \`humanloop.evaluations.listDatapoints\` +### \`humanloop.evaluations.listDatapoints\` Get testcases by evaluation ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDatapointsResponse = await humanloop.evaluations.listDatapoints({ - id: \\"id_example\\", + id: "id_example", page: 1, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of evaluation. Starts with \`ev_\`. -##### page: \`number\` +##### page: \`number\` Page to fetch. Starts from 1. -##### size: \`number\` +##### size: \`number\` Number of evaluation results to retrieve. -#### 🔄 Return +#### 🔄 Return [PaginatedDataEvaluationDatapointSnapshotResponse](./models/paginated-data-evaluation-datapoint-snapshot-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}/datapoints\` \`GET\` @@ -1588,47 +1588,47 @@ Number of evaluation results to retrieve. --- -### \`humanloop.evaluations.logResult\` +### \`humanloop.evaluations.logResult\` Log an evaluation result to an evaluation run. The run must have status 'running' and the \`evaluator_id\` of the result must be one of the \`evaluator_id\`s associated with the run. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const logResultResponse = await humanloop.evaluations.logResult({ - evaluationRunExternalId: \\"evaluationRunExternalId_example\\", - log_id: \\"log_id_example\\", - evaluator_id: \\"evaluator_id_example\\", + evaluationRunExternalId: "evaluationRunExternalId_example", + log_id: "log_id_example", + evaluator_id: "evaluator_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### log_id: \`string\` +##### log_id: \`string\` The log that was evaluated. Must have as its \`source_datapoint_id\` one of the datapoints in the dataset being evaluated. -##### evaluator_id: \`string\` +##### evaluator_id: \`string\` ID of the evaluator that evaluated the log. Starts with \`evfn_\`. Must be one of the evaluator IDs associated with the evaluation run being logged to. -##### evaluationRunExternalId: \`string\` +##### evaluationRunExternalId: \`string\` ID of the evaluation run. Starts with \`evrun_\`. -##### result: [\`ValueProperty\`](./models/value-property.ts) +##### result: [\`ValueProperty\`](./models/value-property.ts) -##### error: \`string\` +##### error: \`string\` An error that occurred during evaluation. -#### 🔄 Return +#### 🔄 Return [EvaluationResultResponse](./models/evaluation-result-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{evaluation_run_external_id}/result\` \`POST\` @@ -1637,7 +1637,7 @@ An error that occurred during evaluation. --- -### \`humanloop.evaluations.updateStatus\` +### \`humanloop.evaluations.updateStatus\` Update the status of an evaluation run. @@ -1645,30 +1645,30 @@ Can only be used to update the status of an evaluation run that uses external or The evaluation must currently have status 'running' if swithcing to completed, or it must have status 'completed' if switching back to 'running'. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateStatusResponse = await humanloop.evaluations.updateStatus({ - id: \\"id_example\\", - status: \\"string_example\\", + id: "id_example", + status: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### status: [\`EvaluationStatus\`](./models/evaluation-status.ts) +##### status: [\`EvaluationStatus\`](./models/evaluation-status.ts) The new status of the evaluation. -##### id: \`string\` +##### id: \`string\` String ID of evaluation run. Starts with \`ev_\`. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}/status\` \`PATCH\` @@ -1677,57 +1677,57 @@ String ID of evaluation run. Starts with \`ev_\`. --- -### \`humanloop.evaluators.create\` +### \`humanloop.evaluators.create\` Create an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.evaluators.create({ - description: \\"description_example\\", - name: \\"name_example\\", - arguments_type: \\"string_example\\", - return_type: \\"string_example\\", - type: \\"string_example\\", + description: "description_example", + name: "name_example", + arguments_type: "string_example", + return_type: "string_example", + type: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` The description of the evaluator. -##### name: \`string\` +##### name: \`string\` The name of the evaluator. -##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) +##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) Whether this evaluator is target-free or target-required. -##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) +##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) The type of the return value of the evaluator. -##### type: [\`EvaluatorType\`](./models/evaluator-type.ts) +##### type: [\`EvaluatorType\`](./models/evaluator-type.ts) The type of the evaluator. -##### code: \`string\` +##### code: \`string\` The code for the evaluator. This code will be executed in a sandboxed environment. -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators\` \`POST\` @@ -1736,23 +1736,23 @@ The model configuration used to generate. --- -### \`humanloop.evaluators.delete\` +### \`humanloop.evaluators.delete\` Delete an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.evaluators.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`DELETE\` @@ -1761,27 +1761,27 @@ const deleteResponse = await humanloop.evaluators.delete({ --- -### \`humanloop.evaluators.get\` +### \`humanloop.evaluators.get\` Get an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.evaluators.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`GET\` @@ -1790,21 +1790,21 @@ const getResponse = await humanloop.evaluators.get({ --- -### \`humanloop.evaluators.list\` +### \`humanloop.evaluators.list\` Get all evaluators within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.evaluators.list(); \`\`\` -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators\` \`GET\` @@ -1813,51 +1813,51 @@ const listResponse = await humanloop.evaluators.list(); --- -### \`humanloop.evaluators.update\` +### \`humanloop.evaluators.update\` Update an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.evaluators.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -##### description: \`string\` +##### description: \`string\` The description of the evaluator. -##### name: \`string\` +##### name: \`string\` The name of the evaluator. -##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) +##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) Whether this evaluator is target-free or target-required. -##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) +##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) The type of the return value of the evaluator. -##### code: \`string\` +##### code: \`string\` The code for the evaluator. This code will be executed in a sandboxed environment. -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`PATCH\` @@ -1866,7 +1866,7 @@ The model configuration used to generate. --- -### \`humanloop.experiments.create\` +### \`humanloop.experiments.create\` Create an experiment for your project. @@ -1874,49 +1874,49 @@ You can optionally specify IDs of your project's model configs to include in the experiment, along with a set of labels to consider as positive feedback and whether the experiment should be set as active. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.experiments.create({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", + projectId: "projectId_example", + name: "name_example", positive_labels: [ { - type: \\"type_example\\", - value: \\"value_example\\", + type: "type_example", + value: "value_example", }, ], set_active: false, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` Name of experiment. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment. -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### config_ids: \`string\`[] +##### config_ids: \`string\`[] Configs to add to this experiment. Further configs can be added later. -##### set_active: \`boolean\` +##### set_active: \`boolean\` -Whether to set the created project as the project\\\\\\\\\\\\'s active experiment. +Whether to set the created project as the project\\\\\\'s active experiment. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/experiments\` \`POST\` @@ -1925,25 +1925,25 @@ Whether to set the created project as the project\\\\\\\\\\\\'s active experimen --- -### \`humanloop.experiments.delete\` +### \`humanloop.experiments.delete\` Delete the experiment with the specified ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.experiments.delete({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}\` \`DELETE\` @@ -1952,29 +1952,29 @@ String ID of experiment. Starts with \`exp_\`. --- -### \`humanloop.experiments.list\` +### \`humanloop.experiments.list\` Get an array of experiments associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.experiments.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/experiments\` \`GET\` @@ -1983,29 +1983,29 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.experiments.sample\` +### \`humanloop.experiments.sample\` Samples a model config from the experiment's active model configs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const sampleResponse = await humanloop.experiments.sample({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -#### 🔄 Return +#### 🔄 Return [GetModelConfigResponse](./models/get-model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}/model-config\` \`GET\` @@ -2014,46 +2014,46 @@ String ID of experiment. Starts with \`exp_\`. --- -### \`humanloop.experiments.update\` +### \`humanloop.experiments.update\` Update your experiment, including registering and de-registering model configs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.experiments.update({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -##### name: \`string\` +##### name: \`string\` Name of experiment. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment. -##### config_ids_to_register: \`string\`[] +##### config_ids_to_register: \`string\`[] Model configs to add to this experiment. -##### config_ids_to_deregister: \`string\`[] +##### config_ids_to_deregister: \`string\`[] Model configs in this experiment to be deactivated. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}\` \`PATCH\` @@ -2062,47 +2062,47 @@ Model configs in this experiment to be deactivated. --- -### \`humanloop.feedback\` +### \`humanloop.feedback\` Submit an array of feedback for existing \`data_ids\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const feedbackResponse = await humanloop.feedback({ - type: \\"string_example\\", + type: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### type: [\`FeedbackTypeProperty\`](./models/feedback-type-property.ts) +##### type: [\`FeedbackTypeProperty\`](./models/feedback-type-property.ts) -##### value: \`string\` +##### value: \`string\` -The feedback value to be set. This field should be left blank when unsetting \\\\\\\\\\\\'rating\\\\\\\\\\\\', \\\\\\\\\\\\'correction\\\\\\\\\\\\' or \\\\\\\\\\\\'comment\\\\\\\\\\\\', but is required otherwise. +The feedback value to be set. This field should be left blank when unsetting \\\\\\'rating\\\\\\', \\\\\\'correction\\\\\\' or \\\\\\'comment\\\\\\', but is required otherwise. -##### data_id: \`string\` +##### data_id: \`string\` ID to associate the feedback to a previously logged datapoint. -##### user: \`string\` +##### user: \`string\` A unique identifier to who provided the feedback. -##### created_at: \`string\` +##### created_at: \`string\` User defined timestamp for when the feedback was created. -##### unset: \`boolean\` +##### unset: \`boolean\` If true, the value for this feedback is unset. -#### 🔄 Return +#### 🔄 Return [FeedbackSubmitResponse](./models/feedback-submit-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/feedback\` \`POST\` @@ -2111,52 +2111,52 @@ If true, the value for this feedback is unset. --- -### \`humanloop.finetunes.create\` +### \`humanloop.finetunes.create\` Trigger the fine-tuning process for a specific base model and data snapshot. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.finetunes.create({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + name: "name_example", + dataset_id: "dataset_id_example", config: { - base_model: \\"base_model_example\\", + base_model: "base_model_example", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` User defined friendly name for a finetuning run -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of dataset used for finetuning -##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) +##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) Configuration and hyper-parameters for the fine-tuning process -##### projectId: \`string\` +##### projectId: \`string\` -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata that you would like to log for reference. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes\` \`POST\` @@ -2165,27 +2165,27 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.finetunes.listAllForProject\` +### \`humanloop.finetunes.listAllForProject\` Get a list of all fine-tuned models associated to a given project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.finetunes.listAllForProject({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes\` \`GET\` @@ -2194,54 +2194,54 @@ const listAllForProjectResponse = await humanloop.finetunes.listAllForProject({ --- -### \`humanloop.finetunes.summary\` +### \`humanloop.finetunes.summary\` Checks data for errors and generates finetune data summary. Does not actually trigger the finetuning process or persist the data. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const summaryResponse = await humanloop.finetunes.summary({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + name: "name_example", + dataset_id: "dataset_id_example", config: { - base_model: \\"base_model_example\\", + base_model: "base_model_example", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` User defined friendly name for a finetuning run -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of dataset used for finetuning -##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) +##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) Configuration and hyper-parameters for the fine-tuning process -##### projectId: \`string\` +##### projectId: \`string\` -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata that you would like to log for reference. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -#### 🔄 Return +#### 🔄 Return [FinetuneDataSummary](./models/finetune-data-summary.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes/summary\` \`POST\` @@ -2250,32 +2250,32 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.finetunes.update\` +### \`humanloop.finetunes.update\` Update user-specified attributes of the specified finetuned models. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.finetunes.update({ - id: \\"id_example\\", - projectId: \\"projectId_example\\", + id: "id_example", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -##### projectId: \`string\` +##### projectId: \`string\` -##### name: \`string\` +##### name: \`string\` -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/finetunes/{id}\` \`PATCH\` @@ -2284,21 +2284,21 @@ const updateResponse = await humanloop.finetunes.update({ --- -### \`humanloop.logs.delete\` +### \`humanloop.logs.delete\` Delete Logs -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.logs.delete({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\`[] +##### id: \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`DELETE\` @@ -2307,44 +2307,44 @@ const deleteResponse = await humanloop.logs.delete({}); --- -### \`humanloop.logs.list\` +### \`humanloop.logs.list\` Retrieve paginated logs from the server. Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.logs.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", size: 50, page: 0, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### search: \`string\` +##### search: \`string\` -##### metadataSearch: \`string\` +##### metadataSearch: \`string\` -##### startDate: \`string | Date\` +##### startDate: \`string | Date\` -##### endDate: \`string | Date\` +##### endDate: \`string | Date\` -##### size: \`number\` +##### size: \`number\` -##### page: \`number\` +##### page: \`number\` -#### 🔄 Return +#### 🔄 Return [PaginatedDataLogResponse](./models/paginated-data-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`GET\` @@ -2353,107 +2353,107 @@ const listResponse = await humanloop.logs.list({ --- -### \`humanloop.log\` +### \`humanloop.log\` Log a datapoint or array of datapoints to your Humanloop project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const logResponse = await humanloop.log({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### reference_id: \`string\` +##### reference_id: \`string\` A unique string to reference the datapoint. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a subsequent log request. -##### trial_id: \`string\` +##### trial_id: \`string\` Unique ID of an experiment trial to associate to the log. -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. Can be \`None\` if logging an error, or if logging a parent datapoint with the intention to populate it later -##### config_id: \`string\` +##### config_id: \`string\` Unique ID of a config to associate to the log. -##### config: [\`ConfigProperty\`](./models/config-property.ts) +##### config: [\`ConfigProperty\`](./models/config-property.ts) -##### environment: \`string\` +##### environment: \`string\` The environment name used to create the log. -##### feedback: [\`FeedbackLabelsProperty\`](./models/feedback-labels-property.ts) +##### feedback: [\`FeedbackLabelsProperty\`](./models/feedback-labels-property.ts) -##### created_at: \`string\` +##### created_at: \`string\` User defined timestamp for when the log was created. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -##### output_message: [\`ChatMessage\`](./models/chat-message.ts) +##### output_message: [\`ChatMessage\`](./models/chat-message.ts) The message returned by the provider. -#### 🔄 Return +#### 🔄 Return [LogsLogResponse](./models/logs-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`POST\` @@ -2462,41 +2462,41 @@ The message returned by the provider. --- -### \`humanloop.logs.update\` +### \`humanloop.logs.update\` Update a logged datapoint in your Humanloop project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.logs.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of logged datapoint to return. Starts with \`data_\`. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -#### 🔄 Return +#### 🔄 Return [LogResponse](./models/log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs/{id}\` \`PATCH\` @@ -2505,44 +2505,44 @@ Duration of the logged event in seconds. --- -### \`humanloop.logs.updateByRef\` +### \`humanloop.logs.updateByRef\` Update a logged datapoint by its reference ID. The \`reference_id\` query parameter must be provided, and refers to the \`reference_id\` of a previously-logged datapoint. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateByRefResponse = await humanloop.logs.updateByRef({ - referenceId: \\"referenceId_example\\", + referenceId: "referenceId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### referenceId: \`string\` +##### referenceId: \`string\` A unique string to reference the datapoint. Identifies the logged datapoint created with the same \`reference_id\`. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -#### 🔄 Return +#### 🔄 Return [LogResponse](./models/log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`PATCH\` @@ -2551,27 +2551,27 @@ Duration of the logged event in seconds. --- -### \`humanloop.modelConfigs.deserialize\` +### \`humanloop.modelConfigs.deserialize\` Deserialize a model config from a .prompt file format. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deserializeResponse = await humanloop.modelConfigs.deserialize({ - config: \\"config_example\\", + config: "config_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### config: \`string\` +##### config: \`string\` -#### 🔄 Return +#### 🔄 Return [ModelConfigResponse](./models/model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/deserialize\` \`POST\` @@ -2580,25 +2580,25 @@ const deserializeResponse = await humanloop.modelConfigs.deserialize({ --- -### \`humanloop.modelConfigs.export\` +### \`humanloop.modelConfigs.export\` Export a model config to a .prompt file by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const exportResponse = await humanloop.modelConfigs.export({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of the model config. Starts with \`config_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/{id}/export\` \`POST\` @@ -2607,29 +2607,29 @@ String ID of the model config. Starts with \`config_\`. --- -### \`humanloop.modelConfigs.get\` +### \`humanloop.modelConfigs.get\` Get a specific model config by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.modelConfigs.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of the model config. Starts with \`config_\`. -#### 🔄 Return +#### 🔄 Return [ModelConfigResponse](./models/model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/{id}\` \`GET\` @@ -2638,7 +2638,7 @@ String ID of the model config. Starts with \`config_\`. --- -### \`humanloop.modelConfigs.register\` +### \`humanloop.modelConfigs.register\` Register a model config to a project and optionally add it to an experiment. @@ -2652,11 +2652,11 @@ exist. Otherwise, an error will be raised. If the model config is the first to be associated to the project, it will be set as the active model config. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const registerResponse = await humanloop.modelConfigs.register({ - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -2665,91 +2665,91 @@ const registerResponse = await humanloop.modelConfigs.register({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model: \`string\` +##### model: \`string\` The model instance used. E.g. text-davinci-002. -##### description: \`string\` +##### description: \`string\` A description of the model config. -##### name: \`string\` +##### name: \`string\` A friendly display name for the model config. If not provided, a name will be generated. -##### provider: [\`ModelProviders\`](./models/model-providers.ts) +##### provider: [\`ModelProviders\`](./models/model-providers.ts) The company providing the underlying model service. -##### max_tokens: \`number\` +##### max_tokens: \`number\` The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt -##### temperature: \`number\` +##### temperature: \`number\` What sampling temperature to use when making a generation. Higher values means the model will be more creative. -##### top_p: \`number\` +##### top_p: \`number\` An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. -##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) +##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) -##### presence_penalty: \`number\` +##### presence_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. -##### frequency_penalty: \`number\` +##### frequency_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. -##### other: \`object\` +##### other: \`object\` Other parameter values to be passed to the provider call. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### project: \`string\` +##### project: \`string\` Unique project name. If it does not exist, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique project ID -##### experiment: \`string\` +##### experiment: \`string\` If specified, the model config will be added to this experiment. Experiments are used for A/B testing and optimizing hyperparameters. -##### prompt_template: \`string\` +##### prompt_template: \`string\` Prompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] +##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) +##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) Which of the providers model endpoints to use. For example Complete or Edit. -##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] +##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] Make tools available to OpenAIs chat model as functions. -#### 🔄 Return +#### 🔄 Return [ProjectConfigResponse](./models/project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs\` \`POST\` @@ -2758,15 +2758,15 @@ Make tools available to OpenAIs chat model as functions. --- -### \`humanloop.modelConfigs.serialize\` +### \`humanloop.modelConfigs.serialize\` Serialize a model config to a .prompt file format. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const serializeResponse = await humanloop.modelConfigs.serialize({ - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -2775,75 +2775,75 @@ const serializeResponse = await humanloop.modelConfigs.serialize({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` A description of the model config. -##### name: \`string\` +##### name: \`string\` A friendly display name for the model config. If not provided, a name will be generated. -##### provider: [\`ModelProviders\`](./models/model-providers.ts) +##### provider: [\`ModelProviders\`](./models/model-providers.ts) The company providing the underlying model service. -##### model: \`string\` +##### model: \`string\` The model instance used. E.g. text-davinci-002. -##### max_tokens: \`number\` +##### max_tokens: \`number\` The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt -##### temperature: \`number\` +##### temperature: \`number\` What sampling temperature to use when making a generation. Higher values means the model will be more creative. -##### top_p: \`number\` +##### top_p: \`number\` An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. -##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) +##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) -##### presence_penalty: \`number\` +##### presence_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. -##### frequency_penalty: \`number\` +##### frequency_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. -##### other: \`object\` +##### other: \`object\` Other parameter values to be passed to the provider call. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) +##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) The provider model endpoint used. -##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] +##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: {{INPUT_NAME}}. -##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] +##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] Make tools available to OpenAIs chat model as functions. -##### prompt_template: \`string\` +##### prompt_template: \`string\` Prompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/serialize\` \`POST\` @@ -2852,37 +2852,37 @@ Prompt template that will take your specified inputs to form your final request --- -### \`humanloop.projects.create\` +### \`humanloop.projects.create\` Create a new project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.projects.create({ - name: \\"name_example\\", + name: "name_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` Unique project name. -##### feedback_types: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] +##### feedback_types: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] Feedback types to be created. -##### directory_id: \`string\` +##### directory_id: \`string\` ID of directory to assign project to. Starts with \`dir_\`. If not provided, the project will be created in the root directory. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects\` \`POST\` @@ -2891,42 +2891,42 @@ ID of directory to assign project to. Starts with \`dir_\`. If not provided, the --- -### \`humanloop.projects.createFeedbackType\` +### \`humanloop.projects.createFeedbackType\` Create Feedback Type -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createFeedbackTypeResponse = await humanloop.projects.createFeedbackType({ - id: \\"id_example\\", - type: \\"type_example\\", + id: "id_example", + type: "type_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### type: \`string\` +##### type: \`string\` The type of feedback to update. -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### values: [\`FeedbackLabelRequest\`](./models/feedback-label-request.ts)[] +##### values: [\`FeedbackLabelRequest\`](./models/feedback-label-request.ts)[] -The feedback values to be available. This field should only be populated when updating a \\\\\\\\\\\\'select\\\\\\\\\\\\' or \\\\\\\\\\\\'multi_select\\\\\\\\\\\\' feedback class. +The feedback values to be available. This field should only be populated when updating a \\\\\\'select\\\\\\' or \\\\\\'multi_select\\\\\\' feedback class. -##### class: [\`FeedbackClass\`](./models/feedback-class.ts) +##### class: [\`FeedbackClass\`](./models/feedback-class.ts) -The data type associated to this feedback type; whether it is a \\\\\\\\\\\\'text\\\\\\\\\\\\'/\\\\\\\\\\\\'select\\\\\\\\\\\\'/\\\\\\\\\\\\'multi_select\\\\\\\\\\\\'. This is optional when updating the default feedback types (i.e. when \`type\` is \\\\\\\\\\\\'rating\\\\\\\\\\\\', \\\\\\\\\\\\'action\\\\\\\\\\\\' or \\\\\\\\\\\\'issue\\\\\\\\\\\\'). +The data type associated to this feedback type; whether it is a \\\\\\'text\\\\\\'/\\\\\\'select\\\\\\'/\\\\\\'multi_select\\\\\\'. This is optional when updating the default feedback types (i.e. when \`type\` is \\\\\\'rating\\\\\\', \\\\\\'action\\\\\\' or \\\\\\'issue\\\\\\'). -#### 🔄 Return +#### 🔄 Return [FeedbackTypeModel](./models/feedback-type-model.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/feedback-types\` \`POST\` @@ -2935,35 +2935,35 @@ The data type associated to this feedback type; whether it is a \\\\\\\\\\\\'tex --- -### \`humanloop.projects.deactivateConfig\` +### \`humanloop.projects.deactivateConfig\` Remove the project's active config, if set. This has no effect if the project does not have an active model config set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deactivateConfigResponse = await humanloop.projects.deactivateConfig({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'production\\\\'. If not provided, will delete the active config for the default environment. +Name for the environment. E.g. \\'production\\'. If not provided, will delete the active config for the default environment. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-config\` \`DELETE\` @@ -2972,36 +2972,36 @@ Name for the environment. E.g. \\\\'production\\\\'. If not provided, will delet --- -### \`humanloop.projects.deactivateExperiment\` +### \`humanloop.projects.deactivateExperiment\` Remove the project's active experiment, if set. This has no effect if the project does not have an active experiment set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deactivateExperimentResponse = await humanloop.projects.deactivateExperiment({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return the experiment for the default environment. +Name for the environment. E.g. \\'producton\\'. If not provided, will return the experiment for the default environment. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-experiment\` \`DELETE\` @@ -3010,25 +3010,25 @@ Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return --- -### \`humanloop.projects.delete\` +### \`humanloop.projects.delete\` Delete a specific project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.projects.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`DELETE\` @@ -3037,29 +3037,29 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.deleteDeployedConfig\` +### \`humanloop.projects.deleteDeployedConfig\` Remove the model config deployed to environment. This has no effect if the project does not have an active model config set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteDeployedConfigResponse = await humanloop.projects.deleteDeployedConfig({ - projectId: \\"projectId_example\\", - environmentId: \\"environmentId_example\\", + projectId: "projectId_example", + environmentId: "environmentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### environmentId: \`string\` +##### environmentId: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/deployed-config/{environment_id}\` \`DELETE\` @@ -3068,41 +3068,41 @@ const deleteDeployedConfigResponse = --- -### \`humanloop.projects.deployConfig\` +### \`humanloop.projects.deployConfig\` Deploy a model config to an environment. If the environment already has a model config deployed, it will be replaced. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deployConfigResponse = await humanloop.projects.deployConfig({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### config_id: \`string\` +##### config_id: \`string\` Model config unique identifier generated by Humanloop. -##### experiment_id: \`string\` +##### experiment_id: \`string\` String ID of experiment. Starts with \`exp_\`. -##### environments: [\`EnvironmentRequest\`](./models/environment-request.ts)[] +##### environments: [\`EnvironmentRequest\`](./models/environment-request.ts)[] List of environments to associate with the model config. -#### 🔄 Return +#### 🔄 Return [EnvironmentProjectConfigResponse](./models/environment-project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/deploy-config\` \`PATCH\` @@ -3111,42 +3111,42 @@ List of environments to associate with the model config. --- -### \`humanloop.projects.export\` +### \`humanloop.projects.export\` Export all logged datapoints associated to your project. Results are paginated and sorts the datapoints based on \`created_at\` in descending order. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const exportResponse = await humanloop.projects.export({ - id: \\"id_example\\", + id: "id_example", page: 0, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### page: \`number\` +##### page: \`number\` Page offset for pagination. -##### size: \`number\` +##### size: \`number\` Page size for pagination. Number of logs to export. -#### 🔄 Return +#### 🔄 Return [PaginatedDataLogResponse](./models/paginated-data-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/export\` \`POST\` @@ -3155,29 +3155,29 @@ Page size for pagination. Number of logs to export. --- -### \`humanloop.projects.get\` +### \`humanloop.projects.get\` Get a specific project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.projects.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`GET\` @@ -3186,36 +3186,36 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.getActiveConfig\` +### \`humanloop.projects.getActiveConfig\` Retrieves a config to use to execute your model. A config will be selected based on the project's active config/experiment settings. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getActiveConfigResponse = await humanloop.projects.getActiveConfig({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return the active config for the default environment. +Name for the environment. E.g. \\'producton\\'. If not provided, will return the active config for the default environment. -#### 🔄 Return +#### 🔄 Return [GetModelConfigResponse](./models/get-model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-config\` \`GET\` @@ -3224,11 +3224,11 @@ Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return --- -### \`humanloop.projects.list\` +### \`humanloop.projects.list\` Get a paginated list of projects. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.projects.list({ @@ -3237,37 +3237,37 @@ const listResponse = await humanloop.projects.list({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### page: \`number\` +##### page: \`number\` Page offset for pagination. -##### size: \`number\` +##### size: \`number\` Page size for pagination. Number of projects to fetch. -##### filter: \`string\` +##### filter: \`string\` Case-insensitive filter for project name. -##### userFilter: \`string\` +##### userFilter: \`string\` Case-insensitive filter for users in the project. This filter matches against both email address and name of users. -##### sortBy: [\`ProjectSortBy\`](./models/project-sort-by.ts) +##### sortBy: [\`ProjectSortBy\`](./models/project-sort-by.ts) Field to sort projects by -##### order: [\`SortOrder\`](./models/sort-order.ts) +##### order: [\`SortOrder\`](./models/sort-order.ts) Direction to sort by. -#### 🔄 Return +#### 🔄 Return [PaginatedDataProjectResponse](./models/paginated-data-project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects\` \`GET\` @@ -3276,31 +3276,31 @@ Direction to sort by. --- -### \`humanloop.projects.listConfigs\` +### \`humanloop.projects.listConfigs\` Get an array of configs associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listConfigsResponse = await humanloop.projects.listConfigs({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### evaluationAggregates: \`boolean\` +##### evaluationAggregates: \`boolean\` -#### 🔄 Return +#### 🔄 Return [ProjectConfigResponse](./models/project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/configs\` \`GET\` @@ -3309,30 +3309,30 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.listDeployedConfigs\` +### \`humanloop.projects.listDeployedConfigs\` Get an array of environments with the deployed configs associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDeployedConfigsResponse = await humanloop.projects.listDeployedConfigs({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [EnvironmentProjectConfigResponse](./models/environment-project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/deployed-configs\` \`GET\` @@ -3341,7 +3341,7 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.update\` +### \`humanloop.projects.update\` Update a specific project. @@ -3355,45 +3355,45 @@ Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in \`positive_labels\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.projects.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### name: \`string\` +##### name: \`string\` The new unique project name. Caution, if you are using the project name as the unique identifier in your API calls, changing the name will break the calls. -##### active_experiment_id: \`string\` +##### active_experiment_id: \`string\` -ID for an experiment to set as the project\\\\\\\\\\\\'s active deployment. Starts with \\\\\\\\\\\\'exp_\\\\\\\\\\\\'. At most one of \\\\\\\\\\\\'active_experiment_id\\\\\\\\\\\\' and \\\\\\\\\\\\'active_model_config_id\\\\\\\\\\\\' can be set. +ID for an experiment to set as the project\\\\\\'s active deployment. Starts with \\\\\\'exp_\\\\\\'. At most one of \\\\\\'active_experiment_id\\\\\\' and \\\\\\'active_model_config_id\\\\\\' can be set. -##### active_config_id: \`string\` +##### active_config_id: \`string\` -ID for a config to set as the project\\\\\\\\\\\\'s active deployment. Starts with \\\\\\\\\\\\'config_\\\\\\\\\\\\'. At most one of \\\\\\\\\\\\'active_experiment_id\\\\\\\\\\\\' and \\\\\\\\\\\\'active_config_id\\\\\\\\\\\\' can be set. +ID for a config to set as the project\\\\\\'s active deployment. Starts with \\\\\\'config_\\\\\\'. At most one of \\\\\\'active_experiment_id\\\\\\' and \\\\\\'active_config_id\\\\\\' can be set. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] The full list of labels to treat as positive user feedback. -##### directory_id: \`string\` +##### directory_id: \`string\` ID of directory to assign project to. Starts with \`dir_\`. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`PATCH\` @@ -3402,7 +3402,7 @@ ID of directory to assign project to. Starts with \`dir_\`. --- -### \`humanloop.projects.updateFeedbackTypes\` +### \`humanloop.projects.updateFeedbackTypes\` Update feedback types. @@ -3412,33 +3412,33 @@ feedback types/categorical values. This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateFeedbackTypesResponse = await humanloop.projects.updateFeedbackTypes({ - id: \\"id_example\\", + id: "id_example", requestBody: [ { - type: \\"type_example\\", + type: "type_example", }, ], }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### requestBody: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] +##### requestBody: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] -#### 🔄 Return +#### 🔄 Return [FeedbackTypeModel](./models/feedback-type-model.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/feedback-types\` \`PATCH\` @@ -3447,23 +3447,23 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.sessions.create\` +### \`humanloop.sessions.create\` Create a new session. Returns a session ID that can be used to log datapoints to the session. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.sessions.create(); \`\`\` -#### 🔄 Return +#### 🔄 Return [CreateSessionResponse](./models/create-session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions\` \`POST\` @@ -3472,29 +3472,29 @@ const createResponse = await humanloop.sessions.create(); --- -### \`humanloop.sessions.get\` +### \`humanloop.sessions.get\` Get a session by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.sessions.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of session to return. Starts with \`sesh_\`. -#### 🔄 Return +#### 🔄 Return [SessionResponse](./models/session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions/{id}\` \`GET\` @@ -3503,39 +3503,39 @@ String ID of session to return. Starts with \`sesh_\`. --- -### \`humanloop.sessions.list\` +### \`humanloop.sessions.list\` Get a page of sessions. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.sessions.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", page: 1, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project to return sessions for. Sessions that contain any datapoints associated to this project will be returned. Starts with \`pr_\`. -##### page: \`number\` +##### page: \`number\` Page to fetch. Starts from 1. -##### size: \`number\` +##### size: \`number\` Number of sessions to retrieve. -#### 🔄 Return +#### 🔄 Return [PaginatedDataSessionResponse](./models/paginated-data-session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions\` \`GET\` @@ -3544,7 +3544,7 @@ Number of sessions to retrieve. --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop.test.ts.snap index b51139b077..dba7e4ead1 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-humanloop.test.ts.snap @@ -1,17 +1,17 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-humanloop 1`] = ` -"
+"
[![Visit Humanloop](./header.png)](https://humanloop.com) -# [Humanloop](https://humanloop.com) +# [Humanloop](https://humanloop.com) [![npm](https://img.shields.io/badge/npm-v0.5.0alpha.41-blue)](https://www.npmjs.com/package/humanloop/v/0.5.0-alpha.41)
-## Table of Contents +## Table of Contents @@ -89,13 +89,13 @@ exports[`typescript-humanloop 1`] = ` -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -122,47 +122,47 @@ yarn add humanloop
-## Streaming Support +## Streaming Support This SDK supports streaming, see example usage in a NextJS application [here](https://github.com/konfig-dev/humanloop-streaming-example/blob/main/pages/api/edge-streaming.ts#L16) -## Getting Started +## Getting Started \`\`\`typescript -import { Humanloop } from \\"humanloop\\"; +import { Humanloop } from "humanloop"; const humanloop = new Humanloop({ // Defining the base path is optional and defaults to https://api.humanloop.com/v4 - // basePath: \\"https://api.humanloop.com/v4\\", + // basePath: "https://api.humanloop.com/v4", // Use native Fetch API instead of axios // useFetch: true, - openaiApiKey: \\"openaiApiKey\\", - anthropicApiKey: \\"anthropicApiKey\\", - apiKey: \\"API_KEY\\", + openaiApiKey: "openaiApiKey", + anthropicApiKey: "anthropicApiKey", + apiKey: "API_KEY", }); const chatResponse = await humanloop.chat({ - project: \\"sdk-example\\", + project: "sdk-example", messages: [ { - role: \\"user\\", - content: \\"Explain asynchronous programming.\\", + role: "user", + content: "Explain asynchronous programming.", }, ], model_config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, chat_template: [ { - role: \\"system\\", + role: "system", content: - \\"You are a helpful assistant who replies in the style of {{persona}}.\\", + "You are a helpful assistant who replies in the style of {{persona}}.", }, ], }, inputs: { - persona: \\"the pirate Blackbeard\\", + persona: "the pirate Blackbeard", }, stream: false, }); @@ -170,16 +170,16 @@ const chatResponse = await humanloop.chat({ console.log(chatResponse); const completeResponse = await humanloop.complete({ - project: \\"sdk-example\\", + project: "sdk-example", inputs: { - text: \\"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]\\", + text: "Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]", }, model_config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, prompt_template: - \\"Summarize this for a second-grade student:\\\\n\\\\nText:\\\\n{{text}}\\\\n\\\\nSummary:\\\\n\\", + "Summarize this for a second-grade student:\\n\\nText:\\n{{text}}\\n\\nSummary:\\n", }, stream: false, }); @@ -187,55 +187,55 @@ const completeResponse = await humanloop.complete({ console.log(completeResponse); const feedbackResponse = await humanloop.feedback({ - type: \\"rating\\", - value: \\"good\\", - data_id: \\"data_[...]\\", - user: \\"user@example.com\\", + type: "rating", + value: "good", + data_id: "data_[...]", + user: "user@example.com", }); console.log(feedbackResponse); const logResponse = await humanloop.log({ - project: \\"sdk-example\\", + project: "sdk-example", inputs: { - text: \\"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]\\", + text: "Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]", }, output: - \\"Llamas can be friendly and curious if they are trained to be around people, but if they are treated too much like pets when they are young, they can become difficult to handle when they grow up. This means they might spit, kick, and wrestle with their necks.\\", - source: \\"sdk\\", + "Llamas can be friendly and curious if they are trained to be around people, but if they are treated too much like pets when they are young, they can become difficult to handle when they grow up. This means they might spit, kick, and wrestle with their necks.", + source: "sdk", config: { - model: \\"gpt-3.5-turbo\\", + model: "gpt-3.5-turbo", max_tokens: -1, temperature: 0.7, prompt_template: - \\"Summarize this for a second-grade student:\\\\n\\\\nText:\\\\n{{text}}\\\\n\\\\nSummary:\\\\n\\", - type: \\"model\\", + "Summarize this for a second-grade student:\\n\\nText:\\n{{text}}\\n\\nSummary:\\n", + type: "model", }, }); console.log(logResponse); \`\`\` -## Reference +## Reference -### \`humanloop.chat\` +### \`humanloop.chat\` Get a chat response by providing details of the model configuration in the request. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.chat({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, model_config: { - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -245,89 +245,89 @@ const createResponse = await humanloop.chat({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### model_config: [\`ModelConfigChatRequest\`](./models/model-config-chat-request.ts) +##### model_config: [\`ModelConfigChatRequest\`](./models/model-config-chat-request.ts) The model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat\` \`POST\` @@ -336,19 +336,19 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.chatDeployed\` +### \`humanloop.chatDeployed\` Get a chat response using the project's active deployment. The active deployment can be a specific model configuration or an experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDeployedResponse = await humanloop.chatDeployed({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, @@ -356,89 +356,89 @@ const createDeployedResponse = await humanloop.chatDeployed({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### environment: \`string\` +##### environment: \`string\` The environment name used to create a chat response. If not specified, the default environment will be used. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-deployed\` \`POST\` @@ -447,108 +447,108 @@ The environment name used to create a chat response. If not specified, the defau --- -### \`humanloop.chatExperiment\` +### \`humanloop.chatExperiment\` Get a chat response for a specific experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createExperimentResponse = await humanloop.chatExperiment({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, - experiment_id: \\"experiment_id_example\\", + experiment_id: "experiment_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### experiment_id: \`string\` +##### experiment_id: \`string\` If an experiment ID is provided a model configuration will be sampled from the experiments active model configurations. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses, where each chat response will use a model configuration sampled from the experiment. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-experiment\` \`POST\` @@ -557,108 +557,108 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.chatModelConfig\` +### \`humanloop.chatModelConfig\` Get chat response for a specific model configuration. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createModelConfigResponse = await humanloop.chatModelConfig({ messages: [ { - role: \\"string_example\\", + role: "string_example", }, ], num_samples: 1, stream: false, - model_config_id: \\"model_config_id_example\\", + model_config_id: "model_config_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### model_config_id: \`string\` +##### model_config_id: \`string\` Identifies the model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses. -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) +##### tool_choice: [\`ToolChoiceProperty\`](./models/tool-choice-property.ts) -##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) +##### tool_call: [\`ToolCallProperty\`](./models/tool-call-property.ts) -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -#### 🔄 Return +#### 🔄 Return [ChatResponse](./models/chat-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/chat-model-config\` \`POST\` @@ -667,107 +667,107 @@ The format of the response. Only type json_object is currently supported for cha --- -### \`humanloop.complete\` +### \`humanloop.complete\` Create a completion by providing details of the model configuration in the request. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.complete({ num_samples: 1, stream: false, model_config: { - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, presence_penalty: 0, frequency_penalty: 0, - prompt_template: \\"{{question}}\\", + prompt_template: "{{question}}", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion\` \`POST\` @@ -776,13 +776,13 @@ End-user ID passed through to provider call. --- -### \`humanloop.completeDeployed\` +### \`humanloop.completeDeployed\` Create a completion using the project's active deployment. The active deployment can be a specific model configuration or an experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDeployedResponse = await humanloop.completeDeployed({ @@ -791,85 +791,85 @@ const createDeployedResponse = await humanloop.completeDeployed({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -##### environment: \`string\` +##### environment: \`string\` The environment name used to create a chat response. If not specified, the default environment will be used. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-deployed\` \`POST\` @@ -878,99 +878,99 @@ The environment name used to create a chat response. If not specified, the defau --- -### \`humanloop.completeExperiment\` +### \`humanloop.completeExperiment\` Create a completion for a specific experiment. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createExperimentResponse = await humanloop.completeExperiment({ num_samples: 1, stream: false, - experiment_id: \\"experiment_id_example\\", + experiment_id: "experiment_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experiment_id: \`string\` +##### experiment_id: \`string\` If an experiment ID is provided a model configuration will be sampled from the experiments active model configurations. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of chat responses, where each chat response will use a model configuration sampled from the experiment. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-experiment\` \`POST\` @@ -979,99 +979,99 @@ End-user ID passed through to provider call. --- -### \`humanloop.completeModelConfiguration\` +### \`humanloop.completeModelConfiguration\` Create a completion for a specific model configuration. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createModelConfigResponse = await humanloop.completeModelConfiguration({ num_samples: 1, stream: false, - model_config_id: \\"model_config_id_example\\", + model_config_id: "model_config_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model_config_id: \`string\` +##### model_config_id: \`string\` Identifies the model configuration used to create a chat response. -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -##### num_samples: \`number\` +##### num_samples: \`number\` The number of generations. -##### logprobs: \`number\` +##### logprobs: \`number\` Include the log probabilities of the top n tokens in the provider_response -##### stream: \`boolean\` +##### stream: \`boolean\` If true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently. -##### suffix: \`string\` +##### suffix: \`string\` The suffix that comes after a completion of inserted text. Useful for completions that act like inserts. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### user: \`string\` +##### user: \`string\` End-user ID passed through to provider call. -#### 🔄 Return +#### 🔄 Return [CompletionResponse](./models/completion-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/completion-model-config\` \`POST\` @@ -1080,23 +1080,23 @@ End-user ID passed through to provider call. --- -### \`humanloop.datapoints.delete\` +### \`humanloop.datapoints.delete\` Delete a list of testsets by their IDs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.datapoints.delete([ - \\"requestBody_example\\", + "requestBody_example", ]); \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints\` \`DELETE\` @@ -1105,29 +1105,29 @@ const deleteResponse = await humanloop.datapoints.delete([ --- -### \`humanloop.datapoints.get\` +### \`humanloop.datapoints.get\` Get a datapoint by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.datapoints.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of datapoint. Starts with \`evtc_\`. -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints/{id}\` \`GET\` @@ -1136,7 +1136,7 @@ String ID of datapoint. Starts with \`evtc_\`. --- -### \`humanloop.datapoints.update\` +### \`humanloop.datapoints.update\` Edit the input, messages and criteria fields of a datapoint. The fields passed in the request are the ones edited. @@ -1144,37 +1144,37 @@ The fields passed in the request are the ones edited. Passing \`null\` as a value for a field will delete that field. In order to signify not changing a field, it should be omitted from the request body. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.datapoints.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of datapoint. Starts with \`evtc_\`. -##### inputs: Record +##### inputs: Record The inputs to the prompt template for this datapoint. -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The chat messages for this datapoint. -##### target: Record +##### target: Record Object with criteria necessary to evaluate this datapoint. -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datapoints/{id}\` \`PATCH\` @@ -1183,37 +1183,37 @@ Object with criteria necessary to evaluate this datapoint. --- -### \`humanloop.datasets.create\` +### \`humanloop.datasets.create\` Create a new dataset for a project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.datasets.create({ - projectId: \\"projectId_example\\", - description: \\"description_example\\", - name: \\"name_example\\", + projectId: "projectId_example", + description: "description_example", + name: "name_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` The description of the dataset. -##### name: \`string\` +##### name: \`string\` The name of the dataset. -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/datasets\` \`POST\` @@ -1222,34 +1222,34 @@ The name of the dataset. --- -### \`humanloop.datasets.createDatapoint\` +### \`humanloop.datasets.createDatapoint\` Create a new testcase for a testset. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createDatapointResponse = await humanloop.datasets.createDatapoint({ - datasetId: \\"dataset_id_example\\", + datasetId: "dataset_id_example", requestBody: { - log_ids: [\\"log_ids_example\\"], + log_ids: ["log_ids_example"], }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### datasetId: \`string\` +##### datasetId: \`string\` String ID of dataset. Starts with \`evts_\`. -##### requestBody: [\`DatasetsCreateDatapointRequest\`](./models/datasets-create-datapoint-request.ts) +##### requestBody: [\`DatasetsCreateDatapointRequest\`](./models/datasets-create-datapoint-request.ts) -#### 🔄 Return +#### 🔄 Return [DatapointResponse](./models/datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{dataset_id}/datapoints\` \`POST\` @@ -1258,29 +1258,29 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.delete\` +### \`humanloop.datasets.delete\` Delete a dataset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.datasets.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of dataset. Starts with \`evts_\`. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`DELETE\` @@ -1289,29 +1289,29 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.get\` +### \`humanloop.datasets.get\` Get a single dataset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.datasets.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of dataset. Starts with \`evts_\`. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`GET\` @@ -1320,27 +1320,27 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.listAllForProject\` +### \`humanloop.datasets.listAllForProject\` Get all datasets for a project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.datasets.listAllForProject({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/datasets\` \`GET\` @@ -1349,35 +1349,35 @@ const listAllForProjectResponse = await humanloop.datasets.listAllForProject({ --- -### \`humanloop.datasets.listDatapoints\` +### \`humanloop.datasets.listDatapoints\` Get datapoints for a dataset. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDatapointsResponse = await humanloop.datasets.listDatapoints({ - datasetId: \\"datasetId_example\\", + datasetId: "datasetId_example", page: 0, size: 50, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### datasetId: \`string\` +##### datasetId: \`string\` String ID of dataset. Starts with \`evts_\`. -##### page: \`number\` +##### page: \`number\` -##### size: \`number\` +##### size: \`number\` -#### 🔄 Return +#### 🔄 Return [PaginatedDataDatapointResponse](./models/paginated-data-datapoint-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{dataset_id}/datapoints\` \`GET\` @@ -1386,37 +1386,37 @@ String ID of dataset. Starts with \`evts_\`. --- -### \`humanloop.datasets.update\` +### \`humanloop.datasets.update\` Update a testset by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.datasets.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of testset. Starts with \`evts_\`. -##### description: \`string\` +##### description: \`string\` The description of the dataset. -##### name: \`string\` +##### name: \`string\` The name of the dataset. -#### 🔄 Return +#### 🔄 Return [DatasetResponse](./models/dataset-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/datasets/{id}\` \`PATCH\` @@ -1425,48 +1425,48 @@ The name of the dataset. --- -### \`humanloop.evaluations.create\` +### \`humanloop.evaluations.create\` Create an evaluation. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.evaluations.create({ - projectId: \\"projectId_example\\", - config_id: \\"config_id_example\\", - evaluator_ids: [\\"evaluator_ids_example\\"], - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + config_id: "config_id_example", + evaluator_ids: ["evaluator_ids_example"], + dataset_id: "dataset_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### config_id: \`string\` +##### config_id: \`string\` ID of the config to evaluate. Starts with \`config_\`. -##### evaluator_ids: \`string\`[] +##### evaluator_ids: \`string\`[] IDs of evaluators to run on the dataset. IDs start with \`evfn_\` -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of the dataset to use in this evaluation. Starts with \`evts_\`. -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. Ensure you provide an API key for the provider for the model config you are evaluating, or have one saved to your organization. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/evaluations\` \`POST\` @@ -1475,33 +1475,33 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.evaluations.get\` +### \`humanloop.evaluations.get\` Get evaluation by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.evaluations.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of evaluation run. Starts with \`ev_\`. -##### evaluatorAggregates: \`boolean\` +##### evaluatorAggregates: \`boolean\` Whether to include evaluator aggregates in the response. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}\` \`GET\` @@ -1510,35 +1510,35 @@ Whether to include evaluator aggregates in the response. --- -### \`humanloop.evaluations.listAllForProject\` +### \`humanloop.evaluations.listAllForProject\` Get all the evaluations associated with your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.evaluations.listAllForProject( { - projectId: \\"projectId_example\\", + projectId: "projectId_example", } ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### evaluatorAggregates: \`boolean\` +##### evaluatorAggregates: \`boolean\` Whether to include evaluator aggregates in the response. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/evaluations\` \`GET\` @@ -1547,39 +1547,39 @@ Whether to include evaluator aggregates in the response. --- -### \`humanloop.evaluations.listDatapoints\` +### \`humanloop.evaluations.listDatapoints\` Get testcases by evaluation ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDatapointsResponse = await humanloop.evaluations.listDatapoints({ - id: \\"id_example\\", + id: "id_example", page: 1, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of evaluation. Starts with \`ev_\`. -##### page: \`number\` +##### page: \`number\` Page to fetch. Starts from 1. -##### size: \`number\` +##### size: \`number\` Number of evaluation results to retrieve. -#### 🔄 Return +#### 🔄 Return [PaginatedDataEvaluationDatapointSnapshotResponse](./models/paginated-data-evaluation-datapoint-snapshot-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}/datapoints\` \`GET\` @@ -1588,47 +1588,47 @@ Number of evaluation results to retrieve. --- -### \`humanloop.evaluations.logResult\` +### \`humanloop.evaluations.logResult\` Log an evaluation result to an evaluation run. The run must have status 'running' and the \`evaluator_id\` of the result must be one of the \`evaluator_id\`s associated with the run. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const logResultResponse = await humanloop.evaluations.logResult({ - evaluationRunExternalId: \\"evaluationRunExternalId_example\\", - log_id: \\"log_id_example\\", - evaluator_id: \\"evaluator_id_example\\", + evaluationRunExternalId: "evaluationRunExternalId_example", + log_id: "log_id_example", + evaluator_id: "evaluator_id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### log_id: \`string\` +##### log_id: \`string\` The log that was evaluated. Must have as its \`source_datapoint_id\` one of the datapoints in the dataset being evaluated. -##### evaluator_id: \`string\` +##### evaluator_id: \`string\` ID of the evaluator that evaluated the log. Starts with \`evfn_\`. Must be one of the evaluator IDs associated with the evaluation run being logged to. -##### evaluationRunExternalId: \`string\` +##### evaluationRunExternalId: \`string\` ID of the evaluation run. Starts with \`evrun_\`. -##### result: [\`ValueProperty\`](./models/value-property.ts) +##### result: [\`ValueProperty\`](./models/value-property.ts) -##### error: \`string\` +##### error: \`string\` An error that occurred during evaluation. -#### 🔄 Return +#### 🔄 Return [EvaluationResultResponse](./models/evaluation-result-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{evaluation_run_external_id}/result\` \`POST\` @@ -1637,7 +1637,7 @@ An error that occurred during evaluation. --- -### \`humanloop.evaluations.updateStatus\` +### \`humanloop.evaluations.updateStatus\` Update the status of an evaluation run. @@ -1645,30 +1645,30 @@ Can only be used to update the status of an evaluation run that uses external or The evaluation must currently have status 'running' if swithcing to completed, or it must have status 'completed' if switching back to 'running'. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateStatusResponse = await humanloop.evaluations.updateStatus({ - id: \\"id_example\\", - status: \\"string_example\\", + id: "id_example", + status: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### status: [\`EvaluationStatus\`](./models/evaluation-status.ts) +##### status: [\`EvaluationStatus\`](./models/evaluation-status.ts) The new status of the evaluation. -##### id: \`string\` +##### id: \`string\` String ID of evaluation run. Starts with \`ev_\`. -#### 🔄 Return +#### 🔄 Return [EvaluationResponse](./models/evaluation-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluations/{id}/status\` \`PATCH\` @@ -1677,57 +1677,57 @@ String ID of evaluation run. Starts with \`ev_\`. --- -### \`humanloop.evaluators.create\` +### \`humanloop.evaluators.create\` Create an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.evaluators.create({ - description: \\"description_example\\", - name: \\"name_example\\", - arguments_type: \\"string_example\\", - return_type: \\"string_example\\", - type: \\"string_example\\", + description: "description_example", + name: "name_example", + arguments_type: "string_example", + return_type: "string_example", + type: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` The description of the evaluator. -##### name: \`string\` +##### name: \`string\` The name of the evaluator. -##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) +##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) Whether this evaluator is target-free or target-required. -##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) +##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) The type of the return value of the evaluator. -##### type: [\`EvaluatorType\`](./models/evaluator-type.ts) +##### type: [\`EvaluatorType\`](./models/evaluator-type.ts) The type of the evaluator. -##### code: \`string\` +##### code: \`string\` The code for the evaluator. This code will be executed in a sandboxed environment. -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators\` \`POST\` @@ -1736,23 +1736,23 @@ The model configuration used to generate. --- -### \`humanloop.evaluators.delete\` +### \`humanloop.evaluators.delete\` Delete an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.evaluators.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`DELETE\` @@ -1761,27 +1761,27 @@ const deleteResponse = await humanloop.evaluators.delete({ --- -### \`humanloop.evaluators.get\` +### \`humanloop.evaluators.get\` Get an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.evaluators.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`GET\` @@ -1790,21 +1790,21 @@ const getResponse = await humanloop.evaluators.get({ --- -### \`humanloop.evaluators.list\` +### \`humanloop.evaluators.list\` Get all evaluators within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.evaluators.list(); \`\`\` -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators\` \`GET\` @@ -1813,51 +1813,51 @@ const listResponse = await humanloop.evaluators.list(); --- -### \`humanloop.evaluators.update\` +### \`humanloop.evaluators.update\` Update an evaluator within your organization. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.evaluators.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -##### description: \`string\` +##### description: \`string\` The description of the evaluator. -##### name: \`string\` +##### name: \`string\` The name of the evaluator. -##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) +##### arguments_type: [\`EvaluatorArgumentsType\`](./models/evaluator-arguments-type.ts) Whether this evaluator is target-free or target-required. -##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) +##### return_type: [\`EvaluatorReturnTypeEnum\`](./models/evaluator-return-type-enum.ts) The type of the return value of the evaluator. -##### code: \`string\` +##### code: \`string\` The code for the evaluator. This code will be executed in a sandboxed environment. -##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) +##### model_config: [\`ModelConfigCompletionRequest\`](./models/model-config-completion-request.ts) The model configuration used to generate. -#### 🔄 Return +#### 🔄 Return [EvaluatorResponse](./models/evaluator-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/evaluators/{id}\` \`PATCH\` @@ -1866,7 +1866,7 @@ The model configuration used to generate. --- -### \`humanloop.experiments.create\` +### \`humanloop.experiments.create\` Create an experiment for your project. @@ -1874,49 +1874,49 @@ You can optionally specify IDs of your project's model configs to include in the experiment, along with a set of labels to consider as positive feedback and whether the experiment should be set as active. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.experiments.create({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", + projectId: "projectId_example", + name: "name_example", positive_labels: [ { - type: \\"type_example\\", - value: \\"value_example\\", + type: "type_example", + value: "value_example", }, ], set_active: false, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` Name of experiment. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment. -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -##### config_ids: \`string\`[] +##### config_ids: \`string\`[] Configs to add to this experiment. Further configs can be added later. -##### set_active: \`boolean\` +##### set_active: \`boolean\` -Whether to set the created project as the project\\\\\\\\\\\\'s active experiment. +Whether to set the created project as the project\\\\\\'s active experiment. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/experiments\` \`POST\` @@ -1925,25 +1925,25 @@ Whether to set the created project as the project\\\\\\\\\\\\'s active experimen --- -### \`humanloop.experiments.delete\` +### \`humanloop.experiments.delete\` Delete the experiment with the specified ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.experiments.delete({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}\` \`DELETE\` @@ -1952,29 +1952,29 @@ String ID of experiment. Starts with \`exp_\`. --- -### \`humanloop.experiments.list\` +### \`humanloop.experiments.list\` Get an array of experiments associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.experiments.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/experiments\` \`GET\` @@ -1983,29 +1983,29 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.experiments.sample\` +### \`humanloop.experiments.sample\` Samples a model config from the experiment's active model configs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const sampleResponse = await humanloop.experiments.sample({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -#### 🔄 Return +#### 🔄 Return [GetModelConfigResponse](./models/get-model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}/model-config\` \`GET\` @@ -2014,46 +2014,46 @@ String ID of experiment. Starts with \`exp_\`. --- -### \`humanloop.experiments.update\` +### \`humanloop.experiments.update\` Update your experiment, including registering and de-registering model configs. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.experiments.update({ - experimentId: \\"experimentId_example\\", + experimentId: "experimentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### experimentId: \`string\` +##### experimentId: \`string\` String ID of experiment. Starts with \`exp_\`. -##### name: \`string\` +##### name: \`string\` Name of experiment. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment. -##### config_ids_to_register: \`string\`[] +##### config_ids_to_register: \`string\`[] Model configs to add to this experiment. -##### config_ids_to_deregister: \`string\`[] +##### config_ids_to_deregister: \`string\`[] Model configs in this experiment to be deactivated. -#### 🔄 Return +#### 🔄 Return [ExperimentResponse](./models/experiment-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/experiments/{experiment_id}\` \`PATCH\` @@ -2062,47 +2062,47 @@ Model configs in this experiment to be deactivated. --- -### \`humanloop.feedback\` +### \`humanloop.feedback\` Submit an array of feedback for existing \`data_ids\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const feedbackResponse = await humanloop.feedback({ - type: \\"string_example\\", + type: "string_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### type: [\`FeedbackTypeProperty\`](./models/feedback-type-property.ts) +##### type: [\`FeedbackTypeProperty\`](./models/feedback-type-property.ts) -##### value: \`string\` +##### value: \`string\` -The feedback value to be set. This field should be left blank when unsetting \\\\\\\\\\\\'rating\\\\\\\\\\\\', \\\\\\\\\\\\'correction\\\\\\\\\\\\' or \\\\\\\\\\\\'comment\\\\\\\\\\\\', but is required otherwise. +The feedback value to be set. This field should be left blank when unsetting \\\\\\'rating\\\\\\', \\\\\\'correction\\\\\\' or \\\\\\'comment\\\\\\', but is required otherwise. -##### data_id: \`string\` +##### data_id: \`string\` ID to associate the feedback to a previously logged datapoint. -##### user: \`string\` +##### user: \`string\` A unique identifier to who provided the feedback. -##### created_at: \`string\` +##### created_at: \`string\` User defined timestamp for when the feedback was created. -##### unset: \`boolean\` +##### unset: \`boolean\` If true, the value for this feedback is unset. -#### 🔄 Return +#### 🔄 Return [FeedbackSubmitResponse](./models/feedback-submit-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/feedback\` \`POST\` @@ -2111,52 +2111,52 @@ If true, the value for this feedback is unset. --- -### \`humanloop.finetunes.create\` +### \`humanloop.finetunes.create\` Trigger the fine-tuning process for a specific base model and data snapshot. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.finetunes.create({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + name: "name_example", + dataset_id: "dataset_id_example", config: { - base_model: \\"base_model_example\\", + base_model: "base_model_example", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` User defined friendly name for a finetuning run -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of dataset used for finetuning -##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) +##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) Configuration and hyper-parameters for the fine-tuning process -##### projectId: \`string\` +##### projectId: \`string\` -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata that you would like to log for reference. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes\` \`POST\` @@ -2165,27 +2165,27 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.finetunes.listAllForProject\` +### \`humanloop.finetunes.listAllForProject\` Get a list of all fine-tuned models associated to a given project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllForProjectResponse = await humanloop.finetunes.listAllForProject({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes\` \`GET\` @@ -2194,54 +2194,54 @@ const listAllForProjectResponse = await humanloop.finetunes.listAllForProject({ --- -### \`humanloop.finetunes.summary\` +### \`humanloop.finetunes.summary\` Checks data for errors and generates finetune data summary. Does not actually trigger the finetuning process or persist the data. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const summaryResponse = await humanloop.finetunes.summary({ - projectId: \\"projectId_example\\", - name: \\"name_example\\", - dataset_id: \\"dataset_id_example\\", + projectId: "projectId_example", + name: "name_example", + dataset_id: "dataset_id_example", config: { - base_model: \\"base_model_example\\", + base_model: "base_model_example", }, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` User defined friendly name for a finetuning run -##### dataset_id: \`string\` +##### dataset_id: \`string\` ID of dataset used for finetuning -##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) +##### config: [\`FinetuneConfig\`](./models/finetune-config.ts) Configuration and hyper-parameters for the fine-tuning process -##### projectId: \`string\` +##### projectId: \`string\` -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata that you would like to log for reference. -##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) +##### provider_api_keys: [\`ProviderApiKeys\`](./models/provider-api-keys.ts) API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. -#### 🔄 Return +#### 🔄 Return [FinetuneDataSummary](./models/finetune-data-summary.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/finetunes/summary\` \`POST\` @@ -2250,32 +2250,32 @@ API keys required by each provider to make API calls. The API keys provided here --- -### \`humanloop.finetunes.update\` +### \`humanloop.finetunes.update\` Update user-specified attributes of the specified finetuned models. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.finetunes.update({ - id: \\"id_example\\", - projectId: \\"projectId_example\\", + id: "id_example", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` -##### projectId: \`string\` +##### projectId: \`string\` -##### name: \`string\` +##### name: \`string\` -#### 🔄 Return +#### 🔄 Return [FinetuneResponse](./models/finetune-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/finetunes/{id}\` \`PATCH\` @@ -2284,21 +2284,21 @@ const updateResponse = await humanloop.finetunes.update({ --- -### \`humanloop.logs.delete\` +### \`humanloop.logs.delete\` Delete Logs -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.logs.delete({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\`[] +##### id: \`string\`[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`DELETE\` @@ -2307,44 +2307,44 @@ const deleteResponse = await humanloop.logs.delete({}); --- -### \`humanloop.logs.list\` +### \`humanloop.logs.list\` Retrieve paginated logs from the server. Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.logs.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", size: 50, page: 0, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### search: \`string\` +##### search: \`string\` -##### metadataSearch: \`string\` +##### metadataSearch: \`string\` -##### startDate: \`string | Date\` +##### startDate: \`string | Date\` -##### endDate: \`string | Date\` +##### endDate: \`string | Date\` -##### size: \`number\` +##### size: \`number\` -##### page: \`number\` +##### page: \`number\` -#### 🔄 Return +#### 🔄 Return [PaginatedDataLogResponse](./models/paginated-data-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`GET\` @@ -2353,107 +2353,107 @@ const listResponse = await humanloop.logs.list({ --- -### \`humanloop.log\` +### \`humanloop.log\` Log a datapoint or array of datapoints to your Humanloop project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const logResponse = await humanloop.log({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### project: \`string\` +##### project: \`string\` Unique project name. If no project exists with this name, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique ID of a project to associate to the log. Either this or \`project\` must be provided. -##### session_id: \`string\` +##### session_id: \`string\` ID of the session to associate the datapoint. -##### session_reference_id: \`string\` +##### session_reference_id: \`string\` A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same \`session_reference_id\` in subsequent log requests. Specify at most one of this or \`session_id\`. -##### parent_id: \`string\` +##### parent_id: \`string\` ID associated to the parent datapoint in a session. -##### parent_reference_id: \`string\` +##### parent_reference_id: \`string\` A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a prior log request. Specify at most one of this or \`parent_id\`. Note that this cannot refer to a datapoint being logged in the same request. -##### inputs: \`object\` +##### inputs: \`object\` The inputs passed to the prompt template. -##### source: \`string\` +##### source: \`string\` Identifies where the model was called from. -##### metadata: \`object\` +##### metadata: \`object\` Any additional metadata to record. -##### source_datapoint_id: \`string\` +##### source_datapoint_id: \`string\` ID of the source datapoint if this is a log derived from a datapoint in a dataset. -##### reference_id: \`string\` +##### reference_id: \`string\` A unique string to reference the datapoint. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as \`parent_id\` in a subsequent log request. -##### trial_id: \`string\` +##### trial_id: \`string\` Unique ID of an experiment trial to associate to the log. -##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] +##### messages: [\`ChatMessage\`](./models/chat-message.ts)[] The messages passed to the to provider chat endpoint. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. Can be \`None\` if logging an error, or if logging a parent datapoint with the intention to populate it later -##### config_id: \`string\` +##### config_id: \`string\` Unique ID of a config to associate to the log. -##### config: [\`ConfigProperty\`](./models/config-property.ts) +##### config: [\`ConfigProperty\`](./models/config-property.ts) -##### environment: \`string\` +##### environment: \`string\` The environment name used to create the log. -##### feedback: [\`FeedbackLabelsProperty\`](./models/feedback-labels-property.ts) +##### feedback: [\`FeedbackLabelsProperty\`](./models/feedback-labels-property.ts) -##### created_at: \`string\` +##### created_at: \`string\` User defined timestamp for when the log was created. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -##### output_message: [\`ChatMessage\`](./models/chat-message.ts) +##### output_message: [\`ChatMessage\`](./models/chat-message.ts) The message returned by the provider. -#### 🔄 Return +#### 🔄 Return [LogsLogResponse](./models/logs-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`POST\` @@ -2462,41 +2462,41 @@ The message returned by the provider. --- -### \`humanloop.logs.update\` +### \`humanloop.logs.update\` Update a logged datapoint in your Humanloop project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.logs.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of logged datapoint to return. Starts with \`data_\`. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -#### 🔄 Return +#### 🔄 Return [LogResponse](./models/log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs/{id}\` \`PATCH\` @@ -2505,44 +2505,44 @@ Duration of the logged event in seconds. --- -### \`humanloop.logs.updateByRef\` +### \`humanloop.logs.updateByRef\` Update a logged datapoint by its reference ID. The \`reference_id\` query parameter must be provided, and refers to the \`reference_id\` of a previously-logged datapoint. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateByRefResponse = await humanloop.logs.updateByRef({ - referenceId: \\"referenceId_example\\", + referenceId: "referenceId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### referenceId: \`string\` +##### referenceId: \`string\` A unique string to reference the datapoint. Identifies the logged datapoint created with the same \`reference_id\`. -##### output: \`string\` +##### output: \`string\` Generated output from your model for the provided inputs. -##### error: \`string\` +##### error: \`string\` Error message if the log is an error. -##### duration: \`number\` +##### duration: \`number\` Duration of the logged event in seconds. -#### 🔄 Return +#### 🔄 Return [LogResponse](./models/log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/logs\` \`PATCH\` @@ -2551,27 +2551,27 @@ Duration of the logged event in seconds. --- -### \`humanloop.modelConfigs.deserialize\` +### \`humanloop.modelConfigs.deserialize\` Deserialize a model config from a .prompt file format. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deserializeResponse = await humanloop.modelConfigs.deserialize({ - config: \\"config_example\\", + config: "config_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### config: \`string\` +##### config: \`string\` -#### 🔄 Return +#### 🔄 Return [ModelConfigResponse](./models/model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/deserialize\` \`POST\` @@ -2580,25 +2580,25 @@ const deserializeResponse = await humanloop.modelConfigs.deserialize({ --- -### \`humanloop.modelConfigs.export\` +### \`humanloop.modelConfigs.export\` Export a model config to a .prompt file by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const exportResponse = await humanloop.modelConfigs.export({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of the model config. Starts with \`config_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/{id}/export\` \`POST\` @@ -2607,29 +2607,29 @@ String ID of the model config. Starts with \`config_\`. --- -### \`humanloop.modelConfigs.get\` +### \`humanloop.modelConfigs.get\` Get a specific model config by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.modelConfigs.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of the model config. Starts with \`config_\`. -#### 🔄 Return +#### 🔄 Return [ModelConfigResponse](./models/model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/{id}\` \`GET\` @@ -2638,7 +2638,7 @@ String ID of the model config. Starts with \`config_\`. --- -### \`humanloop.modelConfigs.register\` +### \`humanloop.modelConfigs.register\` Register a model config to a project and optionally add it to an experiment. @@ -2652,11 +2652,11 @@ exist. Otherwise, an error will be raised. If the model config is the first to be associated to the project, it will be set as the active model config. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const registerResponse = await humanloop.modelConfigs.register({ - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -2665,91 +2665,91 @@ const registerResponse = await humanloop.modelConfigs.register({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### model: \`string\` +##### model: \`string\` The model instance used. E.g. text-davinci-002. -##### description: \`string\` +##### description: \`string\` A description of the model config. -##### name: \`string\` +##### name: \`string\` A friendly display name for the model config. If not provided, a name will be generated. -##### provider: [\`ModelProviders\`](./models/model-providers.ts) +##### provider: [\`ModelProviders\`](./models/model-providers.ts) The company providing the underlying model service. -##### max_tokens: \`number\` +##### max_tokens: \`number\` The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt -##### temperature: \`number\` +##### temperature: \`number\` What sampling temperature to use when making a generation. Higher values means the model will be more creative. -##### top_p: \`number\` +##### top_p: \`number\` An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. -##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) +##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) -##### presence_penalty: \`number\` +##### presence_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. -##### frequency_penalty: \`number\` +##### frequency_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. -##### other: \`object\` +##### other: \`object\` Other parameter values to be passed to the provider call. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### project: \`string\` +##### project: \`string\` Unique project name. If it does not exist, a new project will be created. -##### project_id: \`string\` +##### project_id: \`string\` Unique project ID -##### experiment: \`string\` +##### experiment: \`string\` If specified, the model config will be added to this experiment. Experiments are used for A/B testing and optimizing hyperparameters. -##### prompt_template: \`string\` +##### prompt_template: \`string\` Prompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] +##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) +##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) Which of the providers model endpoints to use. For example Complete or Edit. -##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] +##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] Make tools available to OpenAIs chat model as functions. -#### 🔄 Return +#### 🔄 Return [ProjectConfigResponse](./models/project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs\` \`POST\` @@ -2758,15 +2758,15 @@ Make tools available to OpenAIs chat model as functions. --- -### \`humanloop.modelConfigs.serialize\` +### \`humanloop.modelConfigs.serialize\` Serialize a model config to a .prompt file format. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const serializeResponse = await humanloop.modelConfigs.serialize({ - model: \\"model_example\\", + model: "model_example", max_tokens: -1, temperature: 1, top_p: 1, @@ -2775,75 +2775,75 @@ const serializeResponse = await humanloop.modelConfigs.serialize({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### description: \`string\` +##### description: \`string\` A description of the model config. -##### name: \`string\` +##### name: \`string\` A friendly display name for the model config. If not provided, a name will be generated. -##### provider: [\`ModelProviders\`](./models/model-providers.ts) +##### provider: [\`ModelProviders\`](./models/model-providers.ts) The company providing the underlying model service. -##### model: \`string\` +##### model: \`string\` The model instance used. E.g. text-davinci-002. -##### max_tokens: \`number\` +##### max_tokens: \`number\` The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt -##### temperature: \`number\` +##### temperature: \`number\` What sampling temperature to use when making a generation. Higher values means the model will be more creative. -##### top_p: \`number\` +##### top_p: \`number\` An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. -##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) +##### stop: [\`StopSequenceSProperty\`](./models/stop-sequence-sproperty.ts) -##### presence_penalty: \`number\` +##### presence_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. -##### frequency_penalty: \`number\` +##### frequency_penalty: \`number\` Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. -##### other: \`object\` +##### other: \`object\` Other parameter values to be passed to the provider call. -##### seed: \`number\` +##### seed: \`number\` If specified, model will make a best effort to sample deterministically, but it is not guaranteed. -##### response_format: [\`ResponseFormat\`](./models/response-format.ts) +##### response_format: [\`ResponseFormat\`](./models/response-format.ts) The format of the response. Only type json_object is currently supported for chat. -##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) +##### endpoint: [\`ModelEndpoints\`](./models/model-endpoints.ts) The provider model endpoint used. -##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] +##### chat_template: [\`ChatMessage\`](./models/chat-message.ts)[] Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: {{INPUT_NAME}}. -##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] +##### tools: [\`ToolsEquivalentToOpenAIFunctionsPropertyInner\`](./models/tools-equivalent-to-open-aifunctions-property-inner.ts)[] Make tools available to OpenAIs chat model as functions. -##### prompt_template: \`string\` +##### prompt_template: \`string\` Prompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/model-configs/serialize\` \`POST\` @@ -2852,37 +2852,37 @@ Prompt template that will take your specified inputs to form your final request --- -### \`humanloop.projects.create\` +### \`humanloop.projects.create\` Create a new project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.projects.create({ - name: \\"name_example\\", + name: "name_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### name: \`string\` +##### name: \`string\` Unique project name. -##### feedback_types: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] +##### feedback_types: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] Feedback types to be created. -##### directory_id: \`string\` +##### directory_id: \`string\` ID of directory to assign project to. Starts with \`dir_\`. If not provided, the project will be created in the root directory. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects\` \`POST\` @@ -2891,42 +2891,42 @@ ID of directory to assign project to. Starts with \`dir_\`. If not provided, the --- -### \`humanloop.projects.createFeedbackType\` +### \`humanloop.projects.createFeedbackType\` Create Feedback Type -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createFeedbackTypeResponse = await humanloop.projects.createFeedbackType({ - id: \\"id_example\\", - type: \\"type_example\\", + id: "id_example", + type: "type_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### type: \`string\` +##### type: \`string\` The type of feedback to update. -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### values: [\`FeedbackLabelRequest\`](./models/feedback-label-request.ts)[] +##### values: [\`FeedbackLabelRequest\`](./models/feedback-label-request.ts)[] -The feedback values to be available. This field should only be populated when updating a \\\\\\\\\\\\'select\\\\\\\\\\\\' or \\\\\\\\\\\\'multi_select\\\\\\\\\\\\' feedback class. +The feedback values to be available. This field should only be populated when updating a \\\\\\'select\\\\\\' or \\\\\\'multi_select\\\\\\' feedback class. -##### class: [\`FeedbackClass\`](./models/feedback-class.ts) +##### class: [\`FeedbackClass\`](./models/feedback-class.ts) -The data type associated to this feedback type; whether it is a \\\\\\\\\\\\'text\\\\\\\\\\\\'/\\\\\\\\\\\\'select\\\\\\\\\\\\'/\\\\\\\\\\\\'multi_select\\\\\\\\\\\\'. This is optional when updating the default feedback types (i.e. when \`type\` is \\\\\\\\\\\\'rating\\\\\\\\\\\\', \\\\\\\\\\\\'action\\\\\\\\\\\\' or \\\\\\\\\\\\'issue\\\\\\\\\\\\'). +The data type associated to this feedback type; whether it is a \\\\\\'text\\\\\\'/\\\\\\'select\\\\\\'/\\\\\\'multi_select\\\\\\'. This is optional when updating the default feedback types (i.e. when \`type\` is \\\\\\'rating\\\\\\', \\\\\\'action\\\\\\' or \\\\\\'issue\\\\\\'). -#### 🔄 Return +#### 🔄 Return [FeedbackTypeModel](./models/feedback-type-model.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/feedback-types\` \`POST\` @@ -2935,35 +2935,35 @@ The data type associated to this feedback type; whether it is a \\\\\\\\\\\\'tex --- -### \`humanloop.projects.deactivateConfig\` +### \`humanloop.projects.deactivateConfig\` Remove the project's active config, if set. This has no effect if the project does not have an active model config set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deactivateConfigResponse = await humanloop.projects.deactivateConfig({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'production\\\\'. If not provided, will delete the active config for the default environment. +Name for the environment. E.g. \\'production\\'. If not provided, will delete the active config for the default environment. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-config\` \`DELETE\` @@ -2972,36 +2972,36 @@ Name for the environment. E.g. \\\\'production\\\\'. If not provided, will delet --- -### \`humanloop.projects.deactivateExperiment\` +### \`humanloop.projects.deactivateExperiment\` Remove the project's active experiment, if set. This has no effect if the project does not have an active experiment set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deactivateExperimentResponse = await humanloop.projects.deactivateExperiment({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return the experiment for the default environment. +Name for the environment. E.g. \\'producton\\'. If not provided, will return the experiment for the default environment. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-experiment\` \`DELETE\` @@ -3010,25 +3010,25 @@ Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return --- -### \`humanloop.projects.delete\` +### \`humanloop.projects.delete\` Delete a specific project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteResponse = await humanloop.projects.delete({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`DELETE\` @@ -3037,29 +3037,29 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.deleteDeployedConfig\` +### \`humanloop.projects.deleteDeployedConfig\` Remove the model config deployed to environment. This has no effect if the project does not have an active model config set. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteDeployedConfigResponse = await humanloop.projects.deleteDeployedConfig({ - projectId: \\"projectId_example\\", - environmentId: \\"environmentId_example\\", + projectId: "projectId_example", + environmentId: "environmentId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### environmentId: \`string\` +##### environmentId: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/deployed-config/{environment_id}\` \`DELETE\` @@ -3068,41 +3068,41 @@ const deleteDeployedConfigResponse = --- -### \`humanloop.projects.deployConfig\` +### \`humanloop.projects.deployConfig\` Deploy a model config to an environment. If the environment already has a model config deployed, it will be replaced. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deployConfigResponse = await humanloop.projects.deployConfig({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` -##### config_id: \`string\` +##### config_id: \`string\` Model config unique identifier generated by Humanloop. -##### experiment_id: \`string\` +##### experiment_id: \`string\` String ID of experiment. Starts with \`exp_\`. -##### environments: [\`EnvironmentRequest\`](./models/environment-request.ts)[] +##### environments: [\`EnvironmentRequest\`](./models/environment-request.ts)[] List of environments to associate with the model config. -#### 🔄 Return +#### 🔄 Return [EnvironmentProjectConfigResponse](./models/environment-project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{project_id}/deploy-config\` \`PATCH\` @@ -3111,42 +3111,42 @@ List of environments to associate with the model config. --- -### \`humanloop.projects.export\` +### \`humanloop.projects.export\` Export all logged datapoints associated to your project. Results are paginated and sorts the datapoints based on \`created_at\` in descending order. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const exportResponse = await humanloop.projects.export({ - id: \\"id_example\\", + id: "id_example", page: 0, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### page: \`number\` +##### page: \`number\` Page offset for pagination. -##### size: \`number\` +##### size: \`number\` Page size for pagination. Number of logs to export. -#### 🔄 Return +#### 🔄 Return [PaginatedDataLogResponse](./models/paginated-data-log-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/export\` \`POST\` @@ -3155,29 +3155,29 @@ Page size for pagination. Number of logs to export. --- -### \`humanloop.projects.get\` +### \`humanloop.projects.get\` Get a specific project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.projects.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`GET\` @@ -3186,36 +3186,36 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.getActiveConfig\` +### \`humanloop.projects.getActiveConfig\` Retrieves a config to use to execute your model. A config will be selected based on the project's active config/experiment settings. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getActiveConfigResponse = await humanloop.projects.getActiveConfig({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### environment: \`string\` +##### environment: \`string\` -Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return the active config for the default environment. +Name for the environment. E.g. \\'producton\\'. If not provided, will return the active config for the default environment. -#### 🔄 Return +#### 🔄 Return [GetModelConfigResponse](./models/get-model-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/active-config\` \`GET\` @@ -3224,11 +3224,11 @@ Name for the environment. E.g. \\\\'producton\\\\'. If not provided, will return --- -### \`humanloop.projects.list\` +### \`humanloop.projects.list\` Get a paginated list of projects. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.projects.list({ @@ -3237,37 +3237,37 @@ const listResponse = await humanloop.projects.list({ }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### page: \`number\` +##### page: \`number\` Page offset for pagination. -##### size: \`number\` +##### size: \`number\` Page size for pagination. Number of projects to fetch. -##### filter: \`string\` +##### filter: \`string\` Case-insensitive filter for project name. -##### userFilter: \`string\` +##### userFilter: \`string\` Case-insensitive filter for users in the project. This filter matches against both email address and name of users. -##### sortBy: [\`ProjectSortBy\`](./models/project-sort-by.ts) +##### sortBy: [\`ProjectSortBy\`](./models/project-sort-by.ts) Field to sort projects by -##### order: [\`SortOrder\`](./models/sort-order.ts) +##### order: [\`SortOrder\`](./models/sort-order.ts) Direction to sort by. -#### 🔄 Return +#### 🔄 Return [PaginatedDataProjectResponse](./models/paginated-data-project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects\` \`GET\` @@ -3276,31 +3276,31 @@ Direction to sort by. --- -### \`humanloop.projects.listConfigs\` +### \`humanloop.projects.listConfigs\` Get an array of configs associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listConfigsResponse = await humanloop.projects.listConfigs({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### evaluationAggregates: \`boolean\` +##### evaluationAggregates: \`boolean\` -#### 🔄 Return +#### 🔄 Return [ProjectConfigResponse](./models/project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/configs\` \`GET\` @@ -3309,30 +3309,30 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.listDeployedConfigs\` +### \`humanloop.projects.listDeployedConfigs\` Get an array of environments with the deployed configs associated to your project. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listDeployedConfigsResponse = await humanloop.projects.listDeployedConfigs({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -#### 🔄 Return +#### 🔄 Return [EnvironmentProjectConfigResponse](./models/environment-project-config-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/deployed-configs\` \`GET\` @@ -3341,7 +3341,7 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.projects.update\` +### \`humanloop.projects.update\` Update a specific project. @@ -3355,45 +3355,45 @@ Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in \`positive_labels\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateResponse = await humanloop.projects.update({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### name: \`string\` +##### name: \`string\` The new unique project name. Caution, if you are using the project name as the unique identifier in your API calls, changing the name will break the calls. -##### active_experiment_id: \`string\` +##### active_experiment_id: \`string\` -ID for an experiment to set as the project\\\\\\\\\\\\'s active deployment. Starts with \\\\\\\\\\\\'exp_\\\\\\\\\\\\'. At most one of \\\\\\\\\\\\'active_experiment_id\\\\\\\\\\\\' and \\\\\\\\\\\\'active_model_config_id\\\\\\\\\\\\' can be set. +ID for an experiment to set as the project\\\\\\'s active deployment. Starts with \\\\\\'exp_\\\\\\'. At most one of \\\\\\'active_experiment_id\\\\\\' and \\\\\\'active_model_config_id\\\\\\' can be set. -##### active_config_id: \`string\` +##### active_config_id: \`string\` -ID for a config to set as the project\\\\\\\\\\\\'s active deployment. Starts with \\\\\\\\\\\\'config_\\\\\\\\\\\\'. At most one of \\\\\\\\\\\\'active_experiment_id\\\\\\\\\\\\' and \\\\\\\\\\\\'active_config_id\\\\\\\\\\\\' can be set. +ID for a config to set as the project\\\\\\'s active deployment. Starts with \\\\\\'config_\\\\\\'. At most one of \\\\\\'active_experiment_id\\\\\\' and \\\\\\'active_config_id\\\\\\' can be set. -##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] +##### positive_labels: [\`PositiveLabel\`](./models/positive-label.ts)[] The full list of labels to treat as positive user feedback. -##### directory_id: \`string\` +##### directory_id: \`string\` ID of directory to assign project to. Starts with \`dir_\`. -#### 🔄 Return +#### 🔄 Return [ProjectResponse](./models/project-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}\` \`PATCH\` @@ -3402,7 +3402,7 @@ ID of directory to assign project to. Starts with \`dir_\`. --- -### \`humanloop.projects.updateFeedbackTypes\` +### \`humanloop.projects.updateFeedbackTypes\` Update feedback types. @@ -3412,33 +3412,33 @@ feedback types/categorical values. This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateFeedbackTypesResponse = await humanloop.projects.updateFeedbackTypes({ - id: \\"id_example\\", + id: "id_example", requestBody: [ { - type: \\"type_example\\", + type: "type_example", }, ], }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of project. Starts with \`pr_\`. -##### requestBody: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] +##### requestBody: [\`FeedbackTypeRequest\`](./models/feedback-type-request.ts)[] -#### 🔄 Return +#### 🔄 Return [FeedbackTypeModel](./models/feedback-type-model.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/projects/{id}/feedback-types\` \`PATCH\` @@ -3447,23 +3447,23 @@ String ID of project. Starts with \`pr_\`. --- -### \`humanloop.sessions.create\` +### \`humanloop.sessions.create\` Create a new session. Returns a session ID that can be used to log datapoints to the session. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const createResponse = await humanloop.sessions.create(); \`\`\` -#### 🔄 Return +#### 🔄 Return [CreateSessionResponse](./models/create-session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions\` \`POST\` @@ -3472,29 +3472,29 @@ const createResponse = await humanloop.sessions.create(); --- -### \`humanloop.sessions.get\` +### \`humanloop.sessions.get\` Get a session by ID. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await humanloop.sessions.get({ - id: \\"id_example\\", + id: "id_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### id: \`string\` +##### id: \`string\` String ID of session to return. Starts with \`sesh_\`. -#### 🔄 Return +#### 🔄 Return [SessionResponse](./models/session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions/{id}\` \`GET\` @@ -3503,39 +3503,39 @@ String ID of session to return. Starts with \`sesh_\`. --- -### \`humanloop.sessions.list\` +### \`humanloop.sessions.list\` Get a page of sessions. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listResponse = await humanloop.sessions.list({ - projectId: \\"projectId_example\\", + projectId: "projectId_example", page: 1, size: 10, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### projectId: \`string\` +##### projectId: \`string\` String ID of project to return sessions for. Sessions that contain any datapoints associated to this project will be returned. Starts with \`pr_\`. -##### page: \`number\` +##### page: \`number\` Page to fetch. Starts from 1. -##### size: \`number\` +##### size: \`number\` Number of sessions to retrieve. -#### 🔄 Return +#### 🔄 Return [PaginatedDataSessionResponse](./models/paginated-data-session-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessions\` \`GET\` @@ -3544,7 +3544,7 @@ Number of sessions to retrieve. --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows-old-axios.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows-old-axios.test.ts.snap index 65e0f445fa..4e945cde49 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows-old-axios.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows-old-axios.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`leap-workflows/typescript-leap-workflows-old-axios 1`] = ` -"# @leap-ai/workflows +"# @leap-ai/workflows The Leap Workflows API allows developers to run workflows, fetch workflow runs, and provide other utility functions related to workflow runs. Please use the X-Api-Key for authenticated requests. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@leap-ai/workflows/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://tryleap.ai/) -## Table of Contents +## Table of Contents @@ -20,13 +20,13 @@ The Leap Workflows API allows developers to run workflows, fetch workflow runs, -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -53,50 +53,50 @@ yarn add @leap-ai/workflows
-## Getting Started +## Getting Started \`\`\`typescript -import { Leap } from \\"@leap-ai/workflows\\"; +import { Leap } from "@leap-ai/workflows"; const leap = new Leap({ // Defining the base path is optional and defaults to https://api.workflows.tryleap.ai - // basePath: \\"https://api.workflows.tryleap.ai\\", - apiKey: \\"API_KEY\\", + // basePath: "https://api.workflows.tryleap.ai", + apiKey: "API_KEY", }); const getWorkflowRunResponse = await leap.workflowRuns.getWorkflowRun({ - workflowRunId: \\"workflowRunId_example\\", + workflowRunId: "workflowRunId_example", }); console.log(getWorkflowRunResponse); \`\`\` -## Reference +## Reference -### \`leap.workflowRuns.getWorkflowRun\` +### \`leap.workflowRuns.getWorkflowRun\` This endpoint retrieves the details of a specific workflow run using its \`workflow_run_id\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getWorkflowRunResponse = await leap.workflowRuns.getWorkflowRun({ - workflowRunId: \\"workflowRunId_example\\", + workflowRunId: "workflowRunId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflowRunId: \`string\` +##### workflowRunId: \`string\` The ID of the workflow run to retrieve. -#### 🔄 Return +#### 🔄 Return [WorkflowRunEntity](./models/workflow-run-entity.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs/{workflow_run_id}\` \`GET\` @@ -105,38 +105,38 @@ The ID of the workflow run to retrieve. --- -### \`leap.workflowRuns.workflow\` +### \`leap.workflowRuns.workflow\` This endpoint lets the user run a specified workflow with the provided workflow definition. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const workflowResponse = await leap.workflowRuns.workflow({ - workflow_id: \\"123e4567-e89b-12d3-a456-426614174000\\", - webhook_url: \\"https://myapp.com/webhook\\", + workflow_id: "123e4567-e89b-12d3-a456-426614174000", + webhook_url: "https://myapp.com/webhook", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflow_id: \`string\` +##### workflow_id: \`string\` The UUID of the workflow to be run. -##### webhook_url: \`string\` +##### webhook_url: \`string\` The URL to which the workflow results should be sent to on completion. -##### input: \`{ [key: string]: any; }\` +##### input: \`{ [key: string]: any; }\` Variables that the workflow can use globally and their values. -#### 🔄 Return +#### 🔄 Return [WorkflowRunEntity](./models/workflow-run-entity.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs\` \`POST\` @@ -145,7 +145,7 @@ Variables that the workflow can use globally and their values. --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows.test.ts.snap index 959e41205f..162b8bce0f 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-leap-workflows.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`leap-workflows/typescript-leap-workflows 1`] = ` -"# @leap-ai/workflows +"# @leap-ai/workflows The Leap Workflows API allows developers to run workflows, fetch workflow runs, and provide other utility functions related to workflow runs. Please use the X-Api-Key for authenticated requests. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@leap-ai/workflows/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://tryleap.ai/) -## Table of Contents +## Table of Contents @@ -20,13 +20,13 @@ The Leap Workflows API allows developers to run workflows, fetch workflow runs, -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -53,50 +53,50 @@ yarn add @leap-ai/workflows
-## Getting Started +## Getting Started \`\`\`typescript -import { Leap } from \\"@leap-ai/workflows\\"; +import { Leap } from "@leap-ai/workflows"; const leap = new Leap({ // Defining the base path is optional and defaults to https://api.workflows.tryleap.ai - // basePath: \\"https://api.workflows.tryleap.ai\\", - apiKey: \\"API_KEY\\", + // basePath: "https://api.workflows.tryleap.ai", + apiKey: "API_KEY", }); const getWorkflowRunResponse = await leap.workflowRuns.getWorkflowRun({ - workflowRunId: \\"workflowRunId_example\\", + workflowRunId: "workflowRunId_example", }); console.log(getWorkflowRunResponse); \`\`\` -## Reference +## Reference -### \`leap.workflowRuns.getWorkflowRun\` +### \`leap.workflowRuns.getWorkflowRun\` This endpoint retrieves the details of a specific workflow run using its \`workflow_run_id\`. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getWorkflowRunResponse = await leap.workflowRuns.getWorkflowRun({ - workflowRunId: \\"workflowRunId_example\\", + workflowRunId: "workflowRunId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflowRunId: \`string\` +##### workflowRunId: \`string\` The ID of the workflow run to retrieve. -#### 🔄 Return +#### 🔄 Return [WorkflowRunEntity](./models/workflow-run-entity.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs/{workflow_run_id}\` \`GET\` @@ -105,38 +105,38 @@ The ID of the workflow run to retrieve. --- -### \`leap.workflowRuns.workflow\` +### \`leap.workflowRuns.workflow\` This endpoint lets the user run a specified workflow with the provided workflow definition. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const workflowResponse = await leap.workflowRuns.workflow({ - workflow_id: \\"123e4567-e89b-12d3-a456-426614174000\\", - webhook_url: \\"https://myapp.com/webhook\\", + workflow_id: "123e4567-e89b-12d3-a456-426614174000", + webhook_url: "https://myapp.com/webhook", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### workflow_id: \`string\` +##### workflow_id: \`string\` The UUID of the workflow to be run. -##### webhook_url: \`string\` +##### webhook_url: \`string\` The URL to which the workflow results should be sent to on completion. -##### input: \`{ [key: string]: any; }\` +##### input: \`{ [key: string]: any; }\` Variables that the workflow can use globally and their values. -#### 🔄 Return +#### 🔄 Return [WorkflowRunEntity](./models/workflow-run-entity.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/v1/runs\` \`POST\` @@ -145,7 +145,7 @@ Variables that the workflow can use globally and their values. --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-array-request.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-array-request.test.ts.snap index d3ea0e9cd6..3c64966ce2 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-array-request.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-array-request.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-multipart-form-data-array-request 1`] = ` -"# typescript-multipart-form-data-array-request +"# typescript-multipart-form-data-array-request A simple API based for testing typescript-multipart-form-data-array-request. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-multipart-form-data-array-request/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-multipart-form-data-array-request. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-multipart-form-data-array-request
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptMultipartFormDataArrayRequestClient } from \\"typescript-multipart-form-data-array-request\\"; +import { TypescriptMultipartFormDataArrayRequestClient } from "typescript-multipart-form-data-array-request"; const typescriptmultipartformdataarrayrequestclient = new TypescriptMultipartFormDataArrayRequestClient({ // Defining the base path is optional and defaults to https://typescript-multipart-form-data-array-request.konfigthis.com - // basePath: \\"https://typescript-multipart-form-data-array-request.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-multipart-form-data-array-request.konfigthis.com", + apiKey: "API_KEY", }); const uploadFilesResponse = @@ -70,25 +70,25 @@ const uploadFilesResponse = console.log(uploadFilesResponse); \`\`\` -## Reference +## Reference -### \`typescriptmultipartformdataarrayrequestclient.test.uploadFiles\` +### \`typescriptmultipartformdataarrayrequestclient.test.uploadFiles\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadFilesResponse = await typescriptmultipartformdataarrayrequestclient.test.uploadFiles([{}]); \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UploadFileRequestInner\`](./models/upload-file-request-inner.ts)[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload-files\` \`POST\` @@ -97,7 +97,7 @@ const uploadFilesResponse = --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-free-form-object.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-free-form-object.test.ts.snap index 9f9cd77ae7..bd7942e330 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-free-form-object.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-multipart-form-data-free-form-object.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-multipart-form-data-free-form-object 1`] = ` -"# typescript-multipart-form-data-free-form-object +"# typescript-multipart-form-data-free-form-object A simple API based for testing typescript-multipart-form-data-free-form-object. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-multipart-form-data-free-form-object/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-multipart-form-data-free-form-object. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-multipart-form-data-free-form-object
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptMultipartFormDataFreeFormObjectClient } from \\"typescript-multipart-form-data-free-form-object\\"; +import { TypescriptMultipartFormDataFreeFormObjectClient } from "typescript-multipart-form-data-free-form-object"; const typescriptmultipartformdatafreeformobjectclient = new TypescriptMultipartFormDataFreeFormObjectClient({ // Defining the base path is optional and defaults to https://typescript-multipart-form-data-free-form-object.konfigthis.com - // basePath: \\"https://typescript-multipart-form-data-free-form-object.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-multipart-form-data-free-form-object.konfigthis.com", + apiKey: "API_KEY", }); const uploadFilesResponse = @@ -70,25 +70,25 @@ const uploadFilesResponse = console.log(uploadFilesResponse); \`\`\` -## Reference +## Reference -### \`typescriptmultipartformdatafreeformobjectclient.test.uploadFiles\` +### \`typescriptmultipartformdatafreeformobjectclient.test.uploadFiles\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const uploadFilesResponse = await typescriptmultipartformdatafreeformobjectclient.test.uploadFiles([{}]); \`\`\` -#### ⚙️ Request Body +#### ⚙️ Request Body [\`UploadFileRequestInner\`](./models/upload-file-request-inner.ts)[] -#### 🌐 Endpoint +#### 🌐 Endpoint \`/upload-files\` \`POST\` @@ -97,7 +97,7 @@ const uploadFilesResponse = --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher-old-axios.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher-old-axios.test.ts.snap index e5a461a57a..f7aa4ac357 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher-old-axios.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher-old-axios.test.ts.snap @@ -1,13 +1,13 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-newscatcher-old-axios 1`] = ` -"# newscatcherapi-typescript-sdk +"# newscatcherapi-typescript-sdk

Visit our website https://newscatcherapi.com [![npm](https://img.shields.io/badge/npm-v6.0.0-blue)](https://www.npmjs.com/package/newscatcherapi-typescript-sdk/v/6.0.0) -## Table of Contents +## Table of Contents @@ -29,13 +29,13 @@ exports[`typescript-newscatcher-old-axios 1`] = ` -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -62,21 +62,21 @@ yarn add newscatcherapi-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -import { Newscatcher } from \\"newscatcherapi-typescript-sdk\\"; +import { Newscatcher } from "newscatcherapi-typescript-sdk"; const newscatcher = new Newscatcher({ // Defining the base path is optional and defaults to https://v3-api.newscatcherapi.com - // basePath: \\"https://v3-api.newscatcherapi.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://v3-api.newscatcherapi.com", + apiKey: "API_KEY", }); const getResponse = await newscatcher.authors.get({ - authorName: \\"authorName_example\\", + authorName: "authorName_example", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); @@ -84,98 +84,98 @@ const getResponse = await newscatcher.authors.get({ console.log(getResponse); \`\`\` -## Reference +## Reference -### \`newscatcher.authors.get\` +### \`newscatcher.authors.get\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.authors.get({ - authorName: \\"authorName_example\\", + authorName: "authorName_example", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorName: \`string\` +##### authorName: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### nerName: \`string\` +##### nerName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [AuthorsGetResponse](./models/authors-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`GET\` @@ -184,95 +184,95 @@ const getResponse = await newscatcher.authors.get({ --- -### \`newscatcher.authors.post\` +### \`newscatcher.authors.post\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.authors.post({ - author_name: \\"author_name_example\\", + author_name: "author_name_example", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### author_name: \`string\` +##### author_name: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ner_name: \`string\` +##### ner_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [AuthorsPostResponse](./models/authors-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`POST\` @@ -281,94 +281,94 @@ const postResponse = await newscatcher.authors.post({ --- -### \`newscatcher.latestHeadlines.get\` +### \`newscatcher.latestHeadlines.get\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.latestHeadlines.get({ - when: \\"7d\\", + when: "7d", byParseDate: false, page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`string\` +##### when: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### theme: \`string\` +##### theme: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### clusteringEnabled: \`boolean\` +##### clusteringEnabled: \`boolean\` -##### clusteringThreshold: \`number\` +##### clusteringThreshold: \`number\` -##### clusteringVariable: \`string\` +##### clusteringVariable: \`string\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### orgEntityName: \`string\` +##### orgEntityName: \`string\` -##### perEntityName: \`string\` +##### perEntityName: \`string\` -##### locEntityName: \`string\` +##### locEntityName: \`string\` -##### miscEntityName: \`string\` +##### miscEntityName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [LatestHeadlinesGetResponse](./models/latest-headlines-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`GET\` @@ -377,94 +377,94 @@ const getResponse = await newscatcher.latestHeadlines.get({ --- -### \`newscatcher.latestHeadlines.post\` +### \`newscatcher.latestHeadlines.post\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.latestHeadlines.post({ - when: \\"7d\\", + when: "7d", by_parse_date: false, page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`string\` +##### when: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### theme: \`string\` +##### theme: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### clustering_enabled: \`boolean\` +##### clustering_enabled: \`boolean\` -##### clustering_threshold: \`number\` +##### clustering_threshold: \`number\` -##### clustering_variable: \`string\` +##### clustering_variable: \`string\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### ORG_entity_name: \`string\` +##### ORG_entity_name: \`string\` -##### PER_entity_name: \`string\` +##### PER_entity_name: \`string\` -##### LOC_entity_name: \`string\` +##### LOC_entity_name: \`string\` -##### MISC_entity_name: \`string\` +##### MISC_entity_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [LatestHeadlinesPostResponse](./models/latest-headlines-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`POST\` @@ -473,110 +473,110 @@ const postResponse = await newscatcher.latestHeadlines.post({ --- -### \`newscatcher.search.get\` +### \`newscatcher.search.get\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.search.get({ - q: \\"q_example\\", - searchIn: \\"title_content\\", + q: "q_example", + searchIn: "title_content", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### searchIn: \`string\` +##### searchIn: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### clusteringEnabled: \`boolean\` +##### clusteringEnabled: \`boolean\` -##### clusteringThreshold: \`number\` +##### clusteringThreshold: \`number\` -##### clusteringVariable: \`string\` +##### clusteringVariable: \`string\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### orgEntityName: \`string\` +##### orgEntityName: \`string\` -##### perEntityName: \`string\` +##### perEntityName: \`string\` -##### locEntityName: \`string\` +##### locEntityName: \`string\` -##### miscEntityName: \`string\` +##### miscEntityName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchGetResponse](./models/search-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`GET\` @@ -585,110 +585,110 @@ const getResponse = await newscatcher.search.get({ --- -### \`newscatcher.search.post\` +### \`newscatcher.search.post\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.search.post({ - q: \\"q_example\\", - search_in: \\"title_content\\", + q: "q_example", + search_in: "title_content", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### search_in: \`string\` +##### search_in: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### clustering_enabled: \`boolean\` +##### clustering_enabled: \`boolean\` -##### clustering_threshold: \`number\` +##### clustering_threshold: \`number\` -##### clustering_variable: \`string\` +##### clustering_variable: \`string\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ORG_entity_name: \`string\` +##### ORG_entity_name: \`string\` -##### PER_entity_name: \`string\` +##### PER_entity_name: \`string\` -##### LOC_entity_name: \`string\` +##### LOC_entity_name: \`string\` -##### MISC_entity_name: \`string\` +##### MISC_entity_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchPostResponse](./models/search-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`POST\` @@ -697,107 +697,107 @@ const postResponse = await newscatcher.search.post({ --- -### \`newscatcher.searchSimilar.get\` +### \`newscatcher.searchSimilar.get\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.searchSimilar.get({ - q: \\"q_example\\", - searchIn: \\"title_content\\", + q: "q_example", + searchIn: "title_content", includeSimilarDocuments: false, similarDocumentsNumber: 5, - similarDocumentsFields: \\"title,content\\", + similarDocumentsFields: "title,content", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### searchIn: \`string\` +##### searchIn: \`string\` -##### includeSimilarDocuments: \`boolean\` +##### includeSimilarDocuments: \`boolean\` -##### similarDocumentsNumber: \`number\` +##### similarDocumentsNumber: \`number\` -##### similarDocumentsFields: \`string\` +##### similarDocumentsFields: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### nerName: \`string\` +##### nerName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchSimilarGetResponse](./models/search-similar-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`GET\` @@ -806,107 +806,107 @@ const getResponse = await newscatcher.searchSimilar.get({ --- -### \`newscatcher.searchSimilar.post\` +### \`newscatcher.searchSimilar.post\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.searchSimilar.post({ - q: \\"q_example\\", - search_in: \\"title_content\\", + q: "q_example", + search_in: "title_content", include_similar_documents: false, similar_documents_number: 5, - similar_documents_fields: \\"title,content\\", + similar_documents_fields: "title,content", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### search_in: \`string\` +##### search_in: \`string\` -##### include_similar_documents: \`boolean\` +##### include_similar_documents: \`boolean\` -##### similar_documents_number: \`number\` +##### similar_documents_number: \`number\` -##### similar_documents_fields: \`string\` +##### similar_documents_fields: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ner_name: \`string\` +##### ner_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchSimilarPostResponse](./models/search-similar-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`POST\` @@ -915,27 +915,27 @@ const postResponse = await newscatcher.searchSimilar.post({ --- -### \`newscatcher.sources.get\` +### \`newscatcher.sources.get\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.sources.get({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`string\` +##### lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -#### 🔄 Return +#### 🔄 Return [SourceResponse](./models/source-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`GET\` @@ -944,27 +944,27 @@ const getResponse = await newscatcher.sources.get({}); --- -### \`newscatcher.sources.post\` +### \`newscatcher.sources.post\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.sources.post({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`string\` +##### lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -#### 🔄 Return +#### 🔄 Return [SourceResponse](./models/source-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`POST\` @@ -973,21 +973,21 @@ const postResponse = await newscatcher.sources.post({}); --- -### \`newscatcher.subscription.get\` +### \`newscatcher.subscription.get\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.subscription.get(); \`\`\` -#### 🔄 Return +#### 🔄 Return [SubscriptionResponse](./models/subscription-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`GET\` @@ -996,21 +996,21 @@ const getResponse = await newscatcher.subscription.get(); --- -### \`newscatcher.subscription.post\` +### \`newscatcher.subscription.post\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.subscription.post(); \`\`\` -#### 🔄 Return +#### 🔄 Return [SubscriptionResponse](./models/subscription-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`POST\` @@ -1019,7 +1019,7 @@ const postResponse = await newscatcher.subscription.post(); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher.test.ts.snap index c6efe38526..6eaa32c442 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-newscatcher.test.ts.snap @@ -1,13 +1,13 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-newscatcher 1`] = ` -"# newscatcherapi-typescript-sdk +"# newscatcherapi-typescript-sdk

Visit our website https://newscatcherapi.com [![npm](https://img.shields.io/badge/npm-v6.0.0-blue)](https://www.npmjs.com/package/newscatcherapi-typescript-sdk/v/6.0.0) -## Table of Contents +## Table of Contents @@ -29,13 +29,13 @@ exports[`typescript-newscatcher 1`] = ` -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -62,21 +62,21 @@ yarn add newscatcherapi-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -import { Newscatcher } from \\"newscatcherapi-typescript-sdk\\"; +import { Newscatcher } from "newscatcherapi-typescript-sdk"; const newscatcher = new Newscatcher({ // Defining the base path is optional and defaults to https://v3-api.newscatcherapi.com - // basePath: \\"https://v3-api.newscatcherapi.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://v3-api.newscatcherapi.com", + apiKey: "API_KEY", }); const getResponse = await newscatcher.authors.get({ - authorName: \\"authorName_example\\", + authorName: "authorName_example", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); @@ -84,98 +84,98 @@ const getResponse = await newscatcher.authors.get({ console.log(getResponse); \`\`\` -## Reference +## Reference -### \`newscatcher.authors.get\` +### \`newscatcher.authors.get\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.authors.get({ - authorName: \\"authorName_example\\", + authorName: "authorName_example", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorName: \`string\` +##### authorName: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### nerName: \`string\` +##### nerName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [AuthorsGetResponse](./models/authors-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`GET\` @@ -184,95 +184,95 @@ const getResponse = await newscatcher.authors.get({ --- -### \`newscatcher.authors.post\` +### \`newscatcher.authors.post\` This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.authors.post({ - author_name: \\"author_name_example\\", + author_name: "author_name_example", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### author_name: \`string\` +##### author_name: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ner_name: \`string\` +##### ner_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [AuthorsPostResponse](./models/authors-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/authors\` \`POST\` @@ -281,94 +281,94 @@ const postResponse = await newscatcher.authors.post({ --- -### \`newscatcher.latestHeadlines.get\` +### \`newscatcher.latestHeadlines.get\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.latestHeadlines.get({ - when: \\"7d\\", + when: "7d", byParseDate: false, page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`string\` +##### when: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### theme: \`string\` +##### theme: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### clusteringEnabled: \`boolean\` +##### clusteringEnabled: \`boolean\` -##### clusteringThreshold: \`number\` +##### clusteringThreshold: \`number\` -##### clusteringVariable: \`string\` +##### clusteringVariable: \`string\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### orgEntityName: \`string\` +##### orgEntityName: \`string\` -##### perEntityName: \`string\` +##### perEntityName: \`string\` -##### locEntityName: \`string\` +##### locEntityName: \`string\` -##### miscEntityName: \`string\` +##### miscEntityName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [LatestHeadlinesGetResponse](./models/latest-headlines-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`GET\` @@ -377,94 +377,94 @@ const getResponse = await newscatcher.latestHeadlines.get({ --- -### \`newscatcher.latestHeadlines.post\` +### \`newscatcher.latestHeadlines.post\` This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.latestHeadlines.post({ - when: \\"7d\\", + when: "7d", by_parse_date: false, page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### when: \`string\` +##### when: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### theme: \`string\` +##### theme: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### clustering_enabled: \`boolean\` +##### clustering_enabled: \`boolean\` -##### clustering_threshold: \`number\` +##### clustering_threshold: \`number\` -##### clustering_variable: \`string\` +##### clustering_variable: \`string\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### ORG_entity_name: \`string\` +##### ORG_entity_name: \`string\` -##### PER_entity_name: \`string\` +##### PER_entity_name: \`string\` -##### LOC_entity_name: \`string\` +##### LOC_entity_name: \`string\` -##### MISC_entity_name: \`string\` +##### MISC_entity_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [LatestHeadlinesPostResponse](./models/latest-headlines-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/latest_headlines\` \`POST\` @@ -473,110 +473,110 @@ const postResponse = await newscatcher.latestHeadlines.post({ --- -### \`newscatcher.search.get\` +### \`newscatcher.search.get\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.search.get({ - q: \\"q_example\\", - searchIn: \\"title_content\\", + q: "q_example", + searchIn: "title_content", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### searchIn: \`string\` +##### searchIn: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### clusteringEnabled: \`boolean\` +##### clusteringEnabled: \`boolean\` -##### clusteringThreshold: \`number\` +##### clusteringThreshold: \`number\` -##### clusteringVariable: \`string\` +##### clusteringVariable: \`string\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### orgEntityName: \`string\` +##### orgEntityName: \`string\` -##### perEntityName: \`string\` +##### perEntityName: \`string\` -##### locEntityName: \`string\` +##### locEntityName: \`string\` -##### miscEntityName: \`string\` +##### miscEntityName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchGetResponse](./models/search-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`GET\` @@ -585,110 +585,110 @@ const getResponse = await newscatcher.search.get({ --- -### \`newscatcher.search.post\` +### \`newscatcher.search.post\` This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.search.post({ - q: \\"q_example\\", - search_in: \\"title_content\\", + q: "q_example", + search_in: "title_content", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### search_in: \`string\` +##### search_in: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### clustering_enabled: \`boolean\` +##### clustering_enabled: \`boolean\` -##### clustering_threshold: \`number\` +##### clustering_threshold: \`number\` -##### clustering_variable: \`string\` +##### clustering_variable: \`string\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ORG_entity_name: \`string\` +##### ORG_entity_name: \`string\` -##### PER_entity_name: \`string\` +##### PER_entity_name: \`string\` -##### LOC_entity_name: \`string\` +##### LOC_entity_name: \`string\` -##### MISC_entity_name: \`string\` +##### MISC_entity_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchPostResponse](./models/search-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search\` \`POST\` @@ -697,107 +697,107 @@ const postResponse = await newscatcher.search.post({ --- -### \`newscatcher.searchSimilar.get\` +### \`newscatcher.searchSimilar.get\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.searchSimilar.get({ - q: \\"q_example\\", - searchIn: \\"title_content\\", + q: "q_example", + searchIn: "title_content", includeSimilarDocuments: false, similarDocumentsNumber: 5, - similarDocumentsFields: \\"title,content\\", + similarDocumentsFields: "title,content", byParseDate: false, - sortBy: \\"relevancy\\", + sortBy: "relevancy", page: 1, pageSize: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### searchIn: \`string\` +##### searchIn: \`string\` -##### includeSimilarDocuments: \`boolean\` +##### includeSimilarDocuments: \`boolean\` -##### similarDocumentsNumber: \`number\` +##### similarDocumentsNumber: \`number\` -##### similarDocumentsFields: \`string\` +##### similarDocumentsFields: \`string\` -##### predefinedSources: \`string\` +##### predefinedSources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### notSources: \`string\` +##### notSources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### notLang: \`string\` +##### notLang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### notCountries: \`string\` +##### notCountries: \`string\` -##### from: [\`From\`](./models/from.ts) +##### from: [\`From\`](./models/from.ts) -##### to: [\`To\`](./models/to.ts) +##### to: [\`To\`](./models/to.ts) -##### byParseDate: \`boolean\` +##### byParseDate: \`boolean\` -##### publishedDatePrecision: \`string\` +##### publishedDatePrecision: \`string\` -##### sortBy: \`string\` +##### sortBy: \`string\` -##### rankedOnly: \`string\` +##### rankedOnly: \`string\` -##### fromRank: \`number\` +##### fromRank: \`number\` -##### toRank: \`number\` +##### toRank: \`number\` -##### isHeadline: \`boolean\` +##### isHeadline: \`boolean\` -##### isPaidContent: \`boolean\` +##### isPaidContent: \`boolean\` -##### parentUrl: \`string\` +##### parentUrl: \`string\` -##### allLinks: \`string\` +##### allLinks: \`string\` -##### allDomainLinks: \`string\` +##### allDomainLinks: \`string\` -##### wordCountMin: \`number\` +##### wordCountMin: \`number\` -##### wordCountMax: \`number\` +##### wordCountMax: \`number\` -##### page: \`number\` +##### page: \`number\` -##### pageSize: \`number\` +##### pageSize: \`number\` -##### includeNlpData: \`boolean\` +##### includeNlpData: \`boolean\` -##### hasNlp: \`boolean\` +##### hasNlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### nerName: \`string\` +##### nerName: \`string\` -##### titleSentimentMin: \`number\` +##### titleSentimentMin: \`number\` -##### titleSentimentMax: \`number\` +##### titleSentimentMax: \`number\` -##### contentSentimentMin: \`number\` +##### contentSentimentMin: \`number\` -##### contentSentimentMax: \`number\` +##### contentSentimentMax: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchSimilarGetResponse](./models/search-similar-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`GET\` @@ -806,107 +806,107 @@ const getResponse = await newscatcher.searchSimilar.get({ --- -### \`newscatcher.searchSimilar.post\` +### \`newscatcher.searchSimilar.post\` This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.searchSimilar.post({ - q: \\"q_example\\", - search_in: \\"title_content\\", + q: "q_example", + search_in: "title_content", include_similar_documents: false, similar_documents_number: 5, - similar_documents_fields: \\"title,content\\", + similar_documents_fields: "title,content", by_parse_date: false, - sort_by: \\"relevancy\\", + sort_by: "relevancy", page: 1, page_size: 100, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### q: \`string\` +##### q: \`string\` -##### search_in: \`string\` +##### search_in: \`string\` -##### include_similar_documents: \`boolean\` +##### include_similar_documents: \`boolean\` -##### similar_documents_number: \`number\` +##### similar_documents_number: \`number\` -##### similar_documents_fields: \`string\` +##### similar_documents_fields: \`string\` -##### predefined_sources: \`string\` +##### predefined_sources: \`string\` -##### sources: \`string\` +##### sources: \`string\` -##### not_sources: \`string\` +##### not_sources: \`string\` -##### lang: \`string\` +##### lang: \`string\` -##### not_lang: \`string\` +##### not_lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -##### not_countries: \`string\` +##### not_countries: \`string\` -##### from_: [\`From\`](./models/from.ts) +##### from_: [\`From\`](./models/from.ts) -##### to_: [\`To\`](./models/to.ts) +##### to_: [\`To\`](./models/to.ts) -##### by_parse_date: \`boolean\` +##### by_parse_date: \`boolean\` -##### published_date_precision: \`string\` +##### published_date_precision: \`string\` -##### sort_by: \`string\` +##### sort_by: \`string\` -##### ranked_only: \`string\` +##### ranked_only: \`string\` -##### from_rank: \`number\` +##### from_rank: \`number\` -##### to_rank: \`number\` +##### to_rank: \`number\` -##### is_headline: \`boolean\` +##### is_headline: \`boolean\` -##### is_paid_content: \`boolean\` +##### is_paid_content: \`boolean\` -##### parent_url: \`string\` +##### parent_url: \`string\` -##### all_links: \`string\` +##### all_links: \`string\` -##### all_domain_links: \`string\` +##### all_domain_links: \`string\` -##### word_count_min: \`number\` +##### word_count_min: \`number\` -##### word_count_max: \`number\` +##### word_count_max: \`number\` -##### page: \`number\` +##### page: \`number\` -##### page_size: \`number\` +##### page_size: \`number\` -##### include_nlp_data: \`boolean\` +##### include_nlp_data: \`boolean\` -##### has_nlp: \`boolean\` +##### has_nlp: \`boolean\` -##### theme: \`string\` +##### theme: \`string\` -##### ner_name: \`string\` +##### ner_name: \`string\` -##### title_sentiment_min: \`number\` +##### title_sentiment_min: \`number\` -##### title_sentiment_max: \`number\` +##### title_sentiment_max: \`number\` -##### content_sentiment_min: \`number\` +##### content_sentiment_min: \`number\` -##### content_sentiment_max: \`number\` +##### content_sentiment_max: \`number\` -#### 🔄 Return +#### 🔄 Return [SearchSimilarPostResponse](./models/search-similar-post-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/search_similar\` \`POST\` @@ -915,27 +915,27 @@ const postResponse = await newscatcher.searchSimilar.post({ --- -### \`newscatcher.sources.get\` +### \`newscatcher.sources.get\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.sources.get({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`string\` +##### lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -#### 🔄 Return +#### 🔄 Return [SourceResponse](./models/source-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`GET\` @@ -944,27 +944,27 @@ const getResponse = await newscatcher.sources.get({}); --- -### \`newscatcher.sources.post\` +### \`newscatcher.sources.post\` This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.sources.post({}); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### lang: \`string\` +##### lang: \`string\` -##### countries: \`string\` +##### countries: \`string\` -#### 🔄 Return +#### 🔄 Return [SourceResponse](./models/source-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/sources\` \`POST\` @@ -973,21 +973,21 @@ const postResponse = await newscatcher.sources.post({}); --- -### \`newscatcher.subscription.get\` +### \`newscatcher.subscription.get\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await newscatcher.subscription.get(); \`\`\` -#### 🔄 Return +#### 🔄 Return [SubscriptionResponse](./models/subscription-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`GET\` @@ -996,21 +996,21 @@ const getResponse = await newscatcher.subscription.get(); --- -### \`newscatcher.subscription.post\` +### \`newscatcher.subscription.post\` This endpoint allows you to get info about your subscription plan. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await newscatcher.subscription.post(); \`\`\` -#### 🔄 Return +#### 🔄 Return [SubscriptionResponse](./models/subscription-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/subscription\` \`POST\` @@ -1019,7 +1019,7 @@ const postResponse = await newscatcher.subscription.post(); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-no-relative-npm-link.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-no-relative-npm-link.test.ts.snap index eb6977625e..99ca7dc4c8 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-no-relative-npm-link.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-no-relative-npm-link.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-no-relative-npm-link 1`] = ` -"# typescript-no-relative-npm-link +"# typescript-no-relative-npm-link A simple API based for testing typescript-no-relative-npm-link. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-no-relative-npm-link/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-no-relative-npm-link. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-no-relative-npm-link
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptNoRelativeNpmLinkClient } from \\"typescript-no-relative-npm-link\\"; +import { TypescriptNoRelativeNpmLinkClient } from "typescript-no-relative-npm-link"; const typescriptnorelativenpmlinkclient = new TypescriptNoRelativeNpmLinkClient( { // Defining the base path is optional and defaults to https://typescript-no-relative-npm-link.konfigthis.com - // basePath: \\"https://typescript-no-relative-npm-link.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-no-relative-npm-link.konfigthis.com", + apiKey: "API_KEY", } ); @@ -70,20 +70,20 @@ const fetchResponse = await typescriptnorelativenpmlinkclient.test.fetch(); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptnorelativenpmlinkclient.test.fetch\` +### \`typescriptnorelativenpmlinkclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptnorelativenpmlinkclient.test.fetch(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -92,7 +92,7 @@ const fetchResponse = await typescriptnorelativenpmlinkclient.test.fetch(); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-oauth-token.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-oauth-token.test.ts.snap index c0790b58a7..4ffad536eb 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-oauth-token.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-oauth-token.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-oauth-token 1`] = ` -"# typescript-oauth-token +"# typescript-oauth-token A simple API based for testing typescript-oauth-token. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-oauth-token/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-oauth-token. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-oauth-token
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptOauthTokenClient } from \\"typescript-oauth-token\\"; +import { TypescriptOauthTokenClient } from "typescript-oauth-token"; const typescriptoauthtokenclient = new TypescriptOauthTokenClient({ // Defining the base path is optional and defaults to https://typescript-oauth-token.konfigthis.com - // basePath: \\"https://typescript-oauth-token.konfigthis.com\\", - oauthClientId: \\"CLIENT_ID\\", - oauthClientSecret: \\"CLIENT_SECRET\\", + // basePath: "https://typescript-oauth-token.konfigthis.com", + oauthClientId: "CLIENT_ID", + oauthClientSecret: "CLIENT_SECRET", }); const fetchResponse = await typescriptoauthtokenclient.test.fetch(); @@ -69,20 +69,20 @@ const fetchResponse = await typescriptoauthtokenclient.test.fetch(); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptoauthtokenclient.test.fetch\` +### \`typescriptoauthtokenclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptoauthtokenclient.test.fetch(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/test\` \`GET\` @@ -91,7 +91,7 @@ const fetchResponse = await typescriptoauthtokenclient.test.fetch(); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-optional-api-key.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-optional-api-key.test.ts.snap index 62106f2c98..b3d88fbaa3 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-optional-api-key.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-optional-api-key.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-optional-api-key 1`] = ` -"# typescript-optional-api-key +"# typescript-optional-api-key A simple API based for testing typescript-optional-api-key. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-optional-api-key/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -20,13 +20,13 @@ A simple API based for testing typescript-optional-api-key. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -53,15 +53,15 @@ yarn add typescript-optional-api-key
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptOptionalApiKey } from \\"typescript-optional-api-key\\"; +import { TypescriptOptionalApiKey } from "typescript-optional-api-key"; const typescriptoptionalapikey = new TypescriptOptionalApiKey({ // Defining the base path is optional and defaults to https://typescript-optional-api-key.konfigthis.com - // basePath: \\"https://typescript-optional-api-key.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-optional-api-key.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = await typescriptoptionalapikey.test.fetch(); @@ -69,20 +69,20 @@ const fetchResponse = await typescriptoptionalapikey.test.fetch(); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptoptionalapikey.test.fetch\` +### \`typescriptoptionalapikey.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptoptionalapikey.test.fetch(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -91,18 +91,18 @@ const fetchResponse = await typescriptoptionalapikey.test.fetch(); --- -### \`typescriptoptionalapikey.test.fetchNoSecurity\` +### \`typescriptoptionalapikey.test.fetchNoSecurity\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchNoSecurityResponse = await typescriptoptionalapikey.test.fetchNoSecurity(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/endpoint-with-no-security\` \`GET\` @@ -111,7 +111,7 @@ const fetchNoSecurityResponse = --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-preserve-allof-description.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-preserve-allof-description.test.ts.snap index 9e6fa8e627..dd1a95f89f 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-preserve-allof-description.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-preserve-allof-description.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-preserve-allof-description 1`] = ` -"# typescript-preserve-allof-description +"# typescript-preserve-allof-description A simple API based for testing typescript-preserve-allof-description. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-preserve-allof-description/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-preserve-allof-description. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-preserve-allof-description
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptPreserveAllofDescriptionClient } from \\"typescript-preserve-allof-description\\"; +import { TypescriptPreserveAllofDescriptionClient } from "typescript-preserve-allof-description"; const typescriptpreserveallofdescriptionclient = new TypescriptPreserveAllofDescriptionClient({ // Defining the base path is optional and defaults to https://typescript-preserve-allof-description.konfigthis.com - // basePath: \\"https://typescript-preserve-allof-description.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-preserve-allof-description.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = await typescriptpreserveallofdescriptionclient.test.fetch( @@ -71,14 +71,14 @@ const fetchResponse = await typescriptpreserveallofdescriptionclient.test.fetch( console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptpreserveallofdescriptionclient.test.fetch\` +### \`typescriptpreserveallofdescriptionclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptpreserveallofdescriptionclient.test.fetch( @@ -86,17 +86,17 @@ const fetchResponse = await typescriptpreserveallofdescriptionclient.test.fetch( ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### input: [\`RequestBody\`](./models/request-body.ts) +##### input: [\`RequestBody\`](./models/request-body.ts) Description of input property in RequestBody in Operation -#### 🔄 Return +#### 🔄 Return [ResponseChild](./models/response-child.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -105,7 +105,7 @@ Description of input property in RequestBody in Operation --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-query-params-not-included-in-body.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-query-params-not-included-in-body.test.ts.snap index 5b7e0c799f..a88133c3ae 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-query-params-not-included-in-body.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-query-params-not-included-in-body.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-query-params-not-included-in-body 1`] = ` -"# typescript-query-params-not-included-in-body +"# typescript-query-params-not-included-in-body A simple API. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-query-params-not-included-in-body/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,61 +52,61 @@ yarn add typescript-query-params-not-included-in-body
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptQueryParamsNotIncludedInBodyClient } from \\"typescript-query-params-not-included-in-body\\"; +import { TypescriptQueryParamsNotIncludedInBodyClient } from "typescript-query-params-not-included-in-body"; const typescriptqueryparamsnotincludedinbodyclient = new TypescriptQueryParamsNotIncludedInBodyClient({ // Defining the base path is optional and defaults to https://test.konfigthis.com - // basePath: \\"https://test.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://test.konfigthis.com", + apiKey: "API_KEY", }); const testResponse = await typescriptqueryparamsnotincludedinbodyclient.test.test({ - queryParam1: \\"queryParam1_example\\", - bodyParam1: \\"bodyParam1_example\\", - bodyParam2: \\"bodyParam2_example\\", + queryParam1: "queryParam1_example", + bodyParam1: "bodyParam1_example", + bodyParam2: "bodyParam2_example", }); console.log(testResponse); \`\`\` -## Reference +## Reference -### \`typescriptqueryparamsnotincludedinbodyclient.test.test\` +### \`typescriptqueryparamsnotincludedinbodyclient.test.test\` Test that query params are not included in body -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const testResponse = await typescriptqueryparamsnotincludedinbodyclient.test.test({ - queryParam1: \\"queryParam1_example\\", - bodyParam1: \\"bodyParam1_example\\", - bodyParam2: \\"bodyParam2_example\\", + queryParam1: "queryParam1_example", + bodyParam1: "bodyParam1_example", + bodyParam2: "bodyParam2_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### bodyParam1: \`string\` +##### bodyParam1: \`string\` Body param 1 -##### bodyParam2: \`string\` +##### bodyParam2: \`string\` Body param 2 -##### queryParam1: \`string\` +##### queryParam1: \`string\` -##### queryParam2: \`string\` +##### queryParam2: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/test\` \`POST\` @@ -115,7 +115,7 @@ Body param 2 --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-relative-npm-links.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-relative-npm-links.test.ts.snap index b1d2a4c6cf..1ca1e96c4f 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-relative-npm-links.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-relative-npm-links.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-relative-npm-links 1`] = ` -"# typescript-relative-npm-links +"# typescript-relative-npm-links A simple API based for testing typescript-relative-npm-links. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-relative-npm-links/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-relative-npm-links. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,15 +52,15 @@ yarn add typescript-relative-npm-links
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptRelativeNpmLinksClient } from \\"typescript-relative-npm-links\\"; +import { TypescriptRelativeNpmLinksClient } from "typescript-relative-npm-links"; const typescriptrelativenpmlinksclient = new TypescriptRelativeNpmLinksClient({ // Defining the base path is optional and defaults to https://typescript-relative-npm-links.konfigthis.com - // basePath: \\"https://typescript-relative-npm-links.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-relative-npm-links.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = await typescriptrelativenpmlinksclient.test.fetch(); @@ -68,20 +68,20 @@ const fetchResponse = await typescriptrelativenpmlinksclient.test.fetch(); console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptrelativenpmlinksclient.test.fetch\` +### \`typescriptrelativenpmlinksclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptrelativenpmlinksclient.test.fetch(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -90,7 +90,7 @@ const fetchResponse = await typescriptrelativenpmlinksclient.test.fetch(); --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-self-referencing-infinite-loop.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-self-referencing-infinite-loop.test.ts.snap index 0ba1cb78f6..2d7d394882 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-self-referencing-infinite-loop.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-self-referencing-infinite-loop.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-self-referencing-infinite-loop 1`] = ` -"# typescript-self-referencing-infinite-loop +"# typescript-self-referencing-infinite-loop A simple API based for testing typescript-self-referencing-infinite-loop. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-self-referencing-infinite-loop/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-self-referencing-infinite-loop. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-self-referencing-infinite-loop
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptSelfReferencingInfiniteLoopClient } from \\"typescript-self-referencing-infinite-loop\\"; +import { TypescriptSelfReferencingInfiniteLoopClient } from "typescript-self-referencing-infinite-loop"; const typescriptselfreferencinginfiniteloopclient = new TypescriptSelfReferencingInfiniteLoopClient({ // Defining the base path is optional and defaults to https://typescript-self-referencing-infinite-loop.konfigthis.com - // basePath: \\"https://typescript-self-referencing-infinite-loop.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-self-referencing-infinite-loop.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = @@ -70,25 +70,25 @@ const fetchResponse = console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptselfreferencinginfiniteloopclient.test.fetch\` +### \`typescriptselfreferencinginfiniteloopclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptselfreferencinginfiniteloopclient.test.fetch(); \`\`\` -#### 🔄 Return +#### 🔄 Return [TestFetchResponse](./models/test-fetch-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -97,7 +97,7 @@ const fetchResponse = --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-snaptrade.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-snaptrade.test.ts.snap index 02a4bdb3b0..6157b5dfc6 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-snaptrade.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-snaptrade.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-snaptrade 1`] = ` -"
+"
[![Visit SnapTrade](./header.png)](https://snaptrade.com) -# [SnapTrade](https://snaptrade.com) +# [SnapTrade](https://snaptrade.com) Connect brokerage accounts to your app for live positions and trading @@ -14,7 +14,7 @@ Connect brokerage accounts to your app for live positions and trading
-## Table of Contents +## Table of Contents @@ -68,13 +68,13 @@ Connect brokerage accounts to your app for live positions and trading -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -101,10 +101,10 @@ yarn add snaptrade-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -const { Snaptrade } = require(\\"snaptrade-typescript-sdk\\"); +const { Snaptrade } = require("snaptrade-typescript-sdk"); async function main() { // 1) Initialize a client with your clientID and consumerKey. @@ -115,7 +115,7 @@ async function main() { // 2) Check that the client is able to make a request to the API server. const status = await snaptrade.apiStatus.check(); - console.log(\\"status:\\", status.data); + console.log("status:", status.data); // 3) Create a new user on SnapTrade const userId = uuid(); @@ -127,14 +127,14 @@ async function main() { // Note: A user secret is only generated once. It's required to access // resources for certain endpoints. - console.log(\\"userSecret:\\", userSecret); + console.log("userSecret:", userSecret); // 4) Get a redirect URI. Users will need this to connect const data = ( await snaptrade.authentication.loginSnapTradeUser({ userId, userSecret }) ).data; - if (!(\\"redirectURI\\" in data)) throw Error(\\"Should have gotten redirect URI\\"); - console.log(\\"redirectURI:\\", data.redirectURI); + if (!("redirectURI" in data)) throw Error("Should have gotten redirect URI"); + console.log("redirectURI:", data.redirectURI); // 5) Obtaining account holdings data const holdings = ( @@ -143,24 +143,24 @@ async function main() { userSecret, }) ).data; - console.log(\\"holdings:\\", holdings); + console.log("holdings:", holdings); // 6) Deleting a user const deleteResponse = ( await snaptrade.authentication.deleteSnapTradeUser({ userId }) ).data; - console.log(\\"deleteResponse:\\", deleteResponse); + console.log("deleteResponse:", deleteResponse); } // Should be replaced with function to get user ID function getUserId() { var d = new Date().getTime(); //Timestamp var d2 = - (typeof performance !== \\"undefined\\" && + (typeof performance !== "undefined" && performance.now && performance.now() * 1000) || 0; //Time in microseconds since page-load or 0 if unsupported - return \\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\".replace(/[xy]/g, function (c) { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = Math.random() * 16; //random number between 0 and 16 if (d > 0) { //Use timestamp until depleted @@ -171,46 +171,46 @@ function getUserId() { r = (d2 + r) % 16 | 0; d2 = Math.floor(d2 / 16); } - return (c === \\"x\\" ? r : (r & 0x3) | 0x8).toString(16); + return (c === "x" ? r : (r & 0x3) | 0x8).toString(16); }); } main(); \`\`\` -## Reference +## Reference -### \`snaptrade.accountInformation.getAllUserHoldings\` +### \`snaptrade.accountInformation.getAllUserHoldings\` List all accounts for the user, plus balances, positions, and orders for each account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getAllUserHoldingsResponse = await snaptrade.accountInformation.getAllUserHoldings({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - brokerageAuthorizations: \\"917c8734-8470-4a3e-a18f-57c3f2ee6631\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + brokerageAuthorizations: "917c8734-8470-4a3e-a18f-57c3f2ee6631", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### brokerageAuthorizations: \`string\` +##### brokerageAuthorizations: \`string\` Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations). -#### 🔄 Return +#### 🔄 Return [AccountHoldings](./models/account-holdings.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/holdings\` \`GET\` @@ -219,36 +219,36 @@ Optional. Comma seperated list of authorization IDs (only use if filtering is ne --- -### \`snaptrade.accountInformation.getUserAccountBalance\` +### \`snaptrade.accountInformation.getUserAccountBalance\` A list of account balances for the specified account (one per currency that the account holds). -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserAccountBalanceResponse = await snaptrade.accountInformation.getUserAccountBalance({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get balances. -#### 🔄 Return +#### 🔄 Return [Balance](./models/balance.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/balances\` \`GET\` @@ -257,36 +257,36 @@ The ID of the account to get balances. --- -### \`snaptrade.accountInformation.getUserAccountDetails\` +### \`snaptrade.accountInformation.getUserAccountDetails\` Return details of a specific investment account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserAccountDetailsResponse = await snaptrade.accountInformation.getUserAccountDetails({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get detail of. -#### 🔄 Return +#### 🔄 Return [Account](./models/account.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}\` \`GET\` @@ -295,46 +295,46 @@ The ID of the account to get detail of. --- -### \`snaptrade.accountInformation.getUserAccountOrders\` +### \`snaptrade.accountInformation.getUserAccountOrders\` Fetch all recent orders from a user's account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserAccountOrdersResponse = await snaptrade.accountInformation.getUserAccountOrders({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - state: \\"all\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + state: "all", days: 30, - accountId: \\"accountId_example\\", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get orders. -##### state: \`'all' | 'open' | 'executed'\` +##### state: \`'all' | 'open' | 'executed'\` -defaults value is set to \\\\\\"all\\\\\\" +defaults value is set to \\"all\\" -##### days: \`number\` +##### days: \`number\` Number of days in the past to fetch the most recent orders. Defaults to the last 90 days if no value is passed in. -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./models/account-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/orders\` \`GET\` @@ -343,36 +343,36 @@ Number of days in the past to fetch the most recent orders. Defaults to the last --- -### \`snaptrade.accountInformation.getUserAccountPositions\` +### \`snaptrade.accountInformation.getUserAccountPositions\` List account positions -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserAccountPositionsResponse = await snaptrade.accountInformation.getUserAccountPositions({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get positions. -#### 🔄 Return +#### 🔄 Return [Position](./models/position.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/positions\` \`GET\` @@ -381,36 +381,36 @@ The ID of the account to get positions. --- -### \`snaptrade.accountInformation.getUserHoldings\` +### \`snaptrade.accountInformation.getUserHoldings\` List balances, positions and orders for the specified account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserHoldingsResponse = await snaptrade.accountInformation.getUserHoldings({ - accountId: \\"917c8734-8470-4a3e-a18f-57c3f2ee6631\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to fetch holdings for. -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [AccountHoldingsAccount](./models/account-holdings-account.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/holdings\` \`GET\` @@ -419,31 +419,31 @@ The ID of the account to fetch holdings for. --- -### \`snaptrade.accountInformation.listUserAccounts\` +### \`snaptrade.accountInformation.listUserAccounts\` List accounts -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listUserAccountsResponse = await snaptrade.accountInformation.listUserAccounts({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [Account](./models/account.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts\` \`GET\` @@ -452,36 +452,36 @@ const listUserAccountsResponse = --- -### \`snaptrade.accountInformation.updateUserAccount\` +### \`snaptrade.accountInformation.updateUserAccount\` Update details of an investment account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateUserAccountResponse = await snaptrade.accountInformation.updateUserAccount({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to update. -#### 🔄 Return +#### 🔄 Return [Account](./models/account.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}\` \`PUT\` @@ -490,21 +490,21 @@ The ID of the account to update. --- -### \`snaptrade.apiStatus.check\` +### \`snaptrade.apiStatus.check\` Check whether the API is operational and verify timestamps. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const checkResponse = await snaptrade.apiStatus.check(); \`\`\` -#### 🔄 Return +#### 🔄 Return [Status](./models/status.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/\` \`GET\` @@ -513,28 +513,28 @@ const checkResponse = await snaptrade.apiStatus.check(); --- -### \`snaptrade.authentication.deleteSnapTradeUser\` +### \`snaptrade.authentication.deleteSnapTradeUser\` Deletes a user you've registered over the SnapTrade API, and any data associated with them or their investment accounts. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const deleteSnapTradeUserResponse = await snaptrade.authentication.deleteSnapTradeUser({ - userId: \\"John.doe@snaptrade.com\\", + userId: "John.doe@snaptrade.com", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -#### 🔄 Return +#### 🔄 Return [DeleteUserResponse](./models/delete-user-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/deleteUser\` \`DELETE\` @@ -543,30 +543,30 @@ const deleteSnapTradeUserResponse = --- -### \`snaptrade.authentication.getUserJWT\` +### \`snaptrade.authentication.getUserJWT\` Generate encrypted JWT token -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserJWTResponse = await snaptrade.authentication.getUserJWT({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [EncryptedResponse](./models/encrypted-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/encryptedJWT\` \`GET\` @@ -575,18 +575,18 @@ const getUserJWTResponse = await snaptrade.authentication.getUserJWT({ --- -### \`snaptrade.authentication.listSnapTradeUsers\` +### \`snaptrade.authentication.listSnapTradeUsers\` Returns a list of users you've registered over the SnapTrade API. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listSnapTradeUsersResponse = await snaptrade.authentication.listSnapTradeUsers(); \`\`\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/listUsers\` \`GET\` @@ -595,61 +595,61 @@ const listSnapTradeUsersResponse = --- -### \`snaptrade.authentication.loginSnapTradeUser\` +### \`snaptrade.authentication.loginSnapTradeUser\` Logs in a SnapTrade user and returns an authenticated connection portal URL for them to use to connect a brokerage account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const loginSnapTradeUserResponse = await snaptrade.authentication.loginSnapTradeUser({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - broker: \\"ALPACA\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + broker: "ALPACA", immediateRedirect: true, - customRedirect: \\"https://snaptrade.com\\", - reconnect: \\"8b5f262d-4bb9-365d-888a-202bd3b15fa1\\", - connectionType: \\"read\\", - connectionPortalVersion: \\"v2\\", + customRedirect: "https://snaptrade.com", + reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1", + connectionType: "read", + connectionPortalVersion: "v2", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### broker: \`string\` +##### broker: \`string\` Slug of the brokerage to connect the user to -##### immediateRedirect: \`boolean\` +##### immediateRedirect: \`boolean\` -When set to True, user will be redirected back to the partner\\\\\\\\\\\\'s site instead of the connection portal +When set to True, user will be redirected back to the partner\\\\\\'s site instead of the connection portal -##### customRedirect: \`string\` +##### customRedirect: \`string\` URL to redirect the user to after the user connects their brokerage account -##### reconnect: \`string\` +##### reconnect: \`string\` The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See ‘Reconnecting Accounts’ for more information. -##### connectionType: \`string\` +##### connectionType: \`string\` Sets whether the connection should be read or trade -##### connectionPortalVersion: \`string\` +##### connectionPortalVersion: \`string\` -Sets the version of the connection portal to render, with a default to \\\\\\\\\\\\'v2\\\\\\\\\\\\' +Sets the version of the connection portal to render, with a default to \\\\\\'v2\\\\\\' -#### 🔄 Return +#### 🔄 Return [AuthenticationLoginSnapTradeUser200Response](./models/authentication-login-snap-trade-user200-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/login\` \`POST\` @@ -658,30 +658,30 @@ Sets the version of the connection portal to render, with a default to \\\\\\\\\ --- -### \`snaptrade.authentication.registerSnapTradeUser\` +### \`snaptrade.authentication.registerSnapTradeUser\` Create SnapTrade user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const registerSnapTradeUserResponse = await snaptrade.authentication.registerSnapTradeUser({ - userId: \\"snaptrade-user-123\\", + userId: "snaptrade-user-123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\\\\\\\\\\\\'s unique to a user +SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\\\\\\'s unique to a user -#### 🔄 Return +#### 🔄 Return [UserIDandSecret](./models/user-idand-secret.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/registerUser\` \`POST\` @@ -690,35 +690,35 @@ SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as --- -### \`snaptrade.authentication.resetSnapTradeUserSecret\` +### \`snaptrade.authentication.resetSnapTradeUserSecret\` Obtain a new user secret for a user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const resetSnapTradeUserSecretResponse = await snaptrade.authentication.resetSnapTradeUserSecret({ - userId: \\"snaptrade-user-123\\", - userSecret: \\"h81@cx1lkalablakwjaltkejraj11=\\", + userId: "snaptrade-user-123", + userSecret: "h81@cx1lkalablakwjaltkejraj11=", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\\\\\\\\\\\\'s unique to a user +SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\\\\\\'s unique to a user -##### userSecret: \`string\` +##### userSecret: \`string\` SnapTrade User Secret randomly generated by SnapTrade. This should be considered priviledged information and if compromised, you should delete and re-create this SnapTrade user. -#### 🔄 Return +#### 🔄 Return [UserIDandSecret](./models/user-idand-secret.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/resetUserSecret\` \`POST\` @@ -727,36 +727,36 @@ SnapTrade User Secret randomly generated by SnapTrade. This should be considered --- -### \`snaptrade.connections.detailBrokerageAuthorization\` +### \`snaptrade.connections.detailBrokerageAuthorization\` Get brokerage authorization details -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const detailBrokerageAuthorizationResponse = await snaptrade.connections.detailBrokerageAuthorization({ - authorizationId: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + authorizationId: "2bcd7cc3-e922-4976-bce1-9858296801c3", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorizationId: \`string\` +##### authorizationId: \`string\` The ID of a brokerage authorization object. -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorization](./models/brokerage-authorization.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations/{authorizationId}\` \`GET\` @@ -765,31 +765,31 @@ The ID of a brokerage authorization object. --- -### \`snaptrade.connections.listBrokerageAuthorizations\` +### \`snaptrade.connections.listBrokerageAuthorizations\` List all brokerage authorizations for the user -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listBrokerageAuthorizationsResponse = await snaptrade.connections.listBrokerageAuthorizations({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorization](./models/brokerage-authorization.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations\` \`GET\` @@ -798,32 +798,32 @@ const listBrokerageAuthorizationsResponse = --- -### \`snaptrade.connections.removeBrokerageAuthorization\` +### \`snaptrade.connections.removeBrokerageAuthorization\` Delete brokerage authorization -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const removeBrokerageAuthorizationResponse = await snaptrade.connections.removeBrokerageAuthorization({ - authorizationId: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + authorizationId: "2bcd7cc3-e922-4976-bce1-9858296801c3", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### authorizationId: \`string\` +##### authorizationId: \`string\` The ID of the Authorization to delete. -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🌐 Endpoint +#### 🌐 Endpoint \`/authorizations/{authorizationId}\` \`DELETE\` @@ -832,39 +832,39 @@ The ID of the Authorization to delete. --- -### \`snaptrade.connections.sessionEvents\` +### \`snaptrade.connections.sessionEvents\` List all session events for the partner -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const sessionEventsResponse = await snaptrade.connections.sessionEvents({ - partnerClientId: \\"SNAPTRADETEST\\", + partnerClientId: "SNAPTRADETEST", userId: - \\"917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2\\", + "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2", sessionId: - \\"917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2\\", + "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### partnerClientId: \`string\` +##### partnerClientId: \`string\` -##### userId: \`string\` +##### userId: \`string\` Optional comma seperated list of user IDs used to filter the request on specific users -##### sessionId: \`string\` +##### sessionId: \`string\` Optional comma seperated list of session IDs used to filter the request on specific users -#### 🔄 Return +#### 🔄 Return [ConnectionsSessionEvents200ResponseInner](./models/connections-session-events200-response-inner.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/sessionEvents\` \`GET\` @@ -873,30 +873,30 @@ Optional comma seperated list of session IDs used to filter the request on speci --- -### \`snaptrade.errorLogs.listUserErrors\` +### \`snaptrade.errorLogs.listUserErrors\` Retrieve error logs on behalf of your SnapTrade users -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listUserErrorsResponse = await snaptrade.errorLogs.listUserErrors({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [UserErrorLog](./models/user-error-log.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/listUserErrors\` \`GET\` @@ -905,50 +905,50 @@ const listUserErrorsResponse = await snaptrade.errorLogs.listUserErrors({ --- -### \`snaptrade.options.getOptionStrategy\` +### \`snaptrade.options.getOptionStrategy\` Creates an option strategy object that will be used to place an option strategy order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getOptionStrategyResponse = await snaptrade.options.getOptionStrategy({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", - underlying_symbol_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", + underlying_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", legs: [ { - action: \\"BUY_TO_OPEN\\", - option_symbol_id: \\"SPY220819P00200000\\", + action: "BUY_TO_OPEN", + option_symbol_id: "SPY220819P00200000", quantity: 1, }, ], - strategy_type: \\"CUSTOM\\", + strategy_type: "CUSTOM", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### underlying_symbol_id: \`string\` +##### underlying_symbol_id: \`string\` -##### legs: [\`OptionLeg\`](./models/option-leg.ts)[] +##### legs: [\`OptionLeg\`](./models/option-leg.ts)[] -##### strategy_type: \`string\` +##### strategy_type: \`string\` -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to create the option strategy object in. -#### 🔄 Return +#### 🔄 Return [StrategyQuotes](./models/strategy-quotes.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy\` \`POST\` @@ -957,40 +957,40 @@ The ID of the account to create the option strategy object in. --- -### \`snaptrade.options.getOptionsChain\` +### \`snaptrade.options.getOptionsChain\` Get the options chain -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getOptionsChainResponse = await snaptrade.options.getOptionsChain({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", - symbol: \\"symbol_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", + symbol: "symbol_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get the options chain from. -##### symbol: \`string\` +##### symbol: \`string\` Universal symbol ID if symbol -#### 🔄 Return +#### 🔄 Return [OptionChainInner](./models/option-chain-inner.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionsChain\` \`GET\` @@ -999,41 +999,41 @@ Universal symbol ID if symbol --- -### \`snaptrade.options.getOptionsStrategyQuote\` +### \`snaptrade.options.getOptionsStrategyQuote\` Get latest market data of option strategy -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getOptionsStrategyQuoteResponse = await snaptrade.options.getOptionsStrategyQuote({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", - optionStrategyId: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", + optionStrategyId: "2bcd7cc3-e922-4976-bce1-9858296801c3", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account the strategy will be placed in. -##### optionStrategyId: \`string\` +##### optionStrategyId: \`string\` Option strategy id obtained from response when creating option strategy object -#### 🔄 Return +#### 🔄 Return [StrategyQuotes](./models/strategy-quotes.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy/{optionStrategyId}\` \`GET\` @@ -1042,35 +1042,35 @@ Option strategy id obtained from response when creating option strategy object --- -### \`snaptrade.options.listOptionHoldings\` +### \`snaptrade.options.listOptionHoldings\` Get the options holdings in the account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to fetch options holdings for. -#### 🔄 Return +#### 🔄 Return [OptionsPosition](./models/options-position.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/options\` \`GET\` @@ -1079,57 +1079,57 @@ The ID of the account to fetch options holdings for. --- -### \`snaptrade.options.placeOptionStrategy\` +### \`snaptrade.options.placeOptionStrategy\` Place an option strategy order on the brokerage -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const placeOptionStrategyResponse = await snaptrade.options.placeOptionStrategy( { - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", - optionStrategyId: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", - order_type: \\"string_example\\", - time_in_force: \\"string_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "2bcd7cc3-e922-4976-bce1-9858296801c3", + optionStrategyId: "2bcd7cc3-e922-4976-bce1-9858296801c3", + order_type: "string_example", + time_in_force: "string_example", price: 31.33, } ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### order_type: [\`OrderType\`](./models/order-type.ts) +##### order_type: [\`OrderType\`](./models/order-type.ts) Order Type -##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) +##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to execute the strategy in. -##### optionStrategyId: \`string\` +##### optionStrategyId: \`string\` Option strategy id obtained from response when creating option strategy object -##### price: \`number\` +##### price: \`number\` Trade Price if limit or stop limit order -#### 🔄 Return +#### 🔄 Return [StrategyOrderRecord](./models/strategy-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute\` \`POST\` @@ -1138,30 +1138,30 @@ Trade Price if limit or stop limit order --- -### \`snaptrade.referenceData.getCurrencyExchangeRatePair\` +### \`snaptrade.referenceData.getCurrencyExchangeRatePair\` Return the exchange rate of a currency pair -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getCurrencyExchangeRatePairResponse = await snaptrade.referenceData.getCurrencyExchangeRatePair({ - currencyPair: \\"currencyPair_example\\", + currencyPair: "currencyPair_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### currencyPair: \`string\` +##### currencyPair: \`string\` A currency pair based on currency code for example, {CAD-USD} -#### 🔄 Return +#### 🔄 Return [ExchangeRatePairs](./models/exchange-rate-pairs.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies/rates/{currencyPair}\` \`GET\` @@ -1170,21 +1170,21 @@ A currency pair based on currency code for example, {CAD-USD} --- -### \`snaptrade.referenceData.getPartnerInfo\` +### \`snaptrade.referenceData.getPartnerInfo\` Get metadata related to Snaptrade partner -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo(); \`\`\` -#### 🔄 Return +#### 🔄 Return [PartnerData](./models/partner-data.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/snapTrade/partners\` \`GET\` @@ -1193,22 +1193,22 @@ const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo(); --- -### \`snaptrade.referenceData.getSecurityTypes\` +### \`snaptrade.referenceData.getSecurityTypes\` List security types available on SnapTrade. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getSecurityTypesResponse = await snaptrade.referenceData.getSecurityTypes(); \`\`\` -#### 🔄 Return +#### 🔄 Return [SecurityType](./models/security-type.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/securityTypes\` \`GET\` @@ -1217,22 +1217,22 @@ const getSecurityTypesResponse = --- -### \`snaptrade.referenceData.getStockExchanges\` +### \`snaptrade.referenceData.getStockExchanges\` List exchanges -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getStockExchangesResponse = await snaptrade.referenceData.getStockExchanges(); \`\`\` -#### 🔄 Return +#### 🔄 Return [Exchange](./models/exchange.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/exchanges\` \`GET\` @@ -1241,27 +1241,27 @@ const getStockExchangesResponse = --- -### \`snaptrade.referenceData.getSymbols\` +### \`snaptrade.referenceData.getSymbols\` Search for symbols -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getSymbolsResponse = await snaptrade.referenceData.getSymbols({ - substring: \\"apple\\", + substring: "apple", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### substring: \`string\` +##### substring: \`string\` -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./models/universal-symbol.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/symbols\` \`POST\` @@ -1270,30 +1270,30 @@ const getSymbolsResponse = await snaptrade.referenceData.getSymbols({ --- -### \`snaptrade.referenceData.getSymbolsByTicker\` +### \`snaptrade.referenceData.getSymbolsByTicker\` Get details of a symbol by the ticker or the universal_symbol_id -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getSymbolsByTickerResponse = await snaptrade.referenceData.getSymbolsByTicker({ - query: \\"query_example\\", + query: "query_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### query: \`string\` +##### query: \`string\` The ticker or universal_symbol_id of the UniversalSymbol to get. -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./models/universal-symbol.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/symbols/{query}\` \`GET\` @@ -1302,30 +1302,30 @@ The ticker or universal_symbol_id of the UniversalSymbol to get. --- -### \`snaptrade.referenceData.listAllBrokerageAuthorizationType\` +### \`snaptrade.referenceData.listAllBrokerageAuthorizationType\` List of all brokerage authorization types -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllBrokerageAuthorizationTypeResponse = await snaptrade.referenceData.listAllBrokerageAuthorizationType({ - brokerage: \\"QUESTRADE,ALPACA\\", + brokerage: "QUESTRADE,ALPACA", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### brokerage: \`string\` +##### brokerage: \`string\` Comma separated value of brokerage slugs -#### 🔄 Return +#### 🔄 Return [BrokerageAuthorizationTypeReadOnly](./models/brokerage-authorization-type-read-only.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/brokerageAuthorizationTypes\` \`GET\` @@ -1334,22 +1334,22 @@ Comma separated value of brokerage slugs --- -### \`snaptrade.referenceData.listAllBrokerages\` +### \`snaptrade.referenceData.listAllBrokerages\` List brokerages -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllBrokeragesResponse = await snaptrade.referenceData.listAllBrokerages(); \`\`\` -#### 🔄 Return +#### 🔄 Return [Brokerage](./models/brokerage.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/brokerages\` \`GET\` @@ -1358,22 +1358,22 @@ const listAllBrokeragesResponse = --- -### \`snaptrade.referenceData.listAllCurrencies\` +### \`snaptrade.referenceData.listAllCurrencies\` List currencies -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllCurrenciesResponse = await snaptrade.referenceData.listAllCurrencies(); \`\`\` -#### 🔄 Return +#### 🔄 Return [Currency](./models/currency.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies\` \`GET\` @@ -1382,22 +1382,22 @@ const listAllCurrenciesResponse = --- -### \`snaptrade.referenceData.listAllCurrenciesRates\` +### \`snaptrade.referenceData.listAllCurrenciesRates\` List currency exchange rates -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const listAllCurrenciesRatesResponse = await snaptrade.referenceData.listAllCurrenciesRates(); \`\`\` -#### 🔄 Return +#### 🔄 Return [ExchangeRatePairs](./models/exchange-rate-pairs.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/currencies/rates\` \`GET\` @@ -1406,39 +1406,39 @@ const listAllCurrenciesRatesResponse = --- -### \`snaptrade.referenceData.symbolSearchUserAccount\` +### \`snaptrade.referenceData.symbolSearchUserAccount\` Search for symbols available in an account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const symbolSearchUserAccountResponse = await snaptrade.referenceData.symbolSearchUserAccount({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", - substring: \\"apple\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", + substring: "apple", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to search for symbols within. -##### substring: \`string\` +##### substring: \`string\` -#### 🔄 Return +#### 🔄 Return [UniversalSymbol](./models/universal-symbol.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/symbols\` \`POST\` @@ -1447,39 +1447,39 @@ The ID of the account to search for symbols within. --- -### \`snaptrade.trading.cancelUserAccountOrder\` +### \`snaptrade.trading.cancelUserAccountOrder\` Cancel open order in account -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const cancelUserAccountOrderResponse = await snaptrade.trading.cancelUserAccountOrder({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - accountId: \\"accountId_example\\", - brokerage_order_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + accountId: "accountId_example", + brokerage_order_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to cancel the order in. -##### brokerage_order_id: \`string\` +##### brokerage_order_id: \`string\` -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./models/account-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/orders/cancel\` \`POST\` @@ -1488,62 +1488,62 @@ The ID of the account to cancel the order in. --- -### \`snaptrade.trading.getOrderImpact\` +### \`snaptrade.trading.getOrderImpact\` Check impact of trades on account. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getOrderImpactResponse = await snaptrade.trading.getOrderImpact({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - account_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", price: 31.33, stop: 31.33, - universal_symbol_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### account_id: \`string\` +##### account_id: \`string\` -##### action: [\`Action\`](./models/action.ts) +##### action: [\`Action\`](./models/action.ts) Trade Action -##### order_type: [\`OrderType\`](./models/order-type.ts) +##### order_type: [\`OrderType\`](./models/order-type.ts) Order Type -##### price: \`number\` +##### price: \`number\` Trade Price if limit or stop limit order -##### stop: \`number\` +##### stop: \`number\` Stop Price. If stop loss or stop limit order, the price to trigger the stop -##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) +##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled -##### units: [\`number\`](./models/number.ts) +##### units: [\`number\`](./models/number.ts) -##### universal_symbol_id: \`string\` +##### universal_symbol_id: \`string\` -##### notional_value: [\`number\`](./models/number.ts) +##### notional_value: [\`number\`](./models/number.ts) -#### 🔄 Return +#### 🔄 Return [ManualTradeAndImpact](./models/manual-trade-and-impact.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/impact\` \`POST\` @@ -1552,45 +1552,45 @@ Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Goo --- -### \`snaptrade.trading.getUserAccountQuotes\` +### \`snaptrade.trading.getUserAccountQuotes\` Get symbol quotes -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getUserAccountQuotesResponse = await snaptrade.trading.getUserAccountQuotes({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - symbols: \\"symbols_example\\", - accountId: \\"accountId_example\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + symbols: "symbols_example", + accountId: "accountId_example", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### symbols: \`string\` +##### symbols: \`string\` List of universal_symbol_id or tickers to get quotes for. -##### accountId: \`string\` +##### accountId: \`string\` The ID of the account to get quotes. -##### useTicker: \`boolean\` +##### useTicker: \`boolean\` Should be set to True if providing tickers. -#### 🔄 Return +#### 🔄 Return [SymbolsQuotesInner](./models/symbols-quotes-inner.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/accounts/{accountId}/quotes\` \`GET\` @@ -1599,62 +1599,62 @@ Should be set to True if providing tickers. --- -### \`snaptrade.trading.placeForceOrder\` +### \`snaptrade.trading.placeForceOrder\` Place a trade with NO validation. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const placeForceOrderResponse = await snaptrade.trading.placeForceOrder({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", - account_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", + account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", price: 31.33, stop: 31.33, - universal_symbol_id: \\"2bcd7cc3-e922-4976-bce1-9858296801c3\\", + universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### account_id: \`string\` +##### account_id: \`string\` -##### action: [\`Action\`](./models/action.ts) +##### action: [\`Action\`](./models/action.ts) Trade Action -##### order_type: [\`OrderType\`](./models/order-type.ts) +##### order_type: [\`OrderType\`](./models/order-type.ts) Order Type -##### price: \`number\` +##### price: \`number\` Trade Price if limit or stop limit order -##### stop: \`number\` +##### stop: \`number\` Stop Price. If stop loss or stop limit order, the price to trigger the stop -##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) +##### time_in_force: [\`TimeInForceStrict\`](./models/time-in-force-strict.ts) Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til Canceled -##### units: [\`number\`](./models/number.ts) +##### units: [\`number\`](./models/number.ts) -##### universal_symbol_id: \`string\` +##### universal_symbol_id: \`string\` -##### notional_value: [\`number\`](./models/number.ts) +##### notional_value: [\`number\`](./models/number.ts) -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./models/account-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/place\` \`POST\` @@ -1663,38 +1663,38 @@ Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Goo --- -### \`snaptrade.trading.placeOCOOrder\` +### \`snaptrade.trading.placeOCOOrder\` Place a OCO (One Cancels Other) order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const placeOCOOrderResponse = await snaptrade.trading.placeOCOOrder({ - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### first_trade_id: +##### first_trade_id: The ID of first trade object obtained from trade/impact endpoint -##### second_trade_id: +##### second_trade_id: The ID of second trade object obtained from trade/impact endpoint -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./models/account-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/oco\` \`POST\` @@ -1703,35 +1703,35 @@ The ID of second trade object obtained from trade/impact endpoint --- -### \`snaptrade.trading.placeOrder\` +### \`snaptrade.trading.placeOrder\` Place order -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const placeOrderResponse = await snaptrade.trading.placeOrder({ - tradeId: \\"tradeId_example\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + tradeId: "tradeId_example", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### tradeId: \`string\` +##### tradeId: \`string\` The ID of trade object obtained from trade/impact endpoint -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -#### 🔄 Return +#### 🔄 Return [AccountOrderRecord](./models/account-order-record.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/trade/{tradeId}\` \`POST\` @@ -1740,54 +1740,54 @@ The ID of trade object obtained from trade/impact endpoint --- -### \`snaptrade.transactionsAndReporting.getActivities\` +### \`snaptrade.transactionsAndReporting.getActivities\` Returns activities (transactions) for a user. Specifying start and end date is highly recommended for better performance -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getActivitiesResponse = await snaptrade.transactionsAndReporting.getActivities({ - startDate: \\"2022-01-24\\", - endDate: \\"2022-01-24\\", + startDate: "2022-01-24", + endDate: "2022-01-24", accounts: - \\"917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2\\", + "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2", brokerageAuthorizations: - \\"917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2\\", - type: \\"DIVIDEND\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2", + type: "DIVIDEND", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### startDate: \`string | Date\` +##### startDate: \`string | Date\` -##### endDate: \`string | Date\` +##### endDate: \`string | Date\` -##### accounts: \`string\` +##### accounts: \`string\` Optional comma seperated list of account IDs used to filter the request on specific accounts -##### brokerageAuthorizations: \`string\` +##### brokerageAuthorizations: \`string\` Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations -##### type: \`string\` +##### type: \`string\` Optional comma seperated list of types to filter activities by. This is not an exhaustive list, if we fail to match to these types, we will return the raw description from the brokerage. Potential values include - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT -#### 🔄 Return +#### 🔄 Return [UniversalActivity](./models/universal-activity.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/activities\` \`GET\` @@ -1796,53 +1796,53 @@ Optional comma seperated list of types to filter activities by. This is not an e --- -### \`snaptrade.transactionsAndReporting.getReportingCustomRange\` +### \`snaptrade.transactionsAndReporting.getReportingCustomRange\` Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getReportingCustomRangeResponse = await snaptrade.transactionsAndReporting.getReportingCustomRange({ - startDate: \\"2022-01-24\\", - endDate: \\"2022-01-24\\", + startDate: "2022-01-24", + endDate: "2022-01-24", accounts: - \\"917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2\\", + "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2", detailed: true, - frequency: \\"monthly\\", - userId: \\"John.doe@snaptrade.com\\", - userSecret: \\"USERSECRET123\\", + frequency: "monthly", + userId: "John.doe@snaptrade.com", + userSecret: "USERSECRET123", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### startDate: \`string | Date\` +##### startDate: \`string | Date\` -##### endDate: \`string | Date\` +##### endDate: \`string | Date\` -##### userId: \`string\` +##### userId: \`string\` -##### userSecret: \`string\` +##### userSecret: \`string\` -##### accounts: \`string\` +##### accounts: \`string\` Optional comma seperated list of account IDs used to filter the request on specific accounts -##### detailed: \`boolean\` +##### detailed: \`boolean\` Optional, increases frequency of data points for the total value and contribution charts if set to true -##### frequency: \`string\` +##### frequency: \`string\` Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly. -#### 🔄 Return +#### 🔄 Return [PerformanceCustom](./models/performance-custom.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/performance/custom\` \`GET\` @@ -1851,7 +1851,7 @@ Optional frequency for the rate of return chart (defaults to monthly). Possible --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit-old-axios.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit-old-axios.test.ts.snap index 0318e8c9c3..bc416eb2cd 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit-old-axios.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit-old-axios.test.ts.snap @@ -1,13 +1,13 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`splitit/typescript-splitit-old-axios 1`] = ` -"# splitit-web-typescript-sdk +"# splitit-web-typescript-sdk Splitit's Web API [![npm](https://img.shields.io/badge/npm-v3.3.2-blue)](https://www.npmjs.com/package/splitit-web-typescript-sdk/v/3.3.2) -## Table of Contents +## Table of Contents @@ -27,13 +27,13 @@ Splitit's Web API -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -60,59 +60,59 @@ yarn add splitit-web-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptSplitit } from \\"splitit-web-typescript-sdk\\"; +import { TypescriptSplitit } from "splitit-web-typescript-sdk"; const typescriptsplitit = new TypescriptSplitit({ // Defining the base path is optional and defaults to https://web-api-v3.production.splitit.com - // basePath: \\"https://web-api-v3.production.splitit.com\\", - oauthClientId: \\"CLIENT_ID\\", - oauthClientSecret: \\"CLIENT_SECRET\\", + // basePath: "https://web-api-v3.production.splitit.com", + oauthClientId: "CLIENT_ID", + oauthClientSecret: "CLIENT_SECRET", }); const cancelResponse = await typescriptsplitit.installmentPlan.cancel({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); console.log(cancelResponse); \`\`\` -## Reference +## Reference -### \`typescriptsplitit.installmentPlan.cancel\` +### \`typescriptsplitit.installmentPlan.cancel\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const cancelResponse = await typescriptsplitit.installmentPlan.cancel({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [InstallmentPlanCancelResponse](./models/installment-plan-cancel-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/cancel\` \`POST\` @@ -121,39 +121,39 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.checkEligibility\` +### \`typescriptsplitit.installmentPlan.checkEligibility\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const checkEligibilityResponse = await typescriptsplitit.installmentPlan.checkEligibility({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### PlanData: [\`PlanData\`](./models/plan-data.ts) +##### PlanData: [\`PlanData\`](./models/plan-data.ts) -##### CardDetails: [\`CardData\`](./models/card-data.ts) +##### CardDetails: [\`CardData\`](./models/card-data.ts) -##### BillingAddress: [\`AddressData\`](./models/address-data.ts) +##### BillingAddress: [\`AddressData\`](./models/address-data.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentsEligibilityResponse](./models/installments-eligibility-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/check-eligibility\` \`POST\` @@ -162,35 +162,35 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.get\` +### \`typescriptsplitit.installmentPlan.get\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await typescriptsplitit.installmentPlan.get({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [InstallmentPlanGetResponse](./models/installment-plan-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}\` \`GET\` @@ -199,54 +199,54 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.post\` +### \`typescriptsplitit.installmentPlan.post\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await typescriptsplitit.installmentPlan.post({ - xSplititTestMode: \\"None\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititTestMode: "None", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", AutoCapture: true, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### AutoCapture: \`boolean\` +##### AutoCapture: \`boolean\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### Attempt3dSecure: \`boolean\` +##### Attempt3dSecure: \`boolean\` -##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) +##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) -##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) +##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) -##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) +##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) -##### RedirectUrls: [\`InitiateRedirectionEndpointsModel\`](./models/initiate-redirection-endpoints-model.ts) +##### RedirectUrls: [\`InitiateRedirectionEndpointsModel\`](./models/initiate-redirection-endpoints-model.ts) -##### UxSettings: [\`UxSettingsModel\`](./models/ux-settings-model.ts) +##### UxSettings: [\`UxSettingsModel\`](./models/ux-settings-model.ts) -##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) +##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) -##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) +##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) -##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` +##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` -#### 🔄 Return +#### 🔄 Return [InitiatePlanResponse](./models/initiate-plan-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/initiate\` \`POST\` @@ -255,57 +255,57 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.post2\` +### \`typescriptsplitit.installmentPlan.post2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const post2Response = await typescriptsplitit.installmentPlan.post2({ - xSplititTestMode: \\"None\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititTestMode: "None", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", AutoCapture: true, TermsAndConditionsAccepted: true, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### AutoCapture: \`boolean\` +##### AutoCapture: \`boolean\` -##### TermsAndConditionsAccepted: \`boolean\` +##### TermsAndConditionsAccepted: \`boolean\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### Attempt3dSecure: \`boolean\` +##### Attempt3dSecure: \`boolean\` -##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) +##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) -##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) +##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) -##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) +##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) -##### PaymentMethod: [\`PaymentMethodModel\`](./models/payment-method-model.ts) +##### PaymentMethod: [\`PaymentMethodModel\`](./models/payment-method-model.ts) -##### RedirectUrls: [\`RedirectionEndpointsModel\`](./models/redirection-endpoints-model.ts) +##### RedirectUrls: [\`RedirectionEndpointsModel\`](./models/redirection-endpoints-model.ts) -##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) +##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) -##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) +##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) -##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` +##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` -#### 🔄 Return +#### 🔄 Return [InstallmentPlanCreateResponse](./models/installment-plan-create-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans\` \`POST\` @@ -314,42 +314,42 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.refund\` +### \`typescriptsplitit.installmentPlan.refund\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const refundResponse = await typescriptsplitit.installmentPlan.refund({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", Amount: 3.14, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### Amount: \`number\` +##### Amount: \`number\` -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### RefundStrategy: [\`RefundStrategy\`](./models/refund-strategy.ts) +##### RefundStrategy: [\`RefundStrategy\`](./models/refund-strategy.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentPlanRefundResponse](./models/installment-plan-refund-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/refund\` \`POST\` @@ -358,38 +358,38 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.search\` +### \`typescriptsplitit.installmentPlan.search\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const searchResponse = await typescriptsplitit.installmentPlan.search({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### refOrderNumber: \`string\` +##### refOrderNumber: \`string\` -##### extendedParams: Record +##### extendedParams: Record -#### 🔄 Return +#### 🔄 Return [InstallmentPlanSearchResponse](./models/installment-plan-search-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/search\` \`GET\` @@ -398,47 +398,47 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.updateOrder\` +### \`typescriptsplitit.installmentPlan.updateOrder\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateOrderResponse = await typescriptsplitit.installmentPlan.updateOrder( { - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", } ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### TrackingNumber: \`string\` +##### TrackingNumber: \`string\` -##### RefOrderNumber: \`string\` +##### RefOrderNumber: \`string\` -##### ShippingStatus: [\`ShippingStatus\`](./models/shipping-status.ts) +##### ShippingStatus: [\`ShippingStatus\`](./models/shipping-status.ts) -##### Capture: \`boolean\` +##### Capture: \`boolean\` -#### 🔄 Return +#### 🔄 Return [InstallmentPlanUpdateResponse](./models/installment-plan-update-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/updateorder\` \`PUT\` @@ -447,45 +447,45 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.updateOrder2\` +### \`typescriptsplitit.installmentPlan.updateOrder2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateOrder2Response = await typescriptsplitit.installmentPlan.updateOrder2({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### RefOrderNumber: \`string\` +##### RefOrderNumber: \`string\` -##### TrackingNumber: \`string\` +##### TrackingNumber: \`string\` -##### Capture: \`boolean\` +##### Capture: \`boolean\` -##### ShippingStatus: [\`ShippingStatus2\`](./models/shipping-status2.ts) +##### ShippingStatus: [\`ShippingStatus2\`](./models/shipping-status2.ts) -##### Identifier: [\`IdentifierContract\`](./models/identifier-contract.ts) +##### Identifier: [\`IdentifierContract\`](./models/identifier-contract.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentPlanUpdateResponse](./models/installment-plan-update-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/updateorder\` \`PUT\` @@ -494,36 +494,36 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.verifyAuthorization\` +### \`typescriptsplitit.installmentPlan.verifyAuthorization\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const verifyAuthorizationResponse = await typescriptsplitit.installmentPlan.verifyAuthorization({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [VerifyAuthorizationResponse](./models/verify-authorization-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/verifyauthorization\` \`GET\` @@ -532,7 +532,7 @@ TouchPoint --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit.test.ts.snap index e2e40c5618..64934ef7f4 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-splitit.test.ts.snap @@ -1,13 +1,13 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`splitit/typescript-splitit 1`] = ` -"# splitit-web-typescript-sdk +"# splitit-web-typescript-sdk Splitit's Web API [![npm](https://img.shields.io/badge/npm-v3.3.2-blue)](https://www.npmjs.com/package/splitit-web-typescript-sdk/v/3.3.2) -## Table of Contents +## Table of Contents @@ -27,13 +27,13 @@ Splitit's Web API -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -60,59 +60,59 @@ yarn add splitit-web-typescript-sdk
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptSplitit } from \\"splitit-web-typescript-sdk\\"; +import { TypescriptSplitit } from "splitit-web-typescript-sdk"; const typescriptsplitit = new TypescriptSplitit({ // Defining the base path is optional and defaults to https://web-api-v3.production.splitit.com - // basePath: \\"https://web-api-v3.production.splitit.com\\", - oauthClientId: \\"CLIENT_ID\\", - oauthClientSecret: \\"CLIENT_SECRET\\", + // basePath: "https://web-api-v3.production.splitit.com", + oauthClientId: "CLIENT_ID", + oauthClientSecret: "CLIENT_SECRET", }); const cancelResponse = await typescriptsplitit.installmentPlan.cancel({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); console.log(cancelResponse); \`\`\` -## Reference +## Reference -### \`typescriptsplitit.installmentPlan.cancel\` +### \`typescriptsplitit.installmentPlan.cancel\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const cancelResponse = await typescriptsplitit.installmentPlan.cancel({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [InstallmentPlanCancelResponse](./models/installment-plan-cancel-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/cancel\` \`POST\` @@ -121,39 +121,39 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.checkEligibility\` +### \`typescriptsplitit.installmentPlan.checkEligibility\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const checkEligibilityResponse = await typescriptsplitit.installmentPlan.checkEligibility({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### PlanData: [\`PlanData\`](./models/plan-data.ts) +##### PlanData: [\`PlanData\`](./models/plan-data.ts) -##### CardDetails: [\`CardData\`](./models/card-data.ts) +##### CardDetails: [\`CardData\`](./models/card-data.ts) -##### BillingAddress: [\`AddressData\`](./models/address-data.ts) +##### BillingAddress: [\`AddressData\`](./models/address-data.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentsEligibilityResponse](./models/installments-eligibility-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/check-eligibility\` \`POST\` @@ -162,35 +162,35 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.get\` +### \`typescriptsplitit.installmentPlan.get\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const getResponse = await typescriptsplitit.installmentPlan.get({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [InstallmentPlanGetResponse](./models/installment-plan-get-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}\` \`GET\` @@ -199,54 +199,54 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.post\` +### \`typescriptsplitit.installmentPlan.post\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const postResponse = await typescriptsplitit.installmentPlan.post({ - xSplititTestMode: \\"None\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititTestMode: "None", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", AutoCapture: true, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### AutoCapture: \`boolean\` +##### AutoCapture: \`boolean\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### Attempt3dSecure: \`boolean\` +##### Attempt3dSecure: \`boolean\` -##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) +##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) -##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) +##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) -##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) +##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) -##### RedirectUrls: [\`InitiateRedirectionEndpointsModel\`](./models/initiate-redirection-endpoints-model.ts) +##### RedirectUrls: [\`InitiateRedirectionEndpointsModel\`](./models/initiate-redirection-endpoints-model.ts) -##### UxSettings: [\`UxSettingsModel\`](./models/ux-settings-model.ts) +##### UxSettings: [\`UxSettingsModel\`](./models/ux-settings-model.ts) -##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) +##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) -##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) +##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) -##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` +##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` -#### 🔄 Return +#### 🔄 Return [InitiatePlanResponse](./models/initiate-plan-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/initiate\` \`POST\` @@ -255,57 +255,57 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.post2\` +### \`typescriptsplitit.installmentPlan.post2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const post2Response = await typescriptsplitit.installmentPlan.post2({ - xSplititTestMode: \\"None\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititTestMode: "None", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", AutoCapture: true, TermsAndConditionsAccepted: true, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### AutoCapture: \`boolean\` +##### AutoCapture: \`boolean\` -##### TermsAndConditionsAccepted: \`boolean\` +##### TermsAndConditionsAccepted: \`boolean\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### Attempt3dSecure: \`boolean\` +##### Attempt3dSecure: \`boolean\` -##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) +##### Shopper: [\`ShopperData\`](./models/shopper-data.ts) -##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) +##### PlanData: [\`PlanDataModel\`](./models/plan-data-model.ts) -##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) +##### BillingAddress: [\`AddressDataModel\`](./models/address-data-model.ts) -##### PaymentMethod: [\`PaymentMethodModel\`](./models/payment-method-model.ts) +##### PaymentMethod: [\`PaymentMethodModel\`](./models/payment-method-model.ts) -##### RedirectUrls: [\`RedirectionEndpointsModel\`](./models/redirection-endpoints-model.ts) +##### RedirectUrls: [\`RedirectionEndpointsModel\`](./models/redirection-endpoints-model.ts) -##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) +##### ProcessingData: [\`ProcessingData\`](./models/processing-data.ts) -##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) +##### EventsEndpoints: [\`EventsEndpointsModel\`](./models/events-endpoints-model.ts) -##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` +##### xSplititTestMode: \`'None' | 'Regular' | 'Fast' | 'Automation'\` -#### 🔄 Return +#### 🔄 Return [InstallmentPlanCreateResponse](./models/installment-plan-create-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans\` \`POST\` @@ -314,42 +314,42 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.refund\` +### \`typescriptsplitit.installmentPlan.refund\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const refundResponse = await typescriptsplitit.installmentPlan.refund({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", Amount: 3.14, }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### Amount: \`number\` +##### Amount: \`number\` -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### RefundStrategy: [\`RefundStrategy\`](./models/refund-strategy.ts) +##### RefundStrategy: [\`RefundStrategy\`](./models/refund-strategy.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentPlanRefundResponse](./models/installment-plan-refund-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/refund\` \`POST\` @@ -358,38 +358,38 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.search\` +### \`typescriptsplitit.installmentPlan.search\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const searchResponse = await typescriptsplitit.installmentPlan.search({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### refOrderNumber: \`string\` +##### refOrderNumber: \`string\` -##### extendedParams: Record +##### extendedParams: Record -#### 🔄 Return +#### 🔄 Return [InstallmentPlanSearchResponse](./models/installment-plan-search-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/search\` \`GET\` @@ -398,47 +398,47 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.updateOrder\` +### \`typescriptsplitit.installmentPlan.updateOrder\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateOrderResponse = await typescriptsplitit.installmentPlan.updateOrder( { - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", } ); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### TrackingNumber: \`string\` +##### TrackingNumber: \`string\` -##### RefOrderNumber: \`string\` +##### RefOrderNumber: \`string\` -##### ShippingStatus: [\`ShippingStatus\`](./models/shipping-status.ts) +##### ShippingStatus: [\`ShippingStatus\`](./models/shipping-status.ts) -##### Capture: \`boolean\` +##### Capture: \`boolean\` -#### 🔄 Return +#### 🔄 Return [InstallmentPlanUpdateResponse](./models/installment-plan-update-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/updateorder\` \`PUT\` @@ -447,45 +447,45 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.updateOrder2\` +### \`typescriptsplitit.installmentPlan.updateOrder2\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const updateOrder2Response = await typescriptsplitit.installmentPlan.updateOrder2({ - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -##### RefOrderNumber: \`string\` +##### RefOrderNumber: \`string\` -##### TrackingNumber: \`string\` +##### TrackingNumber: \`string\` -##### Capture: \`boolean\` +##### Capture: \`boolean\` -##### ShippingStatus: [\`ShippingStatus2\`](./models/shipping-status2.ts) +##### ShippingStatus: [\`ShippingStatus2\`](./models/shipping-status2.ts) -##### Identifier: [\`IdentifierContract\`](./models/identifier-contract.ts) +##### Identifier: [\`IdentifierContract\`](./models/identifier-contract.ts) -#### 🔄 Return +#### 🔄 Return [InstallmentPlanUpdateResponse](./models/installment-plan-update-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/updateorder\` \`PUT\` @@ -494,36 +494,36 @@ TouchPoint --- -### \`typescriptsplitit.installmentPlan.verifyAuthorization\` +### \`typescriptsplitit.installmentPlan.verifyAuthorization\` -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const verifyAuthorizationResponse = await typescriptsplitit.installmentPlan.verifyAuthorization({ - installmentPlanNumber: \\"installmentPlanNumber_example\\", - xSplititIdempotencyKey: \\"xSplititIdempotencyKey_example\\", - xSplititTouchPoint: \\"\\", + installmentPlanNumber: "installmentPlanNumber_example", + xSplititIdempotencyKey: "xSplititIdempotencyKey_example", + xSplititTouchPoint: "", }); \`\`\` -#### ⚙️ Parameters +#### ⚙️ Parameters -##### installmentPlanNumber: \`string\` +##### installmentPlanNumber: \`string\` -##### xSplititIdempotencyKey: \`string\` +##### xSplititIdempotencyKey: \`string\` -##### xSplititTouchPoint: \`string\` +##### xSplititTouchPoint: \`string\` TouchPoint -#### 🔄 Return +#### 🔄 Return [VerifyAuthorizationResponse](./models/verify-authorization-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/api/installmentplans/{installmentPlanNumber}/verifyauthorization\` \`GET\` @@ -532,7 +532,7 @@ TouchPoint --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/tests/__snapshots__/typescript-use-classname-for-return-doc.test.ts.snap b/generator/konfig-integration-tests/tests/__snapshots__/typescript-use-classname-for-return-doc.test.ts.snap index 94870cf033..66b3153f5d 100644 --- a/generator/konfig-integration-tests/tests/__snapshots__/typescript-use-classname-for-return-doc.test.ts.snap +++ b/generator/konfig-integration-tests/tests/__snapshots__/typescript-use-classname-for-return-doc.test.ts.snap @@ -1,14 +1,14 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`typescript-use-classname-for-return-doc 1`] = ` -"# typescript-use-classname-for-return-doc +"# typescript-use-classname-for-return-doc A simple API based for testing typescript-use-classname-for-return-doc. [![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/typescript-use-classname-for-return-doc/v/1.0.0) [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](http://example.com/support) -## Table of Contents +## Table of Contents @@ -19,13 +19,13 @@ A simple API based for testing typescript-use-classname-for-return-doc. -## Installation +## Installation - - - + + +
npmpnpmyarnnpmpnpmyarn
@@ -52,16 +52,16 @@ yarn add typescript-use-classname-for-return-doc
-## Getting Started +## Getting Started \`\`\`typescript -import { TypescriptUseClassnameForReturnDocClient } from \\"typescript-use-classname-for-return-doc\\"; +import { TypescriptUseClassnameForReturnDocClient } from "typescript-use-classname-for-return-doc"; const typescriptuseclassnameforreturndocclient = new TypescriptUseClassnameForReturnDocClient({ // Defining the base path is optional and defaults to https://typescript-use-classname-for-return-doc.konfigthis.com - // basePath: \\"https://typescript-use-classname-for-return-doc.konfigthis.com\\", - apiKey: \\"API_KEY\\", + // basePath: "https://typescript-use-classname-for-return-doc.konfigthis.com", + apiKey: "API_KEY", }); const fetchResponse = @@ -70,25 +70,25 @@ const fetchResponse = console.log(fetchResponse); \`\`\` -## Reference +## Reference -### \`typescriptuseclassnameforreturndocclient.test.fetch\` +### \`typescriptuseclassnameforreturndocclient.test.fetch\` Provide an input parameter to receive a JSON value with properties. -#### 🛠️ Usage +#### 🛠️ Usage \`\`\`typescript const fetchResponse = await typescriptuseclassnameforreturndocclient.test.fetch(); \`\`\` -#### 🔄 Return +#### 🔄 Return [TestFetchResponse](./models/test-fetch-response.ts) -#### 🌐 Endpoint +#### 🌐 Endpoint \`/simple-endpoint\` \`GET\` @@ -97,7 +97,7 @@ const fetchResponse = --- -## Author +## Author This TypeScript package is automatically generated by [Konfig](https://konfigthis.com) " `; diff --git a/generator/konfig-integration-tests/util.ts b/generator/konfig-integration-tests/util.ts index 43b7a2076b..0b7b325281 100644 --- a/generator/konfig-integration-tests/util.ts +++ b/generator/konfig-integration-tests/util.ts @@ -174,7 +174,7 @@ type ServerConfig = { }; const spawnServer = (config: ServerConfigWithPort): number => { - const serverPath = path.resolve(__dirname, "apiServer.js"); + const serverPath = path.resolve(__dirname, "apiServer.cjs"); // escape the quotes in the config console.log("Copy the following command to run the server:");