@epilot/sdk 2.1.0 → 2.1.2
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/README.md +24 -0
- package/definitions/environments-runtime.json +1 -1
- package/definitions/partner-directory-runtime.json +1 -1
- package/definitions/partner-directory.json +795 -229
- package/dist/{README-W4B35MRN.cjs → README-6OOYWQYJ.cjs} +1 -1
- package/dist/{README-VG67PX4R.js → README-JUWX7KNV.js} +1 -1
- package/dist/{_index-S6LFD3ER.js → _index-NWNYWBIF.js} +48 -1
- package/dist/{_index-AMVZBT2K.cjs → _index-ONGE545F.cjs} +48 -1
- package/dist/access-token-2O6ULCCN.js +633 -0
- package/dist/access-token-RKP2A2F7.cjs +633 -0
- package/dist/access-token-runtime-KCKGT4O7.js +5 -0
- package/dist/access-token-runtime-NZWZJPWV.cjs +5 -0
- package/dist/address-HLBX47SQ.cjs +567 -0
- package/dist/address-IJF4N2UV.js +567 -0
- package/dist/address-runtime-2MNO2YRD.cjs +5 -0
- package/dist/address-runtime-YFCNBJBW.js +5 -0
- package/dist/address-suggestions-BYUTV7OU.js +574 -0
- package/dist/address-suggestions-ERVGGO6Z.cjs +574 -0
- package/dist/address-suggestions-runtime-NIMC2J32.js +5 -0
- package/dist/address-suggestions-runtime-ZNGLDADE.cjs +5 -0
- package/dist/ai-agents-6VHVYRCC.cjs +1612 -0
- package/dist/ai-agents-PKCHKKJS.js +1612 -0
- package/dist/ai-agents-runtime-25YRUJHI.js +5 -0
- package/dist/ai-agents-runtime-TILIO3UM.cjs +5 -0
- package/dist/apis/access-token.cjs +8 -8
- package/dist/apis/access-token.d.cts +2 -2
- package/dist/apis/access-token.d.ts +2 -2
- package/dist/apis/access-token.js +4 -4
- package/dist/apis/address-suggestions.cjs +8 -8
- package/dist/apis/address-suggestions.d.cts +2 -2
- package/dist/apis/address-suggestions.d.ts +2 -2
- package/dist/apis/address-suggestions.js +4 -4
- package/dist/apis/address.cjs +8 -8
- package/dist/apis/address.d.cts +2 -2
- package/dist/apis/address.d.ts +2 -2
- package/dist/apis/address.js +4 -4
- package/dist/apis/ai-agents.cjs +8 -8
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +4 -4
- package/dist/apis/app.cjs +8 -8
- package/dist/apis/app.d.cts +2 -2
- package/dist/apis/app.d.ts +2 -2
- package/dist/apis/app.js +4 -4
- package/dist/apis/audit-logs.cjs +8 -8
- package/dist/apis/audit-logs.d.cts +2 -2
- package/dist/apis/audit-logs.d.ts +2 -2
- package/dist/apis/audit-logs.js +4 -4
- package/dist/apis/automation.cjs +8 -8
- package/dist/apis/automation.d.cts +2 -2
- package/dist/apis/automation.d.ts +2 -2
- package/dist/apis/automation.js +4 -4
- package/dist/apis/billing.cjs +8 -8
- package/dist/apis/billing.d.cts +2 -2
- package/dist/apis/billing.d.ts +2 -2
- package/dist/apis/billing.js +4 -4
- package/dist/apis/blueprint-manifest.cjs +8 -8
- package/dist/apis/blueprint-manifest.d.cts +2 -2
- package/dist/apis/blueprint-manifest.d.ts +2 -2
- package/dist/apis/blueprint-manifest.js +4 -4
- package/dist/apis/consent.cjs +8 -8
- package/dist/apis/consent.d.cts +2 -2
- package/dist/apis/consent.d.ts +2 -2
- package/dist/apis/consent.js +4 -4
- package/dist/apis/customer-portal.cjs +8 -8
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +4 -4
- package/dist/apis/dashboard.cjs +8 -8
- package/dist/apis/dashboard.d.cts +2 -2
- package/dist/apis/dashboard.d.ts +2 -2
- package/dist/apis/dashboard.js +4 -4
- package/dist/apis/data-management.cjs +8 -8
- package/dist/apis/data-management.d.cts +2 -2
- package/dist/apis/data-management.d.ts +2 -2
- package/dist/apis/data-management.js +4 -4
- package/dist/apis/deduplication.cjs +8 -8
- package/dist/apis/deduplication.d.cts +2 -2
- package/dist/apis/deduplication.d.ts +2 -2
- package/dist/apis/deduplication.js +4 -4
- package/dist/apis/design.cjs +8 -8
- package/dist/apis/design.d.cts +2 -2
- package/dist/apis/design.d.ts +2 -2
- package/dist/apis/design.js +4 -4
- package/dist/apis/document.cjs +8 -8
- package/dist/apis/document.d.cts +2 -2
- package/dist/apis/document.d.ts +2 -2
- package/dist/apis/document.js +4 -4
- package/dist/apis/email-settings.cjs +8 -8
- package/dist/apis/email-settings.d.cts +2 -2
- package/dist/apis/email-settings.d.ts +2 -2
- package/dist/apis/email-settings.js +4 -4
- package/dist/apis/email-template.cjs +8 -8
- package/dist/apis/email-template.d.cts +2 -2
- package/dist/apis/email-template.d.ts +2 -2
- package/dist/apis/email-template.js +4 -4
- package/dist/apis/entity-mapping.cjs +8 -8
- package/dist/apis/entity-mapping.d.cts +2 -2
- package/dist/apis/entity-mapping.d.ts +2 -2
- package/dist/apis/entity-mapping.js +4 -4
- package/dist/apis/entity.cjs +8 -8
- package/dist/apis/entity.d.cts +2 -2
- package/dist/apis/entity.d.ts +2 -2
- package/dist/apis/entity.js +4 -4
- package/dist/apis/environments.cjs +8 -8
- package/dist/apis/environments.d.cts +2 -2
- package/dist/apis/environments.d.ts +2 -2
- package/dist/apis/environments.js +4 -4
- package/dist/apis/erp-integration.cjs +8 -8
- package/dist/apis/erp-integration.d.cts +2 -2
- package/dist/apis/erp-integration.d.ts +2 -2
- package/dist/apis/erp-integration.js +4 -4
- package/dist/apis/event-catalog.cjs +8 -8
- package/dist/apis/event-catalog.d.cts +2 -2
- package/dist/apis/event-catalog.d.ts +2 -2
- package/dist/apis/event-catalog.js +4 -4
- package/dist/apis/file.cjs +8 -8
- package/dist/apis/file.d.cts +2 -2
- package/dist/apis/file.d.ts +2 -2
- package/dist/apis/file.js +4 -4
- package/dist/apis/iban.cjs +8 -8
- package/dist/apis/iban.d.cts +2 -2
- package/dist/apis/iban.d.ts +2 -2
- package/dist/apis/iban.js +4 -4
- package/dist/apis/journey.cjs +8 -8
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +4 -4
- package/dist/apis/kanban.cjs +8 -8
- package/dist/apis/kanban.d.cts +2 -2
- package/dist/apis/kanban.d.ts +2 -2
- package/dist/apis/kanban.js +4 -4
- package/dist/apis/message.cjs +8 -8
- package/dist/apis/message.d.cts +2 -2
- package/dist/apis/message.d.ts +2 -2
- package/dist/apis/message.js +4 -4
- package/dist/apis/metering.cjs +8 -8
- package/dist/apis/metering.d.cts +2 -2
- package/dist/apis/metering.d.ts +2 -2
- package/dist/apis/metering.js +4 -4
- package/dist/apis/notes.cjs +8 -8
- package/dist/apis/notes.d.cts +2 -2
- package/dist/apis/notes.d.ts +2 -2
- package/dist/apis/notes.js +4 -4
- package/dist/apis/notification.cjs +8 -8
- package/dist/apis/notification.d.cts +2 -2
- package/dist/apis/notification.d.ts +2 -2
- package/dist/apis/notification.js +4 -4
- package/dist/apis/organization.cjs +8 -8
- package/dist/apis/organization.d.cts +2 -2
- package/dist/apis/organization.d.ts +2 -2
- package/dist/apis/organization.js +4 -4
- package/dist/apis/partner-directory.cjs +8 -8
- package/dist/apis/partner-directory.d.cts +4 -4
- package/dist/apis/partner-directory.d.ts +4 -4
- package/dist/apis/partner-directory.js +4 -4
- package/dist/apis/permissions.cjs +8 -8
- package/dist/apis/permissions.d.cts +2 -2
- package/dist/apis/permissions.d.ts +2 -2
- package/dist/apis/permissions.js +4 -4
- package/dist/apis/pricing-tier.cjs +8 -8
- package/dist/apis/pricing-tier.d.cts +2 -2
- package/dist/apis/pricing-tier.d.ts +2 -2
- package/dist/apis/pricing-tier.js +4 -4
- package/dist/apis/pricing.cjs +8 -8
- package/dist/apis/pricing.d.cts +2 -2
- package/dist/apis/pricing.d.ts +2 -2
- package/dist/apis/pricing.js +4 -4
- package/dist/apis/purpose.cjs +8 -8
- package/dist/apis/purpose.d.cts +2 -2
- package/dist/apis/purpose.d.ts +2 -2
- package/dist/apis/purpose.js +4 -4
- package/dist/apis/sandbox.cjs +8 -8
- package/dist/apis/sandbox.d.cts +2 -2
- package/dist/apis/sandbox.d.ts +2 -2
- package/dist/apis/sandbox.js +4 -4
- package/dist/apis/submission.cjs +8 -8
- package/dist/apis/submission.d.cts +2 -2
- package/dist/apis/submission.d.ts +2 -2
- package/dist/apis/submission.js +4 -4
- package/dist/apis/targeting.cjs +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +4 -4
- package/dist/apis/template-variables.cjs +8 -8
- package/dist/apis/template-variables.d.cts +2 -2
- package/dist/apis/template-variables.d.ts +2 -2
- package/dist/apis/template-variables.js +4 -4
- package/dist/apis/user.cjs +8 -8
- package/dist/apis/user.d.cts +2 -2
- package/dist/apis/user.d.ts +2 -2
- package/dist/apis/user.js +4 -4
- package/dist/apis/validation-rules.cjs +8 -8
- package/dist/apis/validation-rules.d.cts +2 -2
- package/dist/apis/validation-rules.d.ts +2 -2
- package/dist/apis/validation-rules.js +4 -4
- package/dist/apis/webhooks.cjs +8 -8
- package/dist/apis/webhooks.d.cts +2 -2
- package/dist/apis/webhooks.d.ts +2 -2
- package/dist/apis/webhooks.js +4 -4
- package/dist/apis/workflow-definition.cjs +8 -8
- package/dist/apis/workflow-definition.d.cts +2 -2
- package/dist/apis/workflow-definition.d.ts +2 -2
- package/dist/apis/workflow-definition.js +4 -4
- package/dist/apis/workflow.cjs +8 -8
- package/dist/apis/workflow.d.cts +2 -2
- package/dist/apis/workflow.d.ts +2 -2
- package/dist/apis/workflow.js +4 -4
- package/dist/app-5VPBDFW2.cjs +4047 -0
- package/dist/app-VJW2KKWE.js +4047 -0
- package/dist/app-runtime-SSNHSBR7.cjs +5 -0
- package/dist/app-runtime-U7RGV7KT.js +5 -0
- package/dist/audit-logs-F2NHDISQ.js +312 -0
- package/dist/audit-logs-RFEMBILB.cjs +312 -0
- package/dist/audit-logs-runtime-4WMHPWNX.cjs +5 -0
- package/dist/audit-logs-runtime-76R6WRAB.js +5 -0
- package/dist/automation-HZASSUCS.cjs +4460 -0
- package/dist/automation-WEVRW77F.js +4460 -0
- package/dist/automation-runtime-L5UKEFLA.js +5 -0
- package/dist/automation-runtime-YBGGE5PL.cjs +5 -0
- package/dist/billing-3VZPNG6M.cjs +796 -0
- package/dist/billing-ASWY7HC3.js +796 -0
- package/dist/billing-runtime-C6BMGWCX.js +5 -0
- package/dist/billing-runtime-L4Y7MLM3.cjs +5 -0
- package/dist/bin/cli.js +1 -1
- package/dist/blueprint-manifest-5TNVSDKC.cjs +3169 -0
- package/dist/blueprint-manifest-UGGYWGRZ.js +3169 -0
- package/dist/blueprint-manifest-runtime-2RTW5C52.js +5 -0
- package/dist/blueprint-manifest-runtime-AF3FIDVX.cjs +5 -0
- package/dist/{chunk-RXSS67VI.cjs → chunk-BFUNXZRX.cjs} +1 -1
- package/dist/{chunk-KPGC2D6E.js → chunk-I2XRA5AM.js} +1 -1
- package/dist/chunk-QTU4H6NQ.js +291 -0
- package/dist/chunk-T7LQKRUK.cjs +291 -0
- package/dist/consent-6SIH4NQS.cjs +342 -0
- package/dist/consent-7MNRAINV.js +342 -0
- package/dist/consent-runtime-KZ5D4XZU.cjs +5 -0
- package/dist/consent-runtime-OAPXBJH2.js +5 -0
- package/dist/customer-portal-L5DEQEGC.js +14142 -0
- package/dist/customer-portal-MXILX4KH.cjs +14142 -0
- package/dist/customer-portal-runtime-MRVZ7JR4.js +5 -0
- package/dist/customer-portal-runtime-VGK7RMLC.cjs +5 -0
- package/dist/dashboard-RKUQLIME.cjs +483 -0
- package/dist/dashboard-UDL26RGG.js +483 -0
- package/dist/dashboard-runtime-EXP2AM44.cjs +5 -0
- package/dist/dashboard-runtime-PSKSGLCF.js +5 -0
- package/dist/data-management-W5JQGGGH.js +925 -0
- package/dist/data-management-XFSRLFYA.cjs +925 -0
- package/dist/data-management-runtime-PAC7UFGT.cjs +5 -0
- package/dist/data-management-runtime-XZ347IUB.js +5 -0
- package/dist/deduplication-7RTGTLN5.cjs +193 -0
- package/dist/deduplication-RKLRTNZU.js +193 -0
- package/dist/deduplication-runtime-BBHG7MJW.cjs +5 -0
- package/dist/deduplication-runtime-DLGBF4RN.js +5 -0
- package/dist/design-AO6EGLHD.cjs +1352 -0
- package/dist/design-VLRA2WGV.js +1352 -0
- package/dist/design-runtime-3SKJA7QH.js +5 -0
- package/dist/design-runtime-Y3VGTQLP.cjs +5 -0
- package/dist/document-OVTR7RVH.cjs +744 -0
- package/dist/document-SEZ45XAO.js +744 -0
- package/dist/document-runtime-GFEBGNMS.js +5 -0
- package/dist/document-runtime-RG3F4R6O.cjs +5 -0
- package/dist/email-settings-QGCIUWLC.js +2427 -0
- package/dist/email-settings-SEGEKVMF.cjs +2427 -0
- package/dist/email-settings-runtime-NS7MU3RB.cjs +5 -0
- package/dist/email-settings-runtime-X7F3EPAB.js +5 -0
- package/dist/email-template-26SANLRD.cjs +1308 -0
- package/dist/email-template-346NDG4D.js +1308 -0
- package/dist/email-template-runtime-QBB64BJQ.js +5 -0
- package/dist/email-template-runtime-UI2FS4H5.cjs +5 -0
- package/dist/entity-HSCBRIOS.js +9411 -0
- package/dist/entity-UKAWTND4.cjs +9411 -0
- package/dist/entity-mapping-PK2XAARN.cjs +1506 -0
- package/dist/entity-mapping-UOGYYCZH.js +1506 -0
- package/dist/entity-mapping-runtime-734TTUA2.cjs +5 -0
- package/dist/entity-mapping-runtime-HCOJM6DV.js +5 -0
- package/dist/entity-runtime-QSFVEFJ6.js +5 -0
- package/dist/entity-runtime-XSAICIVR.cjs +5 -0
- package/dist/environments-5IS2ZJYQ.cjs +352 -0
- package/dist/environments-VCREW73K.js +352 -0
- package/dist/environments-runtime-BPR47PW7.js +5 -0
- package/dist/environments-runtime-L6TJCVW6.cjs +5 -0
- package/dist/erp-integration-735KQ73W.js +5295 -0
- package/dist/erp-integration-W7FZDJOB.cjs +5295 -0
- package/dist/erp-integration-runtime-FNJXDO75.js +5 -0
- package/dist/erp-integration-runtime-WXZIQCLJ.cjs +5 -0
- package/dist/event-catalog-MZYFJ23V.cjs +965 -0
- package/dist/event-catalog-ZUFXLY7B.js +965 -0
- package/dist/event-catalog-runtime-5HQSAJVX.cjs +5 -0
- package/dist/event-catalog-runtime-6FA3SCRI.js +5 -0
- package/dist/file-637CTR4Y.cjs +2744 -0
- package/dist/file-EJJBQEQI.js +2744 -0
- package/dist/file-runtime-B6AAGZQF.js +5 -0
- package/dist/file-runtime-SFZIKODF.cjs +5 -0
- package/dist/iban-ETTCKOHK.cjs +148 -0
- package/dist/iban-HXFDAF4I.js +148 -0
- package/dist/iban-runtime-EVXLFPPP.js +5 -0
- package/dist/iban-runtime-TUM5LVHO.cjs +5 -0
- package/dist/index.cjs +105 -100
- package/dist/index.d.cts +21 -5
- package/dist/index.d.ts +21 -5
- package/dist/index.js +56 -51
- package/dist/journey-KW3ZFQAL.js +2194 -0
- package/dist/journey-XIMSLSZC.cjs +2194 -0
- package/dist/journey-runtime-SPBL3F32.cjs +5 -0
- package/dist/journey-runtime-YXIAOTMD.js +5 -0
- package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
- package/dist/kanban-M4P7R5TM.cjs +890 -0
- package/dist/kanban-QXQEQIF4.js +890 -0
- package/dist/kanban-runtime-NHEUWTCG.cjs +5 -0
- package/dist/kanban-runtime-R6EWHBFS.js +5 -0
- package/dist/message-2VOVRXBB.cjs +2447 -0
- package/dist/message-M62W3KP2.js +2447 -0
- package/dist/message-runtime-ITR7MPKT.cjs +5 -0
- package/dist/message-runtime-YMKW2N3R.js +5 -0
- package/dist/metering-KEMILE75.cjs +2198 -0
- package/dist/metering-W3TA6ZUQ.js +2198 -0
- package/dist/metering-runtime-HAIWXZXJ.cjs +5 -0
- package/dist/metering-runtime-NJ6NEUMB.js +5 -0
- package/dist/notes-4LVCGLBE.js +1427 -0
- package/dist/notes-OBM5POWI.cjs +1427 -0
- package/dist/notes-runtime-CVNAVKPP.js +5 -0
- package/dist/notes-runtime-E3YYF74V.cjs +5 -0
- package/dist/notification-EEYPLPUV.cjs +1381 -0
- package/dist/notification-MJQGIBM7.js +1381 -0
- package/dist/notification-runtime-7QLZTPHG.cjs +5 -0
- package/dist/notification-runtime-KREP32YP.js +5 -0
- package/dist/organization-2UK7QZLQ.cjs +615 -0
- package/dist/organization-U5HPX627.js +615 -0
- package/dist/organization-runtime-LBCVCZ3W.cjs +5 -0
- package/dist/organization-runtime-P3WZ2BBU.js +5 -0
- package/dist/partner-directory-CG5CYJGB.cjs +1600 -0
- package/dist/partner-directory-THI7JEXK.js +7 -0
- package/dist/partner-directory-XJ7KI7EX.js +1600 -0
- package/dist/partner-directory-ZQIBKD5Q.cjs +7 -0
- package/dist/partner-directory-runtime-AUHVA5Q3.cjs +5 -0
- package/dist/partner-directory-runtime-GNVT7U7R.js +5 -0
- package/dist/partner-directory.d-BCIjHoGs.d.cts +2337 -0
- package/dist/partner-directory.d-BCIjHoGs.d.ts +2337 -0
- package/dist/permissions-SGPGANEP.js +1415 -0
- package/dist/permissions-WCOABHKQ.cjs +1415 -0
- package/dist/permissions-runtime-D74HOCVO.js +5 -0
- package/dist/permissions-runtime-O5LH7WOU.cjs +5 -0
- package/dist/pricing-3RNPCUR6.js +9362 -0
- package/dist/pricing-VYHPSVKM.cjs +9362 -0
- package/dist/pricing-runtime-6XNS4EOF.cjs +5 -0
- package/dist/pricing-runtime-JRR4FWFI.js +5 -0
- package/dist/pricing-tier-36WV4P4X.js +121 -0
- package/dist/pricing-tier-FKQPW2ND.cjs +121 -0
- package/dist/pricing-tier-runtime-32BCKJ7Y.cjs +5 -0
- package/dist/pricing-tier-runtime-LEGBNNLA.js +5 -0
- package/dist/purpose-JC2E7W3M.cjs +523 -0
- package/dist/purpose-QFQ4W255.js +523 -0
- package/dist/purpose-runtime-C6IGTUA6.cjs +5 -0
- package/dist/purpose-runtime-V5X5ESZV.js +5 -0
- package/dist/sandbox-CLZTN7IW.cjs +445 -0
- package/dist/sandbox-O2NWMZGJ.js +445 -0
- package/dist/sandbox-runtime-4MLOMFPK.js +5 -0
- package/dist/sandbox-runtime-GKEK3GQB.cjs +5 -0
- package/dist/submission-6FD67HIE.cjs +308 -0
- package/dist/submission-MWJU4L32.js +308 -0
- package/dist/submission-runtime-5FD4AQSD.cjs +5 -0
- package/dist/submission-runtime-JPHKPQ77.js +5 -0
- package/dist/targeting-4CQDSEKL.cjs +1369 -0
- package/dist/targeting-RB7LBQMX.js +1369 -0
- package/dist/targeting-runtime-6JFMP262.cjs +5 -0
- package/dist/targeting-runtime-M2VSTKFT.js +5 -0
- package/dist/template-variables-JYHE2VCH.cjs +1447 -0
- package/dist/template-variables-XLIW4GY6.js +1447 -0
- package/dist/template-variables-runtime-62U3ZY5P.js +5 -0
- package/dist/template-variables-runtime-LFOA32UM.cjs +5 -0
- package/dist/{types-BwBvJkY_.d.ts → types-ChU9Acbv.d.cts} +3 -0
- package/dist/{types-BwBvJkY_.d.cts → types-ChU9Acbv.d.ts} +3 -0
- package/dist/user-DKA6DDPX.cjs +2265 -0
- package/dist/user-O4JDAIRO.js +2265 -0
- package/dist/user-runtime-7O2HLFVQ.cjs +5 -0
- package/dist/user-runtime-U4HYUWJU.js +5 -0
- package/dist/validation-rules-AYCAOVDZ.cjs +1344 -0
- package/dist/validation-rules-GCI64B57.js +1344 -0
- package/dist/validation-rules-runtime-6MRCS5X2.js +5 -0
- package/dist/validation-rules-runtime-X7M3QE5I.cjs +5 -0
- package/dist/webhooks-L3FXPRKT.cjs +1431 -0
- package/dist/webhooks-XXLU2KWP.js +1431 -0
- package/dist/webhooks-runtime-EBM4M3SU.cjs +5 -0
- package/dist/webhooks-runtime-XCQYIGQK.js +5 -0
- package/dist/workflow-VLNZNE3S.js +3834 -0
- package/dist/workflow-YJHUCGVK.cjs +3834 -0
- package/dist/workflow-definition-7BA4H6W3.cjs +3100 -0
- package/dist/workflow-definition-VFYWBQQ3.js +3100 -0
- package/dist/workflow-definition-runtime-S7AZHOU7.js +5 -0
- package/dist/workflow-definition-runtime-VRND6VQR.cjs +5 -0
- package/dist/workflow-runtime-RLZO2OQB.js +5 -0
- package/dist/workflow-runtime-WCJ7NRTH.cjs +5 -0
- package/docs/partner-directory.md +295 -127
- package/package.json +3 -2
- package/dist/chunk-3XEP56SV.cjs +0 -204
- package/dist/chunk-ULBEEHG4.js +0 -204
- package/dist/partner-directory-2XMPQWWX.js +0 -7
- package/dist/partner-directory-WHNTKQ5E.cjs +0 -7
- package/dist/partner-directory.d-CRNkDF8q.d.cts +0 -1510
- package/dist/partner-directory.d-CRNkDF8q.d.ts +0 -1510
- /package/dist/{chunk-CPKBR34V.js → chunk-24T6CJTG.js} +0 -0
- /package/dist/{chunk-VQ7R36AC.js → chunk-265TE2OV.js} +0 -0
- /package/dist/{chunk-ZV6XYUXS.js → chunk-2BPBDRRO.js} +0 -0
- /package/dist/{chunk-KSXTBGIV.js → chunk-3XKBB5AE.js} +0 -0
- /package/dist/{chunk-GLO477NZ.js → chunk-3YSEO476.js} +0 -0
- /package/dist/{chunk-MKX4CKAB.cjs → chunk-46HU6232.cjs} +0 -0
- /package/dist/{chunk-JXBXDTFG.cjs → chunk-4G6LO3JY.cjs} +0 -0
- /package/dist/{chunk-Z4LUE424.cjs → chunk-4QCVVDTA.cjs} +0 -0
- /package/dist/{chunk-LQOLYXGQ.cjs → chunk-4W22EIRF.cjs} +0 -0
- /package/dist/{chunk-372VUPHN.js → chunk-4ZGZDE6D.js} +0 -0
- /package/dist/{chunk-IMT3IE5M.cjs → chunk-4ZMLRFDX.cjs} +0 -0
- /package/dist/{chunk-S7NDMDRX.js → chunk-5JPM6YUD.js} +0 -0
- /package/dist/{chunk-IS2VB342.js → chunk-5MFHAXBT.js} +0 -0
- /package/dist/{chunk-WOXXNKTE.js → chunk-5NKXJA43.js} +0 -0
- /package/dist/{chunk-S3ZNESMC.cjs → chunk-5WNEYQII.cjs} +0 -0
- /package/dist/{chunk-KA3TGFJP.js → chunk-6OYECNL2.js} +0 -0
- /package/dist/{chunk-T46LODOF.js → chunk-6UAS2VVG.js} +0 -0
- /package/dist/{chunk-PETLAONH.js → chunk-6VWCUZ5M.js} +0 -0
- /package/dist/{chunk-YZA5WZUS.js → chunk-75EI2Q64.js} +0 -0
- /package/dist/{chunk-2HOJWFQ4.js → chunk-75ZWZM3L.js} +0 -0
- /package/dist/{chunk-57QIBYDN.js → chunk-7IKQIVUS.js} +0 -0
- /package/dist/{chunk-DJKSULPK.js → chunk-A7AAVJGM.js} +0 -0
- /package/dist/{chunk-QLML3IP5.cjs → chunk-ANN2QTMY.cjs} +0 -0
- /package/dist/{chunk-A6JOROUC.cjs → chunk-BLNXQAMX.cjs} +0 -0
- /package/dist/{chunk-LCIJ4TJ4.cjs → chunk-BM6NCHPL.cjs} +0 -0
- /package/dist/{chunk-XR4QF6KQ.cjs → chunk-BPHOGIQM.cjs} +0 -0
- /package/dist/{chunk-K62XK7KU.js → chunk-BTTPWE2P.js} +0 -0
- /package/dist/{chunk-E26ZO7QM.cjs → chunk-COQMJFAB.cjs} +0 -0
- /package/dist/{chunk-QVAJ5JP4.js → chunk-CSK5ZUTS.js} +0 -0
- /package/dist/{chunk-3ZZ57K3S.cjs → chunk-D32L2HMX.cjs} +0 -0
- /package/dist/{chunk-TIJWJVKZ.js → chunk-D7Q4JGN7.js} +0 -0
- /package/dist/{chunk-CWSHYFVZ.js → chunk-DZ3P537S.js} +0 -0
- /package/dist/{chunk-MSASBR2Y.js → chunk-E2WMGOM5.js} +0 -0
- /package/dist/{chunk-XKI2OAYV.cjs → chunk-FARDEGPH.cjs} +0 -0
- /package/dist/{chunk-RWSA3LXE.cjs → chunk-G3VDRMOH.cjs} +0 -0
- /package/dist/{chunk-QDVPPRWI.cjs → chunk-G5FKTWUC.cjs} +0 -0
- /package/dist/{chunk-WMTYO5OX.cjs → chunk-GWKHOJGD.cjs} +0 -0
- /package/dist/{chunk-DNJ54L2G.js → chunk-H45V55VT.js} +0 -0
- /package/dist/{chunk-F472YLJG.cjs → chunk-HAZ3WP7V.cjs} +0 -0
- /package/dist/{chunk-NAWLLC3T.cjs → chunk-HHMXS5NC.cjs} +0 -0
- /package/dist/{chunk-DY2D2IW5.cjs → chunk-IGVVJMX7.cjs} +0 -0
- /package/dist/{chunk-KBOVBUBM.js → chunk-IJR3GZKC.js} +0 -0
- /package/dist/{chunk-73H6TVKN.js → chunk-IQOCHPWU.js} +0 -0
- /package/dist/{chunk-LSIWCIQV.js → chunk-JENQHXFI.js} +0 -0
- /package/dist/{chunk-G2REP2VZ.cjs → chunk-JICWF5VI.cjs} +0 -0
- /package/dist/{chunk-3HJEWWPS.cjs → chunk-JIUTCNTB.cjs} +0 -0
- /package/dist/{chunk-EBCHCYUO.js → chunk-JJWJLY42.js} +0 -0
- /package/dist/{chunk-SMGHAG5C.cjs → chunk-JXJC6WEW.cjs} +0 -0
- /package/dist/{chunk-HPYHWTTA.cjs → chunk-K2UZPY6U.cjs} +0 -0
- /package/dist/{chunk-VGTUK3QD.cjs → chunk-L66IX6GX.cjs} +0 -0
- /package/dist/{chunk-NLSZVGHK.cjs → chunk-LKRBFBFN.cjs} +0 -0
- /package/dist/{chunk-TLWCYLNA.js → chunk-LLZYRINH.js} +0 -0
- /package/dist/{chunk-4SWC43JO.cjs → chunk-M2SSGV7K.cjs} +0 -0
- /package/dist/{chunk-PVSS2WPM.cjs → chunk-M2UDF7PY.cjs} +0 -0
- /package/dist/{chunk-5SNJAD6F.cjs → chunk-M56QQHVA.cjs} +0 -0
- /package/dist/{chunk-QKERXNJJ.cjs → chunk-MB6NKETA.cjs} +0 -0
- /package/dist/{chunk-H4VSK4KF.js → chunk-MEUS7LCE.js} +0 -0
- /package/dist/{chunk-RD7E4OSJ.cjs → chunk-N5NFJW7Y.cjs} +0 -0
- /package/dist/{chunk-FXOX3X7E.cjs → chunk-NEVFKRDU.cjs} +0 -0
- /package/dist/{chunk-O4LRVGOY.js → chunk-O4JDWMYD.js} +0 -0
- /package/dist/{chunk-IH4CMOML.js → chunk-OEBV2PMV.js} +0 -0
- /package/dist/{chunk-VVVATFGK.cjs → chunk-OXJOO2YF.cjs} +0 -0
- /package/dist/{chunk-WOSSSFXB.js → chunk-PSQMDY3B.js} +0 -0
- /package/dist/{chunk-AJKH25H2.cjs → chunk-QOAWSFXA.cjs} +0 -0
- /package/dist/{chunk-UKKJMCNH.js → chunk-QT44OHHL.js} +0 -0
- /package/dist/{chunk-B3ZGAG7B.js → chunk-QTR3RH4N.js} +0 -0
- /package/dist/{chunk-3N67SSL3.js → chunk-RELUU5QZ.js} +0 -0
- /package/dist/{chunk-YYBIU5BQ.js → chunk-RJ3DWFSK.js} +0 -0
- /package/dist/{chunk-ARWMTXJV.cjs → chunk-RUZRPIHW.cjs} +0 -0
- /package/dist/{chunk-4VFQTSJQ.js → chunk-RW5JOHG7.js} +0 -0
- /package/dist/{chunk-EPAIOB5U.cjs → chunk-RXMOHUBP.cjs} +0 -0
- /package/dist/{chunk-MRZ7LGKZ.js → chunk-SBSIGQDU.js} +0 -0
- /package/dist/{chunk-TRJLYZHD.js → chunk-SITPUXIR.js} +0 -0
- /package/dist/{chunk-OGQKJTXF.js → chunk-SZMCMLOQ.js} +0 -0
- /package/dist/{chunk-VVQB5W7U.cjs → chunk-T67ZXTVG.cjs} +0 -0
- /package/dist/{chunk-HPSGM6QP.js → chunk-TME4YJNP.js} +0 -0
- /package/dist/{chunk-MRTAFRO7.js → chunk-TPA4HEAO.js} +0 -0
- /package/dist/{chunk-F376L6PP.cjs → chunk-TTNPMFXL.cjs} +0 -0
- /package/dist/{chunk-OG2DMGU6.cjs → chunk-TXDVGTQD.cjs} +0 -0
- /package/dist/{chunk-XZYZLSUO.cjs → chunk-UNCVJH6J.cjs} +0 -0
- /package/dist/{chunk-MHNSZ4HE.js → chunk-UUVJYJHD.js} +0 -0
- /package/dist/{chunk-C6UTZEHH.js → chunk-VSZEOCIE.js} +0 -0
- /package/dist/{chunk-EQZMT2HF.cjs → chunk-WQBBB6BN.cjs} +0 -0
- /package/dist/{chunk-BH5ZXK4J.cjs → chunk-WTMV77T2.cjs} +0 -0
- /package/dist/{chunk-BWFXLUK5.cjs → chunk-WWOAKRNG.cjs} +0 -0
- /package/dist/{chunk-ITX53XAZ.js → chunk-XSE4CFSM.js} +0 -0
- /package/dist/{chunk-SK3VYIZ6.cjs → chunk-YO4M3BZL.cjs} +0 -0
- /package/dist/{chunk-XYHTQ523.cjs → chunk-Z5TVWG3I.cjs} +0 -0
- /package/dist/{chunk-PXITFTJA.cjs → chunk-ZI33AJQ5.cjs} +0 -0
- /package/dist/{chunk-IP2WWEOU.js → chunk-ZKQ573B7.js} +0 -0
|
@@ -0,0 +1,2744 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/definitions/file.json
|
|
4
|
+
var openapi = "3.0.3";
|
|
5
|
+
var info = {
|
|
6
|
+
title: "File API",
|
|
7
|
+
version: "1.10.0",
|
|
8
|
+
description: 'The File API enables you to upload, store, manage, and share files within the epilot platform.\n\n## Key Features\n- **Upload files** to temporary storage and save them permanently as File entities\n- **Generate previews** (thumbnails) for images and documents\n- **Create public links** to share private files externally\n- **Organize files** into collections for better management\n- **Version control** with automatic file versioning on updates\n\n## File Upload Workflow\n1. Call `uploadFileV2` to get a pre-signed S3 URL\n2. Upload your file directly to S3 using the pre-signed URL (PUT request)\n3. Call `saveFileV2` with the S3 reference to create a permanent File entity\n\n## Changelog\n<a href="changelog">View API Changelog</a>\n'
|
|
9
|
+
};
|
|
10
|
+
var tags = [
|
|
11
|
+
{
|
|
12
|
+
name: "File",
|
|
13
|
+
description: "Core file operations for uploading, saving, retrieving, and deleting files.\n\nFiles are stored as epilot entities with the `file` schema and support:\n- Multiple versions (each save creates a new version)\n- Custom metadata and tags\n- Relations to other entities (contacts, orders, etc.)\n- Access control (private or public-read)\n"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "Preview",
|
|
17
|
+
description: "Generate thumbnail previews for files. Supports images, PDFs, and common document formats.\n\nPreview images are generated on-demand and cached for performance.\nYou can specify custom dimensions using the `w` (width) and `h` (height) parameters.\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "Public Links",
|
|
21
|
+
description: "Create shareable public links for private files.\n\nPublic links allow external users to access files without authentication.\nLinks are permanent until revoked and include the filename for user-friendly URLs.\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Session",
|
|
25
|
+
description: "Browser session management for cookie-based authentication.\n\nUse `getSession` to convert a Bearer token into a session cookie. This enables:\n- Direct use of preview URLs in `<img>` tags\n- File downloads without manual token handling\n\n**Typical flow:**\n1. Authenticate and obtain a Bearer token\n2. Call `GET /v1/files/session` with the Bearer token\n3. Subsequent requests use the session cookie automatically\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "Deprecated",
|
|
29
|
+
description: "Legacy API endpoints scheduled for removal.\n\n**Important:** These endpoints will be removed on **2025-06-30**.\nPlease migrate to the v2 equivalents before this date.\n\n| Deprecated Endpoint | Replacement |\n|---------------------|-------------|\n| `POST /v1/files/upload` | `POST /v2/files/upload` |\n| `POST /v1/files` | `POST /v2/files` |\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "file_schema",
|
|
33
|
+
"x-displayName": "File",
|
|
34
|
+
description: '<SchemaDefinition schemaRef="#/components/schemas/FileEntity" />\n'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "File Collections",
|
|
38
|
+
description: "Organize files into collections (folders) for better management.\n\nCollections can be:\n- **User-scoped**: Personal collections visible only to the creating user\n- **Global**: Shared collections available to all users for a schema\n\nCollections support hierarchical organization with parent-child relationships.\n"
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
var security = [
|
|
42
|
+
{
|
|
43
|
+
EpilotAuth: []
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
CookieAuth: []
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
var paths = {
|
|
50
|
+
"/v2/files/upload": {
|
|
51
|
+
post: {
|
|
52
|
+
operationId: "uploadFileV2",
|
|
53
|
+
summary: "uploadFileV2",
|
|
54
|
+
description: "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n",
|
|
55
|
+
tags: ["File"],
|
|
56
|
+
parameters: [
|
|
57
|
+
{
|
|
58
|
+
name: "file_entity_id",
|
|
59
|
+
in: "query",
|
|
60
|
+
description: "Use this parameter when uploading a file directly to an existing file entity.\n\nNote: still requires calling saveFileV2 to save the file permanently.\n",
|
|
61
|
+
schema: {
|
|
62
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
requestBody: {
|
|
67
|
+
content: {
|
|
68
|
+
"application/json": {
|
|
69
|
+
schema: {
|
|
70
|
+
$ref: "#/components/schemas/UploadFilePayload"
|
|
71
|
+
},
|
|
72
|
+
examples: {
|
|
73
|
+
"Upload an image file": {
|
|
74
|
+
description: "Upload an image file",
|
|
75
|
+
value: {
|
|
76
|
+
filename: "image.png",
|
|
77
|
+
mime_type: "image/png"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"Upload a document": {
|
|
81
|
+
description: "Upload an image file",
|
|
82
|
+
value: {
|
|
83
|
+
filename: "document.pdf",
|
|
84
|
+
mime_type: "application/pdf"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
responses: {
|
|
92
|
+
"201": {
|
|
93
|
+
description: "Pre-signed URL for POST / PUT upload",
|
|
94
|
+
content: {
|
|
95
|
+
"application/json": {
|
|
96
|
+
schema: {
|
|
97
|
+
$ref: "#/components/schemas/FileUpload"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"400": {
|
|
103
|
+
$ref: "#/components/responses/BadRequestError"
|
|
104
|
+
},
|
|
105
|
+
"401": {
|
|
106
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
107
|
+
},
|
|
108
|
+
"500": {
|
|
109
|
+
$ref: "#/components/responses/InternalServerError"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"/v2/files": {
|
|
115
|
+
post: {
|
|
116
|
+
operationId: "saveFileV2",
|
|
117
|
+
summary: "saveFileV2",
|
|
118
|
+
description: "Saves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\nSaves metadata to file entity and stores a version when `s3ref` or `source_url` is passed.\n",
|
|
119
|
+
tags: ["File"],
|
|
120
|
+
parameters: [
|
|
121
|
+
{
|
|
122
|
+
$ref: "#/components/parameters/ActivityIdQueryParam"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
$ref: "#/components/parameters/FillActivityQueryParam"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
$ref: "#/components/parameters/StrictQueryParam"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
$ref: "#/components/parameters/AsyncOperationQueryParam"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
$ref: "#/components/parameters/DeleteTempFileQueryParam"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
$ref: "#/components/parameters/VersionOnlyQueryParam"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
requestBody: {
|
|
141
|
+
content: {
|
|
142
|
+
"application/json": {
|
|
143
|
+
schema: {
|
|
144
|
+
oneOf: [
|
|
145
|
+
{
|
|
146
|
+
$ref: "#/components/schemas/SaveFilePayloadV2"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: "array",
|
|
150
|
+
description: "Batch version mode: array of s3ref payloads to add multiple versions to a single file entity.\nAll payloads must target the same file entity (_id or file_entity_id).\nRequires version_only=true query parameter.\nS3 operations run in parallel, with a single entity update at the end.\n",
|
|
151
|
+
items: {
|
|
152
|
+
$ref: "#/components/schemas/BatchSaveFileVersionPayload"
|
|
153
|
+
},
|
|
154
|
+
minItems: 1,
|
|
155
|
+
maxItems: 20
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
examples: {
|
|
160
|
+
"New file from s3ref": {
|
|
161
|
+
description: "Standard epilot file entity with S3 Ref",
|
|
162
|
+
value: {
|
|
163
|
+
type: "document",
|
|
164
|
+
filename: "document.pdf",
|
|
165
|
+
_tags: ["string"],
|
|
166
|
+
access_control: "private",
|
|
167
|
+
s3ref: {
|
|
168
|
+
bucket: "epilot-prod-user-content",
|
|
169
|
+
key: "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"Update existing file with relations": {
|
|
174
|
+
description: "Update existing file entity with _id",
|
|
175
|
+
value: {
|
|
176
|
+
_id: "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
177
|
+
filename: "document.pdf",
|
|
178
|
+
access_control: "private",
|
|
179
|
+
custom_download_url: "https://some-api-url.com/download?file_id=123",
|
|
180
|
+
shared_with_end_customer: true,
|
|
181
|
+
relations: [
|
|
182
|
+
{
|
|
183
|
+
entity_id: "77a1e0cc-7b92-4d41-8cce-eefd317ec004",
|
|
184
|
+
_schema: "contact"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"New file from source_url": {
|
|
190
|
+
description: "New epilot file entity from a source_url",
|
|
191
|
+
value: {
|
|
192
|
+
type: "document",
|
|
193
|
+
filename: "document.pdf",
|
|
194
|
+
_tags: ["string"],
|
|
195
|
+
access_control: "private",
|
|
196
|
+
source_url: "https://docs.epilot.io/document.pdf"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"File with custom download URL (external)": {
|
|
200
|
+
description: "Custom file entity with custom download url",
|
|
201
|
+
value: {
|
|
202
|
+
type: "document",
|
|
203
|
+
filename: "document.pdf",
|
|
204
|
+
_tags: ["string"],
|
|
205
|
+
access_control: "private",
|
|
206
|
+
custom_download_url: "https://some-api-url.com/download?file_id=123",
|
|
207
|
+
shared_with_end_customer: true
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"Batch save multiple versions": {
|
|
211
|
+
description: "Save multiple file versions in a single request (parallel S3 processing)",
|
|
212
|
+
value: [
|
|
213
|
+
{
|
|
214
|
+
_id: "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
215
|
+
filename: "photo1.jpg",
|
|
216
|
+
access_control: "private",
|
|
217
|
+
s3ref: {
|
|
218
|
+
bucket: "epilot-prod-user-content",
|
|
219
|
+
key: "123/temp/abc/photo1.jpg"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
_id: "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
224
|
+
filename: "photo2.jpg",
|
|
225
|
+
access_control: "private",
|
|
226
|
+
s3ref: {
|
|
227
|
+
bucket: "epilot-prod-user-content",
|
|
228
|
+
key: "123/temp/def/photo2.jpg"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
responses: {
|
|
238
|
+
"200": {
|
|
239
|
+
description: "Created or updated File Entity",
|
|
240
|
+
content: {
|
|
241
|
+
"application/json": {
|
|
242
|
+
schema: {
|
|
243
|
+
$ref: "#/components/schemas/FileEntity"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"400": {
|
|
249
|
+
$ref: "#/components/responses/BadRequestError"
|
|
250
|
+
},
|
|
251
|
+
"401": {
|
|
252
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
253
|
+
},
|
|
254
|
+
"404": {
|
|
255
|
+
$ref: "#/components/responses/NotFoundError"
|
|
256
|
+
},
|
|
257
|
+
"500": {
|
|
258
|
+
$ref: "#/components/responses/InternalServerError"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"/v1/files/upload": {
|
|
264
|
+
post: {
|
|
265
|
+
operationId: "uploadFile",
|
|
266
|
+
summary: "uploadFile",
|
|
267
|
+
deprecated: true,
|
|
268
|
+
description: "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files/upload` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `uploadFileV2`:\n\n| v1 Parameter | v2 Parameter | Notes |\n|--------------|--------------|-------|\n| `file_entity_id` | `file_entity_id` | No change |\n\nThe v2 response includes the same fields with improved structure.\n\n---\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFile operation to store file file permanently.\n",
|
|
269
|
+
tags: ["Deprecated"],
|
|
270
|
+
parameters: [
|
|
271
|
+
{
|
|
272
|
+
name: "file_entity_id",
|
|
273
|
+
in: "query",
|
|
274
|
+
description: "file entity id",
|
|
275
|
+
schema: {
|
|
276
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
requestBody: {
|
|
281
|
+
content: {
|
|
282
|
+
"application/json": {
|
|
283
|
+
schema: {
|
|
284
|
+
$ref: "#/components/schemas/UploadFilePayload"
|
|
285
|
+
},
|
|
286
|
+
examples: {
|
|
287
|
+
"Upload a document": {
|
|
288
|
+
value: {
|
|
289
|
+
filename: "document.pdf",
|
|
290
|
+
mime_type: "application/pdf"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
responses: {
|
|
298
|
+
"201": {
|
|
299
|
+
description: "Pre-signed URL for POST / PUT upload",
|
|
300
|
+
content: {
|
|
301
|
+
"application/json": {
|
|
302
|
+
schema: {
|
|
303
|
+
type: "object",
|
|
304
|
+
properties: {
|
|
305
|
+
s3ref: {
|
|
306
|
+
allOf: [
|
|
307
|
+
{
|
|
308
|
+
$ref: "#/components/schemas/S3Ref"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
example: {
|
|
312
|
+
bucket: "epilot-prod-user-content",
|
|
313
|
+
key: "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
upload_url: {
|
|
319
|
+
type: "string",
|
|
320
|
+
format: "url",
|
|
321
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
322
|
+
},
|
|
323
|
+
public_url: {
|
|
324
|
+
description: "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
325
|
+
type: "string",
|
|
326
|
+
format: "url",
|
|
327
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"400": {
|
|
335
|
+
$ref: "#/components/responses/BadRequestError"
|
|
336
|
+
},
|
|
337
|
+
"401": {
|
|
338
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
339
|
+
},
|
|
340
|
+
"500": {
|
|
341
|
+
$ref: "#/components/responses/InternalServerError"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"/v1/files": {
|
|
347
|
+
post: {
|
|
348
|
+
operationId: "saveFile",
|
|
349
|
+
summary: "saveFile",
|
|
350
|
+
deprecated: true,
|
|
351
|
+
description: "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `saveFileV2`:\n\n| v1 Feature | v2 Feature | Notes |\n|------------|------------|-------|\n| `activity_id` param | `activity_id` param | No change |\n| `async` param | `async` param | No change |\n| - | `fill_activity` param | New in v2 |\n| - | `strict` param | New in v2 |\n| - | `delete_temp_file` param | New in v2, defaults to true |\n\nThe v2 endpoint supports additional parameters for better control over file saving behavior.\n\n---\n\nCreate / Update a permanent File entity.\n\nMakes file object permanent and saves metadata to file entity.\n",
|
|
352
|
+
tags: ["Deprecated"],
|
|
353
|
+
parameters: [
|
|
354
|
+
{
|
|
355
|
+
$ref: "#/components/parameters/ActivityIdQueryParam"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
$ref: "#/components/parameters/AsyncOperationQueryParam"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
$ref: "#/components/parameters/VersionOnlyQueryParam"
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
requestBody: {
|
|
365
|
+
content: {
|
|
366
|
+
"application/json": {
|
|
367
|
+
schema: {
|
|
368
|
+
$ref: "#/components/schemas/SaveFilePayload"
|
|
369
|
+
},
|
|
370
|
+
examples: {
|
|
371
|
+
"Save file with S3 reference": {
|
|
372
|
+
value: {
|
|
373
|
+
filename: "document.pdf",
|
|
374
|
+
type: "document",
|
|
375
|
+
access_control: "private",
|
|
376
|
+
s3ref: {
|
|
377
|
+
bucket: "epilot-prod-user-content",
|
|
378
|
+
key: "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
responses: {
|
|
387
|
+
"201": {
|
|
388
|
+
description: "Created File Entity",
|
|
389
|
+
content: {
|
|
390
|
+
"application/json": {
|
|
391
|
+
schema: {
|
|
392
|
+
$ref: "#/components/schemas/FileEntity"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"400": {
|
|
398
|
+
$ref: "#/components/responses/BadRequestError"
|
|
399
|
+
},
|
|
400
|
+
"401": {
|
|
401
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
402
|
+
},
|
|
403
|
+
"500": {
|
|
404
|
+
$ref: "#/components/responses/InternalServerError"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"/v2/files/{id}": {
|
|
410
|
+
get: {
|
|
411
|
+
operationId: "getFile",
|
|
412
|
+
summary: "getFile",
|
|
413
|
+
description: "Get a file entity by id",
|
|
414
|
+
tags: ["File"],
|
|
415
|
+
parameters: [
|
|
416
|
+
{
|
|
417
|
+
name: "id",
|
|
418
|
+
in: "path",
|
|
419
|
+
required: true,
|
|
420
|
+
schema: {
|
|
421
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "source_url",
|
|
426
|
+
in: "query",
|
|
427
|
+
schema: {
|
|
428
|
+
type: "boolean",
|
|
429
|
+
default: false,
|
|
430
|
+
description: "Generate a source_url for the file entity, if it doesn't have one"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
$ref: "#/components/parameters/StrictQueryParam"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
$ref: "#/components/parameters/AsyncOperationQueryParam"
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
responses: {
|
|
441
|
+
"200": {
|
|
442
|
+
description: "File Entity",
|
|
443
|
+
content: {
|
|
444
|
+
"application/json": {
|
|
445
|
+
schema: {
|
|
446
|
+
$ref: "#/components/schemas/FileEntity"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"401": {
|
|
452
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
453
|
+
},
|
|
454
|
+
"403": {
|
|
455
|
+
$ref: "#/components/responses/ForbiddenError"
|
|
456
|
+
},
|
|
457
|
+
"404": {
|
|
458
|
+
$ref: "#/components/responses/NotFoundError"
|
|
459
|
+
},
|
|
460
|
+
"500": {
|
|
461
|
+
$ref: "#/components/responses/InternalServerError"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
delete: {
|
|
466
|
+
operationId: "deleteFile",
|
|
467
|
+
summary: "deleteFile",
|
|
468
|
+
description: "Delete a file entity by id",
|
|
469
|
+
tags: ["File"],
|
|
470
|
+
parameters: [
|
|
471
|
+
{
|
|
472
|
+
name: "id",
|
|
473
|
+
in: "path",
|
|
474
|
+
required: true,
|
|
475
|
+
schema: {
|
|
476
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
name: "purge",
|
|
481
|
+
in: "query",
|
|
482
|
+
schema: {
|
|
483
|
+
type: "boolean",
|
|
484
|
+
default: false,
|
|
485
|
+
description: "Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
$ref: "#/components/parameters/ActivityIdQueryParam"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
$ref: "#/components/parameters/StrictQueryParam"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
responses: {
|
|
496
|
+
"200": {
|
|
497
|
+
description: "The deleted file",
|
|
498
|
+
content: {
|
|
499
|
+
"application/json": {
|
|
500
|
+
schema: {
|
|
501
|
+
$ref: "#/components/schemas/FileEntity"
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"401": {
|
|
507
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
508
|
+
},
|
|
509
|
+
"403": {
|
|
510
|
+
$ref: "#/components/responses/ForbiddenError"
|
|
511
|
+
},
|
|
512
|
+
"404": {
|
|
513
|
+
$ref: "#/components/responses/NotFoundError"
|
|
514
|
+
},
|
|
515
|
+
"500": {
|
|
516
|
+
$ref: "#/components/responses/InternalServerError"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"/v1/files/{id}/download": {
|
|
522
|
+
get: {
|
|
523
|
+
operationId: "downloadFile",
|
|
524
|
+
summary: "downloadFile",
|
|
525
|
+
description: "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n",
|
|
526
|
+
tags: ["File"],
|
|
527
|
+
parameters: [
|
|
528
|
+
{
|
|
529
|
+
name: "id",
|
|
530
|
+
in: "path",
|
|
531
|
+
required: true,
|
|
532
|
+
description: "The UUID of the file entity",
|
|
533
|
+
schema: {
|
|
534
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: "version",
|
|
539
|
+
in: "query",
|
|
540
|
+
description: "Index of the file version to download (0 = latest)",
|
|
541
|
+
schema: {
|
|
542
|
+
type: "integer",
|
|
543
|
+
default: 0
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: "attachment",
|
|
548
|
+
in: "query",
|
|
549
|
+
description: "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.",
|
|
550
|
+
schema: {
|
|
551
|
+
type: "boolean",
|
|
552
|
+
default: true
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
responses: {
|
|
557
|
+
"200": {
|
|
558
|
+
description: "Pre-signed download URL",
|
|
559
|
+
content: {
|
|
560
|
+
"application/json": {
|
|
561
|
+
schema: {
|
|
562
|
+
type: "object",
|
|
563
|
+
properties: {
|
|
564
|
+
download_url: {
|
|
565
|
+
type: "string",
|
|
566
|
+
format: "uri",
|
|
567
|
+
description: "Pre-signed S3 URL valid for downloading the file",
|
|
568
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
example: {
|
|
573
|
+
download_url: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&..."
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
"401": {
|
|
579
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
580
|
+
},
|
|
581
|
+
"403": {
|
|
582
|
+
$ref: "#/components/responses/ForbiddenError"
|
|
583
|
+
},
|
|
584
|
+
"404": {
|
|
585
|
+
$ref: "#/components/responses/NotFoundError"
|
|
586
|
+
},
|
|
587
|
+
"500": {
|
|
588
|
+
$ref: "#/components/responses/InternalServerError"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"/v1/files:downloadS3": {
|
|
594
|
+
post: {
|
|
595
|
+
operationId: "downloadS3File",
|
|
596
|
+
summary: "downloadS3File",
|
|
597
|
+
description: "Generate a pre-signed download URL for a file using its S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
598
|
+
tags: ["File"],
|
|
599
|
+
parameters: [
|
|
600
|
+
{
|
|
601
|
+
name: "s3_key",
|
|
602
|
+
in: "query",
|
|
603
|
+
required: true,
|
|
604
|
+
description: "The S3 object key",
|
|
605
|
+
schema: {
|
|
606
|
+
type: "string"
|
|
607
|
+
},
|
|
608
|
+
example: "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
name: "s3_bucket",
|
|
612
|
+
in: "query",
|
|
613
|
+
required: true,
|
|
614
|
+
description: "The S3 bucket name",
|
|
615
|
+
schema: {
|
|
616
|
+
type: "string"
|
|
617
|
+
},
|
|
618
|
+
example: "epilot-prod-user-content"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
name: "attachment",
|
|
622
|
+
in: "query",
|
|
623
|
+
description: "Controls the Content-Disposition header. Set to `true` to trigger browser download dialog, `false` to display inline.",
|
|
624
|
+
schema: {
|
|
625
|
+
type: "boolean",
|
|
626
|
+
default: true
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
responses: {
|
|
631
|
+
"200": {
|
|
632
|
+
description: "Pre-signed download URL",
|
|
633
|
+
content: {
|
|
634
|
+
"application/json": {
|
|
635
|
+
schema: {
|
|
636
|
+
type: "object",
|
|
637
|
+
properties: {
|
|
638
|
+
download_url: {
|
|
639
|
+
type: "string",
|
|
640
|
+
format: "uri",
|
|
641
|
+
description: "Pre-signed S3 URL valid for downloading the file",
|
|
642
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"400": {
|
|
650
|
+
$ref: "#/components/responses/BadRequestError"
|
|
651
|
+
},
|
|
652
|
+
"401": {
|
|
653
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
654
|
+
},
|
|
655
|
+
"404": {
|
|
656
|
+
$ref: "#/components/responses/NotFoundError"
|
|
657
|
+
},
|
|
658
|
+
"500": {
|
|
659
|
+
$ref: "#/components/responses/InternalServerError"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
"/v1/files:downloadFiles": {
|
|
665
|
+
post: {
|
|
666
|
+
operationId: "downloadFiles",
|
|
667
|
+
summary: "downloadFiles",
|
|
668
|
+
description: "Bulk generate pre-signed download URLs for multiple files in a single request.\n\nThis is more efficient than calling `downloadFile` multiple times when you need to download several files.\n",
|
|
669
|
+
tags: ["File"],
|
|
670
|
+
requestBody: {
|
|
671
|
+
content: {
|
|
672
|
+
"application/json": {
|
|
673
|
+
schema: {
|
|
674
|
+
$ref: "#/components/schemas/DownloadFilesPayload"
|
|
675
|
+
},
|
|
676
|
+
examples: {
|
|
677
|
+
"Download multiple files": {
|
|
678
|
+
value: [
|
|
679
|
+
{
|
|
680
|
+
id: "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
681
|
+
version: 0
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
685
|
+
version: 0
|
|
686
|
+
}
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
responses: {
|
|
694
|
+
"200": {
|
|
695
|
+
description: "Generated download URLs for each requested file",
|
|
696
|
+
content: {
|
|
697
|
+
"application/json": {
|
|
698
|
+
schema: {
|
|
699
|
+
type: "array",
|
|
700
|
+
items: {
|
|
701
|
+
type: "object",
|
|
702
|
+
properties: {
|
|
703
|
+
download_url: {
|
|
704
|
+
type: "string",
|
|
705
|
+
format: "uri",
|
|
706
|
+
description: "Pre-signed S3 URL for downloading the file",
|
|
707
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
708
|
+
},
|
|
709
|
+
file_entity_id: {
|
|
710
|
+
type: "string",
|
|
711
|
+
format: "uuid",
|
|
712
|
+
description: "The file entity ID (matches the requested ID)"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
example: [
|
|
718
|
+
{
|
|
719
|
+
download_url: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-...",
|
|
720
|
+
file_entity_id: "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
download_url: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/image.png?X-Amz-...",
|
|
724
|
+
file_entity_id: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
725
|
+
}
|
|
726
|
+
]
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"400": {
|
|
731
|
+
$ref: "#/components/responses/BadRequestError"
|
|
732
|
+
},
|
|
733
|
+
"401": {
|
|
734
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
735
|
+
},
|
|
736
|
+
"500": {
|
|
737
|
+
$ref: "#/components/responses/InternalServerError"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"/v1/files/{id}/preview": {
|
|
743
|
+
get: {
|
|
744
|
+
operationId: "previewFile",
|
|
745
|
+
summary: "previewFile",
|
|
746
|
+
description: "Generate a thumbnail preview for a file entity.\n\nSupported file types include images (PNG, JPEG, GIF, WebP), PDFs, and common document formats.\nThe preview is returned as an image (PNG or JPEG).\n\n**Tip:** Use with CookieAuth to embed previews directly in `<img>` tags.\n",
|
|
747
|
+
tags: ["Preview"],
|
|
748
|
+
parameters: [
|
|
749
|
+
{
|
|
750
|
+
name: "id",
|
|
751
|
+
in: "path",
|
|
752
|
+
required: true,
|
|
753
|
+
description: "The UUID of the file entity",
|
|
754
|
+
schema: {
|
|
755
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
name: "version",
|
|
760
|
+
in: "query",
|
|
761
|
+
description: "Index of the file version to preview (0 = latest)",
|
|
762
|
+
schema: {
|
|
763
|
+
type: "integer",
|
|
764
|
+
default: 0
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
name: "w",
|
|
769
|
+
in: "query",
|
|
770
|
+
description: "Desired width in pixels (maintains aspect ratio if only width is specified)",
|
|
771
|
+
schema: {
|
|
772
|
+
type: "integer"
|
|
773
|
+
},
|
|
774
|
+
example: 200
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
name: "h",
|
|
778
|
+
in: "query",
|
|
779
|
+
description: "Desired height in pixels (maintains aspect ratio if only height is specified)",
|
|
780
|
+
schema: {
|
|
781
|
+
type: "integer"
|
|
782
|
+
},
|
|
783
|
+
example: 200
|
|
784
|
+
}
|
|
785
|
+
],
|
|
786
|
+
responses: {
|
|
787
|
+
"200": {
|
|
788
|
+
description: "Generated thumbnail image",
|
|
789
|
+
content: {
|
|
790
|
+
"image/png": {
|
|
791
|
+
schema: {
|
|
792
|
+
type: "string",
|
|
793
|
+
format: "binary"
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"image/jpeg": {
|
|
797
|
+
schema: {
|
|
798
|
+
type: "string",
|
|
799
|
+
format: "binary"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"401": {
|
|
805
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
806
|
+
},
|
|
807
|
+
"404": {
|
|
808
|
+
$ref: "#/components/responses/NotFoundError"
|
|
809
|
+
},
|
|
810
|
+
"500": {
|
|
811
|
+
$ref: "#/components/responses/InternalServerError"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"/v1/files:previewS3": {
|
|
817
|
+
post: {
|
|
818
|
+
operationId: "previewS3File",
|
|
819
|
+
summary: "previewS3File",
|
|
820
|
+
description: "Generate a thumbnail preview from an S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
821
|
+
tags: ["Preview"],
|
|
822
|
+
parameters: [
|
|
823
|
+
{
|
|
824
|
+
name: "w",
|
|
825
|
+
in: "query",
|
|
826
|
+
description: "Desired width in pixels",
|
|
827
|
+
schema: {
|
|
828
|
+
type: "integer"
|
|
829
|
+
},
|
|
830
|
+
example: 200
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: "h",
|
|
834
|
+
in: "query",
|
|
835
|
+
description: "Desired height in pixels",
|
|
836
|
+
schema: {
|
|
837
|
+
type: "integer"
|
|
838
|
+
},
|
|
839
|
+
example: 200
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
requestBody: {
|
|
843
|
+
content: {
|
|
844
|
+
"application/json": {
|
|
845
|
+
schema: {
|
|
846
|
+
$ref: "#/components/schemas/S3Ref"
|
|
847
|
+
},
|
|
848
|
+
examples: {
|
|
849
|
+
"Preview from S3": {
|
|
850
|
+
value: {
|
|
851
|
+
bucket: "epilot-prod-user-content",
|
|
852
|
+
key: "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png"
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
responses: {
|
|
860
|
+
"200": {
|
|
861
|
+
description: "Generated thumbnail image",
|
|
862
|
+
content: {
|
|
863
|
+
"image/png": {
|
|
864
|
+
schema: {
|
|
865
|
+
type: "string",
|
|
866
|
+
format: "binary"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"image/jpeg": {
|
|
870
|
+
schema: {
|
|
871
|
+
type: "string",
|
|
872
|
+
format: "binary"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"400": {
|
|
878
|
+
$ref: "#/components/responses/BadRequestError"
|
|
879
|
+
},
|
|
880
|
+
"401": {
|
|
881
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
882
|
+
},
|
|
883
|
+
"404": {
|
|
884
|
+
$ref: "#/components/responses/NotFoundError"
|
|
885
|
+
},
|
|
886
|
+
"500": {
|
|
887
|
+
$ref: "#/components/responses/InternalServerError"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
get: {
|
|
892
|
+
operationId: "previewS3FileGet",
|
|
893
|
+
summary: "previewS3FileGet",
|
|
894
|
+
description: "Get a thumbnail preview from an S3 reference using query parameters.\n\nThis GET variant is useful for embedding previews directly in `<img>` tags.\n",
|
|
895
|
+
tags: ["Preview"],
|
|
896
|
+
parameters: [
|
|
897
|
+
{
|
|
898
|
+
name: "key",
|
|
899
|
+
in: "query",
|
|
900
|
+
description: "The S3 object key",
|
|
901
|
+
required: true,
|
|
902
|
+
schema: {
|
|
903
|
+
type: "string"
|
|
904
|
+
},
|
|
905
|
+
example: "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/image.png"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
name: "bucket",
|
|
909
|
+
in: "query",
|
|
910
|
+
description: "The S3 bucket name",
|
|
911
|
+
required: true,
|
|
912
|
+
schema: {
|
|
913
|
+
type: "string"
|
|
914
|
+
},
|
|
915
|
+
example: "epilot-prod-user-content"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
name: "w",
|
|
919
|
+
in: "query",
|
|
920
|
+
description: "Desired width in pixels",
|
|
921
|
+
schema: {
|
|
922
|
+
type: "integer"
|
|
923
|
+
},
|
|
924
|
+
example: 200
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: "h",
|
|
928
|
+
in: "query",
|
|
929
|
+
description: "Desired height in pixels",
|
|
930
|
+
schema: {
|
|
931
|
+
type: "integer"
|
|
932
|
+
},
|
|
933
|
+
example: 200
|
|
934
|
+
}
|
|
935
|
+
],
|
|
936
|
+
responses: {
|
|
937
|
+
"200": {
|
|
938
|
+
description: "Generated thumbnail image",
|
|
939
|
+
content: {
|
|
940
|
+
"image/png": {
|
|
941
|
+
schema: {
|
|
942
|
+
type: "string",
|
|
943
|
+
format: "binary"
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
"image/jpeg": {
|
|
947
|
+
schema: {
|
|
948
|
+
type: "string",
|
|
949
|
+
format: "binary"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
"400": {
|
|
955
|
+
$ref: "#/components/responses/BadRequestError"
|
|
956
|
+
},
|
|
957
|
+
"401": {
|
|
958
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
959
|
+
},
|
|
960
|
+
"404": {
|
|
961
|
+
$ref: "#/components/responses/NotFoundError"
|
|
962
|
+
},
|
|
963
|
+
"500": {
|
|
964
|
+
$ref: "#/components/responses/InternalServerError"
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"/v1/files/public/{id}/preview": {
|
|
970
|
+
get: {
|
|
971
|
+
operationId: "previewPublicFile",
|
|
972
|
+
summary: "previewPublicFile",
|
|
973
|
+
description: "Generate a thumbnail preview for a public file entity.\n\n**No authentication required.** This endpoint only works for files with `access_control: public-read`.\n",
|
|
974
|
+
security: [],
|
|
975
|
+
tags: ["Preview"],
|
|
976
|
+
parameters: [
|
|
977
|
+
{
|
|
978
|
+
name: "id",
|
|
979
|
+
in: "path",
|
|
980
|
+
required: true,
|
|
981
|
+
description: "The UUID of the public file entity",
|
|
982
|
+
schema: {
|
|
983
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
name: "version",
|
|
988
|
+
in: "query",
|
|
989
|
+
description: "Index of the file version to preview (0 = latest)",
|
|
990
|
+
schema: {
|
|
991
|
+
type: "integer",
|
|
992
|
+
default: 0
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
name: "w",
|
|
997
|
+
in: "query",
|
|
998
|
+
description: "Desired width in pixels",
|
|
999
|
+
schema: {
|
|
1000
|
+
type: "integer"
|
|
1001
|
+
},
|
|
1002
|
+
example: 200
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
name: "h",
|
|
1006
|
+
in: "query",
|
|
1007
|
+
description: "Desired height in pixels",
|
|
1008
|
+
schema: {
|
|
1009
|
+
type: "integer"
|
|
1010
|
+
},
|
|
1011
|
+
example: 200
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: "org_id",
|
|
1015
|
+
in: "query",
|
|
1016
|
+
description: "Organization ID that owns the file",
|
|
1017
|
+
schema: {
|
|
1018
|
+
type: "string"
|
|
1019
|
+
},
|
|
1020
|
+
example: "123"
|
|
1021
|
+
}
|
|
1022
|
+
],
|
|
1023
|
+
responses: {
|
|
1024
|
+
"200": {
|
|
1025
|
+
description: "Generated thumbnail image for a public file",
|
|
1026
|
+
content: {
|
|
1027
|
+
"image/png": {
|
|
1028
|
+
schema: {
|
|
1029
|
+
type: "string",
|
|
1030
|
+
format: "binary"
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
"image/jpeg": {
|
|
1034
|
+
schema: {
|
|
1035
|
+
type: "string",
|
|
1036
|
+
format: "binary"
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
"403": {
|
|
1042
|
+
description: "File is not public",
|
|
1043
|
+
content: {
|
|
1044
|
+
"application/json": {
|
|
1045
|
+
schema: {
|
|
1046
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1047
|
+
},
|
|
1048
|
+
example: {
|
|
1049
|
+
status: 403,
|
|
1050
|
+
error: "File is not publicly accessible"
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
"404": {
|
|
1056
|
+
$ref: "#/components/responses/NotFoundError"
|
|
1057
|
+
},
|
|
1058
|
+
"500": {
|
|
1059
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"/v1/files/session": {
|
|
1065
|
+
get: {
|
|
1066
|
+
operationId: "getSession",
|
|
1067
|
+
summary: "getSession",
|
|
1068
|
+
description: 'Start a browser session by converting a Bearer token into a server-side cookie.\n\n**Use case:** After calling this endpoint, you can use preview URLs directly in `<img>` tags\nwithout needing to set the Authorization header manually.\n\n**Example flow:**\n1. Call this endpoint with your Bearer token: `GET /v1/files/session` with `Authorization: Bearer <token>`\n2. The server sets an HTTP-only cookie named `token`\n3. Use preview URLs directly: `<img src="https://file.sls.epilot.io/v1/files/{id}/preview" />`\n',
|
|
1069
|
+
tags: ["Session"],
|
|
1070
|
+
responses: {
|
|
1071
|
+
"200": {
|
|
1072
|
+
description: "Session started successfully. A session cookie has been set.",
|
|
1073
|
+
headers: {
|
|
1074
|
+
"Set-Cookie": {
|
|
1075
|
+
description: "HTTP-only session cookie containing the authentication token",
|
|
1076
|
+
schema: {
|
|
1077
|
+
type: "string",
|
|
1078
|
+
example: "token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...; HttpOnly; Secure; Path=/"
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
"401": {
|
|
1084
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
delete: {
|
|
1089
|
+
operationId: "deleteSession",
|
|
1090
|
+
summary: "deleteSession",
|
|
1091
|
+
description: "End a browser session by deleting the token cookie.\n\nCall this endpoint to log out and clear the session cookie.\n",
|
|
1092
|
+
tags: ["Session"],
|
|
1093
|
+
responses: {
|
|
1094
|
+
"200": {
|
|
1095
|
+
description: "Session deleted successfully. The session cookie has been cleared."
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
"/v1/files/{id}/public/links": {
|
|
1101
|
+
post: {
|
|
1102
|
+
operationId: "generatePublicLink",
|
|
1103
|
+
summary: "generatePublicLink",
|
|
1104
|
+
description: "Generate a public link to share a private file externally.\n\nThe generated link:\n- Is permanent until explicitly revoked\n- Includes the filename for user-friendly URLs\n- Does not require authentication to access\n- Redirects to a signed download URL when accessed\n\n**Use case:** Share invoices, contracts, or documents with external parties who don't have epilot accounts.\n",
|
|
1105
|
+
tags: ["Public Links"],
|
|
1106
|
+
parameters: [
|
|
1107
|
+
{
|
|
1108
|
+
name: "id",
|
|
1109
|
+
in: "path",
|
|
1110
|
+
required: true,
|
|
1111
|
+
description: "The UUID of the file entity to share",
|
|
1112
|
+
schema: {
|
|
1113
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
responses: {
|
|
1118
|
+
"201": {
|
|
1119
|
+
description: "Public link generated successfully",
|
|
1120
|
+
content: {
|
|
1121
|
+
"application/json": {
|
|
1122
|
+
schema: {
|
|
1123
|
+
type: "string",
|
|
1124
|
+
description: "The public URL that can be shared externally"
|
|
1125
|
+
},
|
|
1126
|
+
example: "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice-2023-12.pdf"
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"401": {
|
|
1131
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1132
|
+
},
|
|
1133
|
+
"403": {
|
|
1134
|
+
$ref: "#/components/responses/ForbiddenError"
|
|
1135
|
+
},
|
|
1136
|
+
"404": {
|
|
1137
|
+
$ref: "#/components/responses/NotFoundError"
|
|
1138
|
+
},
|
|
1139
|
+
"500": {
|
|
1140
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
get: {
|
|
1145
|
+
operationId: "listPublicLinksForFile",
|
|
1146
|
+
summary: "listPublicLinksForFile",
|
|
1147
|
+
description: "**Not yet implemented.**\n\nThis endpoint will fetch all public links previously generated for a file.\n",
|
|
1148
|
+
"x-not-implemented": true,
|
|
1149
|
+
parameters: [
|
|
1150
|
+
{
|
|
1151
|
+
name: "id",
|
|
1152
|
+
in: "path",
|
|
1153
|
+
required: true,
|
|
1154
|
+
description: "The UUID of the file entity",
|
|
1155
|
+
schema: {
|
|
1156
|
+
type: "string"
|
|
1157
|
+
},
|
|
1158
|
+
example: "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1159
|
+
}
|
|
1160
|
+
],
|
|
1161
|
+
tags: ["Public Links"],
|
|
1162
|
+
responses: {
|
|
1163
|
+
"200": {
|
|
1164
|
+
description: "Public links retrieved successfully",
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": {
|
|
1167
|
+
schema: {
|
|
1168
|
+
type: "object",
|
|
1169
|
+
properties: {
|
|
1170
|
+
results: {
|
|
1171
|
+
type: "array",
|
|
1172
|
+
items: {
|
|
1173
|
+
$ref: "#/components/schemas/PublicLink"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
example: {
|
|
1179
|
+
results: [
|
|
1180
|
+
{
|
|
1181
|
+
id: "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",
|
|
1182
|
+
link: "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c/invoice.pdf",
|
|
1183
|
+
last_accessed_at: "2024-01-15T10:30:00Z"
|
|
1184
|
+
}
|
|
1185
|
+
]
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
"501": {
|
|
1191
|
+
description: "Not implemented",
|
|
1192
|
+
content: {
|
|
1193
|
+
"application/json": {
|
|
1194
|
+
schema: {
|
|
1195
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1196
|
+
},
|
|
1197
|
+
example: {
|
|
1198
|
+
status: 501,
|
|
1199
|
+
error: "Not Implemented"
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"/v1/files/public/links/{id}/{filename}": {
|
|
1208
|
+
get: {
|
|
1209
|
+
operationId: "accessPublicLink",
|
|
1210
|
+
summary: "accessPublicLink",
|
|
1211
|
+
security: [],
|
|
1212
|
+
tags: ["Public Links"],
|
|
1213
|
+
description: "Access a file via its public link.\n\n**No authentication required.** This endpoint redirects to a signed S3 URL for downloading the file.\n\nThe filename in the URL is for user-friendliness and SEO; the actual file is identified by the link ID.\n",
|
|
1214
|
+
parameters: [
|
|
1215
|
+
{
|
|
1216
|
+
name: "id",
|
|
1217
|
+
in: "path",
|
|
1218
|
+
required: true,
|
|
1219
|
+
description: "The UUID of the public link (not the file entity ID)",
|
|
1220
|
+
schema: {
|
|
1221
|
+
type: "string"
|
|
1222
|
+
},
|
|
1223
|
+
example: "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
name: "filename",
|
|
1227
|
+
in: "path",
|
|
1228
|
+
required: true,
|
|
1229
|
+
description: "The filename (for user-friendly URLs)",
|
|
1230
|
+
schema: {
|
|
1231
|
+
type: "string"
|
|
1232
|
+
},
|
|
1233
|
+
example: "invoice-2023-12.pdf"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
name: "hash",
|
|
1237
|
+
in: "query",
|
|
1238
|
+
required: false,
|
|
1239
|
+
description: "Optional cache-busting hash to force re-download",
|
|
1240
|
+
schema: {
|
|
1241
|
+
type: "string"
|
|
1242
|
+
},
|
|
1243
|
+
example: "abc123"
|
|
1244
|
+
}
|
|
1245
|
+
],
|
|
1246
|
+
responses: {
|
|
1247
|
+
"302": {
|
|
1248
|
+
description: "Redirect to a signed S3 URL for downloading the file",
|
|
1249
|
+
headers: {
|
|
1250
|
+
Location: {
|
|
1251
|
+
description: "The signed S3 URL to download the file",
|
|
1252
|
+
schema: {
|
|
1253
|
+
type: "string",
|
|
1254
|
+
format: "uri"
|
|
1255
|
+
},
|
|
1256
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/document.pdf?X-Amz-..."
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
"404": {
|
|
1261
|
+
description: "Public link not found or has been revoked",
|
|
1262
|
+
content: {
|
|
1263
|
+
"application/json": {
|
|
1264
|
+
schema: {
|
|
1265
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1266
|
+
},
|
|
1267
|
+
example: {
|
|
1268
|
+
status: 404,
|
|
1269
|
+
error: "Public link not found"
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
"500": {
|
|
1275
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"/v1/files/public/links/{id}": {
|
|
1281
|
+
delete: {
|
|
1282
|
+
operationId: "revokePublicLink",
|
|
1283
|
+
summary: "revokePublicLink",
|
|
1284
|
+
description: "**Not yet implemented.**\n\nThis endpoint will revoke a public link, making the file inaccessible via that link.\n",
|
|
1285
|
+
"x-not-implemented": true,
|
|
1286
|
+
parameters: [
|
|
1287
|
+
{
|
|
1288
|
+
name: "id",
|
|
1289
|
+
in: "path",
|
|
1290
|
+
required: true,
|
|
1291
|
+
description: "The UUID of the public link to revoke",
|
|
1292
|
+
schema: {
|
|
1293
|
+
type: "string"
|
|
1294
|
+
},
|
|
1295
|
+
example: "13d22918-36bd-4227-9ad4-2cb978788c8d"
|
|
1296
|
+
}
|
|
1297
|
+
],
|
|
1298
|
+
tags: ["Public Links"],
|
|
1299
|
+
responses: {
|
|
1300
|
+
"204": {
|
|
1301
|
+
description: "Public link revoked successfully"
|
|
1302
|
+
},
|
|
1303
|
+
"501": {
|
|
1304
|
+
description: "Not implemented",
|
|
1305
|
+
content: {
|
|
1306
|
+
"application/json": {
|
|
1307
|
+
schema: {
|
|
1308
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1309
|
+
},
|
|
1310
|
+
example: {
|
|
1311
|
+
status: 501,
|
|
1312
|
+
error: "Not Implemented"
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
"/v1/files/download:verify": {
|
|
1321
|
+
post: {
|
|
1322
|
+
operationId: "verifyCustomDownloadUrl",
|
|
1323
|
+
summary: "verifyCustomDownloadUrl",
|
|
1324
|
+
description: "Verify that a custom download URL is valid and has not expired.\n\nUse this endpoint to validate custom download URLs before redirecting users.\nCustom download URLs include a signature and expiration time for security.\n",
|
|
1325
|
+
tags: ["File"],
|
|
1326
|
+
requestBody: {
|
|
1327
|
+
content: {
|
|
1328
|
+
"application/json": {
|
|
1329
|
+
schema: {
|
|
1330
|
+
$ref: "#/components/schemas/VerifyCustomDownloadUrlPayload"
|
|
1331
|
+
},
|
|
1332
|
+
examples: {
|
|
1333
|
+
"Verify URL": {
|
|
1334
|
+
value: {
|
|
1335
|
+
custom_download_url: "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
responses: {
|
|
1343
|
+
"200": {
|
|
1344
|
+
description: "Verification result",
|
|
1345
|
+
content: {
|
|
1346
|
+
"application/json": {
|
|
1347
|
+
schema: {
|
|
1348
|
+
type: "object",
|
|
1349
|
+
properties: {
|
|
1350
|
+
valid: {
|
|
1351
|
+
type: "boolean",
|
|
1352
|
+
description: "Whether the URL is valid and not expired"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
examples: {
|
|
1357
|
+
"Valid URL": {
|
|
1358
|
+
value: {
|
|
1359
|
+
valid: true
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
"Invalid URL": {
|
|
1363
|
+
value: {
|
|
1364
|
+
valid: false
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"400": {
|
|
1372
|
+
$ref: "#/components/responses/BadRequestError"
|
|
1373
|
+
},
|
|
1374
|
+
"401": {
|
|
1375
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1376
|
+
},
|
|
1377
|
+
"500": {
|
|
1378
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
"/v1/files/public/upload": {
|
|
1384
|
+
post: {
|
|
1385
|
+
operationId: "uploadFilePublic",
|
|
1386
|
+
summary: "uploadFilePublic",
|
|
1387
|
+
security: [],
|
|
1388
|
+
description: "Create a pre-signed S3 URL for uploading a file without authentication.\n\n**No authentication required.** This endpoint is intended for public-facing forms and journeys\nwhere end-users need to upload files without logging in.\n\nThe uploaded file is stored temporarily (one week). Use `saveFileV2` with proper authentication\nto store the file permanently.\n\n**Security note:** Files uploaded via this endpoint are temporary and require authenticated\naccess to be saved permanently.\n",
|
|
1389
|
+
tags: ["File"],
|
|
1390
|
+
requestBody: {
|
|
1391
|
+
content: {
|
|
1392
|
+
"application/json": {
|
|
1393
|
+
schema: {
|
|
1394
|
+
$ref: "#/components/schemas/UploadFilePayload"
|
|
1395
|
+
},
|
|
1396
|
+
examples: {
|
|
1397
|
+
"Upload an image": {
|
|
1398
|
+
description: "Upload an image file",
|
|
1399
|
+
value: {
|
|
1400
|
+
filename: "image.png",
|
|
1401
|
+
mime_type: "image/png"
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
"Upload a document": {
|
|
1405
|
+
description: "Upload a PDF document",
|
|
1406
|
+
value: {
|
|
1407
|
+
filename: "document.pdf",
|
|
1408
|
+
mime_type: "application/pdf"
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
responses: {
|
|
1416
|
+
"201": {
|
|
1417
|
+
description: "Pre-signed URL for uploading the file",
|
|
1418
|
+
content: {
|
|
1419
|
+
"application/json": {
|
|
1420
|
+
schema: {
|
|
1421
|
+
type: "object",
|
|
1422
|
+
properties: {
|
|
1423
|
+
s3ref: {
|
|
1424
|
+
allOf: [
|
|
1425
|
+
{
|
|
1426
|
+
$ref: "#/components/schemas/S3Ref"
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
description: "S3 reference to use when saving the file permanently"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
example: {
|
|
1433
|
+
bucket: "epilot-prod-user-content",
|
|
1434
|
+
key: "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
]
|
|
1438
|
+
},
|
|
1439
|
+
upload_url: {
|
|
1440
|
+
type: "string",
|
|
1441
|
+
format: "url",
|
|
1442
|
+
description: "Pre-signed URL for uploading the file via PUT request",
|
|
1443
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
1444
|
+
},
|
|
1445
|
+
error: {
|
|
1446
|
+
type: "string",
|
|
1447
|
+
description: "Error message if the upload preparation failed",
|
|
1448
|
+
example: "File entity not found"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
"400": {
|
|
1456
|
+
$ref: "#/components/responses/BadRequestError"
|
|
1457
|
+
},
|
|
1458
|
+
"500": {
|
|
1459
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"/v1/{slug}/collections": {
|
|
1465
|
+
get: {
|
|
1466
|
+
operationId: "getUserSchemaFileCollections",
|
|
1467
|
+
summary: "getUserSchemaFileCollections",
|
|
1468
|
+
description: 'Get all file collections for the current user within a specific schema.\n\nCollections help organize files into logical groups (e.g., "Contracts", "Invoices").\nUser collections are private to the creating user.\n',
|
|
1469
|
+
tags: ["File Collections"],
|
|
1470
|
+
parameters: [
|
|
1471
|
+
{
|
|
1472
|
+
name: "slug",
|
|
1473
|
+
in: "path",
|
|
1474
|
+
required: true,
|
|
1475
|
+
description: "The entity schema slug (e.g., order, opportunity, contact)",
|
|
1476
|
+
schema: {
|
|
1477
|
+
type: "string"
|
|
1478
|
+
},
|
|
1479
|
+
example: "opportunity"
|
|
1480
|
+
}
|
|
1481
|
+
],
|
|
1482
|
+
responses: {
|
|
1483
|
+
"200": {
|
|
1484
|
+
description: "List of collections for the user and schema",
|
|
1485
|
+
content: {
|
|
1486
|
+
"application/json": {
|
|
1487
|
+
schema: {
|
|
1488
|
+
type: "array",
|
|
1489
|
+
items: {
|
|
1490
|
+
$ref: "#/components/schemas/FileCollectionItem"
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
example: [
|
|
1494
|
+
{
|
|
1495
|
+
slug: "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",
|
|
1496
|
+
name: "Documents",
|
|
1497
|
+
id: "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
1498
|
+
parents: [],
|
|
1499
|
+
starred: false,
|
|
1500
|
+
order: 0,
|
|
1501
|
+
created_at: "2024-01-01T12:00:00Z",
|
|
1502
|
+
updated_at: "2024-01-02T12:00:00Z"
|
|
1503
|
+
}
|
|
1504
|
+
]
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
"401": {
|
|
1509
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1510
|
+
},
|
|
1511
|
+
"500": {
|
|
1512
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
post: {
|
|
1517
|
+
operationId: "createUserSchemaFileCollection",
|
|
1518
|
+
summary: "createUserSchemaFileCollection",
|
|
1519
|
+
description: "Create a new file collection for the current user within a specific schema.\n\nThe collection will be private to the creating user and associated with the specified schema.\n",
|
|
1520
|
+
tags: ["File Collections"],
|
|
1521
|
+
parameters: [
|
|
1522
|
+
{
|
|
1523
|
+
name: "slug",
|
|
1524
|
+
in: "path",
|
|
1525
|
+
required: true,
|
|
1526
|
+
description: "The entity schema slug (e.g., order, opportunity, contact)",
|
|
1527
|
+
schema: {
|
|
1528
|
+
type: "string"
|
|
1529
|
+
},
|
|
1530
|
+
example: "opportunity"
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
requestBody: {
|
|
1534
|
+
required: true,
|
|
1535
|
+
content: {
|
|
1536
|
+
"application/json": {
|
|
1537
|
+
schema: {
|
|
1538
|
+
$ref: "#/components/schemas/FileCollectionCreateRequest"
|
|
1539
|
+
},
|
|
1540
|
+
examples: {
|
|
1541
|
+
"Create collection": {
|
|
1542
|
+
value: {
|
|
1543
|
+
name: "Contracts",
|
|
1544
|
+
starred: false
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
"Create nested collection": {
|
|
1548
|
+
value: {
|
|
1549
|
+
name: "2024 Contracts",
|
|
1550
|
+
parents: ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:contracts"]
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
responses: {
|
|
1558
|
+
"201": {
|
|
1559
|
+
description: "File collection created successfully",
|
|
1560
|
+
content: {
|
|
1561
|
+
"application/json": {
|
|
1562
|
+
schema: {
|
|
1563
|
+
$ref: "#/components/schemas/FileCollectionItem"
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
"400": {
|
|
1569
|
+
$ref: "#/components/responses/BadRequestError"
|
|
1570
|
+
},
|
|
1571
|
+
"401": {
|
|
1572
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1573
|
+
},
|
|
1574
|
+
"500": {
|
|
1575
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
},
|
|
1580
|
+
"/v1/{slug}/collections/{collectionSlug}": {
|
|
1581
|
+
put: {
|
|
1582
|
+
operationId: "updateUserSchemaFileCollection",
|
|
1583
|
+
summary: "updateUserSchemaFileCollection",
|
|
1584
|
+
description: "Update an existing file collection.\n\nYou can update the name, parent relationships, starred status, and enabled locations/purposes.\n",
|
|
1585
|
+
tags: ["File Collections"],
|
|
1586
|
+
parameters: [
|
|
1587
|
+
{
|
|
1588
|
+
name: "slug",
|
|
1589
|
+
in: "path",
|
|
1590
|
+
required: true,
|
|
1591
|
+
description: "The entity schema slug (e.g., order, opportunity)",
|
|
1592
|
+
schema: {
|
|
1593
|
+
type: "string"
|
|
1594
|
+
},
|
|
1595
|
+
example: "opportunity"
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
name: "collectionSlug",
|
|
1599
|
+
in: "path",
|
|
1600
|
+
required: true,
|
|
1601
|
+
description: "The collection slug identifier",
|
|
1602
|
+
schema: {
|
|
1603
|
+
type: "string"
|
|
1604
|
+
},
|
|
1605
|
+
example: "documents"
|
|
1606
|
+
}
|
|
1607
|
+
],
|
|
1608
|
+
requestBody: {
|
|
1609
|
+
required: true,
|
|
1610
|
+
content: {
|
|
1611
|
+
"application/json": {
|
|
1612
|
+
schema: {
|
|
1613
|
+
$ref: "#/components/schemas/FileCollectionAttributes"
|
|
1614
|
+
},
|
|
1615
|
+
examples: {
|
|
1616
|
+
"Rename collection": {
|
|
1617
|
+
value: {
|
|
1618
|
+
name: "Important Documents"
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
"Star collection": {
|
|
1622
|
+
value: {
|
|
1623
|
+
starred: true
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
responses: {
|
|
1631
|
+
"200": {
|
|
1632
|
+
description: "File collection updated successfully",
|
|
1633
|
+
content: {
|
|
1634
|
+
"application/json": {
|
|
1635
|
+
schema: {
|
|
1636
|
+
$ref: "#/components/schemas/FileCollectionItem"
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
"400": {
|
|
1642
|
+
$ref: "#/components/responses/BadRequestError"
|
|
1643
|
+
},
|
|
1644
|
+
"401": {
|
|
1645
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1646
|
+
},
|
|
1647
|
+
"404": {
|
|
1648
|
+
$ref: "#/components/responses/NotFoundError"
|
|
1649
|
+
},
|
|
1650
|
+
"500": {
|
|
1651
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
delete: {
|
|
1656
|
+
operationId: "deleteUserSchemaFileCollection",
|
|
1657
|
+
summary: "deleteUserSchemaFileCollection",
|
|
1658
|
+
description: "Delete a file collection.\n\n**Note:** Deleting a collection does not delete the files within it.\nFiles will remain but will no longer be associated with this collection.\n",
|
|
1659
|
+
tags: ["File Collections"],
|
|
1660
|
+
parameters: [
|
|
1661
|
+
{
|
|
1662
|
+
name: "slug",
|
|
1663
|
+
in: "path",
|
|
1664
|
+
required: true,
|
|
1665
|
+
description: "The entity schema slug (e.g., order, opportunity)",
|
|
1666
|
+
schema: {
|
|
1667
|
+
type: "string"
|
|
1668
|
+
},
|
|
1669
|
+
example: "opportunity"
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
name: "collectionSlug",
|
|
1673
|
+
in: "path",
|
|
1674
|
+
required: true,
|
|
1675
|
+
description: "The collection slug identifier",
|
|
1676
|
+
schema: {
|
|
1677
|
+
type: "string"
|
|
1678
|
+
},
|
|
1679
|
+
example: "documents"
|
|
1680
|
+
}
|
|
1681
|
+
],
|
|
1682
|
+
responses: {
|
|
1683
|
+
"200": {
|
|
1684
|
+
description: "File collection deleted successfully"
|
|
1685
|
+
},
|
|
1686
|
+
"401": {
|
|
1687
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1688
|
+
},
|
|
1689
|
+
"404": {
|
|
1690
|
+
$ref: "#/components/responses/NotFoundError"
|
|
1691
|
+
},
|
|
1692
|
+
"500": {
|
|
1693
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
"/v1/entity/{id}/collections/{collectionSlug}/files": {
|
|
1699
|
+
get: {
|
|
1700
|
+
operationId: "getFilesInCollection",
|
|
1701
|
+
summary: "getFilesInCollection",
|
|
1702
|
+
description: "Get all files within a specific collection for an entity.\n\nThe schema is automatically derived from the entity. This endpoint requires\nview permission on the parent entity to access its files.\n",
|
|
1703
|
+
tags: ["File Collections"],
|
|
1704
|
+
parameters: [
|
|
1705
|
+
{
|
|
1706
|
+
$ref: "#/components/parameters/EntityIdPathParam"
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
name: "collectionSlug",
|
|
1710
|
+
in: "path",
|
|
1711
|
+
required: true,
|
|
1712
|
+
description: "The collection slug identifier",
|
|
1713
|
+
schema: {
|
|
1714
|
+
type: "string"
|
|
1715
|
+
},
|
|
1716
|
+
example: "documents"
|
|
1717
|
+
}
|
|
1718
|
+
],
|
|
1719
|
+
responses: {
|
|
1720
|
+
"200": {
|
|
1721
|
+
description: "List of files in the collection",
|
|
1722
|
+
content: {
|
|
1723
|
+
"application/json": {
|
|
1724
|
+
schema: {
|
|
1725
|
+
type: "array",
|
|
1726
|
+
items: {
|
|
1727
|
+
$ref: "#/components/schemas/FileEntity"
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
"401": {
|
|
1734
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1735
|
+
},
|
|
1736
|
+
"403": {
|
|
1737
|
+
description: "Insufficient permissions to view the entity's files",
|
|
1738
|
+
content: {
|
|
1739
|
+
"application/json": {
|
|
1740
|
+
schema: {
|
|
1741
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1742
|
+
},
|
|
1743
|
+
example: {
|
|
1744
|
+
status: 403,
|
|
1745
|
+
error: "User must have permission to view this entity to access its files"
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
"404": {
|
|
1751
|
+
description: "Entity or collection not found",
|
|
1752
|
+
content: {
|
|
1753
|
+
"application/json": {
|
|
1754
|
+
schema: {
|
|
1755
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
1756
|
+
},
|
|
1757
|
+
example: {
|
|
1758
|
+
status: 404,
|
|
1759
|
+
error: "Entity not found"
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
"500": {
|
|
1765
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
"/v1/collections/{schemaSlug}": {
|
|
1771
|
+
get: {
|
|
1772
|
+
operationId: "getGlobalFileCollections",
|
|
1773
|
+
summary: "getGlobalFileCollections",
|
|
1774
|
+
description: "Get all global file collections for a specific schema.\n\nGlobal collections are shared across all users in the organization for the specified schema.\nUnlike user collections, these are visible to everyone with access to entities of that schema.\n",
|
|
1775
|
+
tags: ["File Collections"],
|
|
1776
|
+
parameters: [
|
|
1777
|
+
{
|
|
1778
|
+
name: "schemaSlug",
|
|
1779
|
+
in: "path",
|
|
1780
|
+
required: true,
|
|
1781
|
+
description: "The entity schema slug (e.g., order, opportunity, contact)",
|
|
1782
|
+
schema: {
|
|
1783
|
+
type: "string"
|
|
1784
|
+
},
|
|
1785
|
+
example: "order"
|
|
1786
|
+
}
|
|
1787
|
+
],
|
|
1788
|
+
responses: {
|
|
1789
|
+
"200": {
|
|
1790
|
+
description: "List of global collections for the schema",
|
|
1791
|
+
content: {
|
|
1792
|
+
"application/json": {
|
|
1793
|
+
schema: {
|
|
1794
|
+
type: "array",
|
|
1795
|
+
items: {
|
|
1796
|
+
$ref: "#/components/schemas/FileCollectionItem"
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
example: [
|
|
1800
|
+
{
|
|
1801
|
+
slug: "_system_files_collection_schema_order:templates",
|
|
1802
|
+
name: "Templates",
|
|
1803
|
+
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1804
|
+
parents: [],
|
|
1805
|
+
starred: false,
|
|
1806
|
+
order: 0,
|
|
1807
|
+
created_at: "2024-01-01T12:00:00Z",
|
|
1808
|
+
updated_at: "2024-01-01T12:00:00Z"
|
|
1809
|
+
}
|
|
1810
|
+
]
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
"401": {
|
|
1815
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
1816
|
+
},
|
|
1817
|
+
"500": {
|
|
1818
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
};
|
|
1824
|
+
var components = {
|
|
1825
|
+
securitySchemes: {
|
|
1826
|
+
EpilotAuth: {
|
|
1827
|
+
type: "http",
|
|
1828
|
+
scheme: "bearer",
|
|
1829
|
+
bearerFormat: "JWT",
|
|
1830
|
+
description: "Bearer token authentication using epilot OAuth2 JWT tokens.\n\n**When to use:** Server-to-server integrations, API clients, and programmatic access.\n\n**How to obtain a token:**\n1. Use the epilot Auth API to authenticate\n2. Include the token in the `Authorization` header: `Authorization: Bearer <token>`\n\n**Example:**\n```\nAuthorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\n```\n\n**Token contents:** The JWT contains user identity, organization ID, and permissions.\n"
|
|
1831
|
+
},
|
|
1832
|
+
CookieAuth: {
|
|
1833
|
+
type: "apiKey",
|
|
1834
|
+
in: "cookie",
|
|
1835
|
+
name: "token",
|
|
1836
|
+
description: "Cookie-based session authentication for browser applications.\n\n**When to use:** Browser-based applications that need to:\n- Embed file previews directly in `<img>` tags\n- Download files without JavaScript token handling\n- Access files from HTML elements that cannot set custom headers\n\n**How to establish a session:**\n1. Obtain a Bearer token via EpilotAuth\n2. Call `GET /v1/files/session` with the Bearer token\n3. The server sets an HTTP-only cookie named `token`\n4. Subsequent requests automatically include the cookie\n\n**Security note:** The cookie is HTTP-only and secure, protecting against XSS attacks.\n"
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
schemas: {
|
|
1840
|
+
EntityId: {
|
|
1841
|
+
type: "string",
|
|
1842
|
+
example: "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
1843
|
+
},
|
|
1844
|
+
EntitySlug: {
|
|
1845
|
+
description: "URL-friendly identifier for the entity schema",
|
|
1846
|
+
type: "string",
|
|
1847
|
+
example: "contact"
|
|
1848
|
+
},
|
|
1849
|
+
ActivityId: {
|
|
1850
|
+
type: "string",
|
|
1851
|
+
format: "ulid",
|
|
1852
|
+
description: "See https://github.com/ulid/spec",
|
|
1853
|
+
example: "01F130Q52Q6MWSNS8N2AVXV4JN"
|
|
1854
|
+
},
|
|
1855
|
+
FileEntityId: {
|
|
1856
|
+
oneOf: [
|
|
1857
|
+
{
|
|
1858
|
+
type: "string",
|
|
1859
|
+
maxLength: 0,
|
|
1860
|
+
description: "Empty string (used when file ID not yet assigned)"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
type: "string",
|
|
1864
|
+
format: "uuid",
|
|
1865
|
+
description: "Valid UUID v4"
|
|
1866
|
+
}
|
|
1867
|
+
],
|
|
1868
|
+
example: "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
1869
|
+
},
|
|
1870
|
+
FileAttributes: {
|
|
1871
|
+
type: "object",
|
|
1872
|
+
properties: {
|
|
1873
|
+
_tags: {
|
|
1874
|
+
type: "array",
|
|
1875
|
+
items: {
|
|
1876
|
+
type: "string"
|
|
1877
|
+
},
|
|
1878
|
+
example: ["tag1", "tag2"]
|
|
1879
|
+
},
|
|
1880
|
+
_purpose: {
|
|
1881
|
+
type: "array",
|
|
1882
|
+
items: {
|
|
1883
|
+
type: "string"
|
|
1884
|
+
},
|
|
1885
|
+
example: ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"]
|
|
1886
|
+
},
|
|
1887
|
+
_manifest: {
|
|
1888
|
+
type: "array",
|
|
1889
|
+
description: "Manifest ID used to create/update the entity",
|
|
1890
|
+
items: {
|
|
1891
|
+
type: "string",
|
|
1892
|
+
format: "uuid",
|
|
1893
|
+
example: "123e4567-e89b-12d3-a456-426614174000"
|
|
1894
|
+
}
|
|
1895
|
+
},
|
|
1896
|
+
filename: {
|
|
1897
|
+
type: "string",
|
|
1898
|
+
example: "document.pdf"
|
|
1899
|
+
},
|
|
1900
|
+
type: {
|
|
1901
|
+
$ref: "#/components/schemas/FileType"
|
|
1902
|
+
},
|
|
1903
|
+
mime_type: {
|
|
1904
|
+
type: "string",
|
|
1905
|
+
description: "MIME type of the file",
|
|
1906
|
+
example: "application/pdf"
|
|
1907
|
+
},
|
|
1908
|
+
size_bytes: {
|
|
1909
|
+
type: "integer",
|
|
1910
|
+
minimum: 0,
|
|
1911
|
+
description: "File size in bytes",
|
|
1912
|
+
example: 1234,
|
|
1913
|
+
readOnly: true
|
|
1914
|
+
},
|
|
1915
|
+
readable_size: {
|
|
1916
|
+
type: "string",
|
|
1917
|
+
example: "1.2 MB",
|
|
1918
|
+
description: "Human readable file size",
|
|
1919
|
+
readOnly: true
|
|
1920
|
+
},
|
|
1921
|
+
access_control: {
|
|
1922
|
+
type: "string",
|
|
1923
|
+
default: "private",
|
|
1924
|
+
enum: ["private", "public-read"]
|
|
1925
|
+
},
|
|
1926
|
+
public_url: {
|
|
1927
|
+
description: "Direct URL for file (public only if file access control is public-read)",
|
|
1928
|
+
type: "string",
|
|
1929
|
+
format: "url",
|
|
1930
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
1931
|
+
readOnly: true
|
|
1932
|
+
},
|
|
1933
|
+
custom_download_url: {
|
|
1934
|
+
$ref: "#/components/schemas/CustomDownloadUrl"
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
FileType: {
|
|
1939
|
+
type: "string",
|
|
1940
|
+
enum: [
|
|
1941
|
+
"document",
|
|
1942
|
+
"document_template",
|
|
1943
|
+
"text",
|
|
1944
|
+
"image",
|
|
1945
|
+
"video",
|
|
1946
|
+
"audio",
|
|
1947
|
+
"spreadsheet",
|
|
1948
|
+
"presentation",
|
|
1949
|
+
"font",
|
|
1950
|
+
"archive",
|
|
1951
|
+
"application",
|
|
1952
|
+
"unknown"
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1955
|
+
CustomDownloadUrl: {
|
|
1956
|
+
description: "Custom external download url used for the file",
|
|
1957
|
+
type: "string",
|
|
1958
|
+
format: "uri",
|
|
1959
|
+
example: "https://some-api-url.com/download?file_id=123"
|
|
1960
|
+
},
|
|
1961
|
+
FileEntity: {
|
|
1962
|
+
allOf: [
|
|
1963
|
+
{
|
|
1964
|
+
type: "object",
|
|
1965
|
+
properties: {
|
|
1966
|
+
_title: {
|
|
1967
|
+
type: "string",
|
|
1968
|
+
example: "document.pdf"
|
|
1969
|
+
},
|
|
1970
|
+
_schema: {
|
|
1971
|
+
type: "string",
|
|
1972
|
+
enum: ["file"],
|
|
1973
|
+
readOnly: true
|
|
1974
|
+
},
|
|
1975
|
+
_org: {
|
|
1976
|
+
type: "string",
|
|
1977
|
+
example: "123",
|
|
1978
|
+
readOnly: true
|
|
1979
|
+
},
|
|
1980
|
+
_id: {
|
|
1981
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
$ref: "#/components/schemas/FileAttributes"
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
type: "object",
|
|
1990
|
+
properties: {
|
|
1991
|
+
source_url: {
|
|
1992
|
+
type: "string",
|
|
1993
|
+
description: "Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true",
|
|
1994
|
+
example: "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
|
|
1995
|
+
},
|
|
1996
|
+
s3ref: {
|
|
1997
|
+
allOf: [
|
|
1998
|
+
{
|
|
1999
|
+
$ref: "#/components/schemas/S3Ref"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
readOnly: true
|
|
2003
|
+
}
|
|
2004
|
+
]
|
|
2005
|
+
},
|
|
2006
|
+
versions: {
|
|
2007
|
+
type: "array",
|
|
2008
|
+
items: {
|
|
2009
|
+
$ref: "#/components/schemas/FileItem"
|
|
2010
|
+
},
|
|
2011
|
+
readOnly: true
|
|
2012
|
+
},
|
|
2013
|
+
_updated_at: {
|
|
2014
|
+
type: "string",
|
|
2015
|
+
format: "date-time",
|
|
2016
|
+
readOnly: true
|
|
2017
|
+
},
|
|
2018
|
+
_created_at: {
|
|
2019
|
+
type: "string",
|
|
2020
|
+
format: "date-time",
|
|
2021
|
+
readOnly: true
|
|
2022
|
+
},
|
|
2023
|
+
_acl: {
|
|
2024
|
+
$ref: "#/components/schemas/BaseEntityAcl"
|
|
2025
|
+
},
|
|
2026
|
+
_owners: {
|
|
2027
|
+
type: "array",
|
|
2028
|
+
readOnly: true,
|
|
2029
|
+
items: {
|
|
2030
|
+
$ref: "#/components/schemas/BaseEntityOwner"
|
|
2031
|
+
}
|
|
2032
|
+
},
|
|
2033
|
+
__additional: {
|
|
2034
|
+
type: "object",
|
|
2035
|
+
description: "Additional fields that are not part of the schema",
|
|
2036
|
+
additionalProperties: true,
|
|
2037
|
+
nullable: true
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
required: ["_title", "_schema", "_org", "_id", "filename", "type", "access_control", "versions"]
|
|
2041
|
+
}
|
|
2042
|
+
]
|
|
2043
|
+
},
|
|
2044
|
+
CommonSaveFilePayload: {
|
|
2045
|
+
type: "object",
|
|
2046
|
+
properties: {
|
|
2047
|
+
_id: {
|
|
2048
|
+
allOf: [
|
|
2049
|
+
{
|
|
2050
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
description: "if passed, adds a new version to existing file entity"
|
|
2054
|
+
}
|
|
2055
|
+
]
|
|
2056
|
+
},
|
|
2057
|
+
file_entity_id: {
|
|
2058
|
+
type: "string",
|
|
2059
|
+
description: "Deprecated, use _id instead",
|
|
2060
|
+
deprecated: true
|
|
2061
|
+
},
|
|
2062
|
+
relations: {
|
|
2063
|
+
type: "array",
|
|
2064
|
+
description: "List of entities to relate the file to",
|
|
2065
|
+
items: {
|
|
2066
|
+
$ref: "#/components/schemas/FileRelationItem"
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
2070
|
+
additionalProperties: true
|
|
2071
|
+
},
|
|
2072
|
+
SaveS3FilePayload: {
|
|
2073
|
+
allOf: [
|
|
2074
|
+
{
|
|
2075
|
+
$ref: "#/components/schemas/CommonSaveFilePayload"
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
$ref: "#/components/schemas/FileAttributes"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
type: "object",
|
|
2082
|
+
properties: {
|
|
2083
|
+
s3ref: {
|
|
2084
|
+
$ref: "#/components/schemas/S3Ref"
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
]
|
|
2089
|
+
},
|
|
2090
|
+
SaveFileFromSourceURLPayload: {
|
|
2091
|
+
allOf: [
|
|
2092
|
+
{
|
|
2093
|
+
$ref: "#/components/schemas/CommonSaveFilePayload"
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
$ref: "#/components/schemas/FileAttributes"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
type: "object",
|
|
2100
|
+
properties: {
|
|
2101
|
+
source_url: {
|
|
2102
|
+
$ref: "#/components/schemas/CustomDownloadUrl"
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
SaveCustomFilePayload: {
|
|
2109
|
+
allOf: [
|
|
2110
|
+
{
|
|
2111
|
+
$ref: "#/components/schemas/CommonSaveFilePayload"
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
$ref: "#/components/schemas/FileAttributes"
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
type: "object",
|
|
2118
|
+
properties: {
|
|
2119
|
+
custom_download_url: {
|
|
2120
|
+
$ref: "#/components/schemas/CustomDownloadUrl"
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
]
|
|
2125
|
+
},
|
|
2126
|
+
SaveFilePayload: {
|
|
2127
|
+
anyOf: [
|
|
2128
|
+
{
|
|
2129
|
+
$ref: "#/components/schemas/SaveS3FilePayload"
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
$ref: "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
$ref: "#/components/schemas/SaveCustomFilePayload"
|
|
2136
|
+
}
|
|
2137
|
+
]
|
|
2138
|
+
},
|
|
2139
|
+
SaveFilePayloadV2: {
|
|
2140
|
+
anyOf: [
|
|
2141
|
+
{
|
|
2142
|
+
$ref: "#/components/schemas/SaveS3FilePayload"
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
$ref: "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
$ref: "#/components/schemas/SaveCustomFilePayload"
|
|
2149
|
+
}
|
|
2150
|
+
]
|
|
2151
|
+
},
|
|
2152
|
+
BatchSaveFileVersionPayload: {
|
|
2153
|
+
type: "object",
|
|
2154
|
+
description: "Payload for batch version save. Only s3ref payloads are supported.",
|
|
2155
|
+
properties: {
|
|
2156
|
+
_id: {
|
|
2157
|
+
allOf: [
|
|
2158
|
+
{
|
|
2159
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
description: "Target file entity to add version to"
|
|
2163
|
+
}
|
|
2164
|
+
]
|
|
2165
|
+
},
|
|
2166
|
+
file_entity_id: {
|
|
2167
|
+
type: "string",
|
|
2168
|
+
description: "Deprecated, use _id instead",
|
|
2169
|
+
deprecated: true
|
|
2170
|
+
},
|
|
2171
|
+
filename: {
|
|
2172
|
+
type: "string",
|
|
2173
|
+
example: "document.pdf"
|
|
2174
|
+
},
|
|
2175
|
+
mime_type: {
|
|
2176
|
+
type: "string",
|
|
2177
|
+
example: "application/pdf"
|
|
2178
|
+
},
|
|
2179
|
+
access_control: {
|
|
2180
|
+
type: "string",
|
|
2181
|
+
default: "private",
|
|
2182
|
+
enum: ["private", "public-read"]
|
|
2183
|
+
},
|
|
2184
|
+
s3ref: {
|
|
2185
|
+
$ref: "#/components/schemas/S3Ref"
|
|
2186
|
+
}
|
|
2187
|
+
},
|
|
2188
|
+
required: ["s3ref"],
|
|
2189
|
+
additionalProperties: false
|
|
2190
|
+
},
|
|
2191
|
+
UploadFilePayload: {
|
|
2192
|
+
type: "object",
|
|
2193
|
+
properties: {
|
|
2194
|
+
filename: {
|
|
2195
|
+
type: "string",
|
|
2196
|
+
example: "document.pdf"
|
|
2197
|
+
},
|
|
2198
|
+
mime_type: {
|
|
2199
|
+
description: "MIME type of file",
|
|
2200
|
+
type: "string",
|
|
2201
|
+
example: "application/pdf",
|
|
2202
|
+
default: "application/octet-stream"
|
|
2203
|
+
},
|
|
2204
|
+
index_tag: {
|
|
2205
|
+
type: "string",
|
|
2206
|
+
example: "2f6a377c8e78",
|
|
2207
|
+
maxLength: 64,
|
|
2208
|
+
description: "Used to index the file at the storage layer, which helps when browsing for this file"
|
|
2209
|
+
},
|
|
2210
|
+
metadata: {
|
|
2211
|
+
type: "object",
|
|
2212
|
+
additionalProperties: {
|
|
2213
|
+
anyOf: [
|
|
2214
|
+
{
|
|
2215
|
+
type: "string"
|
|
2216
|
+
}
|
|
2217
|
+
]
|
|
2218
|
+
},
|
|
2219
|
+
example: {
|
|
2220
|
+
color: "blue"
|
|
2221
|
+
},
|
|
2222
|
+
description: "Allows passing in custom metadata for the file, expects key-value pairs of string type"
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
required: ["filename"]
|
|
2226
|
+
},
|
|
2227
|
+
FileUpload: {
|
|
2228
|
+
type: "object",
|
|
2229
|
+
properties: {
|
|
2230
|
+
s3ref: {
|
|
2231
|
+
allOf: [
|
|
2232
|
+
{
|
|
2233
|
+
$ref: "#/components/schemas/S3Ref"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
example: {
|
|
2237
|
+
bucket: "epilot-prod-user-content",
|
|
2238
|
+
key: "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
]
|
|
2242
|
+
},
|
|
2243
|
+
upload_url: {
|
|
2244
|
+
type: "string",
|
|
2245
|
+
format: "url",
|
|
2246
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
2247
|
+
},
|
|
2248
|
+
public_url: {
|
|
2249
|
+
description: "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
2250
|
+
type: "string",
|
|
2251
|
+
format: "url",
|
|
2252
|
+
example: "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
},
|
|
2256
|
+
DownloadFilesPayload: {
|
|
2257
|
+
type: "array",
|
|
2258
|
+
items: {
|
|
2259
|
+
type: "object",
|
|
2260
|
+
properties: {
|
|
2261
|
+
id: {
|
|
2262
|
+
$ref: "#/components/schemas/FileEntityId"
|
|
2263
|
+
},
|
|
2264
|
+
version: {
|
|
2265
|
+
type: "integer",
|
|
2266
|
+
description: "File version",
|
|
2267
|
+
example: 0
|
|
2268
|
+
}
|
|
2269
|
+
},
|
|
2270
|
+
required: ["id"]
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
VerifyCustomDownloadUrlPayload: {
|
|
2274
|
+
type: "object",
|
|
2275
|
+
properties: {
|
|
2276
|
+
custom_download_url: {
|
|
2277
|
+
description: "Custom external download url with signature and expiration time",
|
|
2278
|
+
type: "string",
|
|
2279
|
+
example: "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"
|
|
2280
|
+
}
|
|
2281
|
+
},
|
|
2282
|
+
required: ["custom_download_url"]
|
|
2283
|
+
},
|
|
2284
|
+
S3Reference: {
|
|
2285
|
+
type: "object",
|
|
2286
|
+
properties: {
|
|
2287
|
+
bucket: {
|
|
2288
|
+
type: "string",
|
|
2289
|
+
example: "epilot-prod-user-content"
|
|
2290
|
+
},
|
|
2291
|
+
key: {
|
|
2292
|
+
type: "string",
|
|
2293
|
+
example: "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
required: ["bucket", "key"]
|
|
2297
|
+
},
|
|
2298
|
+
S3Ref: {
|
|
2299
|
+
$ref: "#/components/schemas/S3Reference"
|
|
2300
|
+
},
|
|
2301
|
+
FileItem: {
|
|
2302
|
+
type: "object",
|
|
2303
|
+
properties: {
|
|
2304
|
+
s3ref: {
|
|
2305
|
+
$ref: "#/components/schemas/S3Ref"
|
|
2306
|
+
},
|
|
2307
|
+
filename: {
|
|
2308
|
+
type: "string",
|
|
2309
|
+
example: "document.pdf"
|
|
2310
|
+
},
|
|
2311
|
+
size_bytes: {
|
|
2312
|
+
type: "integer",
|
|
2313
|
+
example: 1234
|
|
2314
|
+
},
|
|
2315
|
+
readable_size: {
|
|
2316
|
+
type: "string",
|
|
2317
|
+
example: "1.2 MB"
|
|
2318
|
+
},
|
|
2319
|
+
mime_type: {
|
|
2320
|
+
type: "string",
|
|
2321
|
+
example: "image/jpeg"
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
FileRelationItem: {
|
|
2326
|
+
type: "object",
|
|
2327
|
+
properties: {
|
|
2328
|
+
entity_id: {
|
|
2329
|
+
$ref: "#/components/schemas/EntityId"
|
|
2330
|
+
},
|
|
2331
|
+
_schema: {
|
|
2332
|
+
$ref: "#/components/schemas/EntitySlug"
|
|
2333
|
+
},
|
|
2334
|
+
_tags: {
|
|
2335
|
+
type: "array",
|
|
2336
|
+
items: {
|
|
2337
|
+
type: "string"
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
required: ["entity_id"]
|
|
2342
|
+
},
|
|
2343
|
+
PublicLink: {
|
|
2344
|
+
type: "object",
|
|
2345
|
+
properties: {
|
|
2346
|
+
id: {
|
|
2347
|
+
type: "string",
|
|
2348
|
+
description: "ID of the public link",
|
|
2349
|
+
example: "3ef5c6d9-818d-45e6-8efb-b1de59079a1c"
|
|
2350
|
+
},
|
|
2351
|
+
link: {
|
|
2352
|
+
type: "string",
|
|
2353
|
+
description: "Public link of the file",
|
|
2354
|
+
example: "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c"
|
|
2355
|
+
},
|
|
2356
|
+
last_accessed_at: {
|
|
2357
|
+
type: "string",
|
|
2358
|
+
description: "The most recent timestamp when the file was accessed"
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
BaseEntityOwner: {
|
|
2363
|
+
description: "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
|
|
2364
|
+
type: "object",
|
|
2365
|
+
properties: {
|
|
2366
|
+
org_id: {
|
|
2367
|
+
type: "string",
|
|
2368
|
+
example: "123"
|
|
2369
|
+
},
|
|
2370
|
+
user_id: {
|
|
2371
|
+
type: "string",
|
|
2372
|
+
example: "123"
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
required: ["org_id"]
|
|
2376
|
+
},
|
|
2377
|
+
BaseEntityAcl: {
|
|
2378
|
+
type: "object",
|
|
2379
|
+
description: "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
|
|
2380
|
+
properties: {
|
|
2381
|
+
view: {
|
|
2382
|
+
type: "array",
|
|
2383
|
+
items: {
|
|
2384
|
+
type: "string",
|
|
2385
|
+
example: "org:456"
|
|
2386
|
+
}
|
|
2387
|
+
},
|
|
2388
|
+
edit: {
|
|
2389
|
+
type: "array",
|
|
2390
|
+
items: {
|
|
2391
|
+
type: "string",
|
|
2392
|
+
example: "org:456"
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
delete: {
|
|
2396
|
+
type: "array",
|
|
2397
|
+
items: {
|
|
2398
|
+
type: "string",
|
|
2399
|
+
example: "org:456"
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
},
|
|
2404
|
+
ErrorObject: {
|
|
2405
|
+
description: "A generic error returned by the API",
|
|
2406
|
+
type: "object",
|
|
2407
|
+
properties: {
|
|
2408
|
+
status: {
|
|
2409
|
+
type: "integer",
|
|
2410
|
+
description: "The HTTP status code of the error",
|
|
2411
|
+
example: 400
|
|
2412
|
+
},
|
|
2413
|
+
error: {
|
|
2414
|
+
type: "string",
|
|
2415
|
+
description: "The error message",
|
|
2416
|
+
example: "Bad Request"
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2420
|
+
FileCollectionId: {
|
|
2421
|
+
description: "Generated uuid for a file collection",
|
|
2422
|
+
type: "string",
|
|
2423
|
+
format: "uuid"
|
|
2424
|
+
},
|
|
2425
|
+
FileCollectionItem: {
|
|
2426
|
+
description: "A file collection with identifiers and timestamps",
|
|
2427
|
+
type: "object",
|
|
2428
|
+
properties: {
|
|
2429
|
+
slug: {
|
|
2430
|
+
type: "string",
|
|
2431
|
+
description: "Full slug for the collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}:{collection_name}`\n Example: `_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents`\n- Global collection: `_system_files_collection_schema_{schema_slug}:{collection_name}`\n Example: `_system_files_collection_schema_opportunity:templates`\n",
|
|
2432
|
+
example: "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents"
|
|
2433
|
+
},
|
|
2434
|
+
name: {
|
|
2435
|
+
type: "string",
|
|
2436
|
+
description: "Display name of the collection",
|
|
2437
|
+
example: "Documents"
|
|
2438
|
+
},
|
|
2439
|
+
id: {
|
|
2440
|
+
$ref: "#/components/schemas/FileCollectionId"
|
|
2441
|
+
},
|
|
2442
|
+
parents: {
|
|
2443
|
+
type: "array",
|
|
2444
|
+
description: 'Array of parent collection slugs, empty array if top-level collection. Format depends on collection type:\n- User collection: `_system_files_collection_{entity_uuid}_{user_id}`\n Example: `["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"]`\n- Global collection: `_system_files_collection_schema_{schema_slug}`\n Example: `["_system_files_collection_schema_opportunity"]`\n',
|
|
2445
|
+
items: {
|
|
2446
|
+
type: "string"
|
|
2447
|
+
},
|
|
2448
|
+
example: ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"]
|
|
2449
|
+
},
|
|
2450
|
+
starred: {
|
|
2451
|
+
type: "boolean",
|
|
2452
|
+
description: "Whether the collection is starred / favorited",
|
|
2453
|
+
example: false
|
|
2454
|
+
},
|
|
2455
|
+
order: {
|
|
2456
|
+
type: "number",
|
|
2457
|
+
description: "Display order for the collection",
|
|
2458
|
+
example: 0
|
|
2459
|
+
},
|
|
2460
|
+
enabled_locations: {
|
|
2461
|
+
description: "List of location slugs where the collection is enabled. If empty, enabled for all.",
|
|
2462
|
+
type: "array",
|
|
2463
|
+
items: {
|
|
2464
|
+
type: "string"
|
|
2465
|
+
}
|
|
2466
|
+
},
|
|
2467
|
+
enabled_purposes: {
|
|
2468
|
+
description: "List of purpose slugs where the collection is enabled. If empty, enabled for all.",
|
|
2469
|
+
type: "array",
|
|
2470
|
+
items: {
|
|
2471
|
+
type: "string"
|
|
2472
|
+
},
|
|
2473
|
+
example: ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"]
|
|
2474
|
+
},
|
|
2475
|
+
created_at: {
|
|
2476
|
+
type: "string",
|
|
2477
|
+
format: "date-time",
|
|
2478
|
+
description: "Timestamp when the collection was created",
|
|
2479
|
+
example: "2024-01-01T12:00:00Z"
|
|
2480
|
+
},
|
|
2481
|
+
updated_at: {
|
|
2482
|
+
type: "string",
|
|
2483
|
+
format: "date-time",
|
|
2484
|
+
description: "Timestamp when the collection was last updated",
|
|
2485
|
+
example: "2024-01-02T12:00:00Z"
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
required: ["name"]
|
|
2489
|
+
},
|
|
2490
|
+
FileCollectionAttributes: {
|
|
2491
|
+
type: "object",
|
|
2492
|
+
properties: {
|
|
2493
|
+
name: {
|
|
2494
|
+
type: "string",
|
|
2495
|
+
description: "Name of the collection"
|
|
2496
|
+
},
|
|
2497
|
+
parents: {
|
|
2498
|
+
type: "array",
|
|
2499
|
+
description: "Array of parent collection slugs, empty array if top-level collection",
|
|
2500
|
+
items: {
|
|
2501
|
+
type: "string"
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2504
|
+
starred: {
|
|
2505
|
+
type: "boolean",
|
|
2506
|
+
description: "Whether the collection is starred / favorited",
|
|
2507
|
+
default: false
|
|
2508
|
+
},
|
|
2509
|
+
enabled_locations: {
|
|
2510
|
+
description: "List of location slugs where the collection is enabled. If empty, enabled for all.",
|
|
2511
|
+
type: "array",
|
|
2512
|
+
items: {
|
|
2513
|
+
type: "string"
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
enabled_purposes: {
|
|
2517
|
+
description: "List of purpose IDs where the collection is enabled. If empty, enabled for all.",
|
|
2518
|
+
type: "array",
|
|
2519
|
+
items: {
|
|
2520
|
+
type: "string"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
},
|
|
2525
|
+
FileCollectionCreateRequest: {
|
|
2526
|
+
description: "Request body for creating a file collection",
|
|
2527
|
+
allOf: [
|
|
2528
|
+
{
|
|
2529
|
+
$ref: "#/components/schemas/FileCollectionAttributes"
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
type: "object",
|
|
2533
|
+
required: ["name"]
|
|
2534
|
+
}
|
|
2535
|
+
]
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
parameters: {
|
|
2539
|
+
EntityIdPathParam: {
|
|
2540
|
+
name: "id",
|
|
2541
|
+
description: "Entity id",
|
|
2542
|
+
in: "path",
|
|
2543
|
+
required: true,
|
|
2544
|
+
schema: {
|
|
2545
|
+
$ref: "#/components/schemas/EntityId"
|
|
2546
|
+
}
|
|
2547
|
+
},
|
|
2548
|
+
StrictQueryParam: {
|
|
2549
|
+
name: "strict",
|
|
2550
|
+
in: "query",
|
|
2551
|
+
required: false,
|
|
2552
|
+
description: "When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional`",
|
|
2553
|
+
schema: {
|
|
2554
|
+
type: "boolean",
|
|
2555
|
+
default: false
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
ActivityIdQueryParam: {
|
|
2559
|
+
name: "activity_id",
|
|
2560
|
+
description: "Activity to include in event feed",
|
|
2561
|
+
in: "query",
|
|
2562
|
+
required: false,
|
|
2563
|
+
schema: {
|
|
2564
|
+
$ref: "#/components/schemas/ActivityId"
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
FillActivityQueryParam: {
|
|
2568
|
+
name: "fill_activity",
|
|
2569
|
+
description: "Update the diff and entity for the custom activity included in the query.\nPending state on activity is automatically ended when activity is filled.\n",
|
|
2570
|
+
in: "query",
|
|
2571
|
+
required: false,
|
|
2572
|
+
schema: {
|
|
2573
|
+
type: "boolean",
|
|
2574
|
+
default: false
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
AsyncOperationQueryParam: {
|
|
2578
|
+
name: "async",
|
|
2579
|
+
description: "Don't wait for updated entity to become available in Search API. Useful for large migrations",
|
|
2580
|
+
in: "query",
|
|
2581
|
+
required: false,
|
|
2582
|
+
schema: {
|
|
2583
|
+
type: "boolean",
|
|
2584
|
+
default: false
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
DeleteTempFileQueryParam: {
|
|
2588
|
+
name: "delete_temp_file",
|
|
2589
|
+
description: "Delete the temp file from S3 after copying it permanently",
|
|
2590
|
+
in: "query",
|
|
2591
|
+
required: false,
|
|
2592
|
+
schema: {
|
|
2593
|
+
type: "boolean",
|
|
2594
|
+
default: true
|
|
2595
|
+
}
|
|
2596
|
+
},
|
|
2597
|
+
VersionOnlyQueryParam: {
|
|
2598
|
+
name: "version_only",
|
|
2599
|
+
in: "query",
|
|
2600
|
+
description: "When true, only adds a new file version and updates the entity's\ns3ref to point to the new version, without overwriting the entity's\nexisting top-level metadata. The entity's filename, type, and other\nfields are preserved as-is. The new version entry in the versions\narray will contain the file-level metadata (filename, mime_type, etc).\nOnly applies when updating an existing entity (_id or file_entity_id is set).\n",
|
|
2601
|
+
required: false,
|
|
2602
|
+
schema: {
|
|
2603
|
+
type: "boolean",
|
|
2604
|
+
default: false
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
responses: {
|
|
2609
|
+
BadRequestError: {
|
|
2610
|
+
description: "Invalid request parameters or payload",
|
|
2611
|
+
content: {
|
|
2612
|
+
"application/json": {
|
|
2613
|
+
schema: {
|
|
2614
|
+
allOf: [
|
|
2615
|
+
{
|
|
2616
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
example: {
|
|
2620
|
+
status: 400,
|
|
2621
|
+
error: "Bad Request: filename is required"
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
]
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
UnauthorizedError: {
|
|
2630
|
+
description: "Authentication required or invalid credentials",
|
|
2631
|
+
content: {
|
|
2632
|
+
"application/json": {
|
|
2633
|
+
schema: {
|
|
2634
|
+
allOf: [
|
|
2635
|
+
{
|
|
2636
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
example: {
|
|
2640
|
+
status: 401,
|
|
2641
|
+
error: "Unauthorized: Invalid or expired token"
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
]
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
},
|
|
2649
|
+
ForbiddenError: {
|
|
2650
|
+
description: "Insufficient permissions to access the resource",
|
|
2651
|
+
content: {
|
|
2652
|
+
"application/json": {
|
|
2653
|
+
schema: {
|
|
2654
|
+
allOf: [
|
|
2655
|
+
{
|
|
2656
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
example: {
|
|
2660
|
+
status: 403,
|
|
2661
|
+
error: "Forbidden: You do not have permission to access this file"
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
]
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
},
|
|
2669
|
+
NotFoundError: {
|
|
2670
|
+
description: "The requested resource was not found",
|
|
2671
|
+
content: {
|
|
2672
|
+
"application/json": {
|
|
2673
|
+
schema: {
|
|
2674
|
+
allOf: [
|
|
2675
|
+
{
|
|
2676
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
example: {
|
|
2680
|
+
status: 404,
|
|
2681
|
+
error: "Not Found: File entity not found"
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
]
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
},
|
|
2689
|
+
InternalServerError: {
|
|
2690
|
+
description: "An unexpected error occurred on the server",
|
|
2691
|
+
content: {
|
|
2692
|
+
"application/json": {
|
|
2693
|
+
schema: {
|
|
2694
|
+
allOf: [
|
|
2695
|
+
{
|
|
2696
|
+
$ref: "#/components/schemas/ErrorObject"
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
example: {
|
|
2700
|
+
status: 500,
|
|
2701
|
+
error: "Internal Server Error"
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
]
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
};
|
|
2711
|
+
var servers = [
|
|
2712
|
+
{
|
|
2713
|
+
url: "https://file.sls.epilot.io"
|
|
2714
|
+
}
|
|
2715
|
+
];
|
|
2716
|
+
var file_default = {
|
|
2717
|
+
openapi,
|
|
2718
|
+
info,
|
|
2719
|
+
tags,
|
|
2720
|
+
"x-tagGroups": [
|
|
2721
|
+
{
|
|
2722
|
+
name: "APIs",
|
|
2723
|
+
tags: ["File", "Preview", "Public Links", "Session", "File Collections", "Deprecated"]
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
name: "Schemas",
|
|
2727
|
+
tags: ["file_schema"]
|
|
2728
|
+
}
|
|
2729
|
+
],
|
|
2730
|
+
security,
|
|
2731
|
+
paths,
|
|
2732
|
+
components,
|
|
2733
|
+
servers
|
|
2734
|
+
};
|
|
2735
|
+
export {
|
|
2736
|
+
components,
|
|
2737
|
+
file_default as default,
|
|
2738
|
+
info,
|
|
2739
|
+
openapi,
|
|
2740
|
+
paths,
|
|
2741
|
+
security,
|
|
2742
|
+
servers,
|
|
2743
|
+
tags
|
|
2744
|
+
};
|