
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
api-doc-js-sdk
Advanced tools
Official repository of the SDK used in the "Api Doc" project, this SDK consists of an abstraction of the Api-Doc rules, it contains Knex as a base, and has migration encapsulated within itself, with that, the user will be free to be an independent project from Expressjs, which is the base where the official Api Rest was built

$ npm install api-doc-js-sdk
or
$ yarn add install api-doc-js-sdk
The "Api Doc - SDK" uses the knex as a base, so the whole mechanism behind it is based on knex, including its settings format.
import ApiDoc from "api-doc-js-doc";
const config = {
dev: {
client: "pg",
connection: {
port: process.env.PORTDB,
host: process.env.HOSTDB,
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DB,
},
pool: { min: 0, max: 10, idleTimeoutMillis: 500 },
},
};
export default new ApiDoc(config.dev, "TheApiSecretKey");
import apiDoc from "../config/api";
const name = "name";
const email = "email@teste.com";
const password = "passwordTest";
// Async Await / Try Catch
async function newUserAsyncAwait() {
try {
const user = await apiDoc.userRegister(name, email, password);
console.log(user); // return new user
} catch (error) {
console.log(error.message); // return an eventual error
}
}
// Then Catch
apiDoc
.userRegister(name, email, password)
.then((newUser) => {
console.log(newUser); // return new user
})
.catch((err) => {
console.log(err); // return an eventual error
});
All other examples can be seen in the Api Doc, there the SDK is 100% used.
FAQs
SDK for Api Doc development
We found that api-doc-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.