@pushwoosh/rpc-v2-http-api-data 0.2.411 → 0.2.413

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/catalog.d.ts +26 -0
  2. package/data.js +56 -0
  3. 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": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.411",
3
+ "version": "0.2.413",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",