@pushwoosh/rpc-v2-http-api-data 0.1.888 → 0.1.890

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
@@ -12389,6 +12389,10 @@ export const data = {
12389
12389
  },
12390
12390
  "mimeType": {
12391
12391
  "type": "string"
12392
+ },
12393
+ "description": {
12394
+ "type": "string",
12395
+ "optional": true
12392
12396
  }
12393
12397
  }
12394
12398
  },
@@ -12473,6 +12477,10 @@ export const data = {
12473
12477
  "createdAt": {
12474
12478
  "type": "Date"
12475
12479
  },
12480
+ "description": {
12481
+ "type": "string",
12482
+ "optional": true
12483
+ },
12476
12484
  "imageMeta": {
12477
12485
  "type": "pushwoosh.rpc_v2.media_files.MediaFile.ImageMeta"
12478
12486
  }
@@ -20231,55 +20239,95 @@ export const data = {
20231
20239
  }
20232
20240
  }
20233
20241
  },
20234
- "pushwoosh.rpc_v2.popup_forms.PopupFormsService": {
20242
+ "pushwoosh.rpc.popup_forms.v3.PopupFormsServiceErrors": {
20243
+ "type": "E",
20244
+ "values": [
20245
+ "POPUP_FORMS_SERVICE_ERRORS_UNSPECIFIED",
20246
+ "NAME_EMPTY",
20247
+ "NAME_TOO_LONG",
20248
+ "NAME_ALREADY_EXISTS",
20249
+ "POPUP_FORM_CONTENT_CODE_EMPTY",
20250
+ "POPUP_FORM_CONTENT_CODE_INVALID",
20251
+ "DEVICE_TYPE_EMPTY",
20252
+ "DEVICE_TYPE_INVALID",
20253
+ "VISITORS_TYPE_EMPTY",
20254
+ "VISITORS_TYPE_INVALID",
20255
+ "FREQUENCY_EMPTY",
20256
+ "FREQUENCY_INVALID",
20257
+ "DELAY_NEGATIVE",
20258
+ "MATCHING_PAGE_INVALID",
20259
+ "STATUS_EMPTY",
20260
+ "STATUS_INVALID",
20261
+ "PER_PAGE_TOO_LARGE",
20262
+ "POPUP_FORM_NOT_FOUND",
20263
+ "POPUP_FORM_ALREADY_DRAFT",
20264
+ "POPUP_FORM_ALREADY_ACTIVE",
20265
+ "POPUP_FORM_ALREADY_PAUSED"
20266
+ ],
20267
+ "valuesArgs": {
20268
+ "NAME_TOO_LONG": [
20269
+ "max_length"
20270
+ ],
20271
+ "NAME_ALREADY_EXISTS": [
20272
+ "name"
20273
+ ],
20274
+ "MATCHING_PAGE_INVALID": [
20275
+ "page"
20276
+ ],
20277
+ "PER_PAGE_TOO_LARGE": [
20278
+ "max_per_page"
20279
+ ]
20280
+ }
20281
+ },
20282
+ "pushwoosh.rpc.popup_forms.v3.PopupFormsService": {
20235
20283
  "type": "S",
20236
20284
  "key": "popupForms",
20237
20285
  "methods": {
20238
20286
  "List": {
20239
- "request": "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest",
20240
- "response": "pushwoosh.rpc_v2.popup_forms.ListPopupFormsResponse",
20287
+ "request": "pushwoosh.rpc.popup_forms.v3.ListRequest",
20288
+ "response": "pushwoosh.rpc.popup_forms.v3.ListResponse",
20241
20289
  "method": "get",
20242
- "path": "/api/popup_forms"
20290
+ "path": "/api/v3/popup_forms"
20243
20291
  },
20244
20292
  "Get": {
20245
- "request": "pushwoosh.rpc_v2.popup_forms.GetPopupFormRequest",
20246
- "response": "pushwoosh.rpc_v2.popup_forms.GetPopupFormResponse",
20293
+ "request": "pushwoosh.rpc.popup_forms.v3.GetRequest",
20294
+ "response": "pushwoosh.rpc.popup_forms.v3.GetResponse",
20247
20295
  "method": "get",
20248
- "path": "/api/popup_forms/{code}"
20249
- },
20250
- "Delete": {
20251
- "request": "pushwoosh.rpc_v2.popup_forms.DeletePopupFormRequest",
20252
- "response": "pushwoosh.rpc_v2.popup_forms.DeletePopupFormResponse",
20253
- "method": "delete",
20254
- "path": "/api/popup_forms/{code}"
20296
+ "path": "/api/v3/popup_forms/{code}"
20255
20297
  },
20256
20298
  "Create": {
20257
- "request": "pushwoosh.rpc_v2.popup_forms.CreatePopupFormRequest",
20258
- "response": "pushwoosh.rpc_v2.popup_forms.CreatePopupFormResponse",
20299
+ "request": "pushwoosh.rpc.popup_forms.v3.CreateRequest",
20300
+ "response": "pushwoosh.rpc.popup_forms.v3.CreateResponse",
20259
20301
  "method": "post",
20260
- "path": "/api/popup_forms:create"
20302
+ "path": "/api/v3/popup_forms:create"
20261
20303
  },
20262
20304
  "Update": {
20263
- "request": "pushwoosh.rpc_v2.popup_forms.UpdatePopupFormRequest",
20264
- "response": "pushwoosh.rpc_v2.popup_forms.UpdatePopupFormResponse",
20305
+ "request": "pushwoosh.rpc.popup_forms.v3.UpdateRequest",
20306
+ "response": "pushwoosh.rpc.popup_forms.v3.UpdateResponse",
20265
20307
  "method": "put",
20266
- "path": "/api/popup_forms/{code}"
20308
+ "path": "/api/v3/popup_forms/{code}"
20309
+ },
20310
+ "Delete": {
20311
+ "request": "pushwoosh.rpc.popup_forms.v3.DeleteRequest",
20312
+ "response": "pushwoosh.rpc.popup_forms.v3.DeleteResponse",
20313
+ "method": "delete",
20314
+ "path": "/api/v3/popup_forms/{code}"
20267
20315
  },
20268
20316
  "Deactivate": {
20269
- "request": "pushwoosh.rpc_v2.popup_forms.DeactivatePopupFormRequest",
20270
- "response": "pushwoosh.rpc_v2.popup_forms.DeactivatePopupFormResponse",
20317
+ "request": "pushwoosh.rpc.popup_forms.v3.DeactivateRequest",
20318
+ "response": "pushwoosh.rpc.popup_forms.v3.DeactivateResponse",
20271
20319
  "method": "post",
20272
- "path": "/api/popup_forms/{code}:deactivate"
20320
+ "path": "/api/v3/popup_forms/{code}:deactivate"
20273
20321
  },
20274
20322
  "Activate": {
20275
- "request": "pushwoosh.rpc_v2.popup_forms.ActivatePopupFormRequest",
20276
- "response": "pushwoosh.rpc_v2.popup_forms.ActivatePopupFormResponse",
20323
+ "request": "pushwoosh.rpc.popup_forms.v3.ActivateRequest",
20324
+ "response": "pushwoosh.rpc.popup_forms.v3.ActivateResponse",
20277
20325
  "method": "post",
20278
- "path": "/api/popup_forms/{code}:activate"
20326
+ "path": "/api/v3/popup_forms/{code}:activate"
20279
20327
  }
20280
20328
  }
20281
20329
  },
20282
- "pushwoosh.rpc_v2.popup_forms.PopupForm": {
20330
+ "pushwoosh.rpc.popup_forms.v3.PopupForm": {
20283
20331
  "type": "I",
20284
20332
  "fields": {
20285
20333
  "code": {
@@ -20289,7 +20337,8 @@ export const data = {
20289
20337
  "type": "string"
20290
20338
  },
20291
20339
  "description": {
20292
- "type": "string"
20340
+ "type": "string",
20341
+ "optional": true
20293
20342
  },
20294
20343
  "status": {
20295
20344
  "type": "string"
@@ -20327,21 +20376,21 @@ export const data = {
20327
20376
  }
20328
20377
  }
20329
20378
  },
20330
- "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest.OrderBy": {
20379
+ "pushwoosh.rpc.popup_forms.v3.ListRequest.OrderBy": {
20331
20380
  "type": "E",
20332
20381
  "values": [
20333
20382
  "PUBLISHED",
20334
20383
  "NAME"
20335
20384
  ]
20336
20385
  },
20337
- "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest.OrderDirection": {
20386
+ "pushwoosh.rpc.popup_forms.v3.ListRequest.OrderDirection": {
20338
20387
  "type": "E",
20339
20388
  "values": [
20340
20389
  "DESC",
20341
20390
  "ASC"
20342
20391
  ]
20343
20392
  },
20344
- "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest": {
20393
+ "pushwoosh.rpc.popup_forms.v3.ListRequest": {
20345
20394
  "type": "I",
20346
20395
  "fields": {
20347
20396
  "application": {
@@ -20355,10 +20404,10 @@ export const data = {
20355
20404
  "optional": true
20356
20405
  },
20357
20406
  "orderBy": {
20358
- "type": "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest.OrderBy"
20407
+ "type": "pushwoosh.rpc.popup_forms.v3.ListRequest.OrderBy"
20359
20408
  },
20360
20409
  "orderDirection": {
20361
- "type": "pushwoosh.rpc_v2.popup_forms.ListPopupFormsRequest.OrderDirection"
20410
+ "type": "pushwoosh.rpc.popup_forms.v3.ListRequest.OrderDirection"
20362
20411
  },
20363
20412
  "page": {
20364
20413
  "type": "number"
@@ -20368,7 +20417,7 @@ export const data = {
20368
20417
  }
20369
20418
  }
20370
20419
  },
20371
- "pushwoosh.rpc_v2.popup_forms.PopupFormListItem": {
20420
+ "pushwoosh.rpc.popup_forms.v3.ListResponse.ListItem": {
20372
20421
  "type": "I",
20373
20422
  "fields": {
20374
20423
  "code": {
@@ -20378,7 +20427,8 @@ export const data = {
20378
20427
  "type": "string"
20379
20428
  },
20380
20429
  "description": {
20381
- "type": "string"
20430
+ "type": "string",
20431
+ "optional": true
20382
20432
  },
20383
20433
  "status": {
20384
20434
  "type": "string"
@@ -20394,11 +20444,11 @@ export const data = {
20394
20444
  }
20395
20445
  }
20396
20446
  },
20397
- "pushwoosh.rpc_v2.popup_forms.ListPopupFormsResponse": {
20447
+ "pushwoosh.rpc.popup_forms.v3.ListResponse": {
20398
20448
  "type": "I",
20399
20449
  "fields": {
20400
- "popupForms": {
20401
- "type": "pushwoosh.rpc_v2.popup_forms.PopupFormListItem",
20450
+ "items": {
20451
+ "type": "pushwoosh.rpc.popup_forms.v3.ListResponse.ListItem",
20402
20452
  "array": true
20403
20453
  },
20404
20454
  "page": {
@@ -20415,7 +20465,7 @@ export const data = {
20415
20465
  }
20416
20466
  }
20417
20467
  },
20418
- "pushwoosh.rpc_v2.popup_forms.GetPopupFormRequest": {
20468
+ "pushwoosh.rpc.popup_forms.v3.GetRequest": {
20419
20469
  "type": "I",
20420
20470
  "fields": {
20421
20471
  "code": {
@@ -20423,15 +20473,15 @@ export const data = {
20423
20473
  }
20424
20474
  }
20425
20475
  },
20426
- "pushwoosh.rpc_v2.popup_forms.GetPopupFormResponse": {
20476
+ "pushwoosh.rpc.popup_forms.v3.GetResponse": {
20427
20477
  "type": "I",
20428
20478
  "fields": {
20429
- "popupForm": {
20430
- "type": "pushwoosh.rpc_v2.popup_forms.PopupForm"
20479
+ "item": {
20480
+ "type": "pushwoosh.rpc.popup_forms.v3.PopupForm"
20431
20481
  }
20432
20482
  }
20433
20483
  },
20434
- "pushwoosh.rpc_v2.popup_forms.CreatePopupFormRequest": {
20484
+ "pushwoosh.rpc.popup_forms.v3.CreateRequest": {
20435
20485
  "type": "I",
20436
20486
  "fields": {
20437
20487
  "application": {
@@ -20468,7 +20518,7 @@ export const data = {
20468
20518
  }
20469
20519
  }
20470
20520
  },
20471
- "pushwoosh.rpc_v2.popup_forms.CreatePopupFormResponse": {
20521
+ "pushwoosh.rpc.popup_forms.v3.CreateResponse": {
20472
20522
  "type": "I",
20473
20523
  "fields": {
20474
20524
  "code": {
@@ -20476,48 +20526,58 @@ export const data = {
20476
20526
  }
20477
20527
  }
20478
20528
  },
20479
- "pushwoosh.rpc_v2.popup_forms.UpdatePopupFormRequest": {
20529
+ "pushwoosh.rpc.popup_forms.v3.UpdateRequest": {
20480
20530
  "type": "I",
20481
20531
  "fields": {
20482
20532
  "code": {
20483
20533
  "type": "string"
20484
20534
  },
20485
20535
  "name": {
20486
- "type": "string"
20536
+ "type": "string",
20537
+ "optional": true
20487
20538
  },
20488
20539
  "description": {
20489
20540
  "type": "string",
20490
20541
  "optional": true
20491
20542
  },
20492
20543
  "popupFormContentCode": {
20493
- "type": "string"
20544
+ "type": "string",
20545
+ "optional": true
20494
20546
  },
20495
20547
  "deviceType": {
20496
- "type": "string"
20548
+ "type": "string",
20549
+ "optional": true
20497
20550
  },
20498
20551
  "visitorsType": {
20499
- "type": "string"
20552
+ "type": "string",
20553
+ "optional": true
20554
+ },
20555
+ "updateMatchingPages": {
20556
+ "type": "boolean"
20500
20557
  },
20501
20558
  "matchingPages": {
20502
20559
  "type": "string",
20503
20560
  "array": true
20504
20561
  },
20505
20562
  "delay": {
20506
- "type": "number"
20563
+ "type": "number",
20564
+ "optional": true
20507
20565
  },
20508
20566
  "frequency": {
20509
- "type": "string"
20567
+ "type": "string",
20568
+ "optional": true
20510
20569
  },
20511
20570
  "status": {
20512
- "type": "string"
20571
+ "type": "string",
20572
+ "optional": true
20513
20573
  }
20514
20574
  }
20515
20575
  },
20516
- "pushwoosh.rpc_v2.popup_forms.UpdatePopupFormResponse": {
20576
+ "pushwoosh.rpc.popup_forms.v3.UpdateResponse": {
20517
20577
  "type": "I",
20518
20578
  "fields": {}
20519
20579
  },
20520
- "pushwoosh.rpc_v2.popup_forms.DeletePopupFormRequest": {
20580
+ "pushwoosh.rpc.popup_forms.v3.DeleteRequest": {
20521
20581
  "type": "I",
20522
20582
  "fields": {
20523
20583
  "code": {
@@ -20525,11 +20585,11 @@ export const data = {
20525
20585
  }
20526
20586
  }
20527
20587
  },
20528
- "pushwoosh.rpc_v2.popup_forms.DeletePopupFormResponse": {
20588
+ "pushwoosh.rpc.popup_forms.v3.DeleteResponse": {
20529
20589
  "type": "I",
20530
20590
  "fields": {}
20531
20591
  },
20532
- "pushwoosh.rpc_v2.popup_forms.DeactivatePopupFormRequest": {
20592
+ "pushwoosh.rpc.popup_forms.v3.DeactivateRequest": {
20533
20593
  "type": "I",
20534
20594
  "fields": {
20535
20595
  "code": {
@@ -20537,11 +20597,11 @@ export const data = {
20537
20597
  }
20538
20598
  }
20539
20599
  },
20540
- "pushwoosh.rpc_v2.popup_forms.DeactivatePopupFormResponse": {
20600
+ "pushwoosh.rpc.popup_forms.v3.DeactivateResponse": {
20541
20601
  "type": "I",
20542
20602
  "fields": {}
20543
20603
  },
20544
- "pushwoosh.rpc_v2.popup_forms.ActivatePopupFormRequest": {
20604
+ "pushwoosh.rpc.popup_forms.v3.ActivateRequest": {
20545
20605
  "type": "I",
20546
20606
  "fields": {
20547
20607
  "code": {
@@ -20549,7 +20609,7 @@ export const data = {
20549
20609
  }
20550
20610
  }
20551
20611
  },
20552
- "pushwoosh.rpc_v2.popup_forms.ActivatePopupFormResponse": {
20612
+ "pushwoosh.rpc.popup_forms.v3.ActivateResponse": {
20553
20613
  "type": "I",
20554
20614
  "fields": {}
20555
20615
  },
package/index.d.ts CHANGED
@@ -40,7 +40,7 @@ import { MediaFilesService as pushwoosh_rpc_v2_media_files_MediaFilesService } f
40
40
  import { MessagesService as pushwoosh_rpc_v2_messages_MessagesService } from './messages';
41
41
  import { FiltersCrudService as pushwoosh_objects_filters_v1_FiltersCrudService } from './pushwoosh_objects_filters_v1';
42
42
  import { RestrictionValuesCrudService as pushwoosh_objects_restrictionValues_v1_RestrictionValuesCrudService } from './pushwoosh_objects_restrictionValues_v1';
43
- import { PopupFormsService as pushwoosh_rpc_v2_popup_forms_PopupFormsService } from './popup_forms';
43
+ import { PopupFormsService as pushwoosh_rpc_popup_forms_v3_PopupFormsService } from './pushwoosh_rpc_popup_forms_v3';
44
44
  import { PopupFormsContentsService as pushwoosh_rpc_popup_forms_contents_v3_PopupFormsContentsService } from './pushwoosh_rpc_popup_forms_contents_v3';
45
45
  import { presetsService as pushwoosh_rpc_v2_presets_presetsService } from './presets';
46
46
  import { ReferralPartnerService as pushwoosh_rpc_v2_referral_partners_ReferralPartnerService } from './referral_partners';
@@ -102,7 +102,7 @@ export type API = {
102
102
  messages: pushwoosh_rpc_v2_messages_MessagesService;
103
103
  filtersCrud: pushwoosh_objects_filters_v1_FiltersCrudService;
104
104
  restrictionValuesCrud: pushwoosh_objects_restrictionValues_v1_RestrictionValuesCrudService;
105
- popupForms: pushwoosh_rpc_v2_popup_forms_PopupFormsService;
105
+ popupForms: pushwoosh_rpc_popup_forms_v3_PopupFormsService;
106
106
  popupFormsContents: pushwoosh_rpc_popup_forms_contents_v3_PopupFormsContentsService;
107
107
  presets: pushwoosh_rpc_v2_presets_presetsService;
108
108
  referralPartner: pushwoosh_rpc_v2_referral_partners_ReferralPartnerService;
package/media_files.d.ts CHANGED
@@ -8,6 +8,7 @@ export type UploadMediaFileRequest = {
8
8
  filename: string;
9
9
  data: string;
10
10
  mimeType: string;
11
+ description?: string;
11
12
  };
12
13
  export type UploadMediaFileResponse = {
13
14
  file: MediaFile;
@@ -42,5 +43,6 @@ export type MediaFile = {
42
43
  fileSize: number;
43
44
  mimeType: string;
44
45
  createdAt: Date;
46
+ description?: string;
45
47
  meta: MediaFile_meta;
46
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.1.888",
3
+ "version": "0.1.890",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,238 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ /**
3
+ * PopupFormsServiceErrors enumerates every machine-readable error reason
4
+ * (field violations and failed preconditions) returned by PopupFormsService endpoints.
5
+ */
6
+ export type PopupFormsServiceErrors =
7
+ /** Unspecified error. */
8
+ 'POPUP_FORMS_SERVICE_ERRORS_UNSPECIFIED'
9
+ /** Popup Form name cannot be empty. */
10
+ | 'NAME_EMPTY'
11
+ /**
12
+ * Popup Form name cannot be longer than 255 characters.
13
+ * args: max_length - the maximum allowed length of name.
14
+ */
15
+ | 'NAME_TOO_LONG'
16
+ /**
17
+ * Popup Form with the same name already exists.
18
+ * args: name - the name of the existing popup form.
19
+ */
20
+ | 'NAME_ALREADY_EXISTS'
21
+ /** Popup Form Content code is required. */
22
+ | 'POPUP_FORM_CONTENT_CODE_EMPTY'
23
+ /** Popup Form Content code is invalid. */
24
+ | 'POPUP_FORM_CONTENT_CODE_INVALID'
25
+ /** Device type is required. */
26
+ | 'DEVICE_TYPE_EMPTY'
27
+ /** Device type is invalid. */
28
+ | 'DEVICE_TYPE_INVALID'
29
+ /** Visitors type is required. */
30
+ | 'VISITORS_TYPE_EMPTY'
31
+ /** Visitors type is invalid. */
32
+ | 'VISITORS_TYPE_INVALID'
33
+ /** Frequency is required. */
34
+ | 'FREQUENCY_EMPTY'
35
+ /** Frequency is invalid. */
36
+ | 'FREQUENCY_INVALID'
37
+ /** Delay must be a positive number. */
38
+ | 'DELAY_NEGATIVE'
39
+ /**
40
+ * Matching page has invalid format.
41
+ * args: page - the invalid matching page value.
42
+ */
43
+ | 'MATCHING_PAGE_INVALID'
44
+ /** Status is required. */
45
+ | 'STATUS_EMPTY'
46
+ /** Status is invalid. */
47
+ | 'STATUS_INVALID'
48
+ /**
49
+ * Per page cannot be greater than 100.
50
+ * args: max_per_page - the maximum allowed value of per_page.
51
+ */
52
+ | 'PER_PAGE_TOO_LARGE'
53
+ /** Popup Form not found. */
54
+ | 'POPUP_FORM_NOT_FOUND'
55
+ /** Popup Form is already draft. */
56
+ | 'POPUP_FORM_ALREADY_DRAFT'
57
+ /** Popup Form is already active. */
58
+ | 'POPUP_FORM_ALREADY_ACTIVE'
59
+ /** Popup Form is already paused. */
60
+ | 'POPUP_FORM_ALREADY_PAUSED';
61
+ export type PopupFormsService_List = RpcMethod<ListRequest, ListResponse>;
62
+ export type PopupFormsService_Get = RpcMethod<GetRequest, GetResponse>;
63
+ export type PopupFormsService_Create = RpcMethod<CreateRequest, CreateResponse>;
64
+ export type PopupFormsService_Update = RpcMethod<UpdateRequest, UpdateResponse>;
65
+ export type PopupFormsService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
66
+ export type PopupFormsService_Deactivate = RpcMethod<DeactivateRequest, DeactivateResponse>;
67
+ export type PopupFormsService_Activate = RpcMethod<ActivateRequest, ActivateResponse>;
68
+ export interface PopupFormsService {
69
+ /** List Popup Forms for given application and filters. */
70
+ List: PopupFormsService_List;
71
+ /** Get Popup Form by code. */
72
+ Get: PopupFormsService_Get;
73
+ /** Create new Popup Form. Popup Form code will be generated by server and returned in response. */
74
+ Create: PopupFormsService_Create;
75
+ /** Update Popup Form. */
76
+ Update: PopupFormsService_Update;
77
+ /** Delete Popup Form. */
78
+ Delete: PopupFormsService_Delete;
79
+ /** Deactivate Popup Form (set status to paused). */
80
+ Deactivate: PopupFormsService_Deactivate;
81
+ /** Activate Popup Form (set status to active). */
82
+ Activate: PopupFormsService_Activate;
83
+ }
84
+ export type PopupForm = {
85
+ /** Popup Form code. */
86
+ code: string;
87
+ /** Name of Popup Form. */
88
+ name: string;
89
+ /** Description of Popup Form. */
90
+ description?: string;
91
+ /** Status of Popup Form (active, paused, draft). */
92
+ status: string;
93
+ /** Code of associated Popup Form Content. */
94
+ popupFormContentCode: string;
95
+ /** Name of associated Popup Form Content. */
96
+ popupFormContentName: string;
97
+ /** Device type (all, mobile, desktop). */
98
+ deviceType: string;
99
+ /** Visitors type (all, new, returning). */
100
+ visitorsType: string;
101
+ /** Matching pages for display rules. Empty list means no page restrictions. */
102
+ matchingPages: string[];
103
+ /** Delay in seconds before showing the Popup Form. */
104
+ delay: number;
105
+ /** Frequency of showing (once, every_visit, once_per_session). */
106
+ frequency: string;
107
+ /** Timestamp when Popup Form was published (activated). */
108
+ published: Date;
109
+ /** Popup Form created timestamp. */
110
+ created: Date;
111
+ /** Popup Form updated timestamp. */
112
+ updated: Date;
113
+ };
114
+ export type ListRequest_OrderBy = 'PUBLISHED' | 'NAME';
115
+ export type ListRequest_OrderDirection = 'DESC' | 'ASC';
116
+ export type ListRequest = {
117
+ /** Application code to filter by. */
118
+ application?: string;
119
+ /** Search query to filter by name or code. */
120
+ search?: string;
121
+ /** Optional status filter. */
122
+ status?: string;
123
+ /** Field to order results by. */
124
+ orderBy?: ListRequest_OrderBy;
125
+ /** Order direction. */
126
+ orderDirection?: ListRequest_OrderDirection;
127
+ /** Page number. Pagination starts from 0. */
128
+ page?: number;
129
+ /** Number of items per page. */
130
+ perPage?: number;
131
+ };
132
+ export type ListResponse_ListItem = {
133
+ /** Similar to the PopupForm. */
134
+ code: string;
135
+ /** Similar to the PopupForm. */
136
+ name: string;
137
+ /** Similar to the PopupForm. */
138
+ description?: string;
139
+ /** Similar to the PopupForm. */
140
+ status: string;
141
+ /** Number of visitors. */
142
+ visitors: number;
143
+ /** Number of impressions. */
144
+ impressions: number;
145
+ /** Similar to the PopupForm. */
146
+ updated: Date;
147
+ };
148
+ export type ListResponse = {
149
+ /** List of Popup Forms for the current page. */
150
+ items: ListResponse_ListItem[];
151
+ /** Current page number. Pagination starts from 0. */
152
+ page: number;
153
+ /** Number of items per page. */
154
+ perPage: number;
155
+ /** Total number of pages. */
156
+ totalPages: number;
157
+ /** Total number of items across all pages. */
158
+ total: number;
159
+ };
160
+ export type GetRequest = {
161
+ /** Similar to the PopupForm. */
162
+ code?: string;
163
+ };
164
+ export type GetResponse = {
165
+ /** Popup Form. */
166
+ item: PopupForm;
167
+ };
168
+ export type CreateRequest = {
169
+ /** Application code to which Popup Form belongs. */
170
+ application?: string;
171
+ /** Similar to the PopupForm. */
172
+ name?: string;
173
+ /** Similar to the PopupForm. */
174
+ description?: string;
175
+ /** Similar to the PopupForm. */
176
+ popupFormContentCode?: string;
177
+ /** Similar to the PopupForm. */
178
+ deviceType?: string;
179
+ /** Similar to the PopupForm. */
180
+ visitorsType?: string;
181
+ /** Similar to the PopupForm. */
182
+ matchingPages?: string[];
183
+ /** Similar to the PopupForm. */
184
+ delay?: number;
185
+ /** Similar to the PopupForm. */
186
+ frequency?: string;
187
+ /** Similar to the PopupForm. */
188
+ status?: string;
189
+ };
190
+ export type CreateResponse = {
191
+ /** Similar to the PopupForm. */
192
+ code: string;
193
+ };
194
+ export type UpdateRequest = {
195
+ /** Similar to the PopupForm. */
196
+ code?: string;
197
+ /** Similar to the PopupForm. */
198
+ name?: string;
199
+ /** Similar to the PopupForm. */
200
+ description?: string;
201
+ /** Similar to the PopupForm. */
202
+ popupFormContentCode?: string;
203
+ /** Similar to the PopupForm. */
204
+ deviceType?: string;
205
+ /** Similar to the PopupForm. */
206
+ visitorsType?: string;
207
+ /**
208
+ * Controls how matching_pages is applied (PATCH semantics):
209
+ * - true → replace matching_pages with the provided list.
210
+ * - false → do not touch matching_pages.
211
+ * Required because proto3 cannot distinguish an unset repeated field from one explicitly set to an empty list.
212
+ */
213
+ updateMatchingPages?: boolean;
214
+ /** Similar to the PopupForm. Only applied when update_matching_pages is true. */
215
+ matchingPages?: string[];
216
+ /** Similar to the PopupForm. */
217
+ delay?: number;
218
+ /** Similar to the PopupForm. */
219
+ frequency?: string;
220
+ /** Similar to the PopupForm. */
221
+ status?: string;
222
+ };
223
+ export type UpdateResponse = {};
224
+ export type DeleteRequest = {
225
+ /** Similar to the PopupForm. */
226
+ code?: string;
227
+ };
228
+ export type DeleteResponse = {};
229
+ export type DeactivateRequest = {
230
+ /** Similar to the PopupForm. */
231
+ code?: string;
232
+ };
233
+ export type DeactivateResponse = {};
234
+ export type ActivateRequest = {
235
+ /** Similar to the PopupForm. */
236
+ code?: string;
237
+ };
238
+ export type ActivateResponse = {};
package/popup_forms.d.ts DELETED
@@ -1,106 +0,0 @@
1
- import { RpcMethod } from './commonTypes';
2
- export type PopupFormsService_List = RpcMethod<ListPopupFormsRequest, ListPopupFormsResponse>;
3
- export type PopupFormsService_Get = RpcMethod<GetPopupFormRequest, GetPopupFormResponse>;
4
- export type PopupFormsService_Delete = RpcMethod<DeletePopupFormRequest, DeletePopupFormResponse>;
5
- export type PopupFormsService_Create = RpcMethod<CreatePopupFormRequest, CreatePopupFormResponse>;
6
- export type PopupFormsService_Update = RpcMethod<UpdatePopupFormRequest, UpdatePopupFormResponse>;
7
- export type PopupFormsService_Deactivate = RpcMethod<DeactivatePopupFormRequest, DeactivatePopupFormResponse>;
8
- export type PopupFormsService_Activate = RpcMethod<ActivatePopupFormRequest, ActivatePopupFormResponse>;
9
- export interface PopupFormsService {
10
- List: PopupFormsService_List;
11
- Get: PopupFormsService_Get;
12
- Delete: PopupFormsService_Delete;
13
- Create: PopupFormsService_Create;
14
- Update: PopupFormsService_Update;
15
- Deactivate: PopupFormsService_Deactivate;
16
- Activate: PopupFormsService_Activate;
17
- }
18
- export type PopupForm = {
19
- code: string;
20
- name: string;
21
- description: string;
22
- status: string;
23
- popupFormContentCode: string;
24
- popupFormContentName: string;
25
- deviceType: string;
26
- visitorsType: string;
27
- matchingPages: string[];
28
- delay: number;
29
- frequency: string;
30
- published: Date;
31
- created: Date;
32
- updated: Date;
33
- };
34
- export type ListPopupFormsRequest_OrderBy = 'PUBLISHED' | 'NAME';
35
- export type ListPopupFormsRequest_OrderDirection = 'DESC' | 'ASC';
36
- export type ListPopupFormsRequest = {
37
- application?: string;
38
- search?: string;
39
- status?: string;
40
- orderBy?: ListPopupFormsRequest_OrderBy;
41
- orderDirection?: ListPopupFormsRequest_OrderDirection;
42
- page?: number;
43
- perPage?: number;
44
- };
45
- export type PopupFormListItem = {
46
- code: string;
47
- name: string;
48
- description: string;
49
- status: string;
50
- visitors: number;
51
- impressions: number;
52
- updated: Date;
53
- };
54
- export type ListPopupFormsResponse = {
55
- popupForms: PopupFormListItem[];
56
- page: number;
57
- perPage: number;
58
- totalPages: number;
59
- total: number;
60
- };
61
- export type GetPopupFormRequest = {
62
- code?: string;
63
- };
64
- export type GetPopupFormResponse = {
65
- popupForm: PopupForm;
66
- };
67
- export type CreatePopupFormRequest = {
68
- application?: string;
69
- name?: string;
70
- description?: string;
71
- popupFormContentCode?: string;
72
- deviceType?: string;
73
- visitorsType?: string;
74
- matchingPages?: string[];
75
- delay?: number;
76
- frequency?: string;
77
- status?: string;
78
- };
79
- export type CreatePopupFormResponse = {
80
- code: string;
81
- };
82
- export type UpdatePopupFormRequest = {
83
- code?: string;
84
- name?: string;
85
- description?: string;
86
- popupFormContentCode?: string;
87
- deviceType?: string;
88
- visitorsType?: string;
89
- matchingPages?: string[];
90
- delay?: number;
91
- frequency?: string;
92
- status?: string;
93
- };
94
- export type UpdatePopupFormResponse = {};
95
- export type DeletePopupFormRequest = {
96
- code?: string;
97
- };
98
- export type DeletePopupFormResponse = {};
99
- export type DeactivatePopupFormRequest = {
100
- code?: string;
101
- };
102
- export type DeactivatePopupFormResponse = {};
103
- export type ActivatePopupFormRequest = {
104
- code?: string;
105
- };
106
- export type ActivatePopupFormResponse = {};