@orangefox-recovery/foxclient 1.0.0

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