@texturehq/device 1.18.0 → 2.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.
- package/dist/common/constants.d.ts +1 -1
- package/dist/common/constants.d.ts.map +1 -1
- package/dist/common/constants.js +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/fetch.d.ts +10 -0
- package/dist/common/fetch.d.ts.map +1 -0
- package/dist/common/fetch.js +39 -0
- package/dist/common/fetch.js.map +1 -0
- package/dist/deviceModel/getDeviceModel/index.d.ts +5 -10
- package/dist/deviceModel/getDeviceModel/index.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModel/index.js +29 -21
- package/dist/deviceModel/getDeviceModel/index.js.map +1 -1
- package/dist/deviceModel/getDeviceModel/response.interfaces.d.ts +5 -94
- package/dist/deviceModel/getDeviceModel/response.interfaces.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModel/response.interfaces.js +0 -249
- package/dist/deviceModel/getDeviceModel/response.interfaces.js.map +1 -1
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/index.d.ts +6 -11
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/index.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/index.js +30 -29
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/index.js.map +1 -1
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/response.interfaces.d.ts +5 -52
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/response.interfaces.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/response.interfaces.js +0 -207
- package/dist/deviceModel/getDeviceModelByManufacturerSlug/response.interfaces.js.map +1 -1
- package/dist/deviceModel/getDeviceModels/index.d.ts +5 -10
- package/dist/deviceModel/getDeviceModels/index.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModels/index.js +40 -27
- package/dist/deviceModel/getDeviceModels/index.js.map +1 -1
- package/dist/deviceModel/getDeviceModels/response.interfaces.d.ts +15 -84
- package/dist/deviceModel/getDeviceModels/response.interfaces.d.ts.map +1 -1
- package/dist/deviceModel/getDeviceModels/response.interfaces.js +0 -249
- package/dist/deviceModel/getDeviceModels/response.interfaces.js.map +1 -1
- package/dist/deviceModel/getDeviceModels/test.success.js +0 -1
- package/dist/deviceModel/getDeviceModels/test.success.js.map +1 -1
- package/dist/manufacturer/getManufacturer/index.d.ts +7 -16
- package/dist/manufacturer/getManufacturer/index.d.ts.map +1 -1
- package/dist/manufacturer/getManufacturer/index.js +17 -19
- package/dist/manufacturer/getManufacturer/index.js.map +1 -1
- package/dist/manufacturer/getManufacturer/response.interfaces.d.ts +6 -76
- package/dist/manufacturer/getManufacturer/response.interfaces.d.ts.map +1 -1
- package/dist/manufacturer/getManufacturer/response.interfaces.js +0 -231
- package/dist/manufacturer/getManufacturer/response.interfaces.js.map +1 -1
- package/dist/manufacturer/getManufacturers/index.d.ts +4 -10
- package/dist/manufacturer/getManufacturers/index.d.ts.map +1 -1
- package/dist/manufacturer/getManufacturers/index.js +29 -18
- package/dist/manufacturer/getManufacturers/index.js.map +1 -1
- package/dist/manufacturer/getManufacturers/response.interfaces.d.ts +12 -74
- package/dist/manufacturer/getManufacturers/response.interfaces.d.ts.map +1 -1
- package/dist/manufacturer/getManufacturers/response.interfaces.js +0 -239
- package/dist/manufacturer/getManufacturers/response.interfaces.js.map +1 -1
- package/dist/manufacturer/getManufacturers/test.success.js +1 -1
- package/dist/manufacturer/getManufacturers/test.success.js.map +1 -1
- package/dist/manufacturer/parseManufacturer/index.d.ts +5 -2
- package/dist/manufacturer/parseManufacturer/index.d.ts.map +1 -1
- package/dist/manufacturer/parseManufacturer/index.js +18 -23
- package/dist/manufacturer/parseManufacturer/index.js.map +1 -1
- package/package.json +1 -7
- package/dist/common/axios.d.ts +0 -3
- package/dist/common/axios.d.ts.map +0 -1
- package/dist/common/axios.js +0 -29
- package/dist/common/axios.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PRODUCTION_BASE_URL: "https://
|
|
1
|
+
export declare const PRODUCTION_BASE_URL: "https://api.texturehq.com";
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,2BAAoC,CAAC"}
|
package/dist/common/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PRODUCTION_BASE_URL = void 0;
|
|
4
|
-
exports.PRODUCTION_BASE_URL = "https://
|
|
4
|
+
exports.PRODUCTION_BASE_URL = "https://api.texturehq.com";
|
|
5
5
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,2BAAoC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FetchWithRetryOptions {
|
|
2
|
+
retries?: number;
|
|
3
|
+
baseDelayMs?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Fetch with exponential backoff retry logic.
|
|
7
|
+
* Retries on 5xx status codes and network errors.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchWithRetry(url: string, options?: FetchWithRetryOptions): Promise<Response>;
|
|
10
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/common/fetch.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4BxG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchWithRetry = fetchWithRetry;
|
|
4
|
+
const logger_1 = require("./logger");
|
|
5
|
+
const logger = logger_1.baseLogger.function("fetchWithRetry");
|
|
6
|
+
/**
|
|
7
|
+
* Fetch with exponential backoff retry logic.
|
|
8
|
+
* Retries on 5xx status codes and network errors.
|
|
9
|
+
*/
|
|
10
|
+
async function fetchWithRetry(url, options = {}) {
|
|
11
|
+
const { retries = 3, baseDelayMs = 300 } = options;
|
|
12
|
+
let lastError;
|
|
13
|
+
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
14
|
+
try {
|
|
15
|
+
const response = await fetch(url);
|
|
16
|
+
// Don't retry on client errors (4xx), only on server errors (5xx)
|
|
17
|
+
if (response.status >= 500 && attempt < retries) {
|
|
18
|
+
logger.warn("retryCount", { retryCount: attempt + 1, status: response.status });
|
|
19
|
+
await sleep(baseDelayMs * Math.pow(2, attempt));
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
lastError = error;
|
|
26
|
+
if (attempt < retries) {
|
|
27
|
+
logger.warn("retryCount", { retryCount: attempt + 1 });
|
|
28
|
+
logger.warn("error", { error: error instanceof Error ? error.message : String(error) });
|
|
29
|
+
await sleep(baseDelayMs * Math.pow(2, attempt));
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
throw lastError;
|
|
35
|
+
}
|
|
36
|
+
function sleep(ms) {
|
|
37
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/common/fetch.ts"],"names":[],"mappings":";;AAaA,wCA4BC;AAzCD,qCAAsC;AAEtC,MAAM,MAAM,GAAG,mBAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAOrD;;;GAGG;AACI,KAAK,UAAU,cAAc,CAAC,GAAW,EAAE,UAAiC,EAAE;IACnF,MAAM,EAAE,OAAO,GAAG,CAAC,EAAE,WAAW,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;IAEnD,IAAI,SAAkB,CAAC;IACvB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;QACpD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;YAElC,kEAAkE;YAClE,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,IAAI,OAAO,GAAG,OAAO,EAAE,CAAC;gBAChD,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBAChF,MAAM,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;gBAChD,SAAS;YACX,CAAC;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,OAAO,GAAG,OAAO,EAAE,CAAC;gBACtB,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC;gBACvD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACxF,MAAM,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;gBAChD,SAAS;YACX,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,SAAS,CAAC;AAClB,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -2,19 +2,14 @@ import { Logger } from "../../common/logger";
|
|
|
2
2
|
import { DeviceModel } from "../entities";
|
|
3
3
|
export interface GetDeviceModelOptions {
|
|
4
4
|
/**
|
|
5
|
-
* The slug of the device model to retrieve
|
|
5
|
+
* The slug of the device model to retrieve.
|
|
6
6
|
*/
|
|
7
7
|
slug: string;
|
|
8
8
|
/**
|
|
9
|
-
* The base URL of the
|
|
10
|
-
* @default "https://
|
|
9
|
+
* The base URL of the Texture REST API.
|
|
10
|
+
* @default "https://api.texturehq.com"
|
|
11
11
|
*/
|
|
12
12
|
baseApiUrl?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The base URL for images coming from Payload CMS.
|
|
15
|
-
* @default "https://device.cms.texture.energy"
|
|
16
|
-
*/
|
|
17
|
-
baseImageUrl?: string;
|
|
18
13
|
/**
|
|
19
14
|
* The logger instance to use during the getDeviceModel operation.
|
|
20
15
|
*/
|
|
@@ -24,9 +19,9 @@ type CachedDeviceModel = (DeviceModel & {
|
|
|
24
19
|
cached?: boolean;
|
|
25
20
|
}) | null;
|
|
26
21
|
/**
|
|
27
|
-
* Retrieves a device model from the
|
|
22
|
+
* Retrieves a device model from the Texture REST API.
|
|
28
23
|
* @param options The options to use during the getDeviceModel operation.
|
|
29
|
-
* @returns {Promise<DeviceModel | null>} The device model retrieved from the
|
|
24
|
+
* @returns {Promise<DeviceModel | null>} The device model retrieved from the API or null if not found.
|
|
30
25
|
*/
|
|
31
26
|
export declare const getDeviceModel: (options: GetDeviceModelOptions) => Promise<CachedDeviceModel>;
|
|
32
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAC;AAM7D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,iBAAiB,GAAG,CAAC,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,iBAAiB,CA8C9F,CAAC"}
|
|
@@ -5,44 +5,52 @@ const logger_1 = require("../../common/logger");
|
|
|
5
5
|
const exceptions_1 = require("../../common/exceptions");
|
|
6
6
|
const entities_1 = require("../entities");
|
|
7
7
|
const constants_1 = require("../../common/constants");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const fetch_1 = require("../../common/fetch");
|
|
9
|
+
const parseManufacturer_1 = require("../../manufacturer/parseManufacturer");
|
|
10
10
|
/**
|
|
11
|
-
* Retrieves a device model from the
|
|
11
|
+
* Retrieves a device model from the Texture REST API.
|
|
12
12
|
* @param options The options to use during the getDeviceModel operation.
|
|
13
|
-
* @returns {Promise<DeviceModel | null>} The device model retrieved from the
|
|
13
|
+
* @returns {Promise<DeviceModel | null>} The device model retrieved from the API or null if not found.
|
|
14
14
|
*/
|
|
15
15
|
const getDeviceModel = async (options) => {
|
|
16
16
|
const defaultLogger = logger_1.baseLogger.function("getDeviceModel");
|
|
17
|
-
const { slug, baseApiUrl = constants_1.PRODUCTION_BASE_URL,
|
|
18
|
-
const operation = logger.operation("get device model from
|
|
19
|
-
const axios = (0, axios_1.getAxios)();
|
|
17
|
+
const { slug, baseApiUrl = constants_1.PRODUCTION_BASE_URL, logger = defaultLogger } = options;
|
|
18
|
+
const operation = logger.operation("get device model from Texture REST API");
|
|
20
19
|
try {
|
|
21
20
|
operation.start({ options });
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const modelsUrl = `${baseApiUrl}/v1/public/device-models?slug=${encodeURIComponent(slug)}`;
|
|
22
|
+
const modelsResponse = await (0, fetch_1.fetchWithRetry)(modelsUrl);
|
|
23
|
+
if (!modelsResponse.ok) {
|
|
24
|
+
const errorMessage = `Request to ${modelsUrl} failed with status ${modelsResponse.status}`;
|
|
25
25
|
operation.fail(errorMessage);
|
|
26
|
-
throw new exceptions_1.NetworkError(errorMessage,
|
|
26
|
+
throw new exceptions_1.NetworkError(errorMessage, modelsResponse.status);
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const modelsData = (await modelsResponse.json());
|
|
29
|
+
if (!modelsData.data || modelsData.data.length === 0) {
|
|
30
|
+
operation.fail({ slug });
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const doc = modelsData.data[0];
|
|
34
|
+
const manufacturersUrl = `${baseApiUrl}/v1/public/manufacturers`;
|
|
35
|
+
const manufacturersResponse = await (0, fetch_1.fetchWithRetry)(manufacturersUrl);
|
|
36
|
+
if (!manufacturersResponse.ok) {
|
|
37
|
+
const errorMessage = `Request to ${manufacturersUrl} failed with status ${manufacturersResponse.status}`;
|
|
38
|
+
operation.fail(errorMessage);
|
|
39
|
+
throw new exceptions_1.NetworkError(errorMessage, manufacturersResponse.status);
|
|
40
|
+
}
|
|
41
|
+
const manufacturersData = (await manufacturersResponse.json());
|
|
42
|
+
const fullManufacturer = manufacturersData.find((m) => m.slug === doc.manufacturer.slug);
|
|
43
|
+
if (!fullManufacturer)
|
|
44
|
+
throw new Error(`Manufacturer not found for slug: ${doc.manufacturer.slug}`);
|
|
35
45
|
const deviceModel = entities_1.DeviceModelSchema.parse({
|
|
36
|
-
...
|
|
37
|
-
manufacturer: (0,
|
|
46
|
+
...doc,
|
|
47
|
+
manufacturer: (0, parseManufacturer_1.parseManufacturer)(fullManufacturer),
|
|
38
48
|
});
|
|
39
|
-
// @ts-expect-error Property 'cached' does not exist
|
|
40
|
-
deviceModel.cached = response?.cached;
|
|
41
49
|
operation.end({ deviceModel });
|
|
42
50
|
return deviceModel;
|
|
43
51
|
}
|
|
44
52
|
catch (error) {
|
|
45
|
-
operation.fail("Unknown error occurred while fetching device model from
|
|
53
|
+
operation.fail("Unknown error occurred while fetching device model from Texture REST API.");
|
|
46
54
|
throw error;
|
|
47
55
|
}
|
|
48
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/index.ts"],"names":[],"mappings":";;;AAAA,gDAAyD;AAEzD,wDAAuD;AACvD,0CAA6D;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,kBA8CzB"}
|
|
@@ -1,95 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
page: number;
|
|
7
|
-
pagingCounter: number;
|
|
8
|
-
hasPrevPage: boolean;
|
|
9
|
-
hasNextPage: boolean;
|
|
10
|
-
prevPage: null;
|
|
11
|
-
nextPage: null;
|
|
12
|
-
}
|
|
13
|
-
export interface Doc {
|
|
14
|
-
id: string;
|
|
15
|
-
slug: string;
|
|
16
|
-
name: string;
|
|
17
|
-
manufacturer: Manufacturer;
|
|
18
|
-
type: string;
|
|
19
|
-
support_level: string;
|
|
20
|
-
available_commands: AvailableCommand[];
|
|
21
|
-
createdAt: Date;
|
|
22
|
-
updatedAt: Date;
|
|
23
|
-
}
|
|
24
|
-
export interface AvailableCommand {
|
|
25
|
-
id: string;
|
|
26
|
-
slug: string;
|
|
27
|
-
support_level: string;
|
|
28
|
-
createdAt: Date;
|
|
29
|
-
updatedAt: Date;
|
|
30
|
-
}
|
|
31
|
-
export interface Manufacturer {
|
|
32
|
-
id: string;
|
|
33
|
-
slug: string;
|
|
34
|
-
name: string;
|
|
35
|
-
logo: Logo;
|
|
36
|
-
support_level: string;
|
|
37
|
-
createdAt: Date;
|
|
38
|
-
updatedAt: Date;
|
|
39
|
-
icon: Icon;
|
|
40
|
-
vector_icon: Logo;
|
|
41
|
-
}
|
|
42
|
-
export interface Icon {
|
|
43
|
-
id: string;
|
|
44
|
-
alt: string;
|
|
45
|
-
filename: string;
|
|
46
|
-
mimeType: string;
|
|
47
|
-
filesize: number;
|
|
48
|
-
width: number;
|
|
49
|
-
height: number;
|
|
50
|
-
focalX: number;
|
|
51
|
-
focalY: number;
|
|
52
|
-
sizes: IconSizes;
|
|
53
|
-
createdAt: Date;
|
|
54
|
-
updatedAt: Date;
|
|
55
|
-
url: string;
|
|
56
|
-
}
|
|
57
|
-
export interface IconSizes {
|
|
58
|
-
thumbnail: PurpleCard;
|
|
59
|
-
card: PurpleCard;
|
|
60
|
-
tablet: PurpleCard;
|
|
61
|
-
}
|
|
62
|
-
export interface PurpleCard {
|
|
63
|
-
width: number;
|
|
64
|
-
height: number;
|
|
65
|
-
mimeType: string;
|
|
66
|
-
filesize: number;
|
|
67
|
-
filename: string;
|
|
68
|
-
url: string;
|
|
69
|
-
}
|
|
70
|
-
export interface Logo {
|
|
71
|
-
id: string;
|
|
72
|
-
alt: string;
|
|
73
|
-
filename: string;
|
|
74
|
-
mimeType: string;
|
|
75
|
-
filesize: number;
|
|
76
|
-
width: number;
|
|
77
|
-
height: number;
|
|
78
|
-
sizes: LogoSizes;
|
|
79
|
-
createdAt: Date;
|
|
80
|
-
updatedAt: Date;
|
|
81
|
-
url: string;
|
|
82
|
-
}
|
|
83
|
-
export interface LogoSizes {
|
|
84
|
-
thumbnail: FluffyCard;
|
|
85
|
-
card: FluffyCard;
|
|
86
|
-
tablet: FluffyCard;
|
|
87
|
-
}
|
|
88
|
-
export interface FluffyCard {
|
|
89
|
-
url: null;
|
|
90
|
-
}
|
|
91
|
-
export declare class Convert {
|
|
92
|
-
static toResponseInterfaces(json: string): ResponseInterfaces;
|
|
93
|
-
static responseInterfacesToJson(value: ResponseInterfaces): string;
|
|
94
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* REST API response shape for GET /v1/public/device-models.
|
|
3
|
+
* Re-exported from the shared type for consistency.
|
|
4
|
+
*/
|
|
5
|
+
export { DeviceModelsApiResponse, DeviceModelApiItem, DeviceModelApiCommand } from "../getDeviceModels/response.interfaces";
|
|
95
6
|
//# sourceMappingURL=response.interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.interfaces.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/response.interfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response.interfaces.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/response.interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -1,252 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// To parse this data:
|
|
3
|
-
//
|
|
4
|
-
// import { Convert, ResponseInterfaces } from "./file";
|
|
5
|
-
//
|
|
6
|
-
// const responseInterfaces = Convert.toResponseInterfaces(json);
|
|
7
|
-
//
|
|
8
|
-
// These functions will throw an error if the JSON doesn't
|
|
9
|
-
// match the expected interface, even if the JSON is valid.
|
|
10
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.Convert = void 0;
|
|
12
|
-
// Converts JSON strings to/from your types
|
|
13
|
-
// and asserts the results of JSON.parse at runtime
|
|
14
|
-
class Convert {
|
|
15
|
-
static toResponseInterfaces(json) {
|
|
16
|
-
return cast(JSON.parse(json), r("ResponseInterfaces"));
|
|
17
|
-
}
|
|
18
|
-
static responseInterfacesToJson(value) {
|
|
19
|
-
return JSON.stringify(uncast(value, r("ResponseInterfaces")), null, 2);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.Convert = Convert;
|
|
23
|
-
function invalidValue(typ, val, key, parent = '') {
|
|
24
|
-
const prettyTyp = prettyTypeName(typ);
|
|
25
|
-
const parentText = parent ? ` on ${parent}` : '';
|
|
26
|
-
const keyText = key ? ` for key "${key}"` : '';
|
|
27
|
-
throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
|
|
28
|
-
}
|
|
29
|
-
function prettyTypeName(typ) {
|
|
30
|
-
if (Array.isArray(typ)) {
|
|
31
|
-
if (typ.length === 2 && typ[0] === undefined) {
|
|
32
|
-
return `an optional ${prettyTypeName(typ[1])}`;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else if (typeof typ === "object" && typ.literal !== undefined) {
|
|
39
|
-
return typ.literal;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return typeof typ;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function jsonToJSProps(typ) {
|
|
46
|
-
if (typ.jsonToJS === undefined) {
|
|
47
|
-
const map = {};
|
|
48
|
-
typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
|
|
49
|
-
typ.jsonToJS = map;
|
|
50
|
-
}
|
|
51
|
-
return typ.jsonToJS;
|
|
52
|
-
}
|
|
53
|
-
function jsToJSONProps(typ) {
|
|
54
|
-
if (typ.jsToJSON === undefined) {
|
|
55
|
-
const map = {};
|
|
56
|
-
typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
|
|
57
|
-
typ.jsToJSON = map;
|
|
58
|
-
}
|
|
59
|
-
return typ.jsToJSON;
|
|
60
|
-
}
|
|
61
|
-
function transform(val, typ, getProps, key = '', parent = '') {
|
|
62
|
-
function transformPrimitive(typ, val) {
|
|
63
|
-
if (typeof typ === typeof val)
|
|
64
|
-
return val;
|
|
65
|
-
return invalidValue(typ, val, key, parent);
|
|
66
|
-
}
|
|
67
|
-
function transformUnion(typs, val) {
|
|
68
|
-
// val must validate against one typ in typs
|
|
69
|
-
const l = typs.length;
|
|
70
|
-
for (let i = 0; i < l; i++) {
|
|
71
|
-
const typ = typs[i];
|
|
72
|
-
try {
|
|
73
|
-
return transform(val, typ, getProps);
|
|
74
|
-
}
|
|
75
|
-
catch (_) { }
|
|
76
|
-
}
|
|
77
|
-
return invalidValue(typs, val, key, parent);
|
|
78
|
-
}
|
|
79
|
-
function transformEnum(cases, val) {
|
|
80
|
-
if (cases.indexOf(val) !== -1)
|
|
81
|
-
return val;
|
|
82
|
-
return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
|
|
83
|
-
}
|
|
84
|
-
function transformArray(typ, val) {
|
|
85
|
-
// val must be an array with no invalid elements
|
|
86
|
-
if (!Array.isArray(val))
|
|
87
|
-
return invalidValue(l("array"), val, key, parent);
|
|
88
|
-
return val.map(el => transform(el, typ, getProps));
|
|
89
|
-
}
|
|
90
|
-
function transformDate(val) {
|
|
91
|
-
if (val === null) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const d = new Date(val);
|
|
95
|
-
if (isNaN(d.valueOf())) {
|
|
96
|
-
return invalidValue(l("Date"), val, key, parent);
|
|
97
|
-
}
|
|
98
|
-
return d;
|
|
99
|
-
}
|
|
100
|
-
function transformObject(props, additional, val) {
|
|
101
|
-
if (val === null || typeof val !== "object" || Array.isArray(val)) {
|
|
102
|
-
return invalidValue(l(ref || "object"), val, key, parent);
|
|
103
|
-
}
|
|
104
|
-
const result = {};
|
|
105
|
-
Object.getOwnPropertyNames(props).forEach(key => {
|
|
106
|
-
const prop = props[key];
|
|
107
|
-
const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
|
|
108
|
-
result[prop.key] = transform(v, prop.typ, getProps, key, ref);
|
|
109
|
-
});
|
|
110
|
-
Object.getOwnPropertyNames(val).forEach(key => {
|
|
111
|
-
if (!Object.prototype.hasOwnProperty.call(props, key)) {
|
|
112
|
-
result[key] = transform(val[key], additional, getProps, key, ref);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
return result;
|
|
116
|
-
}
|
|
117
|
-
if (typ === "any")
|
|
118
|
-
return val;
|
|
119
|
-
if (typ === null) {
|
|
120
|
-
if (val === null)
|
|
121
|
-
return val;
|
|
122
|
-
return invalidValue(typ, val, key, parent);
|
|
123
|
-
}
|
|
124
|
-
if (typ === false)
|
|
125
|
-
return invalidValue(typ, val, key, parent);
|
|
126
|
-
let ref = undefined;
|
|
127
|
-
while (typeof typ === "object" && typ.ref !== undefined) {
|
|
128
|
-
ref = typ.ref;
|
|
129
|
-
typ = typeMap[typ.ref];
|
|
130
|
-
}
|
|
131
|
-
if (Array.isArray(typ))
|
|
132
|
-
return transformEnum(typ, val);
|
|
133
|
-
if (typeof typ === "object") {
|
|
134
|
-
return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
|
|
135
|
-
: typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
|
|
136
|
-
: typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
|
|
137
|
-
: invalidValue(typ, val, key, parent);
|
|
138
|
-
}
|
|
139
|
-
// Numbers can be parsed by Date but shouldn't be.
|
|
140
|
-
if (typ === Date && typeof val !== "number")
|
|
141
|
-
return transformDate(val);
|
|
142
|
-
return transformPrimitive(typ, val);
|
|
143
|
-
}
|
|
144
|
-
function cast(val, typ) {
|
|
145
|
-
return transform(val, typ, jsonToJSProps);
|
|
146
|
-
}
|
|
147
|
-
function uncast(val, typ) {
|
|
148
|
-
return transform(val, typ, jsToJSONProps);
|
|
149
|
-
}
|
|
150
|
-
function l(typ) {
|
|
151
|
-
return { literal: typ };
|
|
152
|
-
}
|
|
153
|
-
function a(typ) {
|
|
154
|
-
return { arrayItems: typ };
|
|
155
|
-
}
|
|
156
|
-
function u(...typs) {
|
|
157
|
-
return { unionMembers: typs };
|
|
158
|
-
}
|
|
159
|
-
function o(props, additional) {
|
|
160
|
-
return { props, additional };
|
|
161
|
-
}
|
|
162
|
-
function m(additional) {
|
|
163
|
-
return { props: [], additional };
|
|
164
|
-
}
|
|
165
|
-
function r(name) {
|
|
166
|
-
return { ref: name };
|
|
167
|
-
}
|
|
168
|
-
const typeMap = {
|
|
169
|
-
"ResponseInterfaces": o([
|
|
170
|
-
{ json: "docs", js: "docs", typ: a(r("Doc")) },
|
|
171
|
-
{ json: "totalDocs", js: "totalDocs", typ: 0 },
|
|
172
|
-
{ json: "limit", js: "limit", typ: 0 },
|
|
173
|
-
{ json: "totalPages", js: "totalPages", typ: 0 },
|
|
174
|
-
{ json: "page", js: "page", typ: 0 },
|
|
175
|
-
{ json: "pagingCounter", js: "pagingCounter", typ: 0 },
|
|
176
|
-
{ json: "hasPrevPage", js: "hasPrevPage", typ: true },
|
|
177
|
-
{ json: "hasNextPage", js: "hasNextPage", typ: true },
|
|
178
|
-
{ json: "prevPage", js: "prevPage", typ: null },
|
|
179
|
-
{ json: "nextPage", js: "nextPage", typ: null },
|
|
180
|
-
], false),
|
|
181
|
-
"Doc": o([
|
|
182
|
-
{ json: "id", js: "id", typ: "" },
|
|
183
|
-
{ json: "slug", js: "slug", typ: "" },
|
|
184
|
-
{ json: "name", js: "name", typ: "" },
|
|
185
|
-
{ json: "manufacturer", js: "manufacturer", typ: r("Manufacturer") },
|
|
186
|
-
{ json: "type", js: "type", typ: "" },
|
|
187
|
-
{ json: "support_level", js: "support_level", typ: "" },
|
|
188
|
-
{ json: "createdAt", js: "createdAt", typ: Date },
|
|
189
|
-
{ json: "updatedAt", js: "updatedAt", typ: Date },
|
|
190
|
-
], false),
|
|
191
|
-
"Manufacturer": o([
|
|
192
|
-
{ json: "id", js: "id", typ: "" },
|
|
193
|
-
{ json: "slug", js: "slug", typ: "" },
|
|
194
|
-
{ json: "name", js: "name", typ: "" },
|
|
195
|
-
{ json: "logo", js: "logo", typ: r("Logo") },
|
|
196
|
-
{ json: "support_level", js: "support_level", typ: "" },
|
|
197
|
-
{ json: "createdAt", js: "createdAt", typ: Date },
|
|
198
|
-
{ json: "updatedAt", js: "updatedAt", typ: Date },
|
|
199
|
-
{ json: "icon", js: "icon", typ: r("Icon") },
|
|
200
|
-
{ json: "vector_icon", js: "vector_icon", typ: r("Logo") },
|
|
201
|
-
], false),
|
|
202
|
-
"Icon": o([
|
|
203
|
-
{ json: "id", js: "id", typ: "" },
|
|
204
|
-
{ json: "alt", js: "alt", typ: "" },
|
|
205
|
-
{ json: "filename", js: "filename", typ: "" },
|
|
206
|
-
{ json: "mimeType", js: "mimeType", typ: "" },
|
|
207
|
-
{ json: "filesize", js: "filesize", typ: 0 },
|
|
208
|
-
{ json: "width", js: "width", typ: 0 },
|
|
209
|
-
{ json: "height", js: "height", typ: 0 },
|
|
210
|
-
{ json: "focalX", js: "focalX", typ: 0 },
|
|
211
|
-
{ json: "focalY", js: "focalY", typ: 0 },
|
|
212
|
-
{ json: "sizes", js: "sizes", typ: r("IconSizes") },
|
|
213
|
-
{ json: "createdAt", js: "createdAt", typ: Date },
|
|
214
|
-
{ json: "updatedAt", js: "updatedAt", typ: Date },
|
|
215
|
-
{ json: "url", js: "url", typ: "" },
|
|
216
|
-
], false),
|
|
217
|
-
"IconSizes": o([
|
|
218
|
-
{ json: "thumbnail", js: "thumbnail", typ: r("PurpleCard") },
|
|
219
|
-
{ json: "card", js: "card", typ: r("PurpleCard") },
|
|
220
|
-
{ json: "tablet", js: "tablet", typ: r("PurpleCard") },
|
|
221
|
-
], false),
|
|
222
|
-
"PurpleCard": o([
|
|
223
|
-
{ json: "width", js: "width", typ: 0 },
|
|
224
|
-
{ json: "height", js: "height", typ: 0 },
|
|
225
|
-
{ json: "mimeType", js: "mimeType", typ: "" },
|
|
226
|
-
{ json: "filesize", js: "filesize", typ: 0 },
|
|
227
|
-
{ json: "filename", js: "filename", typ: "" },
|
|
228
|
-
{ json: "url", js: "url", typ: "" },
|
|
229
|
-
], false),
|
|
230
|
-
"Logo": o([
|
|
231
|
-
{ json: "id", js: "id", typ: "" },
|
|
232
|
-
{ json: "alt", js: "alt", typ: "" },
|
|
233
|
-
{ json: "filename", js: "filename", typ: "" },
|
|
234
|
-
{ json: "mimeType", js: "mimeType", typ: "" },
|
|
235
|
-
{ json: "filesize", js: "filesize", typ: 0 },
|
|
236
|
-
{ json: "width", js: "width", typ: 0 },
|
|
237
|
-
{ json: "height", js: "height", typ: 0 },
|
|
238
|
-
{ json: "sizes", js: "sizes", typ: r("LogoSizes") },
|
|
239
|
-
{ json: "createdAt", js: "createdAt", typ: Date },
|
|
240
|
-
{ json: "updatedAt", js: "updatedAt", typ: Date },
|
|
241
|
-
{ json: "url", js: "url", typ: "" },
|
|
242
|
-
], false),
|
|
243
|
-
"LogoSizes": o([
|
|
244
|
-
{ json: "thumbnail", js: "thumbnail", typ: r("FluffyCard") },
|
|
245
|
-
{ json: "card", js: "card", typ: r("FluffyCard") },
|
|
246
|
-
{ json: "tablet", js: "tablet", typ: r("FluffyCard") },
|
|
247
|
-
], false),
|
|
248
|
-
"FluffyCard": o([
|
|
249
|
-
{ json: "url", js: "url", typ: null },
|
|
250
|
-
], false),
|
|
251
|
-
};
|
|
252
3
|
//# sourceMappingURL=response.interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.interfaces.js","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/response.interfaces.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,EAAE;AACF,0DAA0D;AAC1D,EAAE;AACF,mEAAmE;AACnE,EAAE;AACF,0DAA0D;AAC1D,2DAA2D;;;AAsG3D,2CAA2C;AAC3C,mDAAmD;AACnD,MAAa,OAAO;IACT,MAAM,CAAC,oBAAoB,CAAC,IAAY;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,MAAM,CAAC,wBAAwB,CAAC,KAAyB;QAC5D,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;CACJ;AARD,0BAQC;AAED,SAAS,YAAY,CAAC,GAAQ,EAAE,GAAQ,EAAE,GAAQ,EAAE,SAAc,EAAE;IAChE,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,EA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AE;QACnD,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE;QACjD,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE;QACjD,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;KACtC,EAAE,KAAK,CAAC;IACT,WAAW,EAAE,CAAC,CAAC;QACX,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE;QAC5D,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE;QAClD,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE;KACzD,EAAE,KAAK,CAAC;IACT,YAAY,EAAE,CAAC,CAAC;QACZ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE;KACxC,EAAE,KAAK,CAAC;CACZ,CAAC"}
|
|
1
|
+
{"version":3,"file":"response.interfaces.js","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModel/response.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -8,17 +8,12 @@ export interface GetDeviceModelByManufacturerSlugOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
slug: string;
|
|
10
10
|
/**
|
|
11
|
-
* The base URL of the
|
|
12
|
-
* @default "https://
|
|
11
|
+
* The base URL of the Texture REST API.
|
|
12
|
+
* @default "https://api.texturehq.com"
|
|
13
13
|
*/
|
|
14
14
|
baseApiUrl?: string;
|
|
15
15
|
/**
|
|
16
|
-
* The
|
|
17
|
-
* @default "https://device.cms.texture.energy"
|
|
18
|
-
*/
|
|
19
|
-
baseImageUrl?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The logger instance to use during the getDeviceModel operation.
|
|
16
|
+
* The logger instance to use during the getDeviceModelByManufacturerSlug operation.
|
|
22
17
|
*/
|
|
23
18
|
logger?: Logger;
|
|
24
19
|
}
|
|
@@ -26,9 +21,9 @@ type CachedDeviceModel = (DeviceModel & {
|
|
|
26
21
|
cached?: boolean;
|
|
27
22
|
}) | null;
|
|
28
23
|
/**
|
|
29
|
-
* Retrieves a device model from the
|
|
30
|
-
* @param options The options to use during the
|
|
31
|
-
* @returns {Promise<DeviceModel | null>} The device model retrieved from the
|
|
24
|
+
* Retrieves a device model from the Texture REST API by manufacturer:model slug.
|
|
25
|
+
* @param options The options to use during the getDeviceModelByManufacturerSlug operation.
|
|
26
|
+
* @returns {Promise<DeviceModel | null>} The device model retrieved from the API or null if not found.
|
|
32
27
|
*/
|
|
33
28
|
export declare const getDeviceModelByManufacturerSlug: (options: GetDeviceModelByManufacturerSlugOptions) => Promise<CachedDeviceModel>;
|
|
34
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModelByManufacturerSlug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deviceModel/getDeviceModelByManufacturerSlug/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAqB,MAAM,aAAa,CAAC;AAM7D,MAAM,WAAW,uCAAuC;IACtD;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,iBAAiB,GAAG,CAAC,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,GAC3C,SAAS,uCAAuC,KAC/C,OAAO,CAAC,iBAAiB,CAmD3B,CAAC"}
|