@epcc-sdk/sdks-files 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # @epcc-sdk/sdks-files SDK
2
2
 
3
- Below you’ll find instructions on how to install, set up, and use the client, along with a list of available operations.
3
+ Below you'll find instructions on how to install, set up, and use the client, along with a list of available operations.
4
+
4
5
 
5
6
  ## Features
6
7
 
@@ -12,6 +13,7 @@ Below you’ll find instructions on how to install, set up, and use the client,
12
13
 
13
14
  ---
14
15
 
16
+
15
17
  ## Installation
16
18
 
17
19
  ```bash
@@ -217,4 +219,5 @@ const product = await getAFile({
217
219
 
218
220
 
219
221
 
220
- ---
222
+
223
+ ---
@@ -1 +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":[]}
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 * | `id` | `string` | `in` | `in(id,file-id-1,file-id-2,file-id-3)` |\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 * #### Bulk File Retrieval\n *\n * To retrieve multiple files by their IDs in a single request, use the `in` operator with a comma-separated list of file IDs:\n *\n * ```\n * GET /v2/files?filter=in(id,06b881bd-f152-4c36-8658-7132a8fab49c,ec73567b-04e8-4000-a11a-7e1407cc2f21)\n * ```\n *\n * This is more efficient than making separate requests for each file and is recommended for bulk operations.\n *\n * **Note on invalid IDs**: If any IDs in the filter are missing, malformed, or do not exist in the store, they will be silently ignored. The response will only include files that were successfully found. For example, if you request 5 IDs but only 3 exist, the response will contain 3 files with `total: 3` in the metadata.\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;AAiC1C,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":[]}
@@ -15,11 +15,24 @@ declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _
15
15
  *
16
16
  * | Attribute | Type | Operators | Example |
17
17
  * |:----------------------|:----------|:--------------------------|:-------------|
18
+ * | `id` | `string` | `in` | `in(id,file-id-1,file-id-2,file-id-3)` |
18
19
  * | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |
19
20
  * | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |
20
21
  * | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |
21
22
  * | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
22
23
  *
24
+ * #### Bulk File Retrieval
25
+ *
26
+ * To retrieve multiple files by their IDs in a single request, use the `in` operator with a comma-separated list of file IDs:
27
+ *
28
+ * ```
29
+ * GET /v2/files?filter=in(id,06b881bd-f152-4c36-8658-7132a8fab49c,ec73567b-04e8-4000-a11a-7e1407cc2f21)
30
+ * ```
31
+ *
32
+ * This is more efficient than making separate requests for each file and is recommended for bulk operations.
33
+ *
34
+ * **Note on invalid IDs**: If any IDs in the filter are missing, malformed, or do not exist in the store, they will be silently ignored. The response will only include files that were successfully found. For example, if you request 5 IDs but only 3 exist, the response will contain 3 files with `total: 3` in the metadata.
35
+ *
23
36
  */
24
37
  declare const getAllFiles: <ThrowOnError extends boolean = false>(options?: Options<GetAllFilesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
25
38
  data?: Array<File>;
@@ -15,11 +15,24 @@ declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _
15
15
  *
16
16
  * | Attribute | Type | Operators | Example |
17
17
  * |:----------------------|:----------|:--------------------------|:-------------|
18
+ * | `id` | `string` | `in` | `in(id,file-id-1,file-id-2,file-id-3)` |
18
19
  * | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |
19
20
  * | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |
20
21
  * | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |
21
22
  * | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
22
23
  *
24
+ * #### Bulk File Retrieval
25
+ *
26
+ * To retrieve multiple files by their IDs in a single request, use the `in` operator with a comma-separated list of file IDs:
27
+ *
28
+ * ```
29
+ * GET /v2/files?filter=in(id,06b881bd-f152-4c36-8658-7132a8fab49c,ec73567b-04e8-4000-a11a-7e1407cc2f21)
30
+ * ```
31
+ *
32
+ * This is more efficient than making separate requests for each file and is recommended for bulk operations.
33
+ *
34
+ * **Note on invalid IDs**: If any IDs in the filter are missing, malformed, or do not exist in the store, they will be silently ignored. The response will only include files that were successfully found. For example, if you request 5 IDs but only 3 exist, the response will contain 3 files with `total: 3` in the metadata.
35
+ *
23
36
  */
24
37
  declare const getAllFiles: <ThrowOnError extends boolean = false>(options?: Options<GetAllFilesData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<{
25
38
  data?: Array<File>;
@@ -1 +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":[]}
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 * | `id` | `string` | `in` | `in(id,file-id-1,file-id-2,file-id-3)` |\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 * #### Bulk File Retrieval\n *\n * To retrieve multiple files by their IDs in a single request, use the `in` operator with a comma-separated list of file IDs:\n *\n * ```\n * GET /v2/files?filter=in(id,06b881bd-f152-4c36-8658-7132a8fab49c,ec73567b-04e8-4000-a11a-7e1407cc2f21)\n * ```\n *\n * This is more efficient than making separate requests for each file and is recommended for bulk operations.\n *\n * **Note on invalid IDs**: If any IDs in the filter are missing, malformed, or do not exist in the store, they will be silently ignored. The response will only include files that were successfully found. For example, if you request 5 IDs but only 3 exist, the response will contain 3 files with `total: 3` in the metadata.\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;AAiC1C,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":[]}
@@ -1 +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":[]}
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 * The current page.\n */\n current?: 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 * The previous page. This is `null` if on the first page.\n */\n prev?: string | null\n /**\n * The next page. This is `null` if there is no next page.\n */\n next?: 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 * Bad request. The request failed validation.\n */\n 400: ErrorResponse\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":[]}
@@ -103,6 +103,10 @@ type ResultsLinks = {
103
103
  * Single entities use a self parameter with a link to that specific resource.
104
104
  */
105
105
  self?: string | null;
106
+ /**
107
+ * The current page.
108
+ */
109
+ current?: string | null;
106
110
  /**
107
111
  * Always the first page.
108
112
  */
@@ -111,6 +115,14 @@ type ResultsLinks = {
111
115
  * This is `null` if there is only one page.
112
116
  */
113
117
  last?: string | null;
118
+ /**
119
+ * The previous page. This is `null` if on the first page.
120
+ */
121
+ prev?: string | null;
122
+ /**
123
+ * The next page. This is `null` if there is no next page.
124
+ */
125
+ next?: string | null;
114
126
  };
115
127
  /**
116
128
  * The publicly available URL for this file.
@@ -182,6 +194,10 @@ type GetAllFilesData = {
182
194
  url: "/v2/files";
183
195
  };
184
196
  type GetAllFilesErrors = {
197
+ /**
198
+ * Bad request. The request failed validation.
199
+ */
200
+ 400: ErrorResponse;
185
201
  /**
186
202
  * Internal server error. There was a system failure in the platform.
187
203
  */
@@ -103,6 +103,10 @@ type ResultsLinks = {
103
103
  * Single entities use a self parameter with a link to that specific resource.
104
104
  */
105
105
  self?: string | null;
106
+ /**
107
+ * The current page.
108
+ */
109
+ current?: string | null;
106
110
  /**
107
111
  * Always the first page.
108
112
  */
@@ -111,6 +115,14 @@ type ResultsLinks = {
111
115
  * This is `null` if there is only one page.
112
116
  */
113
117
  last?: string | null;
118
+ /**
119
+ * The previous page. This is `null` if on the first page.
120
+ */
121
+ prev?: string | null;
122
+ /**
123
+ * The next page. This is `null` if there is no next page.
124
+ */
125
+ next?: string | null;
114
126
  };
115
127
  /**
116
128
  * The publicly available URL for this file.
@@ -182,6 +194,10 @@ type GetAllFilesData = {
182
194
  url: "/v2/files";
183
195
  };
184
196
  type GetAllFilesErrors = {
197
+ /**
198
+ * Bad request. The request failed validation.
199
+ */
200
+ 400: ErrorResponse;
185
201
  /**
186
202
  * Internal server error. There was a system failure in the platform.
187
203
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-files",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",