{"_id":"@codat/sdk-connections","_rev":"8-634f79793fb38332c5dfdefc2f182b4e","name":"@codat/sdk-connections","dist-tags":{"latest":"1.2.0"},"versions":{"0.0.1-alpha.0":{"name":"@codat/sdk-connections","version":"0.0.1-alpha.0","_id":"@codat/sdk-connections@0.0.1-alpha.0","maintainers":[{"name":"tigerswithguitars","email":"jdryhurstsmith@gmail.com"},{"name":"mcclowes","email":"contact@mcclowes.com"},{"name":"lucy-m","email":"l.mair@codat.io"},{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"dist":{"shasum":"b00aef8eaa8ff6bbee29e90fac9cd5baff385344","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-0.0.1-alpha.0.tgz","fileCount":15,"integrity":"sha512-PwaQcmUPrm71yL0dtv0+wDCkJ/JqOBGBelDyg+bI5022lhlop6VIjLlb5cVyzaCGfMm5pq8MRLWTDWDtxaOPrw==","signatures":[{"sig":"MEYCIQC8+W2bxzEyCW8Din/Rl38jTWWSfm31MlN86jBM4pk2xwIhAP9UIu6PvyeC9j7GJXNSBmb4SCzFTU2waCt3IonQtGgs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7633},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"1580db58a37828857a0e51652234d109d18a8bc9","_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"_npmVersion":"10.5.0","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections Management SDK.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk-connections_0.0.1-alpha.0_1714399064799_0.20498283283982088","host":"s3://npm-registry-packages"}},"0.0.1":{"name":"@codat/sdk-connections","version":"0.0.1","_id":"@codat/sdk-connections@0.0.1","maintainers":[{"name":"mcclowes","email":"contact@mcclowes.com"},{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"dist":{"shasum":"f66f04cc412918a9dc701f035bcc053a48d5de66","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-0.0.1.tgz","fileCount":15,"integrity":"sha512-sdWDdJvqHqUX/RitN0EehDCm2p4d9RRIyBPBZ1hFWWfL4W3xinXAuAfdooUy4poT8jHhY3b+nZ3MPWWs9tRmbw==","signatures":[{"sig":"MEQCIEzL/x/5yaWRIjcIYi0gYjsgif8VwcBDNfPGZBZp6maGAiAYtvt6M1uzWHyy7+V+1cZAidddZvuy+TFOjXA7L2EZrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7608},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"1ea8673b371e5a13de25657d420b307c63a05795","_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"_npmVersion":"10.5.0","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk-connections_0.0.1_1714655443609_0.04011921451308598","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@codat/sdk-connections","version":"1.0.0","_id":"@codat/sdk-connections@1.0.0","maintainers":[{"name":"mcclowes","email":"contact@mcclowes.com"},{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"dist":{"shasum":"f26b484666256329c7b1c09ee60cad36b9f2af25","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-1.0.0.tgz","fileCount":15,"integrity":"sha512-jMJ+0RAG8PrTVD/iPtHTR+OEDDm4+s5qcdxxhDHiCV3p/VKT0E5ov6b0RRMJpkGsditAKlePuzptaG2YtSzGVA==","signatures":[{"sig":"MEUCICuinQLgMTfbgz8JL6H+i4dLHBaPsiSzcqPfNdp3fwGYAiEAv60djlVHIla7+JcZUYOWKBBNVNKih1DelBHE6CQpXz8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7661},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"0dc03dc3dc07083e35dd1054ce419dd746cae892","_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"_npmVersion":"10.8.1","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk-connections_1.0.0_1723459394826_0.29211170447419654","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@codat/sdk-connections","version":"1.1.0","_id":"@codat/sdk-connections@1.1.0","maintainers":[{"name":"mcclowes","email":"contact@mcclowes.com"},{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"dist":{"shasum":"d2fd2516ad59e44f3dd69df63505c60d215a1dff","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-1.1.0.tgz","fileCount":15,"integrity":"sha512-7JkPC4taUcYgAFi6Fkm5iIcoSgDRY7h+4Jlsl2vJnBWA5qX3O/mY1Z4RRxUvmVHadKYVBGaUdl0x2i46RDD8nQ==","signatures":[{"sig":"MEQCIAEVimy80NHqIkmn5UGVGBqaZhVPK16424v/0U+zvSgXAiB8x3cSDS0vJ1Fjg1jQ3YhOZW01PdFoEyUqlZEtwAJ/Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8081},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"b55480e9841fd2671ad62ef934c708ae6966587b","_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"_npmVersion":"10.8.2","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk-connections_1.1.0_1726228737151_0.9705037168292752","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@codat/sdk-connections","version":"1.1.1","_id":"@codat/sdk-connections@1.1.1","maintainers":[{"name":"codat-engineer","email":"eng-leadership@codat.io"},{"name":"mcclowes","email":"contact@mcclowes.com"}],"dist":{"shasum":"80d5df47770c95f2bc272f0909abb63aa8521990","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-1.1.1.tgz","fileCount":11,"integrity":"sha512-zSkKXBAdM3w8q90+JzsbWP6ANrQWaRR4L+PbwBy8bnEFviGuy4w8abfrjkWyXeHlMCMlQCIQ9vHBBpq1ohsVMQ==","signatures":[{"sig":"MEUCIQCQwUXosNs+dqFm3ReKVzOSJPBsF1yf+KADtpDMUmEwIAIgbxK5E6FuCcEKyIBc6gW3RxIhUAEIEBe+7w1OCdkeNHU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7043},"main":"./src/index.js","types":"./src/index.d.ts","gitHead":"a2c9185ee3d973f2ea94c6083b7bade14a418f86","_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"_npmVersion":"10.8.2","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk-connections_1.1.1_1748522015703_0.7792786459372956","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@codat/sdk-connections","version":"1.2.0","main":"./src/index.js","types":"./src/index.d.ts","publishConfig":{"registry":"https://registry.npmjs.org/"},"gitHead":"fba6ace59dabb64452fedf7e1e2abbb572034964","_id":"@codat/sdk-connections@1.2.0","description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-U/EcSunoZMmAvyaqUTzdEwd7B9WUb+309FtiGHDB/WtVbQ52Qlhn+UkhiHBqEWcnUh3P5pSZ6JPfrBwU/KUPkw==","shasum":"7f5e31df3c6128e8d9f8791edacc55a51c11599f","tarball":"https://registry.npmjs.org/@codat/sdk-connections/-/sdk-connections-1.2.0.tgz","fileCount":6,"unpackedSize":37051,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBEyxhqqX7LoOaUfc5S4ZkASN+KsUyKZpeH9Qi0DwEQJAiEAy/mJJ/PeAqxBgPcqPgVbZ/PF4MrLLhMkvTIGqOxOeME="}]},"_npmUser":{"name":"codat-engineer","email":"eng-leadership@codat.io"},"directories":{},"maintainers":[{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-connections_1.2.0_1774451712905_0.2536662241434384"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-29T13:57:44.692Z","modified":"2026-03-25T15:15:13.215Z","0.0.1-alpha.0":"2024-04-29T13:57:44.946Z","0.0.1":"2024-05-02T13:10:43.763Z","1.0.0":"2024-08-12T10:43:14.967Z","1.1.0":"2024-09-13T11:58:57.335Z","1.1.1":"2025-05-29T12:33:35.900Z","1.2.0":"2026-03-25T15:15:13.081Z"},"description":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.","maintainers":[{"name":"codat-engineer","email":"eng-leadership@codat.io"}],"readme":"This package contains the type definitions and initialize helper method to use with the dynamically imported Connections SDK.\n\n## Installation\n\nYou can install this library using npm:\n\n```console\n$ npm i -S @codat/sdk-connections\n```\n\n## Usage\n\nTo render the `CodatConnections` component in React:\n\n```typescript jsx\nimport React, { useEffect, useState } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport {\n  CodatConnectionsProps,\n  initCodatConnections,\n} from \"@codat/sdk-connections\";\n\nconst CodatConnections: React.FC<CodatConnectionsProps> = (\n  props: CodatConnectionsProps\n) => {\n  const [componentMount, setComponentMount] = useState<HTMLDivElement | null>(\n    null\n  );\n\n  useEffect(() => {\n    const target = componentMount;\n    if (target && target.children.length === 0) {\n      initCodatConnections(target, props);\n    }\n    // CodatConnections does not support changing props after initialization.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [componentMount]);\n\n  return (\n    <div\n      style={{\n        // Recommended dimensions\n        width: \"460px\",\n        height: \"840px\",\n        maxHeight: \"95%\",\n      }}\n      ref={setComponentMount}\n    ></div>\n  );\n};\n\n// The code below is an example of how to render the component at the root level of the application\n\nconst root = ReactDOM.createRoot(\n  document.getElementById(\"root\") as HTMLElement\n);\n\nroot.render(\n  <React.StrictMode>\n    <CodatConnections\n      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)\n      onClose={() => alert(\"onClose\")}\n      onError={() => alert(\"onError\")}\n      onDisconnect={() => alert(\"onDisconnect\")}\n      onReconnect={() => alert(\"onReconnect\")}\n      options={{}}\n    />\n  </React.StrictMode>\n);\n```\n","readmeFilename":"README.md"}