@cookiemunch/sdk 0.7.1 → 0.9.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.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.1";
260
+ var SDK_VERSION = "0.9.0";
261
261
  var CookieMunchApiError = class extends Error {
262
262
  constructor(status, message, code, body) {
263
263
  super(message);
@@ -479,7 +479,7 @@ function createCookieMunch(opts) {
479
479
  listByTrace: (trace) => get(`/dsar${qs({ trace })}`),
480
480
  openCase: (input, o) => request("POST", "/dsar/requests", input, false, {
481
481
  ...o?.idempotencyKey ? { "Idempotency-Key": o.idempotencyKey } : {},
482
- ...o?.trace ? { "X-ForgeDeck-Trace": o.trace } : {}
482
+ ...o?.trace ? { "X-Trace-Id": o.trace } : {}
483
483
  }),
484
484
  getCase: (id) => get(`/dsar/requests/${enc(id)}`),
485
485
  cancelCase: (id) => request("POST", `/dsar/requests/${enc(id)}/cancel`),
@@ -569,7 +569,8 @@ function createCookieMunch(opts) {
569
569
  },
570
570
  regulatory: {
571
571
  feed: (jurisdictions) => get(`/regulatory/feed${qs({ jurisdictions: jurisdictions?.join(",") })}`),
572
- upcoming: (days) => get(`/regulatory/upcoming${qs({ days })}`)
572
+ upcoming: (days) => get(`/regulatory/upcoming${qs({ days })}`),
573
+ upcomingForSite: (cbid, opts2) => get(`/sites/${enc(cbid)}/regulatory/upcoming${qs({ days: opts2?.days, minShare: opts2?.minShare })}`)
573
574
  },
574
575
  ai: {
575
576
  getPolicy: () => get("/ai/policy"),
@@ -751,7 +752,8 @@ function createCookieMunch(opts) {
751
752
  set: (cbid, input) => request("PUT", `/sites/${enc(cbid)}/dsar-settings`, input)
752
753
  },
753
754
  integrations: {
754
- subjectCard: (app, person) => get(`/integrations/${enc(app)}/card${qs(person)}`)
755
+ subjectCard: (app, person) => get(`/integrations/${enc(app)}/card${qs(person)}`),
756
+ connect: (provider, input, o) => request("POST", `/integrations/${enc(provider)}/connect${qs({ dryRun: o?.dryRun ? "1" : void 0 })}`, input)
755
757
  },
756
758
  subjects: {
757
759
  consent: (subjectId) => get(`/subjects/${enc(subjectId)}/consent`)