@pushwoosh/rpc-v2-http-api-data 0.2.443 → 0.2.445

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
@@ -14909,6 +14909,18 @@ export const data = {
14909
14909
  "method": "delete",
14910
14910
  "path": "/api/events/{name}"
14911
14911
  },
14912
+ "DeleteEvents": {
14913
+ "request": "pushwoosh.rpc_v2.events.DeleteEventsRequest",
14914
+ "response": "pushwoosh.rpc_v2.events.DeleteEventsResponse",
14915
+ "method": "post",
14916
+ "path": "/api/events:delete"
14917
+ },
14918
+ "GetEventsUsage": {
14919
+ "request": "pushwoosh.rpc_v2.events.GetEventsUsageRequest",
14920
+ "response": "pushwoosh.rpc_v2.events.GetEventsUsageResponse",
14921
+ "method": "post",
14922
+ "path": "/api/events:usage"
14923
+ },
14912
14924
  "GetAttributeValues": {
14913
14925
  "request": "pushwoosh.rpc_v2.events.GetAttributeValuesRequest",
14914
14926
  "response": "pushwoosh.rpc_v2.events.GetAttributeValuesResponse",
@@ -15189,6 +15201,91 @@ export const data = {
15189
15201
  "type": "I",
15190
15202
  "fields": {}
15191
15203
  },
15204
+ "pushwoosh.rpc_v2.events.DeleteEventsRequest": {
15205
+ "type": "I",
15206
+ "fields": {
15207
+ "application": {
15208
+ "type": "string"
15209
+ },
15210
+ "names": {
15211
+ "type": "string",
15212
+ "array": true
15213
+ }
15214
+ }
15215
+ },
15216
+ "pushwoosh.rpc_v2.events.DeleteEventsResponse": {
15217
+ "type": "I",
15218
+ "fields": {}
15219
+ },
15220
+ "pushwoosh.rpc_v2.events.GetEventsUsageRequest": {
15221
+ "type": "I",
15222
+ "fields": {
15223
+ "application": {
15224
+ "type": "string"
15225
+ },
15226
+ "names": {
15227
+ "type": "string",
15228
+ "array": true
15229
+ }
15230
+ }
15231
+ },
15232
+ "pushwoosh.rpc_v2.events.EventUser.Kind": {
15233
+ "type": "E",
15234
+ "values": [
15235
+ "KIND_UNSPECIFIED",
15236
+ "KIND_SYSTEM",
15237
+ "KIND_JOURNEY",
15238
+ "KIND_SEGMENT",
15239
+ "KIND_IN_APP",
15240
+ "KIND_INBOUND_WEBHOOK",
15241
+ "KIND_RFM",
15242
+ "KIND_DASHBOARD_WIDGET",
15243
+ "KIND_GEOZONE",
15244
+ "KIND_CONVERSION"
15245
+ ]
15246
+ },
15247
+ "pushwoosh.rpc_v2.events.EventUser": {
15248
+ "type": "I",
15249
+ "fields": {
15250
+ "kind": {
15251
+ "type": "pushwoosh.rpc_v2.events.EventUser.Kind"
15252
+ },
15253
+ "code": {
15254
+ "type": "string"
15255
+ },
15256
+ "name": {
15257
+ "type": "string"
15258
+ },
15259
+ "status": {
15260
+ "type": "string"
15261
+ }
15262
+ }
15263
+ },
15264
+ "pushwoosh.rpc_v2.events.EventUsage": {
15265
+ "type": "I",
15266
+ "fields": {
15267
+ "name": {
15268
+ "type": "string"
15269
+ },
15270
+ "blockers": {
15271
+ "type": "pushwoosh.rpc_v2.events.EventUser",
15272
+ "array": true
15273
+ },
15274
+ "deletes": {
15275
+ "type": "pushwoosh.rpc_v2.events.EventUser",
15276
+ "array": true
15277
+ }
15278
+ }
15279
+ },
15280
+ "pushwoosh.rpc_v2.events.GetEventsUsageResponse": {
15281
+ "type": "I",
15282
+ "fields": {
15283
+ "usages": {
15284
+ "type": "pushwoosh.rpc_v2.events.EventUsage",
15285
+ "array": true
15286
+ }
15287
+ }
15288
+ },
15192
15289
  "pushwoosh.rpc_v2.events.GetAttributeValuesRequest": {
15193
15290
  "type": "I",
15194
15291
  "fields": {
@@ -18994,6 +19091,24 @@ export const data = {
18994
19091
  "method": "delete",
18995
19092
  "path": "/api/v2/filters/{filter}"
18996
19093
  },
19094
+ "DeleteFilters": {
19095
+ "request": "pushwoosh.rpc_v2.filters.DeleteFiltersRequest",
19096
+ "response": "pushwoosh.rpc_v2.filters.DeleteFiltersResponse",
19097
+ "method": "post",
19098
+ "path": "/api/filters:delete"
19099
+ },
19100
+ "GetFiltersUsage": {
19101
+ "request": "pushwoosh.rpc_v2.filters.GetFiltersUsageRequest",
19102
+ "response": "pushwoosh.rpc_v2.filters.GetFiltersUsageResponse",
19103
+ "method": "post",
19104
+ "path": "/api/filters:usage"
19105
+ },
19106
+ "CompileFilters": {
19107
+ "request": "pushwoosh.rpc_v2.filters.CompileFiltersRequest",
19108
+ "response": "pushwoosh.rpc_v2.filters.CompileFiltersResponse",
19109
+ "method": "post",
19110
+ "path": "/api/filters:compile"
19111
+ },
18997
19112
  "GetCountryCities": {
18998
19113
  "request": "pushwoosh.rpc_v2.filters.GetCountryCitiesRequest",
18999
19114
  "response": "pushwoosh.rpc_v2.filters.GetCountryCitiesResponse",
@@ -19325,6 +19440,132 @@ export const data = {
19325
19440
  "type": "I",
19326
19441
  "fields": {}
19327
19442
  },
19443
+ "pushwoosh.rpc_v2.filters.DeleteFiltersRequest": {
19444
+ "type": "I",
19445
+ "fields": {
19446
+ "application": {
19447
+ "type": "string"
19448
+ },
19449
+ "codes": {
19450
+ "type": "string",
19451
+ "array": true
19452
+ },
19453
+ "stopCampaigns": {
19454
+ "type": "boolean"
19455
+ }
19456
+ }
19457
+ },
19458
+ "pushwoosh.rpc_v2.filters.DeleteFiltersResponse": {
19459
+ "type": "I",
19460
+ "fields": {}
19461
+ },
19462
+ "pushwoosh.rpc_v2.filters.GetFiltersUsageRequest": {
19463
+ "type": "I",
19464
+ "fields": {
19465
+ "application": {
19466
+ "type": "string"
19467
+ },
19468
+ "codes": {
19469
+ "type": "string",
19470
+ "array": true
19471
+ }
19472
+ }
19473
+ },
19474
+ "pushwoosh.rpc_v2.filters.FilterUser.Kind": {
19475
+ "type": "E",
19476
+ "values": [
19477
+ "KIND_UNSPECIFIED",
19478
+ "KIND_PRESET",
19479
+ "KIND_POPUP",
19480
+ "KIND_NEWS_CAMPAIGN",
19481
+ "KIND_RSS_FEED",
19482
+ "KIND_FEATURE_FLAG",
19483
+ "KIND_EXTERNAL_SEGMENT",
19484
+ "KIND_SEGMENT",
19485
+ "KIND_DASHBOARD_WIDGET",
19486
+ "KIND_JOURNEY",
19487
+ "KIND_MESSAGE",
19488
+ "KIND_IN_APP"
19489
+ ]
19490
+ },
19491
+ "pushwoosh.rpc_v2.filters.FilterUser": {
19492
+ "type": "I",
19493
+ "fields": {
19494
+ "kind": {
19495
+ "type": "pushwoosh.rpc_v2.filters.FilterUser.Kind"
19496
+ },
19497
+ "code": {
19498
+ "type": "string"
19499
+ },
19500
+ "name": {
19501
+ "type": "string"
19502
+ }
19503
+ }
19504
+ },
19505
+ "pushwoosh.rpc_v2.filters.FilterUsage": {
19506
+ "type": "I",
19507
+ "fields": {
19508
+ "code": {
19509
+ "type": "string"
19510
+ },
19511
+ "name": {
19512
+ "type": "string"
19513
+ },
19514
+ "blockers": {
19515
+ "type": "pushwoosh.rpc_v2.filters.FilterUser",
19516
+ "array": true
19517
+ },
19518
+ "stops": {
19519
+ "type": "pushwoosh.rpc_v2.filters.FilterUser",
19520
+ "array": true
19521
+ },
19522
+ "detaches": {
19523
+ "type": "pushwoosh.rpc_v2.filters.FilterUser",
19524
+ "array": true
19525
+ }
19526
+ }
19527
+ },
19528
+ "pushwoosh.rpc_v2.filters.GetFiltersUsageResponse": {
19529
+ "type": "I",
19530
+ "fields": {
19531
+ "usages": {
19532
+ "type": "pushwoosh.rpc_v2.filters.FilterUsage",
19533
+ "array": true
19534
+ },
19535
+ "campaigns": {
19536
+ "type": "pushwoosh.rpc_v2.filters.GetFilterUsageResponse"
19537
+ }
19538
+ }
19539
+ },
19540
+ "pushwoosh.rpc_v2.filters.CompileFiltersRequest": {
19541
+ "type": "I",
19542
+ "fields": {
19543
+ "application": {
19544
+ "type": "string"
19545
+ },
19546
+ "codes": {
19547
+ "type": "string",
19548
+ "array": true
19549
+ }
19550
+ }
19551
+ },
19552
+ "pushwoosh.rpc_v2.filters.CompileFiltersResponse": {
19553
+ "type": "I",
19554
+ "fields": {
19555
+ "started": {
19556
+ "type": "string",
19557
+ "array": true
19558
+ },
19559
+ "running": {
19560
+ "type": "string",
19561
+ "array": true
19562
+ },
19563
+ "deferred": {
19564
+ "type": "string",
19565
+ "array": true
19566
+ }
19567
+ }
19568
+ },
19328
19569
  "pushwoosh.rpc_v2.filters.GetCountryCitiesRequest": {
19329
19570
  "type": "I",
19330
19571
  "fields": {
package/events.d.ts CHANGED
@@ -4,6 +4,8 @@ export type EventsService_List = RpcMethod<ListEventsRequest, ListEventsResponse
4
4
  export type EventsService_Create = RpcMethod<CreateEventRequest, CreateEventResponse>;
5
5
  export type EventsService_Update = RpcMethod<UpdateEventRequest, UpdateEventResponse>;
6
6
  export type EventsService_Delete = RpcMethod<DeleteEventRequest, DeleteEventResponse>;
7
+ export type EventsService_DeleteEvents = RpcMethod<DeleteEventsRequest, DeleteEventsResponse>;
8
+ export type EventsService_GetEventsUsage = RpcMethod<GetEventsUsageRequest, GetEventsUsageResponse>;
7
9
  export type EventsService_GetAttributeValues = RpcMethod<GetAttributeValuesRequest, GetAttributeValuesResponse>;
8
10
  export type EventsService_GetTriggeredCount = RpcMethod<GetTriggeredCountRequest, GetTriggeredCountResponse>;
9
11
  export type EventsService_GetDetailedStatistics = RpcMethod<GetDetailedStatisticsRequest, GetDetailedStatisticsResponse>;
@@ -22,8 +24,12 @@ export interface EventsService {
22
24
  Create: EventsService_Create;
23
25
  /** Overwrites a custom event's description, attribute set and revenue mapping (the name is immutable). Fully replaces the attribute list, so resend every attribute you want to keep. */
24
26
  Update: EventsService_Update;
25
- /** Deletes a custom event and its attributes from an application. Fails if the event is still referenced by a filter/segment or in-app trigger; not undoable. */
27
+ /** Deletes a custom event and its attributes from an application, with the checks of delete_events: a system event, a journey, segment, in-app, inbound webhook, RFM config, dashboard widget or geozone using it refuses the delete; its conversion settings go with it. Not undoable. */
26
28
  Delete: EventsService_Delete;
29
+ /** Deletes up to 100 custom events of an application, all or nothing. A system event, or one used by a draft, running or paused journey, a segment, an in-app, an inbound webhook, an RFM config, a dashboard widget or a geozone, blocks the whole batch. Conversion settings and revenue mappings are deleted with their events. Check get_events_usage first. */
30
+ DeleteEvents: EventsService_DeleteEvents;
31
+ /** Lists, for up to 100 custom events of an application, what blocks deleting each of them and what is deleted with it. Events missing from the answer are free or not found. */
32
+ GetEventsUsage: EventsService_GetEventsUsage;
27
33
  /** Returns distinct recorded values of one attribute of a custom event, with paging and a value search. Use to populate attribute-value pickers when building event-based filters. */
28
34
  GetAttributeValues: EventsService_GetAttributeValues;
29
35
  /** Returns all-time total and unique triggered counts for the named custom events in an application. Use for a quick per-event volume check; for a time series use get_event_detailed_statistics. */
@@ -135,6 +141,44 @@ export type DeleteEventRequest = {
135
141
  application?: string;
136
142
  };
137
143
  export type DeleteEventResponse = {};
144
+ export type DeleteEventsRequest = {
145
+ /** Application code (format XXXXX-XXXXX) the events belong to. */
146
+ application?: string;
147
+ /** Names of the custom events to delete, at most 100. */
148
+ names?: string[];
149
+ };
150
+ export type DeleteEventsResponse = {};
151
+ export type GetEventsUsageRequest = {
152
+ /** Application code (format XXXXX-XXXXX) the events belong to. */
153
+ application?: string;
154
+ /** Names of the custom events to check, at most 100. */
155
+ names?: string[];
156
+ };
157
+ export type EventUser_Kind = 'KIND_UNSPECIFIED'
158
+ /** The event is built into the platform. */
159
+ | 'KIND_SYSTEM' | 'KIND_JOURNEY' | 'KIND_SEGMENT' | 'KIND_IN_APP' | 'KIND_INBOUND_WEBHOOK' | 'KIND_RFM' | 'KIND_DASHBOARD_WIDGET' | 'KIND_GEOZONE'
160
+ /** Conversion settings and revenue mapping of the event itself. */
161
+ | 'KIND_CONVERSION';
162
+ /** EventUser is something that uses an event. */
163
+ export type EventUser = {
164
+ kind: EventUser_Kind;
165
+ /** Code, uuid or id of the user, as its own page addresses it. */
166
+ code: string;
167
+ name: string;
168
+ /** Current status of the user where it has one, in lower case (e.g. running, draft, active). */
169
+ status: string;
170
+ };
171
+ export type EventUsage = {
172
+ name: string;
173
+ /** What refuses the delete of this event. */
174
+ blockers: EventUser[];
175
+ /** What is deleted together with the event. */
176
+ deletes: EventUser[];
177
+ };
178
+ export type GetEventsUsageResponse = {
179
+ /** Only the events that have a user, sorted by name. */
180
+ usages: EventUsage[];
181
+ };
138
182
  export type GetAttributeValuesRequest = {
139
183
  /** Application code (format XXXXX-XXXXX) the event belongs to. */
140
184
  application?: string;
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 detaching it from journey split points and moving in-app messages that use it to draft. Use instead of delete_filter to force-remove a filter referenced by journeys or in-apps; still blocked by other filters or web popups using it. */
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 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.443",
3
+ "version": "0.2.445",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",