@pushwoosh/rpc-v2-http-api-data 0.2.419 → 0.2.421

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/accounts.d.ts CHANGED
@@ -249,6 +249,8 @@ export type EmailTemplatesService_List = RpcMethod<ListEmailTemplatesRequest, Li
249
249
  export type EmailTemplatesService_ListLegacyTemplates = RpcMethod<ListLegacyTemplatesRequest, ListLegacyTemplatesResponse>;
250
250
  export type EmailTemplatesService_Update = RpcMethod<UpdateEmailTemplateRequest, UpdateEmailTemplateResponse>;
251
251
  export type EmailTemplatesService_Delete = RpcMethod<DeleteEmailTemplateRequest, DeleteEmailTemplateResponse>;
252
+ export type EmailTemplatesService_DeleteEmailTemplates = RpcMethod<DeleteEmailTemplatesRequest, DeleteEmailTemplatesResponse>;
253
+ export type EmailTemplatesService_GetEmailTemplatesUsage = RpcMethod<GetEmailTemplatesUsageRequest, GetEmailTemplatesUsageResponse>;
252
254
  export type EmailTemplatesService_GetEmailTemplateLabels = RpcMethod<GetEmailTemplateLabelsRequest, GetEmailTemplateLabelsResponse>;
253
255
  export type EmailTemplatesService_Test = RpcMethod<TestEmailTemplateRequest, TestEmailTemplateResponse>;
254
256
  export type EmailTemplatesService_Migrate = RpcMethod<MigrateRequest, MigrateResponse>;
@@ -264,8 +266,12 @@ export interface EmailTemplatesService {
264
266
  ListLegacyTemplates: EmailTemplatesService_ListLegacyTemplates;
265
267
  /** Updates an existing email template by code, overwriting its name, label, categories, sender info, subjects and editor content. Use to edit a template; supplied fields replace the stored ones. */
266
268
  Update: EmailTemplatesService_Update;
267
- /** Deletes an email template and its connected preset by code, removing the stored content files. Fails if the template is used in a journey; unlike update_email_template this cannot be undone. */
269
+ /** Deletes an email template and its connected preset by code, removing the stored content files. Refused while the template is used by a running or paused journey, a double opt-in setting of an application or a subscription form, or an email not sent yet; the error names every user. Unlike update_email_template this cannot be undone. */
268
270
  Delete: EmailTemplatesService_Delete;
271
+ /** Deletes up to 1000 email templates of the account by their preset codes, all or nothing: if any is missing or used by a running or paused journey, a double opt-in setting, a subscription form or an email not sent yet, nothing is deleted and the error names the users. Use get_email_templates_usage first to keep only free ones. */
272
+ DeleteEmailTemplates: EmailTemplatesService_DeleteEmailTemplates;
273
+ /** Lists which of the given email templates of the account, up to 1000 preset codes, are used by running or paused journeys, double opt-in settings, subscription forms or emails not sent yet, with those users. Templates missing from the answer are not in use or not found. Use before delete_email_templates. */
274
+ GetEmailTemplatesUsage: EmailTemplatesService_GetEmailTemplatesUsage;
269
275
  /** Returns the distinct label strings used across an application's email templates. Use to populate a label filter for list_email_templates. */
270
276
  GetEmailTemplateLabels: EmailTemplatesService_GetEmailTemplateLabels;
271
277
  /** Sends a real test email of a template to one email address, rendering it with optional dynamic-content placeholders. If the app has no configured email platform the address must be a registered test device. Use to preview delivery before broadcasting. */
@@ -457,6 +463,43 @@ export type DeleteEmailTemplateRequest = {
457
463
  code?: string;
458
464
  };
459
465
  export type DeleteEmailTemplateResponse = {};
466
+ export type DeleteEmailTemplatesRequest = {
467
+ /** Preset codes of the email templates to delete. */
468
+ codes?: string[];
469
+ };
470
+ export type DeleteEmailTemplatesResponse = {};
471
+ export type GetEmailTemplatesUsageRequest = {
472
+ /** Preset codes of the email templates to check. */
473
+ codes?: string[];
474
+ };
475
+ export type EmailTemplateUsage_EmailTemplateUser = {
476
+ code: string;
477
+ name: string;
478
+ };
479
+ export type EmailTemplateUsage_EmailTemplateJourney = {
480
+ uuid: string;
481
+ title: string;
482
+ };
483
+ export type EmailTemplateUsage_EmailTemplateMessage = {
484
+ code: string;
485
+ sendDate: Date;
486
+ };
487
+ export type EmailTemplateUsage = {
488
+ /** Preset code of the email template. */
489
+ code: string;
490
+ /** Running or paused journeys sending the template from a Send Email point. */
491
+ journeys: EmailTemplateUsage_EmailTemplateJourney[];
492
+ /** Applications whose double opt-in email is the template. */
493
+ doubleOptInApplications: EmailTemplateUsage_EmailTemplateUser[];
494
+ /** Subscription forms whose double opt-in email is the template. */
495
+ subscriptionForms: EmailTemplateUsage_EmailTemplateUser[];
496
+ /** Emails created but not sent yet that will render the template. */
497
+ pendingMessages: EmailTemplateUsage_EmailTemplateMessage[];
498
+ };
499
+ export type GetEmailTemplatesUsageResponse = {
500
+ /** Only the templates that are in use, sorted by preset code. */
501
+ usages: EmailTemplateUsage[];
502
+ };
460
503
  export type GetEmailTemplateLabelsRequest = {
461
504
  application?: string;
462
505
  };
package/data.js CHANGED
@@ -13811,6 +13811,18 @@ export const data = {
13811
13811
  "method": "delete",
13812
13812
  "path": "/api/email_templates/{code}"
13813
13813
  },
13814
+ "DeleteEmailTemplates": {
13815
+ "request": "pushwoosh.rpc_v2.accounts.DeleteEmailTemplatesRequest",
13816
+ "response": "pushwoosh.rpc_v2.accounts.DeleteEmailTemplatesResponse",
13817
+ "method": "post",
13818
+ "path": "/api/email_templates:delete"
13819
+ },
13820
+ "GetEmailTemplatesUsage": {
13821
+ "request": "pushwoosh.rpc_v2.accounts.GetEmailTemplatesUsageRequest",
13822
+ "response": "pushwoosh.rpc_v2.accounts.GetEmailTemplatesUsageResponse",
13823
+ "method": "post",
13824
+ "path": "/api/email_templates:usage"
13825
+ },
13814
13826
  "GetEmailTemplateLabels": {
13815
13827
  "request": "pushwoosh.rpc_v2.accounts.GetEmailTemplateLabelsRequest",
13816
13828
  "response": "pushwoosh.rpc_v2.accounts.GetEmailTemplateLabelsResponse",
@@ -14223,6 +14235,94 @@ export const data = {
14223
14235
  "type": "I",
14224
14236
  "fields": {}
14225
14237
  },
14238
+ "pushwoosh.rpc_v2.accounts.DeleteEmailTemplatesRequest": {
14239
+ "type": "I",
14240
+ "fields": {
14241
+ "codes": {
14242
+ "type": "string",
14243
+ "array": true
14244
+ }
14245
+ }
14246
+ },
14247
+ "pushwoosh.rpc_v2.accounts.DeleteEmailTemplatesResponse": {
14248
+ "type": "I",
14249
+ "fields": {}
14250
+ },
14251
+ "pushwoosh.rpc_v2.accounts.GetEmailTemplatesUsageRequest": {
14252
+ "type": "I",
14253
+ "fields": {
14254
+ "codes": {
14255
+ "type": "string",
14256
+ "array": true
14257
+ }
14258
+ }
14259
+ },
14260
+ "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateUser": {
14261
+ "type": "I",
14262
+ "fields": {
14263
+ "code": {
14264
+ "type": "string"
14265
+ },
14266
+ "name": {
14267
+ "type": "string"
14268
+ }
14269
+ }
14270
+ },
14271
+ "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateJourney": {
14272
+ "type": "I",
14273
+ "fields": {
14274
+ "uuid": {
14275
+ "type": "string"
14276
+ },
14277
+ "title": {
14278
+ "type": "string"
14279
+ }
14280
+ }
14281
+ },
14282
+ "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateMessage": {
14283
+ "type": "I",
14284
+ "fields": {
14285
+ "code": {
14286
+ "type": "string"
14287
+ },
14288
+ "sendDate": {
14289
+ "type": "Date"
14290
+ }
14291
+ }
14292
+ },
14293
+ "pushwoosh.rpc_v2.accounts.EmailTemplateUsage": {
14294
+ "type": "I",
14295
+ "fields": {
14296
+ "code": {
14297
+ "type": "string"
14298
+ },
14299
+ "journeys": {
14300
+ "type": "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateJourney",
14301
+ "array": true
14302
+ },
14303
+ "doubleOptInApplications": {
14304
+ "type": "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateUser",
14305
+ "array": true
14306
+ },
14307
+ "subscriptionForms": {
14308
+ "type": "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateUser",
14309
+ "array": true
14310
+ },
14311
+ "pendingMessages": {
14312
+ "type": "pushwoosh.rpc_v2.accounts.EmailTemplateUsage.EmailTemplateMessage",
14313
+ "array": true
14314
+ }
14315
+ }
14316
+ },
14317
+ "pushwoosh.rpc_v2.accounts.GetEmailTemplatesUsageResponse": {
14318
+ "type": "I",
14319
+ "fields": {
14320
+ "usages": {
14321
+ "type": "pushwoosh.rpc_v2.accounts.EmailTemplateUsage",
14322
+ "array": true
14323
+ }
14324
+ }
14325
+ },
14226
14326
  "pushwoosh.rpc_v2.accounts.GetEmailTemplateLabelsRequest": {
14227
14327
  "type": "I",
14228
14328
  "fields": {
package/events.d.ts CHANGED
@@ -40,7 +40,7 @@ export interface EventsService {
40
40
  DismissRevenueSuggestions: EventsService_DismissRevenueSuggestions;
41
41
  /** Returns the events counted as conversions on the Conversions board, PW_Conversion first, each with its revenue attributes when it tracks revenue. */
42
42
  GetConversionEvents: EventsService_GetConversionEvents;
43
- /** Replaces the list of events counted as conversions on the Conversions board. Events left out of the request stop counting; PW_Conversion is always kept. Revenue attributes of an event are set through Update (revenue_mapping). A newly listed event is scheduled for a history recalculation. */
43
+ /** Replaces the list of events counted as conversions on the Conversions board. Events left out of the request stop counting; PW_Conversion is always kept. Each event's revenue_mapping is saved in the same call: unset leaves its revenue attributes as they are, empty makes it a conversion without revenue. A newly listed event or changed revenue attributes schedule a history recalculation. */
44
44
  SaveConversionEvents: EventsService_SaveConversionEvents;
45
45
  }
46
46
  export type GetEventRequest = {
@@ -285,7 +285,7 @@ export type GetRevenueStatisticsResponse = {
285
285
  export type ConversionEvent = {
286
286
  /** Name of the application's event that counts as a conversion. */
287
287
  name: string;
288
- /** Where the event keeps its amount and currency; unset for an event counted without revenue. */
288
+ /** Where the event keeps its amount and currency; unset for an event counted without revenue. In SaveConversionEvents unset leaves the stored attributes as they are and empty clears them. */
289
289
  revenueMapping: RevenueMapping;
290
290
  /** PW_Conversion: always listed, always tracks revenue, cannot be removed. */
291
291
  isDefault: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.419",
3
+ "version": "0.2.421",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",