@cookiemunch/sdk 0.31.0 → 0.33.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +23 -4
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/rights/express.cjs +86 -0
- package/dist/rights/express.cjs.map +1 -0
- package/dist/rights/express.d.ts +56 -0
- package/dist/rights/express.js +60 -0
- package/dist/rights/express.js.map +1 -0
- package/dist/rights.cjs +15 -0
- package/dist/rights.cjs.map +1 -1
- package/dist/rights.d.ts +10 -2
- package/dist/rights.js +14 -0
- package/dist/rights.js.map +1 -1
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Every published release, newest first. Dates are the day the version was cut.
|
|
4
4
|
|
|
5
|
+
## 0.32.0 (2026-11-16)
|
|
6
|
+
|
|
7
|
+
- Added: `sites.applyCookies(cbid, input)`, `POST /v1/sites/{cbid}/cookies/apply`: what `planCookies` shows, stored all or nothing.
|
|
8
|
+
- Added: `handOver` on `CookiePlanInput`: own rows to give to a preset in the same run.
|
|
9
|
+
- Changed: `CookiePlanResult.dryRun` is optional; `applyCookies` answers `applied: true` instead.
|
|
10
|
+
|
|
5
11
|
## 0.31.0 (2026-11-14)
|
|
6
12
|
|
|
7
13
|
- Added: `CookiePreset.appliedRevision`, `appliedAt`, `latestRevision`, `latestAt` in `sites.cookiePresets()`: the revision a preset's rows came from against what the vendor's source answers now. Chatly's storage declaration is named by its own `version` (`instance:<version>`).
|
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
mintConsentSyncToken: () => mintConsentSyncToken,
|
|
37
37
|
parseConsentValue: () => parseConsentValue,
|
|
38
38
|
readConsent: () => readConsent,
|
|
39
|
+
rightsLink: () => rightsLink,
|
|
39
40
|
runExecutorConformance: () => runExecutorConformance,
|
|
40
41
|
secretPaths: () => secretPaths,
|
|
41
42
|
verifyDecisionSignature: () => verifyDecisionSignature,
|
|
@@ -571,7 +572,7 @@ async function exchangeOperatorToken(input) {
|
|
|
571
572
|
}
|
|
572
573
|
|
|
573
574
|
// src/index.ts
|
|
574
|
-
var SDK_VERSION = "0.
|
|
575
|
+
var SDK_VERSION = "0.33.0";
|
|
575
576
|
var CookieMunchApiError = class extends Error {
|
|
576
577
|
constructor(status, message, code, body) {
|
|
577
578
|
super(message);
|
|
@@ -751,6 +752,7 @@ function createCookieMunch(opts) {
|
|
|
751
752
|
}),
|
|
752
753
|
declareCookies: (cbid, cookies, o) => request("PUT", `/sites/${enc(cbid)}/cookies${qs({ dryRun: o?.dryRun ? "1" : void 0 })}`, { cookies, ...o?.replace ? { replace: true } : {} }),
|
|
753
754
|
planCookies: (cbid, input) => request("POST", `/sites/${enc(cbid)}/cookies/plan`, input),
|
|
755
|
+
applyCookies: (cbid, input) => request("POST", `/sites/${enc(cbid)}/cookies/apply`, input),
|
|
754
756
|
snippet: (cbid, opts2) => get(`/sites/${enc(cbid)}/snippet${qs({ blockingmode: opts2?.blockingMode, culture: opts2?.culture })}`),
|
|
755
757
|
previewToken: (cbid, o) => request("POST", `/sites/${enc(cbid)}/preview-token`, o ?? {}),
|
|
756
758
|
verify: (cbid, method) => request("POST", `/sites/${enc(cbid)}/verify`, { method }),
|
|
@@ -1112,6 +1114,11 @@ function createCookieMunch(opts) {
|
|
|
1112
1114
|
}
|
|
1113
1115
|
};
|
|
1114
1116
|
}
|
|
1117
|
+
async function rightsLink(clientOrOptions, input) {
|
|
1118
|
+
const client = "rightsLinks" in clientOrOptions ? clientOrOptions : createCookieMunch(clientOrOptions);
|
|
1119
|
+
const { cbid, ...body } = input;
|
|
1120
|
+
return (await client.rightsLinks.create(cbid, body)).url;
|
|
1121
|
+
}
|
|
1115
1122
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1116
1123
|
0 && (module.exports = {
|
|
1117
1124
|
CANARY_ISSUER,
|
|
@@ -1130,6 +1137,7 @@ function createCookieMunch(opts) {
|
|
|
1130
1137
|
mintConsentSyncToken,
|
|
1131
1138
|
parseConsentValue,
|
|
1132
1139
|
readConsent,
|
|
1140
|
+
rightsLink,
|
|
1133
1141
|
runExecutorConformance,
|
|
1134
1142
|
secretPaths,
|
|
1135
1143
|
verifyDecisionSignature,
|