@c15t/node-sdk 2.0.0-rc.5 → 2.0.0-rc.6
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/dist/index.cjs +4 -4
- package/dist/index.js +3 -3
- package/dist-types/client.d.ts +7 -7
- package/dist-types/endpoints/consent.d.ts +1 -1
- package/dist-types/endpoints/init.d.ts +1 -1
- package/dist-types/endpoints/status.d.ts +1 -1
- package/dist-types/endpoints/subjects.d.ts +1 -1
- package/dist-types/index.d.ts +1 -1
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -333,11 +333,11 @@ async function listSubjects(context, query, options) {
|
|
|
333
333
|
class C15TClient {
|
|
334
334
|
context;
|
|
335
335
|
constructor(options = {}){
|
|
336
|
-
const baseUrlString = options.baseUrl || (
|
|
336
|
+
const baseUrlString = options.baseUrl || ("u" > typeof process ? process.env?.C15T_API_URL : void 0);
|
|
337
337
|
if (!baseUrlString) throw new TypeError('baseUrl is required. Provide it in options or set C15T_API_URL environment variable.');
|
|
338
338
|
const baseUrl = new URL(baseUrlString);
|
|
339
339
|
if (options.prefix) baseUrl.pathname = options.prefix;
|
|
340
|
-
const token = options.token || (
|
|
340
|
+
const token = options.token || ("u" > typeof process ? process.env?.C15T_API_TOKEN : void 0);
|
|
341
341
|
const authHeaders = token ? {
|
|
342
342
|
Authorization: `Bearer ${token}`
|
|
343
343
|
} : {};
|
|
@@ -345,7 +345,7 @@ class C15TClient {
|
|
|
345
345
|
...DEFAULT_RETRY_CONFIG,
|
|
346
346
|
...options.retryConfig
|
|
347
347
|
};
|
|
348
|
-
const debug = options.debug ?? (
|
|
348
|
+
const debug = options.debug ?? ("u" > typeof process ? process.env?.C15T_DEBUG === 'true' : false);
|
|
349
349
|
const timeout = options.timeout ?? DEFAULT_TIMEOUT_MS;
|
|
350
350
|
this.context = {
|
|
351
351
|
baseUrl: baseUrl.toString(),
|
package/dist/index.js
CHANGED
|
@@ -299,11 +299,11 @@ async function listSubjects(context, query, options) {
|
|
|
299
299
|
class C15TClient {
|
|
300
300
|
context;
|
|
301
301
|
constructor(options = {}){
|
|
302
|
-
const baseUrlString = options.baseUrl || (
|
|
302
|
+
const baseUrlString = options.baseUrl || ("u" > typeof process ? process.env?.C15T_API_URL : void 0);
|
|
303
303
|
if (!baseUrlString) throw new TypeError('baseUrl is required. Provide it in options or set C15T_API_URL environment variable.');
|
|
304
304
|
const baseUrl = new URL(baseUrlString);
|
|
305
305
|
if (options.prefix) baseUrl.pathname = options.prefix;
|
|
306
|
-
const token = options.token || (
|
|
306
|
+
const token = options.token || ("u" > typeof process ? process.env?.C15T_API_TOKEN : void 0);
|
|
307
307
|
const authHeaders = token ? {
|
|
308
308
|
Authorization: `Bearer ${token}`
|
|
309
309
|
} : {};
|
|
@@ -311,7 +311,7 @@ class C15TClient {
|
|
|
311
311
|
...DEFAULT_RETRY_CONFIG,
|
|
312
312
|
...options.retryConfig
|
|
313
313
|
};
|
|
314
|
-
const debug = options.debug ?? (
|
|
314
|
+
const debug = options.debug ?? ("u" > typeof process ? process.env?.C15T_DEBUG === 'true' : false);
|
|
315
315
|
const timeout = options.timeout ?? DEFAULT_TIMEOUT_MS;
|
|
316
316
|
this.context = {
|
|
317
317
|
baseUrl: baseUrl.toString(),
|
package/dist-types/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckConsentOutput, CheckConsentQuery, GetSubjectOutput, GetSubjectQuery, InitOutput, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput, StatusOutput } from '../../schema/dist-types/types
|
|
1
|
+
import type { CheckConsentOutput, CheckConsentQuery, GetSubjectOutput, GetSubjectQuery, InitOutput, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput, StatusOutput } from '../../schema/dist-types/types';
|
|
2
2
|
import type { C15TClientOptions, FetchOptions, ResponseContext } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* C15T Client for interacting with the consent management API
|
|
@@ -443,17 +443,17 @@ export declare class C15TClient {
|
|
|
443
443
|
ui?: {
|
|
444
444
|
mode?: "none" | "banner" | "dialog" | undefined;
|
|
445
445
|
banner?: {
|
|
446
|
-
allowedActions?: ("
|
|
447
|
-
|
|
448
|
-
layout?: ("
|
|
446
|
+
allowedActions?: ("accept" | "customize" | "reject")[] | undefined;
|
|
447
|
+
primaryActions?: ("accept" | "customize" | "reject")[] | undefined;
|
|
448
|
+
layout?: ("accept" | "customize" | "reject" | ("accept" | "customize" | "reject")[])[] | undefined;
|
|
449
449
|
direction?: "row" | "column" | undefined;
|
|
450
450
|
uiProfile?: "strict" | "balanced" | "compact" | undefined;
|
|
451
451
|
scrollLock?: boolean | undefined;
|
|
452
452
|
} | undefined;
|
|
453
453
|
dialog?: {
|
|
454
|
-
allowedActions?: ("
|
|
455
|
-
|
|
456
|
-
layout?: ("
|
|
454
|
+
allowedActions?: ("accept" | "customize" | "reject")[] | undefined;
|
|
455
|
+
primaryActions?: ("accept" | "customize" | "reject")[] | undefined;
|
|
456
|
+
layout?: ("accept" | "customize" | "reject" | ("accept" | "customize" | "reject")[])[] | undefined;
|
|
457
457
|
direction?: "row" | "column" | undefined;
|
|
458
458
|
uiProfile?: "strict" | "balanced" | "compact" | undefined;
|
|
459
459
|
scrollLock?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckConsentOutput, CheckConsentQuery } from '../../../schema/dist-types/types
|
|
1
|
+
import type { CheckConsentOutput, CheckConsentQuery } from '../../../schema/dist-types/types';
|
|
2
2
|
import type { FetcherContext } from '../fetcher';
|
|
3
3
|
import type { FetchOptions, ResponseContext } from '../types';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetSubjectOutput, GetSubjectQuery, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput } from '../../../schema/dist-types/types
|
|
1
|
+
import type { GetSubjectOutput, GetSubjectQuery, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput } from '../../../schema/dist-types/types';
|
|
2
2
|
import type { FetcherContext } from '../fetcher';
|
|
3
3
|
import type { FetchOptions, ResponseContext } from '../types';
|
|
4
4
|
/**
|
package/dist-types/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ import type { C15TClientOptions } from './types';
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
export declare function c15tClient(options?: C15TClientOptions): C15TClient;
|
|
38
|
-
export type { CheckConsentOutput, CheckConsentQuery, ConsentCheckResult, ConsentItem, GetSubjectInput, GetSubjectOutput, GetSubjectParams, GetSubjectQuery, InitOutput, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput, StatusOutput, SubjectItem, } from '../../schema/dist-types/types
|
|
38
|
+
export type { CheckConsentOutput, CheckConsentQuery, ConsentCheckResult, ConsentItem, GetSubjectInput, GetSubjectOutput, GetSubjectParams, GetSubjectQuery, InitOutput, ListSubjectsOutput, ListSubjectsQuery, PatchSubjectFullInput, PatchSubjectOutput, PostSubjectInput, PostSubjectOutput, StatusOutput, SubjectItem, } from '../../schema/dist-types/types';
|
|
39
39
|
export { C15TClient } from './client';
|
|
40
40
|
export { C15TError, isC15TError } from './error';
|
|
41
41
|
export type { FetcherContext } from './fetcher';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/node-sdk",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.6",
|
|
4
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
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -57,23 +57,23 @@
|
|
|
57
57
|
"test:watch": "vitest"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@c15t/backend": "2.0.0-rc.
|
|
61
|
-
"@orpc/client": "1.13.
|
|
62
|
-
"@orpc/contract": "1.13.
|
|
63
|
-
"@orpc/openapi-client": "^1.13.
|
|
64
|
-
"@orpc/server": "1.13.
|
|
60
|
+
"@c15t/backend": "2.0.0-rc.6",
|
|
61
|
+
"@orpc/client": "1.13.13",
|
|
62
|
+
"@orpc/contract": "1.13.13",
|
|
63
|
+
"@orpc/openapi-client": "^1.13.13",
|
|
64
|
+
"@orpc/server": "1.13.13"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@c15t/typescript-config": "0.0.1-beta.1",
|
|
68
68
|
"@c15t/vitest-config": "1.0.0",
|
|
69
|
-
"@electric-sql/pglite": "0.2
|
|
69
|
+
"@electric-sql/pglite": "0.4.2",
|
|
70
70
|
"@libsql/kysely-libsql": "^0.4.1",
|
|
71
71
|
"@types/better-sqlite3": "^7.6.13",
|
|
72
72
|
"@types/express": "^5.0.6",
|
|
73
|
-
"@types/node": "
|
|
74
|
-
"@types/pg": "8.
|
|
73
|
+
"@types/node": "25.5.0",
|
|
74
|
+
"@types/pg": "8.20.0",
|
|
75
75
|
"kysely-pglite": "^0.6.1",
|
|
76
|
-
"msw": "^2.
|
|
77
|
-
"typescript": "^
|
|
76
|
+
"msw": "^2.12.14",
|
|
77
|
+
"typescript": "^6.0.2"
|
|
78
78
|
}
|
|
79
79
|
}
|