@pushwoosh/rpc-v2-http-api-data 0.2.16 → 0.2.18

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/applications.d.ts CHANGED
@@ -15,6 +15,7 @@ export type ApplicationsService_GetControlGroupSettings = RpcMethod<GetControlGr
15
15
  export type ApplicationsService_UpdateControlGroupPercentage = RpcMethod<UpdateControlGroupPercentageRequest, UpdateControlGroupPercentageResponse>;
16
16
  export type ApplicationsService_DisableControlGroup = RpcMethod<DisableControlGroupRequest, DisableControlGroupResponse>;
17
17
  export type ApplicationsService_ForceUpdateControlGroupCalculation = RpcMethod<ForceUpdateControlGroupCalculationRequest, ForceUpdateControlGroupCalculationResponse>;
18
+ export type ApplicationsService_GetControlGroupCalculationStatus = RpcMethod<GetControlGroupCalculationStatusRequest, GetControlGroupCalculationStatusResponse>;
18
19
  export type ApplicationsService_GetDOIConfig = RpcMethod<GetDOIConfigRequest, GetDOIConfigResponse>;
19
20
  export type ApplicationsService_SetDOIConfig = RpcMethod<SetDOIConfigRequest, SetDOIConfigResponse>;
20
21
  export interface ApplicationsService {
@@ -33,6 +34,7 @@ export interface ApplicationsService {
33
34
  UpdateControlGroupPercentage: ApplicationsService_UpdateControlGroupPercentage;
34
35
  DisableControlGroup: ApplicationsService_DisableControlGroup;
35
36
  ForceUpdateControlGroupCalculation: ApplicationsService_ForceUpdateControlGroupCalculation;
37
+ GetControlGroupCalculationStatus: ApplicationsService_GetControlGroupCalculationStatus;
36
38
  GetDOIConfig: ApplicationsService_GetDOIConfig;
37
39
  SetDOIConfig: ApplicationsService_SetDOIConfig;
38
40
  }
@@ -191,6 +193,24 @@ export type ForceUpdateControlGroupCalculationRequest = {
191
193
  code?: string;
192
194
  };
193
195
  export type ForceUpdateControlGroupCalculationResponse = {};
196
+ export type GetControlGroupCalculationStatusRequest = {
197
+ code?: string;
198
+ };
199
+ /**
200
+ * GetControlGroupCalculationStatusResponse is the lightweight subset of the
201
+ * settings response that changes while a background size calculation runs.
202
+ * Clients poll this on a timer to refresh numbers in place without re-fetching
203
+ * the whole settings page.
204
+ */
205
+ export type GetControlGroupCalculationStatusResponse = {
206
+ /** All users in the application */
207
+ totalUsers: number;
208
+ /** Users with PW_ControlGroup = true */
209
+ controlGroupUsers: number;
210
+ calculationStatus: ControlGroupTaskStatus;
211
+ /** Whether cached size numbers are available */
212
+ hasData: boolean;
213
+ };
194
214
  export type ShuffleControlGroupRequest = {
195
215
  code: string;
196
216
  };
package/data.js CHANGED
@@ -2645,6 +2645,12 @@ export const data = {
2645
2645
  "method": "post",
2646
2646
  "path": "/api/applications/{code}/control_group/recalculate"
2647
2647
  },
2648
+ "GetControlGroupCalculationStatus": {
2649
+ "request": "pushwoosh.rpc_v2.applications.GetControlGroupCalculationStatusRequest",
2650
+ "response": "pushwoosh.rpc_v2.applications.GetControlGroupCalculationStatusResponse",
2651
+ "method": "get",
2652
+ "path": "/api/applications/{code}/control_group/calculation_status"
2653
+ },
2648
2654
  "GetDOIConfig": {
2649
2655
  "request": "pushwoosh.rpc_v2.applications.GetDOIConfigRequest",
2650
2656
  "response": "pushwoosh.rpc_v2.applications.GetDOIConfigResponse",
@@ -3104,6 +3110,31 @@ export const data = {
3104
3110
  "type": "I",
3105
3111
  "fields": {}
3106
3112
  },
3113
+ "pushwoosh.rpc_v2.applications.GetControlGroupCalculationStatusRequest": {
3114
+ "type": "I",
3115
+ "fields": {
3116
+ "code": {
3117
+ "type": "string"
3118
+ }
3119
+ }
3120
+ },
3121
+ "pushwoosh.rpc_v2.applications.GetControlGroupCalculationStatusResponse": {
3122
+ "type": "I",
3123
+ "fields": {
3124
+ "totalUsers": {
3125
+ "type": "number"
3126
+ },
3127
+ "controlGroupUsers": {
3128
+ "type": "number"
3129
+ },
3130
+ "calculationStatus": {
3131
+ "type": "pushwoosh.rpc_v2.applications.ControlGroupTaskStatus"
3132
+ },
3133
+ "hasData": {
3134
+ "type": "boolean"
3135
+ }
3136
+ }
3137
+ },
3107
3138
  "pushwoosh.rpc_v2.applications.ShuffleControlGroupRequest": {
3108
3139
  "type": "I",
3109
3140
  "fields": {
@@ -25655,6 +25686,79 @@ export const data = {
25655
25686
  }
25656
25687
  }
25657
25688
  },
25689
+ "pushwoosh.rpc_v2.viber_presets.ViberPresetsService": {
25690
+ "type": "S",
25691
+ "key": "viberPresets",
25692
+ "methods": {
25693
+ "List": {
25694
+ "request": "pushwoosh.rpc_v2.viber_presets.ListViberPresetsRequest",
25695
+ "response": "pushwoosh.rpc_v2.viber_presets.ListViberPresetsResponse",
25696
+ "method": "get",
25697
+ "path": "/api/viber_presets"
25698
+ }
25699
+ }
25700
+ },
25701
+ "pushwoosh.rpc_v2.viber_presets.ListViberPresetsRequest": {
25702
+ "type": "I",
25703
+ "fields": {
25704
+ "application": {
25705
+ "type": "string"
25706
+ }
25707
+ }
25708
+ },
25709
+ "pushwoosh.rpc_v2.viber_presets.ListViberPresetsResponse": {
25710
+ "type": "I",
25711
+ "fields": {
25712
+ "presets": {
25713
+ "type": "pushwoosh.rpc_v2.viber_presets.ViberPreset",
25714
+ "array": true
25715
+ }
25716
+ }
25717
+ },
25718
+ "pushwoosh.rpc_v2.viber_presets.ViberPreset": {
25719
+ "type": "I",
25720
+ "fields": {
25721
+ "code": {
25722
+ "type": "string"
25723
+ },
25724
+ "name": {
25725
+ "type": "string"
25726
+ },
25727
+ "category": {
25728
+ "type": "string"
25729
+ },
25730
+ "locales": {
25731
+ "type": "pushwoosh.rpc_v2.viber_presets.ViberPresetLocale",
25732
+ "array": true
25733
+ },
25734
+ "params": {
25735
+ "type": "pushwoosh.rpc_v2.viber_presets.ViberPresetParam",
25736
+ "array": true
25737
+ }
25738
+ }
25739
+ },
25740
+ "pushwoosh.rpc_v2.viber_presets.ViberPresetLocale": {
25741
+ "type": "I",
25742
+ "fields": {
25743
+ "lang": {
25744
+ "type": "string"
25745
+ },
25746
+ "content": {
25747
+ "type": "string"
25748
+ }
25749
+ }
25750
+ },
25751
+ "pushwoosh.rpc_v2.viber_presets.ViberPresetParam": {
25752
+ "type": "I",
25753
+ "fields": {
25754
+ "name": {
25755
+ "type": "string"
25756
+ },
25757
+ "type": {
25758
+ "type": "string"
25759
+ }
25760
+ }
25761
+ },
25658
25762
  "pushwoosh.rpc_v2.vouchers.VouchersService": {
25659
25763
  "type": "S",
25660
25764
  "key": "vouchers",
package/index.d.ts CHANGED
@@ -59,6 +59,7 @@ import { SubscriptionPromptService as pushwoosh_rpc_v2_subscription_prompt_Subsc
59
59
  import { TagsService as pushwoosh_rpc_v2_tags_TagsService } from './tags';
60
60
  import { TestDevicesService as pushwoosh_rpc_v2_test_devices_TestDevicesService } from './test_devices';
61
61
  import { UsersService as pushwoosh_rpc_v2_users_UsersService } from './users';
62
+ import { ViberPresetsService as pushwoosh_rpc_v2_viber_presets_ViberPresetsService } from './viber_presets';
62
63
  import { VouchersService as pushwoosh_rpc_v2_vouchers_VouchersService } from './vouchers';
63
64
  import { WhatsAppService as pushwoosh_rpc_v2_whatsapp_WhatsAppService } from './whatsapp';
64
65
  import { WhatsAppPresetsService as pushwoosh_rpc_v2_whatsapp_presets_WhatsAppPresetsService } from './whatsapp_presets';
@@ -124,6 +125,7 @@ export type API = {
124
125
  tags: pushwoosh_rpc_v2_tags_TagsService;
125
126
  testDevices: pushwoosh_rpc_v2_test_devices_TestDevicesService;
126
127
  users: pushwoosh_rpc_v2_users_UsersService;
128
+ viberPresets: pushwoosh_rpc_v2_viber_presets_ViberPresetsService;
127
129
  vouchers: pushwoosh_rpc_v2_vouchers_VouchersService;
128
130
  whatsApp: pushwoosh_rpc_v2_whatsapp_WhatsAppService;
129
131
  whatsAppPresets: pushwoosh_rpc_v2_whatsapp_presets_WhatsAppPresetsService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,27 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ export type ViberPresetsService_List = RpcMethod<ListViberPresetsRequest, ListViberPresetsResponse>;
3
+ export interface ViberPresetsService {
4
+ List: ViberPresetsService_List;
5
+ }
6
+ export type ListViberPresetsRequest = {
7
+ application?: string;
8
+ };
9
+ export type ListViberPresetsResponse = {
10
+ presets: ViberPreset[];
11
+ };
12
+ export type ViberPreset = {
13
+ /** MStat viber_template_id */
14
+ code: string;
15
+ name: string;
16
+ category: string;
17
+ locales: ViberPresetLocale[];
18
+ params: ViberPresetParam[];
19
+ };
20
+ export type ViberPresetLocale = {
21
+ lang: string;
22
+ content: string;
23
+ };
24
+ export type ViberPresetParam = {
25
+ name: string;
26
+ type: string;
27
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};