@cookiemunch/sdk 0.14.0 → 0.14.2

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.d.ts CHANGED
@@ -20,7 +20,7 @@ import type { ConformanceReport } from './executor-conformance.js';
20
20
  * This package's version, sent in the default User-Agent. Cloudflare answers a request with
21
21
  * no recognisable User-Agent with `403 error code: 1010`; a test pins this to package.json.
22
22
  */
23
- export declare const SDK_VERSION = "0.14.0";
23
+ export declare const SDK_VERSION = "0.14.2";
24
24
  export interface CookieMunchOptions {
25
25
  apiKey: string;
26
26
  /** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
@@ -494,6 +494,8 @@ export interface CookiePresetParams {
494
494
  legacyName?: boolean;
495
495
  /** referalli: your program handle(s), up to 10; without cookieDays the lifetime is the programs' public cookieWindowDays. */
496
496
  programHandle?: string | string[];
497
+ /** referalli: the token in your aff.js tag; without cookieDays/programHandle the lifetime is the window that script is served with. */
498
+ orgToken?: string;
497
499
  /** impact: your program id; declares IR_<campaignId> too. */
498
500
  campaignId?: string;
499
501
  }
@@ -624,8 +626,10 @@ export interface CookiePlanInput {
624
626
  name: string;
625
627
  }>;
626
628
  replace?: boolean;
627
- /** Vendor → its params, applied in key order, each seeing the steps before it. */
628
- presets?: Partial<Record<CookiePresetVendor, CookiePresetParams>>;
629
+ /** Vendor → its params, applied in key order, each seeing the steps before it. `custom` takes the body of `PUT …/cookies/presets/custom`. */
630
+ presets?: Partial<Record<CookiePresetVendor, CookiePresetParams>> & {
631
+ custom?: CustomPresetInput;
632
+ };
629
633
  }
630
634
  /** What the steps, in order, would produce. Nothing was stored. */
631
635
  export interface CookiePlanResult {
package/dist/index.js CHANGED
@@ -88,7 +88,7 @@ async function exchangeOperatorToken(input) {
88
88
  }
89
89
 
90
90
  // src/index.ts
91
- var SDK_VERSION = "0.14.0";
91
+ var SDK_VERSION = "0.14.2";
92
92
  var CookieMunchApiError = class extends Error {
93
93
  constructor(status, message, code, body) {
94
94
  super(message);