@pushwoosh/rpc-v2-http-api-data 0.2.412 → 0.2.414

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 (4) hide show
  1. package/catalog.d.ts +26 -0
  2. package/data.js +265 -7
  3. package/news.d.ts +109 -7
  4. package/package.json +1 -1
package/catalog.d.ts CHANGED
@@ -10,6 +10,8 @@ export type CatalogService_GetFeed = RpcMethod<GetFeedRequest, GetFeedResponse>;
10
10
  export type CatalogService_SetFeed = RpcMethod<SetFeedRequest, SetFeedResponse>;
11
11
  export type CatalogService_DeleteFeed = RpcMethod<DeleteFeedRequest, DeleteFeedResponse>;
12
12
  export type CatalogService_SyncFeed = RpcMethod<SyncFeedRequest, SyncFeedResponse>;
13
+ export type CatalogService_GetOnsiteRecommendations = RpcMethod<GetOnsiteRecommendationsRequest, GetOnsiteRecommendationsResponse>;
14
+ export type CatalogService_SetOnsiteRecommendations = RpcMethod<SetOnsiteRecommendationsRequest, SetOnsiteRecommendationsResponse>;
13
15
  /**
14
16
  * CatalogService manages the per-application product catalog used by email
15
17
  * product blocks. Proxies to the catalog backend (recommender-api).
@@ -37,6 +39,10 @@ export interface CatalogService {
37
39
  DeleteFeed: CatalogService_DeleteFeed;
38
40
  /** Starts a merchant-feed sync of an application (code XXXXX-XXXXX) catalog in the background. Returns started=false when a sync is already running. Poll get_catalog_feed for the outcome. */
39
41
  SyncFeed: CatalogService_SyncFeed;
42
+ /** Returns whether on-site recommendations are on for an application (code XXXXX-XXXXX): the public feed the Web SDK widget reads on the shop's own pages, and the shop origins allowed to show it. */
43
+ GetOnsiteRecommendations: CatalogService_GetOnsiteRecommendations;
44
+ /** Turns on-site recommendations on or off for an application (code XXXXX-XXXXX) and sets the shop origins (https://shop.example, up to 20) allowed to show them; an empty list allows any origin. Turning them off keeps the origins. */
45
+ SetOnsiteRecommendations: CatalogService_SetOnsiteRecommendations;
40
46
  }
41
47
  export type Product = {
42
48
  /** Unique product id within the application catalog (SKU or external id). */
@@ -174,6 +180,26 @@ export type SetFeedRequest = {
174
180
  url?: string;
175
181
  };
176
182
  export type SetFeedResponse = {};
183
+ export type GetOnsiteRecommendationsRequest = {
184
+ /** Pushwoosh application code (XXXXX-XXXXX). */
185
+ applicationCode?: string;
186
+ };
187
+ export type GetOnsiteRecommendationsResponse = {
188
+ enabled: boolean;
189
+ /** Shop origins allowed to show the blocks, normalised to scheme://host[:port]; empty means any. */
190
+ origins: string[];
191
+ };
192
+ export type SetOnsiteRecommendationsRequest = {
193
+ /** Pushwoosh application code (XXXXX-XXXXX). */
194
+ applicationCode?: string;
195
+ enabled?: boolean;
196
+ /** Shop origins or bare domains (https://shop.example, shop.example); up to 20, empty means any. */
197
+ origins?: string[];
198
+ };
199
+ export type SetOnsiteRecommendationsResponse = {
200
+ /** The origins as stored: normalised, deduplicated, IDN hosts in punycode. */
201
+ origins: string[];
202
+ };
177
203
  export type DeleteFeedRequest = {
178
204
  /** Pushwoosh application code (XXXXX-XXXXX). */
179
205
  applicationCode?: string;
package/data.js CHANGED
@@ -9148,6 +9148,18 @@ export const data = {
9148
9148
  "response": "pushwoosh.rpc_v2.catalog.SyncFeedResponse",
9149
9149
  "method": "post",
9150
9150
  "path": "/api/catalog/feed:sync"
9151
+ },
9152
+ "GetOnsiteRecommendations": {
9153
+ "request": "pushwoosh.rpc_v2.catalog.GetOnsiteRecommendationsRequest",
9154
+ "response": "pushwoosh.rpc_v2.catalog.GetOnsiteRecommendationsResponse",
9155
+ "method": "get",
9156
+ "path": "/api/catalog/onsite"
9157
+ },
9158
+ "SetOnsiteRecommendations": {
9159
+ "request": "pushwoosh.rpc_v2.catalog.SetOnsiteRecommendationsRequest",
9160
+ "response": "pushwoosh.rpc_v2.catalog.SetOnsiteRecommendationsResponse",
9161
+ "method": "post",
9162
+ "path": "/api/catalog/onsite"
9151
9163
  }
9152
9164
  }
9153
9165
  },
@@ -9444,6 +9456,50 @@ export const data = {
9444
9456
  "type": "I",
9445
9457
  "fields": {}
9446
9458
  },
9459
+ "pushwoosh.rpc_v2.catalog.GetOnsiteRecommendationsRequest": {
9460
+ "type": "I",
9461
+ "fields": {
9462
+ "applicationCode": {
9463
+ "type": "string"
9464
+ }
9465
+ }
9466
+ },
9467
+ "pushwoosh.rpc_v2.catalog.GetOnsiteRecommendationsResponse": {
9468
+ "type": "I",
9469
+ "fields": {
9470
+ "enabled": {
9471
+ "type": "boolean"
9472
+ },
9473
+ "origins": {
9474
+ "type": "string",
9475
+ "array": true
9476
+ }
9477
+ }
9478
+ },
9479
+ "pushwoosh.rpc_v2.catalog.SetOnsiteRecommendationsRequest": {
9480
+ "type": "I",
9481
+ "fields": {
9482
+ "applicationCode": {
9483
+ "type": "string"
9484
+ },
9485
+ "enabled": {
9486
+ "type": "boolean"
9487
+ },
9488
+ "origins": {
9489
+ "type": "string",
9490
+ "array": true
9491
+ }
9492
+ }
9493
+ },
9494
+ "pushwoosh.rpc_v2.catalog.SetOnsiteRecommendationsResponse": {
9495
+ "type": "I",
9496
+ "fields": {
9497
+ "origins": {
9498
+ "type": "string",
9499
+ "array": true
9500
+ }
9501
+ }
9502
+ },
9447
9503
  "pushwoosh.rpc_v2.catalog.DeleteFeedRequest": {
9448
9504
  "type": "I",
9449
9505
  "fields": {
@@ -24953,6 +25009,36 @@ export const data = {
24953
25009
  "response": "pushwoosh.rpc_v2.news.DeleteNewsFeedResponse",
24954
25010
  "method": "post",
24955
25011
  "path": "/api/news/feeds:delete"
25012
+ },
25013
+ "ListNewsFeedCampaigns": {
25014
+ "request": "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsRequest",
25015
+ "response": "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsResponse",
25016
+ "method": "get",
25017
+ "path": "/api/news/campaigns"
25018
+ },
25019
+ "GetNewsFeedCampaign": {
25020
+ "request": "pushwoosh.rpc_v2.news.GetNewsFeedCampaignRequest",
25021
+ "response": "pushwoosh.rpc_v2.news.GetNewsFeedCampaignResponse",
25022
+ "method": "get",
25023
+ "path": "/api/news/campaigns/{code}"
25024
+ },
25025
+ "SetNewsFeedCampaign": {
25026
+ "request": "pushwoosh.rpc_v2.news.SetNewsFeedCampaignRequest",
25027
+ "response": "pushwoosh.rpc_v2.news.SetNewsFeedCampaignResponse",
25028
+ "method": "post",
25029
+ "path": "/api/news/campaigns"
25030
+ },
25031
+ "SetNewsFeedCampaignStatus": {
25032
+ "request": "pushwoosh.rpc_v2.news.SetNewsFeedCampaignStatusRequest",
25033
+ "response": "pushwoosh.rpc_v2.news.SetNewsFeedCampaignStatusResponse",
25034
+ "method": "post",
25035
+ "path": "/api/news/campaigns/{code}:status"
25036
+ },
25037
+ "DeleteNewsFeedCampaign": {
25038
+ "request": "pushwoosh.rpc_v2.news.DeleteNewsFeedCampaignRequest",
25039
+ "response": "pushwoosh.rpc_v2.news.DeleteNewsFeedCampaignResponse",
25040
+ "method": "post",
25041
+ "path": "/api/news/campaigns:delete"
24956
25042
  }
24957
25043
  }
24958
25044
  },
@@ -24992,9 +25078,6 @@ export const data = {
24992
25078
  },
24993
25079
  "syncIntervalMinutes": {
24994
25080
  "type": "number"
24995
- },
24996
- "journeyUuid": {
24997
- "type": "string"
24998
25081
  }
24999
25082
  }
25000
25083
  },
@@ -25036,10 +25119,6 @@ export const data = {
25036
25119
  "syncIntervalMinutes": {
25037
25120
  "type": "number",
25038
25121
  "optional": true
25039
- },
25040
- "journeyUuid": {
25041
- "type": "string",
25042
- "optional": true
25043
25122
  }
25044
25123
  }
25045
25124
  },
@@ -25066,6 +25145,185 @@ export const data = {
25066
25145
  "type": "I",
25067
25146
  "fields": {}
25068
25147
  },
25148
+ "pushwoosh.rpc_v2.news.NewsFeedCampaign": {
25149
+ "type": "I",
25150
+ "fields": {
25151
+ "code": {
25152
+ "type": "string"
25153
+ },
25154
+ "feedCode": {
25155
+ "type": "string"
25156
+ },
25157
+ "name": {
25158
+ "type": "string"
25159
+ },
25160
+ "status": {
25161
+ "type": "string"
25162
+ },
25163
+ "push": {
25164
+ "type": "boolean"
25165
+ },
25166
+ "inbox": {
25167
+ "type": "boolean"
25168
+ },
25169
+ "filterCode": {
25170
+ "type": "string"
25171
+ },
25172
+ "inboxExpiresInDays": {
25173
+ "type": "number",
25174
+ "optional": true
25175
+ },
25176
+ "maxArticles": {
25177
+ "type": "number"
25178
+ },
25179
+ "ttlSeconds": {
25180
+ "type": "number",
25181
+ "optional": true
25182
+ },
25183
+ "sendRate": {
25184
+ "type": "number",
25185
+ "optional": true
25186
+ },
25187
+ "campaignCode": {
25188
+ "type": "string"
25189
+ },
25190
+ "lastSentAt": {
25191
+ "type": "Date",
25192
+ "optional": true
25193
+ },
25194
+ "lastSentTitle": {
25195
+ "type": "string"
25196
+ },
25197
+ "created": {
25198
+ "type": "Date"
25199
+ },
25200
+ "updated": {
25201
+ "type": "Date"
25202
+ }
25203
+ }
25204
+ },
25205
+ "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsRequest": {
25206
+ "type": "I",
25207
+ "fields": {
25208
+ "applicationCode": {
25209
+ "type": "string"
25210
+ }
25211
+ }
25212
+ },
25213
+ "pushwoosh.rpc_v2.news.ListNewsFeedCampaignsResponse": {
25214
+ "type": "I",
25215
+ "fields": {
25216
+ "campaigns": {
25217
+ "type": "pushwoosh.rpc_v2.news.NewsFeedCampaign",
25218
+ "array": true
25219
+ }
25220
+ }
25221
+ },
25222
+ "pushwoosh.rpc_v2.news.GetNewsFeedCampaignRequest": {
25223
+ "type": "I",
25224
+ "fields": {
25225
+ "applicationCode": {
25226
+ "type": "string"
25227
+ },
25228
+ "code": {
25229
+ "type": "string"
25230
+ }
25231
+ }
25232
+ },
25233
+ "pushwoosh.rpc_v2.news.GetNewsFeedCampaignResponse": {
25234
+ "type": "I",
25235
+ "fields": {
25236
+ "campaign": {
25237
+ "type": "pushwoosh.rpc_v2.news.NewsFeedCampaign"
25238
+ }
25239
+ }
25240
+ },
25241
+ "pushwoosh.rpc_v2.news.SetNewsFeedCampaignRequest": {
25242
+ "type": "I",
25243
+ "fields": {
25244
+ "applicationCode": {
25245
+ "type": "string"
25246
+ },
25247
+ "code": {
25248
+ "type": "string"
25249
+ },
25250
+ "feedCode": {
25251
+ "type": "string"
25252
+ },
25253
+ "name": {
25254
+ "type": "string"
25255
+ },
25256
+ "push": {
25257
+ "type": "boolean"
25258
+ },
25259
+ "inbox": {
25260
+ "type": "boolean"
25261
+ },
25262
+ "filterCode": {
25263
+ "type": "string"
25264
+ },
25265
+ "inboxExpiresInDays": {
25266
+ "type": "number",
25267
+ "optional": true
25268
+ },
25269
+ "maxArticles": {
25270
+ "type": "number"
25271
+ },
25272
+ "ttlSeconds": {
25273
+ "type": "number",
25274
+ "optional": true
25275
+ },
25276
+ "sendRate": {
25277
+ "type": "number",
25278
+ "optional": true
25279
+ }
25280
+ }
25281
+ },
25282
+ "pushwoosh.rpc_v2.news.SetNewsFeedCampaignResponse": {
25283
+ "type": "I",
25284
+ "fields": {
25285
+ "campaign": {
25286
+ "type": "pushwoosh.rpc_v2.news.NewsFeedCampaign"
25287
+ }
25288
+ }
25289
+ },
25290
+ "pushwoosh.rpc_v2.news.SetNewsFeedCampaignStatusRequest": {
25291
+ "type": "I",
25292
+ "fields": {
25293
+ "applicationCode": {
25294
+ "type": "string"
25295
+ },
25296
+ "code": {
25297
+ "type": "string"
25298
+ },
25299
+ "status": {
25300
+ "type": "string"
25301
+ }
25302
+ }
25303
+ },
25304
+ "pushwoosh.rpc_v2.news.SetNewsFeedCampaignStatusResponse": {
25305
+ "type": "I",
25306
+ "fields": {
25307
+ "campaign": {
25308
+ "type": "pushwoosh.rpc_v2.news.NewsFeedCampaign"
25309
+ }
25310
+ }
25311
+ },
25312
+ "pushwoosh.rpc_v2.news.DeleteNewsFeedCampaignRequest": {
25313
+ "type": "I",
25314
+ "fields": {
25315
+ "applicationCode": {
25316
+ "type": "string"
25317
+ },
25318
+ "code": {
25319
+ "type": "string"
25320
+ }
25321
+ }
25322
+ },
25323
+ "pushwoosh.rpc_v2.news.DeleteNewsFeedCampaignResponse": {
25324
+ "type": "I",
25325
+ "fields": {}
25326
+ },
25069
25327
  "pushwoosh.objects.filters.v1.LogicExpression.Binary.Operator": {
25070
25328
  "type": "E",
25071
25329
  "values": [
package/news.d.ts CHANGED
@@ -2,6 +2,11 @@ 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_ListNewsFeedCampaigns = RpcMethod<ListNewsFeedCampaignsRequest, ListNewsFeedCampaignsResponse>;
6
+ export type NewsService_GetNewsFeedCampaign = RpcMethod<GetNewsFeedCampaignRequest, GetNewsFeedCampaignResponse>;
7
+ export type NewsService_SetNewsFeedCampaign = RpcMethod<SetNewsFeedCampaignRequest, SetNewsFeedCampaignResponse>;
8
+ export type NewsService_SetNewsFeedCampaignStatus = RpcMethod<SetNewsFeedCampaignStatusRequest, SetNewsFeedCampaignStatusResponse>;
9
+ export type NewsService_DeleteNewsFeedCampaign = RpcMethod<DeleteNewsFeedCampaignRequest, DeleteNewsFeedCampaignResponse>;
5
10
  /**
6
11
  * NewsService manages the registry of news feeds an application's email news
7
12
  * blocks read from. Feeds are imported on their own interval by uds/rss-feeds.
@@ -13,6 +18,16 @@ export interface NewsService {
13
18
  SetNewsFeed: NewsService_SetNewsFeed;
14
19
  /** Removes a news feed of an application (code XXXXX-XXXXX) from the registry. Its already imported articles are deleted by the next import run. */
15
20
  DeleteNewsFeed: NewsService_DeleteNewsFeed;
21
+ /** 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
+ ListNewsFeedCampaigns: NewsService_ListNewsFeedCampaigns;
23
+ /** Returns one feed campaign of an application (code XXXXX-XXXXX) by its code, for the edit form. */
24
+ GetNewsFeedCampaign: NewsService_GetNewsFeedCampaign;
25
+ /** Creates a feed campaign for an application (code XXXXX-XXXXX), or replaces the definition of one when code is given. A new campaign is active at once: the next check of its feed sends the articles that arrive from now on. The whole definition is sent every time. */
26
+ SetNewsFeedCampaign: NewsService_SetNewsFeedCampaign;
27
+ /** Pauses or resumes a feed campaign of an application (code XXXXX-XXXXX). An inactive campaign skips the articles that arrive meanwhile; they are not sent on resume. */
28
+ SetNewsFeedCampaignStatus: NewsService_SetNewsFeedCampaignStatus;
29
+ /** Deletes a feed campaign of an application (code XXXXX-XXXXX) together with its statistics campaign. Messages already sent stay in the history. */
30
+ DeleteNewsFeedCampaign: NewsService_DeleteNewsFeedCampaign;
16
31
  }
17
32
  export type NewsFeed = {
18
33
  /** Stable feed id; an email block references the feed by this code. */
@@ -35,8 +50,6 @@ export type NewsFeed = {
35
50
  lastSyncedArticles: number;
36
51
  /** Minutes between imports of this feed. */
37
52
  syncIntervalMinutes: number;
38
- /** Journey started for every new article through its API-based entry point; empty when none. */
39
- journeyUuid: string;
40
53
  };
41
54
  export type ListNewsFeedsRequest = {
42
55
  /** Pushwoosh application code (XXXXX-XXXXX). */
@@ -56,11 +69,6 @@ export type SetNewsFeedRequest = {
56
69
  enabled?: boolean;
57
70
  /** Minutes between imports, 1..60. Absent keeps the stored value (60 for a new feed). */
58
71
  syncIntervalMinutes?: number;
59
- /**
60
- * Journey to start for every new article: the application's own, with an API-based entry point.
61
- * Absent keeps the stored link, empty removes it.
62
- */
63
- journeyUuid?: string;
64
72
  };
65
73
  export type SetNewsFeedResponse = {
66
74
  feed: NewsFeed;
@@ -71,3 +79,97 @@ export type DeleteNewsFeedRequest = {
71
79
  code?: string;
72
80
  };
73
81
  export type DeleteNewsFeedResponse = {};
82
+ /**
83
+ * NewsFeedCampaign sends every new article of a news feed to an audience as a push
84
+ * and/or an App Inbox message; the article is the content, the campaign is the delivery rules.
85
+ */
86
+ export type NewsFeedCampaign = {
87
+ /** Stable campaign id. */
88
+ code: string;
89
+ /** Feed whose new articles the campaign sends. */
90
+ feedCode: string;
91
+ name: string;
92
+ /**
93
+ * "active" | "inactive". A failing feed import pauses sending by itself without changing this;
94
+ * see the feed's last_status.
95
+ */
96
+ status: string;
97
+ /** Send a push notification per article. */
98
+ push: boolean;
99
+ /** Leave an App Inbox entry per article: attached to the push, or standalone when push is off. */
100
+ inbox: boolean;
101
+ /** Audience segment; empty sends to all subscribers of the application. */
102
+ filterCode: string;
103
+ /** Days an inbox entry stays after the send; absent leaves the platform default. */
104
+ inboxExpiresInDays?: number;
105
+ /** How many new articles one feed check may send, newest first, a minute apart. */
106
+ maxArticles: number;
107
+ /** Push time to live in seconds; absent leaves the platform default. */
108
+ ttlSeconds?: number;
109
+ /** Messages per second; absent uses the account send rate. */
110
+ sendRate?: number;
111
+ /** Statistics campaign the messages are counted under. */
112
+ campaignCode: string;
113
+ /** When the last article went out and what it was. Absent before the first send. */
114
+ lastSentAt?: Date;
115
+ lastSentTitle: string;
116
+ created: Date;
117
+ updated: Date;
118
+ };
119
+ export type ListNewsFeedCampaignsRequest = {
120
+ /** Pushwoosh application code (XXXXX-XXXXX). */
121
+ applicationCode?: string;
122
+ };
123
+ export type ListNewsFeedCampaignsResponse = {
124
+ campaigns: NewsFeedCampaign[];
125
+ };
126
+ export type GetNewsFeedCampaignRequest = {
127
+ /** Pushwoosh application code (XXXXX-XXXXX). */
128
+ applicationCode?: string;
129
+ code?: string;
130
+ };
131
+ export type GetNewsFeedCampaignResponse = {
132
+ campaign: NewsFeedCampaign;
133
+ };
134
+ export type SetNewsFeedCampaignRequest = {
135
+ /** Pushwoosh application code (XXXXX-XXXXX). */
136
+ applicationCode?: string;
137
+ /** Empty creates a campaign; a code replaces that campaign's definition. */
138
+ code?: string;
139
+ /** One of the application's news feeds. */
140
+ feedCode?: string;
141
+ name?: string;
142
+ /** At least one of push and inbox. */
143
+ push?: boolean;
144
+ /** Needs App Inbox integrated in the application. */
145
+ inbox?: boolean;
146
+ /** Segment of the application or of the account; empty means all subscribers. */
147
+ filterCode?: string;
148
+ /** 1..365, only with inbox. Absent leaves the platform default. */
149
+ inboxExpiresInDays?: number;
150
+ /** 1..10; 0 means 1. */
151
+ maxArticles?: number;
152
+ /** 1..2419200 (28 days), only with push. Absent leaves the platform default. */
153
+ ttlSeconds?: number;
154
+ /** 1..10000 messages per second. Absent uses the account send rate. */
155
+ sendRate?: number;
156
+ };
157
+ export type SetNewsFeedCampaignResponse = {
158
+ campaign: NewsFeedCampaign;
159
+ };
160
+ export type SetNewsFeedCampaignStatusRequest = {
161
+ /** Pushwoosh application code (XXXXX-XXXXX). */
162
+ applicationCode?: string;
163
+ code?: string;
164
+ /** "active" | "inactive". */
165
+ status?: string;
166
+ };
167
+ export type SetNewsFeedCampaignStatusResponse = {
168
+ campaign: NewsFeedCampaign;
169
+ };
170
+ export type DeleteNewsFeedCampaignRequest = {
171
+ /** Pushwoosh application code (XXXXX-XXXXX). */
172
+ applicationCode?: string;
173
+ code?: string;
174
+ };
175
+ export type DeleteNewsFeedCampaignResponse = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.412",
3
+ "version": "0.2.414",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",