@pushwoosh/rpc-v2-http-api-data 0.2.135 → 0.2.137

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/data.js CHANGED
@@ -18330,6 +18330,113 @@ export const data = {
18330
18330
  }
18331
18331
  }
18332
18332
  },
18333
+ "pushwoosh.rpc_v2.news.NewsService": {
18334
+ "type": "S",
18335
+ "key": "news",
18336
+ "methods": {
18337
+ "ListNewsFeeds": {
18338
+ "request": "pushwoosh.rpc_v2.news.ListNewsFeedsRequest",
18339
+ "response": "pushwoosh.rpc_v2.news.ListNewsFeedsResponse",
18340
+ "method": "get",
18341
+ "path": "/api/news/feeds"
18342
+ },
18343
+ "SetNewsFeed": {
18344
+ "request": "pushwoosh.rpc_v2.news.SetNewsFeedRequest",
18345
+ "response": "pushwoosh.rpc_v2.news.SetNewsFeedResponse",
18346
+ "method": "post",
18347
+ "path": "/api/news/feeds"
18348
+ },
18349
+ "DeleteNewsFeed": {
18350
+ "request": "pushwoosh.rpc_v2.news.DeleteNewsFeedRequest",
18351
+ "response": "pushwoosh.rpc_v2.news.DeleteNewsFeedResponse",
18352
+ "method": "post",
18353
+ "path": "/api/news/feeds:delete"
18354
+ }
18355
+ }
18356
+ },
18357
+ "pushwoosh.rpc_v2.news.NewsFeed": {
18358
+ "type": "I",
18359
+ "fields": {
18360
+ "code": {
18361
+ "type": "string"
18362
+ },
18363
+ "name": {
18364
+ "type": "string"
18365
+ },
18366
+ "url": {
18367
+ "type": "string"
18368
+ },
18369
+ "enabled": {
18370
+ "type": "boolean"
18371
+ },
18372
+ "created": {
18373
+ "type": "Date"
18374
+ },
18375
+ "updated": {
18376
+ "type": "Date"
18377
+ }
18378
+ }
18379
+ },
18380
+ "pushwoosh.rpc_v2.news.ListNewsFeedsRequest": {
18381
+ "type": "I",
18382
+ "fields": {
18383
+ "applicationCode": {
18384
+ "type": "string"
18385
+ }
18386
+ }
18387
+ },
18388
+ "pushwoosh.rpc_v2.news.ListNewsFeedsResponse": {
18389
+ "type": "I",
18390
+ "fields": {
18391
+ "feeds": {
18392
+ "type": "pushwoosh.rpc_v2.news.NewsFeed",
18393
+ "array": true
18394
+ }
18395
+ }
18396
+ },
18397
+ "pushwoosh.rpc_v2.news.SetNewsFeedRequest": {
18398
+ "type": "I",
18399
+ "fields": {
18400
+ "applicationCode": {
18401
+ "type": "string"
18402
+ },
18403
+ "code": {
18404
+ "type": "string"
18405
+ },
18406
+ "name": {
18407
+ "type": "string"
18408
+ },
18409
+ "url": {
18410
+ "type": "string"
18411
+ },
18412
+ "enabled": {
18413
+ "type": "boolean"
18414
+ }
18415
+ }
18416
+ },
18417
+ "pushwoosh.rpc_v2.news.SetNewsFeedResponse": {
18418
+ "type": "I",
18419
+ "fields": {
18420
+ "feed": {
18421
+ "type": "pushwoosh.rpc_v2.news.NewsFeed"
18422
+ }
18423
+ }
18424
+ },
18425
+ "pushwoosh.rpc_v2.news.DeleteNewsFeedRequest": {
18426
+ "type": "I",
18427
+ "fields": {
18428
+ "applicationCode": {
18429
+ "type": "string"
18430
+ },
18431
+ "code": {
18432
+ "type": "string"
18433
+ }
18434
+ }
18435
+ },
18436
+ "pushwoosh.rpc_v2.news.DeleteNewsFeedResponse": {
18437
+ "type": "I",
18438
+ "fields": {}
18439
+ },
18333
18440
  "pushwoosh.objects.filters.v1.LogicExpression.Binary.Operator": {
18334
18441
  "type": "E",
18335
18442
  "values": [
@@ -27026,6 +27133,12 @@ export const data = {
27026
27133
  },
27027
27134
  "items": {
27028
27135
  "type": "number"
27136
+ },
27137
+ "strategy": {
27138
+ "type": "string"
27139
+ },
27140
+ "anchorTag": {
27141
+ "type": "string"
27029
27142
  }
27030
27143
  }
27031
27144
  },
package/index.d.ts CHANGED
@@ -43,6 +43,7 @@ import { KakaoPresetsService as pushwoosh_rpc_v2_kakao_presets_KakaoPresetsServi
43
43
  import { linePresetsService as pushwoosh_rpc_v2_line_presets_linePresetsService } from './line_presets';
44
44
  import { MediaFilesService as pushwoosh_rpc_v2_media_files_MediaFilesService } from './media_files';
45
45
  import { MessagesService as pushwoosh_rpc_v2_messages_MessagesService } from './messages';
46
+ import { NewsService as pushwoosh_rpc_v2_news_NewsService } from './news';
46
47
  import { RestrictionValuesCrudService as pushwoosh_objects_restrictionValues_v1_RestrictionValuesCrudService } from './pushwoosh_objects_restrictionValues_v1';
47
48
  import { PopupFormsService as pushwoosh_rpc_popup_forms_v3_PopupFormsService } from './pushwoosh_rpc_popup_forms_v3';
48
49
  import { PopupFormsContentsService as pushwoosh_rpc_popup_forms_contents_v3_PopupFormsContentsService } from './pushwoosh_rpc_popup_forms_contents_v3';
@@ -110,6 +111,7 @@ export type API = {
110
111
  linePresets: pushwoosh_rpc_v2_line_presets_linePresetsService;
111
112
  mediaFiles: pushwoosh_rpc_v2_media_files_MediaFilesService;
112
113
  messages: pushwoosh_rpc_v2_messages_MessagesService;
114
+ news: pushwoosh_rpc_v2_news_NewsService;
113
115
  restrictionValuesCrud: pushwoosh_objects_restrictionValues_v1_RestrictionValuesCrudService;
114
116
  popupForms: pushwoosh_rpc_popup_forms_v3_PopupFormsService;
115
117
  popupFormsContents: pushwoosh_rpc_popup_forms_contents_v3_PopupFormsContentsService;
package/news.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ export type NewsService_ListNewsFeeds = RpcMethod<ListNewsFeedsRequest, ListNewsFeedsResponse>;
3
+ export type NewsService_SetNewsFeed = RpcMethod<SetNewsFeedRequest, SetNewsFeedResponse>;
4
+ export type NewsService_DeleteNewsFeed = RpcMethod<DeleteNewsFeedRequest, DeleteNewsFeedResponse>;
5
+ /**
6
+ * NewsService manages the registry of news feeds an application's email news
7
+ * blocks read from. Feeds are imported hourly by the recommender.
8
+ */
9
+ export interface NewsService {
10
+ /** Lists the news feeds registered for an application (code XXXXX-XXXXX). Use to fill the feed selector of an email news block. */
11
+ ListNewsFeeds: NewsService_ListNewsFeeds;
12
+ /** Registers an RSS/Atom news feed for an application (code XXXXX-XXXXX), or updates one when code is given. Articles are imported hourly; an application may have several feeds. */
13
+ SetNewsFeed: NewsService_SetNewsFeed;
14
+ /** Removes a news feed of an application (code XXXXX-XXXXX) from the registry. Imported articles are no longer refreshed and stop being served once they fall out of the 30-day freshness window. */
15
+ DeleteNewsFeed: NewsService_DeleteNewsFeed;
16
+ }
17
+ export type NewsFeed = {
18
+ /** Stable feed id; an email block references the feed by this code. */
19
+ code: string;
20
+ /** Human-readable name shown in the feed selector. */
21
+ name: string;
22
+ /** RSS/Atom feed URL. */
23
+ url: string;
24
+ /** A disabled feed keeps its articles but stops being imported. */
25
+ enabled: boolean;
26
+ created: Date;
27
+ updated: Date;
28
+ };
29
+ export type ListNewsFeedsRequest = {
30
+ /** Pushwoosh application code (XXXXX-XXXXX). */
31
+ applicationCode?: string;
32
+ };
33
+ export type ListNewsFeedsResponse = {
34
+ feeds: NewsFeed[];
35
+ };
36
+ export type SetNewsFeedRequest = {
37
+ /** Pushwoosh application code (XXXXX-XXXXX). */
38
+ applicationCode?: string;
39
+ /** Empty registers a new feed; a code updates that feed. */
40
+ code?: string;
41
+ name?: string;
42
+ /** http(s) URL of an RSS or Atom feed. */
43
+ url?: string;
44
+ enabled?: boolean;
45
+ };
46
+ export type SetNewsFeedResponse = {
47
+ feed: NewsFeed;
48
+ };
49
+ export type DeleteNewsFeedRequest = {
50
+ /** Pushwoosh application code (XXXXX-XXXXX). */
51
+ applicationCode?: string;
52
+ code?: string;
53
+ };
54
+ export type DeleteNewsFeedResponse = {};
package/news.js ADDED
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.135",
3
+ "version": "0.2.137",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/sms_presets.d.ts CHANGED
@@ -48,6 +48,13 @@ export type SmsProductsSource_Rule = {
48
48
  sort: string;
49
49
  /** How many products the message carries, and the feed limit. */
50
50
  items: number;
51
+ /**
52
+ * How the feed RANKS the products, in the feed's own vocabulary (hence not an enum);
53
+ * `sort` stays the fallback order an unknown value degrades to.
54
+ */
55
+ strategy: string;
56
+ /** Device tag holding the anchor product id of "also_bought"; empty = unset. */
57
+ anchorTag: string;
51
58
  };
52
59
  /**
53
60
  * One hand-picked product row, frozen as the editor saw it. The fields are exactly