@chainpatrol/sdk 1.4.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 CHANGED
@@ -1,5 +1,56 @@
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
+
37
+ ## 1.5.0
38
+
39
+ ### Minor Changes
40
+
41
+ - 5427cd8: Fixes `needsCustomerReview` (`--needs-customer-review`) so it returns the same
42
+ queue the organization's Review page shows. It previously treated "Obligatory
43
+ Organization Admin Approval" as "waiting on the customer", which for an org with
44
+ that toggle on returned every report with a pending proposal — a proposal
45
+ ChainPatrol has not triaged yet is still waiting on our review, and reaches the
46
+ customer only once staff escalate it. Reports the organization submitted itself
47
+ are now included, matching the Review page, instead of being excluded.
48
+
49
+ The predicate now lives in one place (`customerReviewQueueSql` in the private
50
+ `@chainpatrol/core` package) shared with the Review page, the customer view of
51
+ the Reports page, and the staff review-queue counts, so the definitions can no
52
+ longer drift.
53
+
3
54
  ## 1.4.0
4
55
 
5
56
  ### Minor Changes
@@ -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>;
@@ -483,13 +484,16 @@ interface OrganizationReportsListInput {
483
484
  * blocked. `true` returns only those reports; `false` returns only reports
484
485
  * that are not waiting on them.
485
486
  *
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.
487
+ * This is the same queue the organization's Review page shows. A report counts
488
+ * when it has at least one pending proposal that is the organization's to
489
+ * action: one ChainPatrol staff escalated to them and they have not answered
490
+ * yet, or one on a report the organization submitted itself.
491
+ *
492
+ * "Obligatory Organization Admin Approval" does not widen the filter. That
493
+ * setting says an asset type will eventually need admin sign-off, not that
494
+ * every pending proposal is waiting on the admin right now — an untriaged
495
+ * proposal is still ChainPatrol's to review, and it reaches the organization
496
+ * only once staff escalate it.
493
497
  */
494
498
  needsCustomerReview?: boolean;
495
499
  }
@@ -541,6 +545,11 @@ interface OrganizationReportsListResult {
541
545
  updatedAt: string;
542
546
  attachments: OrganizationReportAttachment[];
543
547
  proposals: Array<{
548
+ /**
549
+ * Pass to `reviewOrganizationProposal` to approve, reject, or watchlist
550
+ * this proposal.
551
+ */
552
+ id: number;
544
553
  reviewStatus: string;
545
554
  asset: {
546
555
  id: number;
@@ -571,6 +580,75 @@ interface OrganizationReportsListResult {
571
580
  nextCursor: number | null;
572
581
  totalCount: number;
573
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
+ }
574
652
  declare const DETECTION_CONFIDENCE_LEVELS: readonly ["none", "low", "medium", "high"];
575
653
  type DetectionConfidence = (typeof DETECTION_CONFIDENCE_LEVELS)[number];
576
654
  type DetectionReportStatus = "REPORTED" | "NOT_REPORTED";
@@ -716,7 +794,7 @@ interface AssetGroupItem {
716
794
  interface OrganizationAssetGroupsListResult {
717
795
  groups: AssetGroupItem[];
718
796
  }
719
- type BrandType = "ORGANIZATION" | "INDIVIDUAL";
797
+ type BrandType = "ORGANIZATION" | "INDIVIDUAL" | "PRODUCT";
720
798
  interface BrandLegalDocument {
721
799
  present: boolean;
722
800
  fileName: string | null;
@@ -1240,6 +1318,7 @@ declare class ChainPatrolApiClient implements ApiClient {
1240
1318
  getMetricsBreakdown(input: MetricsBreakdownInput): Promise<MetricsBreakdownResult>;
1241
1319
  createReport(input: ReportCreateInput): Promise<ReportCreateResult>;
1242
1320
  listOrganizationReports(input: OrganizationReportsListInput): Promise<OrganizationReportsListResult>;
1321
+ reviewOrganizationProposal(input: OrganizationProposalsReviewInput): Promise<OrganizationProposalsReviewResult>;
1243
1322
  listTakedowns(input: TakedownsListInput): Promise<TakedownsListResult>;
1244
1323
  getOrganizationMetrics(input: OrganizationMetricsInput): Promise<OrganizationMetricsResult>;
1245
1324
  listHealthchecks(): Promise<HealthchecksListResult>;
@@ -1260,4 +1339,4 @@ declare class ChainPatrolApiClient implements ApiClient {
1260
1339
  declare function parseIsoDate(value: string | undefined): Date | undefined;
1261
1340
  declare function parseIsoDateString(value: string | undefined): string | undefined;
1262
1341
 
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 };
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 };
@@ -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>;
@@ -483,13 +484,16 @@ interface OrganizationReportsListInput {
483
484
  * blocked. `true` returns only those reports; `false` returns only reports
484
485
  * that are not waiting on them.
485
486
  *
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.
487
+ * This is the same queue the organization's Review page shows. A report counts
488
+ * when it has at least one pending proposal that is the organization's to
489
+ * action: one ChainPatrol staff escalated to them and they have not answered
490
+ * yet, or one on a report the organization submitted itself.
491
+ *
492
+ * "Obligatory Organization Admin Approval" does not widen the filter. That
493
+ * setting says an asset type will eventually need admin sign-off, not that
494
+ * every pending proposal is waiting on the admin right now — an untriaged
495
+ * proposal is still ChainPatrol's to review, and it reaches the organization
496
+ * only once staff escalate it.
493
497
  */
494
498
  needsCustomerReview?: boolean;
495
499
  }
@@ -541,6 +545,11 @@ interface OrganizationReportsListResult {
541
545
  updatedAt: string;
542
546
  attachments: OrganizationReportAttachment[];
543
547
  proposals: Array<{
548
+ /**
549
+ * Pass to `reviewOrganizationProposal` to approve, reject, or watchlist
550
+ * this proposal.
551
+ */
552
+ id: number;
544
553
  reviewStatus: string;
545
554
  asset: {
546
555
  id: number;
@@ -571,6 +580,75 @@ interface OrganizationReportsListResult {
571
580
  nextCursor: number | null;
572
581
  totalCount: number;
573
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
+ }
574
652
  declare const DETECTION_CONFIDENCE_LEVELS: readonly ["none", "low", "medium", "high"];
575
653
  type DetectionConfidence = (typeof DETECTION_CONFIDENCE_LEVELS)[number];
576
654
  type DetectionReportStatus = "REPORTED" | "NOT_REPORTED";
@@ -716,7 +794,7 @@ interface AssetGroupItem {
716
794
  interface OrganizationAssetGroupsListResult {
717
795
  groups: AssetGroupItem[];
718
796
  }
719
- type BrandType = "ORGANIZATION" | "INDIVIDUAL";
797
+ type BrandType = "ORGANIZATION" | "INDIVIDUAL" | "PRODUCT";
720
798
  interface BrandLegalDocument {
721
799
  present: boolean;
722
800
  fileName: string | null;
@@ -1240,6 +1318,7 @@ declare class ChainPatrolApiClient implements ApiClient {
1240
1318
  getMetricsBreakdown(input: MetricsBreakdownInput): Promise<MetricsBreakdownResult>;
1241
1319
  createReport(input: ReportCreateInput): Promise<ReportCreateResult>;
1242
1320
  listOrganizationReports(input: OrganizationReportsListInput): Promise<OrganizationReportsListResult>;
1321
+ reviewOrganizationProposal(input: OrganizationProposalsReviewInput): Promise<OrganizationProposalsReviewResult>;
1243
1322
  listTakedowns(input: TakedownsListInput): Promise<TakedownsListResult>;
1244
1323
  getOrganizationMetrics(input: OrganizationMetricsInput): Promise<OrganizationMetricsResult>;
1245
1324
  listHealthchecks(): Promise<HealthchecksListResult>;
@@ -1260,4 +1339,4 @@ declare class ChainPatrolApiClient implements ApiClient {
1260
1339
  declare function parseIsoDate(value: string | undefined): Date | undefined;
1261
1340
  declare function parseIsoDateString(value: string | undefined): string | undefined;
1262
1341
 
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 };
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;