@pushwoosh/rpc-v2-http-api-data 0.2.301 → 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",
@@ -10401,12 +10445,6 @@ export const data = {
10401
10445
  "fields": {
10402
10446
  "taskId": {
10403
10447
  "type": "number"
10404
- },
10405
- "confirmationRequired": {
10406
- "type": "boolean"
10407
- },
10408
- "confirmationThreshold": {
10409
- "type": "number"
10410
10448
  }
10411
10449
  }
10412
10450
  },
package/data_erasure.d.ts CHANGED
@@ -9,7 +9,7 @@ export type DataErasureService_ListTaskRows = RpcMethod<ListDataErasureTaskRowsR
9
9
  * follow it and show what it did.
10
10
  */
11
11
  export interface DataErasureService {
12
- /** Starts erasing the personal data of the listed subjects in the listed applications. Identifiers are user ids, device hwids or email addresses. With dry_run the task only counts what would be erased. Erasure is irreversible: above the threshold the call is refused until it carries the id of a finished dry run of the same scope. */
12
+ /** Starts erasing the personal data of the listed subjects in the listed applications. Identifiers are user ids, device hwids or email addresses. With dry_run the task only counts what would be erased. Erasure is irreversible: run it with dry_run first to see the volume, then repeat the call quoting that dry run in confirmation_dry_run_task_id. */
13
13
  CreateTask: DataErasureService_CreateTask;
14
14
  /** Returns one data erasure task with its status and counters: how many subjects were erased, not found or failed. Use to follow a task started by create_data_erasure_task. */
15
15
  GetTask: DataErasureService_GetTask;
@@ -30,19 +30,13 @@ export type CreateDataErasureTaskRequest = {
30
30
  /** Counts what would be erased and writes nothing. */
31
31
  dryRun?: boolean;
32
32
  /**
33
- * Id of the finished dry run that measured this erase. Required above
34
- * confirmation_threshold subjects: nobody erases a volume they have not seen.
33
+ * Optional id of the finished dry run that measured this erase. When set, the
34
+ * erase is refused unless it matches that measurement subject for subject.
35
35
  */
36
36
  confirmationDryRunTaskId?: number;
37
37
  };
38
38
  export type CreateDataErasureTaskResponse = {
39
39
  taskId: number;
40
- /**
41
- * Set when the request was refused because it erases more subjects than the
42
- * threshold and carried no matching dry run.
43
- */
44
- confirmationRequired: boolean;
45
- confirmationThreshold: number;
46
40
  };
47
41
  export type GetDataErasureTaskRequest = {
48
42
  taskId?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.301",
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",