@c15t/node-sdk 2.1.0 → 2.2.0-canary-20260728085441

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 CHANGED
@@ -9,30 +9,31 @@
9
9
 
10
10
  # @c15t/node-sdk: Type-Safe Node.js API Client
11
11
 
12
- [![GitHub stars](https://img.shields.io/github/stars/c15t/c15t?style=flat-square)](https://github.com/c15t/c15t)
13
- [![CI](https://img.shields.io/github/actions/workflow/status/c15t/c15t/ci.yml?style=flat-square)](https://github.com/c15t/c15t/actions/workflows/ci.yml)
14
- [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square)](https://github.com/c15t/c15t/blob/main/LICENSE.md)
15
- [![Discord](https://img.shields.io/discord/1312171102268690493?style=flat-square)](https://c15t.link/discord)
16
- [![npm version](https://img.shields.io/npm/v/%40c15t%2Fnode-sdk?style=flat-square)](https://www.npmjs.com/package/@c15t/node-sdk)
17
- [![Top Language](https://img.shields.io/github/languages/top/c15t/c15t?style=flat-square)](https://github.com/c15t/c15t)
18
- [![Last Commit](https://img.shields.io/github/last-commit/c15t/c15t?style=flat-square)](https://github.com/c15t/c15t/commits/main)
19
- [![Open Issues](https://img.shields.io/github/issues/c15t/c15t?style=flat-square)](https://github.com/c15t/c15t/issues)
12
+ <p>
13
+ <a href="https://www.npmjs.com/package/@c15t/node-sdk"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/npm/%40c15t%2Fnode-sdk.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/npm/%40c15t%2Fnode-sdk.svg?variant=outline&mode=light" alt="Latest NPM Version"></picture></a>
14
+ <a href="https://github.com/c15t/c15t"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/github/c15t/c15t/stars.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/github/c15t/c15t/stars.svg?variant=outline&mode=light" alt="Stars"></picture></a>
15
+ <a href="https://github.com/c15t/c15t/blob/main/LICENSE.md"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/github/c15t/c15t/license.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/github/c15t/c15t/license.svg?variant=outline&mode=light" alt="License"></picture></a>
16
+ <a href="https://c15t.link/discord"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/1312171102268690493.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/discord/1312171102268690493.svg?variant=outline&mode=light" alt="Discord"></picture></a>
17
+ <a href="https://skills.sh/c15t/skills/c15t"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/skills/c15t/skills/c15t.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/skills/c15t/skills/c15t.svg?variant=outline&mode=light" alt="Skills"></picture></a>
18
+ <a href="https://inth.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%40c15t%2Fnode-sdk"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/badge/Made%20By-Inth-ffc803.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAzOTMgNDAwIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTgyLjY2MiAwdjM2Ljg5NWgtNTkuMDMxdjgyLjczM2g1OS4wMzF2MzYuODkzSDI3LjQ4MnYtMzYuODkzaDU5LjAzVjM2Ljg5NWgtNTkuMDNWMHpNMzIxLjk0MSA4OS44NVYwaDM1LjM1NXYxNTYuNTIxaC0yNS43MTNsLTg2LjEzNy05MC4zNjR2OTAuMzY0aC0zNS4zNTVWMGgyNi4zNTV6Ii8%2BPHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzE4LjU3MSAxODUuNzE0aDc0LjI4NlY0MDBIMFYxODUuNzE0aDI3Mi44NTd2LTQ3LjE0M3ptLTI5MS4wOSAyOC45Njl2MzcuMTE4aDU4LjEzN3YxMTkuNjI4aDM2Ljg5NVYyNTEuODAxaDU4LjU4NHYtMzcuMTE4em0xODIuNjEuMjI0djE1Ni41MjJoMzYuODk0VjMxMy41OWg3My4zNDF2NTcuODM5aDM3LjExOFYyMTQuOTA3aC0zNy4xMTh2NjEuNzg4aC03My4zNDF2LTYxLjc4OHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D&color=ffc803&labelTextColor=000000&valueColor=000000&mode=dark"><img src="https://shieldcn.dev/badge/Made%20By-Inth-ffc803.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAzOTMgNDAwIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTgyLjY2MiAwdjM2Ljg5NWgtNTkuMDMxdjgyLjczM2g1OS4wMzF2MzYuODkzSDI3LjQ4MnYtMzYuODkzaDU5LjAzVjM2Ljg5NWgtNTkuMDNWMHpNMzIxLjk0MSA4OS44NVYwaDM1LjM1NXYxNTYuNTIxaC0yNS43MTNsLTg2LjEzNy05MC4zNjR2OTAuMzY0aC0zNS4zNTVWMGgyNi4zNTV6Ii8%2BPHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzE4LjU3MSAxODUuNzE0aDc0LjI4NlY0MDBIMFYxODUuNzE0aDI3Mi44NTd2LTQ3LjE0M3ptLTI5MS4wOSAyOC45Njl2MzcuMTE4aDU4LjEzN3YxMTkuNjI4aDM2Ljg5NVYyNTEuODAxaDU4LjU4NHYtMzcuMTE4em0xODIuNjEuMjI0djE1Ni41MjJoMzYuODk0VjMxMy41OWg3My4zNDF2NTcuODM5aDM3LjExOFYyMTQuOTA3aC0zNy4xMTh2NjEuNzg4aC03My4zNDF2LTYxLjc4OHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D&color=ffc803&labelTextColor=000000&valueColor=000000&mode=light" alt="Made by Inth"></picture></a>
19
+ </p>
20
20
 
21
- A fully typed, flexible Node.js SDK for seamless interaction with the c15t consent management platform API.
21
+ Type-safe Node.js SDK for hosted and self-hosted c15t consent APIs, consent records, privacy preferences, and backend automation.
22
22
 
23
23
  ## Key Features
24
24
 
25
25
  - Type-safe API client with full TypeScript support
26
+ - Works with hosted c15t instances on inth.com and self-hosted @c15t/backend deployments
27
+ - Read and write consent records, subjects, and privacy preferences from Node.js
26
28
  - Flexible client configuration with authentication and custom headers
27
29
  - Supports dynamic base URL and API prefix configuration
28
30
  - Built on top of @orpc/client for robust API interactions
29
- - Easy integration with Node.js applications
30
31
  - Comprehensive error handling and URL validation
31
32
 
32
33
  ## Prerequisites
33
34
 
34
35
  - Node.js 18.17.0 or later
35
- - A Hosted [c15t instance](https://inth.com) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/v2)
36
+ - A hosted [c15t instance](https://inth.com) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/quickstart)
36
37
 
37
38
  ## Manual Installation
38
39
 
@@ -76,6 +77,13 @@ try {
76
77
  }
77
78
  ```
78
79
 
80
+ ## Common Use Cases
81
+
82
+ - Sync consent records between your application and c15t
83
+ - Build admin tooling around hosted or self-hosted consent APIs
84
+ - Automate privacy preference workflows from server-side jobs
85
+ - Integrate c15t consent records with internal data systems
86
+
79
87
  ## Support
80
88
 
81
89
  - Join our [Discord community](https://c15t.link/discord)
package/dist/index.cjs CHANGED
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
3
  (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
9
13
  };
10
14
  })();
11
15
  (()=>{
@@ -24,13 +28,13 @@ var __webpack_require__ = {};
24
28
  var __webpack_exports__ = {};
25
29
  __webpack_require__.r(__webpack_exports__);
26
30
  __webpack_require__.d(__webpack_exports__, {
27
- resolveUrl: ()=>resolveUrl,
28
- c15tClient: ()=>c15tClient,
29
31
  C15TClient: ()=>C15TClient,
32
+ C15TError: ()=>C15TError,
33
+ c15tClient: ()=>c15tClient,
30
34
  createResponseContext: ()=>createResponseContext,
31
35
  fetcher: ()=>fetcher,
32
36
  isC15TError: ()=>isC15TError,
33
- C15TError: ()=>C15TError
37
+ resolveUrl: ()=>resolveUrl
34
38
  });
35
39
  class C15TError extends Error {
36
40
  status;
@@ -80,6 +84,10 @@ class C15TError extends Error {
80
84
  function isC15TError(error) {
81
85
  return error instanceof C15TError;
82
86
  }
87
+ const version = '2.2.0-canary-20260728085441';
88
+ const C15T_VERSION_HEADERS = {
89
+ 'x-c15t-version': version
90
+ };
83
91
  const DEFAULT_RETRY_CONFIG = {
84
92
  maxRetries: 3,
85
93
  initialDelayMs: 100,
@@ -98,7 +106,6 @@ const DEFAULT_RETRY_CONFIG = {
98
106
  ],
99
107
  retryOnNetworkError: true
100
108
  };
101
- const DEFAULT_TIMEOUT_MS = 30000;
102
109
  function debugLog(debug, method, path, durationMs, status) {
103
110
  if (!debug) return;
104
111
  const timestamp = new Date().toISOString();
@@ -188,6 +195,7 @@ async function fetcher(context, path, options) {
188
195
  method: options?.method || 'GET',
189
196
  headers: {
190
197
  'Content-Type': 'application/json',
198
+ ...C15T_VERSION_HEADERS,
191
199
  ...context.headers,
192
200
  'X-Request-ID': requestId,
193
201
  ...options?.headers
@@ -346,7 +354,7 @@ class C15TClient {
346
354
  ...options.retryConfig
347
355
  };
348
356
  const debug = options.debug ?? ("u" > typeof process ? process.env?.C15T_DEBUG === 'true' : false);
349
- const timeout = options.timeout ?? DEFAULT_TIMEOUT_MS;
357
+ const timeout = options.timeout ?? 30000;
350
358
  this.context = {
351
359
  baseUrl: baseUrl.toString(),
352
360
  headers: {
package/dist/index.js CHANGED
@@ -46,6 +46,10 @@ class C15TError extends Error {
46
46
  function isC15TError(error) {
47
47
  return error instanceof C15TError;
48
48
  }
49
+ const version = '2.2.0-canary-20260728085441';
50
+ const C15T_VERSION_HEADERS = {
51
+ 'x-c15t-version': version
52
+ };
49
53
  const DEFAULT_RETRY_CONFIG = {
50
54
  maxRetries: 3,
51
55
  initialDelayMs: 100,
@@ -64,7 +68,6 @@ const DEFAULT_RETRY_CONFIG = {
64
68
  ],
65
69
  retryOnNetworkError: true
66
70
  };
67
- const DEFAULT_TIMEOUT_MS = 30000;
68
71
  function debugLog(debug, method, path, durationMs, status) {
69
72
  if (!debug) return;
70
73
  const timestamp = new Date().toISOString();
@@ -154,6 +157,7 @@ async function fetcher(context, path, options) {
154
157
  method: options?.method || 'GET',
155
158
  headers: {
156
159
  'Content-Type': 'application/json',
160
+ ...C15T_VERSION_HEADERS,
157
161
  ...context.headers,
158
162
  'X-Request-ID': requestId,
159
163
  ...options?.headers
@@ -312,7 +316,7 @@ class C15TClient {
312
316
  ...options.retryConfig
313
317
  };
314
318
  const debug = options.debug ?? ("u" > typeof process ? process.env?.C15T_DEBUG === 'true' : false);
315
- const timeout = options.timeout ?? DEFAULT_TIMEOUT_MS;
319
+ const timeout = options.timeout ?? 30000;
316
320
  this.context = {
317
321
  baseUrl: baseUrl.toString(),
318
322
  headers: {
package/dist/testing.cjs CHANGED
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
  var __webpack_require__ = {};
3
3
  (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
9
13
  };
10
14
  })();
11
15
  (()=>{
@@ -23,11 +27,6 @@ var __webpack_require__ = {};
23
27
  })();
24
28
  var __webpack_exports__ = {};
25
29
  __webpack_require__.r(__webpack_exports__);
26
- __webpack_require__.d(__webpack_exports__, {
27
- createMockClient: ()=>createMockClient,
28
- createMockErrorResponse: ()=>createMockErrorResponse,
29
- createMockResponse: ()=>createMockResponse
30
- });
31
30
  function createMockResponse(data, options = {}) {
32
31
  const isSuccess = options.ok ?? true;
33
32
  const error = options.error ?? null;
@@ -106,6 +105,11 @@ function createMockClient(overrides = {}) {
106
105
  }
107
106
  };
108
107
  }
108
+ __webpack_require__.d(__webpack_exports__, {
109
+ createMockClient: ()=>createMockClient,
110
+ createMockErrorResponse: ()=>createMockErrorResponse,
111
+ createMockResponse: ()=>createMockResponse
112
+ });
109
113
  exports.createMockClient = __webpack_exports__.createMockClient;
110
114
  exports.createMockErrorResponse = __webpack_exports__.createMockErrorResponse;
111
115
  exports.createMockResponse = __webpack_exports__.createMockResponse;
@@ -128,7 +128,7 @@ export declare class C15TClient {
128
128
  consentId: string;
129
129
  domainId: string;
130
130
  domain: string;
131
- type: "cookie_banner" | "privacy_policy" | "dpa" | "terms_and_conditions" | "marketing_communications" | "age_verification" | "other";
131
+ type: string;
132
132
  metadata?: {
133
133
  [x: string]: unknown;
134
134
  } | undefined;
@@ -165,7 +165,7 @@ export declare class C15TClient {
165
165
  /**
166
166
  * Update a subject
167
167
  */
168
- patch: (id: string, input: Omit<PatchSubjectFullInput, "id">, options?: FetchOptions<PatchSubjectOutput, Omit<PatchSubjectFullInput, "id">>) => Promise<ResponseContext<{
168
+ patch: (id: string, input: Omit<PatchSubjectFullInput, 'id'>, options?: FetchOptions<PatchSubjectOutput, Omit<PatchSubjectFullInput, 'id'>>) => Promise<ResponseContext<{
169
169
  success: boolean;
170
170
  subject: {
171
171
  id: string;
@@ -220,7 +220,7 @@ export declare class C15TClient {
220
220
  * Initialize consent manager
221
221
  */
222
222
  init: (options?: FetchOptions<InitOutput>) => Promise<ResponseContext<{
223
- jurisdiction: "UK_GDPR" | "GDPR" | "CH" | "BR" | "PIPEDA" | "QC_LAW25" | "AU" | "APPI" | "PIPA" | "CCPA" | "NONE";
223
+ jurisdiction: "APPI" | "AU" | "BR" | "CCPA" | "CH" | "GDPR" | "NONE" | "PIPA" | "PIPEDA" | "QC_LAW25" | "UK_GDPR";
224
224
  location: {
225
225
  countryCode: string | null;
226
226
  regionCode: string | null;
@@ -321,7 +321,7 @@ export declare class C15TClient {
321
321
  } | undefined;
322
322
  };
323
323
  };
324
- branding: "c15t" | "inth" | "consent" | "none";
324
+ branding: "c15t" | "consent" | "inth" | "none";
325
325
  gvl?: {
326
326
  gvlSpecificationVersion: number;
327
327
  vendorListVersion: number;
@@ -434,34 +434,34 @@ export declare class C15TClient {
434
434
  cmpId?: number | undefined;
435
435
  policy?: {
436
436
  id: string;
437
- model: "none" | "opt-in" | "opt-out" | "iab";
437
+ model: "iab" | "none" | "opt-in" | "opt-out";
438
438
  i18n?: {
439
439
  language?: string | undefined;
440
440
  messageProfile?: string | undefined;
441
441
  } | undefined;
442
442
  consent?: {
443
443
  expiryDays?: number | undefined;
444
- scopeMode?: "strict" | "permissive" | undefined;
444
+ scopeMode?: "permissive" | "strict" | undefined;
445
445
  categories?: string[] | undefined;
446
446
  preselectedCategories?: string[] | undefined;
447
447
  gpc?: boolean | undefined;
448
448
  } | undefined;
449
449
  ui?: {
450
- mode?: "none" | "banner" | "dialog" | undefined;
450
+ mode?: "banner" | "dialog" | "none" | undefined;
451
451
  banner?: {
452
452
  allowedActions?: ("accept" | "customize" | "reject")[] | undefined;
453
453
  primaryActions?: ("accept" | "customize" | "reject")[] | undefined;
454
454
  layout?: ("accept" | "customize" | "reject" | ("accept" | "customize" | "reject")[])[] | undefined;
455
- direction?: "row" | "column" | undefined;
456
- uiProfile?: "strict" | "balanced" | "compact" | undefined;
455
+ direction?: "column" | "row" | undefined;
456
+ uiProfile?: "balanced" | "compact" | "strict" | undefined;
457
457
  scrollLock?: boolean | undefined;
458
458
  } | undefined;
459
459
  dialog?: {
460
460
  allowedActions?: ("accept" | "customize" | "reject")[] | undefined;
461
461
  primaryActions?: ("accept" | "customize" | "reject")[] | undefined;
462
462
  layout?: ("accept" | "customize" | "reject" | ("accept" | "customize" | "reject")[])[] | undefined;
463
- direction?: "row" | "column" | undefined;
464
- uiProfile?: "strict" | "balanced" | "compact" | undefined;
463
+ direction?: "column" | "row" | undefined;
464
+ uiProfile?: "balanced" | "compact" | "strict" | undefined;
465
465
  scrollLock?: boolean | undefined;
466
466
  } | undefined;
467
467
  } | undefined;
@@ -474,10 +474,10 @@ export declare class C15TClient {
474
474
  policyDecision?: {
475
475
  policyId: string;
476
476
  fingerprint: string;
477
- matchedBy: "default" | "country" | "region" | "fallback";
477
+ matchedBy: "country" | "default" | "fallback" | "region";
478
478
  country: string | null;
479
479
  region: string | null;
480
- jurisdiction: "UK_GDPR" | "GDPR" | "CH" | "BR" | "PIPEDA" | "QC_LAW25" | "AU" | "APPI" | "PIPA" | "CCPA" | "NONE";
480
+ jurisdiction: "APPI" | "AU" | "BR" | "CCPA" | "CH" | "GDPR" | "NONE" | "PIPA" | "PIPEDA" | "QC_LAW25" | "UK_GDPR";
481
481
  } | undefined;
482
482
  policySnapshotToken?: string | undefined;
483
483
  }>>;
@@ -0,0 +1,3 @@
1
+ export declare const C15T_VERSION_HEADERS: {
2
+ readonly 'x-c15t-version': "2.2.0-canary-20260728085441";
3
+ };
@@ -0,0 +1 @@
1
+ export declare const version = "2.2.0-canary-20260728085441";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@c15t/node-sdk",
3
- "version": "2.1.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.",
3
+ "version": "2.2.0-canary-20260728085441",
4
+ "description": "Type-safe Node.js SDK for hosted and self-hosted c15t consent APIs, consent records, privacy preferences, and backend automation.",
5
5
  "keywords": [
6
6
  "c15t",
7
7
  "node",
@@ -16,7 +16,9 @@
16
16
  "lgpd",
17
17
  "cmp",
18
18
  "typescript",
19
- "server-side"
19
+ "server-side",
20
+ "self-hosted-cmp",
21
+ "consent-records"
20
22
  ],
21
23
  "homepage": "https://c15t.com",
22
24
  "bugs": {
@@ -49,21 +51,18 @@
49
51
  "dist-types"
50
52
  ],
51
53
  "scripts": {
52
- "build": "rslib build && bun ../../scripts/normalize-dist-types.mjs",
53
- "check-types": "tsc --noEmit",
54
- "check-types:test": "tsc -p tsconfig.test.json",
55
- "dev": "sh -c 'rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
54
+ "prebuild": "genversion --esm --semi src/version.ts",
55
+ "build": "bun prebuild && rslib build && bun ../../scripts/normalize-dist-types.mjs",
56
+ "check-types": "bun prebuild && tsc --noEmit",
57
+ "check-types:test": "bun prebuild && tsc -p tsconfig.test.json",
58
+ "dev": "sh -c 'bun prebuild && rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
56
59
  "fmt": "bun biome format --write . && bun biome check --formatter-enabled=false --linter-enabled=false --write",
57
60
  "lint": "bun biome lint ./src",
58
- "test": "vitest run",
59
- "test:watch": "vitest"
61
+ "test": "bun prebuild && vitest run",
62
+ "test:watch": "bun prebuild && vitest"
60
63
  },
61
64
  "dependencies": {
62
- "@c15t/backend": "2.1.0",
63
- "@orpc/client": "1.13.13",
64
- "@orpc/contract": "1.13.13",
65
- "@orpc/openapi-client": "^1.13.13",
66
- "@orpc/server": "1.13.13"
65
+ "@c15t/backend": "2.2.0-canary-20260728085441"
67
66
  },
68
67
  "devDependencies": {
69
68
  "@c15t/typescript-config": "0.0.1",
@@ -74,8 +73,9 @@
74
73
  "@types/express": "^5.0.6",
75
74
  "@types/node": "25.5.0",
76
75
  "@types/pg": "8.20.0",
76
+ "genversion": "3.2.0",
77
77
  "kysely-pglite": "^0.6.1",
78
- "msw": "^2.12.14",
79
- "typescript": "^6.0.2"
78
+ "msw": "^2.14.6",
79
+ "typescript": "7.0.1-rc"
80
80
  }
81
81
  }
package/readme.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
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.",
3
+ "description": "Type-safe Node.js SDK for hosted and self-hosted c15t consent APIs, consent records, privacy preferences, and backend automation.",
4
4
  "features": [
5
5
  "Type-safe API client with full TypeScript support",
6
+ "Works with hosted c15t instances on inth.com and self-hosted @c15t/backend deployments",
7
+ "Read and write consent records, subjects, and privacy preferences from Node.js",
6
8
  "Flexible client configuration with authentication and custom headers",
7
9
  "Supports dynamic base URL and API prefix configuration",
8
10
  "Built on top of @orpc/client for robust API interactions",
9
- "Easy integration with Node.js applications",
10
11
  "Comprehensive error handling and URL validation"
11
12
  ],
12
13
  "prerequisites": [
13
14
  "Node.js 18.17.0 or later",
14
- "A Hosted [c15t instance](https://inth.com) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/v2)"
15
+ "A hosted [c15t instance](https://inth.com) (free sign-up) or [self-hosted deployment](https://c15t.com/docs/self-host/quickstart)"
15
16
  ],
16
17
  "manualInstallation": ["", "```bash\npnpm add @c15t/node-sdk\n```"],
17
18
  "usage": [
@@ -21,5 +22,8 @@
21
22
 
22
23
  "```ts\n// server.ts\nimport { c15tClient } from '@c15t/node-sdk'\n\n// Auto-configure from C15T_API_URL + C15T_API_TOKEN env vars\nconst client = c15tClient()\n\n// Or pass options explicitly\n// const client = c15tClient({\n// baseUrl: process.env.C15T_API_URL!,\n// token: process.env.C15T_API_TOKEN!,\n// })\n\ntry {\n const status = await client.meta.status()\n console.log('c15t API status:', status)\n\n const subject = await client.subjects.create({\n type: 'cookie_banner',\n subjectId: 'sub_123',\n domain: 'example.com',\n preferences: { analytics: true },\n givenAt: Date.now(),\n })\n console.log('Created subject', subject.id)\n} catch (error) {\n console.error('c15t request failed:', error)\n}\n```"
23
24
  ],
24
- "showCLIGeneration": false
25
+ "showCLIGeneration": false,
26
+ "customSections": {
27
+ "Common Use Cases": "- Sync consent records between your application and c15t\n- Build admin tooling around hosted or self-hosted consent APIs\n- Automate privacy preference workflows from server-side jobs\n- Integrate c15t consent records with internal data systems"
28
+ }
25
29
  }