@pushwoosh/rpc-v2-http-api-data 0.2.423 → 0.2.425

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 +81 -0
  2. package/package.json +1 -1
  3. package/presets.d.ts +36 -1
package/data.js CHANGED
@@ -32570,6 +32570,18 @@ export const data = {
32570
32570
  "method": "delete",
32571
32571
  "path": "/api/presets/{code}"
32572
32572
  },
32573
+ "DeletePresets": {
32574
+ "request": "pushwoosh.rpc_v2.presets.DeletePresetsRequest",
32575
+ "response": "pushwoosh.rpc_v2.presets.DeletePresetsResponse",
32576
+ "method": "post",
32577
+ "path": "/api/presets:delete"
32578
+ },
32579
+ "GetPresetsUsage": {
32580
+ "request": "pushwoosh.rpc_v2.presets.GetPresetsUsageRequest",
32581
+ "response": "pushwoosh.rpc_v2.presets.GetPresetsUsageResponse",
32582
+ "method": "post",
32583
+ "path": "/api/presets:usage"
32584
+ },
32573
32585
  "ValidateLiquid": {
32574
32586
  "request": "pushwoosh.rpc_v2.presets.ValidateLiquidRequest",
32575
32587
  "response": "pushwoosh.rpc_v2.presets.ValidateLiquidResponse",
@@ -33408,6 +33420,75 @@ export const data = {
33408
33420
  "type": "I",
33409
33421
  "fields": {}
33410
33422
  },
33423
+ "pushwoosh.rpc_v2.presets.DeletePresetsRequest": {
33424
+ "type": "I",
33425
+ "fields": {
33426
+ "codes": {
33427
+ "type": "string",
33428
+ "array": true
33429
+ }
33430
+ }
33431
+ },
33432
+ "pushwoosh.rpc_v2.presets.DeletePresetsResponse": {
33433
+ "type": "I",
33434
+ "fields": {}
33435
+ },
33436
+ "pushwoosh.rpc_v2.presets.GetPresetsUsageRequest": {
33437
+ "type": "I",
33438
+ "fields": {
33439
+ "codes": {
33440
+ "type": "string",
33441
+ "array": true
33442
+ }
33443
+ }
33444
+ },
33445
+ "pushwoosh.rpc_v2.presets.PresetUsage.PresetJourney": {
33446
+ "type": "I",
33447
+ "fields": {
33448
+ "uuid": {
33449
+ "type": "string"
33450
+ },
33451
+ "title": {
33452
+ "type": "string"
33453
+ }
33454
+ }
33455
+ },
33456
+ "pushwoosh.rpc_v2.presets.PresetUsage.PresetGeozone": {
33457
+ "type": "I",
33458
+ "fields": {
33459
+ "code": {
33460
+ "type": "string"
33461
+ },
33462
+ "name": {
33463
+ "type": "string"
33464
+ }
33465
+ }
33466
+ },
33467
+ "pushwoosh.rpc_v2.presets.PresetUsage": {
33468
+ "type": "I",
33469
+ "fields": {
33470
+ "code": {
33471
+ "type": "string"
33472
+ },
33473
+ "journeys": {
33474
+ "type": "pushwoosh.rpc_v2.presets.PresetUsage.PresetJourney",
33475
+ "array": true
33476
+ },
33477
+ "geozones": {
33478
+ "type": "pushwoosh.rpc_v2.presets.PresetUsage.PresetGeozone",
33479
+ "array": true
33480
+ }
33481
+ }
33482
+ },
33483
+ "pushwoosh.rpc_v2.presets.GetPresetsUsageResponse": {
33484
+ "type": "I",
33485
+ "fields": {
33486
+ "usages": {
33487
+ "type": "pushwoosh.rpc_v2.presets.PresetUsage",
33488
+ "array": true
33489
+ }
33490
+ }
33491
+ },
33411
33492
  "pushwoosh.rpc_v2.presets.ValidateLiquidRequest": {
33412
33493
  "type": "I",
33413
33494
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.423",
3
+ "version": "0.2.425",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/presets.d.ts CHANGED
@@ -8,6 +8,8 @@ export type presetsService_Update = RpcMethod<UpdatePresetRequest, UpdatePresetR
8
8
  export type presetsService_UpdatePartial = RpcMethod<UpdatePresetPartialRequest, UpdatePresetResponse>;
9
9
  export type presetsService_Clone = RpcMethod<ClonePresetRequest, ClonePresetResponse>;
10
10
  export type presetsService_Delete = RpcMethod<DeletePresetRequest, DeletePresetResponse>;
11
+ export type presetsService_DeletePresets = RpcMethod<DeletePresetsRequest, DeletePresetsResponse>;
12
+ export type presetsService_GetPresetsUsage = RpcMethod<GetPresetsUsageRequest, GetPresetsUsageResponse>;
11
13
  export type presetsService_ValidateLiquid = RpcMethod<ValidateLiquidRequest, ValidateLiquidResponse>;
12
14
  export interface presetsService {
13
15
  /** Lists push notification presets (reusable message templates) for an application, with paging, name/code search and category filter. Use to browse presets or find a preset code before fetching, cloning or editing one. */
@@ -22,8 +24,12 @@ export interface presetsService {
22
24
  UpdatePartial: presetsService_UpdatePartial;
23
25
  /** Duplicates an existing push preset (by preset code) into a new preset with the given name in the same application. Each call creates a new copy; the source preset is left unchanged. */
24
26
  Clone: presetsService_Clone;
25
- /** Permanently deletes a push preset by its preset code. Fails if the preset is still used by a running or paused journey; remove it from the journey first. */
27
+ /** Permanently deletes a push preset by its preset code. Refused while the preset is used by a Send Push or Smart Content point of a running or paused journey or by a geozone; the error names every user. */
26
28
  Delete: presetsService_Delete;
29
+ /** Deletes up to 1000 push presets of the account by their preset codes, all or nothing: if any is missing or used by a Send Push or Smart Content point of a running or paused journey or by a geozone, nothing is deleted and the error names the users. Use get_push_presets_usage first to keep only free ones. */
30
+ DeletePresets: presetsService_DeletePresets;
31
+ /** Lists which of the given push presets of the account, up to 1000 preset codes, are used by Send Push or Smart Content points of running or paused journeys or by geozones, with those users. Presets missing from the answer are not in use or not found. Use before delete_push_presets. */
32
+ GetPresetsUsage: presetsService_GetPresetsUsage;
27
33
  /** Checks the Liquid syntax of one or more template strings using the same engine the publisher uses at send time, returning per-field errors. Pure validation: it does not touch any preset or account data. */
28
34
  ValidateLiquid: presetsService_ValidateLiquid;
29
35
  }
@@ -435,6 +441,35 @@ export type DeletePresetRequest = {
435
441
  code?: string;
436
442
  };
437
443
  export type DeletePresetResponse = {};
444
+ export type DeletePresetsRequest = {
445
+ /** Preset codes of the push presets to delete. */
446
+ codes?: string[];
447
+ };
448
+ export type DeletePresetsResponse = {};
449
+ export type GetPresetsUsageRequest = {
450
+ /** Preset codes of the push presets to check. */
451
+ codes?: string[];
452
+ };
453
+ export type PresetUsage_PresetJourney = {
454
+ uuid: string;
455
+ title: string;
456
+ };
457
+ export type PresetUsage_PresetGeozone = {
458
+ code: string;
459
+ name: string;
460
+ };
461
+ export type PresetUsage = {
462
+ /** Preset code of the push preset. */
463
+ code: string;
464
+ /** Running or paused journeys sending the preset from a Send Push point or a Smart Content variant. */
465
+ journeys: PresetUsage_PresetJourney[];
466
+ /** Geozones sending the preset when a device enters them. */
467
+ geozones: PresetUsage_PresetGeozone[];
468
+ };
469
+ export type GetPresetsUsageResponse = {
470
+ /** Only the presets that are in use, sorted by preset code. */
471
+ usages: PresetUsage[];
472
+ };
438
473
  export type ValidateLiquidRequest = {
439
474
  /**
440
475
  * Templates to validate, keyed by a caller-defined field id