@pushwoosh/rpc-v2-http-api-data 0.2.99 → 0.2.101

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
@@ -21562,11 +21562,8 @@ export const data = {
21562
21562
  "FILTER_EXPRESSION_INVALID",
21563
21563
  "FILTER_CODE_SEGMENT_NOT_FOUND",
21564
21564
  "FILTER_EXPRESSION_GEO_NOT_SUPPORTED",
21565
- "CONTENT_SUBSCRIPTION_MUTUALLY_EXCLUSIVE",
21566
- "CONTENT_OR_SUBSCRIPTION_REQUIRED",
21567
21565
  "SUBSCRIPTION_FORM_CODE_INVALID",
21568
21566
  "SUBSCRIPTION_FORM_CODE_EMPTY",
21569
- "POPUP_FORM_SOURCE_TYPE_IMMUTABLE",
21570
21567
  "EXCLUDED_PAGE_INVALID",
21571
21568
  "EXCLUDED_PAGE_OPERATOR_INVALID",
21572
21569
  "EXCLUDED_PAGES_TOO_MANY",
@@ -26246,6 +26243,18 @@ export const data = {
26246
26243
  "response": "pushwoosh.rpc_v2.test_devices.DeleteResponse",
26247
26244
  "method": "post",
26248
26245
  "path": "/api/test_devices:delete"
26246
+ },
26247
+ "GetAutoRegistration": {
26248
+ "request": "pushwoosh.rpc_v2.test_devices.GetAutoRegistrationRequest",
26249
+ "response": "pushwoosh.rpc_v2.test_devices.GetAutoRegistrationResponse",
26250
+ "method": "get",
26251
+ "path": "/api/test_devices/auto_registration"
26252
+ },
26253
+ "SetAutoRegistration": {
26254
+ "request": "pushwoosh.rpc_v2.test_devices.SetAutoRegistrationRequest",
26255
+ "response": "pushwoosh.rpc_v2.test_devices.SetAutoRegistrationResponse",
26256
+ "method": "post",
26257
+ "path": "/api/test_devices/auto_registration"
26249
26258
  }
26250
26259
  }
26251
26260
  },
@@ -26292,6 +26301,9 @@ export const data = {
26292
26301
  },
26293
26302
  "description": {
26294
26303
  "type": "string"
26304
+ },
26305
+ "autoCreated": {
26306
+ "type": "boolean"
26295
26307
  }
26296
26308
  }
26297
26309
  },
@@ -26350,6 +26362,47 @@ export const data = {
26350
26362
  "type": "I",
26351
26363
  "fields": {}
26352
26364
  },
26365
+ "pushwoosh.rpc_v2.test_devices.GetAutoRegistrationRequest": {
26366
+ "type": "I",
26367
+ "fields": {
26368
+ "application": {
26369
+ "type": "string"
26370
+ }
26371
+ }
26372
+ },
26373
+ "pushwoosh.rpc_v2.test_devices.GetAutoRegistrationResponse": {
26374
+ "type": "I",
26375
+ "fields": {
26376
+ "enabled": {
26377
+ "type": "boolean"
26378
+ },
26379
+ "expireAt": {
26380
+ "type": "Date"
26381
+ }
26382
+ }
26383
+ },
26384
+ "pushwoosh.rpc_v2.test_devices.SetAutoRegistrationRequest": {
26385
+ "type": "I",
26386
+ "fields": {
26387
+ "application": {
26388
+ "type": "string"
26389
+ },
26390
+ "enabled": {
26391
+ "type": "boolean"
26392
+ }
26393
+ }
26394
+ },
26395
+ "pushwoosh.rpc_v2.test_devices.SetAutoRegistrationResponse": {
26396
+ "type": "I",
26397
+ "fields": {
26398
+ "enabled": {
26399
+ "type": "boolean"
26400
+ },
26401
+ "expireAt": {
26402
+ "type": "Date"
26403
+ }
26404
+ }
26405
+ },
26353
26406
  "pushwoosh.rpc_v2.users.UsersService": {
26354
26407
  "type": "S",
26355
26408
  "key": "users",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.99",
3
+ "version": "0.2.101",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -67,16 +67,10 @@ export type PopupFormsServiceErrors =
67
67
  | 'FILTER_CODE_SEGMENT_NOT_FOUND'
68
68
  /** filter_expression contains geo conditions, which are not supported for web popups. */
69
69
  | 'FILTER_EXPRESSION_GEO_NOT_SUPPORTED'
70
- /** popup_form_content_code and subscription_form_code are mutually exclusive. */
71
- | 'CONTENT_SUBSCRIPTION_MUTUALLY_EXCLUSIVE'
72
- /** Exactly one of popup_form_content_code / subscription_form_code is required. */
73
- | 'CONTENT_OR_SUBSCRIPTION_REQUIRED'
74
70
  /** Subscription form code is invalid. */
75
71
  | 'SUBSCRIPTION_FORM_CODE_INVALID'
76
72
  /** Subscription form code is required. */
77
73
  | 'SUBSCRIPTION_FORM_CODE_EMPTY'
78
- /** Cannot switch a popup form between a content and a subscription form via update. */
79
- | 'POPUP_FORM_SOURCE_TYPE_IMMUTABLE'
80
74
  /**
81
75
  * Excluded page path has invalid format.
82
76
  * args: page - the invalid excluded page path value.
@@ -118,11 +112,11 @@ export type PopupFormsService_Activate = RpcMethod<ActivateRequest, ActivateResp
118
112
  export interface PopupFormsService {
119
113
  /** Lists web popup forms for an application code, newest-published first, with paging, name/code search and an optional status filter; each item carries visitor and impression counts. Use to browse popup forms or find a popup form code before fetching details. */
120
114
  List: PopupFormsService_List;
121
- /** Returns a single web popup form by its popup form code, including status, display rules, audience targeting and the associated content or subscription form. Use after list_popup_forms to inspect one form's full configuration. */
115
+ /** Returns a single web popup form by its popup form code, including status, display rules, audience targeting and the associated content and subscription form. Use after list_popup_forms to inspect one form's full configuration. */
122
116
  Get: PopupFormsService_Get;
123
- /** Creates a new web popup form under an application code from either a popup form content code or a subscription form code (exactly one), returning the server-generated popup form code. The name must be unique within the application. */
117
+ /** Creates a new web popup form under an application code from a popup form content code, optionally referencing a subscription form as well, returning the server-generated popup form code. The name must be unique within the application. */
124
118
  Create: PopupFormsService_Create;
125
- /** Updates an existing web popup form by code, patching name, display rules, audience and page rules per explicit update_* flags. Use to change an existing form's configuration; the source type (content vs subscription form) is immutable. */
119
+ /** Updates an existing web popup form by code, patching name, display rules, audience and page rules per explicit update_* flags. Use to change an existing form's configuration. */
126
120
  Update: PopupFormsService_Update;
127
121
  /** Permanently deletes a web popup form by its popup form code. Irreversible; use disable_popup_form instead to only pause a form while keeping it. */
128
122
  Delete: PopupFormsService_Delete;
@@ -150,17 +144,11 @@ export type PopupForm = {
150
144
  description?: string;
151
145
  /** Status of Popup Form (active, paused, draft). */
152
146
  status: string;
153
- /**
154
- * Code of associated Popup Form Content.
155
- * Set when the popup shows a content; mutually exclusive with subscription_form_code.
156
- */
147
+ /** Code of associated Popup Form Content. Always set. */
157
148
  popupFormContentCode: string;
158
149
  /** Name of associated Popup Form Content. */
159
150
  popupFormContentName: string;
160
- /**
161
- * Code of associated subscription form.
162
- * Set when the popup shows a subscription form; mutually exclusive with popup_form_content_code.
163
- */
151
+ /** Code of associated subscription form. Optional, accompanies the content. */
164
152
  subscriptionFormCode: string;
165
153
  /** Name of associated subscription form. */
166
154
  subscriptionFormName: string;
@@ -268,9 +256,9 @@ export type CreateRequest = {
268
256
  name?: string;
269
257
  /** Similar to the PopupForm. */
270
258
  description?: string;
271
- /** Similar to the PopupForm. Provide exactly one of popup_form_content_code / subscription_form_code. */
259
+ /** Similar to the PopupForm. Required. */
272
260
  popupFormContentCode?: string;
273
- /** Similar to the PopupForm. Provide exactly one of popup_form_content_code / subscription_form_code. */
261
+ /** Similar to the PopupForm. Optional. */
274
262
  subscriptionFormCode?: string;
275
263
  /** Similar to the PopupForm. */
276
264
  deviceType?: string;
@@ -309,19 +297,9 @@ export type UpdateRequest = {
309
297
  name?: string;
310
298
  /** Similar to the PopupForm. */
311
299
  description?: string;
312
- /**
313
- * Similar to the PopupForm. Only valid for a content-based popup form (one
314
- * that was created with popup_form_content_code); updates the referenced
315
- * content. The source type is immutable — providing this for a
316
- * subscription-form popup is rejected. Mutually exclusive with subscription_form_code.
317
- */
300
+ /** Similar to the PopupForm. Updates the referenced content. */
318
301
  popupFormContentCode?: string;
319
- /**
320
- * Similar to the PopupForm. Only valid for a subscription-form popup (one
321
- * that was created with subscription_form_code); updates the referenced
322
- * subscription form. The source type is immutable — providing this for a
323
- * content-based popup is rejected. Mutually exclusive with popup_form_content_code.
324
- */
302
+ /** Similar to the PopupForm. Updates the referenced subscription form. */
325
303
  subscriptionFormCode?: string;
326
304
  /** Similar to the PopupForm. */
327
305
  deviceType?: string;
package/test_devices.d.ts CHANGED
@@ -3,6 +3,8 @@ export type TestDevicesService_Create = RpcMethod<CreateRequest, CreateResponse>
3
3
  export type TestDevicesService_Verify = RpcMethod<VerifyRequest, VerifyResponse>;
4
4
  export type TestDevicesService_List = RpcMethod<ListRequest, ListResponse>;
5
5
  export type TestDevicesService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
6
+ export type TestDevicesService_GetAutoRegistration = RpcMethod<GetAutoRegistrationRequest, GetAutoRegistrationResponse>;
7
+ export type TestDevicesService_SetAutoRegistration = RpcMethod<SetAutoRegistrationRequest, SetAutoRegistrationResponse>;
6
8
  export interface TestDevicesService {
7
9
  /** Registers a test device for an application by push token or HWID; for email, SMS, WhatsApp and LINE platforms it instead sends a verification code to the device and returns needs_verify=true, requiring verify_test_device to finish. Use to add a device that receives test sends. */
8
10
  Create: TestDevicesService_Create;
@@ -12,6 +14,10 @@ export interface TestDevicesService {
12
14
  List: TestDevicesService_List;
13
15
  /** Removes a test device from an application by HWID or push token and clears its PW_TestDevice tag on the device. Use to stop a device from receiving test sends; cannot be undone. */
14
16
  Delete: TestDevicesService_Delete;
17
+ /** Reports whether the application currently accepts test devices registered from the app itself (the SDK knock gesture), and when that window expires. Use to render the auto-registration switch and its countdown. */
18
+ GetAutoRegistration: TestDevicesService_GetAutoRegistration;
19
+ /** Opens a one-hour window in which the application accepts test devices registered from the app itself, or closes it immediately. While the window is closed such registrations are dropped; adding a test device from the Control Panel is never affected. */
20
+ SetAutoRegistration: TestDevicesService_SetAutoRegistration;
15
21
  }
16
22
  export type TestDevice = {
17
23
  /** test device name */
@@ -55,6 +61,12 @@ export type CreateRequest = {
55
61
  name?: string;
56
62
  /** test device description. max length: 64 characters. */
57
63
  description?: string;
64
+ /**
65
+ * set by the SDK when the device registered itself through the knock gesture
66
+ * instead of being added on purpose. such registrations are only accepted
67
+ * while the auto-registration window is open.
68
+ */
69
+ autoCreated?: boolean;
58
70
  };
59
71
  export type CreateResponse = {
60
72
  needsVerify: boolean;
@@ -81,3 +93,24 @@ export type DeleteRequest = {
81
93
  pushToken?: string;
82
94
  };
83
95
  export type DeleteResponse = {};
96
+ export type GetAutoRegistrationRequest = {
97
+ /** application code */
98
+ application?: string;
99
+ };
100
+ export type GetAutoRegistrationResponse = {
101
+ /** true while the application accepts test devices registered from the app itself */
102
+ enabled: boolean;
103
+ /** when the window closes. unset when enabled is false */
104
+ expireAt: Date;
105
+ };
106
+ export type SetAutoRegistrationRequest = {
107
+ /** application code */
108
+ application?: string;
109
+ /** true opens the window for an hour, false closes it right away */
110
+ enabled?: boolean;
111
+ };
112
+ export type SetAutoRegistrationResponse = {
113
+ enabled: boolean;
114
+ /** when the window closes. unset when enabled is false */
115
+ expireAt: Date;
116
+ };