@epilot/sdk 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +492 -7
- package/definitions/email-settings-runtime.json +1 -1
- package/definitions/email-settings.json +86 -4
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +262 -4
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- 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 +2 -2
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- 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 +2 -2
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- 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 +2 -2
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/chunk-3APTSPY4.js +14 -0
- package/dist/chunk-KCPVNRDL.js +14 -0
- package/dist/chunk-KJPOUJBU.cjs +14 -0
- package/dist/chunk-OPXGJKZR.cjs +14 -0
- package/dist/chunk-PTEJYAYJ.js +14 -0
- package/dist/{chunk-35CN2YFK.cjs → chunk-R7XDTILZ.cjs} +6 -6
- package/dist/{chunk-JB7LITSP.js → chunk-SCMAZ73K.js} +6 -6
- package/dist/chunk-YI5YGTAH.cjs +14 -0
- package/dist/customer-portal-7HYSBH7H.cjs +7 -0
- package/dist/customer-portal-X4LJX6AU.js +7 -0
- package/dist/{customer-portal-runtime-OEXTSMSE.cjs → customer-portal-runtime-IYHJ3RME.cjs} +2 -2
- package/dist/{customer-portal-runtime-N4NWQ67M.js → customer-portal-runtime-ZYU3WIXY.js} +1 -1
- package/dist/{customer-portal.d-ChSEioI5.d.cts → customer-portal.d-C7ZCbjiY.d.cts} +605 -11
- package/dist/{customer-portal.d-ChSEioI5.d.ts → customer-portal.d-C7ZCbjiY.d.ts} +605 -11
- package/dist/email-settings-YJ4X5VFU.cjs +7 -0
- package/dist/email-settings-YUK3DXFJ.js +7 -0
- package/dist/{email-settings-runtime-EGIJ2AVQ.js → email-settings-runtime-BXRZV4M5.js} +1 -1
- package/dist/{email-settings-runtime-WGVLI7N6.cjs → email-settings-runtime-FWJQBQBK.cjs} +2 -2
- package/dist/{email-settings.d-B7Q_xT25.d.cts → email-settings.d-UJ0C3jPI.d.cts} +108 -9
- package/dist/{email-settings.d-B7Q_xT25.d.ts → email-settings.d-UJ0C3jPI.d.ts} +108 -9
- package/dist/file-P2FUUER2.js +7 -0
- package/dist/file-XTY74SIX.cjs +7 -0
- package/dist/file-runtime-24S3QPA7.cjs +5 -0
- package/dist/{file-runtime-B6AAGZQF.js → file-runtime-BIRMXYRH.js} +1 -1
- package/dist/{file.d-DcTJxjp7.d.cts → file.d-DTlrbI40.d.cts} +2336 -19
- package/dist/{file.d-DcTJxjp7.d.ts → file.d-DTlrbI40.d.ts} +2336 -19
- package/dist/index.cjs +14 -14
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/{js-yaml-DLCVPJ7G.js → js-yaml-UPZKYVRY.js} +15 -17
- package/docs/customer-portal.md +417 -51
- package/docs/email-settings.md +67 -3
- package/docs/file.md +101 -2
- package/package.json +1 -1
- package/dist/chunk-4W22EIRF.cjs +0 -14
- package/dist/chunk-5OBMZHRL.cjs +0 -14
- package/dist/chunk-E2WMGOM5.js +0 -14
- package/dist/chunk-EFWPEVXI.js +0 -14
- package/dist/chunk-KEI3GHDY.cjs +0 -14
- package/dist/chunk-Z6HGUGXK.js +0 -14
- package/dist/customer-portal-5I7ZGQDU.cjs +0 -7
- package/dist/customer-portal-YL2YMPZL.js +0 -7
- package/dist/email-settings-CKFJU4WZ.js +0 -7
- package/dist/email-settings-NQJJKS2P.cjs +0 -7
- package/dist/file-UOWBTDIU.cjs +0 -7
- package/dist/file-XSN3NAVZ.js +0 -7
- package/dist/file-runtime-SFZIKODF.cjs +0 -5
|
@@ -34,6 +34,22 @@ declare namespace Components {
|
|
|
34
34
|
export type UpdateSharedInboxSuccessResponse = /* Shared inbox configuration with all associated metadata. */ Schemas.SharedInboxResponse;
|
|
35
35
|
}
|
|
36
36
|
namespace Schemas {
|
|
37
|
+
/**
|
|
38
|
+
* Feature flags selecting which Microsoft Graph scopes to request.
|
|
39
|
+
* At least one flag must be true. Passing a superset of previously
|
|
40
|
+
* granted features triggers incremental consent for the delta only.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export interface ConnectOutlookRequest {
|
|
44
|
+
/**
|
|
45
|
+
* Request 'mail' specific scopes.
|
|
46
|
+
*/
|
|
47
|
+
mail?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Request 'calendar' specific scopes.
|
|
50
|
+
*/
|
|
51
|
+
calendar?: boolean;
|
|
52
|
+
}
|
|
37
53
|
/**
|
|
38
54
|
* Mapping between an Outlook email and its Outlook Connection.
|
|
39
55
|
* This tracks which provider/tenant provisions each Outlook email.
|
|
@@ -340,14 +356,24 @@ declare namespace Components {
|
|
|
340
356
|
*/
|
|
341
357
|
status: "connected" | "expired" | "pending_auth" | "not_connected";
|
|
342
358
|
/**
|
|
343
|
-
* Action for UI to take (all call
|
|
359
|
+
* Action for UI to take (all call POST /outlook/connect):
|
|
344
360
|
* - connect: No connection, initiate OAuth
|
|
345
361
|
* - authorize: Admin consent done, complete OAuth
|
|
346
|
-
* - reconnect: Re-authenticate expired session
|
|
362
|
+
* - reconnect: Re-authenticate expired session or approve updated permissions
|
|
347
363
|
* - none: Fully connected, no action needed
|
|
348
364
|
*
|
|
349
365
|
*/
|
|
350
366
|
action: "connect" | "authorize" | "reconnect" | "none";
|
|
367
|
+
/**
|
|
368
|
+
* Discriminates the cause when `action` is `reconnect`:
|
|
369
|
+
* - expired: Stored tokens are no longer valid; user must re-authenticate
|
|
370
|
+
* - permission_update: Token is valid, but the granted scopes do not cover the
|
|
371
|
+
* scopes required by the configured Outlook integrations (currently `mail`).
|
|
372
|
+
* The user must reconnect to grant the additional permissions; Microsoft's
|
|
373
|
+
* incremental-consent flow will only prompt for the delta.
|
|
374
|
+
*
|
|
375
|
+
*/
|
|
376
|
+
action_reason?: "expired" | "permission_update";
|
|
351
377
|
/**
|
|
352
378
|
* Display name of user who connected
|
|
353
379
|
*/
|
|
@@ -787,10 +813,18 @@ declare namespace Paths {
|
|
|
787
813
|
}
|
|
788
814
|
}
|
|
789
815
|
namespace ConnectOutlook {
|
|
816
|
+
export type RequestBody = /**
|
|
817
|
+
* Feature flags selecting which Microsoft Graph scopes to request.
|
|
818
|
+
* At least one flag must be true. Passing a superset of previously
|
|
819
|
+
* granted features triggers incremental consent for the delta only.
|
|
820
|
+
*
|
|
821
|
+
*/
|
|
822
|
+
Components.Schemas.ConnectOutlookRequest;
|
|
790
823
|
namespace Responses {
|
|
791
824
|
export interface $200 {
|
|
792
|
-
authorization_url
|
|
825
|
+
authorization_url: string;
|
|
793
826
|
}
|
|
827
|
+
export type $400 = Components.Responses.OutlookErrorResponse;
|
|
794
828
|
export type $403 = Components.Responses.OutlookErrorResponse;
|
|
795
829
|
}
|
|
796
830
|
}
|
|
@@ -1312,6 +1346,14 @@ declare namespace Paths {
|
|
|
1312
1346
|
export type $500 = Components.Responses.InternalServerError;
|
|
1313
1347
|
}
|
|
1314
1348
|
}
|
|
1349
|
+
namespace VerifyDnsRecords {
|
|
1350
|
+
export type RequestBody = /* Custom email domain configuration. */ Components.Schemas.Domain;
|
|
1351
|
+
namespace Responses {
|
|
1352
|
+
export type $200 = Components.Schemas.SettingsResponse;
|
|
1353
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1354
|
+
export type $404 = Components.Responses.NotFound;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1315
1357
|
namespace VerifyDomain {
|
|
1316
1358
|
export type RequestBody = /* Custom email domain configuration. */ Components.Schemas.Domain;
|
|
1317
1359
|
namespace Responses {
|
|
@@ -1330,6 +1372,7 @@ declare namespace Paths {
|
|
|
1330
1372
|
}
|
|
1331
1373
|
}
|
|
1332
1374
|
|
|
1375
|
+
|
|
1333
1376
|
interface OperationMethods {
|
|
1334
1377
|
/**
|
|
1335
1378
|
* provisionEpilotEmailAddress - provisionEpilotEmailAddress
|
|
@@ -1529,11 +1572,18 @@ interface OperationMethods {
|
|
|
1529
1572
|
/**
|
|
1530
1573
|
* connectOutlook - connectOutlook
|
|
1531
1574
|
*
|
|
1532
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
1575
|
+
* Returns the Microsoft authorization URL for Outlook OAuth.
|
|
1576
|
+
*
|
|
1577
|
+
* The request body selects which features to request scopes for. Feature
|
|
1578
|
+
* flags are additive; Microsoft OAuth scopes are cumulative. Calling this
|
|
1579
|
+
* endpoint again with a superset of features (e.g. `mail` already connected,
|
|
1580
|
+
* and `calendar` added) triggers Microsoft's incremental-consent flow —
|
|
1581
|
+
* the user only sees a consent prompt for the new scopes.
|
|
1582
|
+
*
|
|
1533
1583
|
*/
|
|
1534
1584
|
'connectOutlook'(
|
|
1535
1585
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1536
|
-
data?:
|
|
1586
|
+
data?: Paths.ConnectOutlook.RequestBody,
|
|
1537
1587
|
config?: AxiosRequestConfig
|
|
1538
1588
|
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
1539
1589
|
/**
|
|
@@ -1805,12 +1855,31 @@ interface OperationMethods {
|
|
|
1805
1855
|
*
|
|
1806
1856
|
* Run this verification after configuring NS records in your DNS provider.
|
|
1807
1857
|
*
|
|
1858
|
+
* **Deprecated**: Use `/domain/dns-records:verify` for new integrations.
|
|
1859
|
+
*
|
|
1808
1860
|
*/
|
|
1809
1861
|
'verifyNameServers'(
|
|
1810
1862
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1811
1863
|
data?: Paths.VerifyNameServers.RequestBody,
|
|
1812
1864
|
config?: AxiosRequestConfig
|
|
1813
1865
|
): OperationResponse<Paths.VerifyNameServers.Responses.$200>
|
|
1866
|
+
/**
|
|
1867
|
+
* verifyDnsRecords - verifyDnsRecords
|
|
1868
|
+
*
|
|
1869
|
+
* Verifies that the domain's DNS records (MX, TXT, CNAME) are correctly configured
|
|
1870
|
+
* in the customer's DNS provider.
|
|
1871
|
+
*
|
|
1872
|
+
* This check performs DNS lookups to confirm each required record is present
|
|
1873
|
+
* before proceeding with full domain identity verification.
|
|
1874
|
+
*
|
|
1875
|
+
* Run this verification after configuring all DNS records in your DNS provider.
|
|
1876
|
+
*
|
|
1877
|
+
*/
|
|
1878
|
+
'verifyDnsRecords'(
|
|
1879
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1880
|
+
data?: Paths.VerifyDnsRecords.RequestBody,
|
|
1881
|
+
config?: AxiosRequestConfig
|
|
1882
|
+
): OperationResponse<Paths.VerifyDnsRecords.Responses.$200>
|
|
1814
1883
|
/**
|
|
1815
1884
|
* verifyDomain - verifyDomain
|
|
1816
1885
|
*
|
|
@@ -2046,11 +2115,18 @@ interface PathsDictionary {
|
|
|
2046
2115
|
/**
|
|
2047
2116
|
* connectOutlook - connectOutlook
|
|
2048
2117
|
*
|
|
2049
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
2118
|
+
* Returns the Microsoft authorization URL for Outlook OAuth.
|
|
2119
|
+
*
|
|
2120
|
+
* The request body selects which features to request scopes for. Feature
|
|
2121
|
+
* flags are additive; Microsoft OAuth scopes are cumulative. Calling this
|
|
2122
|
+
* endpoint again with a superset of features (e.g. `mail` already connected,
|
|
2123
|
+
* and `calendar` added) triggers Microsoft's incremental-consent flow —
|
|
2124
|
+
* the user only sees a consent prompt for the new scopes.
|
|
2125
|
+
*
|
|
2050
2126
|
*/
|
|
2051
|
-
'
|
|
2127
|
+
'post'(
|
|
2052
2128
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2053
|
-
data?:
|
|
2129
|
+
data?: Paths.ConnectOutlook.RequestBody,
|
|
2054
2130
|
config?: AxiosRequestConfig
|
|
2055
2131
|
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
2056
2132
|
}
|
|
@@ -2354,6 +2430,8 @@ interface PathsDictionary {
|
|
|
2354
2430
|
*
|
|
2355
2431
|
* Run this verification after configuring NS records in your DNS provider.
|
|
2356
2432
|
*
|
|
2433
|
+
* **Deprecated**: Use `/domain/dns-records:verify` for new integrations.
|
|
2434
|
+
*
|
|
2357
2435
|
*/
|
|
2358
2436
|
'post'(
|
|
2359
2437
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -2361,6 +2439,25 @@ interface PathsDictionary {
|
|
|
2361
2439
|
config?: AxiosRequestConfig
|
|
2362
2440
|
): OperationResponse<Paths.VerifyNameServers.Responses.$200>
|
|
2363
2441
|
}
|
|
2442
|
+
['/v1/email-settings/domain/dns-records:verify']: {
|
|
2443
|
+
/**
|
|
2444
|
+
* verifyDnsRecords - verifyDnsRecords
|
|
2445
|
+
*
|
|
2446
|
+
* Verifies that the domain's DNS records (MX, TXT, CNAME) are correctly configured
|
|
2447
|
+
* in the customer's DNS provider.
|
|
2448
|
+
*
|
|
2449
|
+
* This check performs DNS lookups to confirm each required record is present
|
|
2450
|
+
* before proceeding with full domain identity verification.
|
|
2451
|
+
*
|
|
2452
|
+
* Run this verification after configuring all DNS records in your DNS provider.
|
|
2453
|
+
*
|
|
2454
|
+
*/
|
|
2455
|
+
'post'(
|
|
2456
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2457
|
+
data?: Paths.VerifyDnsRecords.RequestBody,
|
|
2458
|
+
config?: AxiosRequestConfig
|
|
2459
|
+
): OperationResponse<Paths.VerifyDnsRecords.Responses.$200>
|
|
2460
|
+
}
|
|
2364
2461
|
['/v1/email-settings/domain:verify']: {
|
|
2365
2462
|
/**
|
|
2366
2463
|
* verifyDomain - verifyDomain
|
|
@@ -2386,6 +2483,8 @@ interface PathsDictionary {
|
|
|
2386
2483
|
|
|
2387
2484
|
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
2388
2485
|
|
|
2486
|
+
|
|
2487
|
+
type ConnectOutlookRequest = Components.Schemas.ConnectOutlookRequest;
|
|
2389
2488
|
type ConnectedOutlookEmail = Components.Schemas.ConnectedOutlookEmail;
|
|
2390
2489
|
type CreateEmailAddressPayload = Components.Schemas.CreateEmailAddressPayload;
|
|
2391
2490
|
type CreateSharedInboxPayload = Components.Schemas.CreateSharedInboxPayload;
|
|
@@ -2414,4 +2513,4 @@ type UpdateEmailAddressPayload = Components.Schemas.UpdateEmailAddressPayload;
|
|
|
2414
2513
|
type UpdateSharedInboxPayload = Components.Schemas.UpdateSharedInboxPayload;
|
|
2415
2514
|
type WhitelistEmailAddressSetting = Components.Schemas.WhitelistEmailAddressSetting;
|
|
2416
2515
|
|
|
2417
|
-
export { type Client as C, type Domain as D, type EmailAddressResponse as E, type InboxBucketResponse as I, type MailboxSyncFolderStatuses as M, type OperationMethods as O, Paths as P, type RestrictDuplicatesWithinSetting as R, type SetEmailAddressPrimaryPayload as S, type UpdateEmailAddressPayload as U, type WhitelistEmailAddressSetting as W, Components as a, type PathsDictionary as b, type
|
|
2516
|
+
export { type Client as C, type Domain as D, type EmailAddressResponse as E, type InboxBucketResponse as I, type MailboxSyncFolderStatuses as M, type OperationMethods as O, Paths as P, type RestrictDuplicatesWithinSetting as R, type SetEmailAddressPrimaryPayload as S, type UpdateEmailAddressPayload as U, type WhitelistEmailAddressSetting as W, Components as a, type PathsDictionary as b, type ConnectOutlookRequest as c, type ConnectedOutlookEmail as d, type CreateEmailAddressPayload as e, type CreateSharedInboxPayload as f, type EmailAddressSetting as g, type EmailDomainSetting as h, type ErrorResponse as i, type MailboxSyncStatus as j, type MailboxSyncStatuses as k, type MailboxSyncTimeframePeriods as l, type OutlookConnectionError as m, type OutlookConnectionStatus as n, type ProvisionEpilotEmailAddressPayload as o, type Setting as p, type SettingMeta as q, type SettingType as r, type SettingsResponse as s, type SharedInboxResponse as t, type SignatureSetting as u, type UpdateSharedInboxPayload as v };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/file.json
|
|
4
|
+
var file_default = '# File API\n\n- **Base URL:** `https://file.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.file.uploadFileV2(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/file\'\n\nconst fileClient = getClient()\nauthorize(fileClient, () => \'<token>\')\nconst { data } = await fileClient.uploadFileV2(...)\n```\n\n## Operations\n\n**File**\n- [`uploadFileV2`](#uploadfilev2)\n- [`saveFileV2`](#savefilev2)\n- [`getFile`](#getfile)\n- [`deleteFile`](#deletefile)\n- [`downloadFile`](#downloadfile)\n- [`downloadS3File`](#downloads3file)\n- [`downloadFiles`](#downloadfiles)\n- [`createZipJob`](#createzipjob)\n- [`getZipJob`](#getzipjob)\n- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)\n- [`uploadFilePublic`](#uploadfilepublic)\n\n**Preview**\n- [`previewFile`](#previewfile)\n- [`previewS3File`](#previews3file)\n- [`previewS3FileGet`](#previews3fileget)\n- [`previewPublicFile`](#previewpublicfile)\n\n**Session**\n- [`getSession`](#getsession)\n- [`deleteSession`](#deletesession)\n\n**Public Links**\n- [`generatePublicLink`](#generatepubliclink)\n- [`listPublicLinksForFile`](#listpubliclinksforfile)\n- [`accessPublicLink`](#accesspubliclink)\n- [`revokePublicLink`](#revokepubliclink)\n\n**File Collections**\n- [`getUserSchemaFileCollections`](#getuserschemafilecollections)\n- [`createUserSchemaFileCollection`](#createuserschemafilecollection)\n- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)\n- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)\n- [`getFilesInCollection`](#getfilesincollection)\n- [`getGlobalFileCollections`](#getglobalfilecollections)\n\n**Schemas**\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`ActivityId`](#activityid)\n- [`FileEntityId`](#fileentityid)\n- [`FileAttributes`](#fileattributes)\n- [`FileType`](#filetype)\n- [`CustomDownloadUrl`](#customdownloadurl)\n- [`FileEntity`](#fileentity)\n- [`CommonSaveFilePayload`](#commonsavefilepayload)\n- [`SaveS3FilePayload`](#saves3filepayload)\n- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)\n- [`SaveCustomFilePayload`](#savecustomfilepayload)\n- [`SaveFilePayload`](#savefilepayload)\n- [`SaveFilePayloadV2`](#savefilepayloadv2)\n- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)\n- [`UploadFilePayload`](#uploadfilepayload)\n- [`FileUpload`](#fileupload)\n- [`DownloadFilesPayload`](#downloadfilespayload)\n- [`CreateZipJobPayload`](#createzipjobpayload)\n- [`ZipJob`](#zipjob)\n- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)\n- [`S3Reference`](#s3reference)\n- [`S3Ref`](#s3ref)\n- [`FileItem`](#fileitem)\n- [`FileRelationItem`](#filerelationitem)\n- [`PublicLink`](#publiclink)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`ErrorObject`](#errorobject)\n- [`FileCollectionId`](#filecollectionid)\n- [`FileCollectionItem`](#filecollectionitem)\n- [`FileCollectionAttributes`](#filecollectionattributes)\n- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)\n\n### `uploadFileV2`\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\n`POST /v2/files/upload`\n\n```ts\nconst { data } = await client.uploadFileV2(\n {\n file_entity_id: \'example\',\n },\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n}\n```\n\n</details>\n\n---\n\n### `saveFileV2`\n\nSaves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\n`POST /v2/files`\n\n```ts\nconst { data } = await client.saveFileV2(\n {\n activity_id: \'example\',\n fill_activity: true,\n strict: true,\n async: true,\n delete_temp_file: true,\n version_only: true,\n },\n {\n _id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n file_entity_id: \'string\',\n relations: [\n {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n _schema: \'contact\',\n _tags: [\'string\']\n }\n ],\n _tags: [\'tag1\', \'tag2\'],\n _purpose: [\'8d396871-95a0-4c9d-bb4d-9eda9c35776c\', \'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8\'],\n _manifest: [\'123e4567-e89b-12d3-a456-426614174000\'],\n filename: \'document.pdf\',\n type: \'document\',\n mime_type: \'application/pdf\',\n size_bytes: 1234,\n readable_size: \'1.2 MB\',\n access_control: \'private\',\n public_url: \'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf\',\n custom_download_url: \'https://some-api-url.com/download?file_id=123\',\n s3ref: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `getFile`\n\nGet a file entity by id\n\n`GET /v2/files/{id}`\n\n```ts\nconst { data } = await client.getFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n source_url: true,\n strict: true,\n async: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `deleteFile`\n\nDelete a file entity by id\n\n`DELETE /v2/files/{id}`\n\n```ts\nconst { data } = await client.deleteFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n purge: true,\n activity_id: \'example\',\n strict: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `downloadFile`\n\nGenerate a pre-signed download URL for a file.\n\n`GET /v1/files/{id}/download`\n\n```ts\nconst { data } = await client.downloadFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadS3File`\n\nGenerate a pre-signed download URL for a file using its S3 reference.\n\n`POST /v1/files:downloadS3`\n\n```ts\nconst { data } = await client.downloadS3File({\n s3_key: \'example\',\n s3_bucket: \'example\',\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadFiles`\n\nBulk generate pre-signed download URLs for multiple files in a single request.\n\n`POST /v1/files:downloadFiles`\n\n```ts\nconst { data } = await client.downloadFiles(\n null,\n [\n {\n id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n version: 0\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n]\n```\n\n</details>\n\n---\n\n### `createZipJob`\n\nCreate a background job to ZIP multiple files and send a download link via email.\n\n`POST /v1/files:zipJob`\n\n```ts\nconst { data } = await client.createZipJob(\n null,\n {},\n)\n```\n\n---\n\n### `getZipJob`\n\nGet the status of a ZIP job\n\n`GET /v1/files:zipJob/{job_id}`\n\n```ts\nconst { data } = await client.getZipJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "completed",\n "progress": {\n "total_files": 100,\n "downloaded_files": 75,\n "failed_files": 2\n },\n "result": {\n "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",\n "expires_at": "2024-01-02T12:00:00Z",\n "zip_size_bytes": 104857600\n },\n "error": "Failed to download file: access denied",\n "created_at": "2024-01-01T12:00:00Z",\n "created_by": "10234",\n "org_id": "123",\n "updated_at": "2024-01-01T12:05:00Z"\n}\n```\n\n</details>\n\n---\n\n### `previewFile`\n\nGenerate a thumbnail preview for a file entity.\n\n`GET /v1/files/{id}/preview`\n\n```ts\nconst { data } = await client.previewFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewS3File`\n\nGenerate a thumbnail preview from an S3 reference.\n\n`POST /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3File(\n {\n w: 1,\n h: 1,\n },\n {},\n)\n```\n\n---\n\n### `previewS3FileGet`\n\nGet a thumbnail preview from an S3 reference using query parameters.\n\n`GET /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3FileGet({\n key: \'example\',\n bucket: \'example\',\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewPublicFile`\n\nGenerate a thumbnail preview for a public file entity.\n\n`GET /v1/files/public/{id}/preview`\n\n```ts\nconst { data } = await client.previewPublicFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n org_id: \'example\',\n})\n```\n\n---\n\n### `getSession`\n\nStart a browser session by converting a Bearer token into a server-side cookie.\n\n`GET /v1/files/session`\n\n```ts\nconst { data } = await client.getSession()\n```\n\n---\n\n### `deleteSession`\n\nEnd a browser session by deleting the token cookie.\n\n`DELETE /v1/files/session`\n\n```ts\nconst { data } = await client.deleteSession()\n```\n\n---\n\n### `generatePublicLink`\n\nGenerate a public link to share a private file externally.\n\n`POST /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.generatePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n"string"\n```\n\n</details>\n\n---\n\n### `listPublicLinksForFile`\n\nFetches all public links previously generated for a file\n\n`GET /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.listPublicLinksForFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "last_accessed_at": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `accessPublicLink`\n\nAccess a file via its public link.\n\n`GET /v1/files/public/links/{id}/{filename}`\n\n```ts\nconst { data } = await client.accessPublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n filename: \'example\',\n hash: \'example\',\n})\n```\n\n---\n\n### `revokePublicLink`\n\nRevokes a given public link by ID\n\n`DELETE /v1/files/public/links/{id}`\n\n```ts\nconst { data } = await client.revokePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `verifyCustomDownloadUrl`\n\nVerify that a custom download URL is valid and has not expired.\n\n`POST /v1/files/download:verify`\n\n```ts\nconst { data } = await client.verifyCustomDownloadUrl(\n null,\n {\n custom_download_url: \'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": true\n}\n```\n\n</details>\n\n---\n\n### `uploadFilePublic`\n\nCreate a pre-signed S3 URL for uploading a file without authentication.\n\n`POST /v1/files/public/upload`\n\n```ts\nconst { data } = await client.uploadFilePublic(\n null,\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "error": "File entity not found"\n}\n```\n\n</details>\n\n---\n\n### `getUserSchemaFileCollections`\n\nGet all file collections for the current user within a specific schema.\n\n`GET /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.getUserSchemaFileCollections({\n slug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n### `createUserSchemaFileCollection`\n\nCreate a new file collection for the current user within a specific schema.\n\n`POST /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.createUserSchemaFileCollection(\n {\n slug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUserSchemaFileCollection`\n\nUpdate an existing file collection.\n\n`PUT /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.updateUserSchemaFileCollection(\n {\n slug: \'example\',\n collectionSlug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUserSchemaFileCollection`\n\nDelete a file collection.\n\n`DELETE /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.deleteUserSchemaFileCollection({\n slug: \'example\',\n collectionSlug: \'example\',\n})\n```\n\n---\n\n### `getFilesInCollection`\n\nGet all files within a specific collection for an entity.\n\n`GET /v1/entity/{id}/collections/{collectionSlug}/files`\n\n```ts\nconst { data } = await client.getFilesInCollection({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n collectionSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n }\n]\n```\n\n</details>\n\n---\n\n### `getGlobalFileCollections`\n\nGet all global file collections for a specific schema.\n\n`GET /v1/collections/{schemaSlug}`\n\n```ts\nconst { data } = await client.getGlobalFileCollections({\n schemaSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema\n\n```ts\ntype EntitySlug = string\n```\n\n### `ActivityId`\n\nSee https://github.com/ulid/spec\n\n```ts\ntype ActivityId = string // ulid\n```\n\n### `FileEntityId`\n\n```ts\ntype FileEntityId = string | string // uuid\n```\n\n### `FileAttributes`\n\n```ts\ntype FileAttributes = {\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `FileType`\n\n```ts\ntype FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n```\n\n### `CustomDownloadUrl`\n\nCustom external download url used for the file\n\n```ts\ntype CustomDownloadUrl = string // uri\n```\n\n### `FileEntity`\n\n```ts\ntype FileEntity = {\n _title: string\n _schema: "file"\n _org: string\n _id: string | string // uuid\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename: string\n type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string\n s3ref?: object\n versions: Array<{\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n }>\n _updated_at?: string // date-time\n _created_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n __additional?: Record<string, unknown>\n}\n```\n\n### `CommonSaveFilePayload`\n\n```ts\ntype CommonSaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n}\n```\n\n### `SaveS3FilePayload`\n\n```ts\ntype SaveS3FilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n}\n```\n\n### `SaveFileFromSourceURLPayload`\n\n```ts\ntype SaveFileFromSourceURLPayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n}\n```\n\n### `SaveCustomFilePayload`\n\n```ts\ntype SaveCustomFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayload`\n\n```ts\ntype SaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayloadV2`\n\n```ts\ntype SaveFilePayloadV2 = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `BatchSaveFileVersionPayload`\n\nPayload for batch version save. Only s3ref payloads are supported.\n\n```ts\ntype BatchSaveFileVersionPayload = {\n _id?: object\n file_entity_id?: string\n filename?: string\n mime_type?: string\n access_control?: "private" | "public-read"\n s3ref: unknown\n}\n```\n\n### `UploadFilePayload`\n\n```ts\ntype UploadFilePayload = {\n filename: string\n mime_type?: string\n index_tag?: string\n metadata?: Record<string, string>\n}\n```\n\n### `FileUpload`\n\n```ts\ntype FileUpload = {\n s3ref?: object\n upload_url?: string // url\n public_url?: string // url\n}\n```\n\n### `DownloadFilesPayload`\n\n```ts\ntype DownloadFilesPayload = Array<{\n id: string | string // uuid\n version?: number\n}>\n```\n\n### `CreateZipJobPayload`\n\nRequest payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n\n\n```ts\ntype CreateZipJobPayload = unknown | unknown\n```\n\n### `ZipJob`\n\nZIP job status and result\n\n```ts\ntype ZipJob = {\n job_id?: string // uuid\n status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"\n progress?: {\n total_files?: number\n downloaded_files?: number\n failed_files?: number\n }\n result?: {\n file_entity_id?: string // uuid\n download_url?: string // uri\n expires_at?: string // date-time\n zip_size_bytes?: number\n }\n error?: string\n created_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_at?: string // date-time\n}\n```\n\n### `VerifyCustomDownloadUrlPayload`\n\n```ts\ntype VerifyCustomDownloadUrlPayload = {\n custom_download_url: string\n}\n```\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `S3Ref`\n\n```ts\ntype S3Ref = {\n bucket: string\n key: string\n}\n```\n\n### `FileItem`\n\n```ts\ntype FileItem = {\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n}\n```\n\n### `FileRelationItem`\n\n```ts\ntype FileRelationItem = {\n entity_id: string\n _schema?: string\n _tags?: string[]\n}\n```\n\n### `PublicLink`\n\n```ts\ntype PublicLink = {\n id?: string\n link?: string\n last_accessed_at?: string\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `ErrorObject`\n\nA generic error returned by the API\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n\n### `FileCollectionId`\n\nGenerated uuid for a file collection\n\n```ts\ntype FileCollectionId = string // uuid\n```\n\n### `FileCollectionItem`\n\nA file collection with identifiers and timestamps\n\n```ts\ntype FileCollectionItem = {\n slug?: string\n name: string\n id?: string // uuid\n parents?: string[]\n starred?: boolean\n order?: number\n enabled_locations?: string[]\n enabled_purposes?: string[]\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `FileCollectionAttributes`\n\n```ts\ntype FileCollectionAttributes = {\n name?: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n\n### `FileCollectionCreateRequest`\n\nRequest body for creating a file collection\n\n```ts\ntype FileCollectionCreateRequest = {\n name: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
file_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/file.json
|
|
4
|
+
var file_default = '# File API\n\n- **Base URL:** `https://file.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.file.uploadFileV2(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/file\'\n\nconst fileClient = getClient()\nauthorize(fileClient, () => \'<token>\')\nconst { data } = await fileClient.uploadFileV2(...)\n```\n\n## Operations\n\n**File**\n- [`uploadFileV2`](#uploadfilev2)\n- [`saveFileV2`](#savefilev2)\n- [`getFile`](#getfile)\n- [`deleteFile`](#deletefile)\n- [`downloadFile`](#downloadfile)\n- [`downloadS3File`](#downloads3file)\n- [`downloadFiles`](#downloadfiles)\n- [`createZipJob`](#createzipjob)\n- [`getZipJob`](#getzipjob)\n- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)\n- [`uploadFilePublic`](#uploadfilepublic)\n\n**Preview**\n- [`previewFile`](#previewfile)\n- [`previewS3File`](#previews3file)\n- [`previewS3FileGet`](#previews3fileget)\n- [`previewPublicFile`](#previewpublicfile)\n\n**Session**\n- [`getSession`](#getsession)\n- [`deleteSession`](#deletesession)\n\n**Public Links**\n- [`generatePublicLink`](#generatepubliclink)\n- [`listPublicLinksForFile`](#listpubliclinksforfile)\n- [`accessPublicLink`](#accesspubliclink)\n- [`revokePublicLink`](#revokepubliclink)\n\n**File Collections**\n- [`getUserSchemaFileCollections`](#getuserschemafilecollections)\n- [`createUserSchemaFileCollection`](#createuserschemafilecollection)\n- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)\n- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)\n- [`getFilesInCollection`](#getfilesincollection)\n- [`getGlobalFileCollections`](#getglobalfilecollections)\n\n**Schemas**\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`ActivityId`](#activityid)\n- [`FileEntityId`](#fileentityid)\n- [`FileAttributes`](#fileattributes)\n- [`FileType`](#filetype)\n- [`CustomDownloadUrl`](#customdownloadurl)\n- [`FileEntity`](#fileentity)\n- [`CommonSaveFilePayload`](#commonsavefilepayload)\n- [`SaveS3FilePayload`](#saves3filepayload)\n- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)\n- [`SaveCustomFilePayload`](#savecustomfilepayload)\n- [`SaveFilePayload`](#savefilepayload)\n- [`SaveFilePayloadV2`](#savefilepayloadv2)\n- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)\n- [`UploadFilePayload`](#uploadfilepayload)\n- [`FileUpload`](#fileupload)\n- [`DownloadFilesPayload`](#downloadfilespayload)\n- [`CreateZipJobPayload`](#createzipjobpayload)\n- [`ZipJob`](#zipjob)\n- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)\n- [`S3Reference`](#s3reference)\n- [`S3Ref`](#s3ref)\n- [`FileItem`](#fileitem)\n- [`FileRelationItem`](#filerelationitem)\n- [`PublicLink`](#publiclink)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`ErrorObject`](#errorobject)\n- [`FileCollectionId`](#filecollectionid)\n- [`FileCollectionItem`](#filecollectionitem)\n- [`FileCollectionAttributes`](#filecollectionattributes)\n- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)\n\n### `uploadFileV2`\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\n`POST /v2/files/upload`\n\n```ts\nconst { data } = await client.uploadFileV2(\n {\n file_entity_id: \'example\',\n },\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n}\n```\n\n</details>\n\n---\n\n### `saveFileV2`\n\nSaves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\n`POST /v2/files`\n\n```ts\nconst { data } = await client.saveFileV2(\n {\n activity_id: \'example\',\n fill_activity: true,\n strict: true,\n async: true,\n delete_temp_file: true,\n version_only: true,\n },\n {\n _id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n file_entity_id: \'string\',\n relations: [\n {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n _schema: \'contact\',\n _tags: [\'string\']\n }\n ],\n _tags: [\'tag1\', \'tag2\'],\n _purpose: [\'8d396871-95a0-4c9d-bb4d-9eda9c35776c\', \'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8\'],\n _manifest: [\'123e4567-e89b-12d3-a456-426614174000\'],\n filename: \'document.pdf\',\n type: \'document\',\n mime_type: \'application/pdf\',\n size_bytes: 1234,\n readable_size: \'1.2 MB\',\n access_control: \'private\',\n public_url: \'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf\',\n custom_download_url: \'https://some-api-url.com/download?file_id=123\',\n s3ref: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `getFile`\n\nGet a file entity by id\n\n`GET /v2/files/{id}`\n\n```ts\nconst { data } = await client.getFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n source_url: true,\n strict: true,\n async: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `deleteFile`\n\nDelete a file entity by id\n\n`DELETE /v2/files/{id}`\n\n```ts\nconst { data } = await client.deleteFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n purge: true,\n activity_id: \'example\',\n strict: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `downloadFile`\n\nGenerate a pre-signed download URL for a file.\n\n`GET /v1/files/{id}/download`\n\n```ts\nconst { data } = await client.downloadFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadS3File`\n\nGenerate a pre-signed download URL for a file using its S3 reference.\n\n`POST /v1/files:downloadS3`\n\n```ts\nconst { data } = await client.downloadS3File({\n s3_key: \'example\',\n s3_bucket: \'example\',\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadFiles`\n\nBulk generate pre-signed download URLs for multiple files in a single request.\n\n`POST /v1/files:downloadFiles`\n\n```ts\nconst { data } = await client.downloadFiles(\n null,\n [\n {\n id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n version: 0\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n]\n```\n\n</details>\n\n---\n\n### `createZipJob`\n\nCreate a background job to ZIP multiple files and send a download link via email.\n\n`POST /v1/files:zipJob`\n\n```ts\nconst { data } = await client.createZipJob(\n null,\n {},\n)\n```\n\n---\n\n### `getZipJob`\n\nGet the status of a ZIP job\n\n`GET /v1/files:zipJob/{job_id}`\n\n```ts\nconst { data } = await client.getZipJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "completed",\n "progress": {\n "total_files": 100,\n "downloaded_files": 75,\n "failed_files": 2\n },\n "result": {\n "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",\n "expires_at": "2024-01-02T12:00:00Z",\n "zip_size_bytes": 104857600\n },\n "error": "Failed to download file: access denied",\n "created_at": "2024-01-01T12:00:00Z",\n "created_by": "10234",\n "org_id": "123",\n "updated_at": "2024-01-01T12:05:00Z"\n}\n```\n\n</details>\n\n---\n\n### `previewFile`\n\nGenerate a thumbnail preview for a file entity.\n\n`GET /v1/files/{id}/preview`\n\n```ts\nconst { data } = await client.previewFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewS3File`\n\nGenerate a thumbnail preview from an S3 reference.\n\n`POST /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3File(\n {\n w: 1,\n h: 1,\n },\n {},\n)\n```\n\n---\n\n### `previewS3FileGet`\n\nGet a thumbnail preview from an S3 reference using query parameters.\n\n`GET /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3FileGet({\n key: \'example\',\n bucket: \'example\',\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewPublicFile`\n\nGenerate a thumbnail preview for a public file entity.\n\n`GET /v1/files/public/{id}/preview`\n\n```ts\nconst { data } = await client.previewPublicFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n org_id: \'example\',\n})\n```\n\n---\n\n### `getSession`\n\nStart a browser session by converting a Bearer token into a server-side cookie.\n\n`GET /v1/files/session`\n\n```ts\nconst { data } = await client.getSession()\n```\n\n---\n\n### `deleteSession`\n\nEnd a browser session by deleting the token cookie.\n\n`DELETE /v1/files/session`\n\n```ts\nconst { data } = await client.deleteSession()\n```\n\n---\n\n### `generatePublicLink`\n\nGenerate a public link to share a private file externally.\n\n`POST /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.generatePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n"string"\n```\n\n</details>\n\n---\n\n### `listPublicLinksForFile`\n\nFetches all public links previously generated for a file\n\n`GET /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.listPublicLinksForFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "last_accessed_at": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `accessPublicLink`\n\nAccess a file via its public link.\n\n`GET /v1/files/public/links/{id}/{filename}`\n\n```ts\nconst { data } = await client.accessPublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n filename: \'example\',\n hash: \'example\',\n})\n```\n\n---\n\n### `revokePublicLink`\n\nRevokes a given public link by ID\n\n`DELETE /v1/files/public/links/{id}`\n\n```ts\nconst { data } = await client.revokePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `verifyCustomDownloadUrl`\n\nVerify that a custom download URL is valid and has not expired.\n\n`POST /v1/files/download:verify`\n\n```ts\nconst { data } = await client.verifyCustomDownloadUrl(\n null,\n {\n custom_download_url: \'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": true\n}\n```\n\n</details>\n\n---\n\n### `uploadFilePublic`\n\nCreate a pre-signed S3 URL for uploading a file without authentication.\n\n`POST /v1/files/public/upload`\n\n```ts\nconst { data } = await client.uploadFilePublic(\n null,\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "error": "File entity not found"\n}\n```\n\n</details>\n\n---\n\n### `getUserSchemaFileCollections`\n\nGet all file collections for the current user within a specific schema.\n\n`GET /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.getUserSchemaFileCollections({\n slug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n### `createUserSchemaFileCollection`\n\nCreate a new file collection for the current user within a specific schema.\n\n`POST /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.createUserSchemaFileCollection(\n {\n slug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUserSchemaFileCollection`\n\nUpdate an existing file collection.\n\n`PUT /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.updateUserSchemaFileCollection(\n {\n slug: \'example\',\n collectionSlug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUserSchemaFileCollection`\n\nDelete a file collection.\n\n`DELETE /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.deleteUserSchemaFileCollection({\n slug: \'example\',\n collectionSlug: \'example\',\n})\n```\n\n---\n\n### `getFilesInCollection`\n\nGet all files within a specific collection for an entity.\n\n`GET /v1/entity/{id}/collections/{collectionSlug}/files`\n\n```ts\nconst { data } = await client.getFilesInCollection({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n collectionSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n }\n]\n```\n\n</details>\n\n---\n\n### `getGlobalFileCollections`\n\nGet all global file collections for a specific schema.\n\n`GET /v1/collections/{schemaSlug}`\n\n```ts\nconst { data } = await client.getGlobalFileCollections({\n schemaSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema\n\n```ts\ntype EntitySlug = string\n```\n\n### `ActivityId`\n\nSee https://github.com/ulid/spec\n\n```ts\ntype ActivityId = string // ulid\n```\n\n### `FileEntityId`\n\n```ts\ntype FileEntityId = string | string // uuid\n```\n\n### `FileAttributes`\n\n```ts\ntype FileAttributes = {\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `FileType`\n\n```ts\ntype FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n```\n\n### `CustomDownloadUrl`\n\nCustom external download url used for the file\n\n```ts\ntype CustomDownloadUrl = string // uri\n```\n\n### `FileEntity`\n\n```ts\ntype FileEntity = {\n _title: string\n _schema: "file"\n _org: string\n _id: string | string // uuid\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename: string\n type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string\n s3ref?: object\n versions: Array<{\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n }>\n _updated_at?: string // date-time\n _created_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n __additional?: Record<string, unknown>\n}\n```\n\n### `CommonSaveFilePayload`\n\n```ts\ntype CommonSaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n}\n```\n\n### `SaveS3FilePayload`\n\n```ts\ntype SaveS3FilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n}\n```\n\n### `SaveFileFromSourceURLPayload`\n\n```ts\ntype SaveFileFromSourceURLPayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n}\n```\n\n### `SaveCustomFilePayload`\n\n```ts\ntype SaveCustomFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayload`\n\n```ts\ntype SaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `SaveFilePayloadV2`\n\n```ts\ntype SaveFilePayloadV2 = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n}\n```\n\n### `BatchSaveFileVersionPayload`\n\nPayload for batch version save. Only s3ref payloads are supported.\n\n```ts\ntype BatchSaveFileVersionPayload = {\n _id?: object\n file_entity_id?: string\n filename?: string\n mime_type?: string\n access_control?: "private" | "public-read"\n s3ref: unknown\n}\n```\n\n### `UploadFilePayload`\n\n```ts\ntype UploadFilePayload = {\n filename: string\n mime_type?: string\n index_tag?: string\n metadata?: Record<string, string>\n}\n```\n\n### `FileUpload`\n\n```ts\ntype FileUpload = {\n s3ref?: object\n upload_url?: string // url\n public_url?: string // url\n}\n```\n\n### `DownloadFilesPayload`\n\n```ts\ntype DownloadFilesPayload = Array<{\n id: string | string // uuid\n version?: number\n}>\n```\n\n### `CreateZipJobPayload`\n\nRequest payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n\n\n```ts\ntype CreateZipJobPayload = unknown | unknown\n```\n\n### `ZipJob`\n\nZIP job status and result\n\n```ts\ntype ZipJob = {\n job_id?: string // uuid\n status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"\n progress?: {\n total_files?: number\n downloaded_files?: number\n failed_files?: number\n }\n result?: {\n file_entity_id?: string // uuid\n download_url?: string // uri\n expires_at?: string // date-time\n zip_size_bytes?: number\n }\n error?: string\n created_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_at?: string // date-time\n}\n```\n\n### `VerifyCustomDownloadUrlPayload`\n\n```ts\ntype VerifyCustomDownloadUrlPayload = {\n custom_download_url: string\n}\n```\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `S3Ref`\n\n```ts\ntype S3Ref = {\n bucket: string\n key: string\n}\n```\n\n### `FileItem`\n\n```ts\ntype FileItem = {\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n}\n```\n\n### `FileRelationItem`\n\n```ts\ntype FileRelationItem = {\n entity_id: string\n _schema?: string\n _tags?: string[]\n}\n```\n\n### `PublicLink`\n\n```ts\ntype PublicLink = {\n id?: string\n link?: string\n last_accessed_at?: string\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `ErrorObject`\n\nA generic error returned by the API\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n\n### `FileCollectionId`\n\nGenerated uuid for a file collection\n\n```ts\ntype FileCollectionId = string // uuid\n```\n\n### `FileCollectionItem`\n\nA file collection with identifiers and timestamps\n\n```ts\ntype FileCollectionItem = {\n slug?: string\n name: string\n id?: string // uuid\n parents?: string[]\n starred?: boolean\n order?: number\n enabled_locations?: string[]\n enabled_purposes?: string[]\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `FileCollectionAttributes`\n\n```ts\ntype FileCollectionAttributes = {\n name?: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n\n### `FileCollectionCreateRequest`\n\nRequest body for creating a file collection\n\n```ts\ntype FileCollectionCreateRequest = {\n name: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = file_default;
|