json-project-ai-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ fetchTodo: (todoIndex: number) => Promise<import("axios").AxiosResponse<any, any, {}>>;
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=todos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":";2BAI2B,MAAM;;AADjC,wBAIC"}
@@ -0,0 +1,8 @@
1
+ import axios from "axios";
2
+ import config from "../config.js";
3
+ export default {
4
+ fetchTodo: (todoIndex) => {
5
+ return axios.get(`${config.JSON_PLACEHOLDER_API_BASE_URL}/todos/${todoIndex}`);
6
+ }
7
+ };
8
+ //# sourceMappingURL=todos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.js","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,cAAc,CAAA;AAEjC,eAAe;IACX,SAAS,EAAE,CAAC,SAAiB,EAAE,EAAE;QAC7B,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,6BAA6B,UAAU,SAAS,EAAE,CAAC,CAAA;IAClF,CAAC;CACJ,CAAA"}
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ readonly JSON_PLACEHOLDER_API_BASE_URL: "https://jsonplaceholder.typicode.com";
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAA,wBAEU"}
package/dist/config.js ADDED
@@ -0,0 +1,4 @@
1
+ export default {
2
+ JSON_PLACEHOLDER_API_BASE_URL: 'https://jsonplaceholder.typicode.com'
3
+ };
4
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAc;IACV,6BAA6B,EAAE,sCAAsC;CAC/D,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare class JSONPlaceholderSDK {
2
+ constructor();
3
+ fetchTodo: (todoIndex: number) => Promise<void>;
4
+ }
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,qBAAa,kBAAkB;;IAK3B,SAAS,GAAU,WAAU,MAAM,mBAMlC;CACJ"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import todos from "./api/todos.js";
2
+ export class JSONPlaceholderSDK {
3
+ constructor() {
4
+ //
5
+ }
6
+ fetchTodo = async (todoIndex) => {
7
+ try {
8
+ const { data: fetchTodo } = await todos.fetchTodo(todoIndex);
9
+ }
10
+ catch (err) {
11
+ throw err;
12
+ }
13
+ };
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAA;AAGlC,MAAM,OAAO,kBAAkB;IAC3B;QACI,EAAE;IACN,CAAC;IAED,SAAS,GAAG,KAAK,EAAE,SAAgB,EAAE,EAAE;QACnC,IAAG,CAAC;YACA,MAAM,EAAC,IAAI,EAAE,SAAS,EAAC,GAAqB,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QAChF,CAAC;QAAC,OAAM,GAAG,EAAC,CAAC;YACT,MAAM,GAAG,CAAA;QACb,CAAC;IACL,CAAC,CAAA;CACJ"}
@@ -0,0 +1,7 @@
1
+ export interface IFetchTodo {
2
+ userId: number;
3
+ id: number;
4
+ title: string;
5
+ completed: boolean;
6
+ }
7
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,MAAM,EAAG,MAAM,CAAA;IACf,EAAE,EAAG,MAAM,CAAA;IACX,KAAK,EAAG,MAAM,CAAA;IACd,SAAS,EAAG,OAAO,CAAA;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "json-project-ai-sdk",
3
+ "version": "1.0.0",
4
+ "description": "json-project-ai-sdk",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "npx tsc",
9
+ "prepublishOnly": "npm run build",
10
+ "dev": "nodemon src/index.ts",
11
+ "start": "node dist/index.ts"
12
+ },
13
+ "files":[
14
+ "dist/**/*"
15
+ ],
16
+ "keywords": [],
17
+ "author": "abhijit",
18
+ "license": "ISC",
19
+ "type": "module",
20
+ "devDependencies": {
21
+ "@types/node": "^25.2.2",
22
+ "nodemon": "^3.1.11",
23
+ "prettier": "^3.8.1",
24
+ "ts-node": "^10.9.2",
25
+ "typescript": "^5.9.3"
26
+ },
27
+ "dependencies": {
28
+ "axios": "^1.13.5"
29
+ }
30
+ }