@chainpatrol/sdk 1.1.0 → 1.3.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/dist/index.mjs CHANGED
@@ -7014,6 +7014,15 @@ var OrganizationPortalVisibility = {
7014
7014
  PRIVATE: "PRIVATE",
7015
7015
  DISABLED: "DISABLED"
7016
7016
  };
7017
+ var MetricsVisibility = {
7018
+ PUBLIC: "PUBLIC",
7019
+ PRIVATE: "PRIVATE",
7020
+ DISABLED: "DISABLED"
7021
+ };
7022
+ var ReportVisibility = {
7023
+ PUBLIC: "PUBLIC",
7024
+ PRIVATE: "PRIVATE"
7025
+ };
7017
7026
  var AssetType = {
7018
7027
  URL: "URL",
7019
7028
  PAGE: "PAGE",
@@ -7317,10 +7326,17 @@ z.object({
7317
7326
  /** An array of assets with their content, type, status, and update timestamp. */
7318
7327
  assets: z.array(
7319
7328
  z.object({
7329
+ id: z.number().describe("Asset ID \u2014 use to reference the asset in follow-up calls"),
7320
7330
  content: z.string().describe("Asset content"),
7321
7331
  type: z.nativeEnum(AssetType).describe("Asset type"),
7322
7332
  status: z.nativeEnum(AssetStatus).describe("The result of the asset status check"),
7323
7333
  watchStatus: z.nativeEnum(WatchStatus).describe("The watch status of the asset"),
7334
+ livenessStatus: z.nativeEnum(LivenessStatus).nullable().describe(
7335
+ "Whether the asset is currently reachable (`ALIVE`), gone (`DEAD`), or hasn't been checked (`UNKNOWN`). `null` when liveness has never been evaluated."
7336
+ ),
7337
+ blockedAt: z.date().nullable().describe(
7338
+ "When the asset transitioned to BLOCKED status. `null` for non-blocked assets or blocks predating the field. Distinct from `updatedAt`, which changes on any mutation."
7339
+ ),
7324
7340
  updatedAt: z.date()
7325
7341
  })
7326
7342
  ),
@@ -7750,6 +7766,12 @@ var organizationAssetItemSchema = z.object({
7750
7766
  id: z.number().describe("Group ID"),
7751
7767
  name: z.string().describe("Group name")
7752
7768
  }).nullable().describe("Asset group information"),
7769
+ livenessStatus: z.nativeEnum(LivenessStatus).nullable().describe(
7770
+ "Whether the asset is currently reachable (`ALIVE`), gone (`DEAD`), or hasn't been checked (`UNKNOWN`). `null` when liveness has never been evaluated."
7771
+ ),
7772
+ blockedAt: z.date().nullable().describe(
7773
+ "When the asset transitioned to BLOCKED status. `null` for non-blocked assets. Distinct from `updatedAt`."
7774
+ ),
7753
7775
  createdAt: z.date().describe("When the asset was created"),
7754
7776
  updatedAt: z.date().describe("When the asset was last updated")
7755
7777
  });
@@ -8018,6 +8040,36 @@ var UserOrgTrademarkRegistrationSchema = z.object({
8018
8040
  "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
8019
8041
  )
8020
8042
  });
8043
+ var UserOrgBrandMetadataSchema = z.object({
8044
+ websiteUrl: z.string().nullable().describe("Public website URL of the brand (linked from the portal header)"),
8045
+ twitterHandle: z.string().nullable().describe(
8046
+ "Public Twitter/X handle of the brand, stored with the leading `@` (e.g. `@acme`)"
8047
+ ),
8048
+ securityContactEmail: z.string().nullable().describe(
8049
+ "Email address for security correspondence \u2014 used by takedown providers and researchers, distinct from the internal customer POC email"
8050
+ ),
8051
+ industry: z.string().nullable().describe('Free-form industry label (e.g. "DeFi", "CEX", "NFT", "Wallet")')
8052
+ });
8053
+ var UserOrgPortalCustomizationSchema = z.object({
8054
+ useCustomDetails: z.boolean().describe(
8055
+ "When true, the portal uses `name`/`slug`/`avatarUrl` from this object instead of the org's own name/slug/avatar"
8056
+ ),
8057
+ name: z.string().nullable().describe(
8058
+ "Custom display name shown on the portal (used only when `useCustomDetails=true`)"
8059
+ ),
8060
+ slug: z.string().nullable().describe(
8061
+ "Custom URL slug (`chainpatrol.io/<slug>`) \u2014 takes precedence over the org's own slug when set, regardless of `useCustomDetails`"
8062
+ ),
8063
+ avatarUrl: z.string().nullable().describe(
8064
+ "Custom avatar URL shown on the portal (used only when `useCustomDetails=true`)"
8065
+ ),
8066
+ bannerEnabled: z.boolean().describe(
8067
+ "When true, the portal renders `bannerContent` as a highlighted banner at the top of the page"
8068
+ ),
8069
+ bannerContent: z.string().nullable().describe(
8070
+ "Markdown body of the portal banner. Null (or empty) with `bannerEnabled=true` means the toggle is on but no content has been written yet"
8071
+ )
8072
+ });
8021
8073
  var UserOrgSchema = z.object({
8022
8074
  id: z.number(),
8023
8075
  name: z.string(),
@@ -8028,6 +8080,18 @@ var UserOrgSchema = z.object({
8028
8080
  portalVisibility: z.nativeEnum(OrganizationPortalVisibility).describe(
8029
8081
  "Visibility of the org's public security portal (chainpatrol.io/<slug>). `PUBLIC` is discoverable; `PRIVATE` renders only the report form (no metrics or listings); `DISABLED` returns a 404."
8030
8082
  ),
8083
+ reportVisibility: z.nativeEnum(ReportVisibility).describe(
8084
+ "Whether the report listings on the public portal are visible to visitors. `PUBLIC` shows the org's reports; `PRIVATE` hides the report list even when the portal is discoverable."
8085
+ ),
8086
+ metricsVisibility: z.nativeEnum(MetricsVisibility).describe(
8087
+ "Whether the metrics/threats-blocked stats render on the public portal. `PUBLIC` shows the metrics tab; `PRIVATE` hides it from anonymous visitors; `DISABLED` doesn't compute metrics at all."
8088
+ ),
8089
+ brandMetadata: UserOrgBrandMetadataSchema.describe(
8090
+ "Public brand-facing metadata (website, twitter, security contact, industry) shown on the portal and used by staff for outbound"
8091
+ ),
8092
+ portalCustomization: UserOrgPortalCustomizationSchema.describe(
8093
+ "Customer-configurable presentation of the public security portal \u2014 custom name/slug/avatar and the banner content"
8094
+ ),
8031
8095
  services: z.object({
8032
8096
  reporting: singleServiceSchema,
8033
8097
  reviewing: singleServiceSchema,
@@ -11920,13 +11984,25 @@ for parsing the dates.`
11920
11984
  var takedownItemSchema = z.object({
11921
11985
  id: z.number().describe("Takedown ID"),
11922
11986
  status: z.nativeEnum(TakedownStatus).describe("Takedown status"),
11987
+ externalId: z.string().nullable().describe(
11988
+ "Provider's own reference for this takedown (e.g. CleanDNS report ID, registrar ticket number). Use this to reconcile a takedown against the vendor's dashboard. `null` when no vendor has picked it up yet."
11989
+ ),
11990
+ hasFilingDelay: z.boolean().describe(
11991
+ "Manually set by staff to exclude the takedown from median-time metrics when its filing was delayed for reasons unrelated to platform performance. Useful for explaining a stuck-looking takedown."
11992
+ ),
11993
+ hasLivenessCheckDelay: z.boolean().describe(
11994
+ "Manually set by staff to exclude the takedown from median-time metrics when the liveness-check step was delayed for reasons unrelated to platform performance."
11995
+ ),
11923
11996
  createdAt: z.date().describe("When the takedown was created"),
11924
11997
  updatedAt: z.date().describe("When the takedown was last updated"),
11925
11998
  asset: z.object({
11926
11999
  id: z.number().describe("Asset ID"),
11927
12000
  content: z.string().describe("Asset content (URL, handle, etc.)"),
11928
12001
  type: z.nativeEnum(AssetType).describe("Asset type"),
11929
- livenessStatus: z.nativeEnum(LivenessStatus).nullable().describe("Asset liveness status")
12002
+ livenessStatus: z.nativeEnum(LivenessStatus).nullable().describe("Asset liveness status"),
12003
+ blockedAt: z.date().nullable().describe(
12004
+ "When the asset was blocked (transitioned to BLOCKED status). `null` if the asset was never blocked (rare for takedown rows). Distinct from `updatedAt`, which changes on any mutation."
12005
+ )
11930
12006
  }).describe("Associated asset information"),
11931
12007
  assignee: z.object({
11932
12008
  id: z.number().describe("Assignee user ID"),
@@ -12028,6 +12104,9 @@ z.object({
12028
12104
  id: z.number().describe("Threat ID"),
12029
12105
  content: z.string().describe("Threat content"),
12030
12106
  type: z.nativeEnum(AssetType).describe("Asset type"),
12107
+ livenessStatus: z.nativeEnum(LivenessStatus).nullable().describe(
12108
+ "Whether the blocked threat is currently reachable (`ALIVE`), gone (`DEAD`), or unchecked (`UNKNOWN`). Use to filter out dead threats without a second call."
12109
+ ),
12031
12110
  blockedAt: z.date().describe("When the asset was blocked")
12032
12111
  })
12033
12112
  ),