glitch-javascript-sdk 3.2.24 → 3.2.26

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.
@@ -3,7 +3,7 @@ import Route from "./interface";
3
3
  * Route declarations for the PR Directory API.
4
4
  *
5
5
  * These mirror the Laravel routes under `/api/pr/*` and the title-scoped
6
- * matcher route under `/api/titles/{title_id}/pr/matches`. Keeping the URL
6
+ * matcher/research routes under `/api/titles/{title_id}/pr/*`. Keeping the URL
7
7
  * templates in one place lets the SDK methods stay small and consistent with
8
8
  * the rest of the package's route-wrapper pattern.
9
9
  */
package/dist/index.d.ts CHANGED
@@ -6246,6 +6246,10 @@ declare class GameShows {
6246
6246
  * List notification signups for a game show. Requires organizer permissions.
6247
6247
  */
6248
6248
  static listWishlist<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6249
+ /**
6250
+ * List public game shows that include a title. Useful for game-page festival banners.
6251
+ */
6252
+ static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6249
6253
  }
6250
6254
 
6251
6255
  declare class Newsletters {
@@ -9654,6 +9658,14 @@ type PrContactVerificationStatus = "unverified" | "verified" | "stale" | "bounce
9654
9658
  * Link refresh status for evidence URLs.
9655
9659
  */
9656
9660
  type PrLinkStatus = "unverified" | "ok" | "redirected" | "broken" | "blocked" | "failed" | "stale";
9661
+ /**
9662
+ * Refresh state for discovered RSS/Atom/JSON feeds.
9663
+ */
9664
+ type PrFeedStatus = "unverified" | "ok" | "empty" | "blocked" | "failed" | "stale" | "needs_review";
9665
+ /**
9666
+ * Feed format detected during PR content ingestion.
9667
+ */
9668
+ type PrFeedType = "rss" | "atom" | "json" | "unknown";
9657
9669
  /**
9658
9670
  * Filters accepted by `/pr/publications` and `/pr/report`.
9659
9671
  *
@@ -9697,6 +9709,39 @@ interface PrPeopleSearchParams {
9697
9709
  page?: number;
9698
9710
  per_page?: number;
9699
9711
  }
9712
+ /**
9713
+ * Filters accepted by `/pr/feeds`.
9714
+ */
9715
+ interface PrFeedSearchParams {
9716
+ q?: string;
9717
+ publication_id?: string;
9718
+ feed_type?: PrFeedType;
9719
+ status?: PrFeedStatus;
9720
+ source?: string;
9721
+ has_stories?: boolean;
9722
+ sort?: "title" | "-title" | "feed_type" | "-feed_type" | "status" | "-status" | "last_fetched_at" | "-last_fetched_at" | "next_fetch_at" | "-next_fetch_at" | "updated_at" | "-updated_at" | string;
9723
+ page?: number;
9724
+ per_page?: number;
9725
+ include_raw?: boolean;
9726
+ }
9727
+ /**
9728
+ * Filters accepted by `/pr/stories`.
9729
+ */
9730
+ interface PrStorySearchParams {
9731
+ q?: string;
9732
+ publication_id?: string;
9733
+ pr_feed_id?: string;
9734
+ pr_person_id?: string;
9735
+ story_type?: string;
9736
+ language?: string;
9737
+ ingestion_status?: string;
9738
+ has_author?: boolean;
9739
+ published_after?: string;
9740
+ published_before?: string;
9741
+ sort?: "published_at" | "-published_at" | "updated_at" | "-updated_at" | "title" | "-title" | string;
9742
+ page?: number;
9743
+ per_page?: number;
9744
+ }
9700
9745
  /**
9701
9746
  * Filters accepted by `/pr/tags`.
9702
9747
  */
@@ -9716,6 +9761,13 @@ interface PrTitleMatchParams extends PrPublicationSearchParams {
9716
9761
  audiences?: string[];
9717
9762
  limit?: number;
9718
9763
  }
9764
+ /**
9765
+ * Query parameters accepted by `/titles/{title_id}/pr/research`.
9766
+ */
9767
+ interface PrTitleResearchParams extends PrStorySearchParams {
9768
+ limit?: number;
9769
+ story_sort?: string;
9770
+ }
9719
9771
  /**
9720
9772
  * Request body accepted by `/admin/pr/verification/queue`.
9721
9773
  */
@@ -9724,6 +9776,34 @@ interface PrQueueVerificationRequest {
9724
9776
  limit?: number;
9725
9777
  link_ids?: string[];
9726
9778
  }
9779
+ /**
9780
+ * Review-only PR draft request for `/titles/{title_id}/pr/drafts`.
9781
+ */
9782
+ interface PrTitleDraftRequest {
9783
+ publication_id?: string;
9784
+ pr_person_id?: string;
9785
+ q?: string;
9786
+ prompt?: string;
9787
+ press_kit_url?: string;
9788
+ trailer_url?: string;
9789
+ demo_or_review_key?: string;
9790
+ embargo_or_timing?: string;
9791
+ sender?: {
9792
+ name?: string;
9793
+ };
9794
+ use_ai?: boolean;
9795
+ }
9796
+ /**
9797
+ * Admin request body for `/admin/pr/feeds/refresh`.
9798
+ */
9799
+ interface PrFeedRefreshRequest {
9800
+ discover?: boolean;
9801
+ due?: boolean;
9802
+ queue?: boolean;
9803
+ limit?: number;
9804
+ feed_ids?: string[];
9805
+ publication_ids?: string[];
9806
+ }
9727
9807
  /**
9728
9808
  * A normalized metadata tag used to filter and match PR outlets, people, and
9729
9809
  * roles.
@@ -9773,6 +9853,90 @@ interface PrLink {
9773
9853
  created_at?: string | null;
9774
9854
  updated_at?: string | null;
9775
9855
  }
9856
+ /**
9857
+ * RSS/Atom/JSON feed discovered for a publication and used for story research.
9858
+ */
9859
+ interface PrFeed {
9860
+ id: string;
9861
+ publication_id: string;
9862
+ pr_link_id?: string | null;
9863
+ feed_url: string;
9864
+ canonical_url?: string | null;
9865
+ feed_type: PrFeedType;
9866
+ title?: string | null;
9867
+ description?: string | null;
9868
+ language?: string | null;
9869
+ status: PrFeedStatus;
9870
+ http_status?: number | null;
9871
+ content_type?: string | null;
9872
+ etag?: string | null;
9873
+ raw_feed_hash?: string | null;
9874
+ raw_feed_content?: string | null;
9875
+ raw_feed_size?: number;
9876
+ last_modified_at?: string | null;
9877
+ last_fetched_at?: string | null;
9878
+ next_fetch_at?: string | null;
9879
+ item_count_last_fetch: number;
9880
+ source?: string | null;
9881
+ last_error?: string | null;
9882
+ publication?: PrPublication | null;
9883
+ stories_count?: number;
9884
+ stories?: PrStory[];
9885
+ metadata?: Record<string, any>;
9886
+ created_at?: string | null;
9887
+ updated_at?: string | null;
9888
+ }
9889
+ /**
9890
+ * A story, article, guide, review, or episode imported from a PR feed.
9891
+ */
9892
+ interface PrStory {
9893
+ id: string;
9894
+ publication_id: string;
9895
+ pr_feed_id?: string | null;
9896
+ canonical_url?: string | null;
9897
+ guid?: string | null;
9898
+ title: string;
9899
+ dek?: string | null;
9900
+ summary?: string | null;
9901
+ content_excerpt?: string | null;
9902
+ content_hash?: string | null;
9903
+ author_name_raw?: string | null;
9904
+ author_email_raw?: string | null;
9905
+ author_url_raw?: string | null;
9906
+ published_at?: string | null;
9907
+ updated_at_feed?: string | null;
9908
+ story_type?: string | null;
9909
+ language?: string | null;
9910
+ categories?: string[];
9911
+ tags?: string[];
9912
+ media_url?: string | null;
9913
+ analysis?: Record<string, any>;
9914
+ ingestion_status?: string | null;
9915
+ publication?: PrPublication | null;
9916
+ feed?: PrFeed | null;
9917
+ authors?: PrStoryAuthor[];
9918
+ created_at?: string | null;
9919
+ updated_at?: string | null;
9920
+ }
9921
+ /**
9922
+ * Raw byline evidence and optional match to a known PR contact.
9923
+ */
9924
+ interface PrStoryAuthor {
9925
+ id: string;
9926
+ pr_story_id: string;
9927
+ publication_id?: string | null;
9928
+ pr_person_id?: string | null;
9929
+ author_name?: string | null;
9930
+ author_email?: string | null;
9931
+ author_url?: string | null;
9932
+ confidence?: number | null;
9933
+ match_source?: string | null;
9934
+ evidence?: Record<string, any>;
9935
+ story?: PrStory | null;
9936
+ person?: PrPerson | null;
9937
+ created_at?: string | null;
9938
+ updated_at?: string | null;
9939
+ }
9776
9940
  /**
9777
9941
  * A normalized way to reach an outlet, person, or publication role.
9778
9942
  */
@@ -9850,9 +10014,13 @@ interface PrPublication {
9850
10014
  people_count?: number;
9851
10015
  contact_points_count?: number;
9852
10016
  links_count?: number;
10017
+ feeds_count?: number;
10018
+ stories_count?: number;
9853
10019
  people?: PublicationPerson[];
9854
10020
  contact_points?: PrContactPoint[];
9855
10021
  links?: PrLink[];
10022
+ feeds?: PrFeed[];
10023
+ stories?: PrStory[];
9856
10024
  tags?: PrTag[];
9857
10025
  metadata?: Record<string, any>;
9858
10026
  created_at?: string | null;
@@ -9879,9 +10047,11 @@ interface PrPerson {
9879
10047
  roles_count?: number;
9880
10048
  contact_points_count?: number;
9881
10049
  links_count?: number;
10050
+ stories_count?: number;
9882
10051
  roles?: PublicationPerson[];
9883
10052
  contact_points?: PrContactPoint[];
9884
10053
  links?: PrLink[];
10054
+ stories?: PrStoryAuthor[];
9885
10055
  tags?: PrTag[];
9886
10056
  metadata?: Record<string, any>;
9887
10057
  created_at?: string | null;
@@ -9922,6 +10092,16 @@ interface PrDirectoryReport {
9922
10092
  total: number;
9923
10093
  by_namespace: Record<string, number>;
9924
10094
  };
10095
+ feeds: {
10096
+ total: number;
10097
+ by_status: Record<string, number>;
10098
+ due_for_fetch: number;
10099
+ };
10100
+ stories: {
10101
+ total: number;
10102
+ with_author: number;
10103
+ by_type: Record<string, number>;
10104
+ };
9925
10105
  }
9926
10106
  /**
9927
10107
  * A ranked title-to-outlet match with evidence, contact route, and plain-English
@@ -9936,19 +10116,88 @@ interface PrTitleMatch {
9936
10116
  risks: string[];
9937
10117
  evidence_links: PrLink[];
9938
10118
  }
10119
+ /**
10120
+ * Title-scoped PR research workspace response.
10121
+ */
10122
+ interface PrTitleResearchResponse {
10123
+ generated_at: string;
10124
+ title: {
10125
+ id: string;
10126
+ name: string;
10127
+ slug?: string | null;
10128
+ short_description?: string | null;
10129
+ description?: string | null;
10130
+ genres?: string[];
10131
+ platforms?: string[];
10132
+ website_url?: string | null;
10133
+ steam_url?: string | null;
10134
+ itch_url?: string | null;
10135
+ demo_url?: string | null;
10136
+ video_url?: string | null;
10137
+ };
10138
+ readiness: {
10139
+ score: number;
10140
+ strengths: string[];
10141
+ gaps: string[];
10142
+ };
10143
+ publication_matches: PrTitleMatch[];
10144
+ stories: PrStory[];
10145
+ story_summary: {
10146
+ count: number;
10147
+ with_known_author: number;
10148
+ publication_count: number;
10149
+ };
10150
+ suggested_next_steps: string[];
10151
+ }
10152
+ /**
10153
+ * Structured draft fields returned alongside the formatted HTML email body.
10154
+ */
10155
+ interface PrOutreachDraft {
10156
+ subject?: string | null;
10157
+ opener?: string | null;
10158
+ body?: string | null;
10159
+ body_html?: string | null;
10160
+ key_points?: string[];
10161
+ personalization_notes?: string[];
10162
+ review_notes?: string[];
10163
+ missing_context_warnings?: string[];
10164
+ [key: string]: any;
10165
+ }
10166
+ /**
10167
+ * Review-only PR draft response. The API never sends email from this endpoint.
10168
+ */
10169
+ interface PrTitleDraftResponse {
10170
+ draft_status: "draft_only_not_sent" | "no_verified_email_found" | "no_publication_found" | string;
10171
+ emails_sent: boolean;
10172
+ publication?: PrPublication | null;
10173
+ person?: PrPerson | null;
10174
+ target: Record<string, any>;
10175
+ recent_stories: PrStory[];
10176
+ draft: PrOutreachDraft;
10177
+ body_html: string;
10178
+ review_notes: string[];
10179
+ }
9939
10180
  /**
9940
10181
  * Response body returned after queueing PR verification jobs.
9941
10182
  */
9942
10183
  interface PrQueueVerificationResponse {
9943
10184
  queued: number;
9944
10185
  }
10186
+ /**
10187
+ * Response body returned after discovering, queueing, or fetching PR feeds.
10188
+ */
10189
+ interface PrFeedRefreshResponse {
10190
+ discovered: number;
10191
+ queued: number;
10192
+ fetched: number;
10193
+ }
9945
10194
  /**
9946
10195
  * SDK wrapper for the PR Directory API.
9947
10196
  *
9948
10197
  * The PR directory is read-friendly by default: public endpoints expose
9949
- * searchable publications, people, tags, and reporting metrics. Authenticated
9950
- * title admins can request title-specific PR matches, and site admins can queue
9951
- * monthly-style verification jobs.
10198
+ * searchable publications, people, feeds, stories, tags, and reporting metrics.
10199
+ * Authenticated title admins can request title-specific research and review-only
10200
+ * outreach drafts, and site admins can queue verification or feed refresh jobs.
9952
10201
  */
9953
10202
  declare class PrDirectory {
9954
10203
  /**
@@ -9988,6 +10237,23 @@ declare class PrDirectory {
9988
10237
  * contact points, and metadata tags.
9989
10238
  */
9990
10239
  static viewPerson<T = PrPerson>(person_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
10240
+ /**
10241
+ * Search discovered RSS/Atom/JSON feeds across known publications.
10242
+ */
10243
+ static listFeeds<T = PrFeed[]>(params?: PrFeedSearchParams): AxiosPromise<Response<T>>;
10244
+ /**
10245
+ * Retrieve one feed with freshness metadata and recent imported stories.
10246
+ * Pass `include_raw: true` to request the stored XML/RSS payload.
10247
+ */
10248
+ static viewFeed<T = PrFeed>(feed_id: string, params?: PrFeedSearchParams): AxiosPromise<Response<T>>;
10249
+ /**
10250
+ * Search imported stories, reviews, guides, and episodes by outlet or byline.
10251
+ */
10252
+ static listStories<T = PrStory[]>(params?: PrStorySearchParams): AxiosPromise<Response<T>>;
10253
+ /**
10254
+ * Retrieve one imported story with feed, publication, and byline evidence.
10255
+ */
10256
+ static viewStory<T = PrStory>(story_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
9991
10257
  /**
9992
10258
  * List the normalized tag vocabulary used for PR search, filters, matching,
9993
10259
  * and reporting.
@@ -10003,6 +10269,16 @@ declare class PrDirectory {
10003
10269
  * user who can administer the requested title.
10004
10270
  */
10005
10271
  static titleMatches<T = PrTitleMatch[]>(title_id: string, params?: PrTitleMatchParams): AxiosPromise<Response<T>>;
10272
+ /**
10273
+ * Get a title-scoped PR research workspace with outlet matches, recent story
10274
+ * context, media kit readiness, and next steps.
10275
+ */
10276
+ static titleResearch<T = PrTitleResearchResponse>(title_id: string, params?: PrTitleResearchParams): AxiosPromise<Response<T>>;
10277
+ /**
10278
+ * Create a formatted, review-only PR email draft for a selected title target.
10279
+ * The backend returns HTML with paragraphs, bullets, and links but sends no email.
10280
+ */
10281
+ static titleDraft<T = PrTitleDraftResponse>(title_id: string, data?: PrTitleDraftRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
10006
10282
  /**
10007
10283
  * Queue PR verification jobs. Requires a site-admin auth token.
10008
10284
  *
@@ -10012,6 +10288,11 @@ declare class PrDirectory {
10012
10288
  * ```
10013
10289
  */
10014
10290
  static queueVerification<T = PrQueueVerificationResponse>(data?: PrQueueVerificationRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
10291
+ /**
10292
+ * Discover, queue, or synchronously refresh PR feeds. Requires a site-admin
10293
+ * auth token.
10294
+ */
10295
+ static refreshFeeds<T = PrFeedRefreshResponse>(data?: PrFeedRefreshRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
10015
10296
  }
10016
10297
 
10017
10298
  declare class AdminReports {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.2.24",
3
+ "version": "3.2.26",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -280,6 +280,13 @@ class GameShows {
280
280
  return Requests.processRoute(GameShowsRoute.routes.listWishlist, {}, { show_id: show_id }, params);
281
281
  }
282
282
 
283
+ /**
284
+ * List public game shows that include a title. Useful for game-page festival banners.
285
+ */
286
+ public static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
287
+ return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
288
+ }
289
+
283
290
  }
284
291
 
285
292
  export default GameShows;