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