@chainpatrol/sdk 1.2.0 → 1.4.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 +113 -0
- package/dist/api/index.d.mts +228 -1
- package/dist/api/index.d.ts +228 -1
- package/dist/api/index.js +20 -9
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +20 -10
- package/dist/api/index.mjs.map +1 -1
- package/dist/{chunk-S5BCAUOT.mjs → chunk-CXASSCWN.mjs} +34 -3
- package/dist/chunk-CXASSCWN.mjs.map +1 -0
- package/dist/index.js +83 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -6
- package/dist/index.mjs.map +1 -1
- package/dist/skill/cli.js +32 -1
- package/dist/skill/cli.js.map +1 -1
- package/dist/skill/cli.mjs +1 -1
- package/dist/skill/index.js +32 -1
- package/dist/skill/index.js.map +1 -1
- package/dist/skill/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-S5BCAUOT.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,118 @@
|
|
|
1
1
|
# @chainpatrol/sdk
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ccd3811: Adds `reporterKind` and `reviewerKind` filters (`human` | `automation`) to organization report listing so callers can separate automation vs human report sources and approvals.
|
|
8
|
+
|
|
9
|
+
The previous `excludeAutomation` boolean remains supported as a deprecated alias for `reporterKind: "human"`. CLI adds `--reporter-kind` and `--reviewer-kind`.
|
|
10
|
+
|
|
11
|
+
Server-side work in `@chainpatrol/core`, `@chainpatrol/trpc`, and `@chainpatrol/external-trpc` backs the new filters; those packages are private and don't need version bumps.
|
|
12
|
+
|
|
13
|
+
- 9dd02cf: Third and final tranche of the API-surface expansion — the join-required
|
|
14
|
+
slices. All additive, no removed fields.
|
|
15
|
+
|
|
16
|
+
**Takedowns — provider names on `listTakedowns` and `getTakedown`.** Each
|
|
17
|
+
`TakedownItem` and the `getTakedown` `takedown` object now carries
|
|
18
|
+
`domainRegistrar`, `hostingProvider`, and `tldRegistrar` (each
|
|
19
|
+
`{ id, name } | null`) alongside the existing `assignee` / `brand`.
|
|
20
|
+
Answers "who hosts phish.example?" without a follow-up call and unblocks
|
|
21
|
+
"which takedowns are stuck at registrar X?" cross-org queries. Distinct
|
|
22
|
+
from the per-task `takedownProvider` — the trio here is the
|
|
23
|
+
takedown-level assignment for the domain itself, whereas the task-level
|
|
24
|
+
provider is the entity handling the current step.
|
|
25
|
+
|
|
26
|
+
**Detection Configs — `lastResultAt` aggregate on
|
|
27
|
+
`listDetectionConfigs`.** Each `ConfigEntry` now carries `lastResultAt`
|
|
28
|
+
(nullable ISO timestamp) — the `MAX(createdAt)` of `ThreatDetectionResult`
|
|
29
|
+
rows tied to that config. Surfaces the same silent-config signal the
|
|
30
|
+
drift healthcheck already computes internally. A config with a stale
|
|
31
|
+
`lastResultAt` is going silent regardless of what its `updatedAt` says.
|
|
32
|
+
|
|
33
|
+
Computed with a single `groupBy` on `ThreatDetectionResult` scoped to the
|
|
34
|
+
response's config IDs — one extra query per call, index-friendly via
|
|
35
|
+
`ThreatDetectionResult.@@index([configId])`.
|
|
36
|
+
|
|
37
|
+
Server-side work in `@chainpatrol/external-trpc` and
|
|
38
|
+
`@chainpatrol/validation` supports the new fields; both are private
|
|
39
|
+
packages and don't need version bumps.
|
|
40
|
+
|
|
41
|
+
- 725d32c: `listOrganizationReports` now calls `GET /organization/reports` instead of the deprecated `POST /public/getOrganizationReports`. Inputs, outputs, and the CLI's `reports list --org <slug>` behaviour are unchanged.
|
|
42
|
+
|
|
43
|
+
Server-side work in `@chainpatrol/external-trpc` makes the switch safe. `GET /organization/reports` now accepts an optional `slug`, authorized the same way the deprecated endpoint authorized it, so callers whose credentials cover more than one organization — user-scoped API keys, staff and member sessions, which is how `chainpatrol login` authenticates — can still choose an organization instead of having it derived from an org-scoped API key. It also fixes two query-string bugs that made the endpoint's filters unusable: `?<flag>=false` was read as `true`, and array filters passed once rather than repeated (`?brandIds=12`, `?assetTypes=URL`) were rejected with a validation error. `@chainpatrol/external-trpc` is private and does not need a version bump.
|
|
44
|
+
|
|
45
|
+
- 725d32c: Adds a `needsCustomerReview` filter to organization report listing so callers can pull just the reports an organization still has to approve. CLI adds `--needs-customer-review` / `--no-needs-customer-review` to `reports list`.
|
|
46
|
+
|
|
47
|
+
The filter resolves what "waiting on the customer" means per organization: with Obligatory Organization Admin Approval on, every report with a pending proposal whose asset type is in the approval scope (all asset types when the scope is not narrowed) plus anything escalated to the customer; with it off, only reports escalated to the customer. Reports the organization submitted itself are excluded.
|
|
48
|
+
|
|
49
|
+
Server-side work in `@chainpatrol/core` and `@chainpatrol/external-trpc` backs the new filter; those packages are private and don't need version bumps.
|
|
50
|
+
|
|
51
|
+
- e73955d: Fixes three problems with report search (`POST /reports/search`, `chainpatrol reports search`):
|
|
52
|
+
|
|
53
|
+
- **It did not work for logged-in CLI users.** The endpoint resolved the organization only from an organization-scoped API key, so anyone authenticated with the bearer token `chainpatrol login` issues got `API Organization not found. Invalid or missing API key.` It now accepts an optional `slug`, authorized the same way the rest of the API authorizes one, and the CLI passes the resolved organization.
|
|
54
|
+
- **Results were unbounded.** An asset content shared across many reports returned every one of them. Responses are now capped by a `limit` (default 50, max 100, newest first) and carry `totalCount` so callers can see when results were truncated. The CLI gains `--limit` and reports "Matched 3 of 41 report(s)".
|
|
55
|
+
- **The endpoint's purpose was unclear next to report listing.** Both endpoints' descriptions now state the question each answers and point at the other: search looks reports up by asset content in one batched call to avoid filing a duplicate; `GET /organization/reports` browses and filters an organization's reports with full records and pagination.
|
|
56
|
+
|
|
57
|
+
Server-side work in `@chainpatrol/external-trpc`, which is private and does not need a version bump.
|
|
58
|
+
|
|
59
|
+
## 1.3.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- 08b9976: Broaden the public API surface across Reports, Takedowns, Detections,
|
|
64
|
+
Detection Configs, and Assets. Everything additive — no removed fields,
|
|
65
|
+
no renames — so existing callers are unaffected.
|
|
66
|
+
|
|
67
|
+
**Detections (`listDetections`)** — new fields on each `DetectionListItem`:
|
|
68
|
+
`reason` (free-text explanation of why the detection fired), `score` (raw
|
|
69
|
+
0–1 model score), `configId` (which `ThreatDetectionConfig` produced the
|
|
70
|
+
hit), `reportedAt` (when it transitioned to `REPORTED`, nullable), and
|
|
71
|
+
`brands[]` (brand associations).
|
|
72
|
+
|
|
73
|
+
**Detection Configs (`listDetectionConfigs`)** — each `ConfigEntry` now
|
|
74
|
+
carries `description` (nullable), `createdAt`, and `updatedAt` so
|
|
75
|
+
integrators can spot silent or stale configs.
|
|
76
|
+
|
|
77
|
+
**Reports** — `listOrganizationReports` gains `slaDueAt` (SLA deadline),
|
|
78
|
+
`externalSubmissionLink` (original external source URL when submitted from
|
|
79
|
+
a third-party surface), and `duplicateOfId` (canonical report ID when this
|
|
80
|
+
one is a duplicate). Type gaps are also closed: `imageDisplay`,
|
|
81
|
+
`favoritedAt`, `attachments[]`, and `proposals.asset.scans[]` were already
|
|
82
|
+
returned by the handler but omitted from the SDK type — they're now
|
|
83
|
+
declared. `searchReports` (`report/search-external`) response now
|
|
84
|
+
surfaces the `title` and `createdAt` fields the handler already fetched.
|
|
85
|
+
|
|
86
|
+
**Takedowns (`listTakedowns`)** — each `TakedownItem` gains `externalId`
|
|
87
|
+
(vendor's own reference — CleanDNS report ID / registrar ticket, for
|
|
88
|
+
reconciliation), `hasFilingDelay`, `hasLivenessCheckDelay` (staff-set
|
|
89
|
+
flags used by median-time metrics), and `asset.blockedAt`.
|
|
90
|
+
|
|
91
|
+
**Takedowns (`getTakedown`)** — the response was previously bare
|
|
92
|
+
(`{ assetContent, takedownStatus, createdAt, updatedAt }`). It's now
|
|
93
|
+
fully built out with `asset` details (id / content / type /
|
|
94
|
+
`livenessStatus` / `blockedAt`) and a nested `takedown` record (id /
|
|
95
|
+
status / `externalId` / delay flags / assignee / brand / tasks[]). The
|
|
96
|
+
original top-level fields (`takedownStatus`, `createdAt`, `updatedAt`)
|
|
97
|
+
are preserved for existing callers.
|
|
98
|
+
|
|
99
|
+
**Assets — `livenessStatus` + `blockedAt` parity.** `listAssets`,
|
|
100
|
+
`listOrganizationAssets`, `assetSearch` (`.asset`), and `listThreats`
|
|
101
|
+
(`livenessStatus` only, `blockedAt` already there) now consistently
|
|
102
|
+
return both fields. `listAssets` also fixes a bug where each returned
|
|
103
|
+
row's `id` was stripped from the response mapper (the column was already
|
|
104
|
+
selected). Note: `assetCheck` is intentionally deferred — its response
|
|
105
|
+
goes through `@chainpatrol/asset`'s own `checkAsset()` contract; parity
|
|
106
|
+
there needs a scoped follow-up in the asset package.
|
|
107
|
+
|
|
108
|
+
Server-side work in `@chainpatrol/external-trpc`, `@chainpatrol/core`,
|
|
109
|
+
`@chainpatrol/validation`, and `@chainpatrol/database` backs the new
|
|
110
|
+
fields; those are private packages and don't need version bumps. Also
|
|
111
|
+
adds a `/// @deprecated` doc-comment to `Report.threatLevel` in the
|
|
112
|
+
Prisma schema — the field is not surfaced through the public API and no
|
|
113
|
+
in-app UI reads it; the column stays for now, removal is a separate
|
|
114
|
+
destructive migration.
|
|
115
|
+
|
|
3
116
|
## 1.2.0
|
|
4
117
|
|
|
5
118
|
### Minor Changes
|
package/dist/api/index.d.mts
CHANGED
|
@@ -14,9 +14,37 @@ interface ChainPatrolApiClientOptions {
|
|
|
14
14
|
interface ConfigEntry {
|
|
15
15
|
id: number;
|
|
16
16
|
title: string;
|
|
17
|
+
/**
|
|
18
|
+
* Human-readable description of what the config does. `null` when unset
|
|
19
|
+
* — most configs seeded before this field existed do not have one.
|
|
20
|
+
*/
|
|
21
|
+
description: string | null;
|
|
17
22
|
status: string;
|
|
18
23
|
cron: string | null;
|
|
19
24
|
config: Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* Optional brand connection. Present only for org-scoped configs when the
|
|
27
|
+
* config targets a specific brand.
|
|
28
|
+
*/
|
|
29
|
+
brandId?: number | null;
|
|
30
|
+
brand?: {
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
slug: string;
|
|
34
|
+
} | null;
|
|
35
|
+
/** When the config was first created (ISO 8601, UTC). */
|
|
36
|
+
createdAt: string;
|
|
37
|
+
/**
|
|
38
|
+
* When the config was last updated (ISO 8601, UTC). Pair with the drift
|
|
39
|
+
* healthcheck to spot silent configs untouched in months.
|
|
40
|
+
*/
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
/**
|
|
43
|
+
* When the most recent `ThreatDetectionResult` for this config was created
|
|
44
|
+
* (ISO 8601, UTC). Null when the config has never produced a hit. A config
|
|
45
|
+
* with no recent `lastResultAt` is going silent regardless of `updatedAt`.
|
|
46
|
+
*/
|
|
47
|
+
lastResultAt: string | null;
|
|
20
48
|
}
|
|
21
49
|
interface DetectionSource {
|
|
22
50
|
source: string;
|
|
@@ -82,6 +110,16 @@ interface AssetSearchResultItem {
|
|
|
82
110
|
type: string;
|
|
83
111
|
status: string;
|
|
84
112
|
watchStatus: string;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the asset is currently reachable (`"ALIVE"`), gone
|
|
115
|
+
* (`"DEAD"`), or unchecked (`"UNKNOWN"`). Null when never evaluated.
|
|
116
|
+
*/
|
|
117
|
+
livenessStatus: LivenessStatus | null;
|
|
118
|
+
/**
|
|
119
|
+
* When the asset transitioned to BLOCKED (ISO 8601, UTC). Null for
|
|
120
|
+
* non-blocked assets or blocks predating the field.
|
|
121
|
+
*/
|
|
122
|
+
blockedAt: string | null;
|
|
85
123
|
createdAt: string;
|
|
86
124
|
updatedAt: string;
|
|
87
125
|
} | null;
|
|
@@ -130,10 +168,22 @@ interface AssetListInput {
|
|
|
130
168
|
nextPage?: string;
|
|
131
169
|
}
|
|
132
170
|
interface AssetListItem {
|
|
171
|
+
/** Asset ID — reference in follow-up calls (was previously stripped from the response). */
|
|
172
|
+
id: number;
|
|
133
173
|
content: string;
|
|
134
174
|
type: string;
|
|
135
175
|
status: string;
|
|
136
176
|
watchStatus: string;
|
|
177
|
+
/**
|
|
178
|
+
* Whether the asset is currently reachable (`"ALIVE"`), gone
|
|
179
|
+
* (`"DEAD"`), or unchecked (`"UNKNOWN"`). Null when never evaluated.
|
|
180
|
+
*/
|
|
181
|
+
livenessStatus: LivenessStatus | null;
|
|
182
|
+
/**
|
|
183
|
+
* When the asset transitioned to BLOCKED (ISO 8601, UTC). Null for
|
|
184
|
+
* non-blocked assets.
|
|
185
|
+
*/
|
|
186
|
+
blockedAt: string | null;
|
|
137
187
|
updatedAt: string;
|
|
138
188
|
}
|
|
139
189
|
interface AssetListResult {
|
|
@@ -401,6 +451,8 @@ declare const REPORT_REVIEW_DECISIONS: readonly ["APPROVE", "REJECT", "SKIP", "E
|
|
|
401
451
|
type ReportReviewDecision = (typeof REPORT_REVIEW_DECISIONS)[number];
|
|
402
452
|
declare const REPORT_STATUSES: readonly ["TODO", "IN_PROGRESS", "CLOSED"];
|
|
403
453
|
type ReportStatus = (typeof REPORT_STATUSES)[number];
|
|
454
|
+
declare const ACTOR_KINDS: readonly ["human", "automation"];
|
|
455
|
+
type ActorKind = (typeof ACTOR_KINDS)[number];
|
|
404
456
|
interface OrganizationReportsListInput {
|
|
405
457
|
slug: string;
|
|
406
458
|
limit?: number;
|
|
@@ -409,7 +461,12 @@ interface OrganizationReportsListInput {
|
|
|
409
461
|
searchQuery?: string;
|
|
410
462
|
reporterQuery?: string;
|
|
411
463
|
reportedByCustomer?: boolean;
|
|
464
|
+
/** @deprecated Prefer `reporterKind: "human"`. */
|
|
412
465
|
excludeAutomation?: boolean;
|
|
466
|
+
/** Filter by whether the report was submitted by a human or automation. */
|
|
467
|
+
reporterKind?: ActorKind;
|
|
468
|
+
/** Filter by whether the report was approved by a human or automation. */
|
|
469
|
+
reviewerKind?: ActorKind;
|
|
413
470
|
onlyRejected?: boolean;
|
|
414
471
|
reviewStatuses?: ReportReviewDecision[];
|
|
415
472
|
assetTypes?: string[];
|
|
@@ -420,16 +477,69 @@ interface OrganizationReportsListInput {
|
|
|
420
477
|
endDate?: string;
|
|
421
478
|
updatedAtStartDate?: string;
|
|
422
479
|
updatedAtEndDate?: string;
|
|
480
|
+
/**
|
|
481
|
+
* Filter to reports waiting on the organization's own approval — the reports
|
|
482
|
+
* a customer admin still has to sign off on before the assets in them can be
|
|
483
|
+
* blocked. `true` returns only those reports; `false` returns only reports
|
|
484
|
+
* that are not waiting on them.
|
|
485
|
+
*
|
|
486
|
+
* When "Obligatory Organization Admin Approval" is on for the organization,
|
|
487
|
+
* that means every report with a pending proposal whose asset type is in the
|
|
488
|
+
* approval scope (all asset types when the scope has not been narrowed), plus
|
|
489
|
+
* anything ChainPatrol staff escalated to the organization. When the setting
|
|
490
|
+
* is off, only reports staff escalated to the organization are returned.
|
|
491
|
+
* Reports the organization submitted itself are never included — staff can
|
|
492
|
+
* action those without customer sign-off.
|
|
493
|
+
*/
|
|
494
|
+
needsCustomerReview?: boolean;
|
|
495
|
+
}
|
|
496
|
+
interface OrganizationReportAssetScanEnrichment {
|
|
497
|
+
id: number;
|
|
498
|
+
type: string;
|
|
499
|
+
output: unknown;
|
|
500
|
+
status: string;
|
|
501
|
+
}
|
|
502
|
+
interface OrganizationReportAssetScan {
|
|
503
|
+
id: number;
|
|
504
|
+
status: string;
|
|
505
|
+
output: unknown;
|
|
506
|
+
createdAt: string;
|
|
507
|
+
enrichments: OrganizationReportAssetScanEnrichment[];
|
|
508
|
+
}
|
|
509
|
+
interface OrganizationReportAttachment {
|
|
510
|
+
id: number;
|
|
511
|
+
url: string;
|
|
423
512
|
}
|
|
424
513
|
interface OrganizationReportsListResult {
|
|
425
514
|
reports: Array<{
|
|
426
515
|
id: number;
|
|
427
516
|
title: string;
|
|
428
517
|
description: string;
|
|
518
|
+
/** Whether the report's images render inline or are hidden by default. */
|
|
519
|
+
imageDisplay: string;
|
|
520
|
+
/** When the report was starred/favorited (ISO 8601, UTC). Null when not favorited. */
|
|
521
|
+
favoritedAt: string | null;
|
|
429
522
|
status: string | null;
|
|
430
523
|
reportedByCustomer: boolean;
|
|
524
|
+
/**
|
|
525
|
+
* SLA deadline for this report (ISO 8601, UTC). Null when no SLA
|
|
526
|
+
* applies (e.g. staff-created reports).
|
|
527
|
+
*/
|
|
528
|
+
slaDueAt: string | null;
|
|
529
|
+
/**
|
|
530
|
+
* URL to the original external source of the report when submitted
|
|
531
|
+
* from a third-party surface (Discord/Twitter link, forwarded webform).
|
|
532
|
+
* Null for reports created directly in ChainPatrol.
|
|
533
|
+
*/
|
|
534
|
+
externalSubmissionLink: string | null;
|
|
535
|
+
/**
|
|
536
|
+
* ID of the canonical report this one duplicates. Null when the
|
|
537
|
+
* report is not a duplicate.
|
|
538
|
+
*/
|
|
539
|
+
duplicateOfId: number | null;
|
|
431
540
|
createdAt: string;
|
|
432
541
|
updatedAt: string;
|
|
542
|
+
attachments: OrganizationReportAttachment[];
|
|
433
543
|
proposals: Array<{
|
|
434
544
|
reviewStatus: string;
|
|
435
545
|
asset: {
|
|
@@ -437,6 +547,12 @@ interface OrganizationReportsListResult {
|
|
|
437
547
|
type: string;
|
|
438
548
|
content: string;
|
|
439
549
|
status: string;
|
|
550
|
+
/**
|
|
551
|
+
* Per-scan enrichment data. Large (Apple App Store enrichments run
|
|
552
|
+
* 50–200 KB each) — the agent42 tool strips these by default when
|
|
553
|
+
* relaying results. Present in the raw handler response.
|
|
554
|
+
*/
|
|
555
|
+
scans: OrganizationReportAssetScan[];
|
|
440
556
|
};
|
|
441
557
|
}>;
|
|
442
558
|
reporter: {
|
|
@@ -482,12 +598,42 @@ interface DetectionListInput {
|
|
|
482
598
|
countryCodes?: string[];
|
|
483
599
|
onlyDeleted?: boolean;
|
|
484
600
|
}
|
|
601
|
+
interface DetectionBrand {
|
|
602
|
+
id: number;
|
|
603
|
+
name: string;
|
|
604
|
+
slug: string;
|
|
605
|
+
}
|
|
485
606
|
interface DetectionListItem {
|
|
486
607
|
id: number;
|
|
487
608
|
threatContent: string;
|
|
488
609
|
source: string;
|
|
489
610
|
createdAt: string;
|
|
490
611
|
confidence: DetectionConfidence;
|
|
612
|
+
/**
|
|
613
|
+
* Raw model score (0–1). `confidence` buckets this into low/medium/high
|
|
614
|
+
* using the org's thresholds; use `score` when the buckets are too coarse.
|
|
615
|
+
*/
|
|
616
|
+
score: number;
|
|
617
|
+
/**
|
|
618
|
+
* Free-text explanation of why the detection fired (e.g. "matches
|
|
619
|
+
* brand-name typo squat", "TLS cert issued by known lookalike CA").
|
|
620
|
+
*/
|
|
621
|
+
reason: string;
|
|
622
|
+
/**
|
|
623
|
+
* ID of the `ThreatDetectionConfig` that produced this hit. Pair with
|
|
624
|
+
* `listDetectionConfigs` to drill back into the config.
|
|
625
|
+
*/
|
|
626
|
+
configId: number;
|
|
627
|
+
/**
|
|
628
|
+
* When the detection was reported (ISO 8601, UTC). Null when the
|
|
629
|
+
* detection has not been reported yet.
|
|
630
|
+
*/
|
|
631
|
+
reportedAt: string | null;
|
|
632
|
+
/**
|
|
633
|
+
* Brands the detection was associated with. Empty when the detection
|
|
634
|
+
* was not linked to any brand at classification time.
|
|
635
|
+
*/
|
|
636
|
+
brands: DetectionBrand[];
|
|
491
637
|
reportStatus: DetectionReportStatus;
|
|
492
638
|
asset: {
|
|
493
639
|
id: number;
|
|
@@ -516,6 +662,11 @@ interface ThreatItem {
|
|
|
516
662
|
id: number;
|
|
517
663
|
content: string;
|
|
518
664
|
type: string;
|
|
665
|
+
/**
|
|
666
|
+
* Liveness of the blocked threat. `"ALIVE"` still reachable, `"DEAD"`
|
|
667
|
+
* gone, `"UNKNOWN"` unchecked. Null when never evaluated.
|
|
668
|
+
*/
|
|
669
|
+
livenessStatus: LivenessStatus | null;
|
|
519
670
|
blockedAt: string;
|
|
520
671
|
}
|
|
521
672
|
interface ThreatsListResult {
|
|
@@ -540,6 +691,16 @@ interface OrganizationAssetItem {
|
|
|
540
691
|
id: number;
|
|
541
692
|
name: string;
|
|
542
693
|
} | null;
|
|
694
|
+
/**
|
|
695
|
+
* Whether the asset is currently reachable (`"ALIVE"`), gone
|
|
696
|
+
* (`"DEAD"`), or unchecked (`"UNKNOWN"`). Null when never evaluated.
|
|
697
|
+
*/
|
|
698
|
+
livenessStatus: LivenessStatus | null;
|
|
699
|
+
/**
|
|
700
|
+
* When the asset transitioned to BLOCKED (ISO 8601, UTC). Null for
|
|
701
|
+
* non-blocked assets.
|
|
702
|
+
*/
|
|
703
|
+
blockedAt: string | null;
|
|
543
704
|
createdAt: string;
|
|
544
705
|
updatedAt: string;
|
|
545
706
|
}
|
|
@@ -600,16 +761,39 @@ interface OrganizationBrandsListResult {
|
|
|
600
761
|
}
|
|
601
762
|
interface ReportsSearchInput {
|
|
602
763
|
assetContents: string[];
|
|
764
|
+
/**
|
|
765
|
+
* Organization slug. Optional for organization-scoped API keys, which resolve
|
|
766
|
+
* the organization from the key itself. Required when your credentials can
|
|
767
|
+
* reach more than one organization — including the bearer token issued by
|
|
768
|
+
* `chainpatrol login`.
|
|
769
|
+
*/
|
|
770
|
+
slug?: string;
|
|
603
771
|
reportedByCustomer?: boolean;
|
|
772
|
+
/**
|
|
773
|
+
* Maximum number of reports to return, newest first. Defaults to 50, maximum
|
|
774
|
+
* 100. Compare with `totalCount` to tell whether results were truncated.
|
|
775
|
+
*/
|
|
776
|
+
limit?: number;
|
|
604
777
|
}
|
|
605
778
|
interface ReportsSearchResultItem {
|
|
606
779
|
id: number;
|
|
780
|
+
/**
|
|
781
|
+
* Report title. Null for external / anonymous reports without one.
|
|
782
|
+
*/
|
|
783
|
+
title: string | null;
|
|
607
784
|
status: string;
|
|
608
785
|
reportedByCustomer: boolean;
|
|
786
|
+
/** When the report was created (ISO 8601, UTC). */
|
|
787
|
+
createdAt: string;
|
|
609
788
|
assets: string[];
|
|
610
789
|
}
|
|
611
790
|
interface ReportsSearchResult {
|
|
612
791
|
reports: ReportsSearchResultItem[];
|
|
792
|
+
/**
|
|
793
|
+
* Total number of reports matching the search, ignoring `limit`. Greater than
|
|
794
|
+
* `reports.length` means the results were truncated.
|
|
795
|
+
*/
|
|
796
|
+
totalCount: number;
|
|
613
797
|
}
|
|
614
798
|
interface UserMeResult {
|
|
615
799
|
user: {
|
|
@@ -659,6 +843,24 @@ interface TakedownsListInput {
|
|
|
659
843
|
interface TakedownItem {
|
|
660
844
|
id: number;
|
|
661
845
|
status: TakedownStatus;
|
|
846
|
+
/**
|
|
847
|
+
* Provider's own reference for this takedown (e.g. CleanDNS report ID,
|
|
848
|
+
* registrar ticket). Reconcile with the vendor's dashboard. `null` when
|
|
849
|
+
* no vendor has picked it up yet.
|
|
850
|
+
*/
|
|
851
|
+
externalId: string | null;
|
|
852
|
+
/**
|
|
853
|
+
* Manually set by staff to exclude the takedown from median-time metrics
|
|
854
|
+
* when its filing was delayed for reasons unrelated to platform
|
|
855
|
+
* performance.
|
|
856
|
+
*/
|
|
857
|
+
hasFilingDelay: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* Manually set by staff to exclude the takedown from median-time metrics
|
|
860
|
+
* when the liveness-check step was delayed for reasons unrelated to
|
|
861
|
+
* platform performance.
|
|
862
|
+
*/
|
|
863
|
+
hasLivenessCheckDelay: boolean;
|
|
662
864
|
createdAt: string;
|
|
663
865
|
updatedAt: string;
|
|
664
866
|
asset: {
|
|
@@ -666,6 +868,11 @@ interface TakedownItem {
|
|
|
666
868
|
content: string;
|
|
667
869
|
type: string;
|
|
668
870
|
livenessStatus: LivenessStatus | null;
|
|
871
|
+
/**
|
|
872
|
+
* When the asset transitioned to BLOCKED (ISO 8601, UTC). Null if the
|
|
873
|
+
* asset was never blocked (rare for takedown rows).
|
|
874
|
+
*/
|
|
875
|
+
blockedAt: string | null;
|
|
669
876
|
};
|
|
670
877
|
assignee: {
|
|
671
878
|
id: number;
|
|
@@ -676,6 +883,26 @@ interface TakedownItem {
|
|
|
676
883
|
name: string;
|
|
677
884
|
slug: string | null;
|
|
678
885
|
} | null;
|
|
886
|
+
/**
|
|
887
|
+
* Domain registrar assigned to this takedown (e.g. Namecheap, GoDaddy).
|
|
888
|
+
* Null when unresolved. Distinct from per-task `takedownProvider` — this
|
|
889
|
+
* is the takedown-level assignment for the domain itself.
|
|
890
|
+
*/
|
|
891
|
+
domainRegistrar: TakedownProviderRef | null;
|
|
892
|
+
/**
|
|
893
|
+
* Hosting provider assigned to this takedown (e.g. Cloudflare, AWS).
|
|
894
|
+
* Answers "who hosts this?" without a follow-up call. Null when unresolved.
|
|
895
|
+
*/
|
|
896
|
+
hostingProvider: TakedownProviderRef | null;
|
|
897
|
+
/**
|
|
898
|
+
* Top-level-domain registrar assigned to this takedown (e.g. Verisign).
|
|
899
|
+
* Null when unresolved.
|
|
900
|
+
*/
|
|
901
|
+
tldRegistrar: TakedownProviderRef | null;
|
|
902
|
+
}
|
|
903
|
+
interface TakedownProviderRef {
|
|
904
|
+
id: number;
|
|
905
|
+
name: string;
|
|
679
906
|
}
|
|
680
907
|
interface TakedownsListResult {
|
|
681
908
|
takedowns: TakedownItem[];
|
|
@@ -1033,4 +1260,4 @@ declare class ChainPatrolApiClient implements ApiClient {
|
|
|
1033
1260
|
declare function parseIsoDate(value: string | undefined): Date | undefined;
|
|
1034
1261
|
declare function parseIsoDateString(value: string | undefined): string | undefined;
|
|
1035
1262
|
|
|
1036
|
-
export { type ApiClient, type ApiCredential, type AssetCheckInput, type AssetCheckResult, type AssetCheckSourceEntry, type AssetCheckStatus, type AssetGroupItem, type AssetListInput, type AssetListItem, type AssetListResult, type AssetSearchInput, type AssetSearchResult, type AssetSearchResultItem, type BrandItem, type BrandLegalDocument, type BrandLegalDocuments, type BrandTrademarkRegistrationItem, type BrandType, ChainPatrolApiClient, type ChainPatrolApiClientOptions, type ConfigEntry, type CredentialProvider, DETECTION_CONFIDENCE_LEVELS, DETECTION_REPORTED_FILTERS, type DetectionConfidence, type DetectionConfigRunInput, type DetectionConfigRunResult, type DetectionConfigUpdateInput, type DetectionConfigUpdateResult, type DetectionConfigValidateInput, type DetectionConfigValidateResult, type DetectionDriftInput, type DetectionDriftResult, type DetectionListInput, type DetectionListItem, type DetectionListResult, type DetectionReportStatus, type DetectionReportedFilter, type DetectionSource, type HealthcheckCategory, type HealthcheckFinding, type HealthcheckRegistryEntry, type HealthcheckResult, type HealthcheckSeverity, type HealthchecksListResult, LIVENESS_FILTER_VALUES, LIVENESS_STATUSES, type LivenessFilterValue, type LivenessStatus, type MetricsBreakdownInput, type MetricsBreakdownResult, type MetricsFoundInput, type MetricsFoundResult, type MetricsSummaryInput, type MetricsSummaryResult, ORGANIZATION_METRICS_INCLUDE_FIELDS, type OperationsQueuesSnapshotInput, type OperationsQueuesSnapshotResult, type OrganizationAssetGroupsListResult, type OrganizationAssetItem, type OrganizationAssetsListInput, type OrganizationAssetsListResult, type OrganizationBrandsListResult, type OrganizationMetricsIncludeField, type OrganizationMetricsInput, type OrganizationMetricsResult, type OrganizationMetricsResultMetrics, type OrganizationMetricsServicesFilter, type OrganizationMetricsVisibility, type OrganizationPortalVisibility, type OrganizationReportVisibility, type OrganizationReportsListInput, type OrganizationReportsListResult, type PendingApprovalService, type PendingServiceApproval, REPORT_REVIEW_DECISIONS, REPORT_STATUSES, type ReportAssetInput, type ReportCreateInput, type ReportCreateResult, type ReportReviewDecision, type ReportStatus, type ReportsSearchInput, type ReportsSearchResult, type ReportsSearchResultItem, TAKEDOWN_SORT_KEYS, TAKEDOWN_STATUSES, type TakedownItem, type TakedownSortKey, type TakedownStatus, type TakedownsListInput, type TakedownsListResult, type ThreatItem, type ThreatsListInput, type ThreatsListResult, type UserMeResult, type UserOrg, type UserOrgBrandMetadata, type UserOrgGetInput, type UserOrgGetResult, type UserOrgIntegrations, type UserOrgLegalDocument, type UserOrgLegalDocuments, type UserOrgPortalCustomization, type UserOrgTrademarkRegistration, type UserOrgsInput, type UserOrgsObligatoryAdminApprovalFilter, type UserOrgsPendingServiceApprovalFilter, type UserOrgsResult, type UserOrgsServiceFilters, type UserOrgsSubscriptionStatus, type ValidateApiKeyResult, WATCHLIST_FILTER_VALUES, type WatchlistFilterValue, parseIsoDate, parseIsoDateString, staticApiKey, staticBearerToken };
|
|
1263
|
+
export { ACTOR_KINDS, type ActorKind, type ApiClient, type ApiCredential, type AssetCheckInput, type AssetCheckResult, type AssetCheckSourceEntry, type AssetCheckStatus, type AssetGroupItem, type AssetListInput, type AssetListItem, type AssetListResult, type AssetSearchInput, type AssetSearchResult, type AssetSearchResultItem, type BrandItem, type BrandLegalDocument, type BrandLegalDocuments, type BrandTrademarkRegistrationItem, type BrandType, ChainPatrolApiClient, type ChainPatrolApiClientOptions, type ConfigEntry, type CredentialProvider, DETECTION_CONFIDENCE_LEVELS, DETECTION_REPORTED_FILTERS, type DetectionBrand, type DetectionConfidence, type DetectionConfigRunInput, type DetectionConfigRunResult, type DetectionConfigUpdateInput, type DetectionConfigUpdateResult, type DetectionConfigValidateInput, type DetectionConfigValidateResult, type DetectionDriftInput, type DetectionDriftResult, type DetectionListInput, type DetectionListItem, type DetectionListResult, type DetectionReportStatus, type DetectionReportedFilter, type DetectionSource, type HealthcheckCategory, type HealthcheckFinding, type HealthcheckRegistryEntry, type HealthcheckResult, type HealthcheckSeverity, type HealthchecksListResult, LIVENESS_FILTER_VALUES, LIVENESS_STATUSES, type LivenessFilterValue, type LivenessStatus, type MetricsBreakdownInput, type MetricsBreakdownResult, type MetricsFoundInput, type MetricsFoundResult, type MetricsSummaryInput, type MetricsSummaryResult, ORGANIZATION_METRICS_INCLUDE_FIELDS, type OperationsQueuesSnapshotInput, type OperationsQueuesSnapshotResult, type OrganizationAssetGroupsListResult, type OrganizationAssetItem, type OrganizationAssetsListInput, type OrganizationAssetsListResult, type OrganizationBrandsListResult, type OrganizationMetricsIncludeField, type OrganizationMetricsInput, type OrganizationMetricsResult, type OrganizationMetricsResultMetrics, type OrganizationMetricsServicesFilter, type OrganizationMetricsVisibility, type OrganizationPortalVisibility, type OrganizationReportAssetScan, type OrganizationReportAssetScanEnrichment, type OrganizationReportAttachment, type OrganizationReportVisibility, type OrganizationReportsListInput, type OrganizationReportsListResult, type PendingApprovalService, type PendingServiceApproval, REPORT_REVIEW_DECISIONS, REPORT_STATUSES, type ReportAssetInput, type ReportCreateInput, type ReportCreateResult, type ReportReviewDecision, type ReportStatus, type ReportsSearchInput, type ReportsSearchResult, type ReportsSearchResultItem, TAKEDOWN_SORT_KEYS, TAKEDOWN_STATUSES, type TakedownItem, type TakedownProviderRef, type TakedownSortKey, type TakedownStatus, type TakedownsListInput, type TakedownsListResult, type ThreatItem, type ThreatsListInput, type ThreatsListResult, type UserMeResult, type UserOrg, type UserOrgBrandMetadata, type UserOrgGetInput, type UserOrgGetResult, type UserOrgIntegrations, type UserOrgLegalDocument, type UserOrgLegalDocuments, type UserOrgPortalCustomization, type UserOrgTrademarkRegistration, type UserOrgsInput, type UserOrgsObligatoryAdminApprovalFilter, type UserOrgsPendingServiceApprovalFilter, type UserOrgsResult, type UserOrgsServiceFilters, type UserOrgsSubscriptionStatus, type ValidateApiKeyResult, WATCHLIST_FILTER_VALUES, type WatchlistFilterValue, parseIsoDate, parseIsoDateString, staticApiKey, staticBearerToken };
|