truflow 0.0.164 → 0.0.166

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.
@@ -1,3 +1,28 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import mongoose from "mongoose";
1
26
  export interface IField {
2
27
  name: string;
3
28
  type: string;
@@ -16,9 +41,32 @@ export interface IInventoryEntry {
16
41
  };
17
42
  createdAt?: Date;
18
43
  }
19
- export interface IGenerateFieldsOptions {
20
- inventoryType: IInventoryEntry;
21
- providedFields?: {
22
- [key: string]: any;
23
- };
44
+ export type IGenerateFields = (inventoryType: IInventoryType, providedFields?: {
45
+ [key: string]: any;
46
+ }) => Promise<{
47
+ [key: string]: any;
48
+ }>;
49
+ export type ISupplier = ILeanSupplier & Document;
50
+ export interface ILeanSupplier {
51
+ _id: mongoose.Types.ObjectId;
52
+ name: string;
53
+ phone: string;
54
+ ermail: string;
55
+ website: string;
56
+ itemsSupplied: mongoose.Types.ObjectId[];
57
+ tagPrefix: string;
58
+ allmoxyId?: string;
59
+ }
60
+ export type ICategory = ILeanCategory & Document;
61
+ export interface ILeanCategory {
62
+ _id: mongoose.Types.ObjectId;
63
+ name: string;
64
+ tagPrefix: string;
65
+ allmoxyId?: string;
66
+ }
67
+ export type IInventoryLocation = ILeanInventoryLocation & Document;
68
+ export interface ILeanInventoryLocation {
69
+ _id: mongoose.Types.ObjectId;
70
+ name: string;
71
+ allmoxyId?: string;
24
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truflow",
3
- "version": "0.0.164",
3
+ "version": "0.0.166",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
package/src/IInventory.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import mongoose from "mongoose";
2
+
1
3
  export interface IField {
2
4
  name: string;
3
5
  type: string;
@@ -12,12 +14,42 @@ export interface IInventoryType {
12
14
  }
13
15
 
14
16
  export interface IInventoryEntry {
15
- type: string; // reference to InventoryType ID
17
+ type: string;
16
18
  fields: { [key: string]: any };
17
19
  createdAt?: Date;
18
20
  }
19
21
 
20
- export interface IGenerateFieldsOptions {
21
- inventoryType: IInventoryEntry;
22
- providedFields?: { [key: string]: any };
22
+ export type IGenerateFields = (
23
+ inventoryType: IInventoryType,
24
+ providedFields?: { [key: string]: any }
25
+ ) => Promise<{ [key: string]: any }>;
26
+
27
+ export type ISupplier = ILeanSupplier & Document;
28
+
29
+ export interface ILeanSupplier {
30
+ _id: mongoose.Types.ObjectId;
31
+ name: string;
32
+ phone: string;
33
+ ermail: string;
34
+ website: string;
35
+ itemsSupplied: mongoose.Types.ObjectId[];
36
+ tagPrefix: string;
37
+ allmoxyId?: string;
38
+ }
39
+
40
+ export type ICategory = ILeanCategory & Document;
41
+
42
+ export interface ILeanCategory {
43
+ _id: mongoose.Types.ObjectId;
44
+ name: string;
45
+ tagPrefix: string;
46
+ allmoxyId?: string;
47
+ }
48
+
49
+ export type IInventoryLocation = ILeanInventoryLocation & Document;
50
+
51
+ export interface ILeanInventoryLocation {
52
+ _id: mongoose.Types.ObjectId;
53
+ name: string;
54
+ allmoxyId?: string;
23
55
  }