docpouch-client 0.8.4 → 0.8.6

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/src/types.ts CHANGED
@@ -20,6 +20,7 @@ export interface I_UserCreation {
20
20
  }
21
21
 
22
22
  export interface I_UserUpdate {
23
+ _id: string;
23
24
  name?: string;
24
25
  password?: string;
25
26
  email?: string;
@@ -39,6 +40,7 @@ export interface I_UserDisplay {
39
40
  export interface I_LoginResponse {
40
41
  token: string;
41
42
  isAdmin: boolean;
43
+ userName: string;
42
44
  }
43
45
 
44
46
  // Document related types
@@ -52,8 +54,11 @@ export interface I_DocumentCreation {
52
54
  type: number;
53
55
  subType: number;
54
56
  content: any;
57
+ shareWithGroup: boolean;
58
+ shareWithDepartment: boolean;
55
59
  }
56
60
 
61
+
57
62
  export interface I_DocumentCreationOwned extends I_DocumentCreation {
58
63
  owner: string;
59
64
  }
@@ -70,38 +75,44 @@ export interface I_DocumentQuery {
70
75
  title?: string;
71
76
  type?: number;
72
77
  subType?: number;
78
+ shareWithGroup?: boolean;
79
+ shareWithDepartment?: boolean;
73
80
  }
74
81
 
82
+
75
83
  // Structure related types
76
84
  export interface I_DataStructure {
77
85
  _id?: string | undefined;
78
86
  name: string;
79
87
  description: string;
80
- reference?: any;
81
- fields: any[];
88
+ fields: I_StructureField[];
89
+ }
90
+
91
+ export interface I_StructureField {
92
+ name: string;
93
+ type: string;
94
+ items?: string;
82
95
  }
83
96
 
84
97
  export interface I_StructureEntry {
85
98
  _id?: string;
86
99
  name: string;
87
100
  description: string;
88
- reference?: any;
89
- fields: any[];
101
+ fields: I_StructureField[];
90
102
  }
91
103
 
104
+
92
105
  export interface I_StructureCreation {
93
106
  name: string;
94
107
  description?: string;
95
- reference?: any;
96
- fields: any[];
108
+ fields: I_StructureField[];
97
109
  }
98
110
 
99
111
  export interface I_StructureUpdate {
100
112
  _id: string;
101
113
  name?: string;
102
114
  description?: string;
103
- reference?: any;
104
- fields?: any[];
115
+ fields?: I_StructureField[];
105
116
  }
106
117
 
107
118
  // Document type related types
@@ -115,9 +126,9 @@ export interface I_DocumentType {
115
126
  }
116
127
 
117
128
  // WebSocket-related types
118
- export type I_EventString = 'subscribe' | 'unsubscribe' | 'heartbeatPong' | "heartbeatPing" | "newDocument" | "newStructure" |
119
- "newUser" | "removedID" | "changedDocument" | "changedStructure" | "changedUser" | "confirmSubscription" |
120
- "confirmUnsubscription" | "removedUser" | "removedStructure" | "removedDocument";
129
+ export type I_EventString = 'heartbeatPong' | "heartbeatPing" | "newDocument" | "newStructure" |
130
+ "newUser" | "newType" | "removedID" | "changedDocument" | "changedStructure" | "changedUser" | "changedType" |
131
+ "removedUser" | "removedStructure" | "removedDocument" | "removedType";
121
132
 
122
133
  export interface I_WsMessage {
123
134
  newDocument?: I_DocumentEntry;
@@ -131,4 +142,5 @@ export interface I_WsMessage {
131
142
  confirmUnsubscription?: boolean;
132
143
  heartbeatPing?: number;
133
144
  heartbeatPong?: number;
145
+ newType?: I_DocumentType;
134
146
  }