@epilot/sdk 2.1.0-rc.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/app.json +38 -0
- package/definitions/automation.json +2 -37
- package/definitions/blueprint-manifest-runtime.json +1 -1
- package/definitions/blueprint-manifest.json +115 -1
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +279 -42
- package/definitions/data-management.json +10 -0
- package/definitions/email-template.json +25 -3
- package/definitions/entity.json +205 -3
- package/definitions/erp-integration-runtime.json +1 -1
- package/definitions/erp-integration.json +472 -13
- package/definitions/journey.json +257 -12
- package/definitions/kanban.json +630 -78
- package/definitions/organization-runtime.json +1 -1
- package/definitions/organization.json +614 -51
- package/definitions/workflow.json +40 -0
- package/dist/README-VG67PX4R.js +7 -0
- package/dist/README-W4B35MRN.cjs +7 -0
- package/dist/_index-AMVZBT2K.cjs +99 -0
- package/dist/_index-S6LFD3ER.js +99 -0
- package/dist/access-token-6BJDZSFE.cjs +7 -0
- package/dist/access-token-GSQZLDXR.js +7 -0
- package/dist/address-HA4RMRNQ.cjs +7 -0
- package/dist/address-QVJUGMOG.js +7 -0
- package/dist/address-suggestions-74244BAJ.js +7 -0
- package/dist/address-suggestions-IUQMYF27.cjs +7 -0
- package/dist/ai-agents-IZWFEUSH.js +7 -0
- package/dist/ai-agents-PWHKNRCX.cjs +7 -0
- package/dist/apis/access-token.cjs +10 -8
- package/dist/apis/access-token.js +5 -3
- package/dist/apis/address-suggestions.cjs +10 -8
- package/dist/apis/address-suggestions.js +5 -3
- package/dist/apis/address.cjs +10 -8
- package/dist/apis/address.js +5 -3
- package/dist/apis/ai-agents.cjs +10 -8
- package/dist/apis/ai-agents.js +5 -3
- package/dist/apis/app.cjs +10 -8
- package/dist/apis/app.js +5 -3
- package/dist/apis/audit-logs.cjs +10 -8
- package/dist/apis/audit-logs.js +5 -3
- package/dist/apis/automation.cjs +10 -8
- package/dist/apis/automation.js +5 -3
- package/dist/apis/billing.cjs +10 -8
- package/dist/apis/billing.js +5 -3
- package/dist/apis/blueprint-manifest.cjs +10 -8
- package/dist/apis/blueprint-manifest.js +5 -3
- package/dist/apis/consent.cjs +10 -8
- package/dist/apis/consent.js +5 -3
- package/dist/apis/customer-portal.cjs +10 -8
- package/dist/apis/customer-portal.js +5 -3
- package/dist/apis/dashboard.cjs +10 -8
- package/dist/apis/dashboard.js +5 -3
- package/dist/apis/data-management.cjs +10 -8
- package/dist/apis/data-management.js +5 -3
- package/dist/apis/deduplication.cjs +10 -8
- package/dist/apis/deduplication.js +5 -3
- package/dist/apis/design.cjs +10 -8
- package/dist/apis/design.js +5 -3
- package/dist/apis/document.cjs +10 -8
- package/dist/apis/document.js +5 -3
- package/dist/apis/email-settings.cjs +10 -8
- package/dist/apis/email-settings.js +5 -3
- package/dist/apis/email-template.cjs +10 -8
- package/dist/apis/email-template.js +5 -3
- package/dist/apis/entity-mapping.cjs +10 -8
- package/dist/apis/entity-mapping.js +5 -3
- package/dist/apis/entity.cjs +10 -8
- package/dist/apis/entity.js +5 -3
- package/dist/apis/environments.cjs +10 -8
- package/dist/apis/environments.js +5 -3
- package/dist/apis/erp-integration.cjs +10 -8
- package/dist/apis/erp-integration.js +5 -3
- package/dist/apis/event-catalog.cjs +10 -8
- package/dist/apis/event-catalog.js +5 -3
- package/dist/apis/file.cjs +10 -8
- package/dist/apis/file.js +5 -3
- package/dist/apis/iban.cjs +10 -8
- package/dist/apis/iban.js +5 -3
- package/dist/apis/journey.cjs +10 -8
- package/dist/apis/journey.js +5 -3
- package/dist/apis/kanban.cjs +10 -8
- package/dist/apis/kanban.js +5 -3
- package/dist/apis/message.cjs +10 -8
- package/dist/apis/message.js +5 -3
- package/dist/apis/metering.cjs +10 -8
- package/dist/apis/metering.js +5 -3
- package/dist/apis/notes.cjs +10 -8
- package/dist/apis/notes.js +5 -3
- package/dist/apis/notification.cjs +10 -8
- package/dist/apis/notification.js +5 -3
- package/dist/apis/organization.cjs +10 -8
- package/dist/apis/organization.d.cts +2 -2
- package/dist/apis/organization.d.ts +2 -2
- package/dist/apis/organization.js +5 -3
- package/dist/apis/partner-directory.cjs +10 -8
- package/dist/apis/partner-directory.js +5 -3
- package/dist/apis/permissions.cjs +10 -8
- package/dist/apis/permissions.js +5 -3
- package/dist/apis/pricing-tier.cjs +10 -8
- package/dist/apis/pricing-tier.js +5 -3
- package/dist/apis/pricing.cjs +10 -8
- package/dist/apis/pricing.js +5 -3
- package/dist/apis/purpose.cjs +10 -8
- package/dist/apis/purpose.js +5 -3
- package/dist/apis/sandbox.cjs +10 -8
- package/dist/apis/sandbox.js +5 -3
- package/dist/apis/submission.cjs +10 -8
- package/dist/apis/submission.js +5 -3
- package/dist/apis/targeting.cjs +10 -8
- package/dist/apis/targeting.js +5 -3
- package/dist/apis/template-variables.cjs +10 -8
- package/dist/apis/template-variables.js +5 -3
- package/dist/apis/user.cjs +10 -8
- package/dist/apis/user.js +5 -3
- package/dist/apis/validation-rules.cjs +10 -8
- package/dist/apis/validation-rules.js +5 -3
- package/dist/apis/webhooks.cjs +10 -8
- package/dist/apis/webhooks.js +5 -3
- package/dist/apis/workflow-definition.cjs +10 -8
- package/dist/apis/workflow-definition.js +5 -3
- package/dist/apis/workflow.cjs +10 -8
- package/dist/apis/workflow.js +5 -3
- package/dist/app-IKHWU222.cjs +7 -0
- package/dist/app-VLM3SWKA.js +7 -0
- package/dist/audit-logs-5VXHOQ7S.js +7 -0
- package/dist/audit-logs-D2LFUA2R.cjs +7 -0
- package/dist/automation-3HGCK725.cjs +7 -0
- package/dist/automation-72VGEJCY.js +7 -0
- package/dist/billing-DUWDISHP.cjs +7 -0
- package/dist/billing-IPALEAG2.js +7 -0
- package/dist/blueprint-manifest-CXSCRQ5X.js +7 -0
- package/dist/blueprint-manifest-SHNZPK5O.cjs +7 -0
- package/dist/{chunk-6J7CIOKR.js → chunk-2HOJWFQ4.js} +1 -1
- package/dist/{chunk-BDIJHJOG.js → chunk-372VUPHN.js} +1 -1
- package/dist/{chunk-Q5TESEDZ.cjs → chunk-3HJEWWPS.cjs} +2 -2
- package/dist/{chunk-ID6BXIOZ.js → chunk-3N67SSL3.js} +1 -1
- package/dist/chunk-3XEP56SV.cjs +204 -0
- package/dist/{chunk-7KFKA3AH.cjs → chunk-3ZZ57K3S.cjs} +2 -2
- package/dist/{chunk-CVSQT5PV.cjs → chunk-4SWC43JO.cjs} +2 -2
- package/dist/{chunk-O3R6C3WW.js → chunk-4VFQTSJQ.js} +1 -1
- package/dist/{chunk-LXAJ722U.js → chunk-57QIBYDN.js} +1 -1
- package/dist/{chunk-SPZSDRM6.cjs → chunk-5SNJAD6F.cjs} +2 -2
- package/dist/{chunk-OI2M6FSB.js → chunk-73H6TVKN.js} +1 -1
- package/dist/{chunk-BB7WFIE2.cjs → chunk-A6JOROUC.cjs} +2 -2
- package/dist/{chunk-SHPXCOTN.cjs → chunk-AJKH25H2.cjs} +3 -3
- package/dist/{chunk-DBNEZWK2.cjs → chunk-ARWMTXJV.cjs} +2 -2
- package/dist/{chunk-7BPPP4M2.js → chunk-B3ZGAG7B.js} +1 -1
- package/dist/{chunk-5WN2YXNU.cjs → chunk-BH5ZXK4J.cjs} +2 -2
- package/dist/{chunk-JM6HKPSC.cjs → chunk-BWFXLUK5.cjs} +2 -2
- package/dist/{chunk-V56ZCL54.js → chunk-C6UTZEHH.js} +1 -1
- package/dist/{chunk-ZPCMZO2O.js → chunk-CPKBR34V.js} +1 -1
- package/dist/{chunk-UTQY2DSM.js → chunk-CWSHYFVZ.js} +1 -1
- package/dist/{chunk-5YVVQBA2.js → chunk-DJKSULPK.js} +1 -1
- package/dist/{chunk-XLOXC52O.js → chunk-DNJ54L2G.js} +1 -1
- package/dist/{chunk-YXPUCBVK.cjs → chunk-DY2D2IW5.cjs} +2 -2
- package/dist/{chunk-Z5LLUUFD.cjs → chunk-E26ZO7QM.cjs} +2 -2
- package/dist/{chunk-RNKZDJOY.js → chunk-EBCHCYUO.js} +1 -1
- package/dist/{chunk-4MO4WLKA.cjs → chunk-EPAIOB5U.cjs} +2 -2
- package/dist/{chunk-UX2IZQNM.cjs → chunk-EQZMT2HF.cjs} +2 -2
- package/dist/{chunk-U52A2DMK.cjs → chunk-F376L6PP.cjs} +2 -2
- package/dist/{chunk-TBBLLEB2.cjs → chunk-F472YLJG.cjs} +2 -2
- package/dist/{chunk-W3MM2BSK.cjs → chunk-FXOX3X7E.cjs} +2 -2
- package/dist/{chunk-E4IFBCNM.cjs → chunk-G2REP2VZ.cjs} +2 -2
- package/dist/{chunk-CFGXI3FX.js → chunk-GLO477NZ.js} +1 -1
- package/dist/{chunk-PBNPZ7UX.js → chunk-H4VSK4KF.js} +1 -1
- package/dist/{chunk-33TQRYMY.js → chunk-HPSGM6QP.js} +1 -1
- package/dist/{chunk-RQKN4WTW.cjs → chunk-HPYHWTTA.cjs} +2 -2
- package/dist/{chunk-5RXE7X63.js → chunk-IH4CMOML.js} +2 -2
- package/dist/{chunk-VD5TBK2T.cjs → chunk-IMT3IE5M.cjs} +2 -2
- package/dist/{chunk-DIP442PL.js → chunk-IP2WWEOU.js} +1 -1
- package/dist/{chunk-FCLW3FLF.js → chunk-IS2VB342.js} +1 -1
- package/dist/{chunk-UNHWLNE4.js → chunk-ITX53XAZ.js} +1 -1
- package/dist/{chunk-KU2XF4TS.cjs → chunk-JXBXDTFG.cjs} +2 -2
- package/dist/{chunk-Y4YQEDR3.js → chunk-K62XK7KU.js} +1 -1
- package/dist/chunk-KA3TGFJP.js +14 -0
- package/dist/{chunk-IXRDP4VP.js → chunk-KBOVBUBM.js} +1 -1
- package/dist/{chunk-MKZGM4A6.js → chunk-KPGC2D6E.js} +1 -1
- package/dist/{chunk-ZAPA4RPI.js → chunk-KSXTBGIV.js} +1 -1
- package/dist/{chunk-PLBIQ2Y7.cjs → chunk-LCIJ4TJ4.cjs} +2 -2
- package/dist/{chunk-TUAAE3UC.cjs → chunk-LQOLYXGQ.cjs} +2 -2
- package/dist/{chunk-6ADJEPMJ.js → chunk-LSIWCIQV.js} +1 -1
- package/dist/{chunk-CBRWUULQ.js → chunk-MHNSZ4HE.js} +1 -1
- package/dist/{chunk-WOOKHE7Y.cjs → chunk-MKX4CKAB.cjs} +2 -2
- package/dist/{chunk-N2P26AAD.js → chunk-MRTAFRO7.js} +1 -1
- package/dist/{chunk-YGULLD73.js → chunk-MRZ7LGKZ.js} +1 -1
- package/dist/{chunk-CLMZ2EXW.js → chunk-MSASBR2Y.js} +1 -1
- package/dist/{chunk-KEJRWMXR.cjs → chunk-NAWLLC3T.cjs} +2 -2
- package/dist/chunk-NJK5F5TF.cjs +21 -0
- package/dist/{chunk-HBPCJRZX.cjs → chunk-NLSZVGHK.cjs} +2 -2
- package/dist/{chunk-CK36RZXR.js → chunk-O4LRVGOY.js} +1 -1
- package/dist/chunk-OG2DMGU6.cjs +14 -0
- package/dist/{chunk-TIJGLQKO.js → chunk-OGQKJTXF.js} +1 -1
- package/dist/{chunk-UE4XPL43.js → chunk-PETLAONH.js} +1 -1
- package/dist/{chunk-MK4ZGXVE.cjs → chunk-PVSS2WPM.cjs} +2 -2
- package/dist/{chunk-ONN5COYQ.cjs → chunk-PXITFTJA.cjs} +2 -2
- package/dist/{chunk-ZAXYMQ2B.cjs → chunk-QDVPPRWI.cjs} +2 -2
- package/dist/{chunk-IPFHV2FV.cjs → chunk-QKERXNJJ.cjs} +2 -2
- package/dist/{chunk-ZDJ3J6Z6.cjs → chunk-QLML3IP5.cjs} +2 -2
- package/dist/{chunk-YFHQYQII.js → chunk-QVAJ5JP4.js} +1 -1
- package/dist/{chunk-S2QF6HG2.cjs → chunk-RD7E4OSJ.cjs} +2 -2
- package/dist/{chunk-XIB2G42L.cjs → chunk-RWSA3LXE.cjs} +2 -2
- package/dist/{chunk-R6WNZVTA.cjs → chunk-RXSS67VI.cjs} +2 -2
- package/dist/{chunk-UXVV3BSC.cjs → chunk-S3ZNESMC.cjs} +2 -2
- package/dist/{chunk-YNPRF4BX.js → chunk-S7NDMDRX.js} +1 -1
- package/dist/{chunk-HO7KACZZ.cjs → chunk-SK3VYIZ6.cjs} +2 -2
- package/dist/{chunk-CX3KG7D2.cjs → chunk-SMGHAG5C.cjs} +2 -2
- package/dist/{chunk-D5FJ26GG.js → chunk-T46LODOF.js} +1 -1
- package/dist/{chunk-Y4ZMNMYI.js → chunk-TIJWJVKZ.js} +1 -1
- package/dist/{chunk-EIILOQ6X.js → chunk-TLWCYLNA.js} +1 -1
- package/dist/{chunk-JX45ME2Z.js → chunk-TRJLYZHD.js} +1 -1
- package/dist/{chunk-RNBO3DEN.js → chunk-UKKJMCNH.js} +1 -1
- package/dist/chunk-ULBEEHG4.js +204 -0
- package/dist/{chunk-UDO4JYVU.cjs → chunk-VGTUK3QD.cjs} +2 -2
- package/dist/{chunk-4JPVFLVU.js → chunk-VQ7R36AC.js} +1 -1
- package/dist/{chunk-IPDIEZBN.cjs → chunk-VVQB5W7U.cjs} +2 -2
- package/dist/{chunk-HKZQ56AS.cjs → chunk-VVVATFGK.cjs} +2 -2
- package/dist/{chunk-URRL33D5.cjs → chunk-WMTYO5OX.cjs} +2 -2
- package/dist/{chunk-U4BMKRG6.js → chunk-WOSSSFXB.js} +1 -1
- package/dist/{chunk-OBQIS3KU.js → chunk-WOXXNKTE.js} +1 -1
- package/dist/{chunk-WAKSLH7V.cjs → chunk-XKI2OAYV.cjs} +2 -2
- package/dist/{chunk-5Y2KLUU6.cjs → chunk-XR4QF6KQ.cjs} +2 -2
- package/dist/{chunk-6BERHKDQ.cjs → chunk-XYHTQ523.cjs} +2 -2
- package/dist/{chunk-XD6XML3Z.cjs → chunk-XZYZLSUO.cjs} +2 -2
- package/dist/chunk-YPSWSI3M.js +21 -0
- package/dist/{chunk-4K3MX2J6.js → chunk-YYBIU5BQ.js} +1 -1
- package/dist/{chunk-HSGQSTVK.js → chunk-YZA5WZUS.js} +1 -1
- package/dist/{chunk-GGBSLAVO.cjs → chunk-Z4LUE424.cjs} +2 -2
- package/dist/{chunk-NSOHW3R6.js → chunk-ZV6XYUXS.js} +1 -1
- package/dist/consent-CS2ZBZX4.cjs +7 -0
- package/dist/consent-NNYHF2N4.js +7 -0
- package/dist/customer-portal-D3SLPAHZ.js +7 -0
- package/dist/customer-portal-UR3GN4VU.cjs +7 -0
- package/dist/dashboard-UHYR5RTY.cjs +7 -0
- package/dist/dashboard-UTPGXFW5.js +7 -0
- package/dist/data-management-QH2IJ5QV.js +7 -0
- package/dist/data-management-TEFRLGSU.cjs +7 -0
- package/dist/deduplication-ECVAZVVA.cjs +7 -0
- package/dist/deduplication-GYIST22B.js +7 -0
- package/dist/design-KUVXMFFK.cjs +7 -0
- package/dist/design-YKBXRW5C.js +7 -0
- package/dist/document-CY2A2OE7.js +7 -0
- package/dist/document-RYQ7MF6U.cjs +7 -0
- package/dist/email-settings-TQ5GGDYG.js +7 -0
- package/dist/email-settings-TQC34GST.cjs +7 -0
- package/dist/email-template-M2VVL4TI.cjs +7 -0
- package/dist/email-template-WYROV3UG.js +7 -0
- package/dist/entity-FA6PZX6S.js +7 -0
- package/dist/entity-IX5NSHPX.cjs +7 -0
- package/dist/entity-mapping-7J3IAGKQ.js +7 -0
- package/dist/entity-mapping-ZNMFCUKK.cjs +7 -0
- package/dist/environments-E3X6NYGX.js +7 -0
- package/dist/environments-P2JS4F5N.cjs +7 -0
- package/dist/erp-integration-EP2XFEH5.js +7 -0
- package/dist/erp-integration-NNV72VFI.cjs +7 -0
- package/dist/event-catalog-C45ISVMP.cjs +7 -0
- package/dist/event-catalog-D7VJ7WRS.js +7 -0
- package/dist/file-UOWBTDIU.cjs +7 -0
- package/dist/file-XSN3NAVZ.js +7 -0
- package/dist/iban-24GHLFDB.cjs +7 -0
- package/dist/iban-LDKYDVQV.js +7 -0
- package/dist/index.cjs +107 -100
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +58 -51
- package/dist/journey-7CKX67M7.js +7 -0
- package/dist/journey-EUZ6MVHG.cjs +7 -0
- package/dist/kanban-CHTH2ZSY.cjs +7 -0
- package/dist/kanban-HI6LL5WY.js +7 -0
- package/dist/message-3XZLJR6R.cjs +7 -0
- package/dist/message-ZNMCS5YH.js +7 -0
- package/dist/metering-DZNZPPY6.cjs +7 -0
- package/dist/metering-KOSCPPKB.js +7 -0
- package/dist/notes-3AO5GXIT.js +7 -0
- package/dist/notes-MPWOQC5J.cjs +7 -0
- package/dist/notification-PZOCUYD5.cjs +7 -0
- package/dist/notification-VWDZRSFZ.js +7 -0
- package/dist/organization-RARYYG2E.cjs +7 -0
- package/dist/organization-ZERPH2IH.js +7 -0
- package/dist/{organization.d-Bd2Hmk8v.d.cts → organization.d-DqwnNxMg.d.cts} +34 -7
- package/dist/{organization.d-Bd2Hmk8v.d.ts → organization.d-DqwnNxMg.d.ts} +34 -7
- package/dist/partner-directory-2XMPQWWX.js +7 -0
- package/dist/partner-directory-WHNTKQ5E.cjs +7 -0
- package/dist/permissions-4T3GFNB4.js +7 -0
- package/dist/permissions-FGBIJNN7.cjs +7 -0
- package/dist/pricing-4Z4TOETA.cjs +7 -0
- package/dist/pricing-C65DTZSX.js +7 -0
- package/dist/pricing-tier-NI35WOUP.cjs +7 -0
- package/dist/pricing-tier-VUOFK5Q7.js +7 -0
- package/dist/purpose-AKOEUHZ4.cjs +7 -0
- package/dist/purpose-RBRV3AQZ.js +7 -0
- package/dist/sandbox-2KN4X66E.cjs +7 -0
- package/dist/sandbox-L2SOOGGR.js +7 -0
- package/dist/submission-7BISSPO6.js +7 -0
- package/dist/submission-Q24BU4GS.cjs +7 -0
- package/dist/targeting-EYGYZD6M.cjs +7 -0
- package/dist/targeting-GEJTJN5Z.js +7 -0
- package/dist/template-variables-OAYS2E3G.cjs +1148 -0
- package/dist/template-variables-VKDJJZUT.js +1148 -0
- package/dist/user-EIEOI3OG.js +7 -0
- package/dist/user-NJJ7XVKB.cjs +7 -0
- package/dist/validation-rules-P6F5P73P.js +7 -0
- package/dist/validation-rules-VDU3CIZV.cjs +7 -0
- package/dist/webhooks-I7JWU34X.cjs +7 -0
- package/dist/webhooks-WPLEHVPX.js +7 -0
- package/dist/workflow-3LLURW3H.js +7 -0
- package/dist/workflow-RAGQDYXT.cjs +7 -0
- package/dist/workflow-definition-B6ELOZUR.cjs +7 -0
- package/dist/workflow-definition-D24CRCK2.js +7 -0
- package/docs/access-token.md +440 -0
- package/docs/address-suggestions.md +256 -0
- package/docs/address.md +284 -0
- package/docs/ai-agents.md +1891 -0
- package/docs/app.md +3388 -0
- package/docs/audit-logs.md +242 -0
- package/docs/automation.md +4044 -0
- package/docs/billing.md +783 -0
- package/docs/blueprint-manifest.md +3234 -0
- package/docs/consent.md +213 -0
- package/docs/customer-portal.md +11399 -0
- package/docs/dashboard.md +640 -0
- package/docs/data-management.md +883 -0
- package/docs/deduplication.md +135 -0
- package/docs/design.md +1273 -0
- package/docs/document.md +590 -0
- package/docs/email-settings.md +1544 -0
- package/docs/email-template.md +1197 -0
- package/docs/entity-mapping.md +2864 -0
- package/docs/entity.md +9595 -0
- package/docs/environments.md +259 -0
- package/docs/erp-integration.md +4572 -0
- package/docs/event-catalog.md +835 -0
- package/docs/file.md +1453 -0
- package/docs/iban.md +61 -0
- package/docs/journey.md +2268 -0
- package/docs/kanban.md +882 -0
- package/docs/message.md +2122 -0
- package/docs/metering.md +1431 -0
- package/docs/notes.md +670 -0
- package/docs/notification.md +1207 -0
- package/docs/organization.md +733 -0
- package/docs/partner-directory.md +1197 -0
- package/docs/permissions.md +1047 -0
- package/docs/pricing-tier.md +81 -0
- package/docs/pricing.md +5923 -0
- package/docs/purpose.md +283 -0
- package/docs/sandbox.md +389 -0
- package/docs/submission.md +195 -0
- package/docs/targeting.md +959 -0
- package/docs/template-variables.md +1141 -0
- package/docs/user.md +2555 -0
- package/docs/validation-rules.md +1597 -0
- package/docs/webhooks.md +996 -0
- package/docs/workflow-definition.md +3842 -0
- package/docs/workflow.md +4465 -0
- package/package.json +3 -2
- package/dist/chunk-GMBRXWMD.cjs +0 -14
- package/dist/chunk-L43U5IO3.js +0 -14
- package/dist/chunk-XE25WERA.js +0 -125
- package/dist/chunk-XEQMAKGA.cjs +0 -125
package/docs/file.md
ADDED
|
@@ -0,0 +1,1453 @@
|
|
|
1
|
+
# File API
|
|
2
|
+
|
|
3
|
+
- **Base URL:** `https://file.sls.epilot.io`
|
|
4
|
+
- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { epilot } from '@epilot/sdk'
|
|
10
|
+
|
|
11
|
+
epilot.authorize(() => '<token>')
|
|
12
|
+
const { data } = await epilot.file.uploadFileV2(...)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Tree-shakeable import
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getClient, authorize } from '@epilot/sdk/file'
|
|
19
|
+
|
|
20
|
+
const fileClient = getClient()
|
|
21
|
+
authorize(fileClient, () => '<token>')
|
|
22
|
+
const { data } = await fileClient.uploadFileV2(...)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
**File**
|
|
28
|
+
- [`uploadFileV2`](#uploadfilev2)
|
|
29
|
+
- [`saveFileV2`](#savefilev2)
|
|
30
|
+
- [`getFile`](#getfile)
|
|
31
|
+
- [`deleteFile`](#deletefile)
|
|
32
|
+
- [`downloadFile`](#downloadfile)
|
|
33
|
+
- [`downloadS3File`](#downloads3file)
|
|
34
|
+
- [`downloadFiles`](#downloadfiles)
|
|
35
|
+
- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)
|
|
36
|
+
- [`uploadFilePublic`](#uploadfilepublic)
|
|
37
|
+
|
|
38
|
+
**Preview**
|
|
39
|
+
- [`previewFile`](#previewfile)
|
|
40
|
+
- [`previewS3File`](#previews3file)
|
|
41
|
+
- [`previewS3FileGet`](#previews3fileget)
|
|
42
|
+
- [`previewPublicFile`](#previewpublicfile)
|
|
43
|
+
|
|
44
|
+
**Session**
|
|
45
|
+
- [`getSession`](#getsession)
|
|
46
|
+
- [`deleteSession`](#deletesession)
|
|
47
|
+
|
|
48
|
+
**Public Links**
|
|
49
|
+
- [`generatePublicLink`](#generatepubliclink)
|
|
50
|
+
- [`listPublicLinksForFile`](#listpubliclinksforfile)
|
|
51
|
+
- [`accessPublicLink`](#accesspubliclink)
|
|
52
|
+
- [`revokePublicLink`](#revokepubliclink)
|
|
53
|
+
|
|
54
|
+
**File Collections**
|
|
55
|
+
- [`getUserSchemaFileCollections`](#getuserschemafilecollections)
|
|
56
|
+
- [`createUserSchemaFileCollection`](#createuserschemafilecollection)
|
|
57
|
+
- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)
|
|
58
|
+
- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)
|
|
59
|
+
- [`getFilesInCollection`](#getfilesincollection)
|
|
60
|
+
- [`getGlobalFileCollections`](#getglobalfilecollections)
|
|
61
|
+
|
|
62
|
+
**Schemas**
|
|
63
|
+
- [`EntityId`](#entityid)
|
|
64
|
+
- [`EntitySlug`](#entityslug)
|
|
65
|
+
- [`ActivityId`](#activityid)
|
|
66
|
+
- [`FileEntityId`](#fileentityid)
|
|
67
|
+
- [`FileAttributes`](#fileattributes)
|
|
68
|
+
- [`FileType`](#filetype)
|
|
69
|
+
- [`CustomDownloadUrl`](#customdownloadurl)
|
|
70
|
+
- [`FileEntity`](#fileentity)
|
|
71
|
+
- [`CommonSaveFilePayload`](#commonsavefilepayload)
|
|
72
|
+
- [`SaveS3FilePayload`](#saves3filepayload)
|
|
73
|
+
- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)
|
|
74
|
+
- [`SaveCustomFilePayload`](#savecustomfilepayload)
|
|
75
|
+
- [`SaveFilePayload`](#savefilepayload)
|
|
76
|
+
- [`SaveFilePayloadV2`](#savefilepayloadv2)
|
|
77
|
+
- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)
|
|
78
|
+
- [`UploadFilePayload`](#uploadfilepayload)
|
|
79
|
+
- [`FileUpload`](#fileupload)
|
|
80
|
+
- [`DownloadFilesPayload`](#downloadfilespayload)
|
|
81
|
+
- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)
|
|
82
|
+
- [`S3Reference`](#s3reference)
|
|
83
|
+
- [`S3Ref`](#s3ref)
|
|
84
|
+
- [`FileItem`](#fileitem)
|
|
85
|
+
- [`FileRelationItem`](#filerelationitem)
|
|
86
|
+
- [`PublicLink`](#publiclink)
|
|
87
|
+
- [`BaseEntityOwner`](#baseentityowner)
|
|
88
|
+
- [`BaseEntityAcl`](#baseentityacl)
|
|
89
|
+
- [`ErrorObject`](#errorobject)
|
|
90
|
+
- [`FileCollectionId`](#filecollectionid)
|
|
91
|
+
- [`FileCollectionItem`](#filecollectionitem)
|
|
92
|
+
- [`FileCollectionAttributes`](#filecollectionattributes)
|
|
93
|
+
- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)
|
|
94
|
+
|
|
95
|
+
### `uploadFileV2`
|
|
96
|
+
|
|
97
|
+
Create pre-signed S3 URL to upload a file to keep temporarily (one week).
|
|
98
|
+
|
|
99
|
+
`POST /v2/files/upload`
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
const { data } = await client.uploadFileV2(
|
|
103
|
+
{
|
|
104
|
+
file_entity_id: 'example',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
filename: 'document.pdf',
|
|
108
|
+
mime_type: 'application/pdf',
|
|
109
|
+
index_tag: '2f6a377c8e78',
|
|
110
|
+
metadata: {
|
|
111
|
+
color: 'blue'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary>Response</summary>
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"s3ref": {
|
|
123
|
+
"bucket": "epilot-prod-user-content",
|
|
124
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
125
|
+
},
|
|
126
|
+
"upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",
|
|
127
|
+
"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### `saveFileV2`
|
|
136
|
+
|
|
137
|
+
Saves a permanent file entity. Updates an existing file entity when `_id` is passed.
|
|
138
|
+
|
|
139
|
+
`POST /v2/files`
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
const { data } = await client.saveFileV2(
|
|
143
|
+
{
|
|
144
|
+
activity_id: 'example',
|
|
145
|
+
fill_activity: true,
|
|
146
|
+
strict: true,
|
|
147
|
+
async: true,
|
|
148
|
+
delete_temp_file: true,
|
|
149
|
+
version_only: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
_id: 'ef7d985c-2385-44f4-9c71-ae06a52264f8',
|
|
153
|
+
file_entity_id: 'string',
|
|
154
|
+
relations: [
|
|
155
|
+
{
|
|
156
|
+
entity_id: 'ef7d985c-2385-44f4-9c71-ae06a52264f8',
|
|
157
|
+
_schema: 'contact',
|
|
158
|
+
_tags: ['string']
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
_tags: ['tag1', 'tag2'],
|
|
162
|
+
_purpose: ['8d396871-95a0-4c9d-bb4d-9eda9c35776c', 'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8'],
|
|
163
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
164
|
+
filename: 'document.pdf',
|
|
165
|
+
type: 'document',
|
|
166
|
+
mime_type: 'application/pdf',
|
|
167
|
+
size_bytes: 1234,
|
|
168
|
+
readable_size: '1.2 MB',
|
|
169
|
+
access_control: 'private',
|
|
170
|
+
public_url: 'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf',
|
|
171
|
+
custom_download_url: 'https://some-api-url.com/download?file_id=123',
|
|
172
|
+
s3ref: {}
|
|
173
|
+
},
|
|
174
|
+
)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary>Response</summary>
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"_title": "document.pdf",
|
|
183
|
+
"_schema": "file",
|
|
184
|
+
"_org": "123",
|
|
185
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
186
|
+
"_tags": ["tag1", "tag2"],
|
|
187
|
+
"_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],
|
|
188
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
189
|
+
"filename": "document.pdf",
|
|
190
|
+
"type": "document",
|
|
191
|
+
"mime_type": "application/pdf",
|
|
192
|
+
"size_bytes": 1234,
|
|
193
|
+
"readable_size": "1.2 MB",
|
|
194
|
+
"access_control": "private",
|
|
195
|
+
"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
196
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
197
|
+
"source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",
|
|
198
|
+
"s3ref": {},
|
|
199
|
+
"versions": [
|
|
200
|
+
{
|
|
201
|
+
"s3ref": {},
|
|
202
|
+
"filename": "document.pdf",
|
|
203
|
+
"size_bytes": 1234,
|
|
204
|
+
"readable_size": "1.2 MB",
|
|
205
|
+
"mime_type": "image/jpeg"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
209
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
210
|
+
"_acl": {
|
|
211
|
+
"view": ["org:456"],
|
|
212
|
+
"edit": ["org:456"],
|
|
213
|
+
"delete": ["org:456"]
|
|
214
|
+
},
|
|
215
|
+
"_owners": [
|
|
216
|
+
{
|
|
217
|
+
"org_id": "123",
|
|
218
|
+
"user_id": "123"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"__additional": {}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
</details>
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### `getFile`
|
|
230
|
+
|
|
231
|
+
Get a file entity by id
|
|
232
|
+
|
|
233
|
+
`GET /v2/files/{id}`
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
const { data } = await client.getFile({
|
|
237
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
238
|
+
source_url: true,
|
|
239
|
+
strict: true,
|
|
240
|
+
async: true,
|
|
241
|
+
})
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary>Response</summary>
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"_title": "document.pdf",
|
|
250
|
+
"_schema": "file",
|
|
251
|
+
"_org": "123",
|
|
252
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
253
|
+
"_tags": ["tag1", "tag2"],
|
|
254
|
+
"_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],
|
|
255
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
256
|
+
"filename": "document.pdf",
|
|
257
|
+
"type": "document",
|
|
258
|
+
"mime_type": "application/pdf",
|
|
259
|
+
"size_bytes": 1234,
|
|
260
|
+
"readable_size": "1.2 MB",
|
|
261
|
+
"access_control": "private",
|
|
262
|
+
"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
263
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
264
|
+
"source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",
|
|
265
|
+
"s3ref": {},
|
|
266
|
+
"versions": [
|
|
267
|
+
{
|
|
268
|
+
"s3ref": {},
|
|
269
|
+
"filename": "document.pdf",
|
|
270
|
+
"size_bytes": 1234,
|
|
271
|
+
"readable_size": "1.2 MB",
|
|
272
|
+
"mime_type": "image/jpeg"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
276
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
277
|
+
"_acl": {
|
|
278
|
+
"view": ["org:456"],
|
|
279
|
+
"edit": ["org:456"],
|
|
280
|
+
"delete": ["org:456"]
|
|
281
|
+
},
|
|
282
|
+
"_owners": [
|
|
283
|
+
{
|
|
284
|
+
"org_id": "123",
|
|
285
|
+
"user_id": "123"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"__additional": {}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
</details>
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
### `deleteFile`
|
|
297
|
+
|
|
298
|
+
Delete a file entity by id
|
|
299
|
+
|
|
300
|
+
`DELETE /v2/files/{id}`
|
|
301
|
+
|
|
302
|
+
```ts
|
|
303
|
+
const { data } = await client.deleteFile({
|
|
304
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
305
|
+
purge: true,
|
|
306
|
+
activity_id: 'example',
|
|
307
|
+
strict: true,
|
|
308
|
+
})
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
<details>
|
|
312
|
+
<summary>Response</summary>
|
|
313
|
+
|
|
314
|
+
```json
|
|
315
|
+
{
|
|
316
|
+
"_title": "document.pdf",
|
|
317
|
+
"_schema": "file",
|
|
318
|
+
"_org": "123",
|
|
319
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
320
|
+
"_tags": ["tag1", "tag2"],
|
|
321
|
+
"_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],
|
|
322
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
323
|
+
"filename": "document.pdf",
|
|
324
|
+
"type": "document",
|
|
325
|
+
"mime_type": "application/pdf",
|
|
326
|
+
"size_bytes": 1234,
|
|
327
|
+
"readable_size": "1.2 MB",
|
|
328
|
+
"access_control": "private",
|
|
329
|
+
"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
330
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
331
|
+
"source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",
|
|
332
|
+
"s3ref": {},
|
|
333
|
+
"versions": [
|
|
334
|
+
{
|
|
335
|
+
"s3ref": {},
|
|
336
|
+
"filename": "document.pdf",
|
|
337
|
+
"size_bytes": 1234,
|
|
338
|
+
"readable_size": "1.2 MB",
|
|
339
|
+
"mime_type": "image/jpeg"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
343
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
344
|
+
"_acl": {
|
|
345
|
+
"view": ["org:456"],
|
|
346
|
+
"edit": ["org:456"],
|
|
347
|
+
"delete": ["org:456"]
|
|
348
|
+
},
|
|
349
|
+
"_owners": [
|
|
350
|
+
{
|
|
351
|
+
"org_id": "123",
|
|
352
|
+
"user_id": "123"
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"__additional": {}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
</details>
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
### `downloadFile`
|
|
364
|
+
|
|
365
|
+
Generate a pre-signed download URL for a file.
|
|
366
|
+
|
|
367
|
+
`GET /v1/files/{id}/download`
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
const { data } = await client.downloadFile({
|
|
371
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
372
|
+
version: 1,
|
|
373
|
+
attachment: true,
|
|
374
|
+
})
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
<details>
|
|
378
|
+
<summary>Response</summary>
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
{
|
|
382
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
</details>
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### `downloadS3File`
|
|
391
|
+
|
|
392
|
+
Generate a pre-signed download URL for a file using its S3 reference.
|
|
393
|
+
|
|
394
|
+
`POST /v1/files:downloadS3`
|
|
395
|
+
|
|
396
|
+
```ts
|
|
397
|
+
const { data } = await client.downloadS3File({
|
|
398
|
+
s3_key: 'example',
|
|
399
|
+
s3_bucket: 'example',
|
|
400
|
+
attachment: true,
|
|
401
|
+
})
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
<details>
|
|
405
|
+
<summary>Response</summary>
|
|
406
|
+
|
|
407
|
+
```json
|
|
408
|
+
{
|
|
409
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
</details>
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
### `downloadFiles`
|
|
418
|
+
|
|
419
|
+
Bulk generate pre-signed download URLs for multiple files in a single request.
|
|
420
|
+
|
|
421
|
+
`POST /v1/files:downloadFiles`
|
|
422
|
+
|
|
423
|
+
```ts
|
|
424
|
+
const { data } = await client.downloadFiles(
|
|
425
|
+
null,
|
|
426
|
+
[
|
|
427
|
+
{
|
|
428
|
+
id: 'ef7d985c-2385-44f4-9c71-ae06a52264f8',
|
|
429
|
+
version: 0
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
)
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
<details>
|
|
436
|
+
<summary>Response</summary>
|
|
437
|
+
|
|
438
|
+
```json
|
|
439
|
+
[
|
|
440
|
+
{
|
|
441
|
+
"download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",
|
|
442
|
+
"file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
</details>
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
### `previewFile`
|
|
452
|
+
|
|
453
|
+
Generate a thumbnail preview for a file entity.
|
|
454
|
+
|
|
455
|
+
`GET /v1/files/{id}/preview`
|
|
456
|
+
|
|
457
|
+
```ts
|
|
458
|
+
const { data } = await client.previewFile({
|
|
459
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
460
|
+
version: 1,
|
|
461
|
+
w: 1,
|
|
462
|
+
h: 1,
|
|
463
|
+
})
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
### `previewS3File`
|
|
469
|
+
|
|
470
|
+
Generate a thumbnail preview from an S3 reference.
|
|
471
|
+
|
|
472
|
+
`POST /v1/files:previewS3`
|
|
473
|
+
|
|
474
|
+
```ts
|
|
475
|
+
const { data } = await client.previewS3File(
|
|
476
|
+
{
|
|
477
|
+
w: 1,
|
|
478
|
+
h: 1,
|
|
479
|
+
},
|
|
480
|
+
{},
|
|
481
|
+
)
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
### `previewS3FileGet`
|
|
487
|
+
|
|
488
|
+
Get a thumbnail preview from an S3 reference using query parameters.
|
|
489
|
+
|
|
490
|
+
`GET /v1/files:previewS3`
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
const { data } = await client.previewS3FileGet({
|
|
494
|
+
key: 'example',
|
|
495
|
+
bucket: 'example',
|
|
496
|
+
w: 1,
|
|
497
|
+
h: 1,
|
|
498
|
+
})
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
### `previewPublicFile`
|
|
504
|
+
|
|
505
|
+
Generate a thumbnail preview for a public file entity.
|
|
506
|
+
|
|
507
|
+
`GET /v1/files/public/{id}/preview`
|
|
508
|
+
|
|
509
|
+
```ts
|
|
510
|
+
const { data } = await client.previewPublicFile({
|
|
511
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
512
|
+
version: 1,
|
|
513
|
+
w: 1,
|
|
514
|
+
h: 1,
|
|
515
|
+
org_id: 'example',
|
|
516
|
+
})
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
### `getSession`
|
|
522
|
+
|
|
523
|
+
Start a browser session by converting a Bearer token into a server-side cookie.
|
|
524
|
+
|
|
525
|
+
`GET /v1/files/session`
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
const { data } = await client.getSession()
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
### `deleteSession`
|
|
534
|
+
|
|
535
|
+
End a browser session by deleting the token cookie.
|
|
536
|
+
|
|
537
|
+
`DELETE /v1/files/session`
|
|
538
|
+
|
|
539
|
+
```ts
|
|
540
|
+
const { data } = await client.deleteSession()
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
### `generatePublicLink`
|
|
546
|
+
|
|
547
|
+
Generate a public link to share a private file externally.
|
|
548
|
+
|
|
549
|
+
`POST /v1/files/{id}/public/links`
|
|
550
|
+
|
|
551
|
+
```ts
|
|
552
|
+
const { data } = await client.generatePublicLink({
|
|
553
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
554
|
+
})
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
<details>
|
|
558
|
+
<summary>Response</summary>
|
|
559
|
+
|
|
560
|
+
```json
|
|
561
|
+
"string"
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
</details>
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
### `listPublicLinksForFile`
|
|
569
|
+
|
|
570
|
+
**Not yet implemented.**
|
|
571
|
+
|
|
572
|
+
`GET /v1/files/{id}/public/links`
|
|
573
|
+
|
|
574
|
+
```ts
|
|
575
|
+
const { data } = await client.listPublicLinksForFile({
|
|
576
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
577
|
+
})
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
<details>
|
|
581
|
+
<summary>Response</summary>
|
|
582
|
+
|
|
583
|
+
```json
|
|
584
|
+
{
|
|
585
|
+
"results": [
|
|
586
|
+
{
|
|
587
|
+
"id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",
|
|
588
|
+
"link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",
|
|
589
|
+
"last_accessed_at": "string"
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
</details>
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
### `accessPublicLink`
|
|
600
|
+
|
|
601
|
+
Access a file via its public link.
|
|
602
|
+
|
|
603
|
+
`GET /v1/files/public/links/{id}/{filename}`
|
|
604
|
+
|
|
605
|
+
```ts
|
|
606
|
+
const { data } = await client.accessPublicLink({
|
|
607
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
608
|
+
filename: 'example',
|
|
609
|
+
hash: 'example',
|
|
610
|
+
})
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
### `revokePublicLink`
|
|
616
|
+
|
|
617
|
+
**Not yet implemented.**
|
|
618
|
+
|
|
619
|
+
`DELETE /v1/files/public/links/{id}`
|
|
620
|
+
|
|
621
|
+
```ts
|
|
622
|
+
const { data } = await client.revokePublicLink({
|
|
623
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
624
|
+
})
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
### `verifyCustomDownloadUrl`
|
|
630
|
+
|
|
631
|
+
Verify that a custom download URL is valid and has not expired.
|
|
632
|
+
|
|
633
|
+
`POST /v1/files/download:verify`
|
|
634
|
+
|
|
635
|
+
```ts
|
|
636
|
+
const { data } = await client.verifyCustomDownloadUrl(
|
|
637
|
+
null,
|
|
638
|
+
{
|
|
639
|
+
custom_download_url: 'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg'
|
|
640
|
+
},
|
|
641
|
+
)
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
<details>
|
|
645
|
+
<summary>Response</summary>
|
|
646
|
+
|
|
647
|
+
```json
|
|
648
|
+
{
|
|
649
|
+
"valid": true
|
|
650
|
+
}
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
</details>
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
### `uploadFilePublic`
|
|
658
|
+
|
|
659
|
+
Create a pre-signed S3 URL for uploading a file without authentication.
|
|
660
|
+
|
|
661
|
+
`POST /v1/files/public/upload`
|
|
662
|
+
|
|
663
|
+
```ts
|
|
664
|
+
const { data } = await client.uploadFilePublic(
|
|
665
|
+
null,
|
|
666
|
+
{
|
|
667
|
+
filename: 'document.pdf',
|
|
668
|
+
mime_type: 'application/pdf',
|
|
669
|
+
index_tag: '2f6a377c8e78',
|
|
670
|
+
metadata: {
|
|
671
|
+
color: 'blue'
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
)
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
<details>
|
|
678
|
+
<summary>Response</summary>
|
|
679
|
+
|
|
680
|
+
```json
|
|
681
|
+
{
|
|
682
|
+
"s3ref": {
|
|
683
|
+
"bucket": "epilot-prod-user-content",
|
|
684
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
685
|
+
},
|
|
686
|
+
"upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",
|
|
687
|
+
"error": "File entity not found"
|
|
688
|
+
}
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
</details>
|
|
692
|
+
|
|
693
|
+
---
|
|
694
|
+
|
|
695
|
+
### `getUserSchemaFileCollections`
|
|
696
|
+
|
|
697
|
+
Get all file collections for the current user within a specific schema.
|
|
698
|
+
|
|
699
|
+
`GET /v1/{slug}/collections`
|
|
700
|
+
|
|
701
|
+
```ts
|
|
702
|
+
const { data } = await client.getUserSchemaFileCollections({
|
|
703
|
+
slug: 'example',
|
|
704
|
+
})
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
<details>
|
|
708
|
+
<summary>Response</summary>
|
|
709
|
+
|
|
710
|
+
```json
|
|
711
|
+
[
|
|
712
|
+
{
|
|
713
|
+
"slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
714
|
+
"name": "Documents",
|
|
715
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
716
|
+
"parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],
|
|
717
|
+
"starred": false,
|
|
718
|
+
"order": 0,
|
|
719
|
+
"enabled_locations": ["string"],
|
|
720
|
+
"enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],
|
|
721
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
722
|
+
"updated_at": "2024-01-02T12:00:00Z"
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
</details>
|
|
728
|
+
|
|
729
|
+
---
|
|
730
|
+
|
|
731
|
+
### `createUserSchemaFileCollection`
|
|
732
|
+
|
|
733
|
+
Create a new file collection for the current user within a specific schema.
|
|
734
|
+
|
|
735
|
+
`POST /v1/{slug}/collections`
|
|
736
|
+
|
|
737
|
+
```ts
|
|
738
|
+
const { data } = await client.createUserSchemaFileCollection(
|
|
739
|
+
{
|
|
740
|
+
slug: 'example',
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
name: 'string',
|
|
744
|
+
parents: ['string'],
|
|
745
|
+
starred: false,
|
|
746
|
+
enabled_locations: ['string'],
|
|
747
|
+
enabled_purposes: ['string']
|
|
748
|
+
},
|
|
749
|
+
)
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
<details>
|
|
753
|
+
<summary>Response</summary>
|
|
754
|
+
|
|
755
|
+
```json
|
|
756
|
+
{
|
|
757
|
+
"slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
758
|
+
"name": "Documents",
|
|
759
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
760
|
+
"parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],
|
|
761
|
+
"starred": false,
|
|
762
|
+
"order": 0,
|
|
763
|
+
"enabled_locations": ["string"],
|
|
764
|
+
"enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],
|
|
765
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
766
|
+
"updated_at": "2024-01-02T12:00:00Z"
|
|
767
|
+
}
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
</details>
|
|
771
|
+
|
|
772
|
+
---
|
|
773
|
+
|
|
774
|
+
### `updateUserSchemaFileCollection`
|
|
775
|
+
|
|
776
|
+
Update an existing file collection.
|
|
777
|
+
|
|
778
|
+
`PUT /v1/{slug}/collections/{collectionSlug}`
|
|
779
|
+
|
|
780
|
+
```ts
|
|
781
|
+
const { data } = await client.updateUserSchemaFileCollection(
|
|
782
|
+
{
|
|
783
|
+
slug: 'example',
|
|
784
|
+
collectionSlug: 'example',
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: 'string',
|
|
788
|
+
parents: ['string'],
|
|
789
|
+
starred: false,
|
|
790
|
+
enabled_locations: ['string'],
|
|
791
|
+
enabled_purposes: ['string']
|
|
792
|
+
},
|
|
793
|
+
)
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
<details>
|
|
797
|
+
<summary>Response</summary>
|
|
798
|
+
|
|
799
|
+
```json
|
|
800
|
+
{
|
|
801
|
+
"slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
802
|
+
"name": "Documents",
|
|
803
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
804
|
+
"parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],
|
|
805
|
+
"starred": false,
|
|
806
|
+
"order": 0,
|
|
807
|
+
"enabled_locations": ["string"],
|
|
808
|
+
"enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],
|
|
809
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
810
|
+
"updated_at": "2024-01-02T12:00:00Z"
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
</details>
|
|
815
|
+
|
|
816
|
+
---
|
|
817
|
+
|
|
818
|
+
### `deleteUserSchemaFileCollection`
|
|
819
|
+
|
|
820
|
+
Delete a file collection.
|
|
821
|
+
|
|
822
|
+
`DELETE /v1/{slug}/collections/{collectionSlug}`
|
|
823
|
+
|
|
824
|
+
```ts
|
|
825
|
+
const { data } = await client.deleteUserSchemaFileCollection({
|
|
826
|
+
slug: 'example',
|
|
827
|
+
collectionSlug: 'example',
|
|
828
|
+
})
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
---
|
|
832
|
+
|
|
833
|
+
### `getFilesInCollection`
|
|
834
|
+
|
|
835
|
+
Get all files within a specific collection for an entity.
|
|
836
|
+
|
|
837
|
+
`GET /v1/entity/{id}/collections/{collectionSlug}/files`
|
|
838
|
+
|
|
839
|
+
```ts
|
|
840
|
+
const { data } = await client.getFilesInCollection({
|
|
841
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
842
|
+
collectionSlug: 'example',
|
|
843
|
+
})
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
<details>
|
|
847
|
+
<summary>Response</summary>
|
|
848
|
+
|
|
849
|
+
```json
|
|
850
|
+
[
|
|
851
|
+
{
|
|
852
|
+
"_title": "document.pdf",
|
|
853
|
+
"_schema": "file",
|
|
854
|
+
"_org": "123",
|
|
855
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
856
|
+
"_tags": ["tag1", "tag2"],
|
|
857
|
+
"_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],
|
|
858
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
859
|
+
"filename": "document.pdf",
|
|
860
|
+
"type": "document",
|
|
861
|
+
"mime_type": "application/pdf",
|
|
862
|
+
"size_bytes": 1234,
|
|
863
|
+
"readable_size": "1.2 MB",
|
|
864
|
+
"access_control": "private",
|
|
865
|
+
"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
866
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
867
|
+
"source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",
|
|
868
|
+
"s3ref": {},
|
|
869
|
+
"versions": [
|
|
870
|
+
{
|
|
871
|
+
"s3ref": {},
|
|
872
|
+
"filename": "document.pdf",
|
|
873
|
+
"size_bytes": 1234,
|
|
874
|
+
"readable_size": "1.2 MB",
|
|
875
|
+
"mime_type": "image/jpeg"
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
"_updated_at": "1970-01-01T00:00:00.000Z",
|
|
879
|
+
"_created_at": "1970-01-01T00:00:00.000Z",
|
|
880
|
+
"_acl": {
|
|
881
|
+
"view": ["org:456"],
|
|
882
|
+
"edit": ["org:456"],
|
|
883
|
+
"delete": ["org:456"]
|
|
884
|
+
},
|
|
885
|
+
"_owners": [
|
|
886
|
+
{
|
|
887
|
+
"org_id": "123",
|
|
888
|
+
"user_id": "123"
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
"__additional": {}
|
|
892
|
+
}
|
|
893
|
+
]
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
</details>
|
|
897
|
+
|
|
898
|
+
---
|
|
899
|
+
|
|
900
|
+
### `getGlobalFileCollections`
|
|
901
|
+
|
|
902
|
+
Get all global file collections for a specific schema.
|
|
903
|
+
|
|
904
|
+
`GET /v1/collections/{schemaSlug}`
|
|
905
|
+
|
|
906
|
+
```ts
|
|
907
|
+
const { data } = await client.getGlobalFileCollections({
|
|
908
|
+
schemaSlug: 'example',
|
|
909
|
+
})
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
<details>
|
|
913
|
+
<summary>Response</summary>
|
|
914
|
+
|
|
915
|
+
```json
|
|
916
|
+
[
|
|
917
|
+
{
|
|
918
|
+
"slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
919
|
+
"name": "Documents",
|
|
920
|
+
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
921
|
+
"parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],
|
|
922
|
+
"starred": false,
|
|
923
|
+
"order": 0,
|
|
924
|
+
"enabled_locations": ["string"],
|
|
925
|
+
"enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],
|
|
926
|
+
"created_at": "2024-01-01T12:00:00Z",
|
|
927
|
+
"updated_at": "2024-01-02T12:00:00Z"
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
</details>
|
|
933
|
+
|
|
934
|
+
---
|
|
935
|
+
|
|
936
|
+
## Schemas
|
|
937
|
+
|
|
938
|
+
### `EntityId`
|
|
939
|
+
|
|
940
|
+
```ts
|
|
941
|
+
type EntityId = string
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
### `EntitySlug`
|
|
945
|
+
|
|
946
|
+
URL-friendly identifier for the entity schema
|
|
947
|
+
|
|
948
|
+
```ts
|
|
949
|
+
type EntitySlug = string
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### `ActivityId`
|
|
953
|
+
|
|
954
|
+
See https://github.com/ulid/spec
|
|
955
|
+
|
|
956
|
+
```ts
|
|
957
|
+
type ActivityId = string // ulid
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
### `FileEntityId`
|
|
961
|
+
|
|
962
|
+
```ts
|
|
963
|
+
type FileEntityId = string | string // uuid
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
### `FileAttributes`
|
|
967
|
+
|
|
968
|
+
```ts
|
|
969
|
+
type FileAttributes = {
|
|
970
|
+
_tags?: string[]
|
|
971
|
+
_purpose?: string[]
|
|
972
|
+
_manifest?: string // uuid[]
|
|
973
|
+
filename?: string
|
|
974
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
975
|
+
mime_type?: string
|
|
976
|
+
size_bytes?: number
|
|
977
|
+
readable_size?: string
|
|
978
|
+
access_control?: "private" | "public-read"
|
|
979
|
+
public_url?: string // url
|
|
980
|
+
custom_download_url?: string // uri
|
|
981
|
+
}
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
### `FileType`
|
|
985
|
+
|
|
986
|
+
```ts
|
|
987
|
+
type FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
### `CustomDownloadUrl`
|
|
991
|
+
|
|
992
|
+
Custom external download url used for the file
|
|
993
|
+
|
|
994
|
+
```ts
|
|
995
|
+
type CustomDownloadUrl = string // uri
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
### `FileEntity`
|
|
999
|
+
|
|
1000
|
+
```ts
|
|
1001
|
+
type FileEntity = {
|
|
1002
|
+
_title: string
|
|
1003
|
+
_schema: "file"
|
|
1004
|
+
_org: string
|
|
1005
|
+
_id: string | string // uuid
|
|
1006
|
+
_tags?: string[]
|
|
1007
|
+
_purpose?: string[]
|
|
1008
|
+
_manifest?: string // uuid[]
|
|
1009
|
+
filename: string
|
|
1010
|
+
type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1011
|
+
mime_type?: string
|
|
1012
|
+
size_bytes?: number
|
|
1013
|
+
readable_size?: string
|
|
1014
|
+
access_control: "private" | "public-read"
|
|
1015
|
+
public_url?: string // url
|
|
1016
|
+
custom_download_url?: string // uri
|
|
1017
|
+
source_url?: string
|
|
1018
|
+
s3ref?: object
|
|
1019
|
+
versions: Array<{
|
|
1020
|
+
s3ref?: unknown
|
|
1021
|
+
filename?: string
|
|
1022
|
+
size_bytes?: number
|
|
1023
|
+
readable_size?: string
|
|
1024
|
+
mime_type?: string
|
|
1025
|
+
}>
|
|
1026
|
+
_updated_at?: string // date-time
|
|
1027
|
+
_created_at?: string // date-time
|
|
1028
|
+
_acl?: {
|
|
1029
|
+
view?: string[]
|
|
1030
|
+
edit?: string[]
|
|
1031
|
+
delete?: string[]
|
|
1032
|
+
}
|
|
1033
|
+
_owners?: Array<{
|
|
1034
|
+
org_id: string
|
|
1035
|
+
user_id?: string
|
|
1036
|
+
}>
|
|
1037
|
+
__additional?: Record<string, unknown>
|
|
1038
|
+
}
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
### `CommonSaveFilePayload`
|
|
1042
|
+
|
|
1043
|
+
```ts
|
|
1044
|
+
type CommonSaveFilePayload = {
|
|
1045
|
+
_id?: object
|
|
1046
|
+
file_entity_id?: string
|
|
1047
|
+
relations?: Array<{
|
|
1048
|
+
entity_id: string
|
|
1049
|
+
_schema?: string
|
|
1050
|
+
_tags?: string[]
|
|
1051
|
+
}>
|
|
1052
|
+
}
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
### `SaveS3FilePayload`
|
|
1056
|
+
|
|
1057
|
+
```ts
|
|
1058
|
+
type SaveS3FilePayload = {
|
|
1059
|
+
_id?: object
|
|
1060
|
+
file_entity_id?: string
|
|
1061
|
+
relations?: Array<{
|
|
1062
|
+
entity_id: string
|
|
1063
|
+
_schema?: string
|
|
1064
|
+
_tags?: string[]
|
|
1065
|
+
}>
|
|
1066
|
+
_tags?: string[]
|
|
1067
|
+
_purpose?: string[]
|
|
1068
|
+
_manifest?: string // uuid[]
|
|
1069
|
+
filename?: string
|
|
1070
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1071
|
+
mime_type?: string
|
|
1072
|
+
size_bytes?: number
|
|
1073
|
+
readable_size?: string
|
|
1074
|
+
access_control?: "private" | "public-read"
|
|
1075
|
+
public_url?: string // url
|
|
1076
|
+
custom_download_url?: string // uri
|
|
1077
|
+
s3ref?: unknown
|
|
1078
|
+
}
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
### `SaveFileFromSourceURLPayload`
|
|
1082
|
+
|
|
1083
|
+
```ts
|
|
1084
|
+
type SaveFileFromSourceURLPayload = {
|
|
1085
|
+
_id?: object
|
|
1086
|
+
file_entity_id?: string
|
|
1087
|
+
relations?: Array<{
|
|
1088
|
+
entity_id: string
|
|
1089
|
+
_schema?: string
|
|
1090
|
+
_tags?: string[]
|
|
1091
|
+
}>
|
|
1092
|
+
_tags?: string[]
|
|
1093
|
+
_purpose?: string[]
|
|
1094
|
+
_manifest?: string // uuid[]
|
|
1095
|
+
filename?: string
|
|
1096
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1097
|
+
mime_type?: string
|
|
1098
|
+
size_bytes?: number
|
|
1099
|
+
readable_size?: string
|
|
1100
|
+
access_control?: "private" | "public-read"
|
|
1101
|
+
public_url?: string // url
|
|
1102
|
+
custom_download_url?: string // uri
|
|
1103
|
+
source_url?: string // uri
|
|
1104
|
+
}
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
### `SaveCustomFilePayload`
|
|
1108
|
+
|
|
1109
|
+
```ts
|
|
1110
|
+
type SaveCustomFilePayload = {
|
|
1111
|
+
_id?: object
|
|
1112
|
+
file_entity_id?: string
|
|
1113
|
+
relations?: Array<{
|
|
1114
|
+
entity_id: string
|
|
1115
|
+
_schema?: string
|
|
1116
|
+
_tags?: string[]
|
|
1117
|
+
}>
|
|
1118
|
+
_tags?: string[]
|
|
1119
|
+
_purpose?: string[]
|
|
1120
|
+
_manifest?: string // uuid[]
|
|
1121
|
+
filename?: string
|
|
1122
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1123
|
+
mime_type?: string
|
|
1124
|
+
size_bytes?: number
|
|
1125
|
+
readable_size?: string
|
|
1126
|
+
access_control?: "private" | "public-read"
|
|
1127
|
+
public_url?: string // url
|
|
1128
|
+
custom_download_url?: string // uri
|
|
1129
|
+
}
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
### `SaveFilePayload`
|
|
1133
|
+
|
|
1134
|
+
```ts
|
|
1135
|
+
type SaveFilePayload = {
|
|
1136
|
+
_id?: object
|
|
1137
|
+
file_entity_id?: string
|
|
1138
|
+
relations?: Array<{
|
|
1139
|
+
entity_id: string
|
|
1140
|
+
_schema?: string
|
|
1141
|
+
_tags?: string[]
|
|
1142
|
+
}>
|
|
1143
|
+
_tags?: string[]
|
|
1144
|
+
_purpose?: string[]
|
|
1145
|
+
_manifest?: string // uuid[]
|
|
1146
|
+
filename?: string
|
|
1147
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1148
|
+
mime_type?: string
|
|
1149
|
+
size_bytes?: number
|
|
1150
|
+
readable_size?: string
|
|
1151
|
+
access_control?: "private" | "public-read"
|
|
1152
|
+
public_url?: string // url
|
|
1153
|
+
custom_download_url?: string // uri
|
|
1154
|
+
s3ref?: unknown
|
|
1155
|
+
} | {
|
|
1156
|
+
_id?: object
|
|
1157
|
+
file_entity_id?: string
|
|
1158
|
+
relations?: Array<{
|
|
1159
|
+
entity_id: string
|
|
1160
|
+
_schema?: string
|
|
1161
|
+
_tags?: string[]
|
|
1162
|
+
}>
|
|
1163
|
+
_tags?: string[]
|
|
1164
|
+
_purpose?: string[]
|
|
1165
|
+
_manifest?: string // uuid[]
|
|
1166
|
+
filename?: string
|
|
1167
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1168
|
+
mime_type?: string
|
|
1169
|
+
size_bytes?: number
|
|
1170
|
+
readable_size?: string
|
|
1171
|
+
access_control?: "private" | "public-read"
|
|
1172
|
+
public_url?: string // url
|
|
1173
|
+
custom_download_url?: string // uri
|
|
1174
|
+
source_url?: string // uri
|
|
1175
|
+
} | {
|
|
1176
|
+
_id?: object
|
|
1177
|
+
file_entity_id?: string
|
|
1178
|
+
relations?: Array<{
|
|
1179
|
+
entity_id: string
|
|
1180
|
+
_schema?: string
|
|
1181
|
+
_tags?: string[]
|
|
1182
|
+
}>
|
|
1183
|
+
_tags?: string[]
|
|
1184
|
+
_purpose?: string[]
|
|
1185
|
+
_manifest?: string // uuid[]
|
|
1186
|
+
filename?: string
|
|
1187
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1188
|
+
mime_type?: string
|
|
1189
|
+
size_bytes?: number
|
|
1190
|
+
readable_size?: string
|
|
1191
|
+
access_control?: "private" | "public-read"
|
|
1192
|
+
public_url?: string // url
|
|
1193
|
+
custom_download_url?: string // uri
|
|
1194
|
+
}
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
### `SaveFilePayloadV2`
|
|
1198
|
+
|
|
1199
|
+
```ts
|
|
1200
|
+
type SaveFilePayloadV2 = {
|
|
1201
|
+
_id?: object
|
|
1202
|
+
file_entity_id?: string
|
|
1203
|
+
relations?: Array<{
|
|
1204
|
+
entity_id: string
|
|
1205
|
+
_schema?: string
|
|
1206
|
+
_tags?: string[]
|
|
1207
|
+
}>
|
|
1208
|
+
_tags?: string[]
|
|
1209
|
+
_purpose?: string[]
|
|
1210
|
+
_manifest?: string // uuid[]
|
|
1211
|
+
filename?: string
|
|
1212
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1213
|
+
mime_type?: string
|
|
1214
|
+
size_bytes?: number
|
|
1215
|
+
readable_size?: string
|
|
1216
|
+
access_control?: "private" | "public-read"
|
|
1217
|
+
public_url?: string // url
|
|
1218
|
+
custom_download_url?: string // uri
|
|
1219
|
+
s3ref?: unknown
|
|
1220
|
+
} | {
|
|
1221
|
+
_id?: object
|
|
1222
|
+
file_entity_id?: string
|
|
1223
|
+
relations?: Array<{
|
|
1224
|
+
entity_id: string
|
|
1225
|
+
_schema?: string
|
|
1226
|
+
_tags?: string[]
|
|
1227
|
+
}>
|
|
1228
|
+
_tags?: string[]
|
|
1229
|
+
_purpose?: string[]
|
|
1230
|
+
_manifest?: string // uuid[]
|
|
1231
|
+
filename?: string
|
|
1232
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1233
|
+
mime_type?: string
|
|
1234
|
+
size_bytes?: number
|
|
1235
|
+
readable_size?: string
|
|
1236
|
+
access_control?: "private" | "public-read"
|
|
1237
|
+
public_url?: string // url
|
|
1238
|
+
custom_download_url?: string // uri
|
|
1239
|
+
source_url?: string // uri
|
|
1240
|
+
} | {
|
|
1241
|
+
_id?: object
|
|
1242
|
+
file_entity_id?: string
|
|
1243
|
+
relations?: Array<{
|
|
1244
|
+
entity_id: string
|
|
1245
|
+
_schema?: string
|
|
1246
|
+
_tags?: string[]
|
|
1247
|
+
}>
|
|
1248
|
+
_tags?: string[]
|
|
1249
|
+
_purpose?: string[]
|
|
1250
|
+
_manifest?: string // uuid[]
|
|
1251
|
+
filename?: string
|
|
1252
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"
|
|
1253
|
+
mime_type?: string
|
|
1254
|
+
size_bytes?: number
|
|
1255
|
+
readable_size?: string
|
|
1256
|
+
access_control?: "private" | "public-read"
|
|
1257
|
+
public_url?: string // url
|
|
1258
|
+
custom_download_url?: string // uri
|
|
1259
|
+
}
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
### `BatchSaveFileVersionPayload`
|
|
1263
|
+
|
|
1264
|
+
Payload for batch version save. Only s3ref payloads are supported.
|
|
1265
|
+
|
|
1266
|
+
```ts
|
|
1267
|
+
type BatchSaveFileVersionPayload = {
|
|
1268
|
+
_id?: object
|
|
1269
|
+
file_entity_id?: string
|
|
1270
|
+
filename?: string
|
|
1271
|
+
mime_type?: string
|
|
1272
|
+
access_control?: "private" | "public-read"
|
|
1273
|
+
s3ref: unknown
|
|
1274
|
+
}
|
|
1275
|
+
```
|
|
1276
|
+
|
|
1277
|
+
### `UploadFilePayload`
|
|
1278
|
+
|
|
1279
|
+
```ts
|
|
1280
|
+
type UploadFilePayload = {
|
|
1281
|
+
filename: string
|
|
1282
|
+
mime_type?: string
|
|
1283
|
+
index_tag?: string
|
|
1284
|
+
metadata?: Record<string, string>
|
|
1285
|
+
}
|
|
1286
|
+
```
|
|
1287
|
+
|
|
1288
|
+
### `FileUpload`
|
|
1289
|
+
|
|
1290
|
+
```ts
|
|
1291
|
+
type FileUpload = {
|
|
1292
|
+
s3ref?: object
|
|
1293
|
+
upload_url?: string // url
|
|
1294
|
+
public_url?: string // url
|
|
1295
|
+
}
|
|
1296
|
+
```
|
|
1297
|
+
|
|
1298
|
+
### `DownloadFilesPayload`
|
|
1299
|
+
|
|
1300
|
+
```ts
|
|
1301
|
+
type DownloadFilesPayload = Array<{
|
|
1302
|
+
id: string | string // uuid
|
|
1303
|
+
version?: number
|
|
1304
|
+
}>
|
|
1305
|
+
```
|
|
1306
|
+
|
|
1307
|
+
### `VerifyCustomDownloadUrlPayload`
|
|
1308
|
+
|
|
1309
|
+
```ts
|
|
1310
|
+
type VerifyCustomDownloadUrlPayload = {
|
|
1311
|
+
custom_download_url: string
|
|
1312
|
+
}
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
### `S3Reference`
|
|
1316
|
+
|
|
1317
|
+
```ts
|
|
1318
|
+
type S3Reference = {
|
|
1319
|
+
bucket: string
|
|
1320
|
+
key: string
|
|
1321
|
+
}
|
|
1322
|
+
```
|
|
1323
|
+
|
|
1324
|
+
### `S3Ref`
|
|
1325
|
+
|
|
1326
|
+
```ts
|
|
1327
|
+
type S3Ref = {
|
|
1328
|
+
bucket: string
|
|
1329
|
+
key: string
|
|
1330
|
+
}
|
|
1331
|
+
```
|
|
1332
|
+
|
|
1333
|
+
### `FileItem`
|
|
1334
|
+
|
|
1335
|
+
```ts
|
|
1336
|
+
type FileItem = {
|
|
1337
|
+
s3ref?: unknown
|
|
1338
|
+
filename?: string
|
|
1339
|
+
size_bytes?: number
|
|
1340
|
+
readable_size?: string
|
|
1341
|
+
mime_type?: string
|
|
1342
|
+
}
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
### `FileRelationItem`
|
|
1346
|
+
|
|
1347
|
+
```ts
|
|
1348
|
+
type FileRelationItem = {
|
|
1349
|
+
entity_id: string
|
|
1350
|
+
_schema?: string
|
|
1351
|
+
_tags?: string[]
|
|
1352
|
+
}
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
### `PublicLink`
|
|
1356
|
+
|
|
1357
|
+
```ts
|
|
1358
|
+
type PublicLink = {
|
|
1359
|
+
id?: string
|
|
1360
|
+
link?: string
|
|
1361
|
+
last_accessed_at?: string
|
|
1362
|
+
}
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1365
|
+
### `BaseEntityOwner`
|
|
1366
|
+
|
|
1367
|
+
The user / organization owning this entity.
|
|
1368
|
+
|
|
1369
|
+
Note: Owner implicitly has access to the entity regardless of ACLs.
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
```ts
|
|
1373
|
+
type BaseEntityOwner = {
|
|
1374
|
+
org_id: string
|
|
1375
|
+
user_id?: string
|
|
1376
|
+
}
|
|
1377
|
+
```
|
|
1378
|
+
|
|
1379
|
+
### `BaseEntityAcl`
|
|
1380
|
+
|
|
1381
|
+
Access control list (ACL) for an entity. Defines sharing access to external orgs or users.
|
|
1382
|
+
|
|
1383
|
+
```ts
|
|
1384
|
+
type BaseEntityAcl = {
|
|
1385
|
+
view?: string[]
|
|
1386
|
+
edit?: string[]
|
|
1387
|
+
delete?: string[]
|
|
1388
|
+
}
|
|
1389
|
+
```
|
|
1390
|
+
|
|
1391
|
+
### `ErrorObject`
|
|
1392
|
+
|
|
1393
|
+
A generic error returned by the API
|
|
1394
|
+
|
|
1395
|
+
```ts
|
|
1396
|
+
type ErrorObject = {
|
|
1397
|
+
status?: number
|
|
1398
|
+
error?: string
|
|
1399
|
+
}
|
|
1400
|
+
```
|
|
1401
|
+
|
|
1402
|
+
### `FileCollectionId`
|
|
1403
|
+
|
|
1404
|
+
Generated uuid for a file collection
|
|
1405
|
+
|
|
1406
|
+
```ts
|
|
1407
|
+
type FileCollectionId = string // uuid
|
|
1408
|
+
```
|
|
1409
|
+
|
|
1410
|
+
### `FileCollectionItem`
|
|
1411
|
+
|
|
1412
|
+
A file collection with identifiers and timestamps
|
|
1413
|
+
|
|
1414
|
+
```ts
|
|
1415
|
+
type FileCollectionItem = {
|
|
1416
|
+
slug?: string
|
|
1417
|
+
name: string
|
|
1418
|
+
id?: string // uuid
|
|
1419
|
+
parents?: string[]
|
|
1420
|
+
starred?: boolean
|
|
1421
|
+
order?: number
|
|
1422
|
+
enabled_locations?: string[]
|
|
1423
|
+
enabled_purposes?: string[]
|
|
1424
|
+
created_at?: string // date-time
|
|
1425
|
+
updated_at?: string // date-time
|
|
1426
|
+
}
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
### `FileCollectionAttributes`
|
|
1430
|
+
|
|
1431
|
+
```ts
|
|
1432
|
+
type FileCollectionAttributes = {
|
|
1433
|
+
name?: string
|
|
1434
|
+
parents?: string[]
|
|
1435
|
+
starred?: boolean
|
|
1436
|
+
enabled_locations?: string[]
|
|
1437
|
+
enabled_purposes?: string[]
|
|
1438
|
+
}
|
|
1439
|
+
```
|
|
1440
|
+
|
|
1441
|
+
### `FileCollectionCreateRequest`
|
|
1442
|
+
|
|
1443
|
+
Request body for creating a file collection
|
|
1444
|
+
|
|
1445
|
+
```ts
|
|
1446
|
+
type FileCollectionCreateRequest = {
|
|
1447
|
+
name: string
|
|
1448
|
+
parents?: string[]
|
|
1449
|
+
starred?: boolean
|
|
1450
|
+
enabled_locations?: string[]
|
|
1451
|
+
enabled_purposes?: string[]
|
|
1452
|
+
}
|
|
1453
|
+
```
|