@epilot/file-client 1.16.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +13 -0
- package/dist/openapi.d.ts +47 -0
- package/dist/openapi.json +43 -1
- package/package.json +15 -14
- package/LICENSE +0 -21
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={330:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=a(t(466));r.default=n.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/files/upload":{"post":{"operationId":"uploadFileV2","parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files":{"post":{"operationId":"saveFileV2","parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/FillActivityQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/DeleteTempFileQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/upload":{"post":{"operationId":"uploadFile","deprecated":true,"parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files":{"post":{"operationId":"saveFile","deprecated":true,"parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files/{id}":{"get":{"operationId":"getFile","parameters":[{"name":"id","in":"path","required":true},{"name":"source_url","in":"query"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"responses":{}},"delete":{"operationId":"deleteFile","parameters":[{"name":"id","in":"path","required":true},{"name":"purge","in":"query"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"}],"responses":{}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadS3":{"post":{"operationId":"downloadS3File","parameters":[{"name":"s3_key","in":"query","required":true},{"name":"s3_bucket","in":"query","required":true},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadFiles":{"post":{"operationId":"downloadFiles","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/{id}/preview":{"get":{"operationId":"previewFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files:previewS3":{"post":{"operationId":"previewS3File","parameters":[{"name":"w","in":"query"},{"name":"h","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"previewS3FileGet","parameters":[{"name":"key","in":"query","required":true},{"name":"bucket","in":"query","required":true},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files/public/{id}/preview":{"get":{"operationId":"previewPublicFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"},{"name":"org_id","in":"query"}],"responses":{}}},"/v1/files/session":{"get":{"operationId":"getSession","responses":{}},"delete":{"operationId":"deleteSession","responses":{}}},"/v1/files/{id}/public/links":{"post":{"operationId":"generatePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"get":{"operationId":"listPublicLinksForFile","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/public/links/{id}/{filename}":{"get":{"operationId":"accessPublicLink","parameters":[{"name":"id","in":"path","required":true},{"name":"filename","in":"path","required":true},{"name":"hash","in":"query","required":false}],"responses":{}}},"/v1/files/public/links/{id}":{"delete":{"operationId":"revokePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/download:verify":{"post":{"operationId":"verifyCustomDownloadUrl","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/public/upload":{"post":{"operationId":"uploadFilePublic","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/folders":{"get":{"operationId":"getFileFolders","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}":{"put":{"operationId":"updateFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}/files":{"get":{"operationId":"getFilesInFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/folders/{schemaSlug}":{"get":{"operationId":"getGlobalFileFolders","parameters":[{"name":"schemaSlug","in":"path","required":true}],"responses":{}}}},"components":{"parameters":{"EntityIdPathParam":{"name":"id","in":"path","required":true},"StrictQueryParam":{"name":"strict","in":"query","required":false},"ActivityIdQueryParam":{"name":"activity_id","in":"query","required":false},"FillActivityQueryParam":{"name":"fill_activity","in":"query","required":false},"AsyncOperationQueryParam":{"name":"async","in":"query","required":false},"DeleteTempFileQueryParam":{"name":"delete_temp_file","in":"query","required":false}},"responses":{"NotFoundError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},r={},t=function t(a){var n=r[a];if(void 0!==n)return n.exports;var i=r[a]={exports:{}};return e[a].call(i.exports,i,i.exports,t),i.exports}(330),a=exports;for(var n in t)a[n]=t[n];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
|
|
@@ -461,6 +461,19 @@
|
|
|
461
461
|
],
|
|
462
462
|
"responses": {}
|
|
463
463
|
}
|
|
464
|
+
},
|
|
465
|
+
"/v1/folders/{schemaSlug}": {
|
|
466
|
+
"get": {
|
|
467
|
+
"operationId": "getGlobalFileFolders",
|
|
468
|
+
"parameters": [
|
|
469
|
+
{
|
|
470
|
+
"name": "schemaSlug",
|
|
471
|
+
"in": "path",
|
|
472
|
+
"required": true
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"responses": {}
|
|
476
|
+
}
|
|
464
477
|
}
|
|
465
478
|
},
|
|
466
479
|
"components": {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -386,6 +386,12 @@ declare namespace Components {
|
|
|
386
386
|
* false
|
|
387
387
|
*/
|
|
388
388
|
starred?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Display order for the folder
|
|
391
|
+
* example:
|
|
392
|
+
* 0
|
|
393
|
+
*/
|
|
394
|
+
order?: number;
|
|
389
395
|
/**
|
|
390
396
|
* Timestamp when the folder was created
|
|
391
397
|
* example:
|
|
@@ -1064,6 +1070,25 @@ declare namespace Paths {
|
|
|
1064
1070
|
}
|
|
1065
1071
|
}
|
|
1066
1072
|
}
|
|
1073
|
+
namespace GetGlobalFileFolders {
|
|
1074
|
+
namespace Parameters {
|
|
1075
|
+
/**
|
|
1076
|
+
* example:
|
|
1077
|
+
* order
|
|
1078
|
+
*/
|
|
1079
|
+
export type SchemaSlug = string;
|
|
1080
|
+
}
|
|
1081
|
+
export interface PathParameters {
|
|
1082
|
+
schemaSlug: /**
|
|
1083
|
+
* example:
|
|
1084
|
+
* order
|
|
1085
|
+
*/
|
|
1086
|
+
Parameters.SchemaSlug;
|
|
1087
|
+
}
|
|
1088
|
+
namespace Responses {
|
|
1089
|
+
export type $200 = /* A file folder with identifiers and timestamps */ Components.Schemas.FileFolderItem[];
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1067
1092
|
namespace GetSession {
|
|
1068
1093
|
namespace Responses {
|
|
1069
1094
|
export interface $200 {
|
|
@@ -1620,6 +1645,16 @@ export interface OperationMethods {
|
|
|
1620
1645
|
data?: any,
|
|
1621
1646
|
config?: AxiosRequestConfig
|
|
1622
1647
|
): OperationResponse<Paths.GetFilesInFolder.Responses.$200>
|
|
1648
|
+
/**
|
|
1649
|
+
* getGlobalFileFolders - getGlobalFileFolders
|
|
1650
|
+
*
|
|
1651
|
+
* Gets all global file folders for a specific schema
|
|
1652
|
+
*/
|
|
1653
|
+
'getGlobalFileFolders'(
|
|
1654
|
+
parameters?: Parameters<Paths.GetGlobalFileFolders.PathParameters> | null,
|
|
1655
|
+
data?: any,
|
|
1656
|
+
config?: AxiosRequestConfig
|
|
1657
|
+
): OperationResponse<Paths.GetGlobalFileFolders.Responses.$200>
|
|
1623
1658
|
}
|
|
1624
1659
|
|
|
1625
1660
|
export interface PathsDictionary {
|
|
@@ -1944,6 +1979,18 @@ export interface PathsDictionary {
|
|
|
1944
1979
|
config?: AxiosRequestConfig
|
|
1945
1980
|
): OperationResponse<Paths.GetFilesInFolder.Responses.$200>
|
|
1946
1981
|
}
|
|
1982
|
+
['/v1/folders/{schemaSlug}']: {
|
|
1983
|
+
/**
|
|
1984
|
+
* getGlobalFileFolders - getGlobalFileFolders
|
|
1985
|
+
*
|
|
1986
|
+
* Gets all global file folders for a specific schema
|
|
1987
|
+
*/
|
|
1988
|
+
'get'(
|
|
1989
|
+
parameters?: Parameters<Paths.GetGlobalFileFolders.PathParameters> | null,
|
|
1990
|
+
data?: any,
|
|
1991
|
+
config?: AxiosRequestConfig
|
|
1992
|
+
): OperationResponse<Paths.GetGlobalFileFolders.Responses.$200>
|
|
1993
|
+
}
|
|
1947
1994
|
}
|
|
1948
1995
|
|
|
1949
1996
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "File API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.1.1",
|
|
6
6
|
"description": "Upload and manage epilot Files\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -1331,6 +1331,43 @@
|
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
|
+
},
|
|
1335
|
+
"/v1/folders/{schemaSlug}": {
|
|
1336
|
+
"get": {
|
|
1337
|
+
"operationId": "getGlobalFileFolders",
|
|
1338
|
+
"summary": "getGlobalFileFolders",
|
|
1339
|
+
"description": "Gets all global file folders for a specific schema",
|
|
1340
|
+
"tags": [
|
|
1341
|
+
"File Folders"
|
|
1342
|
+
],
|
|
1343
|
+
"parameters": [
|
|
1344
|
+
{
|
|
1345
|
+
"name": "schemaSlug",
|
|
1346
|
+
"in": "path",
|
|
1347
|
+
"required": true,
|
|
1348
|
+
"description": "The schema slug (e.g., order, opportunity)",
|
|
1349
|
+
"schema": {
|
|
1350
|
+
"type": "string",
|
|
1351
|
+
"example": "order"
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
],
|
|
1355
|
+
"responses": {
|
|
1356
|
+
"200": {
|
|
1357
|
+
"description": "List of global folders for the schema",
|
|
1358
|
+
"content": {
|
|
1359
|
+
"application/json": {
|
|
1360
|
+
"schema": {
|
|
1361
|
+
"type": "array",
|
|
1362
|
+
"items": {
|
|
1363
|
+
"$ref": "#/components/schemas/FileFolderItem"
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1334
1371
|
}
|
|
1335
1372
|
},
|
|
1336
1373
|
"components": {
|
|
@@ -1933,6 +1970,11 @@
|
|
|
1933
1970
|
"description": "Whether the folder is starred / favorited",
|
|
1934
1971
|
"example": false
|
|
1935
1972
|
},
|
|
1973
|
+
"order": {
|
|
1974
|
+
"type": "number",
|
|
1975
|
+
"description": "Display order for the folder",
|
|
1976
|
+
"example": 0
|
|
1977
|
+
},
|
|
1936
1978
|
"created_at": {
|
|
1937
1979
|
"type": "string",
|
|
1938
1980
|
"format": "date-time",
|
package/package.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/file-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Client library for the epilot File API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"author": "epilot GmbH",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"private": false,
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "jest",
|
|
12
|
+
"typescript": "tsc",
|
|
13
|
+
"bundle-definition": "webpack",
|
|
14
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/file.yaml",
|
|
15
|
+
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
16
|
+
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
17
|
+
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
18
|
+
"build:watch": "npm run build && tsc -w",
|
|
19
|
+
"prepublishOnly": "npm run typegen && npm run build",
|
|
20
|
+
"lint": "pnpm exec eslint src"
|
|
21
|
+
},
|
|
10
22
|
"repository": {
|
|
11
23
|
"type": "git",
|
|
12
24
|
"url": "git+https://github.com/epilot-dev/sdk-js.git",
|
|
@@ -59,16 +71,5 @@
|
|
|
59
71
|
"webpack": "^5.18.0",
|
|
60
72
|
"webpack-cli": "^4.4.0"
|
|
61
73
|
},
|
|
62
|
-
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
63
|
-
|
|
64
|
-
"test": "jest",
|
|
65
|
-
"typescript": "tsc",
|
|
66
|
-
"bundle-definition": "webpack",
|
|
67
|
-
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/file.yaml",
|
|
68
|
-
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
69
|
-
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
70
|
-
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
71
|
-
"build:watch": "npm run build && tsc -w",
|
|
72
|
-
"lint": "pnpm exec eslint src"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
74
|
+
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
75
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 epilot GmbH
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|