@fill-easy/api 1.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 ADDED
@@ -0,0 +1,35 @@
1
+ # Fill Easy API SDK
2
+
3
+ Type-safe SDK for Fill Easy API, generated from OpenAPI specification.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @fill-easy/api
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import createApiClient from "@fill-easy/api"
15
+
16
+ const client = createApiClient("https://api.fill-easy.com")
17
+
18
+ // Fully typed API calls
19
+ const { data, error } = await client.POST("/iamsmart/v2/request/auth", {
20
+ params: { body: {} },
21
+ })
22
+
23
+ if (error) {
24
+ console.error(error)
25
+ } else {
26
+ console.log(data)
27
+ }
28
+ ```
29
+
30
+ ## Features
31
+
32
+ - ✅ Fully type-safe with TypeScript
33
+ - ✅ Auto-completion for all API endpoints
34
+ - ✅ Lightweight - uses native fetch API
35
+ - ✅ Generated from OpenAPI specification
@@ -0,0 +1,4 @@
1
+ import type { paths } from "./openapi.d.ts";
2
+ export type { paths };
3
+ export declare function createApiClient(baseUrl: string, options?: RequestInit): import("openapi-fetch").Client<paths, `${string}/${string}`>;
4
+ export default createApiClient;
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createApiClient = createApiClient;
7
+ /* global RequestInit */
8
+ const openapi_fetch_1 = __importDefault(require("openapi-fetch"));
9
+ function createApiClient(baseUrl, options) {
10
+ return (0, openapi_fetch_1.default)({ baseUrl, ...options });
11
+ }
12
+ exports.default = createApiClient;
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@fill-easy/api",
3
+ "version": "1.0.3",
4
+ "description": "Type-safe SDK for Fill Easy API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "dependencies": {
15
+ "openapi-fetch": "^0.12.0"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.0.0"
19
+ },
20
+ "keywords": [
21
+ "sdk",
22
+ "api",
23
+ "openapi",
24
+ "fill-easy",
25
+ "type-safe",
26
+ "kyc",
27
+ "kyb"
28
+ ]
29
+ }