@mentio-dev/sdk 0.12.0 → 0.12.1

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +124 -18
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -502,6 +502,23 @@ type Keyword = {
502
502
  */
503
503
  excluded: Array<string>;
504
504
  };
505
+ /**
506
+ * GitHub only: which repository events naming this keyword become mentions. An event outside the rule is dropped before it is stored, so it is never billed.
507
+ */
508
+ repositories: {
509
+ /**
510
+ * The repository events this keyword takes. traction: a repository created in the last 30 days reached 10 stars. stars: one with 100 stars or more passed a milestone (100, 250, 500, 1,000, 2,000, 5,000 ...). growth: it gained stars fast in a week. new: every repository created, even with no stars (off by default: nearly all of them are noise for a broad keyword). Default: traction, stars, growth. Empty: no repository events.
511
+ */
512
+ events: Array<'new' | 'traction' | 'stars' | 'growth'>;
513
+ /**
514
+ * Only repositories with at least this many stars; null for no minimum.
515
+ */
516
+ minStars: number | null;
517
+ /**
518
+ * Only repositories that gained at least this many stars in the last 7 days (25 or more). It applies to every event, and one whose last week is not known yet does not pass. null: a growth event needs 100 stars and 20% of the repository's stars in a week, the other events need no growth.
519
+ */
520
+ minWeeklyStars: number | null;
521
+ };
505
522
  };
506
523
  /**
507
524
  * Computed over this workspace's matches.
@@ -701,6 +718,23 @@ type KeywordSuggestion = {
701
718
  * true: only the exact phrase matches. false (default): a multi-word keyword also matches a post holding its words close together, in any order, plurals and spellings (non-profit, nonprofit) included; such a match is kept and billed only when the classifier scores it relevant. A term sent in double quotes sets this to true.
702
719
  */
703
720
  exactPhrase?: boolean;
721
+ /**
722
+ * GitHub only: each field is replaced when sent, kept when omitted; null clears a minimum.
723
+ */
724
+ repositories?: {
725
+ /**
726
+ * The repository events this keyword takes. traction: a repository created in the last 30 days reached 10 stars. stars: one with 100 stars or more passed a milestone (100, 250, 500, 1,000, 2,000, 5,000 ...). growth: it gained stars fast in a week. new: every repository created, even with no stars (off by default: nearly all of them are noise for a broad keyword). Default: traction, stars, growth. Empty: no repository events.
727
+ */
728
+ events?: Array<'new' | 'traction' | 'stars' | 'growth'>;
729
+ /**
730
+ * Only repositories with at least this many stars; null for no minimum.
731
+ */
732
+ minStars?: number | null;
733
+ /**
734
+ * Only repositories that gained at least this many stars in the last 7 days (25 or more). It applies to every event, and one whose last week is not known yet does not pass. null: a growth event needs 100 stars and 20% of the repository's stars in a week, the other events need no growth.
735
+ */
736
+ minWeeklyStars?: number | null;
737
+ };
704
738
  /**
705
739
  * Reddit only, for this keyword alone: each list is replaced when sent, kept when omitted.
706
740
  */
@@ -1127,9 +1161,9 @@ type Mention = {
1127
1161
  */
1128
1162
  platform: 'bluesky' | 'hackernews' | 'github' | 'stackoverflow' | 'devto' | 'reddit' | 'x' | 'youtube' | 'news' | 'linkedin' | 'tiktok' | 'instagram' | 'appstore' | 'googleplay' | 'trustpilot' | 'googlemaps' | 'rss';
1129
1163
  /**
1130
- * post: a top-level post. comment: an item that answers a post or another comment (a Reddit or Hacker News comment, an X or Bluesky reply, a Stack Overflow answer, a YouTube comment).
1164
+ * post: a top-level post. comment: an item that answers a post or another comment (a Reddit or Hacker News comment, an X or Bluesky reply, a Stack Overflow answer, a YouTube comment). repository: an event about a GitHub repository naming the keyword (see post.repository).
1131
1165
  */
1132
- kind: 'post' | 'comment';
1166
+ kind: 'post' | 'comment' | 'repository';
1133
1167
  /**
1134
1168
  * Permalink of the post.
1135
1169
  */
@@ -1154,6 +1188,27 @@ type Mention = {
1154
1188
  * A Reddit post's flair, when its subreddit uses them (Question, Show and Tell). Null otherwise.
1155
1189
  */
1156
1190
  flair: string | null;
1191
+ /**
1192
+ * A GitHub repository event's facts, on a mention whose kind is repository; null on every other mention. The sentence is post.title.
1193
+ */
1194
+ repository: {
1195
+ /**
1196
+ * The repository, owner/name.
1197
+ */
1198
+ name: string;
1199
+ /**
1200
+ * What happened. new: it was created. traction: under 30 days old, it reached 10 stars. stars: it passed a star milestone. growth: it gained stars fast in a week. top: one of the most starred repositories naming the keyword, brought by a new keyword's look-back.
1201
+ */
1202
+ event: 'new' | 'traction' | 'stars' | 'growth' | 'top';
1203
+ /**
1204
+ * Its stars when the event was found.
1205
+ */
1206
+ stars: number;
1207
+ /**
1208
+ * Stars gained in the 7 days before the event; null when that week is not known yet.
1209
+ */
1210
+ weeklyStars: number | null;
1211
+ } | null;
1157
1212
  /**
1158
1213
  * Links the post carries, in the order written, at most 20. Empty for a post with none, and for posts ingested before September 2026.
1159
1214
  */
@@ -1866,9 +1921,9 @@ type FilterGroup = {
1866
1921
  */
1867
1922
  isReply?: boolean;
1868
1923
  /**
1869
- * Only posts (post) or only comments (comment).
1924
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository).
1870
1925
  */
1871
- kind?: 'post' | 'comment';
1926
+ kind?: 'post' | 'comment' | 'repository';
1872
1927
  /**
1873
1928
  * Never these authors: display names, handles or profile URLs.
1874
1929
  */
@@ -2027,9 +2082,9 @@ type View = {
2027
2082
  */
2028
2083
  isReply?: boolean;
2029
2084
  /**
2030
- * Only posts (post) or only comments (comment).
2085
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository).
2031
2086
  */
2032
- kind?: 'post' | 'comment';
2087
+ kind?: 'post' | 'comment' | 'repository';
2033
2088
  /**
2034
2089
  * Never these authors: display names, handles or profile URLs.
2035
2090
  */
@@ -4314,6 +4369,23 @@ type ListKeywordsResponses = {
4314
4369
  */
4315
4370
  excluded: Array<string>;
4316
4371
  };
4372
+ /**
4373
+ * GitHub only: which repository events naming this keyword become mentions. An event outside the rule is dropped before it is stored, so it is never billed.
4374
+ */
4375
+ repositories: {
4376
+ /**
4377
+ * The repository events this keyword takes. traction: a repository created in the last 30 days reached 10 stars. stars: one with 100 stars or more passed a milestone (100, 250, 500, 1,000, 2,000, 5,000 ...). growth: it gained stars fast in a week. new: every repository created, even with no stars (off by default: nearly all of them are noise for a broad keyword). Default: traction, stars, growth. Empty: no repository events.
4378
+ */
4379
+ events: Array<'new' | 'traction' | 'stars' | 'growth'>;
4380
+ /**
4381
+ * Only repositories with at least this many stars; null for no minimum.
4382
+ */
4383
+ minStars: number | null;
4384
+ /**
4385
+ * Only repositories that gained at least this many stars in the last 7 days (25 or more). It applies to every event, and one whose last week is not known yet does not pass. null: a growth event needs 100 stars and 20% of the repository's stars in a week, the other events need no growth.
4386
+ */
4387
+ minWeeklyStars: number | null;
4388
+ };
4317
4389
  };
4318
4390
  /**
4319
4391
  * Computed over this workspace's matches.
@@ -4482,6 +4554,23 @@ type CreateKeywordData = {
4482
4554
  * true: only the exact phrase matches. false (default): a multi-word keyword also matches a post holding its words close together, in any order, plurals and spellings (non-profit, nonprofit) included; such a match is kept and billed only when the classifier scores it relevant. A term sent in double quotes sets this to true.
4483
4555
  */
4484
4556
  exactPhrase?: boolean;
4557
+ /**
4558
+ * GitHub only: each field is replaced when sent, kept when omitted; null clears a minimum.
4559
+ */
4560
+ repositories?: {
4561
+ /**
4562
+ * The repository events this keyword takes. traction: a repository created in the last 30 days reached 10 stars. stars: one with 100 stars or more passed a milestone (100, 250, 500, 1,000, 2,000, 5,000 ...). growth: it gained stars fast in a week. new: every repository created, even with no stars (off by default: nearly all of them are noise for a broad keyword). Default: traction, stars, growth. Empty: no repository events.
4563
+ */
4564
+ events?: Array<'new' | 'traction' | 'stars' | 'growth'>;
4565
+ /**
4566
+ * Only repositories with at least this many stars; null for no minimum.
4567
+ */
4568
+ minStars?: number | null;
4569
+ /**
4570
+ * Only repositories that gained at least this many stars in the last 7 days (25 or more). It applies to every event, and one whose last week is not known yet does not pass. null: a growth event needs 100 stars and 20% of the repository's stars in a week, the other events need no growth.
4571
+ */
4572
+ minWeeklyStars?: number | null;
4573
+ };
4485
4574
  /**
4486
4575
  * Reddit only, for this keyword alone: each list is replaced when sent, kept when omitted.
4487
4576
  */
@@ -4690,6 +4779,23 @@ type UpdateKeywordData = {
4690
4779
  * true: only the exact phrase matches. false (default): a multi-word keyword also matches a post holding its words close together, in any order, plurals and spellings (non-profit, nonprofit) included; such a match is kept and billed only when the classifier scores it relevant. A term sent in double quotes sets this to true.
4691
4780
  */
4692
4781
  exactPhrase?: boolean;
4782
+ /**
4783
+ * GitHub only: each field is replaced when sent, kept when omitted; null clears a minimum.
4784
+ */
4785
+ repositories?: {
4786
+ /**
4787
+ * The repository events this keyword takes. traction: a repository created in the last 30 days reached 10 stars. stars: one with 100 stars or more passed a milestone (100, 250, 500, 1,000, 2,000, 5,000 ...). growth: it gained stars fast in a week. new: every repository created, even with no stars (off by default: nearly all of them are noise for a broad keyword). Default: traction, stars, growth. Empty: no repository events.
4788
+ */
4789
+ events?: Array<'new' | 'traction' | 'stars' | 'growth'>;
4790
+ /**
4791
+ * Only repositories with at least this many stars; null for no minimum.
4792
+ */
4793
+ minStars?: number | null;
4794
+ /**
4795
+ * Only repositories that gained at least this many stars in the last 7 days (25 or more). It applies to every event, and one whose last week is not known yet does not pass. null: a growth event needs 100 stars and 20% of the repository's stars in a week, the other events need no growth.
4796
+ */
4797
+ minWeeklyStars?: number | null;
4798
+ };
4693
4799
  /**
4694
4800
  * Reddit only, for this keyword alone: each list is replaced when sent, kept when omitted.
4695
4801
  */
@@ -5082,9 +5188,9 @@ type SearchMentionsData = {
5082
5188
  */
5083
5189
  maxFollowers?: number | null;
5084
5190
  /**
5085
- * Only posts (post) or only comments (comment). Omitted: both.
5191
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository). Omitted: all.
5086
5192
  */
5087
- kind?: 'post' | 'comment';
5193
+ kind?: 'post' | 'comment' | 'repository';
5088
5194
  /**
5089
5195
  * true: only replies and comments (posts answering another post); false: only top-level posts. Omitted: both.
5090
5196
  */
@@ -5333,9 +5439,9 @@ type ExportMentionsCsvData = {
5333
5439
  */
5334
5440
  maxFollowers?: number | null;
5335
5441
  /**
5336
- * Only posts (post) or only comments (comment). Omitted: both.
5442
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository). Omitted: all.
5337
5443
  */
5338
- kind?: 'post' | 'comment';
5444
+ kind?: 'post' | 'comment' | 'repository';
5339
5445
  /**
5340
5446
  * true: only replies and comments (posts answering another post); false: only top-level posts. Omitted: both.
5341
5447
  */
@@ -5618,9 +5724,9 @@ type ExportMentionsJsonData = {
5618
5724
  */
5619
5725
  maxFollowers?: number | null;
5620
5726
  /**
5621
- * Only posts (post) or only comments (comment). Omitted: both.
5727
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository). Omitted: all.
5622
5728
  */
5623
- kind?: 'post' | 'comment';
5729
+ kind?: 'post' | 'comment' | 'repository';
5624
5730
  /**
5625
5731
  * true: only replies and comments (posts answering another post); false: only top-level posts. Omitted: both.
5626
5732
  */
@@ -7121,9 +7227,9 @@ type ListViewsResponses = {
7121
7227
  */
7122
7228
  isReply?: boolean;
7123
7229
  /**
7124
- * Only posts (post) or only comments (comment).
7230
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository).
7125
7231
  */
7126
- kind?: 'post' | 'comment';
7232
+ kind?: 'post' | 'comment' | 'repository';
7127
7233
  /**
7128
7234
  * Never these authors: display names, handles or profile URLs.
7129
7235
  */
@@ -7304,9 +7410,9 @@ type CreateViewData = {
7304
7410
  */
7305
7411
  isReply?: boolean;
7306
7412
  /**
7307
- * Only posts (post) or only comments (comment).
7413
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository).
7308
7414
  */
7309
- kind?: 'post' | 'comment';
7415
+ kind?: 'post' | 'comment' | 'repository';
7310
7416
  /**
7311
7417
  * Never these authors: display names, handles or profile URLs.
7312
7418
  */
@@ -7554,9 +7660,9 @@ type UpdateViewData = {
7554
7660
  */
7555
7661
  isReply?: boolean;
7556
7662
  /**
7557
- * Only posts (post) or only comments (comment).
7663
+ * Only posts (post), only comments (comment) or only GitHub repository events (repository).
7558
7664
  */
7559
- kind?: 'post' | 'comment';
7665
+ kind?: 'post' | 'comment' | 'repository';
7560
7666
  /**
7561
7667
  * Never these authors: display names, handles or profile URLs.
7562
7668
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentio-dev/sdk",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "TypeScript SDK for the Mentio API, generated from its OpenAPI document.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.mentio.dev/sdks",