@pushwoosh/rpc-v2-http-api-data 0.2.177 → 0.2.178

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 +29 -0
  2. package/geozones.d.ts +24 -0
  3. package/package.json +1 -1
package/data.js CHANGED
@@ -14830,6 +14830,26 @@ export const data = {
14830
14830
  "STATUS_INACTIVE"
14831
14831
  ]
14832
14832
  },
14833
+ "pushwoosh.rpc_v2.geozones.GeoVertex": {
14834
+ "type": "I",
14835
+ "fields": {
14836
+ "lat": {
14837
+ "type": "number"
14838
+ },
14839
+ "lng": {
14840
+ "type": "number"
14841
+ }
14842
+ }
14843
+ },
14844
+ "pushwoosh.rpc_v2.geozones.Polygon": {
14845
+ "type": "I",
14846
+ "fields": {
14847
+ "vertices": {
14848
+ "type": "pushwoosh.rpc_v2.geozones.GeoVertex",
14849
+ "array": true
14850
+ }
14851
+ }
14852
+ },
14833
14853
  "pushwoosh.rpc_v2.geozones.TimeInterval": {
14834
14854
  "type": "I",
14835
14855
  "fields": {
@@ -14936,6 +14956,9 @@ export const data = {
14936
14956
  },
14937
14957
  "status": {
14938
14958
  "type": "pushwoosh.rpc_v2.geozones.Status"
14959
+ },
14960
+ "polygon": {
14961
+ "type": "pushwoosh.rpc_v2.geozones.Polygon"
14939
14962
  }
14940
14963
  }
14941
14964
  },
@@ -14978,6 +15001,9 @@ export const data = {
14978
15001
  },
14979
15002
  "properties": {
14980
15003
  "type": "pushwoosh.rpc_v2.geozones.Properties"
15004
+ },
15005
+ "polygon": {
15006
+ "type": "pushwoosh.rpc_v2.geozones.Polygon"
14981
15007
  }
14982
15008
  }
14983
15009
  },
@@ -15047,6 +15073,9 @@ export const data = {
15047
15073
  },
15048
15074
  "properties": {
15049
15075
  "type": "pushwoosh.rpc_v2.geozones.Properties"
15076
+ },
15077
+ "polygon": {
15078
+ "type": "pushwoosh.rpc_v2.geozones.Polygon"
15050
15079
  }
15051
15080
  }
15052
15081
  },
package/geozones.d.ts CHANGED
@@ -22,6 +22,18 @@ export interface GeozonesService {
22
22
  * the persistent flag toggled by the user.
23
23
  */
24
24
  export type Status = 'STATUS_UNSPECIFIED' | 'STATUS_ACTIVE' | 'STATUS_INACTIVE';
25
+ /** GeoVertex is one corner of a polygonal geozone. */
26
+ export type GeoVertex = {
27
+ lat: number;
28
+ lng: number;
29
+ };
30
+ /**
31
+ * Polygon is the outer ring of a polygonal geozone: 3 to 100 vertices, no holes,
32
+ * no self-intersections. The ring may be sent open or closed; the server stores it open.
33
+ */
34
+ export type Polygon = {
35
+ vertices: GeoVertex[];
36
+ };
25
37
  export type TimeInterval = {
26
38
  start: string;
27
39
  end: string;
@@ -60,6 +72,8 @@ export type Geozone = {
60
72
  timetable: Timetable;
61
73
  properties: Properties;
62
74
  status: Status;
75
+ /** Set only for polygonal zones; lat/lng/range then describe the circle around it. */
76
+ polygon: Polygon;
63
77
  };
64
78
  export type CreateGeozonesRequest = {
65
79
  application?: string;
@@ -74,6 +88,11 @@ export type CreateGeozonesRequest = {
74
88
  campaign?: string;
75
89
  timetable?: Timetable;
76
90
  properties?: Properties;
91
+ /**
92
+ * Makes the zone polygonal. lat/lng/range become optional and are derived
93
+ * from the ring: centre and radius of the circle the SDK monitors.
94
+ */
95
+ polygon?: Polygon;
77
96
  };
78
97
  export type CreateGeozonesResponse = {
79
98
  geozone: Geozone;
@@ -98,6 +117,11 @@ export type UpdateGeozonesRequest = {
98
117
  campaign?: string;
99
118
  timetable?: Timetable;
100
119
  properties?: Properties;
120
+ /**
121
+ * Ring with vertices replaces the shape and re-derives lat/lng/range;
122
+ * an empty ring turns the zone back into a circle; omit to leave unchanged.
123
+ */
124
+ polygon?: Polygon;
101
125
  };
102
126
  export type UpdateGeozonesResponse = {
103
127
  geozone: Geozone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.177",
3
+ "version": "0.2.178",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",