@secrecy/lib 1.0.0-dev.63 → 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 -482
  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 -216
  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 -79
  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 -256
  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 -1627
  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 -198
  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 -1187
  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 -37
  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 -76
  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 -34
  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 -48
  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 -100
  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 -126
  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 -52
  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 -138
  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 -210
  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 -47
  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 -28
  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 -627
  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 -65
  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 -14
  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 -57
  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 -25
  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 -120
  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 -1286
  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 -687
  195. package/dist/zeus/index.js.map +1 -0
  196. package/package.json +27 -30
@@ -1,15 +1,16 @@
1
- import { Ops } from "./const.js";
2
- export declare const HOST = "http://localhost:4000/graphql";
3
- export declare const HEADERS: {};
4
- export declare const apiSubscription: (options: chainOptions) => (query: string) => {
1
+ import { Ops } from './const.js';
2
+
3
+ declare const HOST = "http://localhost:4000/graphql";
4
+ declare const HEADERS: {};
5
+ declare const apiSubscription: (options: chainOptions) => (query: string) => {
5
6
  ws: WebSocket;
6
7
  on: (e: (args: any) => void) => void;
7
8
  off: (e: (args: any) => void) => void;
8
9
  error: (e: (args: any) => void) => void;
9
10
  open: (e: () => void) => void;
10
11
  };
11
- export declare const apiFetch: (options: [input: RequestInfo | URL, init?: RequestInit | undefined]) => (query: string, variables?: Record<string, unknown>) => Promise<Record<string, any> | undefined>;
12
- export declare const InternalsBuildQuery: ({ ops, props, returns, options, scalars }: {
12
+ declare const apiFetch: (options: [input: URL | RequestInfo, init?: RequestInit | undefined]) => (query: string, variables?: Record<string, unknown>) => Promise<Record<string, any> | undefined>;
13
+ declare const InternalsBuildQuery: ({ ops, props, returns, options, scalars }: {
13
14
  props: AllTypesPropsType;
14
15
  returns: ReturnTypesType;
15
16
  ops: Operations;
@@ -19,30 +20,30 @@ export declare const InternalsBuildQuery: ({ ops, props, returns, options, scala
19
20
  name: string;
20
21
  graphQLType: string;
21
22
  }>) => string;
22
- export declare const Thunder: (fn: FetchFunction) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
23
+ declare const Thunder: (fn: FetchFunction) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
23
24
  variables?: Record<string, unknown>;
24
25
  }) => Promise<InputType<GraphQLTypes[R], Z, SCLR>>;
25
- export declare const Chain: (...options: chainOptions) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
26
+ declare const Chain: (...options: chainOptions) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
26
27
  variables?: Record<string, unknown>;
27
28
  }) => Promise<InputType<GraphQLTypes[R], Z, SCLR>>;
28
- export declare const SubscriptionThunder: (fn: SubscriptionFunction) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: (OperationOptions & {
29
+ declare const SubscriptionThunder: (fn: SubscriptionFunction) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: (OperationOptions & {
29
30
  variables?: ExtractVariables<Z> | undefined;
30
31
  }) | undefined) => SubscriptionToGraphQL<Z, GraphQLTypes[R], SCLR>;
31
- export declare const Subscription: (...options: chainOptions) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: (OperationOptions & {
32
+ declare const Subscription: (...options: chainOptions) => <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: (OperationOptions & {
32
33
  variables?: ExtractVariables<Z> | undefined;
33
34
  }) | undefined) => SubscriptionToGraphQL<Z, GraphQLTypes[R], SCLR>;
34
- export declare const Zeus: <Z extends ValueTypes[R], O extends "query" | "mutation" | "subscription", R extends keyof ValueTypes = GenericOperation<O>>(operation: O, o: Z | ValueTypes[R], ops?: {
35
+ declare const Zeus: <Z extends ValueTypes[R], O extends "query" | "mutation" | "subscription", R extends keyof ValueTypes = GenericOperation<O>>(operation: O, o: Z | ValueTypes[R], ops?: {
35
36
  operationOptions?: OperationOptions;
36
37
  scalars?: ScalarDefinition;
37
38
  }) => string;
38
- export declare const ZeusSelect: <T>() => SelectionFunction<T>;
39
- export declare const Selector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
40
- export declare const TypeFromSelector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
41
- export declare const Gql: <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
39
+ declare const ZeusSelect: <T>() => SelectionFunction<T>;
40
+ declare const Selector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
41
+ declare const TypeFromSelector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
42
+ declare const Gql: <O extends "query" | "mutation" | "subscription", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z | ValueTypes[R], ops?: OperationOptions & {
42
43
  variables?: Record<string, unknown>;
43
44
  }) => Promise<InputType<GraphQLTypes[R], Z, SCLR>>;
44
- export declare const ZeusScalars: SelectionFunction<ScalarCoders>;
45
- export declare const decodeScalarsInResponse: <O extends Operations>({ response, scalars, returns, ops, initialZeusQuery, initialOp }: {
45
+ declare const ZeusScalars: SelectionFunction<ScalarCoders>;
46
+ declare const decodeScalarsInResponse: <O extends Operations>({ response, scalars, returns, ops, initialZeusQuery, initialOp }: {
46
47
  ops: O;
47
48
  response: any;
48
49
  returns: ReturnTypesType;
@@ -50,7 +51,7 @@ export declare const decodeScalarsInResponse: <O extends Operations>({ response,
50
51
  initialOp: keyof O;
51
52
  initialZeusQuery: InputValueType | VType;
52
53
  }) => any;
53
- export declare const traverseResponse: ({ resolvers, scalarPaths }: {
54
+ declare const traverseResponse: ({ resolvers, scalarPaths }: {
54
55
  scalarPaths: {
55
56
  [x: string]: `scalar.${string}`;
56
57
  };
@@ -58,68 +59,68 @@ export declare const traverseResponse: ({ resolvers, scalarPaths }: {
58
59
  [x: string]: ScalarResolver | undefined;
59
60
  };
60
61
  }) => (k: string, o: InputValueType | VType, p?: string[]) => unknown;
61
- export declare type AllTypesPropsType = {
62
+ declare type AllTypesPropsType = {
62
63
  [x: string]: undefined | `scalar.${string}` | "enum" | {
63
64
  [x: string]: undefined | string | {
64
65
  [x: string]: string | undefined;
65
66
  };
66
67
  };
67
68
  };
68
- export declare type ReturnTypesType = {
69
+ declare type ReturnTypesType = {
69
70
  [x: string]: {
70
71
  [x: string]: string | undefined;
71
72
  } | `scalar.${string}` | undefined;
72
73
  };
73
- export declare type InputValueType = {
74
+ declare type InputValueType = {
74
75
  [x: string]: undefined | boolean | string | number | [any, undefined | boolean | InputValueType] | InputValueType;
75
76
  };
76
- export declare type VType = undefined | boolean | string | number | [any, undefined | boolean | InputValueType] | InputValueType;
77
- export declare type PlainType = boolean | number | string | null | undefined;
78
- export declare type ZeusArgsType = PlainType | {
77
+ declare type VType = undefined | boolean | string | number | [any, undefined | boolean | InputValueType] | InputValueType;
78
+ declare type PlainType = boolean | number | string | null | undefined;
79
+ declare type ZeusArgsType = PlainType | {
79
80
  [x: string]: ZeusArgsType;
80
81
  } | Array<ZeusArgsType>;
81
- export declare type Operations = Record<string, string>;
82
- export declare type VariableDefinition = {
82
+ declare type Operations = Record<string, string>;
83
+ declare type VariableDefinition = {
83
84
  [x: string]: unknown;
84
85
  };
85
- export declare const SEPARATOR = "|";
86
- export declare type fetchOptions = Parameters<typeof fetch>;
86
+ declare const SEPARATOR = "|";
87
+ declare type fetchOptions = Parameters<typeof fetch>;
87
88
  declare type websocketOptions = typeof WebSocket extends new (...args: infer R) => WebSocket ? R : never;
88
- export declare type chainOptions = [fetchOptions[0], fetchOptions[1] & {
89
+ declare type chainOptions = [fetchOptions[0], fetchOptions[1] & {
89
90
  websocket?: websocketOptions;
90
91
  }] | [fetchOptions[0]];
91
- export declare type FetchFunction = (query: string, variables?: Record<string, unknown>) => Promise<any>;
92
- export declare type SubscriptionFunction = (query: string) => any;
92
+ declare type FetchFunction = (query: string, variables?: Record<string, unknown>) => Promise<any>;
93
+ declare type SubscriptionFunction = (query: string) => any;
93
94
  declare type NotUndefined<T> = T extends undefined ? never : T;
94
- export declare type ResolverType<F> = NotUndefined<F extends [infer ARGS, any] ? ARGS : undefined>;
95
- export declare type OperationOptions = {
95
+ declare type ResolverType<F> = NotUndefined<F extends [infer ARGS, any] ? ARGS : undefined>;
96
+ declare type OperationOptions = {
96
97
  operationName?: string;
97
98
  };
98
- export declare type ScalarCoder = Record<string, (s: unknown) => string>;
99
- export interface GraphQLResponse {
99
+ declare type ScalarCoder = Record<string, (s: unknown) => string>;
100
+ interface GraphQLResponse {
100
101
  data?: Record<string, any>;
101
102
  errors?: Array<{
102
103
  message: string;
103
104
  }>;
104
105
  }
105
- export declare class GraphQLError extends Error {
106
+ declare class GraphQLError extends Error {
106
107
  response: GraphQLResponse;
107
108
  constructor(response: GraphQLResponse);
108
109
  toString(): string;
109
110
  }
110
- export declare type GenericOperation<O> = O extends keyof typeof Ops ? typeof Ops[O] : never;
111
- export declare type ThunderGraphQLOptions<SCLR extends ScalarDefinition> = {
111
+ declare type GenericOperation<O> = O extends keyof typeof Ops ? typeof Ops[O] : never;
112
+ declare type ThunderGraphQLOptions<SCLR extends ScalarDefinition> = {
112
113
  scalars?: SCLR | ScalarCoders;
113
114
  };
114
- export declare const PrepareScalarPaths: ({ ops, returns }: {
115
+ declare const PrepareScalarPaths: ({ ops, returns }: {
115
116
  returns: ReturnTypesType;
116
117
  ops: Operations;
117
118
  }) => (k: string, originalKey: string, o: InputValueType | VType, p?: string[], pOriginals?: string[], root?: boolean) => {
118
119
  [x: string]: `scalar.${string}`;
119
120
  } | undefined;
120
- export declare const purifyGraphQLKey: (k: string) => string;
121
- export declare const ResolveFromPath: (props: AllTypesPropsType, returns: ReturnTypesType, ops: Operations) => (path: string) => "enum" | "not" | `scalar.${string}`;
122
- export declare const InternalArgsBuilt: ({ props, ops, returns, scalars, vars }: {
121
+ declare const purifyGraphQLKey: (k: string) => string;
122
+ declare const ResolveFromPath: (props: AllTypesPropsType, returns: ReturnTypesType, ops: Operations) => (path: string) => "enum" | "not" | `scalar.${string}`;
123
+ declare const InternalArgsBuilt: ({ props, ops, returns, scalars, vars }: {
123
124
  props: AllTypesPropsType;
124
125
  returns: ReturnTypesType;
125
126
  ops: Operations;
@@ -129,22 +130,22 @@ export declare const InternalArgsBuilt: ({ props, ops, returns, scalars, vars }:
129
130
  graphQLType: string;
130
131
  }>;
131
132
  }) => (a: ZeusArgsType, p?: string, root?: boolean) => string;
132
- export declare const resolverFor: <X, T extends keyof ResolverInputTypes, Z extends keyof ResolverInputTypes[T]>(_type: T, _field: Z, fn: (args: Required<ResolverInputTypes[T]>[Z] extends [infer Input, any] ? Input : any, source: any) => Z extends keyof ModelTypes[T] ? X | ModelTypes[T][Z] | Promise<ModelTypes[T][Z]> : any) => (args?: any, source?: any) => any;
133
- export declare type UnwrapPromise<T> = T extends Promise<infer R> ? R : T;
134
- export declare type ZeusState<T extends (...args: any[]) => Promise<any>> = NonNullable<UnwrapPromise<ReturnType<T>>>;
135
- export declare type ZeusHook<T extends (...args: any[]) => Record<string, (...args: any[]) => Promise<any>>, N extends keyof ReturnType<T>> = ZeusState<ReturnType<T>[N]>;
136
- export declare type WithTypeNameValue<T> = T & {
133
+ declare const resolverFor: <X, T extends keyof ResolverInputTypes, Z extends keyof ResolverInputTypes[T]>(_type: T, _field: Z, fn: (args: Required<ResolverInputTypes[T]>[Z] extends [infer Input, any] ? Input : any, source: any) => Z extends keyof ModelTypes[T] ? X | ModelTypes[T][Z] | Promise<ModelTypes[T][Z]> : any) => (args?: any, source?: any) => any;
134
+ declare type UnwrapPromise<T> = T extends Promise<infer R> ? R : T;
135
+ declare type ZeusState<T extends (...args: any[]) => Promise<any>> = NonNullable<UnwrapPromise<ReturnType<T>>>;
136
+ declare type ZeusHook<T extends (...args: any[]) => Record<string, (...args: any[]) => Promise<any>>, N extends keyof ReturnType<T>> = ZeusState<ReturnType<T>[N]>;
137
+ declare type WithTypeNameValue<T> = T & {
137
138
  __typename?: boolean;
138
139
  __directives?: string;
139
140
  };
140
- export declare type AliasType<T> = WithTypeNameValue<T> & {
141
+ declare type AliasType<T> = WithTypeNameValue<T> & {
141
142
  __alias?: Record<string, WithTypeNameValue<T>>;
142
143
  };
143
144
  declare type DeepAnify<T> = {
144
145
  [P in keyof T]?: any;
145
146
  };
146
147
  declare type IsPayLoad<T> = T extends [any, infer PayLoad] ? PayLoad : T;
147
- export declare type ScalarDefinition = Record<string, ScalarResolver>;
148
+ declare type ScalarDefinition = Record<string, ScalarResolver>;
148
149
  declare type IsScalar<S, SCLR extends ScalarDefinition> = S extends "scalar" & {
149
150
  name: infer T;
150
151
  } ? T extends keyof SCLR ? SCLR[T]["decode"] extends (s: unknown) => unknown ? ReturnType<SCLR[T]["decode"]> : unknown : unknown : S;
@@ -162,13 +163,13 @@ declare type IsInterfaced<SRC extends DeepAnify<DST>, DST, SCLR extends ScalarDe
162
163
  } : {
163
164
  [P in keyof Pick<SRC, keyof DST>]: IsPayLoad<DST[P]> extends BaseZeusResolver ? IsScalar<SRC[P], SCLR> : IsArray<SRC[P], DST[P], SCLR>;
164
165
  };
165
- export declare type MapType<SRC, DST, SCLR extends ScalarDefinition> = SRC extends DeepAnify<DST> ? IsInterfaced<SRC, DST, SCLR> : never;
166
- export declare type InputType<SRC, DST, SCLR extends ScalarDefinition = {}> = IsPayLoad<DST> extends {
166
+ declare type MapType<SRC, DST, SCLR extends ScalarDefinition> = SRC extends DeepAnify<DST> ? IsInterfaced<SRC, DST, SCLR> : never;
167
+ declare type InputType<SRC, DST, SCLR extends ScalarDefinition = {}> = IsPayLoad<DST> extends {
167
168
  __alias: infer R;
168
169
  } ? {
169
170
  [P in keyof R]: MapType<SRC, R[P], SCLR>[keyof MapType<SRC, R[P], SCLR>];
170
171
  } & MapType<SRC, Omit<IsPayLoad<DST>, "__alias">, SCLR> : MapType<SRC, IsPayLoad<DST>, SCLR>;
171
- export declare type SubscriptionToGraphQL<Z, T, SCLR extends ScalarDefinition> = {
172
+ declare type SubscriptionToGraphQL<Z, T, SCLR extends ScalarDefinition> = {
172
173
  ws: WebSocket;
173
174
  on: (fn: (args: InputType<T, Z, SCLR>) => void) => void;
174
175
  off: (fn: (e: {
@@ -183,12 +184,12 @@ export declare type SubscriptionToGraphQL<Z, T, SCLR extends ScalarDefinition> =
183
184
  }) => void) => void;
184
185
  open: () => void;
185
186
  };
186
- export declare type FromSelector<SELECTOR, NAME extends keyof GraphQLTypes, SCLR extends ScalarDefinition = {}> = InputType<GraphQLTypes[NAME], SELECTOR, SCLR>;
187
- export declare type ScalarResolver = {
187
+ declare type FromSelector<SELECTOR, NAME extends keyof GraphQLTypes, SCLR extends ScalarDefinition = {}> = InputType<GraphQLTypes[NAME], SELECTOR, SCLR>;
188
+ declare type ScalarResolver = {
188
189
  encode?: (s: unknown) => string;
189
190
  decode?: (s: unknown) => unknown;
190
191
  };
191
- export declare type SelectionFunction<V> = <T>(t: T | V) => T;
192
+ declare type SelectionFunction<V> = <T>(t: T | V) => T;
192
193
  declare type BuiltInVariableTypes = {
193
194
  ["String"]: string;
194
195
  ["Int"]: number;
@@ -199,11 +200,11 @@ declare type BuiltInVariableTypes = {
199
200
  declare type AllVariableTypes = keyof BuiltInVariableTypes | keyof ZEUS_VARIABLES;
200
201
  declare type VariableRequired<T extends string> = `${T}!` | T | `[${T}]` | `[${T}]!` | `[${T}!]` | `[${T}!]!`;
201
202
  declare type VR<T extends string> = VariableRequired<VariableRequired<T>>;
202
- export declare type GraphQLVariableType = VR<AllVariableTypes>;
203
+ declare type GraphQLVariableType = VR<AllVariableTypes>;
203
204
  declare type ExtractVariableTypeString<T extends string> = T extends VR<infer R1> ? R1 extends VR<infer R2> ? R2 extends VR<infer R3> ? R3 extends VR<infer R4> ? R4 extends VR<infer R5> ? R5 : R4 : R3 : R2 : R1 : T;
204
205
  declare type DecomposeType<T, Type> = T extends `[${infer R}]` ? Array<DecomposeType<R, Type>> | undefined : T extends `${infer R}!` ? NonNullable<DecomposeType<R, Type>> : Type | undefined;
205
206
  declare type ExtractTypeFromGraphQLType<T extends string> = T extends keyof ZEUS_VARIABLES ? ZEUS_VARIABLES[T] : T extends keyof BuiltInVariableTypes ? BuiltInVariableTypes[T] : any;
206
- export declare type GetVariableType<T extends string> = DecomposeType<T, ExtractTypeFromGraphQLType<ExtractVariableTypeString<T>>>;
207
+ declare type GetVariableType<T extends string> = DecomposeType<T, ExtractTypeFromGraphQLType<ExtractVariableTypeString<T>>>;
207
208
  declare type UndefinedKeys<T> = {
208
209
  [K in keyof T]-?: T[K] extends NonNullable<T[K]> ? never : K;
209
210
  }[keyof T];
@@ -212,29 +213,29 @@ declare type WithNonNullableKeys<T> = Omit<T, UndefinedKeys<T>>;
212
213
  declare type OptionalKeys<T> = {
213
214
  [P in keyof T]?: T[P];
214
215
  };
215
- export declare type WithOptionalNullables<T> = OptionalKeys<WithNullableKeys<T>> & WithNonNullableKeys<T>;
216
- export declare type Variable<T extends GraphQLVariableType, Name extends string> = {
216
+ declare type WithOptionalNullables<T> = OptionalKeys<WithNullableKeys<T>> & WithNonNullableKeys<T>;
217
+ declare type Variable<T extends GraphQLVariableType, Name extends string> = {
217
218
  " __zeus_name": Name;
218
219
  " __zeus_type": T;
219
220
  };
220
- export declare type ExtractVariables<Query> = Query extends Variable<infer VType, infer VName> ? {
221
+ declare type ExtractVariables<Query> = Query extends Variable<infer VType, infer VName> ? {
221
222
  [key in VName]: GetVariableType<VType>;
222
223
  } : Query extends [infer Inputs, infer Outputs] ? ExtractVariables<Inputs> & ExtractVariables<Outputs> : Query extends string | number | boolean ? {} : UnionToIntersection<{
223
224
  [K in keyof Query]: WithOptionalNullables<ExtractVariables<Query[K]>>;
224
225
  }[keyof Query]>;
225
226
  declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
226
- export declare const START_VAR_NAME = "$ZEUS_VAR";
227
- export declare const GRAPHQL_TYPE_SEPARATOR = "__$GRAPHQL__";
228
- export declare const $: <Type extends GraphQLVariableType, Name extends string>(name: Name, graphqlType: Type) => Variable<Type, Name>;
227
+ declare const START_VAR_NAME = "$ZEUS_VAR";
228
+ declare const GRAPHQL_TYPE_SEPARATOR = "__$GRAPHQL__";
229
+ declare const $: <Type extends GraphQLVariableType, Name extends string>(name: Name, graphqlType: Type) => Variable<Type, Name>;
229
230
  declare type ZEUS_INTERFACES = GraphQLTypes["ErrorBase"] | GraphQLTypes["FileContentBase"];
230
- export declare type ScalarCoders = {
231
+ declare type ScalarCoders = {
231
232
  BigInt?: ScalarResolver;
232
233
  DateTime?: ScalarResolver;
233
234
  Json?: ScalarResolver;
234
235
  Bytes?: ScalarResolver;
235
236
  };
236
237
  declare type ZEUS_UNIONS = GraphQLTypes["AppNotificationsResult"] | GraphQLTypes["BlogResult"] | GraphQLTypes["DbConfigResult"] | GraphQLTypes["DbGetResult"] | GraphQLTypes["DbSearchResult"] | GraphQLTypes["DeletedMailsResult"] | GraphQLTypes["DeletedNodesResult"] | GraphQLTypes["FaqResult"] | GraphQLTypes["FileResult"] | GraphQLTypes["FileContentResult"] | GraphQLTypes["FilesContentResult"] | GraphQLTypes["GetJwtResult"] | GraphQLTypes["IsCryptoTransactionDoneResult"] | GraphQLTypes["LimitsResult"] | GraphQLTypes["MailResult"] | GraphQLTypes["MyCryptoBalanceResult"] | GraphQLTypes["NodeResult"] | GraphQLTypes["NodesSharedWithMeResult"] | GraphQLTypes["PaymentInfosResult"] | GraphQLTypes["PlansResult"] | GraphQLTypes["SharedNodesResult"] | GraphQLTypes["UnreadReceivedMailsCountResult"] | GraphQLTypes["UserResult"] | GraphQLTypes["UserListResult"] | GraphQLTypes["AddFileToHistoryResult"] | GraphQLTypes["CancelPaymentResult"] | GraphQLTypes["CreateApplicationResult"] | GraphQLTypes["CreateCryptoWalletResult"] | GraphQLTypes["CreateDraftMailResult"] | GraphQLTypes["CreateFolderResult"] | GraphQLTypes["DbConfigMutationResult"] | GraphQLTypes["DbSetResult"] | GraphQLTypes["DeleteDraftMailResult"] | GraphQLTypes["DeleteFileResult"] | GraphQLTypes["DeleteMailResult"] | GraphQLTypes["DeleteMailTrashResult"] | GraphQLTypes["DeleteNodeResult"] | GraphQLTypes["DeleteNodeCloudTrashResult"] | GraphQLTypes["DeleteNodeSharingResult"] | GraphQLTypes["DeleteUserResult"] | GraphQLTypes["DuplicateNodeResult"] | GraphQLTypes["EmptyCloudTrashResult"] | GraphQLTypes["EmptyMailTrashResult"] | GraphQLTypes["LogoutResult"] | GraphQLTypes["MoveNodesResult"] | GraphQLTypes["PayResult"] | GraphQLTypes["ReadMailResult"] | GraphQLTypes["RecoverMailResult"] | GraphQLTypes["RecoverNodeResult"] | GraphQLTypes["SaveInCloudResult"] | GraphQLTypes["SendAppMailResult"] | GraphQLTypes["SendCryptoTransactionResult"] | GraphQLTypes["SendDraftMailResult"] | GraphQLTypes["SendOneMailResult"] | GraphQLTypes["SendReportResult"] | GraphQLTypes["ShareFileInHistoryResult"] | GraphQLTypes["ShareNodeResult"] | GraphQLTypes["ShareNodeFinishResult"] | GraphQLTypes["UnreadMailResult"] | GraphQLTypes["UpdateAppNotificationsResult"] | GraphQLTypes["UpdateAppSettingsResult"] | GraphQLTypes["UpdateAutoDisconnectDelayResult"] | GraphQLTypes["UpdateDraftMailResult"] | GraphQLTypes["UpdateNodeResult"] | GraphQLTypes["UpdateProfileResult"] | GraphQLTypes["UploadFileResult"] | GraphQLTypes["UploadFileEndResult"] | GraphQLTypes["UploadFilePartEndResult"] | GraphQLTypes["UploadLiteFileResult"] | GraphQLTypes["ChangeUserPlanResult"] | GraphQLTypes["Error"] | GraphQLTypes["FileContent"];
237
- export declare type ValueTypes = {
238
+ declare type ValueTypes = {
238
239
  ["BigInt"]: unknown;
239
240
  ["DateTime"]: unknown;
240
241
  ["Json"]: unknown;
@@ -2007,7 +2008,7 @@ export declare type ValueTypes = {
2007
2008
  __typename?: boolean | `@${string}`;
2008
2009
  }>;
2009
2010
  };
2010
- export declare type ResolverInputTypes = {
2011
+ declare type ResolverInputTypes = {
2011
2012
  ["BigInt"]: unknown;
2012
2013
  ["DateTime"]: unknown;
2013
2014
  ["Json"]: unknown;
@@ -3756,7 +3757,7 @@ export declare type ResolverInputTypes = {
3756
3757
  __typename?: boolean | `@${string}`;
3757
3758
  }>;
3758
3759
  };
3759
- export declare type ModelTypes = {
3760
+ declare type ModelTypes = {
3760
3761
  ["BigInt"]: any;
3761
3762
  ["DateTime"]: any;
3762
3763
  ["Json"]: any;
@@ -4649,7 +4650,7 @@ export declare type ModelTypes = {
4649
4650
  test: boolean;
4650
4651
  };
4651
4652
  };
4652
- export declare type GraphQLTypes = {
4653
+ declare type GraphQLTypes = {
4653
4654
  ["BigInt"]: "scalar" & {
4654
4655
  name: "BigInt";
4655
4656
  };
@@ -6048,40 +6049,40 @@ export declare type GraphQLTypes = {
6048
6049
  test: boolean;
6049
6050
  };
6050
6051
  };
6051
- export declare enum Lang {
6052
+ declare enum Lang {
6052
6053
  fr = "fr",
6053
6054
  en = "en"
6054
6055
  }
6055
- export declare enum PlanKind {
6056
+ declare enum PlanKind {
6056
6057
  free = "free",
6057
6058
  basic = "basic",
6058
6059
  advanced = "advanced",
6059
6060
  pro = "pro"
6060
6061
  }
6061
- export declare enum UserRole {
6062
+ declare enum UserRole {
6062
6063
  user = "user",
6063
6064
  admin = "admin"
6064
6065
  }
6065
- export declare enum MailType {
6066
+ declare enum MailType {
6066
6067
  sent = "sent",
6067
6068
  received = "received"
6068
6069
  }
6069
- export declare enum Rights {
6070
+ declare enum Rights {
6070
6071
  admin = "admin",
6071
6072
  write = "write",
6072
6073
  read = "read"
6073
6074
  }
6074
- export declare enum NodeType {
6075
+ declare enum NodeType {
6075
6076
  FILE = "FILE",
6076
6077
  FOLDER = "FOLDER"
6077
6078
  }
6078
- export declare enum FileContentType {
6079
+ declare enum FileContentType {
6079
6080
  cloud = "cloud",
6080
6081
  lite = "lite",
6081
6082
  sent_mail = "sent_mail",
6082
6083
  received_mail = "received_mail"
6083
6084
  }
6084
- export declare enum InfuraNetwork {
6085
+ declare enum InfuraNetwork {
6085
6086
  mainnet = "mainnet",
6086
6087
  ropsten = "ropsten",
6087
6088
  rinkeby = "rinkeby",
@@ -6090,7 +6091,7 @@ export declare enum InfuraNetwork {
6090
6091
  polygon_mainnet = "polygon_mainnet",
6091
6092
  polygon_mumbai = "polygon_mumbai"
6092
6093
  }
6093
- export declare enum PayInputType {
6094
+ declare enum PayInputType {
6094
6095
  secure = "secure",
6095
6096
  classic = "classic"
6096
6097
  }
@@ -6116,4 +6117,5 @@ declare type ZEUS_VARIABLES = {
6116
6117
  ["ShareFileKeyInput"]: ValueTypes["ShareFileKeyInput"];
6117
6118
  ["ShareNodesInput"]: ValueTypes["ShareNodesInput"];
6118
6119
  };
6119
- export {};
6120
+
6121
+ export { $, AliasType, AllTypesPropsType, Chain, ExtractVariables, FetchFunction, FileContentType, FromSelector, GRAPHQL_TYPE_SEPARATOR, GenericOperation, GetVariableType, Gql, GraphQLError, GraphQLResponse, GraphQLTypes, GraphQLVariableType, HEADERS, HOST, InfuraNetwork, InputType, InputValueType, InternalArgsBuilt, InternalsBuildQuery, Lang, MailType, MapType, ModelTypes, NodeType, OperationOptions, Operations, PayInputType, PlainType, PlanKind, PrepareScalarPaths, ResolveFromPath, ResolverInputTypes, ResolverType, ReturnTypesType, Rights, SEPARATOR, START_VAR_NAME, ScalarCoder, ScalarCoders, ScalarDefinition, ScalarResolver, SelectionFunction, Selector, Subscription, SubscriptionFunction, SubscriptionThunder, SubscriptionToGraphQL, Thunder, ThunderGraphQLOptions, TypeFromSelector, UnwrapPromise, UserRole, VType, ValueTypes, Variable, VariableDefinition, WithOptionalNullables, WithTypeNameValue, Zeus, ZeusArgsType, ZeusHook, ZeusScalars, ZeusSelect, ZeusState, apiFetch, apiSubscription, chainOptions, decodeScalarsInResponse, fetchOptions, purifyGraphQLKey, resolverFor, traverseResponse };