@flexprice/sdk 1.0.16 → 1.0.17

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.
@@ -65,6 +65,9 @@ class DtoGetEventsRequest {
65
65
  if (data.hasOwnProperty('offset')) {
66
66
  obj['offset'] = ApiClient.convertToType(data['offset'], 'Number');
67
67
  }
68
+ if (data.hasOwnProperty('order')) {
69
+ obj['order'] = ApiClient.convertToType(data['order'], 'String');
70
+ }
68
71
  if (data.hasOwnProperty('page_size')) {
69
72
  obj['page_size'] = ApiClient.convertToType(data['page_size'], 'Number');
70
73
  }
@@ -73,6 +76,9 @@ class DtoGetEventsRequest {
73
76
  'String': ['String']
74
77
  });
75
78
  }
79
+ if (data.hasOwnProperty('sort')) {
80
+ obj['sort'] = ApiClient.convertToType(data['sort'], 'String');
81
+ }
76
82
  if (data.hasOwnProperty('source')) {
77
83
  obj['source'] = ApiClient.convertToType(data['source'], 'String');
78
84
  }
@@ -114,6 +120,14 @@ class DtoGetEventsRequest {
114
120
  throw new Error("Expected the field `iter_last_key` to be a primitive type in the JSON string but got " + data['iter_last_key']);
115
121
  }
116
122
  // ensure the json data is a string
123
+ if (data['order'] && !(typeof data['order'] === 'string' || data['order'] instanceof String)) {
124
+ throw new Error("Expected the field `order` to be a primitive type in the JSON string but got " + data['order']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['sort'] && !(typeof data['sort'] === 'string' || data['sort'] instanceof String)) {
128
+ throw new Error("Expected the field `sort` to be a primitive type in the JSON string but got " + data['sort']);
129
+ }
130
+ // ensure the json data is a string
117
131
  if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
118
132
  throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
119
133
  }
@@ -167,6 +181,12 @@ DtoGetEventsRequest.prototype['iter_last_key'] = undefined;
167
181
  */
168
182
  DtoGetEventsRequest.prototype['offset'] = undefined;
169
183
 
184
+ /**
185
+ * Order by condition. Allowed values (case sensitive): asc, desc (default: desc)
186
+ * @member {String} order
187
+ */
188
+ DtoGetEventsRequest.prototype['order'] = undefined;
189
+
170
190
  /**
171
191
  * Page size to fetch the events and is set to 50 by default
172
192
  * @member {Number} page_size
@@ -179,6 +199,12 @@ DtoGetEventsRequest.prototype['page_size'] = undefined;
179
199
  */
180
200
  DtoGetEventsRequest.prototype['property_filters'] = undefined;
181
201
 
202
+ /**
203
+ * Sort by the field. Allowed values (case sensitive): timestamp, event_name (default: timestamp)
204
+ * @member {String} sort
205
+ */
206
+ DtoGetEventsRequest.prototype['sort'] = undefined;
207
+
182
208
  /**
183
209
  * Source to filter the events by the source
184
210
  * @member {String} source
@@ -12,6 +12,7 @@
12
12
  */
13
13
 
14
14
  import ApiClient from '../ApiClient';
15
+ import TypesWindowSize from './TypesWindowSize';
15
16
 
16
17
  /**
17
18
  * The DtoGetUsageAnalyticsRequest model module.
@@ -66,7 +67,7 @@ class DtoGetUsageAnalyticsRequest {
66
67
  obj['start_time'] = ApiClient.convertToType(data['start_time'], 'String');
67
68
  }
68
69
  if (data.hasOwnProperty('window_size')) {
69
- obj['window_size'] = ApiClient.convertToType(data['window_size'], 'String');
70
+ obj['window_size'] = TypesWindowSize.constructFromObject(data['window_size']);
70
71
  }
71
72
  }
72
73
  return obj;
@@ -108,10 +109,6 @@ class DtoGetUsageAnalyticsRequest {
108
109
  if (data['start_time'] && !(typeof data['start_time'] === 'string' || data['start_time'] instanceof String)) {
109
110
  throw new Error("Expected the field `start_time` to be a primitive type in the JSON string but got " + data['start_time']);
110
111
  }
111
- // ensure the json data is a string
112
- if (data['window_size'] && !(typeof data['window_size'] === 'string' || data['window_size'] instanceof String)) {
113
- throw new Error("Expected the field `window_size` to be a primitive type in the JSON string but got " + data['window_size']);
114
- }
115
112
  return true;
116
113
  }
117
114
  }
@@ -149,8 +146,7 @@ DtoGetUsageAnalyticsRequest.prototype['sources'] = undefined;
149
146
  DtoGetUsageAnalyticsRequest.prototype['start_time'] = undefined;
150
147
 
151
148
  /**
152
- * e.g., \"MINUTE\", \"HOUR\", \"DAY\"
153
- * @member {String} window_size
149
+ * @member {module:model/TypesWindowSize} window_size
154
150
  */
155
151
  DtoGetUsageAnalyticsRequest.prototype['window_size'] = undefined;
156
152
  export default DtoGetUsageAnalyticsRequest;
@@ -24,18 +24,54 @@ export default class TypesWindowSize {
24
24
  */
25
25
  "WindowSizeMinute" = "MINUTE";
26
26
 
27
+ /**
28
+ * value: "15MIN"
29
+ * @const
30
+ */
31
+ "WindowSize15Min" = "15MIN";
32
+
33
+ /**
34
+ * value: "30MIN"
35
+ * @const
36
+ */
37
+ "WindowSize30Min" = "30MIN";
38
+
27
39
  /**
28
40
  * value: "HOUR"
29
41
  * @const
30
42
  */
31
43
  "WindowSizeHour" = "HOUR";
32
44
 
45
+ /**
46
+ * value: "3HOUR"
47
+ * @const
48
+ */
49
+ "WindowSize3Hour" = "3HOUR";
50
+
51
+ /**
52
+ * value: "6HOUR"
53
+ * @const
54
+ */
55
+ "WindowSize6Hour" = "6HOUR";
56
+
57
+ /**
58
+ * value: "12HOUR"
59
+ * @const
60
+ */
61
+ "WindowSize12Hour" = "12HOUR";
62
+
33
63
  /**
34
64
  * value: "DAY"
35
65
  * @const
36
66
  */
37
67
  "WindowSizeDay" = "DAY";
38
68
 
69
+ /**
70
+ * value: "WEEK"
71
+ * @const
72
+ */
73
+ "WindowSizeWeek" = "WEEK";
74
+
39
75
  /**
40
76
  * Returns a <code>TypesWindowSize</code> enum value from a Javascript object name.
41
77
  * @param {Object} data The plain JavaScript object containing the name of the enum value.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/sdk",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Official JavaScript SDK of Flexprice",
5
5
  "license": "Apache 2.0",
6
6
  "homepage": "https://flexprice.io",