@pushwoosh/rpc-v2-http-api-data 0.2.444 → 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.
Files changed (3) hide show
  1. package/data.js +97 -0
  2. package/events.d.ts +45 -1
  3. package/package.json +1 -1
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": {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.444",
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",