@epcc-sdk/sdks-files 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Elastic Path Software Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,220 @@
1
+ # @epcc-sdk/sdks-files SDK
2
+
3
+ Below you’ll find instructions on how to install, set up, and use the client, along with a list of available operations.
4
+
5
+ ## Features
6
+
7
+ - type-safe response data and errors
8
+ - response data validation and transformation
9
+ - access to the original request and response
10
+ - granular request and response customization options
11
+ - minimal learning curve thanks to extending the underlying technology
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @epcc-sdk/sdks-files
19
+ # or
20
+ pnpm install @epcc-sdk/sdks-files
21
+ # or
22
+ yarn add @epcc-sdk/sdks-files
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Client Usage
28
+
29
+
30
+ Clients are responsible for sending the actual HTTP requests.
31
+
32
+ The Fetch client is built as a thin wrapper on top of Fetch API, extending its functionality. If you're already familiar with Fetch, configuring your client will feel like working directly with Fetch API.
33
+
34
+ You can configure the client in two ways:
35
+
36
+ - Configuring the internal `client` instance directly
37
+ - Using the `createClient` function
38
+
39
+ **When using the operation function to make requests, by default the global client will be used unless another is provided.**
40
+
41
+
42
+ ### 1. Configure the internal `client` instance directly
43
+
44
+ This is the simpler approach. You can call the setConfig() method at the beginning of your application or anytime you need to update the client configuration. You can pass any Fetch API configuration option to setConfig(), and even your own Fetch implementation.
45
+
46
+ ```ts
47
+ import { client } from "@epcc-sdk/sdks-files";
48
+
49
+ client.setConfig({
50
+ // set default base url for requests
51
+ baseUrl: 'https://euwest.api.elasticpath.com',
52
+
53
+ // set default headers for requests
54
+ headers: {
55
+ Authorization: 'Bearer YOUR_AUTH_TOKEN',
56
+ },
57
+ });
58
+ ```
59
+
60
+ The disadvantage of this approach is that your code may call the client instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.
61
+
62
+ ### 2. Using the `createClient` function
63
+
64
+ This is useful when you want to use a different instance of the client for different parts of your application or when you want to use different configurations for different parts of your application.
65
+
66
+ ```ts
67
+ import { createClient } from "@epcc-sdk/sdks-files";
68
+
69
+ // Create the client with your API base URL.
70
+ const client = createClient({
71
+ // set default base url for requests
72
+ baseUrl: "https://euwest.api.elasticpath.com",
73
+ /**
74
+ * Set default headers only for requests made by this client.
75
+ */
76
+ headers: {
77
+ "Custom-Header": 'My Value',
78
+ },
79
+ });
80
+ ```
81
+
82
+ You can also pass this instance to any SDK function through the client option. This will override the default instance from `import { client } from "@epcc-sdk/sdks-files>".
83
+
84
+ ```ts
85
+ const response = await getAFile({
86
+ client: myClient,
87
+ });
88
+ ```
89
+
90
+ ### Direct configuration
91
+
92
+ Alternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.
93
+
94
+ ```ts
95
+ const response = await getAFile({
96
+ baseUrl: 'https://example.com', // <-- override default configuration
97
+ });
98
+ ```
99
+
100
+ ## Interceptors (Middleware)
101
+
102
+ Interceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application. They can be added with use and removed with eject. Below is an example request interceptor
103
+
104
+ ```ts
105
+ import { client } from "@epcc-sdk/sdks-files";
106
+
107
+ // Supports async functions
108
+ client.interceptors.request.use(async (request) => {
109
+ // do something
110
+ return request;
111
+ });
112
+
113
+ client.interceptors.request.eject((request) => {
114
+ // do something
115
+ return request;
116
+ });
117
+
118
+ ```
119
+
120
+ and an example response interceptor
121
+
122
+ ```ts
123
+ import { client } from "@epcc-sdk/sdks-files";
124
+
125
+ client.interceptors.response.use((response) => {
126
+ // do something
127
+ return response;
128
+ });
129
+
130
+ client.interceptors.response.eject((response) => {
131
+ // do something
132
+ return response;
133
+ });
134
+ ```
135
+
136
+ > **_Tip:_** To eject, you must provide a reference to the function that was passed to use().
137
+
138
+ ## Authentication
139
+
140
+ We are working to provide helpers to handle auth easier for you but for now using an interceptor is the easiest method.
141
+
142
+ ```ts
143
+ import { client } from "@epcc-sdk/sdks-files";
144
+
145
+ client.interceptors.request.use((request, options) => {
146
+ request.headers.set('Authorization', 'Bearer MY_TOKEN');
147
+ return request;
148
+ });
149
+ ```
150
+
151
+ ## Build URL
152
+
153
+ If you need to access the compiled URL, you can use the buildUrl() method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.
154
+
155
+ ```ts
156
+ type FooData = {
157
+ path: {
158
+ fooId: number;
159
+ };
160
+ query?: {
161
+ bar?: string;
162
+ };
163
+ url: '/foo/{fooId}';
164
+ };
165
+
166
+ const url = client.buildUrl<FooData>({
167
+ path: {
168
+ fooId: 1,
169
+ },
170
+ query: {
171
+ bar: 'baz',
172
+ },
173
+ url: '/foo/{fooId}',
174
+ });
175
+ console.log(url); // prints '/foo/1?bar=baz'
176
+ ```
177
+
178
+
179
+ ---
180
+
181
+
182
+
183
+
184
+
185
+ ## Operation Usage
186
+ The following examples demonstrate how to use the operation function to make requests.
187
+
188
+ ```ts
189
+ import { getAFile } from "@epcc-sdk/sdks-files";
190
+
191
+ const product = await getAFile({
192
+ // client: localClient, // optional if you have a client instance you want to use otherwise the global client will be used
193
+ path: {
194
+ ...
195
+ },
196
+ query: {
197
+ ...
198
+ },
199
+ });
200
+ ```
201
+
202
+ ---
203
+
204
+
205
+
206
+ ## Available Operations
207
+
208
+
209
+
210
+ - **`getAllFiles`** (`GET /v2/files`)
211
+
212
+ - **`createAFile`** (`POST /v2/files`)
213
+
214
+ - **`deleteAFile`** (`DELETE /v2/files/{fileID}`)
215
+
216
+ - **`getAFile`** (`GET /v2/files/{fileID}`)
217
+
218
+
219
+
220
+ ---
@@ -0,0 +1,2 @@
1
+ export * from "./types.gen";
2
+ export * from "./sdk.gen";
@@ -0,0 +1,3 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export * from "./types.gen";
3
+ export * from "./sdk.gen";
@@ -0,0 +1,45 @@
1
+ import { type Options } from "@hey-api/client-fetch";
2
+ import type { GetAllFilesData, CreateAFileData, DeleteAFileData, GetAFileData } from "./types.gen";
3
+ export declare const client: import("@hey-api/client-fetch").Client<Request, Response, unknown, import("@hey-api/client-fetch").RequestOptions<boolean, string>>;
4
+ /**
5
+ * Get all Files
6
+ * Retrieves all files.
7
+ *
8
+ * ### Filtering
9
+ *
10
+ * For general filtering syntax, see [Filtering](/guides/Getting-Started/filtering).
11
+ *
12
+ * The following operators and attributes are available when filtering on this endpoint.
13
+ *
14
+ * | Attribute | Type | Operators | Example |
15
+ * |:----------------------|:----------|:--------------------------|:-------------|
16
+ * | `file_name` | `string` | `eq` / `like` | `eq(file_name, my_image.jpg)` |
17
+ * | `width` | `integer` | `gt` / `ge` / `lt` / `le` | `gt(width,200)` |
18
+ * | `height` | `integer` | `gt` / `ge` / `lt` / `le` | `lt(height,500)` |
19
+ * | `file_size` | `integer` | `gt` / `ge` / `lt` / `le` | `le(file_size,20953)` |
20
+ *
21
+ */
22
+ export declare const getAllFiles: <ThrowOnError extends boolean = false>(options?: Options<GetAllFilesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
23
+ data?: Array<import("./types.gen").File>;
24
+ meta?: import("./types.gen").ResultsMeta;
25
+ links?: import("./types.gen").ResultsLinks;
26
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
27
+ /**
28
+ * Create a File
29
+ * Create a File
30
+ */
31
+ export declare const createAFile: <ThrowOnError extends boolean = false>(options: Options<CreateAFileData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
32
+ data?: import("./types.gen").File;
33
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
34
+ /**
35
+ * Delete a File
36
+ * Delete a File
37
+ */
38
+ export declare const deleteAFile: <ThrowOnError extends boolean = false>(options: Options<DeleteAFileData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").ErrorResponse, ThrowOnError>;
39
+ /**
40
+ * Get a File
41
+ * Get a File
42
+ */
43
+ export declare const getAFile: <ThrowOnError extends boolean = false>(options: Options<GetAFileData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
44
+ data?: import("./types.gen").File;
45
+ }, import("./types.gen").ErrorResponse, ThrowOnError>;
@@ -0,0 +1,80 @@
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
+ };
@@ -0,0 +1,301 @@
1
+ export type ErrorResponse = {
2
+ errors: Array<_Error>;
3
+ };
4
+ export 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
+ export 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
+ export 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
+ export 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
+ export 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
+ export type FileLink = {
119
+ /**
120
+ * The publicly available URL for this file.
121
+ */
122
+ href?: string;
123
+ };
124
+ export type Uuid = string;
125
+ export 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
+ export 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
+ export 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
+ export type PageLimit = string;
163
+ export 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
+ export type GetAllFilesErrors = {
185
+ /**
186
+ * Internal server error. There was a system failure in the platform.
187
+ */
188
+ 500: ErrorResponse;
189
+ };
190
+ export type GetAllFilesError = GetAllFilesErrors[keyof GetAllFilesErrors];
191
+ export type GetAllFilesResponses = {
192
+ /**
193
+ * OK
194
+ */
195
+ 200: {
196
+ data?: Array<File>;
197
+ meta?: ResultsMeta;
198
+ links?: ResultsLinks;
199
+ };
200
+ };
201
+ export type GetAllFilesResponse = GetAllFilesResponses[keyof GetAllFilesResponses];
202
+ export 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
+ export 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
+ export type CreateAFileError = CreateAFileErrors[keyof CreateAFileErrors];
232
+ export type CreateAFileResponses = {
233
+ /**
234
+ * Created
235
+ */
236
+ 201: {
237
+ data?: File;
238
+ };
239
+ };
240
+ export type CreateAFileResponse = CreateAFileResponses[keyof CreateAFileResponses];
241
+ export 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
+ export 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
+ export type DeleteAFileError = DeleteAFileErrors[keyof DeleteAFileErrors];
267
+ export type DeleteAFileResponses = {
268
+ /**
269
+ * No Content
270
+ */
271
+ 204: void;
272
+ };
273
+ export type DeleteAFileResponse = DeleteAFileResponses[keyof DeleteAFileResponses];
274
+ export 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
+ export 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
+ export type GetAFileError = GetAFileErrors[keyof GetAFileErrors];
296
+ export type GetAFileResponses = {
297
+ 200: {
298
+ data?: File;
299
+ };
300
+ };
301
+ export type GetAFileResponse = GetAFileResponses[keyof GetAFileResponses];
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./client";
2
+ import { Client, createClient } from "@hey-api/client-fetch";
3
+ export { createClient, Client };
4
+ export { client } from "./client/sdk.gen";
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from "./client";
2
+ import { createClient } from "@hey-api/client-fetch";
3
+ export { createClient };
4
+ export { client } from "./client/sdk.gen";
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@epcc-sdk/sdks-files",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "node": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js"
12
+ },
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist/**"
19
+ ],
20
+ "keywords": [],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "devDependencies": {
25
+ "@hey-api/openapi-ts": "0.61.2",
26
+ "typescript": "^5.5.3",
27
+ "@types/ejs": "^3.1.5",
28
+ "ejs": "^3.1.10"
29
+ },
30
+ "dependencies": {
31
+ "@hey-api/client-fetch": "0.6.0"
32
+ },
33
+ "scripts": {
34
+ "build": "pnpm openapi-ts && pnpm tsc:build",
35
+ "tsc:build": "tsc -p tsconfig.node.json",
36
+ "openapi-ts": "openapi-ts"
37
+ }
38
+ }