@secrecy/lib 1.0.0-dev.64 → 1.0.0-dev.65

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.
Files changed (196) hide show
  1. package/dist/BaseClient-15fdf493.d.ts +351 -0
  2. package/dist/BaseClient.cjs +2 -0
  3. package/dist/BaseClient.cjs.map +1 -0
  4. package/dist/BaseClient.d.ts +16 -104
  5. package/dist/BaseClient.js +2 -430
  6. package/dist/BaseClient.js.map +1 -0
  7. package/dist/PopupTools.cjs +2 -0
  8. package/dist/PopupTools.cjs.map +1 -0
  9. package/dist/PopupTools.d.ts +5 -4
  10. package/dist/PopupTools.js +2 -196
  11. package/dist/PopupTools.js.map +1 -0
  12. package/dist/ZeusThunder.cjs +2 -0
  13. package/dist/ZeusThunder.cjs.map +1 -0
  14. package/dist/ZeusThunder.d.ts +6 -2
  15. package/dist/ZeusThunder.js +2 -65
  16. package/dist/ZeusThunder.js.map +1 -0
  17. package/dist/cache.cjs +2 -0
  18. package/dist/cache.cjs.map +1 -0
  19. package/dist/cache.d.ts +22 -4
  20. package/dist/cache.js +2 -4
  21. package/dist/cache.js.map +1 -0
  22. package/dist/chunk-5WPCTUWH.cjs +2 -0
  23. package/dist/chunk-5WPCTUWH.cjs.map +1 -0
  24. package/dist/chunk-KMTF2BZE.js +2 -0
  25. package/dist/chunk-KMTF2BZE.js.map +1 -0
  26. package/dist/client/SecrecyAppClient.cjs +2 -0
  27. package/dist/client/SecrecyAppClient.cjs.map +1 -0
  28. package/dist/client/SecrecyAppClient.d.ts +16 -17
  29. package/dist/client/SecrecyAppClient.js +2 -227
  30. package/dist/client/SecrecyAppClient.js.map +1 -0
  31. package/dist/client/SecrecyCloudClient.cjs +2 -0
  32. package/dist/client/SecrecyCloudClient.cjs.map +1 -0
  33. package/dist/client/SecrecyCloudClient.d.ts +16 -89
  34. package/dist/client/SecrecyCloudClient.js +2 -1411
  35. package/dist/client/SecrecyCloudClient.js.map +1 -0
  36. package/dist/client/SecrecyDbClient.cjs +2 -0
  37. package/dist/client/SecrecyDbClient.cjs.map +1 -0
  38. package/dist/client/SecrecyDbClient.d.ts +16 -21
  39. package/dist/client/SecrecyDbClient.js +2 -177
  40. package/dist/client/SecrecyDbClient.js.map +1 -0
  41. package/dist/client/SecrecyMailClient.cjs +2 -0
  42. package/dist/client/SecrecyMailClient.cjs.map +1 -0
  43. package/dist/client/SecrecyMailClient.d.ts +16 -42
  44. package/dist/client/SecrecyMailClient.js +2 -1022
  45. package/dist/client/SecrecyMailClient.js.map +1 -0
  46. package/dist/client/SecrecyPayClient.cjs +2 -0
  47. package/dist/client/SecrecyPayClient.cjs.map +1 -0
  48. package/dist/client/SecrecyPayClient.d.ts +16 -7
  49. package/dist/client/SecrecyPayClient.js +2 -36
  50. package/dist/client/SecrecyPayClient.js.map +1 -0
  51. package/dist/client/SecrecyWalletClient.cjs +2 -0
  52. package/dist/client/SecrecyWalletClient.cjs.map +1 -0
  53. package/dist/client/SecrecyWalletClient.d.ts +16 -30
  54. package/dist/client/SecrecyWalletClient.js +2 -73
  55. package/dist/client/SecrecyWalletClient.js.map +1 -0
  56. package/dist/client/convert/file.cjs +2 -0
  57. package/dist/client/convert/file.cjs.map +1 -0
  58. package/dist/client/convert/file.d.ts +11 -5
  59. package/dist/client/convert/file.js +2 -33
  60. package/dist/client/convert/file.js.map +1 -0
  61. package/dist/client/convert/mail.cjs +2 -0
  62. package/dist/client/convert/mail.cjs.map +1 -0
  63. package/dist/client/convert/mail.d.ts +13 -3
  64. package/dist/client/convert/mail.js +2 -43
  65. package/dist/client/convert/mail.js.map +1 -0
  66. package/dist/client/convert/node.cjs +2 -0
  67. package/dist/client/convert/node.cjs.map +1 -0
  68. package/dist/client/convert/node.d.ts +18 -9
  69. package/dist/client/convert/node.js +2 -88
  70. package/dist/client/convert/node.js.map +1 -0
  71. package/dist/client/helpers.cjs +2 -0
  72. package/dist/client/helpers.cjs.map +1 -0
  73. package/dist/client/helpers.d.ts +16 -28
  74. package/dist/client/helpers.js +2 -113
  75. package/dist/client/helpers.js.map +1 -0
  76. package/dist/client/index.cjs +2 -0
  77. package/dist/client/index.cjs.map +1 -0
  78. package/dist/client/index.d.ts +16 -34
  79. package/dist/client/index.js +2 -46
  80. package/dist/client/index.js.map +1 -0
  81. package/dist/client/storage.cjs +2 -0
  82. package/dist/client/storage.cjs.map +1 -0
  83. package/dist/client/storage.d.ts +6 -3
  84. package/dist/client/storage.js +2 -12
  85. package/dist/client/storage.js.map +1 -0
  86. package/dist/client/types/File.cjs +1 -0
  87. package/dist/client/types/File.cjs.map +1 -0
  88. package/dist/client/types/File.d.ts +9 -5
  89. package/dist/client/types/File.js +1 -3
  90. package/dist/client/types/File.js.map +1 -0
  91. package/dist/client/types/Inputs.cjs +1 -0
  92. package/dist/client/types/Inputs.cjs.map +1 -0
  93. package/dist/client/types/Inputs.d.ts +6 -4
  94. package/dist/client/types/Inputs.js +1 -3
  95. package/dist/client/types/Inputs.js.map +1 -0
  96. package/dist/client/types/Node.cjs +1 -0
  97. package/dist/client/types/Node.cjs.map +1 -0
  98. package/dist/client/types/Node.d.ts +9 -56
  99. package/dist/client/types/Node.js +1 -3
  100. package/dist/client/types/Node.js.map +1 -0
  101. package/dist/client/types/UserAppNotifications.cjs +1 -0
  102. package/dist/client/types/UserAppNotifications.cjs.map +1 -0
  103. package/dist/client/types/UserAppNotifications.d.ts +3 -1
  104. package/dist/client/types/UserAppNotifications.js +1 -3
  105. package/dist/client/types/UserAppNotifications.js.map +1 -0
  106. package/dist/client/types/UserAppSettings.cjs +1 -0
  107. package/dist/client/types/UserAppSettings.cjs.map +1 -0
  108. package/dist/client/types/UserAppSettings.d.ts +3 -1
  109. package/dist/client/types/UserAppSettings.js +1 -3
  110. package/dist/client/types/UserAppSettings.js.map +1 -0
  111. package/dist/client/types/index.cjs +2 -0
  112. package/dist/client/types/index.cjs.map +1 -0
  113. package/dist/client/types/index.d.ts +86 -30
  114. package/dist/client/types/index.js +2 -8
  115. package/dist/client/types/index.js.map +1 -0
  116. package/dist/client/types/selectors.cjs +2 -0
  117. package/dist/client/types/selectors.cjs.map +1 -0
  118. package/dist/client/types/selectors.d.ts +7 -5
  119. package/dist/client/types/selectors.js +2 -135
  120. package/dist/client/types/selectors.js.map +1 -0
  121. package/dist/crypto/file.cjs +2 -0
  122. package/dist/crypto/file.cjs.map +1 -0
  123. package/dist/crypto/file.d.ts +8 -6
  124. package/dist/crypto/file.js +2 -195
  125. package/dist/crypto/file.js.map +1 -0
  126. package/dist/crypto/index.cjs +2 -0
  127. package/dist/crypto/index.cjs.map +1 -0
  128. package/dist/crypto/index.d.ts +11 -9
  129. package/dist/crypto/index.js +2 -45
  130. package/dist/crypto/index.js.map +1 -0
  131. package/dist/error.cjs +1 -0
  132. package/dist/error.cjs.map +1 -0
  133. package/dist/error.d.ts +12 -10
  134. package/dist/error.js +1 -3
  135. package/dist/error.js.map +1 -0
  136. package/dist/index.cjs +2 -0
  137. package/dist/index.cjs.map +1 -0
  138. package/dist/index.d.ts +19 -11
  139. package/dist/index.js +2 -9
  140. package/dist/index.js.map +1 -0
  141. package/dist/minify/index.cjs +2 -0
  142. package/dist/minify/index.cjs.map +1 -0
  143. package/dist/minify/index.d.ts +4 -2
  144. package/dist/minify/index.js +2 -23
  145. package/dist/minify/index.js.map +1 -0
  146. package/dist/minify/lz4.cjs +3 -0
  147. package/dist/minify/lz4.cjs.map +1 -0
  148. package/dist/minify/lz4.d.ts +7 -5
  149. package/dist/minify/lz4.js +3 -539
  150. package/dist/minify/lz4.js.map +1 -0
  151. package/dist/sodium.cjs +2 -0
  152. package/dist/sodium.cjs.map +1 -0
  153. package/dist/sodium.d.ts +5 -3
  154. package/dist/sodium.js +2 -6
  155. package/dist/sodium.js.map +1 -0
  156. package/dist/utils/store-buddy.cjs +2 -0
  157. package/dist/utils/store-buddy.cjs.map +1 -0
  158. package/dist/utils/store-buddy.d.ts +4 -3
  159. package/dist/utils/store-buddy.js +2 -58
  160. package/dist/utils/store-buddy.js.map +1 -0
  161. package/dist/utils/time.cjs +2 -0
  162. package/dist/utils/time.cjs.map +1 -0
  163. package/dist/utils/time.d.ts +4 -2
  164. package/dist/utils/time.js +2 -12
  165. package/dist/utils/time.js.map +1 -0
  166. package/dist/utils/utils.cjs +2 -0
  167. package/dist/utils/utils.cjs.map +1 -0
  168. package/dist/utils/utils.d.ts +6 -4
  169. package/dist/utils/utils.js +2 -47
  170. package/dist/utils/utils.js.map +1 -0
  171. package/dist/worker/md5.cjs +2 -0
  172. package/dist/worker/md5.cjs.map +1 -0
  173. package/dist/worker/md5.d.ts +3 -1
  174. package/dist/worker/md5.js +2 -24
  175. package/dist/worker/md5.js.map +1 -0
  176. package/dist/worker/sodium.cjs +2 -0
  177. package/dist/worker/sodium.cjs.map +1 -0
  178. package/dist/worker/sodium.d.ts +6 -3
  179. package/dist/worker/sodium.js +2 -118
  180. package/dist/worker/sodium.js.map +1 -0
  181. package/dist/worker/workerCodes.cjs +254 -0
  182. package/dist/worker/workerCodes.cjs.map +1 -0
  183. package/dist/worker/workerCodes.d.ts +4 -2
  184. package/dist/worker/workerCodes.js +4 -5
  185. package/dist/worker/workerCodes.js.map +1 -0
  186. package/dist/zeus/const.cjs +2 -0
  187. package/dist/zeus/const.cjs.map +1 -0
  188. package/dist/zeus/const.d.ts +5 -3
  189. package/dist/zeus/const.js +2 -1287
  190. package/dist/zeus/const.js.map +1 -0
  191. package/dist/zeus/index.cjs +5 -0
  192. package/dist/zeus/index.cjs.map +1 -0
  193. package/dist/zeus/index.d.ts +80 -78
  194. package/dist/zeus/index.js +5 -562
  195. package/dist/zeus/index.js.map +1 -0
  196. package/package.json +17 -20
@@ -1,6 +1,8 @@
1
- import type { GraphQLTypes, InputType } from "../../zeus/index.js";
2
- import type { fileSelector } from "./selectors.js";
3
- export declare type FileMetadata = {
1
+ import { InputType, GraphQLTypes } from '../../zeus/index.js';
2
+ import { fileSelector } from './selectors.js';
3
+ import '../../zeus/const.js';
4
+
5
+ declare type FileMetadata = {
4
6
  id: string;
5
7
  size: bigint;
6
8
  sizeBefore: bigint;
@@ -8,7 +10,9 @@ export declare type FileMetadata = {
8
10
  md5Encrypted: string;
9
11
  createdAt: Date;
10
12
  };
11
- export declare type InternalFile = FileMetadata & {
13
+ declare type InternalFile = FileMetadata & {
12
14
  key: string;
13
15
  };
14
- export declare type GQLFile = InputType<GraphQLTypes["File"], typeof fileSelector>;
16
+ declare type GQLFile = InputType<GraphQLTypes["File"], typeof fileSelector>;
17
+
18
+ export { FileMetadata, GQLFile, InternalFile };
@@ -1,3 +1 @@
1
- export {};
2
- export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaWVudC90eXBlcy9GaWxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgR3JhcGhRTFR5cGVzLCBJbnB1dFR5cGUgfSBmcm9tIFwiLi4vLi4vemV1cy9pbmRleC5qc1wiO1xuaW1wb3J0IHR5cGUgeyBmaWxlU2VsZWN0b3IgfSBmcm9tIFwiLi9zZWxlY3RvcnMuanNcIjtcblxuZXhwb3J0IHR5cGUgRmlsZU1ldGFkYXRhID0ge1xuICBpZDogc3RyaW5nO1xuICBzaXplOiBiaWdpbnQ7XG4gIHNpemVCZWZvcmU6IGJpZ2ludDtcbiAgbWQ1OiBzdHJpbmc7XG4gIG1kNUVuY3J5cHRlZDogc3RyaW5nO1xuICBjcmVhdGVkQXQ6IERhdGU7XG59O1xuXG5leHBvcnQgdHlwZSBJbnRlcm5hbEZpbGUgPSBGaWxlTWV0YWRhdGEgJiB7XG4gIGtleTogc3RyaW5nO1xufTtcblxuZXhwb3J0IHR5cGUgR1FMRmlsZSA9IElucHV0VHlwZTxHcmFwaFFMVHlwZXNbXCJGaWxlXCJdLCB0eXBlb2YgZmlsZVNlbGVjdG9yPjtcbiJdLCJtYXBwaW5ncyI6IiJ9
1
+ //# sourceMappingURL=File.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=Inputs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,16 +1,18 @@
1
- export declare type ShareFileKeyInput = {
1
+ declare type ShareFileKeyInput = {
2
2
  id: string;
3
3
  key: string;
4
4
  };
5
- export declare type NameKeyInput = {
5
+ declare type NameKeyInput = {
6
6
  id: string;
7
7
  nameKey: string;
8
8
  files: ShareFileKeyInput[];
9
9
  };
10
- export declare type ShareNodesInput = {
10
+ declare type ShareNodesInput = {
11
11
  nodes: NameKeyInput[];
12
12
  };
13
- export declare type ShareFileInHistoryInput = {
13
+ declare type ShareFileInHistoryInput = {
14
14
  fileId: string;
15
15
  users: ShareFileKeyInput[];
16
16
  };
17
+
18
+ export { NameKeyInput, ShareFileInHistoryInput, ShareFileKeyInput, ShareNodesInput };
@@ -1,3 +1 @@
1
- export {};
2
- export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaWVudC90eXBlcy9JbnB1dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgU2hhcmVGaWxlS2V5SW5wdXQgPSB7XG4gIGlkOiBzdHJpbmc7XG4gIGtleTogc3RyaW5nO1xufTtcblxuZXhwb3J0IHR5cGUgTmFtZUtleUlucHV0ID0ge1xuICBpZDogc3RyaW5nO1xuICBuYW1lS2V5OiBzdHJpbmc7XG4gIGZpbGVzOiBTaGFyZUZpbGVLZXlJbnB1dFtdO1xufTtcblxuZXhwb3J0IHR5cGUgU2hhcmVOb2Rlc0lucHV0ID0ge1xuICBub2RlczogTmFtZUtleUlucHV0W107XG59O1xuXG5leHBvcnQgdHlwZSBTaGFyZUZpbGVJbkhpc3RvcnlJbnB1dCA9IHtcbiAgZmlsZUlkOiBzdHJpbmc7XG4gIHVzZXJzOiBTaGFyZUZpbGVLZXlJbnB1dFtdO1xufTtcbiJdLCJtYXBwaW5ncyI6IiJ9
1
+ //# sourceMappingURL=Inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=Node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,56 +1,9 @@
1
- import type { NodeType, Rights } from "../../zeus/index.js";
2
- import type { FileMetadata, InternalFile, PublicUser } from "./index.js";
3
- import type { nodeFullSelector, nodeSelector } from "./selectors.js";
4
- import type { GraphQLTypes, InputType } from "../../zeus/index.js";
5
- export declare type NodeAccess<T extends Record<string, unknown> = Record<string, unknown>> = T & {
6
- rights: Rights;
7
- isRoot: boolean;
8
- sharedBy: {
9
- keyPair?: {
10
- pub: string;
11
- };
12
- };
13
- userApp: {
14
- user: PublicUser;
15
- };
16
- };
17
- export declare type NodeBreadcrumbItem = {
18
- id: string;
19
- name: string;
20
- pubKey: string;
21
- };
22
- export declare type NodeSize = {
23
- size: bigint;
24
- sizeBefore: bigint;
25
- };
26
- declare type NameKey = {
27
- nameKey?: string;
28
- };
29
- export declare type InternalNodeBreadcrumbItem = NodeBreadcrumbItem & NameKey;
30
- export declare type Node<T extends NodeBreadcrumbItem = NodeBreadcrumbItem, U extends Record<string, unknown> = Record<string, unknown>> = {
31
- id: string;
32
- isFavorite: boolean;
33
- type: NodeType;
34
- createdAt: Date;
35
- deletedAt: Date | null;
36
- updatedAt: Date;
37
- sizes: NodeSize;
38
- name: string;
39
- breadcrumb: T[];
40
- createdBy: PublicUser;
41
- access?: NodeAccess<U>;
42
- users: [PublicUser, Rights][];
43
- parentId: string | null;
44
- currentFileId: string | null;
45
- };
46
- export declare type NodeFull<T extends NodeBreadcrumbItem = NodeBreadcrumbItem, U extends Record<string, unknown> = Record<string, unknown>, V extends FileMetadata = FileMetadata> = Node<T, U> & {
47
- parent: Node<T, U> | null;
48
- children: Node<T, U>[];
49
- current?: V;
50
- history: V[];
51
- };
52
- export declare type InternalNode = Node<InternalNodeBreadcrumbItem, NameKey>;
53
- export declare type InternalNodeFull = NodeFull<InternalNodeBreadcrumbItem, NameKey, InternalFile>;
54
- export declare type GQLNode = InputType<GraphQLTypes["Node"], typeof nodeSelector>;
55
- export declare type GQLNodeFull = InputType<GraphQLTypes["Node"], typeof nodeFullSelector>;
56
- export {};
1
+ import '../../zeus/index.js';
2
+ export { GQLNode, GQLNodeFull, InternalNode, InternalNodeBreadcrumbItem, InternalNodeFull, Node, NodeAccess, NodeBreadcrumbItem, NodeFull, NodeSize } from './index.js';
3
+ import './selectors.js';
4
+ import './File.js';
5
+ import '../../zeus/const.js';
6
+ import '../../crypto/index.js';
7
+ import './UserAppSettings.js';
8
+ import './UserAppNotifications.js';
9
+ import './Inputs.js';
@@ -1,3 +1 @@
1
- export {};
2
- export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaWVudC90eXBlcy9Ob2RlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTm9kZVR5cGUsIFJpZ2h0cyB9IGZyb20gXCIuLi8uLi96ZXVzL2luZGV4LmpzXCI7XG5pbXBvcnQgdHlwZSB7IEZpbGVNZXRhZGF0YSwgSW50ZXJuYWxGaWxlLCBQdWJsaWNVc2VyIH0gZnJvbSBcIi4vaW5kZXguanNcIjtcbmltcG9ydCB0eXBlIHsgbm9kZUZ1bGxTZWxlY3Rvciwgbm9kZVNlbGVjdG9yIH0gZnJvbSBcIi4vc2VsZWN0b3JzLmpzXCI7XG5pbXBvcnQgdHlwZSB7IEdyYXBoUUxUeXBlcywgSW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eXBlIEdRTE5vZGVGdWxsID0gSW5wdXRUeXBlPFxuICBHcmFwaFFMVHlwZXNbXCJOb2RlXCJdLFxuICB0eXBlb2Ygbm9kZUZ1bGxTZWxlY3RvclxuPjtcbiJdLCJtYXBwaW5ncyI6IiJ9
1
+ //# sourceMappingURL=Node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=UserAppNotifications.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,6 +1,8 @@
1
- export declare type UserAppNotifications = {
1
+ declare type UserAppNotifications = {
2
2
  enableAll: boolean;
3
3
  mail: boolean;
4
4
  cloud: boolean;
5
5
  disableAllUntil?: Date;
6
6
  };
7
+
8
+ export { UserAppNotifications };
@@ -1,3 +1 @@
1
- export {};
2
- export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaWVudC90eXBlcy9Vc2VyQXBwTm90aWZpY2F0aW9ucy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBVc2VyQXBwTm90aWZpY2F0aW9ucyA9IHtcbiAgZW5hYmxlQWxsOiBib29sZWFuO1xuICBtYWlsOiBib29sZWFuO1xuICBjbG91ZDogYm9vbGVhbjtcbiAgZGlzYWJsZUFsbFVudGlsPzogRGF0ZTtcbn07XG4iXSwibWFwcGluZ3MiOiIifQ==
1
+ //# sourceMappingURL=UserAppNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=UserAppSettings.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,5 +1,7 @@
1
- export declare type UserAppSettings = {
1
+ declare type UserAppSettings = {
2
2
  cloudNodeDaysForDelete: number;
3
3
  historyFileDaysForDelete?: number;
4
4
  historyMaxFileCount: number;
5
5
  };
6
+
7
+ export { UserAppSettings };
@@ -1,3 +1 @@
1
- export {};
2
- export {};
3
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NsaWVudC90eXBlcy9Vc2VyQXBwU2V0dGluZ3MudHMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgVXNlckFwcFNldHRpbmdzID0ge1xuICBjbG91ZE5vZGVEYXlzRm9yRGVsZXRlOiBudW1iZXI7XG4gIGhpc3RvcnlGaWxlRGF5c0ZvckRlbGV0ZT86IG51bWJlcjtcbiAgaGlzdG9yeU1heEZpbGVDb3VudDogbnVtYmVyO1xufTtcbiJdLCJtYXBwaW5ncyI6IiJ9
1
+ //# sourceMappingURL=UserAppSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _Filejs = require('./File.js'); _createStarExport(_Filejs);var _Nodejs = require('./Node.js'); _createStarExport(_Nodejs);var _UserAppSettingsjs = require('./UserAppSettings.js'); _createStarExport(_UserAppSettingsjs);var _UserAppNotificationsjs = require('./UserAppNotifications.js'); _createStarExport(_UserAppNotificationsjs);var _Inputsjs = require('./Inputs.js'); _createStarExport(_Inputsjs);
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/client/types/index.ts"],"names":[],"mappings":"AAGA,WAAc,YACd,WAAc,YACd,WAAc,uBACd,WAAc,4BACd,WAAc","sourcesContent":["import type { KeyPair } from \"../../index.js\";\nimport type { InputType, GraphQLTypes } from \"../../zeus/index.js\";\nimport type { mailSelector, userSelector } from \"./selectors.js\";\nexport * from \"./File.js\";\nexport * from \"./Node.js\";\nexport * from \"./UserAppSettings.js\";\nexport * from \"./UserAppNotifications.js\";\nexport * from \"./Inputs.js\";\n\nexport type SecrecyUserApp = {\n keys: KeyPair;\n jwt: string;\n uaSession: string;\n};\n\nexport interface FileContentPart {\n contentUrl: string;\n order: number;\n md5: string;\n}\n\nexport type FilePartResponse = {\n order: number;\n fields: Record<string, string>;\n url: string;\n};\n\nexport type MailFileInput = { id: string; name: string; fileKey: string };\n\nexport type MailIntegrity = {\n id: string;\n hash: string;\n hashKey: string;\n replyTo?: {\n id: string;\n };\n temporaryRecipients: TemporaryMailUser[];\n recipients: PublicUser[];\n};\n\nexport type MailIntegrityDraft = MailIntegrity & {\n recipients: PublicUser[];\n};\n\nexport type TemporaryMailUser = {\n email?: string;\n};\n\nexport type InternalWaitingReceivedMail = {\n sender: PublicUser;\n date: string;\n attachmentsCount: number;\n recipients: PublicUser[];\n temporaryRecipients: TemporaryMailUser[];\n};\n\nexport type WaitingReceivedMail = {\n id: string;\n sender: PublicUser;\n date: Date;\n attachmentsCount: number;\n recipients: PublicUser[];\n temporaryRecipients: TemporaryMailUser[];\n};\n\nexport type MailFile = {\n fileKey: string;\n filename: string;\n file: {\n id: string;\n };\n};\n\nexport type MailType = \"sent\" | \"received\" | \"draft\";\n\nexport type GQLMail = InputType<GraphQLTypes[\"Mail\"], typeof mailSelector>;\n\nexport type InternalReceivedMail = {\n user: {\n receivedMails: GQLMail[];\n };\n};\n\nexport type BaseMail = {\n type: MailType;\n id: string;\n mailIntegrityId: string;\n replyTo?: string;\n body: string;\n subject: string;\n createdAt: Date;\n deletedAt: Date | null;\n openedAt: Date | null;\n isAltered: boolean;\n recipients: Omit<PublicUser, \"publicKey\">[];\n temporaryRecipients: TemporaryMailUser[];\n files: { id: string; name: string; key: string }[];\n};\n\nexport type PublicUser = InputType<GraphQLTypes[\"User\"], typeof userSelector>;\n\nexport interface ReceivedMail extends BaseMail {\n type: \"received\";\n sender: PublicUser;\n}\n\nexport type InternalSentMail = {\n user: {\n sentMails: GQLMail[];\n };\n};\n\nexport type InternalDraftMails = {\n user: {\n draftMails: GQLMail[];\n };\n};\n\nexport interface SentMail extends BaseMail {\n type: \"sent\";\n}\n\nexport interface DraftMail extends BaseMail {\n type: \"draft\";\n}\n\nexport type Mail = DraftMail | SentMail | ReceivedMail;\n\nexport type MailRecipientInput = {\n body: string;\n subject: string;\n recipientId: string;\n files: MailFileInput[];\n};\n"]}
@@ -1,32 +1,86 @@
1
- import type { KeyPair } from "../../index.js";
2
- import type { InputType, GraphQLTypes } from "../../zeus/index.js";
3
- import type { mailSelector, userSelector } from "./selectors.js";
4
- export * from "./File.js";
5
- export * from "./Node.js";
6
- export * from "./UserAppSettings.js";
7
- export * from "./UserAppNotifications.js";
8
- export * from "./Inputs.js";
9
- export declare type SecrecyUserApp = {
1
+ import { Rights, NodeType, InputType, GraphQLTypes } from '../../zeus/index.js';
2
+ import { KeyPair } from '../../crypto/index.js';
3
+ import { nodeSelector, nodeFullSelector, mailSelector, userSelector } from './selectors.js';
4
+ import { FileMetadata, InternalFile } from './File.js';
5
+ export { FileMetadata, GQLFile, InternalFile } from './File.js';
6
+ export { UserAppSettings } from './UserAppSettings.js';
7
+ export { UserAppNotifications } from './UserAppNotifications.js';
8
+ export { NameKeyInput, ShareFileInHistoryInput, ShareFileKeyInput, ShareNodesInput } from './Inputs.js';
9
+ import '../../zeus/const.js';
10
+
11
+ declare type NodeAccess<T extends Record<string, unknown> = Record<string, unknown>> = T & {
12
+ rights: Rights;
13
+ isRoot: boolean;
14
+ sharedBy: {
15
+ keyPair?: {
16
+ pub: string;
17
+ };
18
+ };
19
+ userApp: {
20
+ user: PublicUser;
21
+ };
22
+ };
23
+ declare type NodeBreadcrumbItem = {
24
+ id: string;
25
+ name: string;
26
+ pubKey: string;
27
+ };
28
+ declare type NodeSize = {
29
+ size: bigint;
30
+ sizeBefore: bigint;
31
+ };
32
+ declare type NameKey = {
33
+ nameKey?: string;
34
+ };
35
+ declare type InternalNodeBreadcrumbItem = NodeBreadcrumbItem & NameKey;
36
+ declare type Node<T extends NodeBreadcrumbItem = NodeBreadcrumbItem, U extends Record<string, unknown> = Record<string, unknown>> = {
37
+ id: string;
38
+ isFavorite: boolean;
39
+ type: NodeType;
40
+ createdAt: Date;
41
+ deletedAt: Date | null;
42
+ updatedAt: Date;
43
+ sizes: NodeSize;
44
+ name: string;
45
+ breadcrumb: T[];
46
+ createdBy: PublicUser;
47
+ access?: NodeAccess<U>;
48
+ users: [PublicUser, Rights][];
49
+ parentId: string | null;
50
+ currentFileId: string | null;
51
+ };
52
+ declare type NodeFull<T extends NodeBreadcrumbItem = NodeBreadcrumbItem, U extends Record<string, unknown> = Record<string, unknown>, V extends FileMetadata = FileMetadata> = Node<T, U> & {
53
+ parent: Node<T, U> | null;
54
+ children: Node<T, U>[];
55
+ current?: V;
56
+ history: V[];
57
+ };
58
+ declare type InternalNode = Node<InternalNodeBreadcrumbItem, NameKey>;
59
+ declare type InternalNodeFull = NodeFull<InternalNodeBreadcrumbItem, NameKey, InternalFile>;
60
+ declare type GQLNode = InputType<GraphQLTypes["Node"], typeof nodeSelector>;
61
+ declare type GQLNodeFull = InputType<GraphQLTypes["Node"], typeof nodeFullSelector>;
62
+
63
+ declare type SecrecyUserApp = {
10
64
  keys: KeyPair;
11
65
  jwt: string;
12
66
  uaSession: string;
13
67
  };
14
- export interface FileContentPart {
68
+ interface FileContentPart {
15
69
  contentUrl: string;
16
70
  order: number;
17
71
  md5: string;
18
72
  }
19
- export declare type FilePartResponse = {
73
+ declare type FilePartResponse = {
20
74
  order: number;
21
75
  fields: Record<string, string>;
22
76
  url: string;
23
77
  };
24
- export declare type MailFileInput = {
78
+ declare type MailFileInput = {
25
79
  id: string;
26
80
  name: string;
27
81
  fileKey: string;
28
82
  };
29
- export declare type MailIntegrity = {
83
+ declare type MailIntegrity = {
30
84
  id: string;
31
85
  hash: string;
32
86
  hashKey: string;
@@ -36,20 +90,20 @@ export declare type MailIntegrity = {
36
90
  temporaryRecipients: TemporaryMailUser[];
37
91
  recipients: PublicUser[];
38
92
  };
39
- export declare type MailIntegrityDraft = MailIntegrity & {
93
+ declare type MailIntegrityDraft = MailIntegrity & {
40
94
  recipients: PublicUser[];
41
95
  };
42
- export declare type TemporaryMailUser = {
96
+ declare type TemporaryMailUser = {
43
97
  email?: string;
44
98
  };
45
- export declare type InternalWaitingReceivedMail = {
99
+ declare type InternalWaitingReceivedMail = {
46
100
  sender: PublicUser;
47
101
  date: string;
48
102
  attachmentsCount: number;
49
103
  recipients: PublicUser[];
50
104
  temporaryRecipients: TemporaryMailUser[];
51
105
  };
52
- export declare type WaitingReceivedMail = {
106
+ declare type WaitingReceivedMail = {
53
107
  id: string;
54
108
  sender: PublicUser;
55
109
  date: Date;
@@ -57,21 +111,21 @@ export declare type WaitingReceivedMail = {
57
111
  recipients: PublicUser[];
58
112
  temporaryRecipients: TemporaryMailUser[];
59
113
  };
60
- export declare type MailFile = {
114
+ declare type MailFile = {
61
115
  fileKey: string;
62
116
  filename: string;
63
117
  file: {
64
118
  id: string;
65
119
  };
66
120
  };
67
- export declare type MailType = "sent" | "received" | "draft";
68
- export declare type GQLMail = InputType<GraphQLTypes["Mail"], typeof mailSelector>;
69
- export declare type InternalReceivedMail = {
121
+ declare type MailType = "sent" | "received" | "draft";
122
+ declare type GQLMail = InputType<GraphQLTypes["Mail"], typeof mailSelector>;
123
+ declare type InternalReceivedMail = {
70
124
  user: {
71
125
  receivedMails: GQLMail[];
72
126
  };
73
127
  };
74
- export declare type BaseMail = {
128
+ declare type BaseMail = {
75
129
  type: MailType;
76
130
  id: string;
77
131
  mailIntegrityId: string;
@@ -90,31 +144,33 @@ export declare type BaseMail = {
90
144
  key: string;
91
145
  }[];
92
146
  };
93
- export declare type PublicUser = InputType<GraphQLTypes["User"], typeof userSelector>;
94
- export interface ReceivedMail extends BaseMail {
147
+ declare type PublicUser = InputType<GraphQLTypes["User"], typeof userSelector>;
148
+ interface ReceivedMail extends BaseMail {
95
149
  type: "received";
96
150
  sender: PublicUser;
97
151
  }
98
- export declare type InternalSentMail = {
152
+ declare type InternalSentMail = {
99
153
  user: {
100
154
  sentMails: GQLMail[];
101
155
  };
102
156
  };
103
- export declare type InternalDraftMails = {
157
+ declare type InternalDraftMails = {
104
158
  user: {
105
159
  draftMails: GQLMail[];
106
160
  };
107
161
  };
108
- export interface SentMail extends BaseMail {
162
+ interface SentMail extends BaseMail {
109
163
  type: "sent";
110
164
  }
111
- export interface DraftMail extends BaseMail {
165
+ interface DraftMail extends BaseMail {
112
166
  type: "draft";
113
167
  }
114
- export declare type Mail = DraftMail | SentMail | ReceivedMail;
115
- export declare type MailRecipientInput = {
168
+ declare type Mail = DraftMail | SentMail | ReceivedMail;
169
+ declare type MailRecipientInput = {
116
170
  body: string;
117
171
  subject: string;
118
172
  recipientId: string;
119
173
  files: MailFileInput[];
120
174
  };
175
+
176
+ export { BaseMail, DraftMail, FileContentPart, FilePartResponse, GQLMail, GQLNode, GQLNodeFull, InternalDraftMails, InternalNode, InternalNodeBreadcrumbItem, InternalNodeFull, InternalReceivedMail, InternalSentMail, InternalWaitingReceivedMail, Mail, MailFile, MailFileInput, MailIntegrity, MailIntegrityDraft, MailRecipientInput, MailType, Node, NodeAccess, NodeBreadcrumbItem, NodeFull, NodeSize, PublicUser, ReceivedMail, SecrecyUserApp, SentMail, TemporaryMailUser, WaitingReceivedMail };
@@ -1,8 +1,2 @@
1
- export * from "./File.js";
2
- export * from "./Node.js";
3
- export * from "./UserAppSettings.js";
4
- export * from "./UserAppNotifications.js";
5
- export * from "./Inputs.js";
6
- export {};
7
- export {};
8
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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mVkTWFpbCBleHRlbmRzIEJhc2VNYWlsIHtcbiAgdHlwZTogXCJyZWNlaXZlZFwiO1xuICBzZW5kZXI6IFB1YmxpY1VzZXI7XG59XG5cbmV4cG9ydCB0eXBlIEludGVybmFsU2VudE1haWwgPSB7XG4gIHVzZXI6IHtcbiAgICBzZW50TWFpbHM6IEdRTE1haWxbXTtcbiAgfTtcbn07XG5cbmV4cG9ydCB0eXBlIEludGVybmFsRHJhZnRNYWlscyA9IHtcbiAgdXNlcjoge1xuICAgIGRyYWZ0TWFpbHM6IEdRTE1haWxbXTtcbiAgfTtcbn07XG5cbmV4cG9ydCBpbnRlcmZhY2UgU2VudE1haWwgZXh0ZW5kcyBCYXNlTWFpbCB7XG4gIHR5cGU6IFwic2VudFwiO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIERyYWZ0TWFpbCBleHRlbmRzIEJhc2VNYWlsIHtcbiAgdHlwZTogXCJkcmFmdFwiO1xufVxuXG5leHBvcnQgdHlwZSBNYWlsID0gRHJhZnRNYWlsIHwgU2VudE1haWwgfCBSZWNlaXZlZE1haWw7XG5cbmV4cG9ydCB0eXBlIE1haWxSZWNpcGllbnRJbnB1dCA9IHtcbiAgYm9keTogc3RyaW5nO1xuICBzdWJqZWN0OiBzdHJpbmc7XG4gIHJlY2lwaWVudElkOiBzdHJpbmc7XG4gIGZpbGVzOiBNYWlsRmlsZUlucHV0W107XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFHQSxjQUFjLFdBQVc7QUFDekIsY0FBYyxXQUFXO0FBQ3pCLGNBQWMsc0JBQXNCO0FBQ3BDLGNBQWMsMkJBQTJCO0FBQ3pDLGNBQWMsYUFBYTtBQUFDO0FBQUEifQ==
1
+ export*from"./File.js";export*from"./Node.js";export*from"./UserAppSettings.js";export*from"./UserAppNotifications.js";export*from"./Inputs.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/client/types/index.ts"],"sourcesContent":["import type { KeyPair } from \"../../index.js\";\nimport type { InputType, GraphQLTypes } from \"../../zeus/index.js\";\nimport type { mailSelector, userSelector } from \"./selectors.js\";\nexport * from \"./File.js\";\nexport * from \"./Node.js\";\nexport * from \"./UserAppSettings.js\";\nexport * from \"./UserAppNotifications.js\";\nexport * from \"./Inputs.js\";\n\nexport type SecrecyUserApp = {\n keys: KeyPair;\n jwt: string;\n uaSession: string;\n};\n\nexport interface FileContentPart {\n contentUrl: string;\n order: number;\n md5: string;\n}\n\nexport type FilePartResponse = {\n order: number;\n fields: Record<string, string>;\n url: string;\n};\n\nexport type MailFileInput = { id: string; name: string; fileKey: string };\n\nexport type MailIntegrity = {\n id: string;\n hash: string;\n hashKey: string;\n replyTo?: {\n id: string;\n };\n temporaryRecipients: TemporaryMailUser[];\n recipients: PublicUser[];\n};\n\nexport type MailIntegrityDraft = MailIntegrity & {\n recipients: PublicUser[];\n};\n\nexport type TemporaryMailUser = {\n email?: string;\n};\n\nexport type InternalWaitingReceivedMail = {\n sender: PublicUser;\n date: string;\n attachmentsCount: number;\n recipients: PublicUser[];\n temporaryRecipients: TemporaryMailUser[];\n};\n\nexport type WaitingReceivedMail = {\n id: string;\n sender: PublicUser;\n date: Date;\n attachmentsCount: number;\n recipients: PublicUser[];\n temporaryRecipients: TemporaryMailUser[];\n};\n\nexport type MailFile = {\n fileKey: string;\n filename: string;\n file: {\n id: string;\n };\n};\n\nexport type MailType = \"sent\" | \"received\" | \"draft\";\n\nexport type GQLMail = InputType<GraphQLTypes[\"Mail\"], typeof mailSelector>;\n\nexport type InternalReceivedMail = {\n user: {\n receivedMails: GQLMail[];\n };\n};\n\nexport type BaseMail = {\n type: MailType;\n id: string;\n mailIntegrityId: string;\n replyTo?: string;\n body: string;\n subject: string;\n createdAt: Date;\n deletedAt: Date | null;\n openedAt: Date | null;\n isAltered: boolean;\n recipients: Omit<PublicUser, \"publicKey\">[];\n temporaryRecipients: TemporaryMailUser[];\n files: { id: string; name: string; key: string }[];\n};\n\nexport type PublicUser = InputType<GraphQLTypes[\"User\"], typeof userSelector>;\n\nexport interface ReceivedMail extends BaseMail {\n type: \"received\";\n sender: PublicUser;\n}\n\nexport type InternalSentMail = {\n user: {\n sentMails: GQLMail[];\n };\n};\n\nexport type InternalDraftMails = {\n user: {\n draftMails: GQLMail[];\n };\n};\n\nexport interface SentMail extends BaseMail {\n type: \"sent\";\n}\n\nexport interface DraftMail extends BaseMail {\n type: \"draft\";\n}\n\nexport type Mail = DraftMail | SentMail | ReceivedMail;\n\nexport type MailRecipientInput = {\n body: string;\n subject: string;\n recipientId: string;\n files: MailFileInput[];\n};\n"],"mappings":"AAGA,WAAc,YACd,WAAc,YACd,WAAc,uBACd,WAAc,4BACd,WAAc","names":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5WPCTUWHcjs = require('../../chunk-5WPCTUWH.cjs');var _indexjs = require('../../zeus/index.js');const s=_indexjs.Selector.call(void 0, "File")({id:!0,size:!0,sizeBefore:!0,createdAt:!0,md5:!0,md5Encrypted:!0,access:{key:!0,sharedBy:{keyPair:{pub:!0}}}}),e= exports.userSelector =_indexjs.Selector.call(void 0, "User")({id:!0,firstname:!0,lastname:!0,email:!0,publicKey:!0}),i= exports.nodeSelector =_indexjs.Selector.call(void 0, "Node")({id:!0,isFavorite:!0,type:!0,createdAt:!0,deletedAt:!0,createdBy:{user:e},sizes:{size:!0,sizeBefore:!0},updatedAt:!0,name:!0,access:{rights:!0,isRoot:!0,nameKey:!0,sharedBy:{keyPair:{pub:!0}},userApp:{user:e}},accesses:{rights:!0,isRoot:!0,nameKey:!0,sharedBy:{keyPair:{pub:!0}},userApp:{user:e}},breadcrumb:{id:!0,name:!0,nameKey:!0,pubKey:!0},parentId:!0,currentFileId:!0}),c= exports.nodeFullSelector =_indexjs.Selector.call(void 0, "Node")(_chunk5WPCTUWHcjs.b.call(void 0, _chunk5WPCTUWHcjs.a.call(void 0, {},i),{parent:i,children:i,history:s,current:s})),d= exports.mailSelector =_indexjs.Selector.call(void 0, "Mail")({id:!0,type:!0,body:!0,subject:!0,openedAt:!0,createdAt:!0,deletedAt:!0,recipients:_chunk5WPCTUWHcjs.b.call(void 0, _chunk5WPCTUWHcjs.a.call(void 0, {},e),{publicKey:!1}),recipient:_chunk5WPCTUWHcjs.b.call(void 0, _chunk5WPCTUWHcjs.a.call(void 0, {},e),{publicKey:!1}),sender:e,mailIntegrity:{id:!0,hash:!0,hashKey:!0,replyTo:{id:!0},temporaryRecipients:{email:!0},recipients:_chunk5WPCTUWHcjs.b.call(void 0, _chunk5WPCTUWHcjs.a.call(void 0, {},e),{publicKey:!1})},mailIntegrityDraft:{id:!0,hash:!0,hashKey:!0,replyTo:{id:!0},temporaryRecipients:{email:!0},recipients:_chunk5WPCTUWHcjs.b.call(void 0, _chunk5WPCTUWHcjs.a.call(void 0, {},e),{publicKey:!1})},files:{fileKey:!0,filename:!0,file:{id:!0}}});exports.fileSelector = s; exports.mailSelector = d; exports.nodeFullSelector = c; exports.nodeSelector = i; exports.userSelector = e;
2
+ //# sourceMappingURL=selectors.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/client/types/selectors.ts"],"names":["Selector","fileSelector","userSelector","nodeSelector","nodeFullSelector","__spreadProps","__spreadValues","mailSelector"],"mappings":"oDAAA,OAAS,YAAAA,MAAgB,sBAElB,MAAMC,EAAeD,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,KAAM,GACN,WAAY,GACZ,UAAW,GACX,IAAK,GACL,aAAc,GACd,OAAQ,CACN,IAAK,GACL,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,CACF,CACF,CAAC,EAEYE,EAAeF,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,UAAW,GACX,SAAU,GACV,MAAO,GACP,UAAW,EACb,CAAC,EAEYG,EAAeH,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,WAAY,GACZ,KAAM,GACN,UAAW,GACX,UAAW,GACX,UAAW,CACT,KAAME,CACR,EACA,MAAO,CACL,KAAM,GACN,WAAY,EACd,EACA,UAAW,GACX,KAAM,GACN,OAAQ,CACN,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,EACA,QAAS,CACP,KAAMA,CACR,CACF,EACA,SAAU,CACR,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,EACA,QAAS,CACP,KAAMA,CACR,CACF,EACA,WAAY,CACV,GAAI,GACJ,KAAM,GACN,QAAS,GACT,OAAQ,EACV,EACA,SAAU,GACV,cAAe,EACjB,CAAC,EAEYE,EAAmBJ,EAAS,MAAM,EAAEK,EAAAC,EAAA,GAC5CH,GAD4C,CAE/C,OAAQA,EACR,SAAUA,EACV,QAASF,EACT,QAASA,CACX,EAAC,EAEYM,EAAeP,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,KAAM,GACN,KAAM,GACN,QAAS,GACT,SAAU,GACV,UAAW,GACX,UAAW,GACX,WAAYK,EAAAC,EAAA,GACPJ,GADO,CAEV,UAAW,EACb,GACA,UAAWG,EAAAC,EAAA,GACNJ,GADM,CAET,UAAW,EACb,GACA,OAAQA,EACR,cAAe,CACb,GAAI,GACJ,KAAM,GACN,QAAS,GACT,QAAS,CACP,GAAI,EACN,EACA,oBAAqB,CACnB,MAAO,EACT,EACA,WAAYG,EAAAC,EAAA,GACPJ,GADO,CAEV,UAAW,EACb,EACF,EACA,mBAAoB,CAClB,GAAI,GACJ,KAAM,GACN,QAAS,GACT,QAAS,CACP,GAAI,EACN,EACA,oBAAqB,CACnB,MAAO,EACT,EACA,WAAYG,EAAAC,EAAA,GACPJ,GADO,CAEV,UAAW,EACb,EACF,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,KAAM,CACJ,GAAI,EACN,CACF,CACF,CAAC","sourcesContent":["import { Selector } from \"../../zeus/index.js\";\n\nexport const fileSelector = Selector(\"File\")({\n id: true,\n size: true,\n sizeBefore: true,\n createdAt: true,\n md5: true,\n md5Encrypted: true,\n access: {\n key: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n }\n }\n});\n\nexport const userSelector = Selector(\"User\")({\n id: true,\n firstname: true,\n lastname: true,\n email: true,\n publicKey: true\n});\n\nexport const nodeSelector = Selector(\"Node\")({\n id: true,\n isFavorite: true,\n type: true,\n createdAt: true,\n deletedAt: true,\n createdBy: {\n user: userSelector\n },\n sizes: {\n size: true,\n sizeBefore: true\n },\n updatedAt: true,\n name: true,\n access: {\n rights: true,\n isRoot: true,\n nameKey: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n },\n userApp: {\n user: userSelector\n }\n },\n accesses: {\n rights: true,\n isRoot: true,\n nameKey: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n },\n userApp: {\n user: userSelector\n }\n },\n breadcrumb: {\n id: true,\n name: true,\n nameKey: true,\n pubKey: true\n },\n parentId: true,\n currentFileId: true\n});\n\nexport const nodeFullSelector = Selector(\"Node\")({\n ...nodeSelector,\n parent: nodeSelector,\n children: nodeSelector,\n history: fileSelector,\n current: fileSelector\n});\n\nexport const mailSelector = Selector(\"Mail\")({\n id: true,\n type: true,\n body: true,\n subject: true,\n openedAt: true,\n createdAt: true,\n deletedAt: true,\n recipients: {\n ...userSelector,\n publicKey: false\n },\n recipient: {\n ...userSelector,\n publicKey: false\n },\n sender: userSelector,\n mailIntegrity: {\n id: true,\n hash: true,\n hashKey: true,\n replyTo: {\n id: true\n },\n temporaryRecipients: {\n email: true\n },\n recipients: {\n ...userSelector,\n publicKey: false\n }\n },\n mailIntegrityDraft: {\n id: true,\n hash: true,\n hashKey: true,\n replyTo: {\n id: true\n },\n temporaryRecipients: {\n email: true\n },\n recipients: {\n ...userSelector,\n publicKey: false\n }\n },\n files: {\n fileKey: true,\n filename: true,\n file: {\n id: true\n }\n }\n});\n"]}
@@ -1,4 +1,4 @@
1
- export declare const fileSelector: {
1
+ declare const fileSelector: {
2
2
  id: true;
3
3
  size: true;
4
4
  sizeBefore: true;
@@ -14,14 +14,14 @@ export declare const fileSelector: {
14
14
  };
15
15
  };
16
16
  };
17
- export declare const userSelector: {
17
+ declare const userSelector: {
18
18
  id: true;
19
19
  firstname: true;
20
20
  lastname: true;
21
21
  email: true;
22
22
  publicKey: true;
23
23
  };
24
- export declare const nodeSelector: {
24
+ declare const nodeSelector: {
25
25
  id: true;
26
26
  isFavorite: true;
27
27
  type: true;
@@ -89,7 +89,7 @@ export declare const nodeSelector: {
89
89
  parentId: true;
90
90
  currentFileId: true;
91
91
  };
92
- export declare const nodeFullSelector: {
92
+ declare const nodeFullSelector: {
93
93
  parent: {
94
94
  id: true;
95
95
  isFavorite: true;
@@ -325,7 +325,7 @@ export declare const nodeFullSelector: {
325
325
  parentId: true;
326
326
  currentFileId: true;
327
327
  };
328
- export declare const mailSelector: {
328
+ declare const mailSelector: {
329
329
  id: true;
330
330
  type: true;
331
331
  body: true;
@@ -398,3 +398,5 @@ export declare const mailSelector: {
398
398
  };
399
399
  };
400
400
  };
401
+
402
+ export { fileSelector, mailSelector, nodeFullSelector, nodeSelector, userSelector };