@pushwoosh/rpc-v2-http-api-data 0.2.302 → 0.2.303

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.
@@ -9,6 +9,7 @@ export type ApplicationsControlGroupService_ReshuffleControlGroup = RpcMethod<Re
9
9
  export type ApplicationsControlGroupService_ForceUpdateControlGroupCalculation = RpcMethod<ForceUpdateControlGroupCalculationRequest, ForceUpdateControlGroupCalculationResponse>;
10
10
  export type ApplicationsControlGroupService_GetControlGroupCalculationStatus = RpcMethod<GetControlGroupCalculationStatusRequest, GetCalculationStatusResponse>;
11
11
  export type ApplicationsControlGroupService_GetControlGroupAnalytics = RpcMethod<GetControlGroupAnalyticsRequest, GetAnalyticsResponse>;
12
+ export type ApplicationsControlGroupService_CheckControlGroupMembership = RpcMethod<CheckControlGroupMembershipRequest, CheckControlGroupMembershipResponse>;
12
13
  /**
13
14
  * Global Control Group: a hold-out of an application's users that receives no
14
15
  * marketing messages, so the effect of messaging can be measured against it.
@@ -38,6 +39,8 @@ export interface ApplicationsControlGroupService {
38
39
  GetControlGroupCalculationStatus: ApplicationsControlGroupService_GetControlGroupCalculationStatus;
39
40
  /** Returns the precomputed Control-vs-Treatment analytics for one control group. Only the default group has analytics: the nightly job still measures one hold-out per application, so any other group comes back empty until it learns about groups. */
40
41
  GetControlGroupAnalytics: ApplicationsControlGroupService_GetControlGroupAnalytics;
42
+ /** Reports for each user id whether it is held out by one control group right now. Membership is computed from the id, so this answers without reading the base: use it to check the users of a send or an import instead of exporting the whole group. */
43
+ CheckControlGroupMembership: ApplicationsControlGroupService_CheckControlGroupMembership;
41
44
  }
42
45
  export type TaskStatus = 'TASK_STATUS_UNSPECIFIED' | 'TASK_STATUS_NOT_STARTED' | 'TASK_STATUS_IN_PROGRESS' | 'TASK_STATUS_COMPLETED';
43
46
  /**
@@ -78,6 +81,11 @@ export type ControlGroup = {
78
81
  lastModifiedAt: Date;
79
82
  /** Email of the user who last changed the group. */
80
83
  lastModifiedBy: string;
84
+ /**
85
+ * Numeric id of the application, the first part of the membership key
86
+ * <application_id>:<generation>:<name>:<user_id> the hash is taken over.
87
+ */
88
+ applicationId: number;
81
89
  };
82
90
  export type ListControlGroupsRequest = {
83
91
  /** Application code (format XXXXX-XXXXX) whose control groups to list. */
@@ -191,3 +199,26 @@ export type AnalyticsEvent = {
191
199
  export type GetAnalyticsResponse = {
192
200
  events: AnalyticsEvent[];
193
201
  };
202
+ export type CheckControlGroupMembershipRequest = {
203
+ /** Application code (format XXXXX-XXXXX) the group belongs to. */
204
+ code?: string;
205
+ /** Control group code (format XXXXX-XXXXX) to check against. */
206
+ controlGroupCode?: string;
207
+ /**
208
+ * User ids to check, at most 1000 per call. An id the application has never
209
+ * seen is answered all the same: the verdict is a function of the id alone.
210
+ */
211
+ userIds?: string[];
212
+ };
213
+ /**
214
+ * UserMembership is one user's verdict. A group that is off holds nobody, so
215
+ * every id comes back false rather than as an error.
216
+ */
217
+ export type UserMembership = {
218
+ userId: string;
219
+ inControlGroup: boolean;
220
+ };
221
+ export type CheckControlGroupMembershipResponse = {
222
+ /** One entry per requested id, in the order they were given. */
223
+ users: UserMembership[];
224
+ };
package/data.js CHANGED
@@ -6916,6 +6916,12 @@ export const data = {
6916
6916
  "response": "pushwoosh.rpc_v2.applications_controlgroup.GetAnalyticsResponse",
6917
6917
  "method": "get",
6918
6918
  "path": "/api/applications/{code}/control_groups/{control_group_code}/analytics"
6919
+ },
6920
+ "CheckControlGroupMembership": {
6921
+ "request": "pushwoosh.rpc_v2.applications_controlgroup.CheckControlGroupMembershipRequest",
6922
+ "response": "pushwoosh.rpc_v2.applications_controlgroup.CheckControlGroupMembershipResponse",
6923
+ "method": "post",
6924
+ "path": "/api/applications/{code}/control_groups/{control_group_code}/membership"
6919
6925
  }
6920
6926
  }
6921
6927
  },
@@ -6980,6 +6986,9 @@ export const data = {
6980
6986
  },
6981
6987
  "lastModifiedBy": {
6982
6988
  "type": "string"
6989
+ },
6990
+ "applicationId": {
6991
+ "type": "number"
6983
6992
  }
6984
6993
  }
6985
6994
  },
@@ -7233,6 +7242,41 @@ export const data = {
7233
7242
  }
7234
7243
  }
7235
7244
  },
7245
+ "pushwoosh.rpc_v2.applications_controlgroup.CheckControlGroupMembershipRequest": {
7246
+ "type": "I",
7247
+ "fields": {
7248
+ "code": {
7249
+ "type": "string"
7250
+ },
7251
+ "controlGroupCode": {
7252
+ "type": "string"
7253
+ },
7254
+ "userIds": {
7255
+ "type": "string",
7256
+ "array": true
7257
+ }
7258
+ }
7259
+ },
7260
+ "pushwoosh.rpc_v2.applications_controlgroup.UserMembership": {
7261
+ "type": "I",
7262
+ "fields": {
7263
+ "userId": {
7264
+ "type": "string"
7265
+ },
7266
+ "inControlGroup": {
7267
+ "type": "boolean"
7268
+ }
7269
+ }
7270
+ },
7271
+ "pushwoosh.rpc_v2.applications_controlgroup.CheckControlGroupMembershipResponse": {
7272
+ "type": "I",
7273
+ "fields": {
7274
+ "users": {
7275
+ "type": "pushwoosh.rpc_v2.applications_controlgroup.UserMembership",
7276
+ "array": true
7277
+ }
7278
+ }
7279
+ },
7236
7280
  "pushwoosh.rpc_v2.applications_groups.ApplicationsGroupsService": {
7237
7281
  "type": "S",
7238
7282
  "key": "applicationsGroups",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.302",
3
+ "version": "0.2.303",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",