@orangefox-recovery/foxclient 5.3.3 → 6.0.4

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 (213) hide show
  1. package/.openapi-generator/FILES +20 -22
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +30 -38
  4. package/dist/apis/DeviceApi.d.ts +116 -77
  5. package/dist/apis/DeviceApi.js +85 -59
  6. package/dist/apis/PasteApi.d.ts +46 -30
  7. package/dist/apis/PasteApi.js +39 -25
  8. package/dist/apis/ReleaseApi.d.ts +177 -104
  9. package/dist/apis/ReleaseApi.js +132 -81
  10. package/dist/apis/ReportApi.d.ts +64 -0
  11. package/dist/apis/ReportApi.js +89 -0
  12. package/dist/apis/StatsApi.d.ts +25 -15
  13. package/dist/apis/StatsApi.js +22 -13
  14. package/dist/apis/index.d.ts +1 -0
  15. package/dist/apis/index.js +1 -0
  16. package/dist/esm/apis/DeviceApi.d.ts +116 -77
  17. package/dist/esm/apis/DeviceApi.js +86 -60
  18. package/dist/esm/apis/PasteApi.d.ts +46 -30
  19. package/dist/esm/apis/PasteApi.js +40 -26
  20. package/dist/esm/apis/ReleaseApi.d.ts +177 -104
  21. package/dist/esm/apis/ReleaseApi.js +133 -82
  22. package/dist/esm/apis/ReportApi.d.ts +64 -0
  23. package/dist/esm/apis/ReportApi.js +85 -0
  24. package/dist/esm/apis/StatsApi.d.ts +25 -15
  25. package/dist/esm/apis/StatsApi.js +23 -14
  26. package/dist/esm/apis/index.d.ts +1 -0
  27. package/dist/esm/apis/index.js +1 -0
  28. package/dist/esm/models/DeviceResponse.d.ts +33 -29
  29. package/dist/esm/models/DeviceResponse.js +34 -26
  30. package/dist/esm/models/ErrorResponse.d.ts +32 -0
  31. package/dist/esm/models/ErrorResponse.js +43 -0
  32. package/dist/esm/models/GlobalStatsResponse.d.ts +52 -0
  33. package/dist/esm/models/{GlobalStatsAggregationModel.js → GlobalStatsResponse.js} +14 -14
  34. package/dist/esm/models/ListResponseReleaseResponse.d.ts +8 -8
  35. package/dist/esm/models/ListResponseReleaseResponse.js +8 -7
  36. package/dist/esm/models/ListResponseReleaseResponseDataInner.d.ts +155 -0
  37. package/dist/esm/models/ListResponseReleaseResponseDataInner.js +114 -0
  38. package/dist/esm/models/ListResponseShortDeviceResponse.d.ts +8 -8
  39. package/dist/esm/models/ListResponseShortDeviceResponse.js +8 -7
  40. package/dist/esm/models/ListResponseShortDeviceResponseDataInner.d.ts +98 -0
  41. package/dist/esm/models/ListResponseShortDeviceResponseDataInner.js +85 -0
  42. package/dist/esm/models/ListResponseString.d.ts +38 -0
  43. package/dist/esm/models/ListResponseString.js +47 -0
  44. package/dist/esm/models/MaintainerShortResponse.d.ts +50 -0
  45. package/dist/esm/models/MaintainerShortResponse.js +55 -0
  46. package/dist/esm/models/NewReportRequest.d.ts +58 -0
  47. package/dist/esm/models/NewReportRequest.js +55 -0
  48. package/dist/esm/models/PasteInput.d.ts +3 -3
  49. package/dist/esm/models/PasteInput.js +2 -2
  50. package/dist/esm/models/PasteResponse.d.ts +50 -0
  51. package/dist/esm/models/PasteResponse.js +53 -0
  52. package/dist/esm/models/RecoveryImgResponse.d.ts +6 -6
  53. package/dist/esm/models/RecoveryImgResponse.js +6 -6
  54. package/dist/esm/models/ReleaseGroupsResponse.d.ts +2 -2
  55. package/dist/esm/models/ReleaseGroupsResponse.js +2 -2
  56. package/dist/esm/models/ReleaseResponse.d.ts +46 -42
  57. package/dist/esm/models/ReleaseResponse.js +45 -44
  58. package/dist/esm/models/ShortDeviceResponse.d.ts +29 -25
  59. package/dist/esm/models/ShortDeviceResponse.js +26 -18
  60. package/dist/esm/models/ShortReleaseResponse.d.ts +31 -27
  61. package/dist/esm/models/ShortReleaseResponse.js +35 -32
  62. package/dist/esm/models/TokenResponse.d.ts +38 -0
  63. package/dist/esm/models/TokenResponse.js +47 -0
  64. package/dist/esm/models/index.d.ts +9 -11
  65. package/dist/esm/models/index.js +9 -11
  66. package/dist/esm/runtime.d.ts +2 -2
  67. package/dist/esm/runtime.js +17 -2
  68. package/dist/models/DeviceResponse.d.ts +33 -29
  69. package/dist/models/DeviceResponse.js +34 -26
  70. package/dist/models/ErrorResponse.d.ts +32 -0
  71. package/dist/models/ErrorResponse.js +50 -0
  72. package/dist/models/GlobalStatsResponse.d.ts +52 -0
  73. package/dist/models/GlobalStatsResponse.js +62 -0
  74. package/dist/models/ListResponseReleaseResponse.d.ts +8 -8
  75. package/dist/models/ListResponseReleaseResponse.js +8 -7
  76. package/dist/models/ListResponseReleaseResponseDataInner.d.ts +155 -0
  77. package/dist/models/ListResponseReleaseResponseDataInner.js +121 -0
  78. package/dist/models/ListResponseShortDeviceResponse.d.ts +8 -8
  79. package/dist/models/ListResponseShortDeviceResponse.js +8 -7
  80. package/dist/models/ListResponseShortDeviceResponseDataInner.d.ts +98 -0
  81. package/dist/models/ListResponseShortDeviceResponseDataInner.js +92 -0
  82. package/dist/models/ListResponseString.d.ts +38 -0
  83. package/dist/models/ListResponseString.js +54 -0
  84. package/dist/models/MaintainerShortResponse.d.ts +50 -0
  85. package/dist/models/MaintainerShortResponse.js +62 -0
  86. package/dist/models/NewReportRequest.d.ts +58 -0
  87. package/dist/models/NewReportRequest.js +62 -0
  88. package/dist/models/PasteInput.d.ts +3 -3
  89. package/dist/models/PasteInput.js +2 -2
  90. package/dist/models/PasteResponse.d.ts +50 -0
  91. package/dist/models/PasteResponse.js +60 -0
  92. package/dist/models/RecoveryImgResponse.d.ts +6 -6
  93. package/dist/models/RecoveryImgResponse.js +6 -6
  94. package/dist/models/ReleaseGroupsResponse.d.ts +2 -2
  95. package/dist/models/ReleaseGroupsResponse.js +2 -2
  96. package/dist/models/ReleaseResponse.d.ts +46 -42
  97. package/dist/models/ReleaseResponse.js +45 -44
  98. package/dist/models/ShortDeviceResponse.d.ts +29 -25
  99. package/dist/models/ShortDeviceResponse.js +26 -18
  100. package/dist/models/ShortReleaseResponse.d.ts +31 -27
  101. package/dist/models/ShortReleaseResponse.js +35 -32
  102. package/dist/models/TokenResponse.d.ts +38 -0
  103. package/dist/models/TokenResponse.js +54 -0
  104. package/dist/models/index.d.ts +9 -11
  105. package/dist/models/index.js +9 -11
  106. package/dist/runtime.d.ts +2 -2
  107. package/dist/runtime.js +17 -2
  108. package/docs/DeviceApi.md +83 -90
  109. package/docs/DeviceResponse.md +19 -17
  110. package/docs/{ReleasesSort.md → ErrorResponse.md} +6 -4
  111. package/docs/{GlobalStatsAggregationModel.md → GlobalStatsResponse.md} +6 -6
  112. package/docs/ListResponseReleaseResponse.md +2 -2
  113. package/docs/ListResponseReleaseResponseDataInner.md +74 -0
  114. package/docs/ListResponseShortDeviceResponse.md +2 -2
  115. package/docs/ListResponseShortDeviceResponseDataInner.md +56 -0
  116. package/docs/{ListResponseStr.md → ListResponseString.md} +6 -6
  117. package/docs/{MaintainerShortModel.md → MaintainerShortResponse.md} +9 -7
  118. package/docs/{ListResponseShortReleaseResponse.md → NewReportRequest.md} +14 -8
  119. package/docs/PasteApi.md +25 -29
  120. package/docs/{PasteOutput.md → PasteResponse.md} +7 -7
  121. package/docs/RecoveryImgResponse.md +2 -2
  122. package/docs/ReleaseApi.md +176 -118
  123. package/docs/ReleaseResponse.md +28 -26
  124. package/docs/ReportApi.md +84 -0
  125. package/docs/ShortDeviceResponse.md +14 -12
  126. package/docs/ShortReleaseResponse.md +22 -20
  127. package/docs/StatsApi.md +10 -10
  128. package/docs/{ValidationErrorLocInner.md → TokenResponse.md} +8 -4
  129. package/package.json +3 -13
  130. package/src/apis/DeviceApi.ts +175 -116
  131. package/src/apis/PasteApi.ts +72 -46
  132. package/src/apis/ReleaseApi.ts +281 -181
  133. package/src/apis/ReportApi.ts +139 -0
  134. package/src/apis/StatsApi.ts +40 -22
  135. package/src/apis/index.ts +1 -0
  136. package/src/models/DeviceResponse.ts +65 -55
  137. package/src/models/ErrorResponse.ts +66 -0
  138. package/src/models/GlobalStatsResponse.ts +93 -0
  139. package/src/models/ListResponseReleaseResponse.ts +17 -16
  140. package/src/models/ListResponseReleaseResponseDataInner.ts +249 -0
  141. package/src/models/ListResponseShortDeviceResponse.ts +17 -16
  142. package/src/models/ListResponseShortDeviceResponseDataInner.ts +164 -0
  143. package/src/models/ListResponseString.ts +75 -0
  144. package/src/models/MaintainerShortResponse.ts +93 -0
  145. package/src/models/NewReportRequest.ts +100 -0
  146. package/src/models/PasteInput.ts +3 -3
  147. package/src/models/PasteResponse.ts +92 -0
  148. package/src/models/RecoveryImgResponse.ts +9 -9
  149. package/src/models/ReleaseGroupsResponse.ts +2 -2
  150. package/src/models/ReleaseResponse.ts +85 -86
  151. package/src/models/ShortDeviceResponse.ts +50 -40
  152. package/src/models/ShortReleaseResponse.ts +62 -64
  153. package/src/models/TokenResponse.ts +75 -0
  154. package/src/models/index.ts +9 -11
  155. package/src/runtime.ts +20 -2
  156. package/dist/esm/models/GlobalStatsAggregationModel.d.ts +0 -52
  157. package/dist/esm/models/HTTPValidationError.d.ts +0 -33
  158. package/dist/esm/models/HTTPValidationError.js +0 -42
  159. package/dist/esm/models/ListResponseShortReleaseResponse.d.ts +0 -39
  160. package/dist/esm/models/ListResponseShortReleaseResponse.js +0 -47
  161. package/dist/esm/models/ListResponseStr.d.ts +0 -38
  162. package/dist/esm/models/ListResponseStr.js +0 -46
  163. package/dist/esm/models/MaintainerShortModel.d.ts +0 -44
  164. package/dist/esm/models/MaintainerShortModel.js +0 -51
  165. package/dist/esm/models/PasteOutput.d.ts +0 -50
  166. package/dist/esm/models/PasteOutput.js +0 -53
  167. package/dist/esm/models/ReleaseType.d.ts +0 -26
  168. package/dist/esm/models/ReleaseType.js +0 -44
  169. package/dist/esm/models/ReleasesSort.d.ts +0 -25
  170. package/dist/esm/models/ReleasesSort.js +0 -43
  171. package/dist/esm/models/ResponseGetReleases.d.ts +0 -41
  172. package/dist/esm/models/ResponseGetReleases.js +0 -46
  173. package/dist/esm/models/ValidationError.d.ts +0 -45
  174. package/dist/esm/models/ValidationError.js +0 -52
  175. package/dist/esm/models/ValidationErrorLocInner.d.ts +0 -26
  176. package/dist/esm/models/ValidationErrorLocInner.js +0 -31
  177. package/dist/models/GlobalStatsAggregationModel.d.ts +0 -52
  178. package/dist/models/GlobalStatsAggregationModel.js +0 -62
  179. package/dist/models/HTTPValidationError.d.ts +0 -33
  180. package/dist/models/HTTPValidationError.js +0 -49
  181. package/dist/models/ListResponseShortReleaseResponse.d.ts +0 -39
  182. package/dist/models/ListResponseShortReleaseResponse.js +0 -54
  183. package/dist/models/ListResponseStr.d.ts +0 -38
  184. package/dist/models/ListResponseStr.js +0 -53
  185. package/dist/models/MaintainerShortModel.d.ts +0 -44
  186. package/dist/models/MaintainerShortModel.js +0 -58
  187. package/dist/models/PasteOutput.d.ts +0 -50
  188. package/dist/models/PasteOutput.js +0 -60
  189. package/dist/models/ReleaseType.d.ts +0 -26
  190. package/dist/models/ReleaseType.js +0 -52
  191. package/dist/models/ReleasesSort.d.ts +0 -25
  192. package/dist/models/ReleasesSort.js +0 -51
  193. package/dist/models/ResponseGetReleases.d.ts +0 -41
  194. package/dist/models/ResponseGetReleases.js +0 -53
  195. package/dist/models/ValidationError.d.ts +0 -45
  196. package/dist/models/ValidationError.js +0 -59
  197. package/dist/models/ValidationErrorLocInner.d.ts +0 -26
  198. package/dist/models/ValidationErrorLocInner.js +0 -38
  199. package/docs/HTTPValidationError.md +0 -34
  200. package/docs/ReleaseType.md +0 -32
  201. package/docs/ResponseGetReleases.md +0 -36
  202. package/docs/ValidationError.md +0 -38
  203. package/src/models/GlobalStatsAggregationModel.ts +0 -93
  204. package/src/models/HTTPValidationError.ts +0 -73
  205. package/src/models/ListResponseShortReleaseResponse.ts +0 -82
  206. package/src/models/ListResponseStr.ts +0 -74
  207. package/src/models/MaintainerShortModel.ts +0 -84
  208. package/src/models/PasteOutput.ts +0 -92
  209. package/src/models/ReleaseType.ts +0 -54
  210. package/src/models/ReleasesSort.ts +0 -53
  211. package/src/models/ResponseGetReleases.ts +0 -96
  212. package/src/models/ValidationError.ts +0 -92
  213. package/src/models/ValidationErrorLocInner.ts +0 -46
@@ -3,9 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Fox API
6
- * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
6
+ * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
7
7
  *
8
- * The version of the OpenAPI document: 5.3.3
8
+ * The version of the OpenAPI document: 6.0.4
9
9
  * Contact: admin@orangefox.tech
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -30,35 +30,42 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class DeviceApi extends runtime.BaseAPI {
32
32
  /**
33
- * Extended get device method, including the ability to get a device using device codename instead of the ID. /device/get?codename=lavender Due to the reasons mentioned in the /device route, identification devices using their codenames are considered unrecommended.
34
- * Get Device
33
+ * Creates request options for getDevice without sending the request
35
34
  */
36
- getDeviceRaw(requestParameters, initOverrides) {
35
+ getDeviceRequestOpts(requestParameters) {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  const queryParameters = {};
39
38
  if (requestParameters['deviceId'] != null) {
40
39
  queryParameters['device_id'] = requestParameters['deviceId'];
41
40
  }
42
- if (requestParameters['id'] != null) {
43
- queryParameters['_id'] = requestParameters['id'];
44
- }
45
41
  if (requestParameters['codename'] != null) {
46
42
  queryParameters['codename'] = requestParameters['codename'];
47
43
  }
44
+ if (requestParameters['id'] != null) {
45
+ queryParameters['_id'] = requestParameters['id'];
46
+ }
48
47
  const headerParameters = {};
49
48
  let urlPath = `/devices/get`;
50
- const response = yield this.request({
49
+ return {
51
50
  path: urlPath,
52
51
  method: 'GET',
53
52
  headers: headerParameters,
54
53
  query: queryParameters,
55
- }, initOverrides);
54
+ };
55
+ });
56
+ }
57
+ /**
58
+ * GET /devices/get - Get a single device by device_id, codename, or _id.
59
+ */
60
+ getDeviceRaw(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const requestOptions = yield this.getDeviceRequestOpts(requestParameters);
63
+ const response = yield this.request(requestOptions, initOverrides);
56
64
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceResponseFromJSON)(jsonValue));
57
65
  });
58
66
  }
59
67
  /**
60
- * Extended get device method, including the ability to get a device using device codename instead of the ID. /device/get?codename=lavender Due to the reasons mentioned in the /device route, identification devices using their codenames are considered unrecommended.
61
- * Get Device
68
+ * GET /devices/get - Get a single device by device_id, codename, or _id.
62
69
  */
63
70
  getDevice() {
64
71
  return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
@@ -67,44 +74,83 @@ class DeviceApi extends runtime.BaseAPI {
67
74
  });
68
75
  }
69
76
  /**
70
- * Gets device info using device ID.
71
- * Get Device Short
72
- * @deprecated
77
+ * Creates request options for getDeviceById without sending the request
73
78
  */
74
- getDeviceDeprecatedRaw(requestParameters, initOverrides) {
79
+ getDeviceByIdRequestOpts(requestParameters) {
75
80
  return __awaiter(this, void 0, void 0, function* () {
76
81
  if (requestParameters['deviceId'] == null) {
77
- throw new runtime.RequiredError('deviceId', 'Required parameter "deviceId" was null or undefined when calling getDeviceDeprecated().');
82
+ throw new runtime.RequiredError('deviceId', 'Required parameter "deviceId" was null or undefined when calling getDeviceById().');
78
83
  }
79
84
  const queryParameters = {};
80
85
  const headerParameters = {};
81
86
  let urlPath = `/devices/{device_id}`;
82
87
  urlPath = urlPath.replace(`{${"device_id"}}`, encodeURIComponent(String(requestParameters['deviceId'])));
83
- const response = yield this.request({
88
+ return {
84
89
  path: urlPath,
85
90
  method: 'GET',
86
91
  headers: headerParameters,
87
92
  query: queryParameters,
88
- }, initOverrides);
93
+ };
94
+ });
95
+ }
96
+ /**
97
+ * GET /devices/{device_id} - Get device by ID (deprecated).
98
+ */
99
+ getDeviceByIdRaw(requestParameters, initOverrides) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ const requestOptions = yield this.getDeviceByIdRequestOpts(requestParameters);
102
+ const response = yield this.request(requestOptions, initOverrides);
89
103
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeviceResponseFromJSON)(jsonValue));
90
104
  });
91
105
  }
92
106
  /**
93
- * Gets device info using device ID.
94
- * Get Device Short
95
- * @deprecated
107
+ * GET /devices/{device_id} - Get device by ID (deprecated).
108
+ */
109
+ getDeviceById(requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const response = yield this.getDeviceByIdRaw(requestParameters, initOverrides);
112
+ return yield response.value();
113
+ });
114
+ }
115
+ /**
116
+ * Creates request options for getOems without sending the request
117
+ */
118
+ getOemsRequestOpts() {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const queryParameters = {};
121
+ const headerParameters = {};
122
+ let urlPath = `/oems`;
123
+ return {
124
+ path: urlPath,
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ };
129
+ });
130
+ }
131
+ /**
132
+ * GET /oems - Get a list of all unique OEM names.
133
+ */
134
+ getOemsRaw(initOverrides) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const requestOptions = yield this.getOemsRequestOpts();
137
+ const response = yield this.request(requestOptions, initOverrides);
138
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListResponseStringFromJSON)(jsonValue));
139
+ });
140
+ }
141
+ /**
142
+ * GET /oems - Get a list of all unique OEM names.
96
143
  */
97
- getDeviceDeprecated(requestParameters, initOverrides) {
144
+ getOems(initOverrides) {
98
145
  return __awaiter(this, void 0, void 0, function* () {
99
- const response = yield this.getDeviceDeprecatedRaw(requestParameters, initOverrides);
146
+ const response = yield this.getOemsRaw(initOverrides);
100
147
  return yield response.value();
101
148
  });
102
149
  }
103
150
  /**
104
- * Get a device list. Device ID is the internal OrangeFox device identifier (https://www.mongodb.com/docs/manual/reference/method/ObjectId/). Please only use it for identification instead of codename or model_name if it\'s possible. You would find two Device ID query parameters here, the _id one is left deprecated due to historical reasons, please use id instead. Please note that using model_name is unrecommended and considered deprecated as it\'s very inconsistent around some OEMs that play with the names around. As of the current moment, the API won\'t support unified model names at all! In short, do not use model_name as device\'s identification. Be careful using codenames, there are a lot of problems and pain about those. Some OEMs keep releasing new phones with the same hardware as the old ones and may or may not update or change the codename for those. Currently, API doesn\'t support unified devices; they would have only one codename. Our OEMs database would not include subbrands, they instead would be added to the model name. Like oem_name: \"Xiaomi\" model_name: \"Poco F5 Pro\". The exclusions are merged ones, like OnePlus, as calling those BBK OnePlus is really weird in the respective communities. Note: You will get only a shortened device object with this method, if you want to get a full one, use \"/device/<device_id>\" or \"/device/get\" method instead.
105
- * Get Devices
151
+ * Creates request options for listDevices without sending the request
106
152
  */
107
- getDevicesRaw(requestParameters, initOverrides) {
153
+ listDevicesRequestOpts(requestParameters) {
108
154
  return __awaiter(this, void 0, void 0, function* () {
109
155
  const queryParameters = {};
110
156
  if (requestParameters['id'] != null) {
@@ -141,51 +187,31 @@ class DeviceApi extends runtime.BaseAPI {
141
187
  queryParameters['limit'] = requestParameters['limit'];
142
188
  }
143
189
  const headerParameters = {};
144
- let urlPath = `/devices/`;
145
- const response = yield this.request({
190
+ let urlPath = `/devices`;
191
+ return {
146
192
  path: urlPath,
147
193
  method: 'GET',
148
194
  headers: headerParameters,
149
195
  query: queryParameters,
150
- }, initOverrides);
151
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListResponseShortDeviceResponseFromJSON)(jsonValue));
196
+ };
152
197
  });
153
198
  }
154
199
  /**
155
- * Get a device list. Device ID is the internal OrangeFox device identifier (https://www.mongodb.com/docs/manual/reference/method/ObjectId/). Please only use it for identification instead of codename or model_name if it\'s possible. You would find two Device ID query parameters here, the _id one is left deprecated due to historical reasons, please use id instead. Please note that using model_name is unrecommended and considered deprecated as it\'s very inconsistent around some OEMs that play with the names around. As of the current moment, the API won\'t support unified model names at all! In short, do not use model_name as device\'s identification. Be careful using codenames, there are a lot of problems and pain about those. Some OEMs keep releasing new phones with the same hardware as the old ones and may or may not update or change the codename for those. Currently, API doesn\'t support unified devices; they would have only one codename. Our OEMs database would not include subbrands, they instead would be added to the model name. Like oem_name: \"Xiaomi\" model_name: \"Poco F5 Pro\". The exclusions are merged ones, like OnePlus, as calling those BBK OnePlus is really weird in the respective communities. Note: You will get only a shortened device object with this method, if you want to get a full one, use \"/device/<device_id>\" or \"/device/get\" method instead.
156
- * Get Devices
200
+ * GET /devices/ - List devices with filters.
157
201
  */
158
- getDevices() {
159
- return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
160
- const response = yield this.getDevicesRaw(requestParameters, initOverrides);
161
- return yield response.value();
162
- });
163
- }
164
- /**
165
- * Lists all OEM names
166
- * Get Oems
167
- */
168
- getOemsRaw(initOverrides) {
202
+ listDevicesRaw(requestParameters, initOverrides) {
169
203
  return __awaiter(this, void 0, void 0, function* () {
170
- const queryParameters = {};
171
- const headerParameters = {};
172
- let urlPath = `/oems/`;
173
- const response = yield this.request({
174
- path: urlPath,
175
- method: 'GET',
176
- headers: headerParameters,
177
- query: queryParameters,
178
- }, initOverrides);
179
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListResponseStrFromJSON)(jsonValue));
204
+ const requestOptions = yield this.listDevicesRequestOpts(requestParameters);
205
+ const response = yield this.request(requestOptions, initOverrides);
206
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListResponseShortDeviceResponseFromJSON)(jsonValue));
180
207
  });
181
208
  }
182
209
  /**
183
- * Lists all OEM names
184
- * Get Oems
210
+ * GET /devices/ - List devices with filters.
185
211
  */
186
- getOems(initOverrides) {
187
- return __awaiter(this, void 0, void 0, function* () {
188
- const response = yield this.getOemsRaw(initOverrides);
212
+ listDevices() {
213
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
214
+ const response = yield this.listDevicesRaw(requestParameters, initOverrides);
189
215
  return yield response.value();
190
216
  });
191
217
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Fox API
3
- * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
3
+ * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
4
4
  *
5
- * The version of the OpenAPI document: 5.3.3
5
+ * The version of the OpenAPI document: 6.0.4
6
6
  * Contact: admin@orangefox.tech
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,11 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PasteInput, PasteOutput } from '../models/index';
14
- export interface CreatePastePastePostRequest {
13
+ import type { PasteInput, PasteResponse } from '../models/index';
14
+ export interface CreatePasteRequest {
15
15
  pasteInput: PasteInput;
16
16
  }
17
- export interface GetPastePastePasteIdGetRequest {
17
+ export interface GetPasteRequest {
18
18
  pasteId: string;
19
19
  }
20
20
  /**
@@ -25,56 +25,72 @@ export interface GetPastePastePasteIdGetRequest {
25
25
  */
26
26
  export interface PasteApiInterface {
27
27
  /**
28
- * Create a new paste.
29
- * @summary Create Paste
28
+ * Creates request options for createPaste without sending the request
29
+ * @param {PasteInput} pasteInput
30
+ * @throws {RequiredError}
31
+ * @memberof PasteApiInterface
32
+ */
33
+ createPasteRequestOpts(requestParameters: CreatePasteRequest): Promise<runtime.RequestOpts>;
34
+ /**
35
+ *
36
+ * @summary POST /paste/ - Create a new paste.
30
37
  * @param {PasteInput} pasteInput
31
38
  * @param {*} [options] Override http request option.
32
39
  * @throws {RequiredError}
33
40
  * @memberof PasteApiInterface
34
41
  */
35
- createPastePastePostRaw(requestParameters: CreatePastePastePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteOutput>>;
42
+ createPasteRaw(requestParameters: CreatePasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteResponse>>;
36
43
  /**
37
- * Create a new paste.
38
- * Create Paste
44
+ * POST /paste/ - Create a new paste.
39
45
  */
40
- createPastePastePost(requestParameters: CreatePastePastePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteOutput>;
46
+ createPaste(requestParameters: CreatePasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteResponse>;
41
47
  /**
42
- * Get a paste by ID.
43
- * @summary Get Paste
44
- * @param {string} pasteId
48
+ * Creates request options for getPaste without sending the request
49
+ * @param {string} pasteId Paste ID
50
+ * @throws {RequiredError}
51
+ * @memberof PasteApiInterface
52
+ */
53
+ getPasteRequestOpts(requestParameters: GetPasteRequest): Promise<runtime.RequestOpts>;
54
+ /**
55
+ *
56
+ * @summary GET /paste/{paste_id} - Get a paste by ID.
57
+ * @param {string} pasteId Paste ID
45
58
  * @param {*} [options] Override http request option.
46
59
  * @throws {RequiredError}
47
60
  * @memberof PasteApiInterface
48
61
  */
49
- getPastePastePasteIdGetRaw(requestParameters: GetPastePastePasteIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteOutput>>;
62
+ getPasteRaw(requestParameters: GetPasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteResponse>>;
50
63
  /**
51
- * Get a paste by ID.
52
- * Get Paste
64
+ * GET /paste/{paste_id} - Get a paste by ID.
53
65
  */
54
- getPastePastePasteIdGet(requestParameters: GetPastePastePasteIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteOutput>;
66
+ getPaste(requestParameters: GetPasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteResponse>;
55
67
  }
56
68
  /**
57
69
  *
58
70
  */
59
71
  export declare class PasteApi extends runtime.BaseAPI implements PasteApiInterface {
60
72
  /**
61
- * Create a new paste.
62
- * Create Paste
73
+ * Creates request options for createPaste without sending the request
74
+ */
75
+ createPasteRequestOpts(requestParameters: CreatePasteRequest): Promise<runtime.RequestOpts>;
76
+ /**
77
+ * POST /paste/ - Create a new paste.
78
+ */
79
+ createPasteRaw(requestParameters: CreatePasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteResponse>>;
80
+ /**
81
+ * POST /paste/ - Create a new paste.
63
82
  */
64
- createPastePastePostRaw(requestParameters: CreatePastePastePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteOutput>>;
83
+ createPaste(requestParameters: CreatePasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteResponse>;
65
84
  /**
66
- * Create a new paste.
67
- * Create Paste
85
+ * Creates request options for getPaste without sending the request
68
86
  */
69
- createPastePastePost(requestParameters: CreatePastePastePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteOutput>;
87
+ getPasteRequestOpts(requestParameters: GetPasteRequest): Promise<runtime.RequestOpts>;
70
88
  /**
71
- * Get a paste by ID.
72
- * Get Paste
89
+ * GET /paste/{paste_id} - Get a paste by ID.
73
90
  */
74
- getPastePastePasteIdGetRaw(requestParameters: GetPastePastePasteIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteOutput>>;
91
+ getPasteRaw(requestParameters: GetPasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasteResponse>>;
75
92
  /**
76
- * Get a paste by ID.
77
- * Get Paste
93
+ * GET /paste/{paste_id} - Get a paste by ID.
78
94
  */
79
- getPastePastePasteIdGet(requestParameters: GetPastePastePasteIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteOutput>;
95
+ getPaste(requestParameters: GetPasteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasteResponse>;
80
96
  }
@@ -3,9 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Fox API
6
- * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
6
+ * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
7
7
  *
8
- * The version of the OpenAPI document: 5.3.3
8
+ * The version of the OpenAPI document: 6.0.4
9
9
  * Contact: admin@orangefox.tech
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -30,67 +30,81 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class PasteApi extends runtime.BaseAPI {
32
32
  /**
33
- * Create a new paste.
34
- * Create Paste
33
+ * Creates request options for createPaste without sending the request
35
34
  */
36
- createPastePastePostRaw(requestParameters, initOverrides) {
35
+ createPasteRequestOpts(requestParameters) {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  if (requestParameters['pasteInput'] == null) {
39
- throw new runtime.RequiredError('pasteInput', 'Required parameter "pasteInput" was null or undefined when calling createPastePastePost().');
38
+ throw new runtime.RequiredError('pasteInput', 'Required parameter "pasteInput" was null or undefined when calling createPaste().');
40
39
  }
41
40
  const queryParameters = {};
42
41
  const headerParameters = {};
43
42
  headerParameters['Content-Type'] = 'application/json';
44
- let urlPath = `/paste/`;
45
- const response = yield this.request({
43
+ let urlPath = `/paste`;
44
+ return {
46
45
  path: urlPath,
47
46
  method: 'POST',
48
47
  headers: headerParameters,
49
48
  query: queryParameters,
50
49
  body: (0, index_1.PasteInputToJSON)(requestParameters['pasteInput']),
51
- }, initOverrides);
52
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PasteOutputFromJSON)(jsonValue));
50
+ };
53
51
  });
54
52
  }
55
53
  /**
56
- * Create a new paste.
57
- * Create Paste
54
+ * POST /paste/ - Create a new paste.
58
55
  */
59
- createPastePastePost(requestParameters, initOverrides) {
56
+ createPasteRaw(requestParameters, initOverrides) {
60
57
  return __awaiter(this, void 0, void 0, function* () {
61
- const response = yield this.createPastePastePostRaw(requestParameters, initOverrides);
58
+ const requestOptions = yield this.createPasteRequestOpts(requestParameters);
59
+ const response = yield this.request(requestOptions, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PasteResponseFromJSON)(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * POST /paste/ - Create a new paste.
65
+ */
66
+ createPaste(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const response = yield this.createPasteRaw(requestParameters, initOverrides);
62
69
  return yield response.value();
63
70
  });
64
71
  }
65
72
  /**
66
- * Get a paste by ID.
67
- * Get Paste
73
+ * Creates request options for getPaste without sending the request
68
74
  */
69
- getPastePastePasteIdGetRaw(requestParameters, initOverrides) {
75
+ getPasteRequestOpts(requestParameters) {
70
76
  return __awaiter(this, void 0, void 0, function* () {
71
77
  if (requestParameters['pasteId'] == null) {
72
- throw new runtime.RequiredError('pasteId', 'Required parameter "pasteId" was null or undefined when calling getPastePastePasteIdGet().');
78
+ throw new runtime.RequiredError('pasteId', 'Required parameter "pasteId" was null or undefined when calling getPaste().');
73
79
  }
74
80
  const queryParameters = {};
75
81
  const headerParameters = {};
76
82
  let urlPath = `/paste/{paste_id}`;
77
83
  urlPath = urlPath.replace(`{${"paste_id"}}`, encodeURIComponent(String(requestParameters['pasteId'])));
78
- const response = yield this.request({
84
+ return {
79
85
  path: urlPath,
80
86
  method: 'GET',
81
87
  headers: headerParameters,
82
88
  query: queryParameters,
83
- }, initOverrides);
84
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PasteOutputFromJSON)(jsonValue));
89
+ };
90
+ });
91
+ }
92
+ /**
93
+ * GET /paste/{paste_id} - Get a paste by ID.
94
+ */
95
+ getPasteRaw(requestParameters, initOverrides) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const requestOptions = yield this.getPasteRequestOpts(requestParameters);
98
+ const response = yield this.request(requestOptions, initOverrides);
99
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PasteResponseFromJSON)(jsonValue));
85
100
  });
86
101
  }
87
102
  /**
88
- * Get a paste by ID.
89
- * Get Paste
103
+ * GET /paste/{paste_id} - Get a paste by ID.
90
104
  */
91
- getPastePastePasteIdGet(requestParameters, initOverrides) {
105
+ getPaste(requestParameters, initOverrides) {
92
106
  return __awaiter(this, void 0, void 0, function* () {
93
- const response = yield this.getPastePastePasteIdGetRaw(requestParameters, initOverrides);
107
+ const response = yield this.getPasteRaw(requestParameters, initOverrides);
94
108
  return yield response.value();
95
109
  });
96
110
  }