@cookiemunch/sdk 0.13.1 → 0.13.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +3 -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.13.
|
|
23
|
+
export declare const SDK_VERSION = "0.13.2";
|
|
24
24
|
export interface CookieMunchOptions {
|
|
25
25
|
apiKey: string;
|
|
26
26
|
/** "https://api.cookiemunch.net" — the /v1 prefix is appended automatically. */
|
|
@@ -774,6 +774,18 @@ export interface DsarCreateDryRun {
|
|
|
774
774
|
purpose: string;
|
|
775
775
|
}>;
|
|
776
776
|
effect?: string;
|
|
777
|
+
/** `{ preview: true }` only: what the system's `profile.preview` reported for the subject (reads only). */
|
|
778
|
+
preview?: {
|
|
779
|
+
ok: true;
|
|
780
|
+
records: Array<{
|
|
781
|
+
type: string;
|
|
782
|
+
count: number;
|
|
783
|
+
}>;
|
|
784
|
+
raw?: string;
|
|
785
|
+
} | {
|
|
786
|
+
ok: false;
|
|
787
|
+
reason: string;
|
|
788
|
+
};
|
|
777
789
|
}>;
|
|
778
790
|
skipped: Array<{
|
|
779
791
|
system: string;
|
|
@@ -1248,6 +1260,8 @@ export interface ApiKeyPrefix {
|
|
|
1248
1260
|
strictUnknownFields?: boolean;
|
|
1249
1261
|
/** The dated API version this key is pinned to. */
|
|
1250
1262
|
apiVersion?: string;
|
|
1263
|
+
/** A bound child key's parent (the scoped key that minted it): it works only while that key does. null = independent. */
|
|
1264
|
+
parentPrefix?: string | null;
|
|
1251
1265
|
}
|
|
1252
1266
|
/** A signed audit-anchor receipt (POST /v1/anchors). Verify `signature` (Ed25519, base64url) over the canonical JSON of every other field with the key `keyId` in /v1/partner/jwks.json. */
|
|
1253
1267
|
export interface AnchorReceipt {
|
|
@@ -1340,6 +1354,8 @@ export interface ApiKeyIssued {
|
|
|
1340
1354
|
expiresAt?: number | null;
|
|
1341
1355
|
scopes?: string[] | null;
|
|
1342
1356
|
cbids?: string[] | null;
|
|
1357
|
+
/** Minted by a scoped key: the key it is bound to (it stops working when that key is revoked, rolled or expires). null = independent. */
|
|
1358
|
+
parentPrefix?: string | null;
|
|
1343
1359
|
/** No expiry, or one over 365 days. */
|
|
1344
1360
|
warnings?: string[];
|
|
1345
1361
|
/** With `secretRecipient`: the key, sealed (and `key` absent). */
|
|
@@ -2997,10 +3013,12 @@ export interface CookieMunchClient {
|
|
|
2997
3013
|
/**
|
|
2998
3014
|
* `skipped`: connections scoped to another property (or to one, when the request names none), never planned for it.
|
|
2999
3015
|
* `{ dryRun: true }` files nothing and contacts no connected system: it answers which connections the request would
|
|
3000
|
-
* reach once verified (`plan`) and which it would skip.
|
|
3016
|
+
* reach once verified (`plan`) and which it would skip. Add `preview: true` to also ask each planned system its
|
|
3017
|
+
* lookup and `profile.preview` for the subject (reads only, nothing filed): `plan[].preview`.
|
|
3001
3018
|
*/
|
|
3002
3019
|
create(input: DsarCreate & ResourceTagsInput, opts: {
|
|
3003
3020
|
dryRun: true;
|
|
3021
|
+
preview?: boolean;
|
|
3004
3022
|
}): Promise<DsarCreateDryRun>;
|
|
3005
3023
|
create(input: DsarCreate & ResourceTagsInput, opts?: {
|
|
3006
3024
|
dryRun?: false;
|
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.13.
|
|
91
|
+
var SDK_VERSION = "0.13.2";
|
|
92
92
|
var CookieMunchApiError = class extends Error {
|
|
93
93
|
constructor(status, message, code, body) {
|
|
94
94
|
super(message);
|
|
@@ -302,7 +302,7 @@ function createCookieMunch(opts) {
|
|
|
302
302
|
dsar: {
|
|
303
303
|
list: () => get("/dsar"),
|
|
304
304
|
get: (id) => get(`/dsar/${enc(id)}`),
|
|
305
|
-
create: ((input, o) => request("POST", `/dsar${qs({ dryRun: o?.dryRun ? "1" : void 0 })}`, input)),
|
|
305
|
+
create: ((input, o) => request("POST", `/dsar${qs({ dryRun: o?.dryRun ? "1" : void 0, preview: o?.preview ? "1" : void 0 })}`, input)),
|
|
306
306
|
advance: (id, toStatus, opts2) => request("POST", `/dsar/${enc(id)}/advance`, { toStatus, ...opts2?.messageToSubject !== void 0 ? { messageToSubject: opts2.messageToSubject } : {} }),
|
|
307
307
|
response: (id) => request("GET", `/dsar/${enc(id)}/response`, void 0, true),
|
|
308
308
|
erase: (id, cbid, stamp) => request("POST", `/dsar/${enc(id)}/erase`, { cbid, stamp }),
|