lumnisai 0.5.46 → 0.5.48

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.cjs CHANGED
@@ -1934,12 +1934,18 @@ function toSnake(s) {
1934
1934
  return index === 0 ? letter.toLowerCase() : `_${letter.toLowerCase()}`;
1935
1935
  });
1936
1936
  }
1937
+ const PASSTHROUGH_VALUE_KEYS = /* @__PURE__ */ new Set([
1938
+ "customFields",
1939
+ "custom_fields",
1940
+ "engagementProfile",
1941
+ "engagement_profile"
1942
+ ]);
1937
1943
  function convertCase(obj, converter) {
1938
1944
  if (Array.isArray(obj)) {
1939
1945
  return obj.map((v) => convertCase(v, converter));
1940
1946
  } else if (obj !== null && typeof obj === "object") {
1941
1947
  return Object.keys(obj).reduce((acc, key) => {
1942
- const value = key === "customFields" || key === "custom_fields" ? obj[key] : convertCase(obj[key], converter);
1948
+ const value = PASSTHROUGH_VALUE_KEYS.has(key) ? obj[key] : convertCase(obj[key], converter);
1943
1949
  acc[converter(key)] = value;
1944
1950
  return acc;
1945
1951
  }, {});
@@ -3669,7 +3675,8 @@ class ResponsesResource {
3669
3675
  }
3670
3676
  for (const [camel, snake] of [
3671
3677
  ["includeCompanyPosts", "include_company_posts"],
3672
- ["includeExecPosts", "include_exec_posts"]
3678
+ ["includeExecPosts", "include_exec_posts"],
3679
+ ["includeMentionPosts", "include_mention_posts"]
3673
3680
  ]) {
3674
3681
  const value = this._getParamValue(params, camel, snake);
3675
3682
  if (value !== void 0 && typeof value !== "boolean")
@@ -3685,11 +3692,24 @@ class ResponsesResource {
3685
3692
  "includeExecPosts",
3686
3693
  "include_exec_posts"
3687
3694
  );
3688
- if (competitors.length > 0 && includeCompanyPosts === false && includeExecPosts === false) {
3695
+ const includeMentionPosts = this._getParamValue(
3696
+ params,
3697
+ "includeMentionPosts",
3698
+ "include_mention_posts"
3699
+ );
3700
+ if (competitors.length > 0 && includeCompanyPosts === false && includeExecPosts === false && includeMentionPosts === false) {
3689
3701
  throw new ValidationError(
3690
- "competitors were provided but includeCompanyPosts and includeExecPosts are both false"
3702
+ "competitors were provided but includeCompanyPosts, includeExecPosts, and includeMentionPosts are all false"
3691
3703
  );
3692
3704
  }
3705
+ const maxMentionsPerTarget = this._getParamValue(
3706
+ params,
3707
+ "maxMentionsPerTarget",
3708
+ "max_mentions_per_target"
3709
+ );
3710
+ if (maxMentionsPerTarget !== void 0 && (!Number.isInteger(maxMentionsPerTarget) || maxMentionsPerTarget < 1 || maxMentionsPerTarget > 500)) {
3711
+ throw new ValidationError("maxMentionsPerTarget must be an integer between 1 and 500");
3712
+ }
3693
3713
  const execTitles = this._getParamValue(params, "execTitles", "exec_titles");
3694
3714
  if (execTitles !== void 0 && (!Array.isArray(execTitles) || execTitles.some((title) => typeof title !== "string"))) {
3695
3715
  throw new ValidationError("execTitles must be an array of strings");
@@ -4455,6 +4475,10 @@ class ResponsesResource {
4455
4475
  params.includeCompanyPosts = options.includeCompanyPosts;
4456
4476
  if (options.includeExecPosts !== void 0)
4457
4477
  params.includeExecPosts = options.includeExecPosts;
4478
+ if (options.includeMentionPosts !== void 0)
4479
+ params.includeMentionPosts = options.includeMentionPosts;
4480
+ if (options.maxMentionsPerTarget !== void 0)
4481
+ params.maxMentionsPerTarget = options.maxMentionsPerTarget;
4458
4482
  if (options.execTitles !== void 0)
4459
4483
  params.execTitles = options.execTitles;
4460
4484
  if (options.maxExecsPerTarget !== void 0)
package/dist/index.d.cts CHANGED
@@ -1640,6 +1640,19 @@ interface ContentIntelligenceOptions {
1640
1640
  includeCompanyPosts?: boolean;
1641
1641
  /** Read posts from each competitor's executives. @default true */
1642
1642
  includeExecPosts?: boolean;
1643
+ /**
1644
+ * Read posts by other people that tag each competitor's LinkedIn page, plus
1645
+ * the caller's own company when provided. Targets are matched by page rather
1646
+ * than name. This incurs one CrustData call per target and one credit per post.
1647
+ * @default true
1648
+ */
1649
+ includeMentionPosts?: boolean;
1650
+ /**
1651
+ * Mentions read per target, returned in vendor relevance order.
1652
+ * This is also the worst-case per-target credit charge for mention collection.
1653
+ * @default 50 @minimum 1 @maximum 500
1654
+ */
1655
+ maxMentionsPerTarget?: number;
1643
1656
  /**
1644
1657
  * Executive title stems, most senior first. Supplying this list replaces the
1645
1658
  * backend's default title list.
@@ -1665,6 +1678,10 @@ interface ContentIntelligenceResolvedParams {
1665
1678
  includeCompanyPosts?: boolean;
1666
1679
  /** @default true */
1667
1680
  includeExecPosts?: boolean;
1681
+ /** @default true */
1682
+ includeMentionPosts?: boolean;
1683
+ /** @default 50 */
1684
+ maxMentionsPerTarget?: number;
1668
1685
  /** Null means the backend's default executive-title list was used. */
1669
1686
  execTitles?: string[] | null;
1670
1687
  /** @default 10 */
@@ -3307,6 +3324,8 @@ interface AutoSearchSelection {
3307
3324
  reasoning: string;
3308
3325
  /** True when automatic planning failed and the backend used its standard fallback. */
3309
3326
  plannerFailed?: boolean;
3327
+ /** Last planner failure, present when `plannerFailed` is true. */
3328
+ plannerError?: string;
3310
3329
  /** True when the discovery lane was chosen automatically. */
3311
3330
  autoSelectedLane?: boolean;
3312
3331
  /** True when the signal list was chosen automatically. */
@@ -3970,6 +3989,23 @@ interface SpecializedAgentParams {
3970
3989
  * @default true
3971
3990
  */
3972
3991
  includeExecPosts?: boolean;
3992
+ /**
3993
+ * Include posts by other people that tag each competitor's LinkedIn page,
3994
+ * plus the caller's own company when named. Page identity is used for
3995
+ * matching, so namesakes are excluded. This costs one CrustData call per
3996
+ * target and one credit per returned post.
3997
+ * Used by content_intelligence.
3998
+ * @default true
3999
+ */
4000
+ includeMentionPosts?: boolean;
4001
+ /**
4002
+ * Mentions read per content-intelligence target, in vendor relevance order.
4003
+ * This is also the worst-case per-target credit charge for mention collection.
4004
+ * @default 50
4005
+ * @minimum 1
4006
+ * @maximum 500
4007
+ */
4008
+ maxMentionsPerTarget?: number;
3973
4009
  /**
3974
4010
  * Drop candidates whose current employer is one of the analyzed competitors.
3975
4011
  * Competitor employees reacting to their own company's posts are noise.
package/dist/index.d.mts CHANGED
@@ -1640,6 +1640,19 @@ interface ContentIntelligenceOptions {
1640
1640
  includeCompanyPosts?: boolean;
1641
1641
  /** Read posts from each competitor's executives. @default true */
1642
1642
  includeExecPosts?: boolean;
1643
+ /**
1644
+ * Read posts by other people that tag each competitor's LinkedIn page, plus
1645
+ * the caller's own company when provided. Targets are matched by page rather
1646
+ * than name. This incurs one CrustData call per target and one credit per post.
1647
+ * @default true
1648
+ */
1649
+ includeMentionPosts?: boolean;
1650
+ /**
1651
+ * Mentions read per target, returned in vendor relevance order.
1652
+ * This is also the worst-case per-target credit charge for mention collection.
1653
+ * @default 50 @minimum 1 @maximum 500
1654
+ */
1655
+ maxMentionsPerTarget?: number;
1643
1656
  /**
1644
1657
  * Executive title stems, most senior first. Supplying this list replaces the
1645
1658
  * backend's default title list.
@@ -1665,6 +1678,10 @@ interface ContentIntelligenceResolvedParams {
1665
1678
  includeCompanyPosts?: boolean;
1666
1679
  /** @default true */
1667
1680
  includeExecPosts?: boolean;
1681
+ /** @default true */
1682
+ includeMentionPosts?: boolean;
1683
+ /** @default 50 */
1684
+ maxMentionsPerTarget?: number;
1668
1685
  /** Null means the backend's default executive-title list was used. */
1669
1686
  execTitles?: string[] | null;
1670
1687
  /** @default 10 */
@@ -3307,6 +3324,8 @@ interface AutoSearchSelection {
3307
3324
  reasoning: string;
3308
3325
  /** True when automatic planning failed and the backend used its standard fallback. */
3309
3326
  plannerFailed?: boolean;
3327
+ /** Last planner failure, present when `plannerFailed` is true. */
3328
+ plannerError?: string;
3310
3329
  /** True when the discovery lane was chosen automatically. */
3311
3330
  autoSelectedLane?: boolean;
3312
3331
  /** True when the signal list was chosen automatically. */
@@ -3970,6 +3989,23 @@ interface SpecializedAgentParams {
3970
3989
  * @default true
3971
3990
  */
3972
3991
  includeExecPosts?: boolean;
3992
+ /**
3993
+ * Include posts by other people that tag each competitor's LinkedIn page,
3994
+ * plus the caller's own company when named. Page identity is used for
3995
+ * matching, so namesakes are excluded. This costs one CrustData call per
3996
+ * target and one credit per returned post.
3997
+ * Used by content_intelligence.
3998
+ * @default true
3999
+ */
4000
+ includeMentionPosts?: boolean;
4001
+ /**
4002
+ * Mentions read per content-intelligence target, in vendor relevance order.
4003
+ * This is also the worst-case per-target credit charge for mention collection.
4004
+ * @default 50
4005
+ * @minimum 1
4006
+ * @maximum 500
4007
+ */
4008
+ maxMentionsPerTarget?: number;
3973
4009
  /**
3974
4010
  * Drop candidates whose current employer is one of the analyzed competitors.
3975
4011
  * Competitor employees reacting to their own company's posts are noise.
package/dist/index.d.ts CHANGED
@@ -1640,6 +1640,19 @@ interface ContentIntelligenceOptions {
1640
1640
  includeCompanyPosts?: boolean;
1641
1641
  /** Read posts from each competitor's executives. @default true */
1642
1642
  includeExecPosts?: boolean;
1643
+ /**
1644
+ * Read posts by other people that tag each competitor's LinkedIn page, plus
1645
+ * the caller's own company when provided. Targets are matched by page rather
1646
+ * than name. This incurs one CrustData call per target and one credit per post.
1647
+ * @default true
1648
+ */
1649
+ includeMentionPosts?: boolean;
1650
+ /**
1651
+ * Mentions read per target, returned in vendor relevance order.
1652
+ * This is also the worst-case per-target credit charge for mention collection.
1653
+ * @default 50 @minimum 1 @maximum 500
1654
+ */
1655
+ maxMentionsPerTarget?: number;
1643
1656
  /**
1644
1657
  * Executive title stems, most senior first. Supplying this list replaces the
1645
1658
  * backend's default title list.
@@ -1665,6 +1678,10 @@ interface ContentIntelligenceResolvedParams {
1665
1678
  includeCompanyPosts?: boolean;
1666
1679
  /** @default true */
1667
1680
  includeExecPosts?: boolean;
1681
+ /** @default true */
1682
+ includeMentionPosts?: boolean;
1683
+ /** @default 50 */
1684
+ maxMentionsPerTarget?: number;
1668
1685
  /** Null means the backend's default executive-title list was used. */
1669
1686
  execTitles?: string[] | null;
1670
1687
  /** @default 10 */
@@ -3307,6 +3324,8 @@ interface AutoSearchSelection {
3307
3324
  reasoning: string;
3308
3325
  /** True when automatic planning failed and the backend used its standard fallback. */
3309
3326
  plannerFailed?: boolean;
3327
+ /** Last planner failure, present when `plannerFailed` is true. */
3328
+ plannerError?: string;
3310
3329
  /** True when the discovery lane was chosen automatically. */
3311
3330
  autoSelectedLane?: boolean;
3312
3331
  /** True when the signal list was chosen automatically. */
@@ -3970,6 +3989,23 @@ interface SpecializedAgentParams {
3970
3989
  * @default true
3971
3990
  */
3972
3991
  includeExecPosts?: boolean;
3992
+ /**
3993
+ * Include posts by other people that tag each competitor's LinkedIn page,
3994
+ * plus the caller's own company when named. Page identity is used for
3995
+ * matching, so namesakes are excluded. This costs one CrustData call per
3996
+ * target and one credit per returned post.
3997
+ * Used by content_intelligence.
3998
+ * @default true
3999
+ */
4000
+ includeMentionPosts?: boolean;
4001
+ /**
4002
+ * Mentions read per content-intelligence target, in vendor relevance order.
4003
+ * This is also the worst-case per-target credit charge for mention collection.
4004
+ * @default 50
4005
+ * @minimum 1
4006
+ * @maximum 500
4007
+ */
4008
+ maxMentionsPerTarget?: number;
3973
4009
  /**
3974
4010
  * Drop candidates whose current employer is one of the analyzed competitors.
3975
4011
  * Competitor employees reacting to their own company's posts are noise.
package/dist/index.mjs CHANGED
@@ -1928,12 +1928,18 @@ function toSnake(s) {
1928
1928
  return index === 0 ? letter.toLowerCase() : `_${letter.toLowerCase()}`;
1929
1929
  });
1930
1930
  }
1931
+ const PASSTHROUGH_VALUE_KEYS = /* @__PURE__ */ new Set([
1932
+ "customFields",
1933
+ "custom_fields",
1934
+ "engagementProfile",
1935
+ "engagement_profile"
1936
+ ]);
1931
1937
  function convertCase(obj, converter) {
1932
1938
  if (Array.isArray(obj)) {
1933
1939
  return obj.map((v) => convertCase(v, converter));
1934
1940
  } else if (obj !== null && typeof obj === "object") {
1935
1941
  return Object.keys(obj).reduce((acc, key) => {
1936
- const value = key === "customFields" || key === "custom_fields" ? obj[key] : convertCase(obj[key], converter);
1942
+ const value = PASSTHROUGH_VALUE_KEYS.has(key) ? obj[key] : convertCase(obj[key], converter);
1937
1943
  acc[converter(key)] = value;
1938
1944
  return acc;
1939
1945
  }, {});
@@ -3663,7 +3669,8 @@ class ResponsesResource {
3663
3669
  }
3664
3670
  for (const [camel, snake] of [
3665
3671
  ["includeCompanyPosts", "include_company_posts"],
3666
- ["includeExecPosts", "include_exec_posts"]
3672
+ ["includeExecPosts", "include_exec_posts"],
3673
+ ["includeMentionPosts", "include_mention_posts"]
3667
3674
  ]) {
3668
3675
  const value = this._getParamValue(params, camel, snake);
3669
3676
  if (value !== void 0 && typeof value !== "boolean")
@@ -3679,11 +3686,24 @@ class ResponsesResource {
3679
3686
  "includeExecPosts",
3680
3687
  "include_exec_posts"
3681
3688
  );
3682
- if (competitors.length > 0 && includeCompanyPosts === false && includeExecPosts === false) {
3689
+ const includeMentionPosts = this._getParamValue(
3690
+ params,
3691
+ "includeMentionPosts",
3692
+ "include_mention_posts"
3693
+ );
3694
+ if (competitors.length > 0 && includeCompanyPosts === false && includeExecPosts === false && includeMentionPosts === false) {
3683
3695
  throw new ValidationError(
3684
- "competitors were provided but includeCompanyPosts and includeExecPosts are both false"
3696
+ "competitors were provided but includeCompanyPosts, includeExecPosts, and includeMentionPosts are all false"
3685
3697
  );
3686
3698
  }
3699
+ const maxMentionsPerTarget = this._getParamValue(
3700
+ params,
3701
+ "maxMentionsPerTarget",
3702
+ "max_mentions_per_target"
3703
+ );
3704
+ if (maxMentionsPerTarget !== void 0 && (!Number.isInteger(maxMentionsPerTarget) || maxMentionsPerTarget < 1 || maxMentionsPerTarget > 500)) {
3705
+ throw new ValidationError("maxMentionsPerTarget must be an integer between 1 and 500");
3706
+ }
3687
3707
  const execTitles = this._getParamValue(params, "execTitles", "exec_titles");
3688
3708
  if (execTitles !== void 0 && (!Array.isArray(execTitles) || execTitles.some((title) => typeof title !== "string"))) {
3689
3709
  throw new ValidationError("execTitles must be an array of strings");
@@ -4449,6 +4469,10 @@ class ResponsesResource {
4449
4469
  params.includeCompanyPosts = options.includeCompanyPosts;
4450
4470
  if (options.includeExecPosts !== void 0)
4451
4471
  params.includeExecPosts = options.includeExecPosts;
4472
+ if (options.includeMentionPosts !== void 0)
4473
+ params.includeMentionPosts = options.includeMentionPosts;
4474
+ if (options.maxMentionsPerTarget !== void 0)
4475
+ params.maxMentionsPerTarget = options.maxMentionsPerTarget;
4452
4476
  if (options.execTitles !== void 0)
4453
4477
  params.execTitles = options.execTitles;
4454
4478
  if (options.maxExecsPerTarget !== void 0)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lumnisai",
3
3
  "type": "module",
4
- "version": "0.5.46",
4
+ "version": "0.5.48",
5
5
  "description": "Official Node.js SDK for the Lumnis AI API",
6
6
  "author": "Lumnis AI",
7
7
  "license": "MIT",