New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@short.io/client-node

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@short.io/client-node - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

dist/example.d.ts

5

dist/index.d.ts

@@ -1,2 +0,3 @@

export * from './types.gen.js';
export * from './sdk.gen.js';
export * from './generated/types.gen.js';
export * from './generated/sdk.gen.js';
export declare const setApiKey: (apiKey: string) => void;

15

dist/index.js

@@ -1,3 +0,14 @@

export * from './types.gen.js';
export * from './sdk.gen.js';
import { client } from "./generated/index.js";
export * from './generated/types.gen.js';
export * from './generated/sdk.gen.js';
client.setConfig({
baseUrl: "https://api.short.io"
});
export const setApiKey = (apiKey) => {
client.setConfig({
headers: {
authorization: apiKey
}
});
};
//# sourceMappingURL=index.js.map
{
"name": "@short.io/client-node",
"version": "2.1.1",
"version": "2.2.0",
"description": "",

@@ -11,3 +11,3 @@ "main": "dist/index.js",

"scripts": {
"generate": "openapi-ts -f openapi/config.ts && sed -i 's/createConfig()/createConfig({\"baseUrl\": \"https:\\/\\/api.short.io\"})/' src/sdk.gen.ts",
"generate": "openapi-ts -f openapi/config.ts",
"compile": "tsc --build . && tsc-alias",

@@ -37,3 +37,3 @@ "prepare": "npm run compile",

"@eslint/js": "^9.16.0",
"@hey-api/openapi-ts": "^0.58.0",
"@hey-api/openapi-ts": "^0.59.0",
"@types/node": "^22.10.1",

@@ -47,5 +47,5 @@ "eslint": "^9.16.0",

"dependencies": {
"@hey-api/client-fetch": "^0.5.0"
"@hey-api/client-fetch": "^0.5.1"
},
"packageManager": "yarn@1.22.22+sha256.c17d3797fb9a9115bf375e31bfd30058cac6bc9c3b8807a3d8cb2094794b51ca"
}

@@ -24,10 +24,5 @@ # Short.io Node.js SDK

```js
import { client } from "@short.io/client-node";
import { setApiKey } from "@short.io/client-node";
client.setConfig({
baseUrl: "https://api.short.io",
headers: {
Authorization: "YOUR_API_KEY",
},
});
setApiKey("YOUR_API_KEY");
```

@@ -41,3 +36,2 @@

import {
client,
getApiDomains,

@@ -47,8 +41,4 @@ getLinksExpand,

} from "@short.io/client-node";
```
Pass created client to the methods:
```js
const domainsResp = await getApiDomains({ client });
const domainsResp = await getApiDomains();
```

@@ -55,0 +45,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc