
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@codat/sdk-connections
Advanced tools
This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.
This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.
You can install this library using npm:
$ npm i -S @codat/sdk-connections
To render the CodatConnections component in React:
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom/client";
import {
CodatConnectionsProps,
initCodatConnections,
} from "@codat/sdk-connections";
const CodatConnections: React.FC<CodatConnectionsProps> = (
props: CodatConnectionsProps
) => {
const [componentMount, setComponentMount] = useState<HTMLDivElement | null>(
null
);
useEffect(() => {
const target = componentMount;
if (target && target.children.length === 0) {
initCodatConnections(target, props);
}
// CodatConnections does not support changing props after initialization.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [componentMount]);
return (
<div
style={{
// Recommended dimensions
width: "460px",
height: "840px",
maxHeight: "95%",
}}
ref={setComponentMount}
></div>
);
};
// The code below is an example of how to render the component at the root level of the application
const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
);
root.render(
<React.StrictMode>
<CodatConnections
accessToken="ACCESS_TOKEN" // This must first be fetched for a given company using the /companies/{companyId}/connectionManagement/accessToken endpoint (See our OAS spec: https://docs.codat.io/codat-api#/operations/get-connection-management-access-token)
onClose={() => alert("onClose")}
onError={() => alert("onError")}
onDisconnect={() => alert("onDisconnect")}
onReconnect={() => alert("onReconnect")}
options={{}}
/>
</React.StrictMode>
);
FAQs
This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.
The npm package @codat/sdk-connections receives a total of 1 weekly downloads. As such, @codat/sdk-connections popularity was classified as not popular.
We found that @codat/sdk-connections demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.