@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/dist/index.js CHANGED
@@ -7191,7 +7191,8 @@ var TakedownStatus = {
7191
7191
  PENDING_RETRACTION: "PENDING_RETRACTION",
7192
7192
  RETRACTION_SENT: "RETRACTION_SENT",
7193
7193
  RETRACTED: "RETRACTED",
7194
- PENDING_INPUT: "PENDING_INPUT"
7194
+ PENDING_INPUT: "PENDING_INPUT",
7195
+ PENDING_EVIDENCE: "PENDING_EVIDENCE"
7195
7196
  };
7196
7197
  var AssetStatus = {
7197
7198
  UNKNOWN: "UNKNOWN",
@@ -7384,10 +7385,17 @@ zod.z.object({
7384
7385
  /** An array of assets with their content, type, status, and update timestamp. */
7385
7386
  assets: zod.z.array(
7386
7387
  zod.z.object({
7388
+ id: zod.z.number().describe("Asset ID \u2014 use to reference the asset in follow-up calls"),
7387
7389
  content: zod.z.string().describe("Asset content"),
7388
7390
  type: zod.z.nativeEnum(AssetType).describe("Asset type"),
7389
7391
  status: zod.z.nativeEnum(AssetStatus).describe("The result of the asset status check"),
7390
7392
  watchStatus: zod.z.nativeEnum(WatchStatus).describe("The watch status of the asset"),
7393
+ livenessStatus: zod.z.nativeEnum(LivenessStatus).nullable().describe(
7394
+ "Whether the asset is currently reachable (`ALIVE`), gone (`DEAD`), or hasn't been checked (`UNKNOWN`). `null` when liveness has never been evaluated."
7395
+ ),
7396
+ blockedAt: zod.z.date().nullable().describe(
7397
+ "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."
7398
+ ),
7391
7399
  updatedAt: zod.z.date()
7392
7400
  })
7393
7401
  ),
@@ -7655,8 +7663,8 @@ zod.z.object({
7655
7663
  }),
7656
7664
  ok: zod.z.boolean(),
7657
7665
  severity: HealthcheckSeveritySchema,
7658
- observed: zod.z.record(zod.z.union([zod.z.number(), zod.z.string(), zod.z.boolean(), zod.z.null()])),
7659
- threshold: zod.z.record(zod.z.union([zod.z.number(), zod.z.string(), zod.z.boolean(), zod.z.null()])),
7666
+ observed: zod.z.record(zod.z.union([zod.z.number(), zod.z.string(), zod.z.boolean()]).nullable()),
7667
+ threshold: zod.z.record(zod.z.union([zod.z.number(), zod.z.string(), zod.z.boolean()]).nullable()),
7660
7668
  findings: zod.z.array(HealthcheckFindingSchema),
7661
7669
  suggestedAction: zod.z.string().nullable(),
7662
7670
  appUrl: zod.z.string().nullable()
@@ -7817,6 +7825,12 @@ var organizationAssetItemSchema = zod.z.object({
7817
7825
  id: zod.z.number().describe("Group ID"),
7818
7826
  name: zod.z.string().describe("Group name")
7819
7827
  }).nullable().describe("Asset group information"),
7828
+ livenessStatus: zod.z.nativeEnum(LivenessStatus).nullable().describe(
7829
+ "Whether the asset is currently reachable (`ALIVE`), gone (`DEAD`), or hasn't been checked (`UNKNOWN`). `null` when liveness has never been evaluated."
7830
+ ),
7831
+ blockedAt: zod.z.date().nullable().describe(
7832
+ "When the asset transitioned to BLOCKED status. `null` for non-blocked assets. Distinct from `updatedAt`."
7833
+ ),
7820
7834
  createdAt: zod.z.date().describe("When the asset was created"),
7821
7835
  updatedAt: zod.z.date().describe("When the asset was last updated")
7822
7836
  });
@@ -8325,6 +8339,7 @@ var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
8325
8339
  AssetScanEnrichmentType2["FARCASTER_MINIAPP"] = "miniapp";
8326
8340
  AssetScanEnrichmentType2["TELEGRAM_PROFILE"] = "telegram_profile";
8327
8341
  AssetScanEnrichmentType2["INSTAGRAM_PROFILE"] = "instagram_profile";
8342
+ AssetScanEnrichmentType2["FACEBOOK_PROFILE"] = "facebook_profile";
8328
8343
  AssetScanEnrichmentType2["YOUTUBE_VIDEO"] = "youtube_video";
8329
8344
  AssetScanEnrichmentType2["YOUTUBE_CHANNEL"] = "youtube_channel";
8330
8345
  AssetScanEnrichmentType2["APPLE_APP_STORE_LISTING"] = "apple_app_store_listing";
@@ -8339,11 +8354,13 @@ var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
8339
8354
  AssetScanEnrichmentType2["VIMEO_VIDEO"] = "vimeo_video";
8340
8355
  AssetScanEnrichmentType2["VIMEO_PROFILE"] = "vimeo_profile";
8341
8356
  AssetScanEnrichmentType2["STACKBLITZ_PAGE"] = "stackblitz_page";
8357
+ AssetScanEnrichmentType2["LEETCODE_PAGE"] = "leetcode_page";
8342
8358
  AssetScanEnrichmentType2["NPM_PACKAGE"] = "npm_package";
8343
8359
  AssetScanEnrichmentType2["PYPI_PACKAGE"] = "pypi_package";
8344
8360
  AssetScanEnrichmentType2["RUST_PACKAGE"] = "rust_package";
8345
8361
  AssetScanEnrichmentType2["LINKEDIN_PROFILE"] = "linkedin_profile";
8346
8362
  AssetScanEnrichmentType2["META_AD"] = "meta_ad";
8363
+ AssetScanEnrichmentType2["GOOGLE_AD"] = "google_ad";
8347
8364
  AssetScanEnrichmentType2["CONTRACT_DEPLOYER"] = "contract_deployer";
8348
8365
  return AssetScanEnrichmentType2;
8349
8366
  })(AssetScanEnrichmentType || {});
@@ -8360,6 +8377,7 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8360
8377
  AssetScanEnrichmentSource2["NEYNAR_API"] = "neynar_api";
8361
8378
  AssetScanEnrichmentSource2["TELEGRAM_API"] = "telegram_api";
8362
8379
  AssetScanEnrichmentSource2["INSTAGRAM_API"] = "instagram_api";
8380
+ AssetScanEnrichmentSource2["FACEBOOK_API"] = "facebook_api";
8363
8381
  AssetScanEnrichmentSource2["YOUTUBE_API"] = "youtube_api";
8364
8382
  AssetScanEnrichmentSource2["APPLE_APP_STORE_API"] = "apple_app_store_api";
8365
8383
  AssetScanEnrichmentSource2["GOOGLE_PLAY_STORE_API"] = "google_play_store_api";
@@ -8371,11 +8389,13 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8371
8389
  AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
8372
8390
  AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
8373
8391
  AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
8392
+ AssetScanEnrichmentSource2["LEETCODE_API"] = "leetcode_api";
8374
8393
  AssetScanEnrichmentSource2["NPM_REGISTRY_API"] = "npm_registry_api";
8375
8394
  AssetScanEnrichmentSource2["PYPI_REGISTRY_API"] = "pypi_registry_api";
8376
8395
  AssetScanEnrichmentSource2["CRATES_IO_API"] = "crates_io_api";
8377
8396
  AssetScanEnrichmentSource2["APIFY_LINKEDIN_API"] = "apify_linkedin_api";
8378
8397
  AssetScanEnrichmentSource2["META_ADS_LIBRARY"] = "meta_ads_library";
8398
+ AssetScanEnrichmentSource2["GOOGLE_ADS_TRANSPARENCY_CENTER"] = "google_ads_transparency_center";
8379
8399
  AssetScanEnrichmentSource2["ETHERSCAN_API"] = "etherscan_api";
8380
8400
  return AssetScanEnrichmentSource2;
8381
8401
  })(AssetScanEnrichmentSource || {});
@@ -8399,6 +8419,8 @@ var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
8399
8419
  ["telegram_profile" /* TELEGRAM_PROFILE */]: "Telegram Profile",
8400
8420
  // Instagram
8401
8421
  ["instagram_profile" /* INSTAGRAM_PROFILE */]: "Instagram Profile",
8422
+ // Facebook
8423
+ ["facebook_profile" /* FACEBOOK_PROFILE */]: "Facebook Profile",
8402
8424
  // YouTube
8403
8425
  ["youtube_video" /* YOUTUBE_VIDEO */]: "YouTube Video",
8404
8426
  ["youtube_channel" /* YOUTUBE_CHANNEL */]: "YouTube Channel",
@@ -8424,6 +8446,8 @@ var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
8424
8446
  ["vimeo_profile" /* VIMEO_PROFILE */]: "Vimeo Profile",
8425
8447
  // Stackblitz
8426
8448
  ["stackblitz_page" /* STACKBLITZ_PAGE */]: "Stackblitz Page",
8449
+ // Leetcode
8450
+ ["leetcode_page" /* LEETCODE_PAGE */]: "Leetcode Page",
8427
8451
  // NPM
8428
8452
  ["npm_package" /* NPM_PACKAGE */]: "NPM Package",
8429
8453
  // PyPI
@@ -8434,6 +8458,8 @@ var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
8434
8458
  ["linkedin_profile" /* LINKEDIN_PROFILE */]: "LinkedIn Profile",
8435
8459
  // Meta Ads
8436
8460
  ["meta_ad" /* META_AD */]: "Meta Ad",
8461
+ // Google Ads
8462
+ ["google_ad" /* GOOGLE_AD */]: "Google Ad",
8437
8463
  // Crypto / Onchain
8438
8464
  ["contract_deployer" /* CONTRACT_DEPLOYER */]: "Contract Deployer"
8439
8465
  };
@@ -8455,6 +8481,8 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8455
8481
  ["telegram_api" /* TELEGRAM_API */]: "Telegram API",
8456
8482
  // Instagram
8457
8483
  ["instagram_api" /* INSTAGRAM_API */]: "Instagram API",
8484
+ // Facebook
8485
+ ["facebook_api" /* FACEBOOK_API */]: "Facebook API",
8458
8486
  // YouTube
8459
8487
  ["youtube_api" /* YOUTUBE_API */]: "YouTube API",
8460
8488
  // Apple App Store
@@ -8476,6 +8504,8 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8476
8504
  ["vimeo_api" /* VIMEO_API */]: "Vimeo API",
8477
8505
  // Stackblitz
8478
8506
  ["stackblitz_api" /* STACKBLITZ_API */]: "Stackblitz API",
8507
+ // Leetcode
8508
+ ["leetcode_api" /* LEETCODE_API */]: "Leetcode API",
8479
8509
  // NPM
8480
8510
  ["npm_registry_api" /* NPM_REGISTRY_API */]: "NPM Registry API",
8481
8511
  // PyPI
@@ -8486,6 +8516,8 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8486
8516
  ["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: "Apify LinkedIn API",
8487
8517
  // Meta Ads
8488
8518
  ["meta_ads_library" /* META_ADS_LIBRARY */]: "Meta Ads Library",
8519
+ // Google Ads
8520
+ ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: "Google Ads Transparency Center",
8489
8521
  // Crypto / Onchain
8490
8522
  ["etherscan_api" /* ETHERSCAN_API */]: "Etherscan"
8491
8523
  };
@@ -8540,6 +8572,8 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8540
8572
  ["telegram_api" /* TELEGRAM_API */]: ["telegram_profile" /* TELEGRAM_PROFILE */],
8541
8573
  // Instagram-related sources
8542
8574
  ["instagram_api" /* INSTAGRAM_API */]: ["instagram_profile" /* INSTAGRAM_PROFILE */],
8575
+ // Facebook-related sources
8576
+ ["facebook_api" /* FACEBOOK_API */]: ["facebook_profile" /* FACEBOOK_PROFILE */],
8543
8577
  // YouTube-related sources
8544
8578
  ["youtube_api" /* YOUTUBE_API */]: [
8545
8579
  "youtube_video" /* YOUTUBE_VIDEO */,
@@ -8573,6 +8607,8 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8573
8607
  ],
8574
8608
  // Stackblitz-related sources
8575
8609
  ["stackblitz_api" /* STACKBLITZ_API */]: ["stackblitz_page" /* STACKBLITZ_PAGE */],
8610
+ // Leetcode-related sources
8611
+ ["leetcode_api" /* LEETCODE_API */]: ["leetcode_page" /* LEETCODE_PAGE */],
8576
8612
  // NPM-related sources
8577
8613
  ["npm_registry_api" /* NPM_REGISTRY_API */]: ["npm_package" /* NPM_PACKAGE */],
8578
8614
  // PyPI-related sources
@@ -8585,6 +8621,10 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8585
8621
  ],
8586
8622
  // Meta Ads-related sources
8587
8623
  ["meta_ads_library" /* META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
8624
+ // Google Ads-related sources
8625
+ ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: [
8626
+ "google_ad" /* GOOGLE_AD */
8627
+ ],
8588
8628
  // Crypto / Onchain sources
8589
8629
  ["etherscan_api" /* ETHERSCAN_API */]: ["contract_deployer" /* CONTRACT_DEPLOYER */]
8590
8630
  };
@@ -11451,7 +11491,8 @@ var delay = (ms) => {
11451
11491
  var whois_exports = {};
11452
11492
  __export(whois_exports, {
11453
11493
  extractWhoisCountry: () => extractWhoisCountry,
11454
- extractWhoisPayload: () => extractWhoisPayload
11494
+ extractWhoisPayload: () => extractWhoisPayload,
11495
+ normalizeRegistrar: () => normalizeRegistrar
11455
11496
  });
11456
11497
  function extractWhoisPayload(raw) {
11457
11498
  var _a;
@@ -11476,6 +11517,9 @@ var WHOIS_COUNTRY_KEY_ALIASES = /* @__PURE__ */ new Set([
11476
11517
  function normalizeWhoisKey(key) {
11477
11518
  return key.toLowerCase().replace(/[^a-z0-9]/g, "");
11478
11519
  }
11520
+ function normalizeRegistrar(value) {
11521
+ return value.toLowerCase().replace(/[^a-z0-9]/g, "");
11522
+ }
11479
11523
  function parseWhoisString(value) {
11480
11524
  if (typeof value !== "string") {
11481
11525
  return void 0;
@@ -12029,13 +12073,25 @@ for parsing the dates.`
12029
12073
  var takedownItemSchema = zod.z.object({
12030
12074
  id: zod.z.number().describe("Takedown ID"),
12031
12075
  status: zod.z.nativeEnum(TakedownStatus).describe("Takedown status"),
12076
+ externalId: zod.z.string().nullable().describe(
12077
+ "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."
12078
+ ),
12079
+ hasFilingDelay: zod.z.boolean().describe(
12080
+ "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."
12081
+ ),
12082
+ hasLivenessCheckDelay: zod.z.boolean().describe(
12083
+ "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."
12084
+ ),
12032
12085
  createdAt: zod.z.date().describe("When the takedown was created"),
12033
12086
  updatedAt: zod.z.date().describe("When the takedown was last updated"),
12034
12087
  asset: zod.z.object({
12035
12088
  id: zod.z.number().describe("Asset ID"),
12036
12089
  content: zod.z.string().describe("Asset content (URL, handle, etc.)"),
12037
12090
  type: zod.z.nativeEnum(AssetType).describe("Asset type"),
12038
- livenessStatus: zod.z.nativeEnum(LivenessStatus).nullable().describe("Asset liveness status")
12091
+ livenessStatus: zod.z.nativeEnum(LivenessStatus).nullable().describe("Asset liveness status"),
12092
+ blockedAt: zod.z.date().nullable().describe(
12093
+ "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."
12094
+ )
12039
12095
  }).describe("Associated asset information"),
12040
12096
  assignee: zod.z.object({
12041
12097
  id: zod.z.number().describe("Assignee user ID"),
@@ -12045,7 +12101,25 @@ var takedownItemSchema = zod.z.object({
12045
12101
  id: zod.z.number().describe("Brand ID"),
12046
12102
  name: zod.z.string().describe("Brand name"),
12047
12103
  slug: zod.z.string().nullable().describe("Brand slug")
12048
- }).nullable().describe("Associated brand information")
12104
+ }).nullable().describe("Associated brand information"),
12105
+ domainRegistrar: zod.z.object({
12106
+ id: zod.z.number().describe("Provider ID"),
12107
+ name: zod.z.string().describe("Provider name (e.g. `Namecheap`, `GoDaddy`)")
12108
+ }).nullable().describe(
12109
+ "Domain registrar assigned to this takedown. `null` when unresolved. Distinct from the per-task `takedownProvider` \u2014 this is the takedown-level assignment for the domain itself."
12110
+ ),
12111
+ hostingProvider: zod.z.object({
12112
+ id: zod.z.number().describe("Provider ID"),
12113
+ name: zod.z.string().describe("Provider name (e.g. `Cloudflare`, `AWS`)")
12114
+ }).nullable().describe(
12115
+ "Hosting provider assigned to this takedown. `null` when unresolved. Answers 'who hosts this?' without a follow-up call."
12116
+ ),
12117
+ tldRegistrar: zod.z.object({
12118
+ id: zod.z.number().describe("Provider ID"),
12119
+ name: zod.z.string().describe("TLD registrar name (e.g. `Verisign`, `Public Interest Registry`)")
12120
+ }).nullable().describe(
12121
+ "Top-level-domain registrar assigned to this takedown. `null` when unresolved."
12122
+ )
12049
12123
  });
12050
12124
  zod.z.object({
12051
12125
  takedowns: zod.z.array(takedownItemSchema).describe("List of takedowns"),
@@ -12137,6 +12211,9 @@ zod.z.object({
12137
12211
  id: zod.z.number().describe("Threat ID"),
12138
12212
  content: zod.z.string().describe("Threat content"),
12139
12213
  type: zod.z.nativeEnum(AssetType).describe("Asset type"),
12214
+ livenessStatus: zod.z.nativeEnum(LivenessStatus).nullable().describe(
12215
+ "Whether the blocked threat is currently reachable (`ALIVE`), gone (`DEAD`), or unchecked (`UNKNOWN`). Use to filter out dead threats without a second call."
12216
+ ),
12140
12217
  blockedAt: zod.z.date().describe("When the asset was blocked")
12141
12218
  })
12142
12219
  ),