@chainpatrol/sdk 1.5.0 → 1.6.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 +34 -0
- package/dist/api/index.d.mts +78 -2
- package/dist/api/index.d.ts +78 -2
- package/dist/api/index.js +34 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +22 -2
- package/dist/api/index.mjs.map +1 -1
- package/dist/{chunk-5HP2K5SM.mjs → chunk-ZTE6QNOQ.mjs} +8 -6
- package/dist/chunk-ZTE6QNOQ.mjs.map +1 -0
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/dist/skill/cli.js +6 -4
- package/dist/skill/cli.js.map +1 -1
- package/dist/skill/cli.mjs +1 -1
- package/dist/skill/index.js +6 -4
- package/dist/skill/index.js.map +1 -1
- package/dist/skill/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5HP2K5SM.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @chainpatrol/sdk
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a253313: Adds `reviewOrganizationProposal` for approving, rejecting, or watchlisting the
|
|
8
|
+
proposals waiting on your organization, backed by
|
|
9
|
+
`POST /organization/proposals/{proposalId}/review`.
|
|
10
|
+
|
|
11
|
+
Approving takes a block `label`, plus a `brandId` for the labels that name an
|
|
12
|
+
impersonation target. Rejecting takes a `rejectReason` and an optional `note`.
|
|
13
|
+
Watchlisting parks the asset for re-evaluation. `assetId` is required alongside
|
|
14
|
+
`proposalId` and must match the proposal's current asset, returning `409`
|
|
15
|
+
otherwise.
|
|
16
|
+
|
|
17
|
+
`listOrganizationReports` now returns `proposals[].id` so a proposal can be
|
|
18
|
+
addressed.
|
|
19
|
+
|
|
20
|
+
Some approvals are declined and need to be handled on the Review page, returning
|
|
21
|
+
`403`. Reviews over the API are limited to 10 per organization per day, shared
|
|
22
|
+
across the organization's API credentials, and exceeding that returns `429`.
|
|
23
|
+
Reviews made from the Review page are not affected.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 108f9f8: `needsCustomerReview` now returns only the reports waiting on your review.
|
|
28
|
+
|
|
29
|
+
Reports your organization submitted itself are no longer included, and a
|
|
30
|
+
proposal you have passed back to ChainPatrol leaves the queue once you hand it
|
|
31
|
+
over. Your own reports stay fully visible in `listOrganizationReports` without
|
|
32
|
+
the filter.
|
|
33
|
+
|
|
34
|
+
`reviewOrganizationProposal` accepts only proposals in that queue and returns
|
|
35
|
+
`403` for anything else.
|
|
36
|
+
|
|
3
37
|
## 1.5.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/dist/api/index.d.mts
CHANGED
|
@@ -67,6 +67,7 @@ interface ApiClient {
|
|
|
67
67
|
getMetricsBreakdown: (input: MetricsBreakdownInput) => Promise<MetricsBreakdownResult>;
|
|
68
68
|
createReport: (input: ReportCreateInput) => Promise<ReportCreateResult>;
|
|
69
69
|
listOrganizationReports: (input: OrganizationReportsListInput) => Promise<OrganizationReportsListResult>;
|
|
70
|
+
reviewOrganizationProposal: (input: OrganizationProposalsReviewInput) => Promise<OrganizationProposalsReviewResult>;
|
|
70
71
|
searchReports: (input: ReportsSearchInput) => Promise<ReportsSearchResult>;
|
|
71
72
|
listTakedowns: (input: TakedownsListInput) => Promise<TakedownsListResult>;
|
|
72
73
|
listThreats: (input: ThreatsListInput) => Promise<ThreatsListResult>;
|
|
@@ -544,6 +545,11 @@ interface OrganizationReportsListResult {
|
|
|
544
545
|
updatedAt: string;
|
|
545
546
|
attachments: OrganizationReportAttachment[];
|
|
546
547
|
proposals: Array<{
|
|
548
|
+
/**
|
|
549
|
+
* Pass to `reviewOrganizationProposal` to approve, reject, or watchlist
|
|
550
|
+
* this proposal.
|
|
551
|
+
*/
|
|
552
|
+
id: number;
|
|
547
553
|
reviewStatus: string;
|
|
548
554
|
asset: {
|
|
549
555
|
id: number;
|
|
@@ -574,6 +580,75 @@ interface OrganizationReportsListResult {
|
|
|
574
580
|
nextCursor: number | null;
|
|
575
581
|
totalCount: number;
|
|
576
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* Reject reasons the Review page offers. These feed ChainPatrol's
|
|
585
|
+
* detection-tuning breakdown, so pick the closest one rather than relying on
|
|
586
|
+
* `note`.
|
|
587
|
+
*/
|
|
588
|
+
declare const PROPOSAL_REJECT_REASONS: readonly ["irrelevant", "no_malicious_activity", "insufficient_evidence", "not_targeting_org", "decayed"];
|
|
589
|
+
type ProposalRejectReason = (typeof PROPOSAL_REJECT_REASONS)[number];
|
|
590
|
+
/**
|
|
591
|
+
* Reasons for parking an asset on the watchlist. `OTHER` requires a `note`,
|
|
592
|
+
* which is then treated as the reason.
|
|
593
|
+
*/
|
|
594
|
+
declare const PROPOSAL_WATCHLIST_REASONS: readonly ["DEAD", "PARKING", "NOT_ENOUGH_EVIDENCE", "OTHER"];
|
|
595
|
+
type ProposalWatchlistReason = (typeof PROPOSAL_WATCHLIST_REASONS)[number];
|
|
596
|
+
type CustomerReviewDecision = "APPROVE" | "REJECT" | "WATCHLIST";
|
|
597
|
+
interface OrganizationProposalsReviewInput {
|
|
598
|
+
/** From `proposals[].id` on `listOrganizationReports`. */
|
|
599
|
+
proposalId: number;
|
|
600
|
+
/**
|
|
601
|
+
* From `proposals[].asset.id` on the same proposal. Required, and must match
|
|
602
|
+
* the proposal's current asset — a mismatch returns 409. Proves the request was
|
|
603
|
+
* built from a proposal you read rather than a guessed or stale ID.
|
|
604
|
+
*/
|
|
605
|
+
assetId: number;
|
|
606
|
+
/**
|
|
607
|
+
* Optional for organization-scoped API keys. Required when your credentials
|
|
608
|
+
* can reach more than one organization.
|
|
609
|
+
*/
|
|
610
|
+
slug?: string;
|
|
611
|
+
/**
|
|
612
|
+
* `WATCHLIST` rejects the proposal and parks the asset so it is re-evaluated
|
|
613
|
+
* if it comes back alive.
|
|
614
|
+
*/
|
|
615
|
+
decision: CustomerReviewDecision;
|
|
616
|
+
/** Required when `decision` is `APPROVE`. */
|
|
617
|
+
label?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Optional for most labels, but required for `Brand Impersonation` and
|
|
620
|
+
* `Employee Impersonation`, which name a specific impersonation target.
|
|
621
|
+
*/
|
|
622
|
+
brandId?: number;
|
|
623
|
+
/** Required when `decision` is `REJECT`. */
|
|
624
|
+
rejectReason?: ProposalRejectReason;
|
|
625
|
+
/** Required when `decision` is `WATCHLIST`. */
|
|
626
|
+
watchlistReason?: ProposalWatchlistReason;
|
|
627
|
+
/** Free-text detail. Required when `watchlistReason` is `OTHER`. */
|
|
628
|
+
note?: string;
|
|
629
|
+
}
|
|
630
|
+
interface OrganizationProposalsReviewResult {
|
|
631
|
+
proposal: {
|
|
632
|
+
id: number;
|
|
633
|
+
reviewStatus: string;
|
|
634
|
+
asset: {
|
|
635
|
+
id: number;
|
|
636
|
+
type: string;
|
|
637
|
+
content: string;
|
|
638
|
+
status: string;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
review: {
|
|
642
|
+
id: number;
|
|
643
|
+
/** A `WATCHLIST` request is recorded as `REJECT` with the asset parked. */
|
|
644
|
+
decision: string;
|
|
645
|
+
label: string;
|
|
646
|
+
brandId: number | null;
|
|
647
|
+
comment: string;
|
|
648
|
+
createdAt: string;
|
|
649
|
+
};
|
|
650
|
+
watchlisted: boolean;
|
|
651
|
+
}
|
|
577
652
|
declare const DETECTION_CONFIDENCE_LEVELS: readonly ["none", "low", "medium", "high"];
|
|
578
653
|
type DetectionConfidence = (typeof DETECTION_CONFIDENCE_LEVELS)[number];
|
|
579
654
|
type DetectionReportStatus = "REPORTED" | "NOT_REPORTED";
|
|
@@ -719,7 +794,7 @@ interface AssetGroupItem {
|
|
|
719
794
|
interface OrganizationAssetGroupsListResult {
|
|
720
795
|
groups: AssetGroupItem[];
|
|
721
796
|
}
|
|
722
|
-
type BrandType = "ORGANIZATION" | "INDIVIDUAL";
|
|
797
|
+
type BrandType = "ORGANIZATION" | "INDIVIDUAL" | "PRODUCT";
|
|
723
798
|
interface BrandLegalDocument {
|
|
724
799
|
present: boolean;
|
|
725
800
|
fileName: string | null;
|
|
@@ -1243,6 +1318,7 @@ declare class ChainPatrolApiClient implements ApiClient {
|
|
|
1243
1318
|
getMetricsBreakdown(input: MetricsBreakdownInput): Promise<MetricsBreakdownResult>;
|
|
1244
1319
|
createReport(input: ReportCreateInput): Promise<ReportCreateResult>;
|
|
1245
1320
|
listOrganizationReports(input: OrganizationReportsListInput): Promise<OrganizationReportsListResult>;
|
|
1321
|
+
reviewOrganizationProposal(input: OrganizationProposalsReviewInput): Promise<OrganizationProposalsReviewResult>;
|
|
1246
1322
|
listTakedowns(input: TakedownsListInput): Promise<TakedownsListResult>;
|
|
1247
1323
|
getOrganizationMetrics(input: OrganizationMetricsInput): Promise<OrganizationMetricsResult>;
|
|
1248
1324
|
listHealthchecks(): Promise<HealthchecksListResult>;
|
|
@@ -1263,4 +1339,4 @@ declare class ChainPatrolApiClient implements ApiClient {
|
|
|
1263
1339
|
declare function parseIsoDate(value: string | undefined): Date | undefined;
|
|
1264
1340
|
declare function parseIsoDateString(value: string | undefined): string | undefined;
|
|
1265
1341
|
|
|
1266
|
-
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 };
|
|
1342
|
+
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, type CustomerReviewDecision, 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 OrganizationProposalsReviewInput, type OrganizationProposalsReviewResult, type OrganizationReportAssetScan, type OrganizationReportAssetScanEnrichment, type OrganizationReportAttachment, type OrganizationReportVisibility, type OrganizationReportsListInput, type OrganizationReportsListResult, PROPOSAL_REJECT_REASONS, PROPOSAL_WATCHLIST_REASONS, type PendingApprovalService, type PendingServiceApproval, type ProposalRejectReason, type ProposalWatchlistReason, 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 };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ interface ApiClient {
|
|
|
67
67
|
getMetricsBreakdown: (input: MetricsBreakdownInput) => Promise<MetricsBreakdownResult>;
|
|
68
68
|
createReport: (input: ReportCreateInput) => Promise<ReportCreateResult>;
|
|
69
69
|
listOrganizationReports: (input: OrganizationReportsListInput) => Promise<OrganizationReportsListResult>;
|
|
70
|
+
reviewOrganizationProposal: (input: OrganizationProposalsReviewInput) => Promise<OrganizationProposalsReviewResult>;
|
|
70
71
|
searchReports: (input: ReportsSearchInput) => Promise<ReportsSearchResult>;
|
|
71
72
|
listTakedowns: (input: TakedownsListInput) => Promise<TakedownsListResult>;
|
|
72
73
|
listThreats: (input: ThreatsListInput) => Promise<ThreatsListResult>;
|
|
@@ -544,6 +545,11 @@ interface OrganizationReportsListResult {
|
|
|
544
545
|
updatedAt: string;
|
|
545
546
|
attachments: OrganizationReportAttachment[];
|
|
546
547
|
proposals: Array<{
|
|
548
|
+
/**
|
|
549
|
+
* Pass to `reviewOrganizationProposal` to approve, reject, or watchlist
|
|
550
|
+
* this proposal.
|
|
551
|
+
*/
|
|
552
|
+
id: number;
|
|
547
553
|
reviewStatus: string;
|
|
548
554
|
asset: {
|
|
549
555
|
id: number;
|
|
@@ -574,6 +580,75 @@ interface OrganizationReportsListResult {
|
|
|
574
580
|
nextCursor: number | null;
|
|
575
581
|
totalCount: number;
|
|
576
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* Reject reasons the Review page offers. These feed ChainPatrol's
|
|
585
|
+
* detection-tuning breakdown, so pick the closest one rather than relying on
|
|
586
|
+
* `note`.
|
|
587
|
+
*/
|
|
588
|
+
declare const PROPOSAL_REJECT_REASONS: readonly ["irrelevant", "no_malicious_activity", "insufficient_evidence", "not_targeting_org", "decayed"];
|
|
589
|
+
type ProposalRejectReason = (typeof PROPOSAL_REJECT_REASONS)[number];
|
|
590
|
+
/**
|
|
591
|
+
* Reasons for parking an asset on the watchlist. `OTHER` requires a `note`,
|
|
592
|
+
* which is then treated as the reason.
|
|
593
|
+
*/
|
|
594
|
+
declare const PROPOSAL_WATCHLIST_REASONS: readonly ["DEAD", "PARKING", "NOT_ENOUGH_EVIDENCE", "OTHER"];
|
|
595
|
+
type ProposalWatchlistReason = (typeof PROPOSAL_WATCHLIST_REASONS)[number];
|
|
596
|
+
type CustomerReviewDecision = "APPROVE" | "REJECT" | "WATCHLIST";
|
|
597
|
+
interface OrganizationProposalsReviewInput {
|
|
598
|
+
/** From `proposals[].id` on `listOrganizationReports`. */
|
|
599
|
+
proposalId: number;
|
|
600
|
+
/**
|
|
601
|
+
* From `proposals[].asset.id` on the same proposal. Required, and must match
|
|
602
|
+
* the proposal's current asset — a mismatch returns 409. Proves the request was
|
|
603
|
+
* built from a proposal you read rather than a guessed or stale ID.
|
|
604
|
+
*/
|
|
605
|
+
assetId: number;
|
|
606
|
+
/**
|
|
607
|
+
* Optional for organization-scoped API keys. Required when your credentials
|
|
608
|
+
* can reach more than one organization.
|
|
609
|
+
*/
|
|
610
|
+
slug?: string;
|
|
611
|
+
/**
|
|
612
|
+
* `WATCHLIST` rejects the proposal and parks the asset so it is re-evaluated
|
|
613
|
+
* if it comes back alive.
|
|
614
|
+
*/
|
|
615
|
+
decision: CustomerReviewDecision;
|
|
616
|
+
/** Required when `decision` is `APPROVE`. */
|
|
617
|
+
label?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Optional for most labels, but required for `Brand Impersonation` and
|
|
620
|
+
* `Employee Impersonation`, which name a specific impersonation target.
|
|
621
|
+
*/
|
|
622
|
+
brandId?: number;
|
|
623
|
+
/** Required when `decision` is `REJECT`. */
|
|
624
|
+
rejectReason?: ProposalRejectReason;
|
|
625
|
+
/** Required when `decision` is `WATCHLIST`. */
|
|
626
|
+
watchlistReason?: ProposalWatchlistReason;
|
|
627
|
+
/** Free-text detail. Required when `watchlistReason` is `OTHER`. */
|
|
628
|
+
note?: string;
|
|
629
|
+
}
|
|
630
|
+
interface OrganizationProposalsReviewResult {
|
|
631
|
+
proposal: {
|
|
632
|
+
id: number;
|
|
633
|
+
reviewStatus: string;
|
|
634
|
+
asset: {
|
|
635
|
+
id: number;
|
|
636
|
+
type: string;
|
|
637
|
+
content: string;
|
|
638
|
+
status: string;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
review: {
|
|
642
|
+
id: number;
|
|
643
|
+
/** A `WATCHLIST` request is recorded as `REJECT` with the asset parked. */
|
|
644
|
+
decision: string;
|
|
645
|
+
label: string;
|
|
646
|
+
brandId: number | null;
|
|
647
|
+
comment: string;
|
|
648
|
+
createdAt: string;
|
|
649
|
+
};
|
|
650
|
+
watchlisted: boolean;
|
|
651
|
+
}
|
|
577
652
|
declare const DETECTION_CONFIDENCE_LEVELS: readonly ["none", "low", "medium", "high"];
|
|
578
653
|
type DetectionConfidence = (typeof DETECTION_CONFIDENCE_LEVELS)[number];
|
|
579
654
|
type DetectionReportStatus = "REPORTED" | "NOT_REPORTED";
|
|
@@ -719,7 +794,7 @@ interface AssetGroupItem {
|
|
|
719
794
|
interface OrganizationAssetGroupsListResult {
|
|
720
795
|
groups: AssetGroupItem[];
|
|
721
796
|
}
|
|
722
|
-
type BrandType = "ORGANIZATION" | "INDIVIDUAL";
|
|
797
|
+
type BrandType = "ORGANIZATION" | "INDIVIDUAL" | "PRODUCT";
|
|
723
798
|
interface BrandLegalDocument {
|
|
724
799
|
present: boolean;
|
|
725
800
|
fileName: string | null;
|
|
@@ -1243,6 +1318,7 @@ declare class ChainPatrolApiClient implements ApiClient {
|
|
|
1243
1318
|
getMetricsBreakdown(input: MetricsBreakdownInput): Promise<MetricsBreakdownResult>;
|
|
1244
1319
|
createReport(input: ReportCreateInput): Promise<ReportCreateResult>;
|
|
1245
1320
|
listOrganizationReports(input: OrganizationReportsListInput): Promise<OrganizationReportsListResult>;
|
|
1321
|
+
reviewOrganizationProposal(input: OrganizationProposalsReviewInput): Promise<OrganizationProposalsReviewResult>;
|
|
1246
1322
|
listTakedowns(input: TakedownsListInput): Promise<TakedownsListResult>;
|
|
1247
1323
|
getOrganizationMetrics(input: OrganizationMetricsInput): Promise<OrganizationMetricsResult>;
|
|
1248
1324
|
listHealthchecks(): Promise<HealthchecksListResult>;
|
|
@@ -1263,4 +1339,4 @@ declare class ChainPatrolApiClient implements ApiClient {
|
|
|
1263
1339
|
declare function parseIsoDate(value: string | undefined): Date | undefined;
|
|
1264
1340
|
declare function parseIsoDateString(value: string | undefined): string | undefined;
|
|
1265
1341
|
|
|
1266
|
-
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 };
|
|
1342
|
+
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, type CustomerReviewDecision, 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 OrganizationProposalsReviewInput, type OrganizationProposalsReviewResult, type OrganizationReportAssetScan, type OrganizationReportAssetScanEnrichment, type OrganizationReportAttachment, type OrganizationReportVisibility, type OrganizationReportsListInput, type OrganizationReportsListResult, PROPOSAL_REJECT_REASONS, PROPOSAL_WATCHLIST_REASONS, type PendingApprovalService, type PendingServiceApproval, type ProposalRejectReason, type ProposalWatchlistReason, 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 };
|
package/dist/api/index.js
CHANGED
|
@@ -19,6 +19,18 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
21
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
22
34
|
var __async = (__this, __arguments, generator) => {
|
|
23
35
|
return new Promise((resolve, reject) => {
|
|
24
36
|
var fulfilled = (value) => {
|
|
@@ -44,6 +56,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
44
56
|
var REPORT_REVIEW_DECISIONS = ["APPROVE", "REJECT", "SKIP", "ESCALATE"];
|
|
45
57
|
var REPORT_STATUSES = ["TODO", "IN_PROGRESS", "CLOSED"];
|
|
46
58
|
var ACTOR_KINDS = ["human", "automation"];
|
|
59
|
+
var PROPOSAL_REJECT_REASONS = [
|
|
60
|
+
"irrelevant",
|
|
61
|
+
"no_malicious_activity",
|
|
62
|
+
"insufficient_evidence",
|
|
63
|
+
"not_targeting_org",
|
|
64
|
+
"decayed"
|
|
65
|
+
];
|
|
66
|
+
var PROPOSAL_WATCHLIST_REASONS = [
|
|
67
|
+
"DEAD",
|
|
68
|
+
"PARKING",
|
|
69
|
+
"NOT_ENOUGH_EVIDENCE",
|
|
70
|
+
"OTHER"
|
|
71
|
+
];
|
|
47
72
|
var DETECTION_CONFIDENCE_LEVELS = ["none", "low", "medium", "high"];
|
|
48
73
|
var DETECTION_REPORTED_FILTERS = ["reported", "not_reported"];
|
|
49
74
|
var LIVENESS_FILTER_VALUES = ["ALIVE", "DEAD", "UNKNOWN"];
|
|
@@ -317,6 +342,13 @@ var ChainPatrolApiClient = class {
|
|
|
317
342
|
needsCustomerReview: optionalBooleanParam(input.needsCustomerReview)
|
|
318
343
|
});
|
|
319
344
|
}
|
|
345
|
+
reviewOrganizationProposal(input) {
|
|
346
|
+
const _a = input, { proposalId } = _a, body = __objRest(_a, ["proposalId"]);
|
|
347
|
+
return this.request(
|
|
348
|
+
`/organization/proposals/${proposalId}/review`,
|
|
349
|
+
body
|
|
350
|
+
);
|
|
351
|
+
}
|
|
320
352
|
listTakedowns(input) {
|
|
321
353
|
var _a, _b;
|
|
322
354
|
return this.request("/takedowns/list", {
|
|
@@ -474,6 +506,8 @@ exports.DETECTION_REPORTED_FILTERS = DETECTION_REPORTED_FILTERS;
|
|
|
474
506
|
exports.LIVENESS_FILTER_VALUES = LIVENESS_FILTER_VALUES;
|
|
475
507
|
exports.LIVENESS_STATUSES = LIVENESS_STATUSES;
|
|
476
508
|
exports.ORGANIZATION_METRICS_INCLUDE_FIELDS = ORGANIZATION_METRICS_INCLUDE_FIELDS;
|
|
509
|
+
exports.PROPOSAL_REJECT_REASONS = PROPOSAL_REJECT_REASONS;
|
|
510
|
+
exports.PROPOSAL_WATCHLIST_REASONS = PROPOSAL_WATCHLIST_REASONS;
|
|
477
511
|
exports.REPORT_REVIEW_DECISIONS = REPORT_REVIEW_DECISIONS;
|
|
478
512
|
exports.REPORT_STATUSES = REPORT_STATUSES;
|
|
479
513
|
exports.TAKEDOWN_SORT_KEYS = TAKEDOWN_SORT_KEYS;
|