{"id":42855,"library":"http-api-orm","title":"http-api-orm","description":"http-api-orm is an API ORM library for TypeScript, inspired by database ORMs. Version 1.3.0. It treats each API endpoint as a model, with Axios under the hood for HTTP requests. Key differentiators: it provides an ApiModel base class to configure request parameters, manage response data, and chain interceptors in order. Includes a Params class with proxyData() for reactive Vue 3 integration. Requires axios > 0.22.0 and lodash-es > 4.0.0 as peer dependencies.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/pangyunchuan/http-api-orm","tags":["javascript","oop","orm","api","axios","promise","ajax","typescript"],"install":[{"cmd":"npm install http-api-orm","lang":"bash","label":"npm"},{"cmd":"yarn add http-api-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add http-api-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, used for all HTTP requests","package":"axios","optional":false},{"reason":"peer dependency, used internally for utility functions","package":"lodash-es","optional":false}],"imports":[{"note":"This is the default export. Use ESM import.","wrong":"const ApiModel = require('http-api-orm')","symbol":"ApiModel","correct":"import ApiModel from 'http-api-orm'"},{"note":"Params is a named export, not default.","wrong":"import Params from 'http-api-orm'","symbol":"Params","correct":"import { Params } from 'http-api-orm'"},{"note":"ApiResponseMid is a type, use import type.","wrong":"import { ApiResponseMid } from 'http-api-orm'","symbol":"ApiResponseMid","correct":"import type { ApiResponseMid } from 'http-api-orm/types/lib/ApiModel'"}],"quickstart":{"code":"import ApiModel, { Params } from 'http-api-orm';\n\nclass MyApi extends ApiModel {\n  url = '/api/endpoint';\n  params = new Params(() => ({ id: '', detail: true }));\n  data = { name: '', age: 0 };\n}\n\nconst api = new MyApi();\napi.params.data.id = '123';\napi.getResData().then(r => {\n  console.log(r.data);\n});\n","lang":"typescript","description":"Shows how to define an API model with URL, params, and data, then make a request."},"warnings":[{"fix":"Use api.params.data.id instead of api.params.id","message":"Params.data is nested inside params object. To access the actual parameters, use params.data.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap with reactive() when using in Vue: const api = reactive(new MyApi());","message":"proxyData() on Params creates a proxy that accesses the underlying data. Assignments may not trigger Vue reactivity unless used with reactive().","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use import type { ApiResponseMid } from 'http-api-orm/types/lib/ApiModel'","message":"Directly exporting type ApiResponseMid from main entry is deprecated; use the type file.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Install axios@^0.22.0","message":"Axios version 0.22.0 or higher is required; using older versions may cause type mismatch.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'0.22.0':71 '1.3.0':21 '3':67 '4.0.0':76 'ajax':86 'api':3,7,11,25,83 'apimodel':43 'axio':31,70,84 'base':44 'chain':54 'class':45,61 'configur':47 'data':52 'databas':18 'depend':79 'differenti':39 'endpoint':26 'es':75 'hood':34 'http':2,6,36 'http-api-orm':1,5 'includ':58 'inspir':16 'integr':68 'interceptor':55 'javascript':80 'key':38 'librari':13 'lodash':74 'lodash-':73 'manag':50 'model':29 'oop':81 'order':57 'orm':4,8,12,19,82 'param':60 'paramet':49 'peer':78 'promis':85 'provid':41 'proxydata':63 'reactiv':65 'request':37,48 'requir':69 'respons':51 'treat':23 'typescript':15,87 'version':20 'vue':66","created_at":"2026-06-05T16:56:59.735149+00:00","updated_at":"2026-06-05T16:56:59.735149+00:00","problems":[{"fix":"Set moduleResolution to 'node' or 'node16' in tsconfig.json.","cause":"TypeScript project not configured to resolve ESM packages.","error":"Cannot find module 'http-api-orm' or its corresponding type declarations."},{"fix":"Use api.params.data.id to set parameters.","cause":"Treating params as a function instead of an instance.","error":"TypeError: api.params is not a function"},{"fix":"Use new Params(() => ({})).proxyData()","cause":"Calling proxyData without parentheses.","error":"Property 'proxyData' does not exist on type 'Params'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/pangyunchuan/http-api-orm#readme","github":"https://github.com/pangyunchuan/http-api-orm","docs":null,"changelog":null,"pypi":null,"npm":"http-api-orm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}