@epcc-sdk/sdks-files 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.cjs +25 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +3 -0
- package/dist/client/index.d.ts +3 -2
- package/dist/client/index.mjs +3 -0
- package/dist/client/index.mjs.map +1 -0
- package/dist/client/sdk.gen.cjs +91 -0
- package/dist/client/sdk.gen.cjs.map +1 -0
- package/dist/client/sdk.gen.d.cts +49 -0
- package/dist/client/sdk.gen.d.ts +19 -15
- package/dist/client/sdk.gen.mjs +67 -0
- package/dist/client/sdk.gen.mjs.map +1 -0
- package/dist/client/types.gen.cjs +17 -0
- package/dist/client/types.gen.cjs.map +1 -0
- package/dist/client/types.gen.d.cts +303 -0
- package/dist/client/types.gen.d.ts +34 -32
- package/dist/client/types.gen.mjs +1 -0
- package/dist/client/types.gen.mjs.map +1 -0
- package/dist/index.cjs +35 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -10
- package/dist/client/index.js +0 -3
- package/dist/client/sdk.gen.js +0 -80
- package/dist/client/types.gen.js +0 -2
- package/dist/index.js +0 -4
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var client_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(client_exports);
|
|
18
|
+
__reExport(client_exports, require('./types.gen.cjs'), module.exports);
|
|
19
|
+
__reExport(client_exports, require('./sdk.gen.cjs'), module.exports);
|
|
20
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require('./types.gen.cjs'),
|
|
23
|
+
...require('./sdk.gen.cjs')
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client/index.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\nexport * from \"./types.gen\"\nexport * from \"./sdk.gen\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AACA,2BAAc,wBADd;AAEA,2BAAc,sBAFd;","names":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error } from './types.gen.cjs';
|
|
2
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles } from './sdk.gen.cjs';
|
|
3
|
+
import '@hey-api/client-fetch';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error } from './types.gen.js';
|
|
2
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles } from './sdk.gen.js';
|
|
3
|
+
import '@hey-api/client-fetch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client/index.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\nexport * from \"./types.gen\"\nexport * from \"./sdk.gen\"\n"],"mappings":"AACA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var sdk_gen_exports = {};
|
|
20
|
+
__export(sdk_gen_exports, {
|
|
21
|
+
client: () => client,
|
|
22
|
+
createAFile: () => createAFile,
|
|
23
|
+
deleteAFile: () => deleteAFile,
|
|
24
|
+
getAFile: () => getAFile,
|
|
25
|
+
getAllFiles: () => getAllFiles
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(sdk_gen_exports);
|
|
28
|
+
var import_client_fetch = require("@hey-api/client-fetch");
|
|
29
|
+
const client = (0, import_client_fetch.createClient)((0, import_client_fetch.createConfig)());
|
|
30
|
+
const getAllFiles = (options) => {
|
|
31
|
+
return (options?.client ?? client).get({
|
|
32
|
+
...options,
|
|
33
|
+
security: [
|
|
34
|
+
{
|
|
35
|
+
scheme: "bearer",
|
|
36
|
+
type: "http"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
url: "/v2/files"
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const createAFile = (options) => {
|
|
43
|
+
return (options?.client ?? client).post({
|
|
44
|
+
...options,
|
|
45
|
+
...import_client_fetch.formDataBodySerializer,
|
|
46
|
+
headers: {
|
|
47
|
+
"Content-Type": null,
|
|
48
|
+
...options?.headers
|
|
49
|
+
},
|
|
50
|
+
security: [
|
|
51
|
+
{
|
|
52
|
+
scheme: "bearer",
|
|
53
|
+
type: "http"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
url: "/v2/files"
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const deleteAFile = (options) => {
|
|
60
|
+
return (options?.client ?? client).delete({
|
|
61
|
+
...options,
|
|
62
|
+
security: [
|
|
63
|
+
{
|
|
64
|
+
scheme: "bearer",
|
|
65
|
+
type: "http"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
url: "/v2/files/{fileID}"
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const getAFile = (options) => {
|
|
72
|
+
return (options?.client ?? client).get({
|
|
73
|
+
...options,
|
|
74
|
+
security: [
|
|
75
|
+
{
|
|
76
|
+
scheme: "bearer",
|
|
77
|
+
type: "http"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
url: "/v2/files/{fileID}"
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
client,
|
|
86
|
+
createAFile,
|
|
87
|
+
deleteAFile,
|
|
88
|
+
getAFile,
|
|
89
|
+
getAllFiles
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=sdk.gen.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport {\n createClient,\n createConfig,\n type Options,\n formDataBodySerializer,\n} from \"@hey-api/client-fetch\"\nimport type {\n GetAllFilesData,\n GetAllFilesResponse,\n GetAllFilesError,\n CreateAFileData,\n CreateAFileResponse,\n CreateAFileError,\n DeleteAFileData,\n DeleteAFileResponse,\n DeleteAFileError,\n GetAFileData,\n GetAFileResponse,\n GetAFileError,\n} from \"./types.gen\"\n\nexport const client = createClient(createConfig())\n\n/**\n * Get all Files\n * Retrieves all files.\n *\n * ### Filtering\n *\n * For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering).\n *\n * The following operators and attributes are available when filtering on this endpoint.\n *\n * | Attribute | Type | Operators | Example |\n * |:----------------------|:----------|:--------------------------|:-------------|\n * | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |\n * | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |\n * | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |\n * | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |\n *\n */\nexport const getAllFiles = <ThrowOnError extends boolean = false>(\n options?: Options<GetAllFilesData, ThrowOnError>,\n) => {\n return (options?.client ?? client).get<\n GetAllFilesResponse,\n GetAllFilesError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files\",\n })\n}\n\n/**\n * Create a File\n * Create a File\n */\nexport const createAFile = <ThrowOnError extends boolean = false>(\n options: Options<CreateAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).post<\n CreateAFileResponse,\n CreateAFileError,\n ThrowOnError\n >({\n ...options,\n ...formDataBodySerializer,\n headers: {\n \"Content-Type\": null,\n ...options?.headers,\n },\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files\",\n })\n}\n\n/**\n * Delete a File\n * Delete a File\n */\nexport const deleteAFile = <ThrowOnError extends boolean = false>(\n options: Options<DeleteAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).delete<\n DeleteAFileResponse,\n DeleteAFileError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files/{fileID}\",\n })\n}\n\n/**\n * Get a File\n * Get a File\n */\nexport const getAFile = <ThrowOnError extends boolean = false>(\n options: Options<GetAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).get<\n GetAFileResponse,\n GetAFileError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files/{fileID}\",\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAKO;AAgBA,MAAM,aAAS,sCAAa,kCAAa,CAAC;AAoB1C,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,IAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,KAIjC;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,IACH,SAAS;AAAA,MACP,gBAAgB;AAAA,MAChB,GAAG,SAAS;AAAA,IACd;AAAA,IACA,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,OAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,WAAW,CACtB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,IAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GetAllFilesData, File, ResultsMeta, ResultsLinks, ErrorResponse, CreateAFileData, DeleteAFileData, GetAFileData } from './types.gen.cjs';
|
|
2
|
+
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
3
|
+
import { Options } from '@hey-api/client-fetch';
|
|
4
|
+
|
|
5
|
+
declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _hey_api_client_fetch.RequestOptions<boolean, string>>;
|
|
6
|
+
/**
|
|
7
|
+
* Get all Files
|
|
8
|
+
* Retrieves all files.
|
|
9
|
+
*
|
|
10
|
+
* ### Filtering
|
|
11
|
+
*
|
|
12
|
+
* For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering).
|
|
13
|
+
*
|
|
14
|
+
* The following operators and attributes are available when filtering on this endpoint.
|
|
15
|
+
*
|
|
16
|
+
* | Attribute | Type | Operators | Example |
|
|
17
|
+
* |:----------------------|:----------|:--------------------------|:-------------|
|
|
18
|
+
* | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |
|
|
19
|
+
* | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |
|
|
20
|
+
* | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |
|
|
21
|
+
* | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
declare const getAllFiles: <ThrowOnError extends boolean = false>(options?: Options<GetAllFilesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
25
|
+
data?: Array<File>;
|
|
26
|
+
meta?: ResultsMeta;
|
|
27
|
+
links?: ResultsLinks;
|
|
28
|
+
}, ErrorResponse, ThrowOnError>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a File
|
|
31
|
+
* Create a File
|
|
32
|
+
*/
|
|
33
|
+
declare const createAFile: <ThrowOnError extends boolean = false>(options: Options<CreateAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
34
|
+
data?: File;
|
|
35
|
+
}, ErrorResponse, ThrowOnError>;
|
|
36
|
+
/**
|
|
37
|
+
* Delete a File
|
|
38
|
+
* Delete a File
|
|
39
|
+
*/
|
|
40
|
+
declare const deleteAFile: <ThrowOnError extends boolean = false>(options: Options<DeleteAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<void, ErrorResponse, ThrowOnError>;
|
|
41
|
+
/**
|
|
42
|
+
* Get a File
|
|
43
|
+
* Get a File
|
|
44
|
+
*/
|
|
45
|
+
declare const getAFile: <ThrowOnError extends boolean = false>(options: Options<GetAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
46
|
+
data?: File;
|
|
47
|
+
}, ErrorResponse, ThrowOnError>;
|
|
48
|
+
|
|
49
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles };
|
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { GetAllFilesData, File, ResultsMeta, ResultsLinks, ErrorResponse, CreateAFileData, DeleteAFileData, GetAFileData } from './types.gen.js';
|
|
2
|
+
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
3
|
+
import { Options } from '@hey-api/client-fetch';
|
|
4
|
+
|
|
5
|
+
declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _hey_api_client_fetch.RequestOptions<boolean, string>>;
|
|
4
6
|
/**
|
|
5
7
|
* Get all Files
|
|
6
8
|
* Retrieves all files.
|
|
@@ -19,27 +21,29 @@ export declare const client: import("@hey-api/client-fetch").Client<Request, Res
|
|
|
19
21
|
* | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
|
|
20
22
|
*
|
|
21
23
|
*/
|
|
22
|
-
|
|
23
|
-
data?: Array<
|
|
24
|
-
meta?:
|
|
25
|
-
links?:
|
|
26
|
-
},
|
|
24
|
+
declare const getAllFiles: <ThrowOnError extends boolean = false>(options?: Options<GetAllFilesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
25
|
+
data?: Array<File>;
|
|
26
|
+
meta?: ResultsMeta;
|
|
27
|
+
links?: ResultsLinks;
|
|
28
|
+
}, ErrorResponse, ThrowOnError>;
|
|
27
29
|
/**
|
|
28
30
|
* Create a File
|
|
29
31
|
* Create a File
|
|
30
32
|
*/
|
|
31
|
-
|
|
32
|
-
data?:
|
|
33
|
-
},
|
|
33
|
+
declare const createAFile: <ThrowOnError extends boolean = false>(options: Options<CreateAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
34
|
+
data?: File;
|
|
35
|
+
}, ErrorResponse, ThrowOnError>;
|
|
34
36
|
/**
|
|
35
37
|
* Delete a File
|
|
36
38
|
* Delete a File
|
|
37
39
|
*/
|
|
38
|
-
|
|
40
|
+
declare const deleteAFile: <ThrowOnError extends boolean = false>(options: Options<DeleteAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<void, ErrorResponse, ThrowOnError>;
|
|
39
41
|
/**
|
|
40
42
|
* Get a File
|
|
41
43
|
* Get a File
|
|
42
44
|
*/
|
|
43
|
-
|
|
44
|
-
data?:
|
|
45
|
-
},
|
|
45
|
+
declare const getAFile: <ThrowOnError extends boolean = false>(options: Options<GetAFileData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
|
|
46
|
+
data?: File;
|
|
47
|
+
}, ErrorResponse, ThrowOnError>;
|
|
48
|
+
|
|
49
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createClient,
|
|
3
|
+
createConfig,
|
|
4
|
+
formDataBodySerializer
|
|
5
|
+
} from "@hey-api/client-fetch";
|
|
6
|
+
const client = createClient(createConfig());
|
|
7
|
+
const getAllFiles = (options) => {
|
|
8
|
+
return (options?.client ?? client).get({
|
|
9
|
+
...options,
|
|
10
|
+
security: [
|
|
11
|
+
{
|
|
12
|
+
scheme: "bearer",
|
|
13
|
+
type: "http"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
url: "/v2/files"
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const createAFile = (options) => {
|
|
20
|
+
return (options?.client ?? client).post({
|
|
21
|
+
...options,
|
|
22
|
+
...formDataBodySerializer,
|
|
23
|
+
headers: {
|
|
24
|
+
"Content-Type": null,
|
|
25
|
+
...options?.headers
|
|
26
|
+
},
|
|
27
|
+
security: [
|
|
28
|
+
{
|
|
29
|
+
scheme: "bearer",
|
|
30
|
+
type: "http"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
url: "/v2/files"
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const deleteAFile = (options) => {
|
|
37
|
+
return (options?.client ?? client).delete({
|
|
38
|
+
...options,
|
|
39
|
+
security: [
|
|
40
|
+
{
|
|
41
|
+
scheme: "bearer",
|
|
42
|
+
type: "http"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
url: "/v2/files/{fileID}"
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const getAFile = (options) => {
|
|
49
|
+
return (options?.client ?? client).get({
|
|
50
|
+
...options,
|
|
51
|
+
security: [
|
|
52
|
+
{
|
|
53
|
+
scheme: "bearer",
|
|
54
|
+
type: "http"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
url: "/v2/files/{fileID}"
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
client,
|
|
62
|
+
createAFile,
|
|
63
|
+
deleteAFile,
|
|
64
|
+
getAFile,
|
|
65
|
+
getAllFiles
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=sdk.gen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport {\n createClient,\n createConfig,\n type Options,\n formDataBodySerializer,\n} from \"@hey-api/client-fetch\"\nimport type {\n GetAllFilesData,\n GetAllFilesResponse,\n GetAllFilesError,\n CreateAFileData,\n CreateAFileResponse,\n CreateAFileError,\n DeleteAFileData,\n DeleteAFileResponse,\n DeleteAFileError,\n GetAFileData,\n GetAFileResponse,\n GetAFileError,\n} from \"./types.gen\"\n\nexport const client = createClient(createConfig())\n\n/**\n * Get all Files\n * Retrieves all files.\n *\n * ### Filtering\n *\n * For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering).\n *\n * The following operators and attributes are available when filtering on this endpoint.\n *\n * | Attribute | Type | Operators | Example |\n * |:----------------------|:----------|:--------------------------|:-------------|\n * | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |\n * | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |\n * | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |\n * | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |\n *\n */\nexport const getAllFiles = <ThrowOnError extends boolean = false>(\n options?: Options<GetAllFilesData, ThrowOnError>,\n) => {\n return (options?.client ?? client).get<\n GetAllFilesResponse,\n GetAllFilesError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files\",\n })\n}\n\n/**\n * Create a File\n * Create a File\n */\nexport const createAFile = <ThrowOnError extends boolean = false>(\n options: Options<CreateAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).post<\n CreateAFileResponse,\n CreateAFileError,\n ThrowOnError\n >({\n ...options,\n ...formDataBodySerializer,\n headers: {\n \"Content-Type\": null,\n ...options?.headers,\n },\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files\",\n })\n}\n\n/**\n * Delete a File\n * Delete a File\n */\nexport const deleteAFile = <ThrowOnError extends boolean = false>(\n options: Options<DeleteAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).delete<\n DeleteAFileResponse,\n DeleteAFileError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files/{fileID}\",\n })\n}\n\n/**\n * Get a File\n * Get a File\n */\nexport const getAFile = <ThrowOnError extends boolean = false>(\n options: Options<GetAFileData, ThrowOnError>,\n) => {\n return (options?.client ?? client).get<\n GetAFileResponse,\n GetAFileError,\n ThrowOnError\n >({\n ...options,\n security: [\n {\n scheme: \"bearer\",\n type: \"http\",\n },\n ],\n url: \"/v2/files/{fileID}\",\n })\n}\n"],"mappings":"AAEA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AAgBA,MAAM,SAAS,aAAa,aAAa,CAAC;AAoB1C,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,IAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,KAIjC;AAAA,IACA,GAAG;AAAA,IACH,GAAG;AAAA,IACH,SAAS;AAAA,MACP,gBAAgB;AAAA,MAChB,GAAG,SAAS;AAAA,IACd;AAAA,IACA,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,cAAc,CACzB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,OAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;AAMO,MAAM,WAAW,CACtB,YACG;AACH,UAAQ,SAAS,UAAU,QAAQ,IAIjC;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,KAAK;AAAA,EACP,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_gen_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_gen_exports);
|
|
17
|
+
//# sourceMappingURL=types.gen.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client/types.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nexport type ErrorResponse = {\n errors: Array<_Error>\n}\n\nexport type File = {\n /**\n * The unique identifier for this file.\n */\n id?: Uuid\n /**\n * The type represents the object being returned.\n */\n type?: string\n /**\n * The name of the file.\n */\n file_name?: string\n /**\n * The mime type of the file.\n */\n mime_type?: string\n /**\n * The size of the file. Required when uploading files.\n */\n file_size?: number\n /**\n * DEPRECATED Whether the file public or not. Required when uploading files.\n */\n public?: boolean\n meta?: FileMeta\n links?: Links\n link?: FileLink\n}\n\nexport type FileMeta = {\n /**\n * The date and time the file was created.\n */\n timestamps?: {\n /**\n * The date and time the file was created.\n */\n created_at?: string\n }\n /**\n * The file dimensions.\n */\n dimensions?: {\n /**\n * The width of the file.\n */\n width?: number\n /**\n * The height of the file.\n */\n height?: number\n }\n}\n\nexport type ResultsMeta = {\n /**\n * Contains the results for the entire collection.\n */\n page?: {\n /**\n * The maximum number of records for all pages.\n */\n limit?: number\n /**\n * The current offset by number of pages.\n */\n offset?: number\n /**\n * The current number of pages.\n */\n current?: number\n /**\n * The total number of records for the entire collection.\n */\n total?: number\n }\n /**\n * Contains the results for the entire collection.\n */\n results?: {\n /**\n * The total number of records for the entire collection.\n */\n total?: number\n }\n}\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport type Links = {\n /**\n * Single entities use a self parameter with a link to that specific resource.\n */\n self?: string\n}\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport type ResultsLinks = {\n /**\n * Single entities use a self parameter with a link to that specific resource.\n */\n self?: string | null\n /**\n * Always the first page.\n */\n first?: string | null\n /**\n * This is `null` if there is only one page.\n */\n last?: string | null\n}\n\n/**\n * The publicly available URL for this file.\n */\nexport type FileLink = {\n /**\n * The publicly available URL for this file.\n */\n href?: string\n}\n\nexport type Uuid = string\n\nexport type _Error = {\n /**\n * The HTTP response code of the error.\n */\n status: number\n /**\n * A brief summary of the error.\n */\n title: string\n /**\n * Optional additional detail about the error.\n */\n detail?: string\n /**\n * Internal request ID.\n */\n request_id?: string\n /**\n * Additional supporting meta data for the error.\n */\n meta?: {\n [key: string]: unknown\n }\n}\n\n/**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\nexport type Filter = string\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport type PageOffset = string\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport type PageLimit = string\n\nexport type GetAllFilesData = {\n body?: never\n path?: never\n query?: {\n /**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\n filter?: string\n /**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\n \"page[limit]\"?: string\n /**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\n \"page[offset]\"?: string\n }\n url: \"/v2/files\"\n}\n\nexport type GetAllFilesErrors = {\n /**\n * Internal server error. There was a system failure in the platform.\n */\n 500: ErrorResponse\n}\n\nexport type GetAllFilesError = GetAllFilesErrors[keyof GetAllFilesErrors]\n\nexport type GetAllFilesResponses = {\n /**\n * OK\n */\n 200: {\n data?: Array<File>\n meta?: ResultsMeta\n links?: ResultsLinks\n }\n}\n\nexport type GetAllFilesResponse =\n GetAllFilesResponses[keyof GetAllFilesResponses]\n\nexport type CreateAFileData = {\n body: {\n /**\n * Indicates the file you want to upload.\n */\n file?: Blob | File\n /**\n * Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file.\n */\n file_location?: string\n }\n path?: never\n query?: never\n url: \"/v2/files\"\n}\n\nexport type CreateAFileErrors = {\n /**\n * Bad request. The request failed validation.\n */\n 400: ErrorResponse\n /**\n * Bad request. The request failed validation.\n */\n 422: ErrorResponse\n /**\n * Internal server error. There was a system failure in the platform.\n */\n 500: ErrorResponse\n}\n\nexport type CreateAFileError = CreateAFileErrors[keyof CreateAFileErrors]\n\nexport type CreateAFileResponses = {\n /**\n * Created\n */\n 201: {\n data?: File\n }\n}\n\nexport type CreateAFileResponse =\n CreateAFileResponses[keyof CreateAFileResponses]\n\nexport type DeleteAFileData = {\n body?: never\n path: {\n /**\n * The unique identifier of the file you want to delete.\n */\n fileID: string\n }\n query?: never\n url: \"/v2/files/{fileID}\"\n}\n\nexport type DeleteAFileErrors = {\n /**\n * Bad request. The request failed validation.\n */\n 403: ErrorResponse\n /**\n * Forbidden. The operation is forbidden on this entity.\n */\n 404: ErrorResponse\n /**\n * Internal server error. There was a system failure in the platform.\n */\n 500: ErrorResponse\n}\n\nexport type DeleteAFileError = DeleteAFileErrors[keyof DeleteAFileErrors]\n\nexport type DeleteAFileResponses = {\n /**\n * No Content\n */\n 204: void\n}\n\nexport type DeleteAFileResponse =\n DeleteAFileResponses[keyof DeleteAFileResponses]\n\nexport type GetAFileData = {\n body?: never\n path: {\n /**\n * The unique identifier for a file.\n */\n fileID: string\n }\n query?: never\n url: \"/v2/files/{fileID}\"\n}\n\nexport type GetAFileErrors = {\n /**\n * Forbidden. The operation is forbidden on this entity.\n */\n 404: ErrorResponse\n /**\n * Internal server error. There was a system failure in the platform.\n */\n 500: ErrorResponse\n}\n\nexport type GetAFileError = GetAFileErrors[keyof GetAFileErrors]\n\nexport type GetAFileResponses = {\n 200: {\n data?: File\n }\n}\n\nexport type GetAFileResponse = GetAFileResponses[keyof GetAFileResponses]\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
type ErrorResponse = {
|
|
2
|
+
errors: Array<_Error>;
|
|
3
|
+
};
|
|
4
|
+
type File = {
|
|
5
|
+
/**
|
|
6
|
+
* The unique identifier for this file.
|
|
7
|
+
*/
|
|
8
|
+
id?: Uuid;
|
|
9
|
+
/**
|
|
10
|
+
* The type represents the object being returned.
|
|
11
|
+
*/
|
|
12
|
+
type?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the file.
|
|
15
|
+
*/
|
|
16
|
+
file_name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The mime type of the file.
|
|
19
|
+
*/
|
|
20
|
+
mime_type?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The size of the file. Required when uploading files.
|
|
23
|
+
*/
|
|
24
|
+
file_size?: number;
|
|
25
|
+
/**
|
|
26
|
+
* DEPRECATED Whether the file public or not. Required when uploading files.
|
|
27
|
+
*/
|
|
28
|
+
public?: boolean;
|
|
29
|
+
meta?: FileMeta;
|
|
30
|
+
links?: Links;
|
|
31
|
+
link?: FileLink;
|
|
32
|
+
};
|
|
33
|
+
type FileMeta = {
|
|
34
|
+
/**
|
|
35
|
+
* The date and time the file was created.
|
|
36
|
+
*/
|
|
37
|
+
timestamps?: {
|
|
38
|
+
/**
|
|
39
|
+
* The date and time the file was created.
|
|
40
|
+
*/
|
|
41
|
+
created_at?: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The file dimensions.
|
|
45
|
+
*/
|
|
46
|
+
dimensions?: {
|
|
47
|
+
/**
|
|
48
|
+
* The width of the file.
|
|
49
|
+
*/
|
|
50
|
+
width?: number;
|
|
51
|
+
/**
|
|
52
|
+
* The height of the file.
|
|
53
|
+
*/
|
|
54
|
+
height?: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
type ResultsMeta = {
|
|
58
|
+
/**
|
|
59
|
+
* Contains the results for the entire collection.
|
|
60
|
+
*/
|
|
61
|
+
page?: {
|
|
62
|
+
/**
|
|
63
|
+
* The maximum number of records for all pages.
|
|
64
|
+
*/
|
|
65
|
+
limit?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The current offset by number of pages.
|
|
68
|
+
*/
|
|
69
|
+
offset?: number;
|
|
70
|
+
/**
|
|
71
|
+
* The current number of pages.
|
|
72
|
+
*/
|
|
73
|
+
current?: number;
|
|
74
|
+
/**
|
|
75
|
+
* The total number of records for the entire collection.
|
|
76
|
+
*/
|
|
77
|
+
total?: number;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Contains the results for the entire collection.
|
|
81
|
+
*/
|
|
82
|
+
results?: {
|
|
83
|
+
/**
|
|
84
|
+
* The total number of records for the entire collection.
|
|
85
|
+
*/
|
|
86
|
+
total?: number;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Links are used to allow you to move between requests.
|
|
91
|
+
*/
|
|
92
|
+
type Links = {
|
|
93
|
+
/**
|
|
94
|
+
* Single entities use a self parameter with a link to that specific resource.
|
|
95
|
+
*/
|
|
96
|
+
self?: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Links are used to allow you to move between requests.
|
|
100
|
+
*/
|
|
101
|
+
type ResultsLinks = {
|
|
102
|
+
/**
|
|
103
|
+
* Single entities use a self parameter with a link to that specific resource.
|
|
104
|
+
*/
|
|
105
|
+
self?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Always the first page.
|
|
108
|
+
*/
|
|
109
|
+
first?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* This is `null` if there is only one page.
|
|
112
|
+
*/
|
|
113
|
+
last?: string | null;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* The publicly available URL for this file.
|
|
117
|
+
*/
|
|
118
|
+
type FileLink = {
|
|
119
|
+
/**
|
|
120
|
+
* The publicly available URL for this file.
|
|
121
|
+
*/
|
|
122
|
+
href?: string;
|
|
123
|
+
};
|
|
124
|
+
type Uuid = string;
|
|
125
|
+
type _Error = {
|
|
126
|
+
/**
|
|
127
|
+
* The HTTP response code of the error.
|
|
128
|
+
*/
|
|
129
|
+
status: number;
|
|
130
|
+
/**
|
|
131
|
+
* A brief summary of the error.
|
|
132
|
+
*/
|
|
133
|
+
title: string;
|
|
134
|
+
/**
|
|
135
|
+
* Optional additional detail about the error.
|
|
136
|
+
*/
|
|
137
|
+
detail?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Internal request ID.
|
|
140
|
+
*/
|
|
141
|
+
request_id?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Additional supporting meta data for the error.
|
|
144
|
+
*/
|
|
145
|
+
meta?: {
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
type Filter = string;
|
|
155
|
+
/**
|
|
156
|
+
* The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
157
|
+
*/
|
|
158
|
+
type PageOffset = string;
|
|
159
|
+
/**
|
|
160
|
+
* The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
161
|
+
*/
|
|
162
|
+
type PageLimit = string;
|
|
163
|
+
type GetAllFilesData = {
|
|
164
|
+
body?: never;
|
|
165
|
+
path?: never;
|
|
166
|
+
query?: {
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
filter?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
175
|
+
*/
|
|
176
|
+
"page[limit]"?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
179
|
+
*/
|
|
180
|
+
"page[offset]"?: string;
|
|
181
|
+
};
|
|
182
|
+
url: "/v2/files";
|
|
183
|
+
};
|
|
184
|
+
type GetAllFilesErrors = {
|
|
185
|
+
/**
|
|
186
|
+
* Internal server error. There was a system failure in the platform.
|
|
187
|
+
*/
|
|
188
|
+
500: ErrorResponse;
|
|
189
|
+
};
|
|
190
|
+
type GetAllFilesError = GetAllFilesErrors[keyof GetAllFilesErrors];
|
|
191
|
+
type GetAllFilesResponses = {
|
|
192
|
+
/**
|
|
193
|
+
* OK
|
|
194
|
+
*/
|
|
195
|
+
200: {
|
|
196
|
+
data?: Array<File>;
|
|
197
|
+
meta?: ResultsMeta;
|
|
198
|
+
links?: ResultsLinks;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
type GetAllFilesResponse = GetAllFilesResponses[keyof GetAllFilesResponses];
|
|
202
|
+
type CreateAFileData = {
|
|
203
|
+
body: {
|
|
204
|
+
/**
|
|
205
|
+
* Indicates the file you want to upload.
|
|
206
|
+
*/
|
|
207
|
+
file?: Blob | File;
|
|
208
|
+
/**
|
|
209
|
+
* Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file.
|
|
210
|
+
*/
|
|
211
|
+
file_location?: string;
|
|
212
|
+
};
|
|
213
|
+
path?: never;
|
|
214
|
+
query?: never;
|
|
215
|
+
url: "/v2/files";
|
|
216
|
+
};
|
|
217
|
+
type CreateAFileErrors = {
|
|
218
|
+
/**
|
|
219
|
+
* Bad request. The request failed validation.
|
|
220
|
+
*/
|
|
221
|
+
400: ErrorResponse;
|
|
222
|
+
/**
|
|
223
|
+
* Bad request. The request failed validation.
|
|
224
|
+
*/
|
|
225
|
+
422: ErrorResponse;
|
|
226
|
+
/**
|
|
227
|
+
* Internal server error. There was a system failure in the platform.
|
|
228
|
+
*/
|
|
229
|
+
500: ErrorResponse;
|
|
230
|
+
};
|
|
231
|
+
type CreateAFileError = CreateAFileErrors[keyof CreateAFileErrors];
|
|
232
|
+
type CreateAFileResponses = {
|
|
233
|
+
/**
|
|
234
|
+
* Created
|
|
235
|
+
*/
|
|
236
|
+
201: {
|
|
237
|
+
data?: File;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
type CreateAFileResponse = CreateAFileResponses[keyof CreateAFileResponses];
|
|
241
|
+
type DeleteAFileData = {
|
|
242
|
+
body?: never;
|
|
243
|
+
path: {
|
|
244
|
+
/**
|
|
245
|
+
* The unique identifier of the file you want to delete.
|
|
246
|
+
*/
|
|
247
|
+
fileID: string;
|
|
248
|
+
};
|
|
249
|
+
query?: never;
|
|
250
|
+
url: "/v2/files/{fileID}";
|
|
251
|
+
};
|
|
252
|
+
type DeleteAFileErrors = {
|
|
253
|
+
/**
|
|
254
|
+
* Bad request. The request failed validation.
|
|
255
|
+
*/
|
|
256
|
+
403: ErrorResponse;
|
|
257
|
+
/**
|
|
258
|
+
* Forbidden. The operation is forbidden on this entity.
|
|
259
|
+
*/
|
|
260
|
+
404: ErrorResponse;
|
|
261
|
+
/**
|
|
262
|
+
* Internal server error. There was a system failure in the platform.
|
|
263
|
+
*/
|
|
264
|
+
500: ErrorResponse;
|
|
265
|
+
};
|
|
266
|
+
type DeleteAFileError = DeleteAFileErrors[keyof DeleteAFileErrors];
|
|
267
|
+
type DeleteAFileResponses = {
|
|
268
|
+
/**
|
|
269
|
+
* No Content
|
|
270
|
+
*/
|
|
271
|
+
204: void;
|
|
272
|
+
};
|
|
273
|
+
type DeleteAFileResponse = DeleteAFileResponses[keyof DeleteAFileResponses];
|
|
274
|
+
type GetAFileData = {
|
|
275
|
+
body?: never;
|
|
276
|
+
path: {
|
|
277
|
+
/**
|
|
278
|
+
* The unique identifier for a file.
|
|
279
|
+
*/
|
|
280
|
+
fileID: string;
|
|
281
|
+
};
|
|
282
|
+
query?: never;
|
|
283
|
+
url: "/v2/files/{fileID}";
|
|
284
|
+
};
|
|
285
|
+
type GetAFileErrors = {
|
|
286
|
+
/**
|
|
287
|
+
* Forbidden. The operation is forbidden on this entity.
|
|
288
|
+
*/
|
|
289
|
+
404: ErrorResponse;
|
|
290
|
+
/**
|
|
291
|
+
* Internal server error. There was a system failure in the platform.
|
|
292
|
+
*/
|
|
293
|
+
500: ErrorResponse;
|
|
294
|
+
};
|
|
295
|
+
type GetAFileError = GetAFileErrors[keyof GetAFileErrors];
|
|
296
|
+
type GetAFileResponses = {
|
|
297
|
+
200: {
|
|
298
|
+
data?: File;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
type GetAFileResponse = GetAFileResponses[keyof GetAFileResponses];
|
|
302
|
+
|
|
303
|
+
export type { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type ErrorResponse = {
|
|
2
2
|
errors: Array<_Error>;
|
|
3
3
|
};
|
|
4
|
-
|
|
4
|
+
type File = {
|
|
5
5
|
/**
|
|
6
6
|
* The unique identifier for this file.
|
|
7
7
|
*/
|
|
@@ -30,7 +30,7 @@ export type File = {
|
|
|
30
30
|
links?: Links;
|
|
31
31
|
link?: FileLink;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type FileMeta = {
|
|
34
34
|
/**
|
|
35
35
|
* The date and time the file was created.
|
|
36
36
|
*/
|
|
@@ -54,7 +54,7 @@ export type FileMeta = {
|
|
|
54
54
|
height?: number;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
type ResultsMeta = {
|
|
58
58
|
/**
|
|
59
59
|
* Contains the results for the entire collection.
|
|
60
60
|
*/
|
|
@@ -89,7 +89,7 @@ export type ResultsMeta = {
|
|
|
89
89
|
/**
|
|
90
90
|
* Links are used to allow you to move between requests.
|
|
91
91
|
*/
|
|
92
|
-
|
|
92
|
+
type Links = {
|
|
93
93
|
/**
|
|
94
94
|
* Single entities use a self parameter with a link to that specific resource.
|
|
95
95
|
*/
|
|
@@ -98,7 +98,7 @@ export type Links = {
|
|
|
98
98
|
/**
|
|
99
99
|
* Links are used to allow you to move between requests.
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
type ResultsLinks = {
|
|
102
102
|
/**
|
|
103
103
|
* Single entities use a self parameter with a link to that specific resource.
|
|
104
104
|
*/
|
|
@@ -115,14 +115,14 @@ export type ResultsLinks = {
|
|
|
115
115
|
/**
|
|
116
116
|
* The publicly available URL for this file.
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
type FileLink = {
|
|
119
119
|
/**
|
|
120
120
|
* The publicly available URL for this file.
|
|
121
121
|
*/
|
|
122
122
|
href?: string;
|
|
123
123
|
};
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
type Uuid = string;
|
|
125
|
+
type _Error = {
|
|
126
126
|
/**
|
|
127
127
|
* The HTTP response code of the error.
|
|
128
128
|
*/
|
|
@@ -151,16 +151,16 @@ export type _Error = {
|
|
|
151
151
|
* Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).
|
|
152
152
|
*
|
|
153
153
|
*/
|
|
154
|
-
|
|
154
|
+
type Filter = string;
|
|
155
155
|
/**
|
|
156
156
|
* The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
157
157
|
*/
|
|
158
|
-
|
|
158
|
+
type PageOffset = string;
|
|
159
159
|
/**
|
|
160
160
|
* The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
|
|
161
161
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
type PageLimit = string;
|
|
163
|
+
type GetAllFilesData = {
|
|
164
164
|
body?: never;
|
|
165
165
|
path?: never;
|
|
166
166
|
query?: {
|
|
@@ -181,14 +181,14 @@ export type GetAllFilesData = {
|
|
|
181
181
|
};
|
|
182
182
|
url: "/v2/files";
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
type GetAllFilesErrors = {
|
|
185
185
|
/**
|
|
186
186
|
* Internal server error. There was a system failure in the platform.
|
|
187
187
|
*/
|
|
188
188
|
500: ErrorResponse;
|
|
189
189
|
};
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
type GetAllFilesError = GetAllFilesErrors[keyof GetAllFilesErrors];
|
|
191
|
+
type GetAllFilesResponses = {
|
|
192
192
|
/**
|
|
193
193
|
* OK
|
|
194
194
|
*/
|
|
@@ -198,8 +198,8 @@ export type GetAllFilesResponses = {
|
|
|
198
198
|
links?: ResultsLinks;
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
type GetAllFilesResponse = GetAllFilesResponses[keyof GetAllFilesResponses];
|
|
202
|
+
type CreateAFileData = {
|
|
203
203
|
body: {
|
|
204
204
|
/**
|
|
205
205
|
* Indicates the file you want to upload.
|
|
@@ -214,7 +214,7 @@ export type CreateAFileData = {
|
|
|
214
214
|
query?: never;
|
|
215
215
|
url: "/v2/files";
|
|
216
216
|
};
|
|
217
|
-
|
|
217
|
+
type CreateAFileErrors = {
|
|
218
218
|
/**
|
|
219
219
|
* Bad request. The request failed validation.
|
|
220
220
|
*/
|
|
@@ -228,8 +228,8 @@ export type CreateAFileErrors = {
|
|
|
228
228
|
*/
|
|
229
229
|
500: ErrorResponse;
|
|
230
230
|
};
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
type CreateAFileError = CreateAFileErrors[keyof CreateAFileErrors];
|
|
232
|
+
type CreateAFileResponses = {
|
|
233
233
|
/**
|
|
234
234
|
* Created
|
|
235
235
|
*/
|
|
@@ -237,8 +237,8 @@ export type CreateAFileResponses = {
|
|
|
237
237
|
data?: File;
|
|
238
238
|
};
|
|
239
239
|
};
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
type CreateAFileResponse = CreateAFileResponses[keyof CreateAFileResponses];
|
|
241
|
+
type DeleteAFileData = {
|
|
242
242
|
body?: never;
|
|
243
243
|
path: {
|
|
244
244
|
/**
|
|
@@ -249,7 +249,7 @@ export type DeleteAFileData = {
|
|
|
249
249
|
query?: never;
|
|
250
250
|
url: "/v2/files/{fileID}";
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
type DeleteAFileErrors = {
|
|
253
253
|
/**
|
|
254
254
|
* Bad request. The request failed validation.
|
|
255
255
|
*/
|
|
@@ -263,15 +263,15 @@ export type DeleteAFileErrors = {
|
|
|
263
263
|
*/
|
|
264
264
|
500: ErrorResponse;
|
|
265
265
|
};
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
type DeleteAFileError = DeleteAFileErrors[keyof DeleteAFileErrors];
|
|
267
|
+
type DeleteAFileResponses = {
|
|
268
268
|
/**
|
|
269
269
|
* No Content
|
|
270
270
|
*/
|
|
271
271
|
204: void;
|
|
272
272
|
};
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
type DeleteAFileResponse = DeleteAFileResponses[keyof DeleteAFileResponses];
|
|
274
|
+
type GetAFileData = {
|
|
275
275
|
body?: never;
|
|
276
276
|
path: {
|
|
277
277
|
/**
|
|
@@ -282,7 +282,7 @@ export type GetAFileData = {
|
|
|
282
282
|
query?: never;
|
|
283
283
|
url: "/v2/files/{fileID}";
|
|
284
284
|
};
|
|
285
|
-
|
|
285
|
+
type GetAFileErrors = {
|
|
286
286
|
/**
|
|
287
287
|
* Forbidden. The operation is forbidden on this entity.
|
|
288
288
|
*/
|
|
@@ -292,10 +292,12 @@ export type GetAFileErrors = {
|
|
|
292
292
|
*/
|
|
293
293
|
500: ErrorResponse;
|
|
294
294
|
};
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
type GetAFileError = GetAFileErrors[keyof GetAFileErrors];
|
|
296
|
+
type GetAFileResponses = {
|
|
297
297
|
200: {
|
|
298
298
|
data?: File;
|
|
299
299
|
};
|
|
300
300
|
};
|
|
301
|
-
|
|
301
|
+
type GetAFileResponse = GetAFileResponses[keyof GetAFileResponses];
|
|
302
|
+
|
|
303
|
+
export type { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.gen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
client: () => import_sdk.client,
|
|
23
|
+
createClient: () => import_client_fetch.createClient
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
__reExport(index_exports, require('./client/index.cjs'), module.exports);
|
|
27
|
+
var import_client_fetch = require("@hey-api/client-fetch");
|
|
28
|
+
var import_sdk = require('./client/sdk.gen.cjs');
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
client,
|
|
32
|
+
createClient,
|
|
33
|
+
...require('./client/index.cjs')
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./client\"\nimport { createClient } from \"@hey-api/client-fetch\"\nimport type { Client } from \"@hey-api/client-fetch\"\nexport { createClient }\nexport type { Client }\nexport { client } from \"./client/sdk.gen\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,qBAAd;AACA,0BAA6B;AAI7B,iBAAuB;","names":[]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error } from './client/types.gen.cjs';
|
|
2
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles } from './client/sdk.gen.cjs';
|
|
3
|
+
export { Client, createClient } from '@hey-api/client-fetch';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export { client } from "./client/sdk.gen";
|
|
1
|
+
export { CreateAFileData, CreateAFileError, CreateAFileErrors, CreateAFileResponse, CreateAFileResponses, DeleteAFileData, DeleteAFileError, DeleteAFileErrors, DeleteAFileResponse, DeleteAFileResponses, ErrorResponse, File, FileLink, FileMeta, Filter, GetAFileData, GetAFileError, GetAFileErrors, GetAFileResponse, GetAFileResponses, GetAllFilesData, GetAllFilesError, GetAllFilesErrors, GetAllFilesResponse, GetAllFilesResponses, Links, PageLimit, PageOffset, ResultsLinks, ResultsMeta, Uuid, _Error } from './client/types.gen.js';
|
|
2
|
+
export { client, createAFile, deleteAFile, getAFile, getAllFiles } from './client/sdk.gen.js';
|
|
3
|
+
export { Client, createClient } from '@hey-api/client-fetch';
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./client\"\nimport { createClient } from \"@hey-api/client-fetch\"\nimport type { Client } from \"@hey-api/client-fetch\"\nexport { createClient }\nexport type { Client }\nexport { client } from \"./client/sdk.gen\"\n"],"mappings":"AAAA,cAAc;AACd,SAAS,oBAAoB;AAI7B,SAAS,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epcc-sdk/sdks-files",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"require": "./dist/index.js"
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
12
14
|
},
|
|
13
|
-
"
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
14
19
|
},
|
|
15
20
|
"./package.json": "./package.json"
|
|
16
21
|
},
|
|
@@ -25,14 +30,17 @@
|
|
|
25
30
|
"@hey-api/openapi-ts": "0.61.2",
|
|
26
31
|
"typescript": "^5.5.3",
|
|
27
32
|
"@types/ejs": "^3.1.5",
|
|
28
|
-
"ejs": "^3.1.10"
|
|
33
|
+
"ejs": "^3.1.10",
|
|
34
|
+
"esbuild-fix-imports-plugin": "^1.0.19",
|
|
35
|
+
"esbuild-plugin-file-path-extensions": "^1.0.0",
|
|
36
|
+
"tsup": "^8.4.0"
|
|
29
37
|
},
|
|
30
38
|
"dependencies": {
|
|
31
39
|
"@hey-api/client-fetch": "0.6.0"
|
|
32
40
|
},
|
|
33
41
|
"scripts": {
|
|
34
|
-
"build": "pnpm openapi-ts && pnpm
|
|
35
|
-
"
|
|
42
|
+
"build": "pnpm openapi-ts && pnpm build:tsup",
|
|
43
|
+
"build:tsup": "tsup",
|
|
36
44
|
"openapi-ts": "openapi-ts"
|
|
37
45
|
}
|
|
38
46
|
}
|
package/dist/client/index.js
DELETED
package/dist/client/sdk.gen.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
import { createClient, createConfig, formDataBodySerializer, } from "@hey-api/client-fetch";
|
|
14
|
-
export var client = createClient(createConfig());
|
|
15
|
-
/**
|
|
16
|
-
* Get all Files
|
|
17
|
-
* Retrieves all files.
|
|
18
|
-
*
|
|
19
|
-
* ### Filtering
|
|
20
|
-
*
|
|
21
|
-
* For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering).
|
|
22
|
-
*
|
|
23
|
-
* The following operators and attributes are available when filtering on this endpoint.
|
|
24
|
-
*
|
|
25
|
-
* | Attribute | Type | Operators | Example |
|
|
26
|
-
* |:----------------------|:----------|:--------------------------|:-------------|
|
|
27
|
-
* | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |
|
|
28
|
-
* | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |
|
|
29
|
-
* | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |
|
|
30
|
-
* | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export var getAllFiles = function (options) {
|
|
34
|
-
var _a;
|
|
35
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
|
|
36
|
-
{
|
|
37
|
-
scheme: "bearer",
|
|
38
|
-
type: "http",
|
|
39
|
-
},
|
|
40
|
-
], url: "/v2/files" }));
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Create a File
|
|
44
|
-
* Create a File
|
|
45
|
-
*/
|
|
46
|
-
export var createAFile = function (options) {
|
|
47
|
-
var _a;
|
|
48
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post(__assign(__assign(__assign({}, options), formDataBodySerializer), { headers: __assign({ "Content-Type": null }, options === null || options === void 0 ? void 0 : options.headers), security: [
|
|
49
|
-
{
|
|
50
|
-
scheme: "bearer",
|
|
51
|
-
type: "http",
|
|
52
|
-
},
|
|
53
|
-
], url: "/v2/files" }));
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Delete a File
|
|
57
|
-
* Delete a File
|
|
58
|
-
*/
|
|
59
|
-
export var deleteAFile = function (options) {
|
|
60
|
-
var _a;
|
|
61
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).delete(__assign(__assign({}, options), { security: [
|
|
62
|
-
{
|
|
63
|
-
scheme: "bearer",
|
|
64
|
-
type: "http",
|
|
65
|
-
},
|
|
66
|
-
], url: "/v2/files/{fileID}" }));
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Get a File
|
|
70
|
-
* Get a File
|
|
71
|
-
*/
|
|
72
|
-
export var getAFile = function (options) {
|
|
73
|
-
var _a;
|
|
74
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
|
|
75
|
-
{
|
|
76
|
-
scheme: "bearer",
|
|
77
|
-
type: "http",
|
|
78
|
-
},
|
|
79
|
-
], url: "/v2/files/{fileID}" }));
|
|
80
|
-
};
|
package/dist/client/types.gen.js
DELETED
package/dist/index.js
DELETED