truflow 0.0.163 → 0.0.164
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/IInventory.d.ts +24 -0
- package/dist/IInventory.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/IInventory.ts +23 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface IField {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
autoGenerate?: boolean;
|
|
5
|
+
generationPattern?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IInventoryType {
|
|
9
|
+
name: string;
|
|
10
|
+
fields: IField[];
|
|
11
|
+
}
|
|
12
|
+
export interface IInventoryEntry {
|
|
13
|
+
type: string;
|
|
14
|
+
fields: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
}
|
|
19
|
+
export interface IGenerateFieldsOptions {
|
|
20
|
+
inventoryType: IInventoryEntry;
|
|
21
|
+
providedFields?: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface IField {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
autoGenerate?: boolean;
|
|
5
|
+
generationPattern?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IInventoryType {
|
|
10
|
+
name: string;
|
|
11
|
+
fields: IField[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IInventoryEntry {
|
|
15
|
+
type: string; // reference to InventoryType ID
|
|
16
|
+
fields: { [key: string]: any };
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IGenerateFieldsOptions {
|
|
21
|
+
inventoryType: IInventoryEntry;
|
|
22
|
+
providedFields?: { [key: string]: any };
|
|
23
|
+
}
|
package/src/index.ts
CHANGED