@c15t/node-sdk 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -0
- package/package.json +32 -7
- package/readme.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://c15t.com?utm_source=github&utm_medium=repopage_%40c15t%2Fnode-sdk" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="../../docs/assets/c15t-banner-readme-dark.svg" type="image/svg+xml">
|
|
5
|
+
<img src="../../docs/assets/c15t-banner-readme-light.svg" alt="c15t Banner" type="image/svg+xml">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
<br />
|
|
9
|
+
<h1 align="center">@c15t/node-sdk: Type-Safe Node.js API Client</h1>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
[](https://github.com/c15t/c15t)
|
|
13
|
+
[](https://github.com/c15t/c15t/actions/workflows/ci.yml)
|
|
14
|
+
[](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
15
|
+
[](https://c15t.com/discord)
|
|
16
|
+
[](https://www.npmjs.com/package/@c15t/node-sdk)
|
|
17
|
+
[](https://github.com/c15t/c15t)
|
|
18
|
+
[](https://github.com/c15t/c15t/commits/main)
|
|
19
|
+
[](https://github.com/c15t/c15t/issues)
|
|
20
|
+
|
|
21
|
+
A fully typed, flexible Node.js SDK for seamless interaction with the c15t consent management platform API.
|
|
22
|
+
|
|
23
|
+
## Key Features
|
|
24
|
+
|
|
25
|
+
- Type-safe API client with full TypeScript support
|
|
26
|
+
- Flexible client configuration with authentication and custom headers
|
|
27
|
+
- Supports dynamic base URL and API prefix configuration
|
|
28
|
+
- Built on top of @orpc/client for robust API interactions
|
|
29
|
+
- Easy integration with Node.js applications
|
|
30
|
+
- Comprehensive error handling and URL validation
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- Node.js 18.17.0 or later
|
|
35
|
+
- A Hosted [c15t instance](https://consent.io) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/v2)
|
|
36
|
+
|
|
37
|
+
## Manual Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add @c15t/node-sdk
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
1. Import the c15tClient function from the SDK
|
|
46
|
+
2. Configure the client with your API base URL
|
|
47
|
+
3. Interact with the c15t API using type-safe methods
|
|
48
|
+
|
|
49
|
+
## Support
|
|
50
|
+
|
|
51
|
+
- Join our [Discord community](https://c15t.com/discord)
|
|
52
|
+
- Open an issue on our [GitHub repository](https://github.com/c15t/c15t/issues)
|
|
53
|
+
- Visit [consent.io](https://consent.io) and use the chat widget
|
|
54
|
+
- Contact our support team via email [support@consent.io](mailto:support@consent.io)
|
|
55
|
+
|
|
56
|
+
## Contributing
|
|
57
|
+
|
|
58
|
+
- We're open to all community contributions!
|
|
59
|
+
- Read our [Contribution Guidelines](https://c15t.com/docs/oss/contributing)
|
|
60
|
+
- Review our [Code of Conduct](https://c15t.com/docs/oss/code-of-conduct)
|
|
61
|
+
- Fork the repository
|
|
62
|
+
- Create a new branch for your feature
|
|
63
|
+
- Submit a pull request
|
|
64
|
+
- **All contributions, big or small, are welcome and appreciated!**
|
|
65
|
+
|
|
66
|
+
## Security
|
|
67
|
+
|
|
68
|
+
If you believe you have found a security vulnerability in c15t, we encourage you to **_responsibly disclose this and NOT open a public issue_**. We will investigate all legitimate reports.
|
|
69
|
+
|
|
70
|
+
Our preference is that you make use of GitHub's private vulnerability reporting feature to disclose potential security vulnerabilities in our Open Source Software. To do this, please visit [https://github.com/c15t/c15t/security](https://github.com/c15t/c15t/security) and click the "Report a vulnerability" button.
|
|
71
|
+
|
|
72
|
+
### Security Policy
|
|
73
|
+
|
|
74
|
+
- Please do not share security vulnerabilities in public forums, issues, or pull requests
|
|
75
|
+
- Provide detailed information about the potential vulnerability
|
|
76
|
+
- Allow reasonable time for us to address the issue before any public disclosure
|
|
77
|
+
- We are committed to addressing security concerns promptly and transparently
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
[GNU General Public License v3.0](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
**Built with ❤️ by the [consent.io](https://www.consent.io?utm_source=github&utm_medium=repopage_%40c15t%2Fnode-sdk) team**
|
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/node-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Official Node.js SDK for c15t. Connects to the Consent Engine to read and write consent records and preferences. TypeScript-first, simple APIs, built-in auth and retries.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"consent",
|
|
8
|
+
"privacy",
|
|
9
|
+
"gdpr",
|
|
10
|
+
"ccpa",
|
|
11
|
+
"lgpd",
|
|
12
|
+
"headless",
|
|
13
|
+
"typescript",
|
|
14
|
+
"cookie-banner",
|
|
15
|
+
"consent-management-platform",
|
|
16
|
+
"cmp",
|
|
17
|
+
"consent-banner",
|
|
18
|
+
"user-consent",
|
|
19
|
+
"privacy-compliance",
|
|
20
|
+
"web-privacy"
|
|
21
|
+
],
|
|
22
|
+
"homepage": "https://c15t.com",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/c15t/c15t.git",
|
|
26
|
+
"directory": "packages/node-sdk"
|
|
27
|
+
},
|
|
28
|
+
"license": "GPL-3.0-only",
|
|
4
29
|
"type": "module",
|
|
5
30
|
"exports": {
|
|
6
31
|
".": {
|
|
@@ -16,11 +41,11 @@
|
|
|
16
41
|
"dist"
|
|
17
42
|
],
|
|
18
43
|
"dependencies": {
|
|
19
|
-
"@orpc/client": "1.
|
|
20
|
-
"@orpc/contract": "1.
|
|
21
|
-
"@orpc/openapi-client": "^1.
|
|
22
|
-
"@orpc/server": "1.
|
|
23
|
-
"@c15t/backend": "1.
|
|
44
|
+
"@orpc/client": "1.8.1",
|
|
45
|
+
"@orpc/contract": "1.8.1",
|
|
46
|
+
"@orpc/openapi-client": "^1.8.1",
|
|
47
|
+
"@orpc/server": "1.8.1",
|
|
48
|
+
"@c15t/backend": "1.6.0"
|
|
24
49
|
},
|
|
25
50
|
"devDependencies": {
|
|
26
51
|
"@electric-sql/pglite": "0.2.17",
|
|
@@ -41,7 +66,7 @@
|
|
|
41
66
|
"check-types": "tsc --noEmit",
|
|
42
67
|
"check-types:test": "tsc -p tsconfig.test.json",
|
|
43
68
|
"dev": "rslib build --watch",
|
|
44
|
-
"fmt": "pnpm biome format --write . && pnpm biome check --formatter-enabled=false --linter-enabled=false --
|
|
69
|
+
"fmt": "pnpm biome format --write . && pnpm biome check --formatter-enabled=false --linter-enabled=false --write",
|
|
45
70
|
"lint": "pnpm biome lint ./src",
|
|
46
71
|
"test": "vitest run",
|
|
47
72
|
"test:watch": "vitest"
|
package/readme.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "@c15t/node-sdk: Type-Safe Node.js API Client",
|
|
3
|
+
"description": "A fully typed, flexible Node.js SDK for seamless interaction with the c15t consent management platform API.",
|
|
4
|
+
"features": [
|
|
5
|
+
"Type-safe API client with full TypeScript support",
|
|
6
|
+
"Flexible client configuration with authentication and custom headers",
|
|
7
|
+
"Supports dynamic base URL and API prefix configuration",
|
|
8
|
+
"Built on top of @orpc/client for robust API interactions",
|
|
9
|
+
"Easy integration with Node.js applications",
|
|
10
|
+
"Comprehensive error handling and URL validation"
|
|
11
|
+
],
|
|
12
|
+
"prerequisites": [
|
|
13
|
+
"Node.js 18.17.0 or later",
|
|
14
|
+
"A Hosted [c15t instance](https://consent.io) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/v2)"
|
|
15
|
+
],
|
|
16
|
+
"manualInstallation": ["", "```bash\npnpm add @c15t/node-sdk\n```"],
|
|
17
|
+
"usage": [
|
|
18
|
+
"Import the c15tClient function from the SDK",
|
|
19
|
+
"Configure the client with your API base URL",
|
|
20
|
+
"Interact with the c15t API using type-safe methods"
|
|
21
|
+
],
|
|
22
|
+
"showCLIGeneration": false
|
|
23
|
+
}
|