@pushwoosh/rpc-v2-http-api-data 0.2.283 → 0.2.285

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
@@ -33255,6 +33255,82 @@ export const data = {
33255
33255
  "type": "I",
33256
33256
  "fields": {}
33257
33257
  },
33258
+ "pushwoosh.rpc_v2.web_sdk_config.WebSdkConfigService": {
33259
+ "type": "S",
33260
+ "key": "webSdkConfig",
33261
+ "methods": {
33262
+ "GetConfig": {
33263
+ "request": "pushwoosh.rpc_v2.web_sdk_config.GetConfigRequest",
33264
+ "response": "pushwoosh.rpc_v2.web_sdk_config.GetConfigResponse",
33265
+ "method": "get",
33266
+ "path": "/api/web_sdk/config"
33267
+ },
33268
+ "SetConfig": {
33269
+ "request": "pushwoosh.rpc_v2.web_sdk_config.SetConfigRequest",
33270
+ "response": "pushwoosh.rpc_v2.web_sdk_config.SetConfigResponse",
33271
+ "method": "post",
33272
+ "path": "/api/web_sdk/config"
33273
+ },
33274
+ "SetMode": {
33275
+ "request": "pushwoosh.rpc_v2.web_sdk_config.SetModeRequest",
33276
+ "response": "pushwoosh.rpc_v2.web_sdk_config.SetModeResponse",
33277
+ "method": "post",
33278
+ "path": "/api/web_sdk/mode"
33279
+ }
33280
+ }
33281
+ },
33282
+ "pushwoosh.rpc_v2.web_sdk_config.GetConfigRequest": {
33283
+ "type": "I",
33284
+ "fields": {
33285
+ "applicationCode": {
33286
+ "type": "string"
33287
+ }
33288
+ }
33289
+ },
33290
+ "pushwoosh.rpc_v2.web_sdk_config.GetConfigResponse": {
33291
+ "type": "I",
33292
+ "fields": {
33293
+ "mode": {
33294
+ "type": "string"
33295
+ },
33296
+ "config": {
33297
+ "type": "object"
33298
+ },
33299
+ "updated": {
33300
+ "type": "Date"
33301
+ }
33302
+ }
33303
+ },
33304
+ "pushwoosh.rpc_v2.web_sdk_config.SetConfigRequest": {
33305
+ "type": "I",
33306
+ "fields": {
33307
+ "applicationCode": {
33308
+ "type": "string"
33309
+ },
33310
+ "config": {
33311
+ "type": "object"
33312
+ }
33313
+ }
33314
+ },
33315
+ "pushwoosh.rpc_v2.web_sdk_config.SetConfigResponse": {
33316
+ "type": "I",
33317
+ "fields": {}
33318
+ },
33319
+ "pushwoosh.rpc_v2.web_sdk_config.SetModeRequest": {
33320
+ "type": "I",
33321
+ "fields": {
33322
+ "applicationCode": {
33323
+ "type": "string"
33324
+ },
33325
+ "mode": {
33326
+ "type": "string"
33327
+ }
33328
+ }
33329
+ },
33330
+ "pushwoosh.rpc_v2.web_sdk_config.SetModeResponse": {
33331
+ "type": "I",
33332
+ "fields": {}
33333
+ },
33258
33334
  "pushwoosh.rpc_v2.whatsapp.WhatsAppService": {
33259
33335
  "type": "S",
33260
33336
  "key": "whatsApp",
package/index.d.ts CHANGED
@@ -69,6 +69,7 @@ import { TestDevicesService as pushwoosh_rpc_v2_test_devices_TestDevicesService
69
69
  import { UsersService as pushwoosh_rpc_v2_users_UsersService } from './users';
70
70
  import { ViberPresetsService as pushwoosh_rpc_v2_viber_presets_ViberPresetsService } from './viber_presets';
71
71
  import { VouchersService as pushwoosh_rpc_v2_vouchers_VouchersService } from './vouchers';
72
+ import { WebSdkConfigService as pushwoosh_rpc_v2_web_sdk_config_WebSdkConfigService } from './web_sdk_config';
72
73
  import { WhatsAppService as pushwoosh_rpc_v2_whatsapp_WhatsAppService } from './whatsapp';
73
74
  import { WhatsAppPresetsService as pushwoosh_rpc_v2_whatsapp_presets_WhatsAppPresetsService } from './whatsapp_presets';
74
75
  export type API = {
@@ -143,6 +144,7 @@ export type API = {
143
144
  users: pushwoosh_rpc_v2_users_UsersService;
144
145
  viberPresets: pushwoosh_rpc_v2_viber_presets_ViberPresetsService;
145
146
  vouchers: pushwoosh_rpc_v2_vouchers_VouchersService;
147
+ webSdkConfig: pushwoosh_rpc_v2_web_sdk_config_WebSdkConfigService;
146
148
  whatsApp: pushwoosh_rpc_v2_whatsapp_WhatsAppService;
147
149
  whatsAppPresets: pushwoosh_rpc_v2_whatsapp_presets_WhatsAppPresetsService;
148
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.283",
3
+ "version": "0.2.285",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,37 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ export type WebSdkConfigService_GetConfig = RpcMethod<GetConfigRequest, GetConfigResponse>;
3
+ export type WebSdkConfigService_SetConfig = RpcMethod<SetConfigRequest, SetConfigResponse>;
4
+ export type WebSdkConfigService_SetMode = RpcMethod<SetModeRequest, SetModeResponse>;
5
+ export interface WebSdkConfigService {
6
+ /** Returns the Web SDK configuration of an application and the mode telling whether that configuration is applied (managed) or the site keeps using its own init snippet (legacy). Use to inspect what the Control Panel sends to the Web SDK. */
7
+ GetConfig: WebSdkConfigService_GetConfig;
8
+ /** Creates or overwrites the Web SDK configuration of an application, leaving the mode untouched. Use to change the settings the Web SDK reads instead of its init snippet; set_web_sdk_mode decides whether they apply. */
9
+ SetConfig: WebSdkConfigService_SetConfig;
10
+ /** Switches an application between legacy (settings come from the site's init snippet) and managed (settings come from the Control Panel). Use to roll the panel configuration out to a site, or to roll it back without a release. */
11
+ SetMode: WebSdkConfigService_SetMode;
12
+ }
13
+ export type GetConfigRequest = {
14
+ /** Application code (XXXXX-XXXXX) whose Web SDK configuration is read. */
15
+ applicationCode?: string;
16
+ };
17
+ export type GetConfigResponse = {
18
+ /** Either legacy or managed. */
19
+ mode: string;
20
+ /** Web SDK settings keyed by init parameter name; empty when nothing was saved yet. */
21
+ config: object;
22
+ updated: Date;
23
+ };
24
+ export type SetConfigRequest = {
25
+ /** Application code (XXXXX-XXXXX) whose Web SDK configuration is written. */
26
+ applicationCode?: string;
27
+ /** Web SDK settings keyed by init parameter name, as the SDK names them: subscribeWidget, autoSubscribe, defaultNotificationTitle, defaultNotificationImage, safariWebsitePushID. */
28
+ config?: object;
29
+ };
30
+ export type SetConfigResponse = {};
31
+ export type SetModeRequest = {
32
+ /** Application code (XXXXX-XXXXX) whose Web SDK mode is switched. */
33
+ applicationCode?: string;
34
+ /** Mode to apply: legacy or managed. */
35
+ mode?: string;
36
+ };
37
+ export type SetModeResponse = {};
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};