@cookiemunch/sdk 0.32.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/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +7 -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/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);
|
|
@@ -1113,6 +1114,11 @@ function createCookieMunch(opts) {
|
|
|
1113
1114
|
}
|
|
1114
1115
|
};
|
|
1115
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
|
+
}
|
|
1116
1122
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1117
1123
|
0 && (module.exports = {
|
|
1118
1124
|
CANARY_ISSUER,
|
|
@@ -1131,6 +1137,7 @@ function createCookieMunch(opts) {
|
|
|
1131
1137
|
mintConsentSyncToken,
|
|
1132
1138
|
parseConsentValue,
|
|
1133
1139
|
readConsent,
|
|
1140
|
+
rightsLink,
|
|
1134
1141
|
runExecutorConformance,
|
|
1135
1142
|
secretPaths,
|
|
1136
1143
|
verifyDecisionSignature,
|