@pushwoosh/rpc-v2-http-api-data 0.2.442 → 0.2.444
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 +144 -0
- package/filters.d.ts +64 -1
- package/package.json +1 -1
package/data.js
CHANGED
|
@@ -18994,6 +18994,24 @@ export const data = {
|
|
|
18994
18994
|
"method": "delete",
|
|
18995
18995
|
"path": "/api/v2/filters/{filter}"
|
|
18996
18996
|
},
|
|
18997
|
+
"DeleteFilters": {
|
|
18998
|
+
"request": "pushwoosh.rpc_v2.filters.DeleteFiltersRequest",
|
|
18999
|
+
"response": "pushwoosh.rpc_v2.filters.DeleteFiltersResponse",
|
|
19000
|
+
"method": "post",
|
|
19001
|
+
"path": "/api/filters:delete"
|
|
19002
|
+
},
|
|
19003
|
+
"GetFiltersUsage": {
|
|
19004
|
+
"request": "pushwoosh.rpc_v2.filters.GetFiltersUsageRequest",
|
|
19005
|
+
"response": "pushwoosh.rpc_v2.filters.GetFiltersUsageResponse",
|
|
19006
|
+
"method": "post",
|
|
19007
|
+
"path": "/api/filters:usage"
|
|
19008
|
+
},
|
|
19009
|
+
"CompileFilters": {
|
|
19010
|
+
"request": "pushwoosh.rpc_v2.filters.CompileFiltersRequest",
|
|
19011
|
+
"response": "pushwoosh.rpc_v2.filters.CompileFiltersResponse",
|
|
19012
|
+
"method": "post",
|
|
19013
|
+
"path": "/api/filters:compile"
|
|
19014
|
+
},
|
|
18997
19015
|
"GetCountryCities": {
|
|
18998
19016
|
"request": "pushwoosh.rpc_v2.filters.GetCountryCitiesRequest",
|
|
18999
19017
|
"response": "pushwoosh.rpc_v2.filters.GetCountryCitiesResponse",
|
|
@@ -19325,6 +19343,132 @@ export const data = {
|
|
|
19325
19343
|
"type": "I",
|
|
19326
19344
|
"fields": {}
|
|
19327
19345
|
},
|
|
19346
|
+
"pushwoosh.rpc_v2.filters.DeleteFiltersRequest": {
|
|
19347
|
+
"type": "I",
|
|
19348
|
+
"fields": {
|
|
19349
|
+
"application": {
|
|
19350
|
+
"type": "string"
|
|
19351
|
+
},
|
|
19352
|
+
"codes": {
|
|
19353
|
+
"type": "string",
|
|
19354
|
+
"array": true
|
|
19355
|
+
},
|
|
19356
|
+
"stopCampaigns": {
|
|
19357
|
+
"type": "boolean"
|
|
19358
|
+
}
|
|
19359
|
+
}
|
|
19360
|
+
},
|
|
19361
|
+
"pushwoosh.rpc_v2.filters.DeleteFiltersResponse": {
|
|
19362
|
+
"type": "I",
|
|
19363
|
+
"fields": {}
|
|
19364
|
+
},
|
|
19365
|
+
"pushwoosh.rpc_v2.filters.GetFiltersUsageRequest": {
|
|
19366
|
+
"type": "I",
|
|
19367
|
+
"fields": {
|
|
19368
|
+
"application": {
|
|
19369
|
+
"type": "string"
|
|
19370
|
+
},
|
|
19371
|
+
"codes": {
|
|
19372
|
+
"type": "string",
|
|
19373
|
+
"array": true
|
|
19374
|
+
}
|
|
19375
|
+
}
|
|
19376
|
+
},
|
|
19377
|
+
"pushwoosh.rpc_v2.filters.FilterUser.Kind": {
|
|
19378
|
+
"type": "E",
|
|
19379
|
+
"values": [
|
|
19380
|
+
"KIND_UNSPECIFIED",
|
|
19381
|
+
"KIND_PRESET",
|
|
19382
|
+
"KIND_POPUP",
|
|
19383
|
+
"KIND_NEWS_CAMPAIGN",
|
|
19384
|
+
"KIND_RSS_FEED",
|
|
19385
|
+
"KIND_FEATURE_FLAG",
|
|
19386
|
+
"KIND_EXTERNAL_SEGMENT",
|
|
19387
|
+
"KIND_SEGMENT",
|
|
19388
|
+
"KIND_DASHBOARD_WIDGET",
|
|
19389
|
+
"KIND_JOURNEY",
|
|
19390
|
+
"KIND_MESSAGE",
|
|
19391
|
+
"KIND_IN_APP"
|
|
19392
|
+
]
|
|
19393
|
+
},
|
|
19394
|
+
"pushwoosh.rpc_v2.filters.FilterUser": {
|
|
19395
|
+
"type": "I",
|
|
19396
|
+
"fields": {
|
|
19397
|
+
"kind": {
|
|
19398
|
+
"type": "pushwoosh.rpc_v2.filters.FilterUser.Kind"
|
|
19399
|
+
},
|
|
19400
|
+
"code": {
|
|
19401
|
+
"type": "string"
|
|
19402
|
+
},
|
|
19403
|
+
"name": {
|
|
19404
|
+
"type": "string"
|
|
19405
|
+
}
|
|
19406
|
+
}
|
|
19407
|
+
},
|
|
19408
|
+
"pushwoosh.rpc_v2.filters.FilterUsage": {
|
|
19409
|
+
"type": "I",
|
|
19410
|
+
"fields": {
|
|
19411
|
+
"code": {
|
|
19412
|
+
"type": "string"
|
|
19413
|
+
},
|
|
19414
|
+
"name": {
|
|
19415
|
+
"type": "string"
|
|
19416
|
+
},
|
|
19417
|
+
"blockers": {
|
|
19418
|
+
"type": "pushwoosh.rpc_v2.filters.FilterUser",
|
|
19419
|
+
"array": true
|
|
19420
|
+
},
|
|
19421
|
+
"stops": {
|
|
19422
|
+
"type": "pushwoosh.rpc_v2.filters.FilterUser",
|
|
19423
|
+
"array": true
|
|
19424
|
+
},
|
|
19425
|
+
"detaches": {
|
|
19426
|
+
"type": "pushwoosh.rpc_v2.filters.FilterUser",
|
|
19427
|
+
"array": true
|
|
19428
|
+
}
|
|
19429
|
+
}
|
|
19430
|
+
},
|
|
19431
|
+
"pushwoosh.rpc_v2.filters.GetFiltersUsageResponse": {
|
|
19432
|
+
"type": "I",
|
|
19433
|
+
"fields": {
|
|
19434
|
+
"usages": {
|
|
19435
|
+
"type": "pushwoosh.rpc_v2.filters.FilterUsage",
|
|
19436
|
+
"array": true
|
|
19437
|
+
},
|
|
19438
|
+
"campaigns": {
|
|
19439
|
+
"type": "pushwoosh.rpc_v2.filters.GetFilterUsageResponse"
|
|
19440
|
+
}
|
|
19441
|
+
}
|
|
19442
|
+
},
|
|
19443
|
+
"pushwoosh.rpc_v2.filters.CompileFiltersRequest": {
|
|
19444
|
+
"type": "I",
|
|
19445
|
+
"fields": {
|
|
19446
|
+
"application": {
|
|
19447
|
+
"type": "string"
|
|
19448
|
+
},
|
|
19449
|
+
"codes": {
|
|
19450
|
+
"type": "string",
|
|
19451
|
+
"array": true
|
|
19452
|
+
}
|
|
19453
|
+
}
|
|
19454
|
+
},
|
|
19455
|
+
"pushwoosh.rpc_v2.filters.CompileFiltersResponse": {
|
|
19456
|
+
"type": "I",
|
|
19457
|
+
"fields": {
|
|
19458
|
+
"started": {
|
|
19459
|
+
"type": "string",
|
|
19460
|
+
"array": true
|
|
19461
|
+
},
|
|
19462
|
+
"running": {
|
|
19463
|
+
"type": "string",
|
|
19464
|
+
"array": true
|
|
19465
|
+
},
|
|
19466
|
+
"deferred": {
|
|
19467
|
+
"type": "string",
|
|
19468
|
+
"array": true
|
|
19469
|
+
}
|
|
19470
|
+
}
|
|
19471
|
+
},
|
|
19328
19472
|
"pushwoosh.rpc_v2.filters.GetCountryCitiesRequest": {
|
|
19329
19473
|
"type": "I",
|
|
19330
19474
|
"fields": {
|
package/filters.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ export type FiltersService_Clone = RpcMethod<CloneFilterRequest, CloneFilterResp
|
|
|
7
7
|
export type FiltersService_Update = RpcMethod<UpdateFilterRequest, UpdateFilterResponse>;
|
|
8
8
|
export type FiltersService_Delete = RpcMethod<DeleteFilterRequest, DeleteFilterResponse>;
|
|
9
9
|
export type FiltersService_DeleteV2 = RpcMethod<DeleteFilterRequest, DeleteFilterResponse>;
|
|
10
|
+
export type FiltersService_DeleteFilters = RpcMethod<DeleteFiltersRequest, DeleteFiltersResponse>;
|
|
11
|
+
export type FiltersService_GetFiltersUsage = RpcMethod<GetFiltersUsageRequest, GetFiltersUsageResponse>;
|
|
12
|
+
export type FiltersService_CompileFilters = RpcMethod<CompileFiltersRequest, CompileFiltersResponse>;
|
|
10
13
|
export type FiltersService_GetCountryCities = RpcMethod<GetCountryCitiesRequest, GetCountryCitiesResponse>;
|
|
11
14
|
export type FiltersService_GetCitiesByHashes = RpcMethod<GetCitiesByHashesRequest, GetCitiesByHashesResponse>;
|
|
12
15
|
export type FiltersService_CompileFilter = RpcMethod<CompileFilterRequest, CompileFilterResponse>;
|
|
@@ -28,8 +31,14 @@ export interface FiltersService {
|
|
|
28
31
|
Update: FiltersService_Update;
|
|
29
32
|
/** Deletes a segment (filter) by filter code after verifying it is not used by any campaign, journey, preset, in-app or popup. Blocks instead of deleting if the filter is still in use; delete_filter_v2 auto-detaches journey/in-app usage first. */
|
|
30
33
|
Delete: FiltersService_Delete;
|
|
31
|
-
/** Deletes a segment (filter) by filter code, first
|
|
34
|
+
/** Deletes a segment (filter) by filter code, first pausing the running journeys that use it, cancelling its unsent messages, moving its active in-apps to draft and detaching it from journey points. Blocked by the same users as delete_filters; the error names them all. */
|
|
32
35
|
DeleteV2: FiltersService_DeleteV2;
|
|
36
|
+
/** Deletes up to 100 segments, all or nothing. A segment used by a preset, popup, news campaign, RSS feed, feature flag, external segment, dashboard widget or another segment blocks the whole batch. With stop_campaigns the running journeys using a segment are paused, its unsent messages cancelled and its active in-apps moved to draft first; a failed stop deletes nothing. Check get_filters_usage first. */
|
|
37
|
+
DeleteFilters: FiltersService_DeleteFilters;
|
|
38
|
+
/** Lists, for up to 100 segments, what blocks deleting each of them and which campaigns a delete with stop_campaigns would stop or detach. Segments missing from the answer are free or not found. */
|
|
39
|
+
GetFiltersUsage: FiltersService_GetFiltersUsage;
|
|
40
|
+
/** Starts recalculating the size of up to 100 segments. A segment already being calculated is not queued again, and at most 20 new calculations start per call; the rest come back as deferred to retry later. */
|
|
41
|
+
CompileFilters: FiltersService_CompileFilters;
|
|
33
42
|
/** Returns cities (name, coordinates, subscriber count) matching a search string, from the account's City tag values enriched with geo data. Used by the Geo segment-filter builder to pick cities to target. */
|
|
34
43
|
GetCountryCities: FiltersService_GetCountryCities;
|
|
35
44
|
/** Resolves a list of city hashes (country code, city name) to their coordinates and names. Use to hydrate cities already selected in a geo filter, e.g. after get_filter_country_cities. */
|
|
@@ -179,6 +188,60 @@ export type DeleteFilterRequest = {
|
|
|
179
188
|
filter?: string;
|
|
180
189
|
};
|
|
181
190
|
export type DeleteFilterResponse = {};
|
|
191
|
+
export type DeleteFiltersRequest = {
|
|
192
|
+
/** required when account has ApplicationSpecificFilters restriction, otherwise optional */
|
|
193
|
+
application?: string;
|
|
194
|
+
/** Codes of the segments to delete. */
|
|
195
|
+
codes?: string[];
|
|
196
|
+
/** Stop the campaigns using the segments: pause running journeys, cancel unsent messages, move active in-apps to draft. */
|
|
197
|
+
stopCampaigns?: boolean;
|
|
198
|
+
};
|
|
199
|
+
export type DeleteFiltersResponse = {};
|
|
200
|
+
export type GetFiltersUsageRequest = {
|
|
201
|
+
/** required when account has ApplicationSpecificFilters restriction, otherwise optional */
|
|
202
|
+
application?: string;
|
|
203
|
+
/** Codes of the segments to check. */
|
|
204
|
+
codes?: string[];
|
|
205
|
+
};
|
|
206
|
+
export type FilterUser_Kind = 'KIND_UNSPECIFIED' | 'KIND_PRESET' | 'KIND_POPUP' | 'KIND_NEWS_CAMPAIGN' | 'KIND_RSS_FEED' | 'KIND_FEATURE_FLAG' | 'KIND_EXTERNAL_SEGMENT' | 'KIND_SEGMENT' | 'KIND_DASHBOARD_WIDGET' | 'KIND_JOURNEY' | 'KIND_MESSAGE' | 'KIND_IN_APP';
|
|
207
|
+
export type FilterUser = {
|
|
208
|
+
kind: FilterUser_Kind;
|
|
209
|
+
/** The user's own identifier: uuid for a journey, key for a feature flag, code for every other kind. */
|
|
210
|
+
code: string;
|
|
211
|
+
name: string;
|
|
212
|
+
};
|
|
213
|
+
export type FilterUsage = {
|
|
214
|
+
code: string;
|
|
215
|
+
name: string;
|
|
216
|
+
/** Users that cannot be stopped or detached: the segment is not deleted while they exist. */
|
|
217
|
+
blockers: FilterUser[];
|
|
218
|
+
/** Running journeys to pause, unsent messages to cancel and active in-apps to move to draft. */
|
|
219
|
+
stops: FilterUser[];
|
|
220
|
+
/** Paused and draft journeys that only lose the segment in their points. */
|
|
221
|
+
detaches: FilterUser[];
|
|
222
|
+
};
|
|
223
|
+
export type GetFiltersUsageResponse = {
|
|
224
|
+
/** Only the segments that have a user, sorted by code. */
|
|
225
|
+
usages: FilterUsage[];
|
|
226
|
+
/**
|
|
227
|
+
* Campaigns a delete with stop_campaigns would stop or detach, merged over the segments without blockers;
|
|
228
|
+
* the same shape as GetFilterUsage, each campaign listed once.
|
|
229
|
+
*/
|
|
230
|
+
campaigns: GetFilterUsageResponse;
|
|
231
|
+
};
|
|
232
|
+
export type CompileFiltersRequest = {
|
|
233
|
+
application?: string;
|
|
234
|
+
/** Codes of the segments to recalculate. */
|
|
235
|
+
codes?: string[];
|
|
236
|
+
};
|
|
237
|
+
export type CompileFiltersResponse = {
|
|
238
|
+
/** Calculations started by this call. */
|
|
239
|
+
started: string[];
|
|
240
|
+
/** Segments already being calculated, left as they are. */
|
|
241
|
+
running: string[];
|
|
242
|
+
/** Segments over the per-call limit, not started: ask again later. */
|
|
243
|
+
deferred: string[];
|
|
244
|
+
};
|
|
182
245
|
/** returns cities and their coordinates for the given country based on existing tag (City) values */
|
|
183
246
|
export type GetCountryCitiesRequest = {
|
|
184
247
|
/** required when account has ApplicationSpecificFilters restriction, otherwise optional */
|