@pushwoosh/rpc-v2-http-api-data 0.2.432 → 0.2.434

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 (3) hide show
  1. package/data.js +99 -0
  2. package/news.d.ts +46 -0
  3. package/package.json +1 -1
package/data.js CHANGED
@@ -25332,6 +25332,18 @@ export const data = {
25332
25332
  "method": "post",
25333
25333
  "path": "/api/news/feeds:delete"
25334
25334
  },
25335
+ "ListNewsFeedArticles": {
25336
+ "request": "pushwoosh.rpc_v2.news.ListNewsFeedArticlesRequest",
25337
+ "response": "pushwoosh.rpc_v2.news.ListNewsFeedArticlesResponse",
25338
+ "method": "get",
25339
+ "path": "/api/news/feeds/{feed_code}/articles"
25340
+ },
25341
+ "ListNewsFeedCategories": {
25342
+ "request": "pushwoosh.rpc_v2.news.ListNewsFeedCategoriesRequest",
25343
+ "response": "pushwoosh.rpc_v2.news.ListNewsFeedCategoriesResponse",
25344
+ "method": "get",
25345
+ "path": "/api/news/feeds/{feed_code}/categories"
25346
+ },
25335
25347
  "ListNewsFeedCampaigns": {
25336
25348
  "request": "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsRequest",
25337
25349
  "response": "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsResponse",
@@ -25467,6 +25479,93 @@ export const data = {
25467
25479
  "type": "I",
25468
25480
  "fields": {}
25469
25481
  },
25482
+ "pushwoosh.rpc_v2.news.ListNewsFeedArticlesRequest": {
25483
+ "type": "I",
25484
+ "fields": {
25485
+ "applicationCode": {
25486
+ "type": "string"
25487
+ },
25488
+ "feedCode": {
25489
+ "type": "string"
25490
+ },
25491
+ "category": {
25492
+ "type": "string"
25493
+ },
25494
+ "limit": {
25495
+ "type": "number"
25496
+ }
25497
+ }
25498
+ },
25499
+ "pushwoosh.rpc_v2.news.ListNewsFeedArticlesResponse": {
25500
+ "type": "I",
25501
+ "fields": {
25502
+ "articles": {
25503
+ "type": "pushwoosh.rpc_v2.news.NewsArticle",
25504
+ "array": true
25505
+ }
25506
+ }
25507
+ },
25508
+ "pushwoosh.rpc_v2.news.NewsArticle": {
25509
+ "type": "I",
25510
+ "fields": {
25511
+ "id": {
25512
+ "type": "string"
25513
+ },
25514
+ "title": {
25515
+ "type": "string"
25516
+ },
25517
+ "summary": {
25518
+ "type": "string"
25519
+ },
25520
+ "imageUrl": {
25521
+ "type": "string"
25522
+ },
25523
+ "url": {
25524
+ "type": "string"
25525
+ },
25526
+ "author": {
25527
+ "type": "string"
25528
+ },
25529
+ "category": {
25530
+ "type": "string"
25531
+ },
25532
+ "publishedAt": {
25533
+ "type": "Date",
25534
+ "optional": true
25535
+ }
25536
+ }
25537
+ },
25538
+ "pushwoosh.rpc_v2.news.ListNewsFeedCategoriesRequest": {
25539
+ "type": "I",
25540
+ "fields": {
25541
+ "applicationCode": {
25542
+ "type": "string"
25543
+ },
25544
+ "feedCode": {
25545
+ "type": "string"
25546
+ }
25547
+ }
25548
+ },
25549
+ "pushwoosh.rpc_v2.news.ListNewsFeedCategoriesResponse": {
25550
+ "type": "I",
25551
+ "fields": {
25552
+ "categories": {
25553
+ "type": "pushwoosh.rpc_v2.news.NewsFeedCategory",
25554
+ "array": true
25555
+ }
25556
+ }
25557
+ },
25558
+ "pushwoosh.rpc_v2.news.NewsFeedCategory": {
25559
+ "type": "I",
25560
+ "fields": {
25561
+ "value": {
25562
+ "type": "string"
25563
+ },
25564
+ "articles": {
25565
+ "type": "number"
25566
+ }
25567
+ }
25568
+ },
25470
25569
  "pushwoosh.rpc_v2.news.NewsFeedCampaign": {
25471
25570
  "type": "I",
25472
25571
  "fields": {
package/news.d.ts CHANGED
@@ -2,6 +2,8 @@ import { RpcMethod } from './commonTypes';
2
2
  export type NewsService_ListNewsFeeds = RpcMethod<ListNewsFeedsRequest, ListNewsFeedsResponse>;
3
3
  export type NewsService_SetNewsFeed = RpcMethod<SetNewsFeedRequest, SetNewsFeedResponse>;
4
4
  export type NewsService_DeleteNewsFeed = RpcMethod<DeleteNewsFeedRequest, DeleteNewsFeedResponse>;
5
+ export type NewsService_ListNewsFeedArticles = RpcMethod<ListNewsFeedArticlesRequest, ListNewsFeedArticlesResponse>;
6
+ export type NewsService_ListNewsFeedCategories = RpcMethod<ListNewsFeedCategoriesRequest, ListNewsFeedCategoriesResponse>;
5
7
  export type NewsService_ListNewsFeedCampaigns = RpcMethod<ListNewsFeedCampaignsRequest, ListNewsFeedCampaignsResponse>;
6
8
  export type NewsService_GetNewsFeedCampaign = RpcMethod<GetNewsFeedCampaignRequest, GetNewsFeedCampaignResponse>;
7
9
  export type NewsService_SetNewsFeedCampaign = RpcMethod<SetNewsFeedCampaignRequest, SetNewsFeedCampaignResponse>;
@@ -18,6 +20,10 @@ export interface NewsService {
18
20
  SetNewsFeed: NewsService_SetNewsFeed;
19
21
  /** Removes a news feed of an application (code XXXXX-XXXXX) from the registry. Its already imported articles are deleted by the next import run. */
20
22
  DeleteNewsFeed: NewsService_DeleteNewsFeed;
23
+ /** Lists the newest imported articles of a news feed of an application (code XXXXX-XXXXX), optionally of one category. Use to preview what a feed campaign of that feed would send. */
24
+ ListNewsFeedArticles: NewsService_ListNewsFeedArticles;
25
+ /** Lists the categories (rubrics) of the imported articles of a news feed of an application (code XXXXX-XXXXX), most used first. Use to fill the category selector of a feed campaign. */
26
+ ListNewsFeedCategories: NewsService_ListNewsFeedCategories;
21
27
  /** Lists the feed campaigns of an application (code XXXXX-XXXXX): each sends every new article of one of its news feeds as a push and/or an App Inbox message. Use to show the campaigns listing with the last article sent. */
22
28
  ListNewsFeedCampaigns: NewsService_ListNewsFeedCampaigns;
23
29
  /** Returns one feed campaign of an application (code XXXXX-XXXXX) by its code, for the edit form. */
@@ -79,6 +85,46 @@ export type DeleteNewsFeedRequest = {
79
85
  code?: string;
80
86
  };
81
87
  export type DeleteNewsFeedResponse = {};
88
+ export type ListNewsFeedArticlesRequest = {
89
+ /** Pushwoosh application code (XXXXX-XXXXX). */
90
+ applicationCode?: string;
91
+ /** Code of one of the application's news feeds. */
92
+ feedCode?: string;
93
+ /** Article category (rubric); empty takes every article of the feed. */
94
+ category?: string;
95
+ /** How many articles, newest first: 1 when absent, at most 20. */
96
+ limit?: number;
97
+ };
98
+ export type ListNewsFeedArticlesResponse = {
99
+ articles: NewsArticle[];
100
+ };
101
+ /** An article imported from a news feed in the last 30 days. */
102
+ export type NewsArticle = {
103
+ id: string;
104
+ title: string;
105
+ summary: string;
106
+ imageUrl: string;
107
+ url: string;
108
+ author: string;
109
+ /** The publisher's category, or the first URL section when it ships none. */
110
+ category: string;
111
+ /** Absent when the feed gave no date. */
112
+ publishedAt?: Date;
113
+ };
114
+ export type ListNewsFeedCategoriesRequest = {
115
+ /** Pushwoosh application code (XXXXX-XXXXX). */
116
+ applicationCode?: string;
117
+ /** Code of one of the application's news feeds. */
118
+ feedCode?: string;
119
+ };
120
+ export type ListNewsFeedCategoriesResponse = {
121
+ categories: NewsFeedCategory[];
122
+ };
123
+ export type NewsFeedCategory = {
124
+ value: string;
125
+ /** Imported articles of the feed in this category. */
126
+ articles: number;
127
+ };
82
128
  /**
83
129
  * NewsFeedCampaign sends every new article of a news feed to an audience as a push
84
130
  * and/or an App Inbox message; the article is the content, the campaign is the delivery rules.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.432",
3
+ "version": "0.2.434",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",