@cookiemunch/sdk 0.7.0 → 0.7.1
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 +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -838,7 +838,7 @@ declare global {
|
|
|
838
838
|
* This package's version, sent in the default User-Agent. Cloudflare answers a request with
|
|
839
839
|
* no recognisable User-Agent with `403 error code: 1010`; a test pins this to package.json.
|
|
840
840
|
*/
|
|
841
|
-
declare const SDK_VERSION = "0.7.
|
|
841
|
+
declare const SDK_VERSION = "0.7.1";
|
|
842
842
|
interface CookieMunchOptions {
|
|
843
843
|
apiKey: string;
|
|
844
844
|
/** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
|
|
@@ -2177,11 +2177,29 @@ interface ConsentInsights {
|
|
|
2177
2177
|
optInRate: number | null;
|
|
2178
2178
|
}>;
|
|
2179
2179
|
byVariantWindow: 'all_time';
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2180
|
+
/** Decisions made on a banner, by the language it was shown in; null when none in the window. */
|
|
2181
|
+
byLanguage: Array<{
|
|
2182
|
+
language: string;
|
|
2183
|
+
decisions: number;
|
|
2184
|
+
optIns: number;
|
|
2185
|
+
optInRate: number | null;
|
|
2186
|
+
}> | null;
|
|
2187
|
+
/** How long after the banner appeared visitors decided, as a histogram; null when none in the window. */
|
|
2188
|
+
timeToDecision: {
|
|
2189
|
+
decisions: number;
|
|
2190
|
+
buckets: Array<{
|
|
2191
|
+
upToSeconds: number | null;
|
|
2192
|
+
count: number;
|
|
2193
|
+
}>;
|
|
2194
|
+
median: {
|
|
2195
|
+
fromSeconds: number;
|
|
2196
|
+
upToSeconds: number | null;
|
|
2197
|
+
} | null;
|
|
2198
|
+
} | null;
|
|
2199
|
+
/** Present for a figure with nothing recorded in the window, saying why. */
|
|
2200
|
+
notRecorded?: {
|
|
2201
|
+
byLanguage?: string;
|
|
2202
|
+
timeToDecision?: string;
|
|
2185
2203
|
};
|
|
2186
2204
|
}
|
|
2187
2205
|
/** One cookie read from another CMP's export. */
|
package/dist/index.d.ts
CHANGED
|
@@ -838,7 +838,7 @@ declare global {
|
|
|
838
838
|
* This package's version, sent in the default User-Agent. Cloudflare answers a request with
|
|
839
839
|
* no recognisable User-Agent with `403 error code: 1010`; a test pins this to package.json.
|
|
840
840
|
*/
|
|
841
|
-
declare const SDK_VERSION = "0.7.
|
|
841
|
+
declare const SDK_VERSION = "0.7.1";
|
|
842
842
|
interface CookieMunchOptions {
|
|
843
843
|
apiKey: string;
|
|
844
844
|
/** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
|
|
@@ -2177,11 +2177,29 @@ interface ConsentInsights {
|
|
|
2177
2177
|
optInRate: number | null;
|
|
2178
2178
|
}>;
|
|
2179
2179
|
byVariantWindow: 'all_time';
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2180
|
+
/** Decisions made on a banner, by the language it was shown in; null when none in the window. */
|
|
2181
|
+
byLanguage: Array<{
|
|
2182
|
+
language: string;
|
|
2183
|
+
decisions: number;
|
|
2184
|
+
optIns: number;
|
|
2185
|
+
optInRate: number | null;
|
|
2186
|
+
}> | null;
|
|
2187
|
+
/** How long after the banner appeared visitors decided, as a histogram; null when none in the window. */
|
|
2188
|
+
timeToDecision: {
|
|
2189
|
+
decisions: number;
|
|
2190
|
+
buckets: Array<{
|
|
2191
|
+
upToSeconds: number | null;
|
|
2192
|
+
count: number;
|
|
2193
|
+
}>;
|
|
2194
|
+
median: {
|
|
2195
|
+
fromSeconds: number;
|
|
2196
|
+
upToSeconds: number | null;
|
|
2197
|
+
} | null;
|
|
2198
|
+
} | null;
|
|
2199
|
+
/** Present for a figure with nothing recorded in the window, saying why. */
|
|
2200
|
+
notRecorded?: {
|
|
2201
|
+
byLanguage?: string;
|
|
2202
|
+
timeToDecision?: string;
|
|
2185
2203
|
};
|
|
2186
2204
|
}
|
|
2187
2205
|
/** One cookie read from another CMP's export. */
|
package/dist/index.js
CHANGED
|
@@ -257,7 +257,7 @@ async function exchangeOperatorToken(input) {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// src/index.ts
|
|
260
|
-
var SDK_VERSION = "0.7.
|
|
260
|
+
var SDK_VERSION = "0.7.1";
|
|
261
261
|
var CookieMunchApiError = class extends Error {
|
|
262
262
|
constructor(status, message, code, body) {
|
|
263
263
|
super(message);
|