@pushwoosh/rpc-v2-http-api-data 0.2.134 → 0.2.136

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": [
@@ -27029,6 +27136,26 @@ export const data = {
27029
27136
  }
27030
27137
  }
27031
27138
  },
27139
+ "pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Picked": {
27140
+ "type": "I",
27141
+ "fields": {
27142
+ "catalogId": {
27143
+ "type": "string"
27144
+ },
27145
+ "title": {
27146
+ "type": "string"
27147
+ },
27148
+ "price": {
27149
+ "type": "string"
27150
+ },
27151
+ "category": {
27152
+ "type": "string"
27153
+ },
27154
+ "url": {
27155
+ "type": "string"
27156
+ }
27157
+ }
27158
+ },
27032
27159
  "pushwoosh.rpc_v2.sms_presets.SmsProductsSource": {
27033
27160
  "type": "I",
27034
27161
  "fields": {
@@ -27059,6 +27186,13 @@ export const data = {
27059
27186
  "intro": {
27060
27187
  "type": "string",
27061
27188
  "mapKeyType": "string"
27189
+ },
27190
+ "mode": {
27191
+ "type": "string"
27192
+ },
27193
+ "picked": {
27194
+ "type": "pushwoosh.rpc_v2.sms_presets.SmsProductsSource.Picked",
27195
+ "array": true
27062
27196
  }
27063
27197
  }
27064
27198
  },
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.134",
3
+ "version": "0.2.136",
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
@@ -49,6 +49,17 @@ export type SmsProductsSource_Rule = {
49
49
  /** How many products the message carries, and the feed limit. */
50
50
  items: number;
51
51
  };
52
+ /**
53
+ * One hand-picked product row, frozen as the editor saw it. The fields are exactly
54
+ * the tokens an item template can spend; catalog_id backs the panel's Refresh.
55
+ */
56
+ export type SmsProductsSource_Picked = {
57
+ catalogId: string;
58
+ title: string;
59
+ price: string;
60
+ category: string;
61
+ url: string;
62
+ };
52
63
  /**
53
64
  * Catalog-driven body: the rule that picks products and the per-locale parts wrapped
54
65
  * around them. Absent means the body was written by hand.
@@ -72,6 +83,13 @@ export type SmsProductsSource = {
72
83
  fallbackMode: string;
73
84
  /** Opens the message, sent once, before the product list. */
74
85
  intro: Record<string, string>;
86
+ /**
87
+ * Where the rows come from: "manual" reads `picked`, anything else (including "")
88
+ * reads `rule`, which is what presets written before hand-picking existed carry.
89
+ */
90
+ mode: string;
91
+ /** The hand-picked rows. A send fetches nothing for them, so the segment count is exact. */
92
+ picked: SmsProductsSource_Picked[];
75
93
  };
76
94
  export type SmsPreset = {
77
95
  name: string;