@cookiemunch/sdk 0.12.0 → 0.13.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 +9 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
23
|
+
export declare const SDK_VERSION = "0.13.0";
|
|
24
24
|
export interface CookieMunchOptions {
|
|
25
25
|
apiKey: string;
|
|
26
26
|
/** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
|
|
@@ -764,6 +764,16 @@ export interface DsarCreateDryRun {
|
|
|
764
764
|
op: 'export' | 'erase' | 'optOut';
|
|
765
765
|
reached: true;
|
|
766
766
|
requireApproval?: true;
|
|
767
|
+
/** What this system would do: the host, the request templates in order (no person's data), one sentence. */
|
|
768
|
+
host?: string;
|
|
769
|
+
steps?: Array<{
|
|
770
|
+
step: string;
|
|
771
|
+
method: string;
|
|
772
|
+
path: string;
|
|
773
|
+
operation?: string;
|
|
774
|
+
purpose: string;
|
|
775
|
+
}>;
|
|
776
|
+
effect?: string;
|
|
767
777
|
}>;
|
|
768
778
|
skipped: Array<{
|
|
769
779
|
system: string;
|
|
@@ -3322,6 +3332,14 @@ export interface CookieMunchClient {
|
|
|
3322
3332
|
* cost you the connection or its id.
|
|
3323
3333
|
*/
|
|
3324
3334
|
updateExecutor(id: string, patch: DsarExecutorPatch): Promise<DsarExecutor>;
|
|
3335
|
+
/**
|
|
3336
|
+
* Create or update the connection for a system from the same body as `connectExecutor` (`PUT /v1/dsar/executors`).
|
|
3337
|
+
* Re-running it changes nothing; a changed create-only field (system, preset, presetVersion, preset params,
|
|
3338
|
+
* mintFrom, externalId) is `409 immutable_field` with every such field in `fields`.
|
|
3339
|
+
*/
|
|
3340
|
+
upsertExecutor(input: DsarExecutorInput | DsarExecutorPresetInput | Record<string, unknown>): Promise<DsarExecutor & {
|
|
3341
|
+
upserted: 'created' | 'updated';
|
|
3342
|
+
}>;
|
|
3325
3343
|
/** What `connectExecutor` would create, validated in full; nothing is stored (`?dryRun=1`). */
|
|
3326
3344
|
dryRunConnectExecutor(input: DsarExecutorInput | DsarExecutorPresetInput): Promise<DsarExecutorDryRun>;
|
|
3327
3345
|
/** The versioned presets, whether each is usable now (or waits on another platform), and the org canary address. */
|
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.
|
|
91
|
+
var SDK_VERSION = "0.13.0";
|
|
92
92
|
var CookieMunchApiError = class extends Error {
|
|
93
93
|
constructor(status, message, code, body) {
|
|
94
94
|
super(message);
|
|
@@ -428,6 +428,7 @@ function createCookieMunch(opts) {
|
|
|
428
428
|
executor: (id) => get(`/dsar/executors/${enc(id)}`),
|
|
429
429
|
connectExecutor: (input, o) => request("POST", `/dsar/executors${qs({ verify: o?.verify ? o.verify === "warn" ? "warn" : "1" : void 0 })}`, input),
|
|
430
430
|
updateExecutor: (id, patch) => request("PATCH", `/dsar/executors/${enc(id)}`, patch),
|
|
431
|
+
upsertExecutor: (input) => request("PUT", "/dsar/executors", input),
|
|
431
432
|
dryRunConnectExecutor: (input) => request("POST", "/dsar/executors?dryRun=1", input),
|
|
432
433
|
executorPresets: () => get("/dsar/executors/presets"),
|
|
433
434
|
upgradeExecutorPreset: (id, input = {}) => request("POST", `/dsar/executors/${enc(id)}/upgrade-preset`, input),
|