@orangefox-recovery/foxclient 5.2.5 → 5.2.7

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 (186) hide show
  1. package/.openapi-generator/FILES +28 -27
  2. package/README.md +3 -61
  3. package/dist/apis/DeviceApi.d.ts +158 -0
  4. package/dist/apis/DeviceApi.js +188 -0
  5. package/dist/apis/PasteApi.d.ts +80 -0
  6. package/dist/apis/PasteApi.js +95 -0
  7. package/dist/apis/ReleaseApi.d.ts +188 -0
  8. package/dist/apis/ReleaseApi.js +226 -0
  9. package/dist/apis/StatsApi.d.ts +49 -0
  10. package/dist/apis/StatsApi.js +60 -0
  11. package/dist/apis/index.d.ts +4 -0
  12. package/dist/apis/index.js +22 -0
  13. package/dist/esm/apis/DeviceApi.d.ts +158 -0
  14. package/dist/esm/apis/DeviceApi.js +184 -0
  15. package/dist/esm/apis/PasteApi.d.ts +80 -0
  16. package/dist/esm/apis/PasteApi.js +91 -0
  17. package/dist/esm/apis/ReleaseApi.d.ts +188 -0
  18. package/dist/esm/apis/ReleaseApi.js +222 -0
  19. package/dist/esm/apis/StatsApi.d.ts +49 -0
  20. package/dist/esm/apis/StatsApi.js +56 -0
  21. package/dist/esm/apis/index.d.ts +4 -0
  22. package/dist/esm/apis/index.js +6 -0
  23. package/dist/esm/index.d.ts +3 -13
  24. package/dist/esm/index.js +3 -13
  25. package/dist/esm/models/DeviceResponse.d.ts +101 -0
  26. package/dist/esm/models/DeviceResponse.js +82 -0
  27. package/dist/esm/models/GlobalStatsAggregationModel.d.ts +52 -0
  28. package/dist/esm/models/GlobalStatsAggregationModel.js +55 -0
  29. package/dist/esm/models/HTTPValidationError.d.ts +33 -0
  30. package/dist/esm/models/HTTPValidationError.js +42 -0
  31. package/dist/esm/models/ListResponseReleaseResponse.d.ts +39 -0
  32. package/dist/esm/models/ListResponseReleaseResponse.js +47 -0
  33. package/dist/esm/models/ListResponseShortDeviceResponse.d.ts +39 -0
  34. package/dist/esm/models/ListResponseShortDeviceResponse.js +47 -0
  35. package/dist/esm/models/ListResponseShortReleaseResponse.d.ts +39 -0
  36. package/dist/esm/models/ListResponseShortReleaseResponse.js +47 -0
  37. package/dist/esm/models/ListResponseStr.d.ts +38 -0
  38. package/dist/esm/models/ListResponseStr.js +46 -0
  39. package/dist/esm/models/MaintainerShortModel.d.ts +44 -0
  40. package/dist/esm/models/MaintainerShortModel.js +51 -0
  41. package/dist/esm/models/PasteInput.d.ts +50 -0
  42. package/dist/esm/models/PasteInput.js +51 -0
  43. package/dist/esm/models/PasteOutput.d.ts +50 -0
  44. package/dist/esm/models/PasteOutput.js +51 -0
  45. package/dist/esm/models/RecoveryImgResponse.d.ts +38 -0
  46. package/dist/esm/models/RecoveryImgResponse.js +47 -0
  47. package/dist/esm/models/ReleaseGroupsResponse.d.ts +35 -0
  48. package/dist/esm/models/ReleaseGroupsResponse.js +43 -0
  49. package/dist/esm/models/ReleaseResponse.d.ts +139 -0
  50. package/dist/esm/models/ReleaseResponse.js +107 -0
  51. package/dist/esm/models/ReleaseType.d.ts +26 -0
  52. package/dist/esm/models/ReleaseType.js +44 -0
  53. package/dist/esm/models/ReleasesSort.d.ts +25 -0
  54. package/dist/esm/models/ReleasesSort.js +43 -0
  55. package/dist/esm/models/ResponseGetReleases.d.ts +41 -0
  56. package/dist/esm/models/ResponseGetReleases.js +46 -0
  57. package/dist/esm/models/ShortDeviceResponse.d.ts +82 -0
  58. package/dist/esm/models/ShortDeviceResponse.js +73 -0
  59. package/dist/esm/models/ShortReleaseResponse.d.ts +100 -0
  60. package/dist/esm/models/ShortReleaseResponse.js +84 -0
  61. package/dist/esm/models/ValidationError.d.ts +45 -0
  62. package/dist/esm/models/ValidationError.js +52 -0
  63. package/dist/esm/models/ValidationErrorLocInner.d.ts +26 -0
  64. package/{index.ts → dist/esm/models/ValidationErrorLocInner.js} +20 -7
  65. package/dist/esm/models/index.d.ts +20 -0
  66. package/dist/esm/models/index.js +22 -0
  67. package/dist/esm/runtime.d.ts +184 -0
  68. package/dist/esm/runtime.js +334 -0
  69. package/dist/index.d.ts +3 -13
  70. package/dist/index.js +5 -15
  71. package/dist/models/DeviceResponse.d.ts +101 -0
  72. package/dist/models/DeviceResponse.js +89 -0
  73. package/dist/models/GlobalStatsAggregationModel.d.ts +52 -0
  74. package/dist/models/GlobalStatsAggregationModel.js +62 -0
  75. package/dist/models/HTTPValidationError.d.ts +33 -0
  76. package/dist/models/HTTPValidationError.js +49 -0
  77. package/dist/models/ListResponseReleaseResponse.d.ts +39 -0
  78. package/dist/models/ListResponseReleaseResponse.js +54 -0
  79. package/dist/models/ListResponseShortDeviceResponse.d.ts +39 -0
  80. package/dist/models/ListResponseShortDeviceResponse.js +54 -0
  81. package/dist/models/ListResponseShortReleaseResponse.d.ts +39 -0
  82. package/dist/models/ListResponseShortReleaseResponse.js +54 -0
  83. package/dist/models/ListResponseStr.d.ts +38 -0
  84. package/dist/models/ListResponseStr.js +53 -0
  85. package/dist/models/MaintainerShortModel.d.ts +44 -0
  86. package/dist/models/MaintainerShortModel.js +58 -0
  87. package/dist/models/PasteInput.d.ts +50 -0
  88. package/dist/models/PasteInput.js +58 -0
  89. package/dist/models/PasteOutput.d.ts +50 -0
  90. package/dist/models/PasteOutput.js +58 -0
  91. package/dist/models/RecoveryImgResponse.d.ts +38 -0
  92. package/dist/models/RecoveryImgResponse.js +54 -0
  93. package/dist/models/ReleaseGroupsResponse.d.ts +35 -0
  94. package/dist/models/ReleaseGroupsResponse.js +50 -0
  95. package/dist/models/ReleaseResponse.d.ts +139 -0
  96. package/dist/models/ReleaseResponse.js +114 -0
  97. package/dist/models/ReleaseType.d.ts +26 -0
  98. package/dist/models/ReleaseType.js +52 -0
  99. package/dist/models/ReleasesSort.d.ts +25 -0
  100. package/dist/models/ReleasesSort.js +51 -0
  101. package/dist/models/ResponseGetReleases.d.ts +41 -0
  102. package/dist/models/ResponseGetReleases.js +53 -0
  103. package/dist/models/ShortDeviceResponse.d.ts +82 -0
  104. package/dist/models/ShortDeviceResponse.js +80 -0
  105. package/dist/models/ShortReleaseResponse.d.ts +100 -0
  106. package/dist/models/ShortReleaseResponse.js +91 -0
  107. package/dist/models/ValidationError.d.ts +45 -0
  108. package/dist/models/ValidationError.js +59 -0
  109. package/dist/models/ValidationErrorLocInner.d.ts +26 -0
  110. package/dist/models/ValidationErrorLocInner.js +38 -0
  111. package/dist/models/index.d.ts +20 -0
  112. package/dist/models/index.js +38 -0
  113. package/dist/runtime.d.ts +184 -0
  114. package/dist/runtime.js +350 -0
  115. package/package.json +4 -17
  116. package/src/apis/DeviceApi.ts +326 -0
  117. package/src/apis/PasteApi.ts +158 -0
  118. package/src/apis/ReleaseApi.ts +414 -0
  119. package/src/apis/StatsApi.ts +82 -0
  120. package/src/apis/index.ts +6 -0
  121. package/src/index.ts +5 -0
  122. package/src/models/DeviceResponse.ts +171 -0
  123. package/src/models/GlobalStatsAggregationModel.ts +93 -0
  124. package/src/models/HTTPValidationError.ts +73 -0
  125. package/src/models/ListResponseReleaseResponse.ts +82 -0
  126. package/src/models/ListResponseShortDeviceResponse.ts +82 -0
  127. package/src/models/ListResponseShortReleaseResponse.ts +82 -0
  128. package/src/models/ListResponseStr.ts +74 -0
  129. package/src/models/MaintainerShortModel.ts +84 -0
  130. package/src/models/PasteInput.ts +91 -0
  131. package/src/models/PasteOutput.ts +91 -0
  132. package/src/models/RecoveryImgResponse.ts +75 -0
  133. package/src/models/ReleaseGroupsResponse.ts +74 -0
  134. package/src/models/ReleaseResponse.ts +233 -0
  135. package/src/models/ReleaseType.ts +54 -0
  136. package/src/models/ReleasesSort.ts +53 -0
  137. package/src/models/ResponseGetReleases.ts +96 -0
  138. package/src/models/ShortDeviceResponse.ts +138 -0
  139. package/src/models/ShortReleaseResponse.ts +174 -0
  140. package/src/models/ValidationError.ts +92 -0
  141. package/src/models/ValidationErrorLocInner.ts +46 -0
  142. package/src/models/index.ts +22 -0
  143. package/src/runtime.ts +432 -0
  144. package/tsconfig.json +2 -4
  145. package/api.ts +0 -1832
  146. package/base.ts +0 -86
  147. package/common.ts +0 -150
  148. package/configuration.ts +0 -115
  149. package/dist/api.d.ts +0 -1304
  150. package/dist/api.js +0 -1001
  151. package/dist/base.d.ts +0 -66
  152. package/dist/base.js +0 -65
  153. package/dist/common.d.ts +0 -65
  154. package/dist/common.js +0 -161
  155. package/dist/configuration.d.ts +0 -91
  156. package/dist/configuration.js +0 -44
  157. package/dist/esm/api.d.ts +0 -1304
  158. package/dist/esm/api.js +0 -986
  159. package/dist/esm/base.d.ts +0 -66
  160. package/dist/esm/base.js +0 -60
  161. package/dist/esm/common.d.ts +0 -65
  162. package/dist/esm/common.js +0 -149
  163. package/dist/esm/configuration.d.ts +0 -91
  164. package/dist/esm/configuration.js +0 -40
  165. package/docs/DeviceApi.md +0 -251
  166. package/docs/DeviceResponse.md +0 -44
  167. package/docs/GlobalStatsAggregationModel.md +0 -26
  168. package/docs/HTTPValidationError.md +0 -20
  169. package/docs/ListResponseReleaseResponse.md +0 -22
  170. package/docs/ListResponseShortDeviceResponse.md +0 -22
  171. package/docs/ListResponseShortReleaseResponse.md +0 -22
  172. package/docs/ListResponseStr.md +0 -22
  173. package/docs/MaintainerShortModel.md +0 -26
  174. package/docs/RecoveryImgResponse.md +0 -22
  175. package/docs/ReleaseApi.md +0 -289
  176. package/docs/ReleaseGroupsResponse.md +0 -20
  177. package/docs/ReleaseResponse.md +0 -56
  178. package/docs/ReleaseType.md +0 -12
  179. package/docs/ReleasesSort.md +0 -10
  180. package/docs/ResponseGetReleases.md +0 -22
  181. package/docs/ShortDeviceResponse.md +0 -38
  182. package/docs/ShortReleaseResponse.md +0 -44
  183. package/docs/StatsApi.md +0 -53
  184. package/docs/ValidationError.md +0 -24
  185. package/docs/ValidationErrorLocInner.md +0 -18
  186. package/git_push.sh +0 -57
package/dist/esm/api.js DELETED
@@ -1,986 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Fox API
5
- * 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
- *
7
- * The version of the OpenAPI document: 5.2.5
8
- * Contact: admin@orangefox.tech
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import globalAxios from 'axios';
24
- // Some imports not used depending on template conditions
25
- // @ts-ignore
26
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from './common';
27
- // @ts-ignore
28
- import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
- /**
30
- *
31
- * @export
32
- * @enum {string}
33
- */
34
- export const ReleaseType = {
35
- Stable: 'stable',
36
- Beta: 'beta',
37
- Alpha: 'alpha'
38
- };
39
- /**
40
- *
41
- * @export
42
- * @enum {string}
43
- */
44
- export const ReleasesSort = {
45
- DateAsc: 'date_asc',
46
- DateDesc: 'date_desc'
47
- };
48
- /**
49
- * DeviceApi - axios parameter creator
50
- * @export
51
- */
52
- export const DeviceApiAxiosParamCreator = function (configuration) {
53
- return {
54
- /**
55
- * 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.
56
- * @summary Get Device
57
- * @param {string | null} [deviceId]
58
- * @param {string | null} [id] Filter by Device ID (deprecated)
59
- * @param {string | null} [codename] Not recommended to use when you can
60
- * @param {*} [options] Override http request option.
61
- * @throws {RequiredError}
62
- */
63
- getDevice: (deviceId_1, id_1, codename_1, ...args_1) => __awaiter(this, [deviceId_1, id_1, codename_1, ...args_1], void 0, function* (deviceId, id, codename, options = {}) {
64
- const localVarPath = `/devices/get`;
65
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
66
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
67
- let baseOptions;
68
- if (configuration) {
69
- baseOptions = configuration.baseOptions;
70
- }
71
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
72
- const localVarHeaderParameter = {};
73
- const localVarQueryParameter = {};
74
- if (deviceId !== undefined) {
75
- localVarQueryParameter['device_id'] = deviceId;
76
- }
77
- if (id !== undefined) {
78
- localVarQueryParameter['_id'] = id;
79
- }
80
- if (codename !== undefined) {
81
- localVarQueryParameter['codename'] = codename;
82
- }
83
- setSearchParams(localVarUrlObj, localVarQueryParameter);
84
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
85
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
86
- return {
87
- url: toPathString(localVarUrlObj),
88
- options: localVarRequestOptions,
89
- };
90
- }),
91
- /**
92
- * Gets device info using device ID.
93
- * @summary Get Device Short
94
- * @param {string} deviceId
95
- * @param {*} [options] Override http request option.
96
- * @deprecated
97
- * @throws {RequiredError}
98
- */
99
- getDeviceDeprecated: (deviceId_1, ...args_1) => __awaiter(this, [deviceId_1, ...args_1], void 0, function* (deviceId, options = {}) {
100
- // verify required parameter 'deviceId' is not null or undefined
101
- assertParamExists('getDeviceDeprecated', 'deviceId', deviceId);
102
- const localVarPath = `/devices/{device_id}`
103
- .replace(`{${"device_id"}}`, encodeURIComponent(String(deviceId)));
104
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
- let baseOptions;
107
- if (configuration) {
108
- baseOptions = configuration.baseOptions;
109
- }
110
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
111
- const localVarHeaderParameter = {};
112
- const localVarQueryParameter = {};
113
- setSearchParams(localVarUrlObj, localVarQueryParameter);
114
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
116
- return {
117
- url: toPathString(localVarUrlObj),
118
- options: localVarRequestOptions,
119
- };
120
- }),
121
- /**
122
- * 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.
123
- * @summary Get Devices
124
- * @param {Array<string>} [id] Filter by Device IDs
125
- * @param {Array<string>} [id2] Filter by Device IDs (deprecated)
126
- * @param {Array<string>} [oemName] Filter by OEM names
127
- * @param {Array<string>} [codename] Filter by device codenames
128
- * @param {Array<string>} [modelName] Filter by model names
129
- * @param {boolean | null} [supported] Supported status
130
- * @param {Array<string>} [maintainer] Filter by maintainer ID
131
- * @param {boolean | null} [freezed] Filter by Freezed status
132
- * @param {boolean | null} [hasReleases] Filter by has releases status
133
- * @param {number | null} [skip] Skip query results
134
- * @param {number | null} [limit] Limit query results (0 means unlimited)
135
- * @param {*} [options] Override http request option.
136
- * @throws {RequiredError}
137
- */
138
- getDevices: (id_1, id2_1, oemName_1, codename_1, modelName_1, supported_1, maintainer_1, freezed_1, hasReleases_1, skip_1, limit_1, ...args_1) => __awaiter(this, [id_1, id2_1, oemName_1, codename_1, modelName_1, supported_1, maintainer_1, freezed_1, hasReleases_1, skip_1, limit_1, ...args_1], void 0, function* (id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options = {}) {
139
- const localVarPath = `/devices/`;
140
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
141
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
- let baseOptions;
143
- if (configuration) {
144
- baseOptions = configuration.baseOptions;
145
- }
146
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
147
- const localVarHeaderParameter = {};
148
- const localVarQueryParameter = {};
149
- if (id) {
150
- localVarQueryParameter['id'] = id;
151
- }
152
- if (id2) {
153
- localVarQueryParameter['_id'] = id2;
154
- }
155
- if (oemName) {
156
- localVarQueryParameter['oem_name'] = oemName;
157
- }
158
- if (codename) {
159
- localVarQueryParameter['codename'] = codename;
160
- }
161
- if (modelName) {
162
- localVarQueryParameter['model_name'] = modelName;
163
- }
164
- if (supported !== undefined) {
165
- localVarQueryParameter['supported'] = supported;
166
- }
167
- if (maintainer) {
168
- localVarQueryParameter['maintainer'] = maintainer;
169
- }
170
- if (freezed !== undefined) {
171
- localVarQueryParameter['freezed'] = freezed;
172
- }
173
- if (hasReleases !== undefined) {
174
- localVarQueryParameter['has_releases'] = hasReleases;
175
- }
176
- if (skip !== undefined) {
177
- localVarQueryParameter['skip'] = skip;
178
- }
179
- if (limit !== undefined) {
180
- localVarQueryParameter['limit'] = limit;
181
- }
182
- setSearchParams(localVarUrlObj, localVarQueryParameter);
183
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
185
- return {
186
- url: toPathString(localVarUrlObj),
187
- options: localVarRequestOptions,
188
- };
189
- }),
190
- /**
191
- * Lists all OEM names
192
- * @summary Get Oems
193
- * @param {*} [options] Override http request option.
194
- * @throws {RequiredError}
195
- */
196
- getOems: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
197
- const localVarPath = `/oems/`;
198
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
199
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
200
- let baseOptions;
201
- if (configuration) {
202
- baseOptions = configuration.baseOptions;
203
- }
204
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
205
- const localVarHeaderParameter = {};
206
- const localVarQueryParameter = {};
207
- setSearchParams(localVarUrlObj, localVarQueryParameter);
208
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
210
- return {
211
- url: toPathString(localVarUrlObj),
212
- options: localVarRequestOptions,
213
- };
214
- }),
215
- };
216
- };
217
- /**
218
- * DeviceApi - functional programming interface
219
- * @export
220
- */
221
- export const DeviceApiFp = function (configuration) {
222
- const localVarAxiosParamCreator = DeviceApiAxiosParamCreator(configuration);
223
- return {
224
- /**
225
- * 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.
226
- * @summary Get Device
227
- * @param {string | null} [deviceId]
228
- * @param {string | null} [id] Filter by Device ID (deprecated)
229
- * @param {string | null} [codename] Not recommended to use when you can
230
- * @param {*} [options] Override http request option.
231
- * @throws {RequiredError}
232
- */
233
- getDevice(deviceId, id, codename, options) {
234
- return __awaiter(this, void 0, void 0, function* () {
235
- var _a, _b, _c;
236
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getDevice(deviceId, id, codename, options);
237
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
238
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DeviceApi.getDevice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
239
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
240
- });
241
- },
242
- /**
243
- * Gets device info using device ID.
244
- * @summary Get Device Short
245
- * @param {string} deviceId
246
- * @param {*} [options] Override http request option.
247
- * @deprecated
248
- * @throws {RequiredError}
249
- */
250
- getDeviceDeprecated(deviceId, options) {
251
- return __awaiter(this, void 0, void 0, function* () {
252
- var _a, _b, _c;
253
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getDeviceDeprecated(deviceId, options);
254
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
255
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DeviceApi.getDeviceDeprecated']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
256
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
257
- });
258
- },
259
- /**
260
- * 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.
261
- * @summary Get Devices
262
- * @param {Array<string>} [id] Filter by Device IDs
263
- * @param {Array<string>} [id2] Filter by Device IDs (deprecated)
264
- * @param {Array<string>} [oemName] Filter by OEM names
265
- * @param {Array<string>} [codename] Filter by device codenames
266
- * @param {Array<string>} [modelName] Filter by model names
267
- * @param {boolean | null} [supported] Supported status
268
- * @param {Array<string>} [maintainer] Filter by maintainer ID
269
- * @param {boolean | null} [freezed] Filter by Freezed status
270
- * @param {boolean | null} [hasReleases] Filter by has releases status
271
- * @param {number | null} [skip] Skip query results
272
- * @param {number | null} [limit] Limit query results (0 means unlimited)
273
- * @param {*} [options] Override http request option.
274
- * @throws {RequiredError}
275
- */
276
- getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options) {
277
- return __awaiter(this, void 0, void 0, function* () {
278
- var _a, _b, _c;
279
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options);
280
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
281
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DeviceApi.getDevices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
282
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
283
- });
284
- },
285
- /**
286
- * Lists all OEM names
287
- * @summary Get Oems
288
- * @param {*} [options] Override http request option.
289
- * @throws {RequiredError}
290
- */
291
- getOems(options) {
292
- return __awaiter(this, void 0, void 0, function* () {
293
- var _a, _b, _c;
294
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getOems(options);
295
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
296
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DeviceApi.getOems']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
297
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
298
- });
299
- },
300
- };
301
- };
302
- /**
303
- * DeviceApi - factory interface
304
- * @export
305
- */
306
- export const DeviceApiFactory = function (configuration, basePath, axios) {
307
- const localVarFp = DeviceApiFp(configuration);
308
- return {
309
- /**
310
- * 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.
311
- * @summary Get Device
312
- * @param {string | null} [deviceId]
313
- * @param {string | null} [id] Filter by Device ID (deprecated)
314
- * @param {string | null} [codename] Not recommended to use when you can
315
- * @param {*} [options] Override http request option.
316
- * @throws {RequiredError}
317
- */
318
- getDevice(deviceId, id, codename, options) {
319
- return localVarFp.getDevice(deviceId, id, codename, options).then((request) => request(axios, basePath));
320
- },
321
- /**
322
- * Gets device info using device ID.
323
- * @summary Get Device Short
324
- * @param {string} deviceId
325
- * @param {*} [options] Override http request option.
326
- * @deprecated
327
- * @throws {RequiredError}
328
- */
329
- getDeviceDeprecated(deviceId, options) {
330
- return localVarFp.getDeviceDeprecated(deviceId, options).then((request) => request(axios, basePath));
331
- },
332
- /**
333
- * 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.
334
- * @summary Get Devices
335
- * @param {Array<string>} [id] Filter by Device IDs
336
- * @param {Array<string>} [id2] Filter by Device IDs (deprecated)
337
- * @param {Array<string>} [oemName] Filter by OEM names
338
- * @param {Array<string>} [codename] Filter by device codenames
339
- * @param {Array<string>} [modelName] Filter by model names
340
- * @param {boolean | null} [supported] Supported status
341
- * @param {Array<string>} [maintainer] Filter by maintainer ID
342
- * @param {boolean | null} [freezed] Filter by Freezed status
343
- * @param {boolean | null} [hasReleases] Filter by has releases status
344
- * @param {number | null} [skip] Skip query results
345
- * @param {number | null} [limit] Limit query results (0 means unlimited)
346
- * @param {*} [options] Override http request option.
347
- * @throws {RequiredError}
348
- */
349
- getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options) {
350
- return localVarFp.getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options).then((request) => request(axios, basePath));
351
- },
352
- /**
353
- * Lists all OEM names
354
- * @summary Get Oems
355
- * @param {*} [options] Override http request option.
356
- * @throws {RequiredError}
357
- */
358
- getOems(options) {
359
- return localVarFp.getOems(options).then((request) => request(axios, basePath));
360
- },
361
- };
362
- };
363
- /**
364
- * DeviceApi - object-oriented interface
365
- * @export
366
- * @class DeviceApi
367
- * @extends {BaseAPI}
368
- */
369
- export class DeviceApi extends BaseAPI {
370
- /**
371
- * 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.
372
- * @summary Get Device
373
- * @param {string | null} [deviceId]
374
- * @param {string | null} [id] Filter by Device ID (deprecated)
375
- * @param {string | null} [codename] Not recommended to use when you can
376
- * @param {*} [options] Override http request option.
377
- * @throws {RequiredError}
378
- * @memberof DeviceApi
379
- */
380
- getDevice(deviceId, id, codename, options) {
381
- return DeviceApiFp(this.configuration).getDevice(deviceId, id, codename, options).then((request) => request(this.axios, this.basePath));
382
- }
383
- /**
384
- * Gets device info using device ID.
385
- * @summary Get Device Short
386
- * @param {string} deviceId
387
- * @param {*} [options] Override http request option.
388
- * @deprecated
389
- * @throws {RequiredError}
390
- * @memberof DeviceApi
391
- */
392
- getDeviceDeprecated(deviceId, options) {
393
- return DeviceApiFp(this.configuration).getDeviceDeprecated(deviceId, options).then((request) => request(this.axios, this.basePath));
394
- }
395
- /**
396
- * 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.
397
- * @summary Get Devices
398
- * @param {Array<string>} [id] Filter by Device IDs
399
- * @param {Array<string>} [id2] Filter by Device IDs (deprecated)
400
- * @param {Array<string>} [oemName] Filter by OEM names
401
- * @param {Array<string>} [codename] Filter by device codenames
402
- * @param {Array<string>} [modelName] Filter by model names
403
- * @param {boolean | null} [supported] Supported status
404
- * @param {Array<string>} [maintainer] Filter by maintainer ID
405
- * @param {boolean | null} [freezed] Filter by Freezed status
406
- * @param {boolean | null} [hasReleases] Filter by has releases status
407
- * @param {number | null} [skip] Skip query results
408
- * @param {number | null} [limit] Limit query results (0 means unlimited)
409
- * @param {*} [options] Override http request option.
410
- * @throws {RequiredError}
411
- * @memberof DeviceApi
412
- */
413
- getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options) {
414
- return DeviceApiFp(this.configuration).getDevices(id, id2, oemName, codename, modelName, supported, maintainer, freezed, hasReleases, skip, limit, options).then((request) => request(this.axios, this.basePath));
415
- }
416
- /**
417
- * Lists all OEM names
418
- * @summary Get Oems
419
- * @param {*} [options] Override http request option.
420
- * @throws {RequiredError}
421
- * @memberof DeviceApi
422
- */
423
- getOems(options) {
424
- return DeviceApiFp(this.configuration).getOems(options).then((request) => request(this.axios, this.basePath));
425
- }
426
- }
427
- /**
428
- * ReleaseApi - axios parameter creator
429
- * @export
430
- */
431
- export const ReleaseApiAxiosParamCreator = function (configuration) {
432
- return {
433
- /**
434
- * Extended get device method, including the ability to get a device using device codename instead of the ID and Build ID. Example: /device/get?codename=lavender Calling this method without parameters will return the latest available release in the database Warning: the filename identification is deprecated! Use /release/<release_id> instead!
435
- * @summary Get Release
436
- * @param {string | null} [releaseId] Release ID
437
- * @param {string | null} [id] Release ID (deprecated)
438
- * @param {string | null} [buildId] Build ID, &#x60;ro.build.fox_id&#x60; prop
439
- * @param {string | null} [filename]
440
- * @param {*} [options] Override http request option.
441
- * @throws {RequiredError}
442
- */
443
- getRelease: (releaseId_1, id_1, buildId_1, filename_1, ...args_1) => __awaiter(this, [releaseId_1, id_1, buildId_1, filename_1, ...args_1], void 0, function* (releaseId, id, buildId, filename, options = {}) {
444
- const localVarPath = `/releases/get`;
445
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
446
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
447
- let baseOptions;
448
- if (configuration) {
449
- baseOptions = configuration.baseOptions;
450
- }
451
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
452
- const localVarHeaderParameter = {};
453
- const localVarQueryParameter = {};
454
- if (releaseId !== undefined) {
455
- localVarQueryParameter['release_id'] = releaseId;
456
- }
457
- if (id !== undefined) {
458
- localVarQueryParameter['_id'] = id;
459
- }
460
- if (buildId !== undefined) {
461
- localVarQueryParameter['build_id'] = buildId;
462
- }
463
- if (filename !== undefined) {
464
- localVarQueryParameter['filename'] = filename;
465
- }
466
- setSearchParams(localVarUrlObj, localVarQueryParameter);
467
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
468
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
469
- return {
470
- url: toPathString(localVarUrlObj),
471
- options: localVarRequestOptions,
472
- };
473
- }),
474
- /**
475
- * Gets release information using the release ID, nothing to discuss really.
476
- * @summary Get Release Short
477
- * @param {string} releaseId
478
- * @param {*} [options] Override http request option.
479
- * @deprecated
480
- * @throws {RequiredError}
481
- */
482
- getReleaseDeprecated: (releaseId_1, ...args_1) => __awaiter(this, [releaseId_1, ...args_1], void 0, function* (releaseId, options = {}) {
483
- // verify required parameter 'releaseId' is not null or undefined
484
- assertParamExists('getReleaseDeprecated', 'releaseId', releaseId);
485
- const localVarPath = `/releases/{release_id}`
486
- .replace(`{${"release_id"}}`, encodeURIComponent(String(releaseId)));
487
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
488
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
489
- let baseOptions;
490
- if (configuration) {
491
- baseOptions = configuration.baseOptions;
492
- }
493
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
494
- const localVarHeaderParameter = {};
495
- const localVarQueryParameter = {};
496
- setSearchParams(localVarUrlObj, localVarQueryParameter);
497
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
498
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
499
- return {
500
- url: toPathString(localVarUrlObj),
501
- options: localVarRequestOptions,
502
- };
503
- }),
504
- /**
505
- * Lists releases. This method contains a bunch of different parameters to filter releases for different cases. For example, you may use ?after_release_id param to get only releases that came after the last known one (aka get updates). You can filter releases by maintainer_id to get releases from a specific maintainer. This is the maintainer who released the build, not the current maintainer of the device. Getting releases by device codename is obsolete thought. The reason for this is that devices could change codenames eventually. Unfortunately, some OEMs and community make a total mess of them. Please use /device methods to determine the right device (preferably with the user decision), save the device ID somewhere and use it afterward. Version tag is deprecated for the same reason, it\'s not really consistent, as it might contain patch and mod versions and very different by each maintainer.
506
- * @summary Get Releases
507
- * @param {Array<string>} [id] Filter by Release IDs
508
- * @param {Array<string>} [id2] Filter by Release IDs (deprecated)
509
- * @param {Array<string>} [buildId] Filter by Build IDs
510
- * @param {Array<string>} [deviceId] Filter by Device IDs
511
- * @param {Array<string>} [maintainerId] Filter by Maintainer IDs
512
- * @param {Array<string>} [codename] Filter by device codenames
513
- * @param {Array<string>} [version] Filter by release version
514
- * @param {Array<ReleaseType>} [type] Filter by release type
515
- * @param {boolean | null} [archived] Filter by the archived status
516
- * @param {boolean | null} [freezed] Filter by the freezed status
517
- * @param {string | null} [afterReleaseId] Show releases after the provided one
518
- * @param {number | null} [afterDate] Show releases after the provided timestamp
519
- * @param {ReleasesSort} [sort] Sort mode
520
- * @param {boolean | null} [group] Group releases by version + variant. This will change the response!
521
- * @param {number | null} [skip] Skip query results
522
- * @param {number | null} [limit] Limit query results (0 means unlimited)
523
- * @param {*} [options] Override http request option.
524
- * @throws {RequiredError}
525
- */
526
- getReleases: (id_1, id2_1, buildId_1, deviceId_1, maintainerId_1, codename_1, version_1, type_1, archived_1, freezed_1, afterReleaseId_1, afterDate_1, sort_1, group_1, skip_1, limit_1, ...args_1) => __awaiter(this, [id_1, id2_1, buildId_1, deviceId_1, maintainerId_1, codename_1, version_1, type_1, archived_1, freezed_1, afterReleaseId_1, afterDate_1, sort_1, group_1, skip_1, limit_1, ...args_1], void 0, function* (id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options = {}) {
527
- const localVarPath = `/releases/`;
528
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
529
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
530
- let baseOptions;
531
- if (configuration) {
532
- baseOptions = configuration.baseOptions;
533
- }
534
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
535
- const localVarHeaderParameter = {};
536
- const localVarQueryParameter = {};
537
- if (id) {
538
- localVarQueryParameter['id'] = id;
539
- }
540
- if (id2) {
541
- localVarQueryParameter['_id'] = id2;
542
- }
543
- if (buildId) {
544
- localVarQueryParameter['build_id'] = buildId;
545
- }
546
- if (deviceId) {
547
- localVarQueryParameter['device_id'] = deviceId;
548
- }
549
- if (maintainerId) {
550
- localVarQueryParameter['maintainer_id'] = maintainerId;
551
- }
552
- if (codename) {
553
- localVarQueryParameter['codename'] = codename;
554
- }
555
- if (version) {
556
- localVarQueryParameter['version'] = version;
557
- }
558
- if (type) {
559
- localVarQueryParameter['type'] = type;
560
- }
561
- if (archived !== undefined) {
562
- localVarQueryParameter['archived'] = archived;
563
- }
564
- if (freezed !== undefined) {
565
- localVarQueryParameter['freezed'] = freezed;
566
- }
567
- if (afterReleaseId !== undefined) {
568
- localVarQueryParameter['after_release_id'] = afterReleaseId;
569
- }
570
- if (afterDate !== undefined) {
571
- localVarQueryParameter['after_date'] = afterDate;
572
- }
573
- if (sort !== undefined) {
574
- localVarQueryParameter['sort'] = sort;
575
- }
576
- if (group !== undefined) {
577
- localVarQueryParameter['group'] = group;
578
- }
579
- if (skip !== undefined) {
580
- localVarQueryParameter['skip'] = skip;
581
- }
582
- if (limit !== undefined) {
583
- localVarQueryParameter['limit'] = limit;
584
- }
585
- setSearchParams(localVarUrlObj, localVarQueryParameter);
586
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
587
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
588
- return {
589
- url: toPathString(localVarUrlObj),
590
- options: localVarRequestOptions,
591
- };
592
- }),
593
- /**
594
- * Get updates method. Returns all new releases with release IDs. For example, \"/updates/<id>\" will return a list of all releases that were created after. You can also use \"device_id\" or / and \"release_type\" params. The first one will filter releases by specific devices, the second one will filter by release type. This can be useful, for example, if you want to notify users only with stable releases for this specific device. Warning: This method is obsolete! Please use /release/?after_release_id= instead!
595
- * @summary Get Updates
596
- * @param {string} lastKnownId
597
- * @param {Array<string>} [deviceId] Filter by device ID
598
- * @param {Array<ReleaseType>} [type] Filter by release type
599
- * @param {Array<ReleaseType>} [releaseType] Filter by release type (legacy)
600
- * @param {number | null} [skip] Skip query results
601
- * @param {number | null} [limit] Limit query results (0 means unlimited)
602
- * @param {*} [options] Override http request option.
603
- * @deprecated
604
- * @throws {RequiredError}
605
- */
606
- getUpdatesDeprecated: (lastKnownId_1, deviceId_1, type_1, releaseType_1, skip_1, limit_1, ...args_1) => __awaiter(this, [lastKnownId_1, deviceId_1, type_1, releaseType_1, skip_1, limit_1, ...args_1], void 0, function* (lastKnownId, deviceId, type, releaseType, skip, limit, options = {}) {
607
- // verify required parameter 'lastKnownId' is not null or undefined
608
- assertParamExists('getUpdatesDeprecated', 'lastKnownId', lastKnownId);
609
- const localVarPath = `/updates/{last_known_id}`
610
- .replace(`{${"last_known_id"}}`, encodeURIComponent(String(lastKnownId)));
611
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
612
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
613
- let baseOptions;
614
- if (configuration) {
615
- baseOptions = configuration.baseOptions;
616
- }
617
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
618
- const localVarHeaderParameter = {};
619
- const localVarQueryParameter = {};
620
- if (deviceId) {
621
- localVarQueryParameter['device_id'] = deviceId;
622
- }
623
- if (type) {
624
- localVarQueryParameter['type'] = type;
625
- }
626
- if (releaseType) {
627
- localVarQueryParameter['release_type'] = releaseType;
628
- }
629
- if (skip !== undefined) {
630
- localVarQueryParameter['skip'] = skip;
631
- }
632
- if (limit !== undefined) {
633
- localVarQueryParameter['limit'] = limit;
634
- }
635
- setSearchParams(localVarUrlObj, localVarQueryParameter);
636
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
637
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
638
- return {
639
- url: toPathString(localVarUrlObj),
640
- options: localVarRequestOptions,
641
- };
642
- }),
643
- };
644
- };
645
- /**
646
- * ReleaseApi - functional programming interface
647
- * @export
648
- */
649
- export const ReleaseApiFp = function (configuration) {
650
- const localVarAxiosParamCreator = ReleaseApiAxiosParamCreator(configuration);
651
- return {
652
- /**
653
- * Extended get device method, including the ability to get a device using device codename instead of the ID and Build ID. Example: /device/get?codename=lavender Calling this method without parameters will return the latest available release in the database Warning: the filename identification is deprecated! Use /release/<release_id> instead!
654
- * @summary Get Release
655
- * @param {string | null} [releaseId] Release ID
656
- * @param {string | null} [id] Release ID (deprecated)
657
- * @param {string | null} [buildId] Build ID, &#x60;ro.build.fox_id&#x60; prop
658
- * @param {string | null} [filename]
659
- * @param {*} [options] Override http request option.
660
- * @throws {RequiredError}
661
- */
662
- getRelease(releaseId, id, buildId, filename, options) {
663
- return __awaiter(this, void 0, void 0, function* () {
664
- var _a, _b, _c;
665
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getRelease(releaseId, id, buildId, filename, options);
666
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
667
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ReleaseApi.getRelease']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
668
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
669
- });
670
- },
671
- /**
672
- * Gets release information using the release ID, nothing to discuss really.
673
- * @summary Get Release Short
674
- * @param {string} releaseId
675
- * @param {*} [options] Override http request option.
676
- * @deprecated
677
- * @throws {RequiredError}
678
- */
679
- getReleaseDeprecated(releaseId, options) {
680
- return __awaiter(this, void 0, void 0, function* () {
681
- var _a, _b, _c;
682
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getReleaseDeprecated(releaseId, options);
683
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
684
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ReleaseApi.getReleaseDeprecated']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
685
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
686
- });
687
- },
688
- /**
689
- * Lists releases. This method contains a bunch of different parameters to filter releases for different cases. For example, you may use ?after_release_id param to get only releases that came after the last known one (aka get updates). You can filter releases by maintainer_id to get releases from a specific maintainer. This is the maintainer who released the build, not the current maintainer of the device. Getting releases by device codename is obsolete thought. The reason for this is that devices could change codenames eventually. Unfortunately, some OEMs and community make a total mess of them. Please use /device methods to determine the right device (preferably with the user decision), save the device ID somewhere and use it afterward. Version tag is deprecated for the same reason, it\'s not really consistent, as it might contain patch and mod versions and very different by each maintainer.
690
- * @summary Get Releases
691
- * @param {Array<string>} [id] Filter by Release IDs
692
- * @param {Array<string>} [id2] Filter by Release IDs (deprecated)
693
- * @param {Array<string>} [buildId] Filter by Build IDs
694
- * @param {Array<string>} [deviceId] Filter by Device IDs
695
- * @param {Array<string>} [maintainerId] Filter by Maintainer IDs
696
- * @param {Array<string>} [codename] Filter by device codenames
697
- * @param {Array<string>} [version] Filter by release version
698
- * @param {Array<ReleaseType>} [type] Filter by release type
699
- * @param {boolean | null} [archived] Filter by the archived status
700
- * @param {boolean | null} [freezed] Filter by the freezed status
701
- * @param {string | null} [afterReleaseId] Show releases after the provided one
702
- * @param {number | null} [afterDate] Show releases after the provided timestamp
703
- * @param {ReleasesSort} [sort] Sort mode
704
- * @param {boolean | null} [group] Group releases by version + variant. This will change the response!
705
- * @param {number | null} [skip] Skip query results
706
- * @param {number | null} [limit] Limit query results (0 means unlimited)
707
- * @param {*} [options] Override http request option.
708
- * @throws {RequiredError}
709
- */
710
- getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options) {
711
- return __awaiter(this, void 0, void 0, function* () {
712
- var _a, _b, _c;
713
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options);
714
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
715
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ReleaseApi.getReleases']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
716
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
717
- });
718
- },
719
- /**
720
- * Get updates method. Returns all new releases with release IDs. For example, \"/updates/<id>\" will return a list of all releases that were created after. You can also use \"device_id\" or / and \"release_type\" params. The first one will filter releases by specific devices, the second one will filter by release type. This can be useful, for example, if you want to notify users only with stable releases for this specific device. Warning: This method is obsolete! Please use /release/?after_release_id= instead!
721
- * @summary Get Updates
722
- * @param {string} lastKnownId
723
- * @param {Array<string>} [deviceId] Filter by device ID
724
- * @param {Array<ReleaseType>} [type] Filter by release type
725
- * @param {Array<ReleaseType>} [releaseType] Filter by release type (legacy)
726
- * @param {number | null} [skip] Skip query results
727
- * @param {number | null} [limit] Limit query results (0 means unlimited)
728
- * @param {*} [options] Override http request option.
729
- * @deprecated
730
- * @throws {RequiredError}
731
- */
732
- getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options) {
733
- return __awaiter(this, void 0, void 0, function* () {
734
- var _a, _b, _c;
735
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options);
736
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
737
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ReleaseApi.getUpdatesDeprecated']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
738
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
739
- });
740
- },
741
- };
742
- };
743
- /**
744
- * ReleaseApi - factory interface
745
- * @export
746
- */
747
- export const ReleaseApiFactory = function (configuration, basePath, axios) {
748
- const localVarFp = ReleaseApiFp(configuration);
749
- return {
750
- /**
751
- * Extended get device method, including the ability to get a device using device codename instead of the ID and Build ID. Example: /device/get?codename=lavender Calling this method without parameters will return the latest available release in the database Warning: the filename identification is deprecated! Use /release/<release_id> instead!
752
- * @summary Get Release
753
- * @param {string | null} [releaseId] Release ID
754
- * @param {string | null} [id] Release ID (deprecated)
755
- * @param {string | null} [buildId] Build ID, &#x60;ro.build.fox_id&#x60; prop
756
- * @param {string | null} [filename]
757
- * @param {*} [options] Override http request option.
758
- * @throws {RequiredError}
759
- */
760
- getRelease(releaseId, id, buildId, filename, options) {
761
- return localVarFp.getRelease(releaseId, id, buildId, filename, options).then((request) => request(axios, basePath));
762
- },
763
- /**
764
- * Gets release information using the release ID, nothing to discuss really.
765
- * @summary Get Release Short
766
- * @param {string} releaseId
767
- * @param {*} [options] Override http request option.
768
- * @deprecated
769
- * @throws {RequiredError}
770
- */
771
- getReleaseDeprecated(releaseId, options) {
772
- return localVarFp.getReleaseDeprecated(releaseId, options).then((request) => request(axios, basePath));
773
- },
774
- /**
775
- * Lists releases. This method contains a bunch of different parameters to filter releases for different cases. For example, you may use ?after_release_id param to get only releases that came after the last known one (aka get updates). You can filter releases by maintainer_id to get releases from a specific maintainer. This is the maintainer who released the build, not the current maintainer of the device. Getting releases by device codename is obsolete thought. The reason for this is that devices could change codenames eventually. Unfortunately, some OEMs and community make a total mess of them. Please use /device methods to determine the right device (preferably with the user decision), save the device ID somewhere and use it afterward. Version tag is deprecated for the same reason, it\'s not really consistent, as it might contain patch and mod versions and very different by each maintainer.
776
- * @summary Get Releases
777
- * @param {Array<string>} [id] Filter by Release IDs
778
- * @param {Array<string>} [id2] Filter by Release IDs (deprecated)
779
- * @param {Array<string>} [buildId] Filter by Build IDs
780
- * @param {Array<string>} [deviceId] Filter by Device IDs
781
- * @param {Array<string>} [maintainerId] Filter by Maintainer IDs
782
- * @param {Array<string>} [codename] Filter by device codenames
783
- * @param {Array<string>} [version] Filter by release version
784
- * @param {Array<ReleaseType>} [type] Filter by release type
785
- * @param {boolean | null} [archived] Filter by the archived status
786
- * @param {boolean | null} [freezed] Filter by the freezed status
787
- * @param {string | null} [afterReleaseId] Show releases after the provided one
788
- * @param {number | null} [afterDate] Show releases after the provided timestamp
789
- * @param {ReleasesSort} [sort] Sort mode
790
- * @param {boolean | null} [group] Group releases by version + variant. This will change the response!
791
- * @param {number | null} [skip] Skip query results
792
- * @param {number | null} [limit] Limit query results (0 means unlimited)
793
- * @param {*} [options] Override http request option.
794
- * @throws {RequiredError}
795
- */
796
- getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options) {
797
- return localVarFp.getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options).then((request) => request(axios, basePath));
798
- },
799
- /**
800
- * Get updates method. Returns all new releases with release IDs. For example, \"/updates/<id>\" will return a list of all releases that were created after. You can also use \"device_id\" or / and \"release_type\" params. The first one will filter releases by specific devices, the second one will filter by release type. This can be useful, for example, if you want to notify users only with stable releases for this specific device. Warning: This method is obsolete! Please use /release/?after_release_id= instead!
801
- * @summary Get Updates
802
- * @param {string} lastKnownId
803
- * @param {Array<string>} [deviceId] Filter by device ID
804
- * @param {Array<ReleaseType>} [type] Filter by release type
805
- * @param {Array<ReleaseType>} [releaseType] Filter by release type (legacy)
806
- * @param {number | null} [skip] Skip query results
807
- * @param {number | null} [limit] Limit query results (0 means unlimited)
808
- * @param {*} [options] Override http request option.
809
- * @deprecated
810
- * @throws {RequiredError}
811
- */
812
- getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options) {
813
- return localVarFp.getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options).then((request) => request(axios, basePath));
814
- },
815
- };
816
- };
817
- /**
818
- * ReleaseApi - object-oriented interface
819
- * @export
820
- * @class ReleaseApi
821
- * @extends {BaseAPI}
822
- */
823
- export class ReleaseApi extends BaseAPI {
824
- /**
825
- * Extended get device method, including the ability to get a device using device codename instead of the ID and Build ID. Example: /device/get?codename=lavender Calling this method without parameters will return the latest available release in the database Warning: the filename identification is deprecated! Use /release/<release_id> instead!
826
- * @summary Get Release
827
- * @param {string | null} [releaseId] Release ID
828
- * @param {string | null} [id] Release ID (deprecated)
829
- * @param {string | null} [buildId] Build ID, &#x60;ro.build.fox_id&#x60; prop
830
- * @param {string | null} [filename]
831
- * @param {*} [options] Override http request option.
832
- * @throws {RequiredError}
833
- * @memberof ReleaseApi
834
- */
835
- getRelease(releaseId, id, buildId, filename, options) {
836
- return ReleaseApiFp(this.configuration).getRelease(releaseId, id, buildId, filename, options).then((request) => request(this.axios, this.basePath));
837
- }
838
- /**
839
- * Gets release information using the release ID, nothing to discuss really.
840
- * @summary Get Release Short
841
- * @param {string} releaseId
842
- * @param {*} [options] Override http request option.
843
- * @deprecated
844
- * @throws {RequiredError}
845
- * @memberof ReleaseApi
846
- */
847
- getReleaseDeprecated(releaseId, options) {
848
- return ReleaseApiFp(this.configuration).getReleaseDeprecated(releaseId, options).then((request) => request(this.axios, this.basePath));
849
- }
850
- /**
851
- * Lists releases. This method contains a bunch of different parameters to filter releases for different cases. For example, you may use ?after_release_id param to get only releases that came after the last known one (aka get updates). You can filter releases by maintainer_id to get releases from a specific maintainer. This is the maintainer who released the build, not the current maintainer of the device. Getting releases by device codename is obsolete thought. The reason for this is that devices could change codenames eventually. Unfortunately, some OEMs and community make a total mess of them. Please use /device methods to determine the right device (preferably with the user decision), save the device ID somewhere and use it afterward. Version tag is deprecated for the same reason, it\'s not really consistent, as it might contain patch and mod versions and very different by each maintainer.
852
- * @summary Get Releases
853
- * @param {Array<string>} [id] Filter by Release IDs
854
- * @param {Array<string>} [id2] Filter by Release IDs (deprecated)
855
- * @param {Array<string>} [buildId] Filter by Build IDs
856
- * @param {Array<string>} [deviceId] Filter by Device IDs
857
- * @param {Array<string>} [maintainerId] Filter by Maintainer IDs
858
- * @param {Array<string>} [codename] Filter by device codenames
859
- * @param {Array<string>} [version] Filter by release version
860
- * @param {Array<ReleaseType>} [type] Filter by release type
861
- * @param {boolean | null} [archived] Filter by the archived status
862
- * @param {boolean | null} [freezed] Filter by the freezed status
863
- * @param {string | null} [afterReleaseId] Show releases after the provided one
864
- * @param {number | null} [afterDate] Show releases after the provided timestamp
865
- * @param {ReleasesSort} [sort] Sort mode
866
- * @param {boolean | null} [group] Group releases by version + variant. This will change the response!
867
- * @param {number | null} [skip] Skip query results
868
- * @param {number | null} [limit] Limit query results (0 means unlimited)
869
- * @param {*} [options] Override http request option.
870
- * @throws {RequiredError}
871
- * @memberof ReleaseApi
872
- */
873
- getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options) {
874
- return ReleaseApiFp(this.configuration).getReleases(id, id2, buildId, deviceId, maintainerId, codename, version, type, archived, freezed, afterReleaseId, afterDate, sort, group, skip, limit, options).then((request) => request(this.axios, this.basePath));
875
- }
876
- /**
877
- * Get updates method. Returns all new releases with release IDs. For example, \"/updates/<id>\" will return a list of all releases that were created after. You can also use \"device_id\" or / and \"release_type\" params. The first one will filter releases by specific devices, the second one will filter by release type. This can be useful, for example, if you want to notify users only with stable releases for this specific device. Warning: This method is obsolete! Please use /release/?after_release_id= instead!
878
- * @summary Get Updates
879
- * @param {string} lastKnownId
880
- * @param {Array<string>} [deviceId] Filter by device ID
881
- * @param {Array<ReleaseType>} [type] Filter by release type
882
- * @param {Array<ReleaseType>} [releaseType] Filter by release type (legacy)
883
- * @param {number | null} [skip] Skip query results
884
- * @param {number | null} [limit] Limit query results (0 means unlimited)
885
- * @param {*} [options] Override http request option.
886
- * @deprecated
887
- * @throws {RequiredError}
888
- * @memberof ReleaseApi
889
- */
890
- getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options) {
891
- return ReleaseApiFp(this.configuration).getUpdatesDeprecated(lastKnownId, deviceId, type, releaseType, skip, limit, options).then((request) => request(this.axios, this.basePath));
892
- }
893
- }
894
- /**
895
- * StatsApi - axios parameter creator
896
- * @export
897
- */
898
- export const StatsApiAxiosParamCreator = function (configuration) {
899
- return {
900
- /**
901
- * Returns the global OrangeFox downloads statistics. This request causes an increased load to the database, as it needs to aggregate all the release stats data, therefore, it is limited to a small number of requests per minute for public usage.
902
- * @summary Public Stats
903
- * @param {*} [options] Override http request option.
904
- * @throws {RequiredError}
905
- */
906
- getPublicStats: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
907
- const localVarPath = `/stats/`;
908
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
909
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
910
- let baseOptions;
911
- if (configuration) {
912
- baseOptions = configuration.baseOptions;
913
- }
914
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
915
- const localVarHeaderParameter = {};
916
- const localVarQueryParameter = {};
917
- setSearchParams(localVarUrlObj, localVarQueryParameter);
918
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
919
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
920
- return {
921
- url: toPathString(localVarUrlObj),
922
- options: localVarRequestOptions,
923
- };
924
- }),
925
- };
926
- };
927
- /**
928
- * StatsApi - functional programming interface
929
- * @export
930
- */
931
- export const StatsApiFp = function (configuration) {
932
- const localVarAxiosParamCreator = StatsApiAxiosParamCreator(configuration);
933
- return {
934
- /**
935
- * Returns the global OrangeFox downloads statistics. This request causes an increased load to the database, as it needs to aggregate all the release stats data, therefore, it is limited to a small number of requests per minute for public usage.
936
- * @summary Public Stats
937
- * @param {*} [options] Override http request option.
938
- * @throws {RequiredError}
939
- */
940
- getPublicStats(options) {
941
- return __awaiter(this, void 0, void 0, function* () {
942
- var _a, _b, _c;
943
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getPublicStats(options);
944
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
945
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['StatsApi.getPublicStats']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
946
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
947
- });
948
- },
949
- };
950
- };
951
- /**
952
- * StatsApi - factory interface
953
- * @export
954
- */
955
- export const StatsApiFactory = function (configuration, basePath, axios) {
956
- const localVarFp = StatsApiFp(configuration);
957
- return {
958
- /**
959
- * Returns the global OrangeFox downloads statistics. This request causes an increased load to the database, as it needs to aggregate all the release stats data, therefore, it is limited to a small number of requests per minute for public usage.
960
- * @summary Public Stats
961
- * @param {*} [options] Override http request option.
962
- * @throws {RequiredError}
963
- */
964
- getPublicStats(options) {
965
- return localVarFp.getPublicStats(options).then((request) => request(axios, basePath));
966
- },
967
- };
968
- };
969
- /**
970
- * StatsApi - object-oriented interface
971
- * @export
972
- * @class StatsApi
973
- * @extends {BaseAPI}
974
- */
975
- export class StatsApi extends BaseAPI {
976
- /**
977
- * Returns the global OrangeFox downloads statistics. This request causes an increased load to the database, as it needs to aggregate all the release stats data, therefore, it is limited to a small number of requests per minute for public usage.
978
- * @summary Public Stats
979
- * @param {*} [options] Override http request option.
980
- * @throws {RequiredError}
981
- * @memberof StatsApi
982
- */
983
- getPublicStats(options) {
984
- return StatsApiFp(this.configuration).getPublicStats(options).then((request) => request(this.axios, this.basePath));
985
- }
986
- }