@milaboratories/pl-model-common 1.15.2 → 1.15.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-common",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "Platforma SDK Model",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "eslint": "^9.25.1",
26
26
  "typescript": "~5.5.4",
27
- "vite": "^5.4.11",
27
+ "vite": "^6.3.5",
28
28
  "vitest": "^2.1.9",
29
29
  "@milaboratories/platforma-build-configs": "1.0.3",
30
30
  "@platforma-sdk/eslint-config": "1.0.3"
@@ -1,4 +1,5 @@
1
1
  import type { Branded } from '../branding';
2
+ import { z } from 'zod';
2
3
 
3
4
  /** Handle of locally downloaded blob. This handle is issued only after the
4
5
  * blob's content is downloaded locally, and ready for quick access. */
@@ -22,13 +23,14 @@ export interface BlobHandleAndSize<
22
23
  }
23
24
 
24
25
  /** Range in bytes, from should be less or equal than to. */
25
- export type RangeBytes = {
26
+ export const RangeBytes = z.object({
26
27
  /** Included left border. */
27
- from: number;
28
-
28
+ from: z.number(),
29
29
  /** Excluded right border. */
30
- to: number;
31
- };
30
+ to: z.number(),
31
+ });
32
+
33
+ export type RangeBytes = z.infer<typeof RangeBytes>;
32
34
 
33
35
  export function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {
34
36
  if (from == undefined || to == undefined) {
@@ -194,7 +194,10 @@ export function getAxesId(spec: AxesSpec): AxesId {
194
194
  return spec.map(getAxisId);
195
195
  }
196
196
 
197
- /** Canonicalizes axis id */
197
+ /**
198
+ * Canonicalizes axis id
199
+ * @deprecated Use {@link canonicalizeJson} instead to preserve type
200
+ */
198
201
  export function canonicalizeAxisId(id: AxisId): string {
199
202
  return canonicalize(getAxisId(id))!;
200
203
  }