Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cheminfo-types

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheminfo-types - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

480

cheminfoType.d.ts

@@ -0,2 +1,153 @@

export interface MeasurementXY<DataType extends DoubleArray = DoubleArray> {
/**
* A unique identifier for the measurement, preferably a UUID.
*/
id?: string;
/**
* Variables containing the data of the measurement.
* It must contain at least the variable `x` and `y`
*/
variables: MeasurementXYVariables<DataType>;
/**
* Short description about the result of the measurement
*/
description?: string;
/**
* May contain the type of data. This is practical when you have a bunch of data
* of different types
*/
dataType?: string;
settings?: {
instrument?: Instrument;
[key: string]: any;
};
meta?: Record<string, any>;
derived?: Record<string, any>;
}
export interface MeasurementXYVariables<
DataType extends DoubleArray = DoubleArray,
> {
a?: MeasurementVariable<DataType>;
b?: MeasurementVariable<DataType>;
c?: MeasurementVariable<DataType>;
d?: MeasurementVariable<DataType>;
e?: MeasurementVariable<DataType>;
f?: MeasurementVariable<DataType>;
g?: MeasurementVariable<DataType>;
h?: MeasurementVariable<DataType>;
i?: MeasurementVariable<DataType>;
j?: MeasurementVariable<DataType>;
k?: MeasurementVariable<DataType>;
l?: MeasurementVariable<DataType>;
m?: MeasurementVariable<DataType>;
n?: MeasurementVariable<DataType>;
o?: MeasurementVariable<DataType>;
p?: MeasurementVariable<DataType>;
q?: MeasurementVariable<DataType>;
r?: MeasurementVariable<DataType>;
s?: MeasurementVariable<DataType>;
t?: MeasurementVariable<DataType>;
u?: MeasurementVariable<DataType>;
v?: MeasurementVariable<DataType>;
w?: MeasurementVariable<DataType>;
x: MeasurementVariable<DataType>;
y: MeasurementVariable<DataType>;
z?: MeasurementVariable<DataType>;
}
/**
* Describe a variable that can only contains as data an array of number
*/
export interface MeasurementVariable<
DataType extends DoubleArray = DoubleArray,
> {
/**
* Unit of the data in the column
* @TJS-examples ["Pa", "kg"]
*/
units?: string;
/**
* Long name of the column
*@TJS-examples ["absolute pressure"]
*/
label: string;
/**
*
*/
isDependent?: boolean;
/**
* An array containing numerical data
*/
data: DataType;
/** One letter that allows to define the variable */
symbol?: OneLetter;
/** If defined contain the minimal value of the data */
min?: number;
/** If defined contain the maximal value of the data */
max?: number;
/** If defined indicates (true or false) if the data series is monotone */
isMonotone?: boolean;
}
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneLowerCase =
| 'a'
| 'b'
| 'c'
| 'd'
| 'e'
| 'f'
| 'g'
| 'h'
| 'i'
| 'j'
| 'k'
| 'l'
| 'm'
| 'n'
| 'o'
| 'p'
| 'q'
| 'r'
| 's'
| 't'
| 'u'
| 'v'
| 'w'
| 'x'
| 'y'
| 'z';
/**Describes the location of some object. */
export interface Location {
/** Name of the institution
* @TJS-examples ["EPFL", "Heriot-Watt University"]
*/
entity: string;
/** Name or code of the building
* @TJS-examples ["I17", "Main building"]
*/
building?: string;
/**Name or code of the room in which the object is localized
* @TJS-examples ["1 B3", "Lab 1"]
*/
room?: string;
/** Internal code that is used to identify the location
* @TJS-examples ["I17 1 B3"]
*/
code: string;
}
/**
* Defines 2 limits as numbers
*/
export interface FromTo {
from: number;
to: number;
}
/**
* In order to store an array of numbers we prefer to either use native javascript

@@ -7,2 +158,13 @@ * arrays or to use Float64Array

export type DoubleArray = number[] | Float64Array;
export interface DataXY<DataType extends DoubleArray = DoubleArray> {
/**
* Array of numbers on x axis
*/
x: DataType;
/**
* Array of numbers on y axis
*/
y: DataType;
}
export interface PointXY {

@@ -37,9 +199,25 @@ a?: number;

/**
* Defines 2 limits as numbers
* In order to store an array of numbers we prefer to either use native javascript
* arrays or to use Float64Array
*/
export interface FromToXY {
from: PointXY;
to: PointXY;
}
export type NumberArray =
| number[]
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array;
/**
* case we may have a text, ArrayBuffer or Uint8Array
* This type is used by the package `ensure-string` to ensure that the data
* is actually a string.
* This is very useful in the packages like `jcampconverter` or `xy-parser`
*/
export type TextData = string | BinaryData;
export interface Software {

@@ -61,18 +239,29 @@ /** Version of the software instance.

}
/**
* In order to store an array of numbers we prefer to either use native javascript
* arrays or to use Float64Array
/** The instrument with which a spectrum was measured.
* CHMO: 0000998
*/
export type NumberArray =
| number[]
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array;
export interface Instrument {
/** The name of the instrument.
* @TJS-examples ["BELSORP MAX II"]
*/
model: string;
/** The name of the instrument manufacturer
* @TJS-examples ["Microtrac Retsch GmbH", "Bruker"]
*/
manufacturer: string;
/** The INTERNAL serial number of the instrument, e.g., the inventory number of the instrument in a university
* @TJS-examples ["B105863"]
*/
serialNumber?: string;
/** Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
* @TJS-examples ["345"]
*/
sku?: string;
/** The name of the software and the version number
* @TJS-examples ["BELMaster™ 7"]
*/
software?: Software;
location?: Location;
}
/**

@@ -82,5 +271,5 @@ * Defines 2 limits as numbers

export interface FromTo {
from: number;
to: number;
export interface FromToXY {
from: PointXY;
to: PointXY;
}

@@ -143,51 +332,2 @@ /**

| 'Z';
/** Value with units as https://schema.org/Value */
export interface Value {
/** The value of the quantitative value or property value node.
* @TJS-examples [0, 1000, 1345.24456, -10, -100]
*/
value: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */
units?: string;
}
/** The instrument with which a spectrum was measured.
* CHMO: 0000998
*/
export interface Instrument {
/** The name of the instrument.
* @TJS-examples ["BELSORP MAX II"]
*/
model: string;
/** The name of the instrument manufacturer
* @TJS-examples ["Microtrac Retsch GmbH", "Bruker"]
*/
manufacturer: string;
/** The INTERNAL serial number of the instrument, e.g., the inventory number of the instrument in a university
* @TJS-examples ["B105863"]
*/
serialNumber?: string;
/** Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
* @TJS-examples ["345"]
*/
sku?: string;
/** The name of the software and the version number
* @TJS-examples ["BELMaster™ 7"]
*/
software?: Software;
location?: Location;
}
export interface DataXY<DataType extends DoubleArray = DoubleArray> {
/**
* Array of numbers on x axis
*/
x: DataType;
/**
* Array of numbers on y axis
*/
y: DataType;
}
export interface OCLMolecule {

@@ -198,81 +338,5 @@ idCode: string;

}
export interface PeakXYWidth {
x: number;
y: number;
width: number;
}
/**
* Quantity that is defined as range, e.g., melting point
*/
export interface Range {
/** The lower value of some characteristic or property.*/
min: number;
/** The upper value of some characteristic or property.*/
max: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */
units?: string;
}
/**
* case we may have a text, ArrayBuffer or Uint8Array
* This type is used by the package `ensure-string` to ensure that the data
* is actually a string.
* This is very useful in the packages like `jcampconverter` or `xy-parser`
*/
export type TextData = string | BinaryData;
/**Describes the location of some object. */
export interface Location {
/** Name of the institution
* @TJS-examples ["EPFL", "Heriot-Watt University"]
*/
entity: string;
/** Name or code of the building
* @TJS-examples ["I17", "Main building"]
*/
building?: string;
/**Name or code of the room in which the object is localized
* @TJS-examples ["1 B3", "Lab 1"]
*/
room?: string;
/** Internal code that is used to identify the location
* @TJS-examples ["I17 1 B3"]
*/
code: string;
}
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneLowerCase =
| 'a'
| 'b'
| 'c'
| 'd'
| 'e'
| 'f'
| 'g'
| 'h'
| 'i'
| 'j'
| 'k'
| 'l'
| 'm'
| 'n'
| 'o'
| 'p'
| 'q'
| 'r'
| 's'
| 't'
| 'u'
| 'v'
| 'w'
| 'x'
| 'y'
| 'z';
export type BinaryData = ArrayBuffer | Uint8Array;
/**
* A type that allows one uppercase or lowercase letter
*/
export type OneUpperCase =

@@ -305,2 +369,32 @@ | 'A'

| 'Z';
/** Value with units as https://schema.org/Value */
export interface Value {
/** The value of the quantitative value or property value node.
* @TJS-examples [0, 1000, 1345.24456, -10, -100]
*/
value: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. The unit could be validated in the input form based on the UN/CEFACT Common Code list */
units?: string;
}
export interface PeakXYWidth {
x: number;
y: number;
width: number;
}
export type BinaryData = ArrayBuffer | Uint8Array;
/**
* Quantity that is defined as range, e.g., melting point
*/
export interface Range {
/** The lower value of some characteristic or property.*/
min: number;
/** The upper value of some characteristic or property.*/
max: number;
/** */
precision?: number;
/**A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */
units?: string;
}

@@ -319,91 +413,1 @@ export interface ICPDilution {

}
/**
* Describe a variable that can only contains as data an array of number
*/
export interface MeasurementVariable<
DataType extends DoubleArray = DoubleArray,
> {
/**
* Unit of the data in the column
* @TJS-examples ["Pa", "kg"]
*/
units?: string;
/**
* Long name of the column
*@TJS-examples ["absolute pressure"]
*/
label: string;
/**
*
*/
isDependent?: boolean;
/**
* An array containing numerical data
*/
data: DataType;
/** One letter that allows to define the variable */
symbol?: OneLetter;
/** If defined contain the minimal value of the data */
min?: number;
/** If defined contain the maximal value of the data */
max?: number;
/** If defined indicates (true or false) if the data series is monotone */
isMonotone?: boolean;
}
export interface MeasurementXY<DataType extends DoubleArray = DoubleArray> {
/**
* Variables containing the data of the measurement.
* It must contain at least the variable `x` and `y`
*/
variables: MeasurementXYVariables<DataType>;
/**
* Short description about the result of the measurement
*/
description?: string;
/**
* May contain the type of data. This is practical when you have a bunch of data
* of different types
*/
dataType?: string;
settings?: {
instrument?: Instrument;
[key: string]: any;
};
meta?: Record<string, any>;
derived?: Record<string, any>;
}
export interface MeasurementXYVariables<
DataType extends DoubleArray = DoubleArray,
> {
a?: MeasurementVariable<DataType>;
b?: MeasurementVariable<DataType>;
c?: MeasurementVariable<DataType>;
d?: MeasurementVariable<DataType>;
e?: MeasurementVariable<DataType>;
f?: MeasurementVariable<DataType>;
g?: MeasurementVariable<DataType>;
h?: MeasurementVariable<DataType>;
i?: MeasurementVariable<DataType>;
j?: MeasurementVariable<DataType>;
k?: MeasurementVariable<DataType>;
l?: MeasurementVariable<DataType>;
m?: MeasurementVariable<DataType>;
n?: MeasurementVariable<DataType>;
o?: MeasurementVariable<DataType>;
p?: MeasurementVariable<DataType>;
q?: MeasurementVariable<DataType>;
r?: MeasurementVariable<DataType>;
s?: MeasurementVariable<DataType>;
t?: MeasurementVariable<DataType>;
u?: MeasurementVariable<DataType>;
v?: MeasurementVariable<DataType>;
w?: MeasurementVariable<DataType>;
x: MeasurementVariable<DataType>;
y: MeasurementVariable<DataType>;
z?: MeasurementVariable<DataType>;
}
{
"name": "cheminfo-types",
"version": "1.2.0",
"version": "1.3.0",
"description": "Types for cheminfo packages and cheminfo data schema ",

@@ -5,0 +5,0 @@ "main": "./index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc