@lifeready/core 9.0.8 → 10.0.0

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 (225) hide show
  1. package/fesm2022/lifeready-core.mjs +10522 -0
  2. package/fesm2022/lifeready-core.mjs.map +1 -0
  3. package/package.json +21 -16
  4. package/types/lifeready-core.d.ts +5329 -0
  5. package/bundles/lifeready-core.umd.js +0 -13231
  6. package/bundles/lifeready-core.umd.js.map +0 -1
  7. package/bundles/lifeready-core.umd.min.js +0 -2
  8. package/bundles/lifeready-core.umd.min.js.map +0 -1
  9. package/esm2015/lib/_common/ast.js +0 -41
  10. package/esm2015/lib/_common/deferred-promise.js +0 -24
  11. package/esm2015/lib/_common/exceptions.js +0 -186
  12. package/esm2015/lib/_common/index.js +0 -3
  13. package/esm2015/lib/_common/kc-lodash.js +0 -11
  14. package/esm2015/lib/_common/key.js +0 -28
  15. package/esm2015/lib/_common/queries.gql.js +0 -43
  16. package/esm2015/lib/_common/run-outside-angular.js +0 -80
  17. package/esm2015/lib/_common/storage.js +0 -28
  18. package/esm2015/lib/_common/types.js +0 -2
  19. package/esm2015/lib/_common/utils.js +0 -73
  20. package/esm2015/lib/api/lr-apollo.service.js +0 -47
  21. package/esm2015/lib/api/lr-graphql/index.js +0 -6
  22. package/esm2015/lib/api/lr-graphql/lr-graphql.service.js +0 -170
  23. package/esm2015/lib/api/lr-graphql/lr-merged-mutation.js +0 -216
  24. package/esm2015/lib/api/lr-graphql/lr-mutation-base.js +0 -51
  25. package/esm2015/lib/api/lr-graphql/lr-mutation.js +0 -91
  26. package/esm2015/lib/api/lr-graphql/lr.service.js +0 -18
  27. package/esm2015/lib/api/query-processor/common-processors.service.js +0 -94
  28. package/esm2015/lib/api/query-processor/index.js +0 -3
  29. package/esm2015/lib/api/query-processor/query-processor.service.js +0 -307
  30. package/esm2015/lib/api/query-processor/tp-password-reset-processor.service.js +0 -110
  31. package/esm2015/lib/api/types/graphql.types.js +0 -8
  32. package/esm2015/lib/api/types/index.js +0 -3
  33. package/esm2015/lib/api/types/lr-graphql.types.js +0 -182
  34. package/esm2015/lib/auth/auth.config.js +0 -57
  35. package/esm2015/lib/auth/auth.gql.private.js +0 -85
  36. package/esm2015/lib/auth/auth.service.js +0 -616
  37. package/esm2015/lib/auth/auth.types.js +0 -19
  38. package/esm2015/lib/contact-card/contact-card.gql.js +0 -79
  39. package/esm2015/lib/contact-card/contact-card.service.js +0 -156
  40. package/esm2015/lib/contact-card/contact-card2.gql.js +0 -29
  41. package/esm2015/lib/contact-card/contact-card2.service.js +0 -103
  42. package/esm2015/lib/encryption/encryption.service.js +0 -188
  43. package/esm2015/lib/file-upload/file-upload.service.js +0 -70
  44. package/esm2015/lib/file-upload/file-upload.types.js +0 -2
  45. package/esm2015/lib/idle/idle.service.js +0 -159
  46. package/esm2015/lib/idle/idle.types.js +0 -7
  47. package/esm2015/lib/item/item.gql.js +0 -166
  48. package/esm2015/lib/item/item.gql.private.js +0 -41
  49. package/esm2015/lib/item/item.service.js +0 -662
  50. package/esm2015/lib/item/item.types.js +0 -2
  51. package/esm2015/lib/key/key-factory.service.js +0 -226
  52. package/esm2015/lib/key/key-graph.service.js +0 -314
  53. package/esm2015/lib/key/key-meta.service.js +0 -153
  54. package/esm2015/lib/key/key.service.js +0 -124
  55. package/esm2015/lib/key/key.types.js +0 -16
  56. package/esm2015/lib/key-exchange/key-exchange.gql.js +0 -174
  57. package/esm2015/lib/key-exchange/key-exchange.service.js +0 -496
  58. package/esm2015/lib/lbop/lbop.service.js +0 -351
  59. package/esm2015/lib/life-ready.config.js +0 -96
  60. package/esm2015/lib/life-ready.module.js +0 -42
  61. package/esm2015/lib/lock/lock.gql.js +0 -40
  62. package/esm2015/lib/lock/lock.service.js +0 -64
  63. package/esm2015/lib/notification/notification.gql.js +0 -43
  64. package/esm2015/lib/notification/notification.service.js +0 -118
  65. package/esm2015/lib/password/password.gql.js +0 -28
  66. package/esm2015/lib/password/password.service.js +0 -309
  67. package/esm2015/lib/persist/persist.service.js +0 -181
  68. package/esm2015/lib/plan/plan.gql.js +0 -91
  69. package/esm2015/lib/plan/plan.service.js +0 -191
  70. package/esm2015/lib/plan/plan.types.js +0 -2
  71. package/esm2015/lib/profile/profile-details.service.js +0 -261
  72. package/esm2015/lib/profile/profile.gql.js +0 -170
  73. package/esm2015/lib/profile/profile.service.js +0 -166
  74. package/esm2015/lib/profile/profile.types.js +0 -45
  75. package/esm2015/lib/register/register.service.js +0 -173
  76. package/esm2015/lib/register/register.types.js +0 -3
  77. package/esm2015/lib/reminder/reminder.gql.js +0 -27
  78. package/esm2015/lib/reminder/reminder.service.js +0 -85
  79. package/esm2015/lib/reminder/reminder.types.js +0 -2
  80. package/esm2015/lib/scenario/scenario.constants.js +0 -2
  81. package/esm2015/lib/scenario/scenario.controller.js +0 -34
  82. package/esm2015/lib/scenario/scenario.gql.js +0 -90
  83. package/esm2015/lib/scenario/scenario.private.gql.js +0 -200
  84. package/esm2015/lib/scenario/scenario.service.js +0 -679
  85. package/esm2015/lib/scenario/scenario.types.js +0 -2
  86. package/esm2015/lib/server-config/server-config.gql.js +0 -9
  87. package/esm2015/lib/server-config/server-config.service.js +0 -41
  88. package/esm2015/lib/shared-contact-card/shared-contact-card.service.js +0 -119
  89. package/esm2015/lib/shared-contact-card/shared-contact-card2.gql.js +0 -41
  90. package/esm2015/lib/shared-contact-card/shared-contact-card2.service.js +0 -117
  91. package/esm2015/lib/slip39/slip39.service.js +0 -167
  92. package/esm2015/lib/time/time.service.js +0 -152
  93. package/esm2015/lib/tp-assembly/tp-assembly.js +0 -363
  94. package/esm2015/lib/tp-assembly/tp-assembly.private.gql.js +0 -22
  95. package/esm2015/lib/tp-assembly/tp-assembly.types.js +0 -2
  96. package/esm2015/lib/tp-password-reset/tp-password-reset-request.service.js +0 -98
  97. package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +0 -121
  98. package/esm2015/lib/tp-password-reset/tp-password-reset.constants.js +0 -4
  99. package/esm2015/lib/tp-password-reset/tp-password-reset.controller.js +0 -34
  100. package/esm2015/lib/tp-password-reset/tp-password-reset.gql.js +0 -74
  101. package/esm2015/lib/tp-password-reset/tp-password-reset.private.gql.js +0 -166
  102. package/esm2015/lib/tp-password-reset/tp-password-reset.private.service.js +0 -54
  103. package/esm2015/lib/tp-password-reset/tp-password-reset.service.js +0 -110
  104. package/esm2015/lib/tp-password-reset/tp-password-reset.types.js +0 -2
  105. package/esm2015/lib/trusted-party/trusted-party.gql.js +0 -96
  106. package/esm2015/lib/trusted-party/trusted-party.gql.private.js +0 -51
  107. package/esm2015/lib/trusted-party/trusted-party.service.js +0 -461
  108. package/esm2015/lib/trusted-party/trusted-party.types.js +0 -2
  109. package/esm2015/lib/two-factor/two-factor.service.js +0 -74
  110. package/esm2015/lib/user/user.gql.js +0 -32
  111. package/esm2015/lib/user/user.service.js +0 -58
  112. package/esm2015/lib/user/user.types.js +0 -2
  113. package/esm2015/lib/web-crypto/web-crypto.service.js +0 -29
  114. package/esm2015/lifeready-core.js +0 -17
  115. package/esm2015/public-api.js +0 -60
  116. package/fesm2015/lifeready-core.js +0 -10970
  117. package/fesm2015/lifeready-core.js.map +0 -1
  118. package/lib/_common/ast.d.ts +0 -11
  119. package/lib/_common/deferred-promise.d.ts +0 -12
  120. package/lib/_common/exceptions.d.ts +0 -126
  121. package/lib/_common/index.d.ts +0 -2
  122. package/lib/_common/kc-lodash.d.ts +0 -5
  123. package/lib/_common/key.d.ts +0 -14
  124. package/lib/_common/queries.gql.d.ts +0 -4
  125. package/lib/_common/run-outside-angular.d.ts +0 -14
  126. package/lib/_common/storage.d.ts +0 -13
  127. package/lib/_common/types.d.ts +0 -15
  128. package/lib/_common/utils.d.ts +0 -12
  129. package/lib/api/lr-apollo.service.d.ts +0 -15
  130. package/lib/api/lr-graphql/index.d.ts +0 -5
  131. package/lib/api/lr-graphql/lr-graphql.service.d.ts +0 -81
  132. package/lib/api/lr-graphql/lr-merged-mutation.d.ts +0 -46
  133. package/lib/api/lr-graphql/lr-mutation-base.d.ts +0 -28
  134. package/lib/api/lr-graphql/lr-mutation.d.ts +0 -48
  135. package/lib/api/lr-graphql/lr.service.d.ts +0 -9
  136. package/lib/api/query-processor/common-processors.service.d.ts +0 -36
  137. package/lib/api/query-processor/index.d.ts +0 -2
  138. package/lib/api/query-processor/query-processor.service.d.ts +0 -18
  139. package/lib/api/query-processor/tp-password-reset-processor.service.d.ts +0 -15
  140. package/lib/api/types/graphql.types.d.ts +0 -30
  141. package/lib/api/types/index.d.ts +0 -2
  142. package/lib/api/types/lr-graphql.types.d.ts +0 -807
  143. package/lib/auth/auth.config.d.ts +0 -5
  144. package/lib/auth/auth.gql.private.d.ts +0 -25
  145. package/lib/auth/auth.service.d.ts +0 -72
  146. package/lib/auth/auth.types.d.ts +0 -70
  147. package/lib/contact-card/contact-card.gql.d.ts +0 -7
  148. package/lib/contact-card/contact-card.service.d.ts +0 -53
  149. package/lib/contact-card/contact-card2.gql.d.ts +0 -25
  150. package/lib/contact-card/contact-card2.service.d.ts +0 -64
  151. package/lib/encryption/encryption.service.d.ts +0 -42
  152. package/lib/file-upload/file-upload.service.d.ts +0 -15
  153. package/lib/file-upload/file-upload.types.d.ts +0 -5
  154. package/lib/idle/idle.service.d.ts +0 -47
  155. package/lib/idle/idle.types.d.ts +0 -10
  156. package/lib/item/item.gql.d.ts +0 -134
  157. package/lib/item/item.gql.private.d.ts +0 -35
  158. package/lib/item/item.service.d.ts +0 -201
  159. package/lib/item/item.types.d.ts +0 -95
  160. package/lib/key/key-factory.service.d.ts +0 -40
  161. package/lib/key/key-graph.service.d.ts +0 -41
  162. package/lib/key/key-meta.service.d.ts +0 -51
  163. package/lib/key/key.service.d.ts +0 -36
  164. package/lib/key/key.types.d.ts +0 -86
  165. package/lib/key-exchange/key-exchange.gql.d.ts +0 -141
  166. package/lib/key-exchange/key-exchange.service.d.ts +0 -179
  167. package/lib/lbop/lbop.service.d.ts +0 -99
  168. package/lib/life-ready.config.d.ts +0 -26
  169. package/lib/life-ready.module.d.ts +0 -5
  170. package/lib/lock/lock.gql.d.ts +0 -27
  171. package/lib/lock/lock.service.d.ts +0 -34
  172. package/lib/notification/notification.gql.d.ts +0 -37
  173. package/lib/notification/notification.service.d.ts +0 -64
  174. package/lib/password/password.gql.d.ts +0 -3
  175. package/lib/password/password.service.d.ts +0 -79
  176. package/lib/persist/persist.service.d.ts +0 -31
  177. package/lib/plan/plan.gql.d.ts +0 -69
  178. package/lib/plan/plan.service.d.ts +0 -111
  179. package/lib/plan/plan.types.d.ts +0 -16
  180. package/lib/profile/profile-details.service.d.ts +0 -20
  181. package/lib/profile/profile.gql.d.ts +0 -21
  182. package/lib/profile/profile.service.d.ts +0 -32
  183. package/lib/profile/profile.types.d.ts +0 -121
  184. package/lib/register/register.service.d.ts +0 -25
  185. package/lib/register/register.types.d.ts +0 -6
  186. package/lib/reminder/reminder.gql.d.ts +0 -23
  187. package/lib/reminder/reminder.service.d.ts +0 -33
  188. package/lib/reminder/reminder.types.d.ts +0 -17
  189. package/lib/scenario/scenario.constants.d.ts +0 -1
  190. package/lib/scenario/scenario.controller.d.ts +0 -10
  191. package/lib/scenario/scenario.gql.d.ts +0 -78
  192. package/lib/scenario/scenario.private.gql.d.ts +0 -16
  193. package/lib/scenario/scenario.service.d.ts +0 -655
  194. package/lib/scenario/scenario.types.d.ts +0 -64
  195. package/lib/server-config/server-config.gql.d.ts +0 -5
  196. package/lib/server-config/server-config.service.d.ts +0 -9
  197. package/lib/shared-contact-card/shared-contact-card.service.d.ts +0 -33
  198. package/lib/shared-contact-card/shared-contact-card2.gql.d.ts +0 -36
  199. package/lib/shared-contact-card/shared-contact-card2.service.d.ts +0 -45
  200. package/lib/slip39/slip39.service.d.ts +0 -42
  201. package/lib/time/time.service.d.ts +0 -26
  202. package/lib/tp-assembly/tp-assembly.d.ts +0 -177
  203. package/lib/tp-assembly/tp-assembly.private.gql.d.ts +0 -5
  204. package/lib/tp-assembly/tp-assembly.types.d.ts +0 -40
  205. package/lib/tp-password-reset/tp-password-reset-request.service.d.ts +0 -16
  206. package/lib/tp-password-reset/tp-password-reset-user.service.d.ts +0 -29
  207. package/lib/tp-password-reset/tp-password-reset.constants.d.ts +0 -3
  208. package/lib/tp-password-reset/tp-password-reset.controller.d.ts +0 -10
  209. package/lib/tp-password-reset/tp-password-reset.gql.d.ts +0 -63
  210. package/lib/tp-password-reset/tp-password-reset.private.gql.d.ts +0 -163
  211. package/lib/tp-password-reset/tp-password-reset.private.service.d.ts +0 -59
  212. package/lib/tp-password-reset/tp-password-reset.service.d.ts +0 -112
  213. package/lib/tp-password-reset/tp-password-reset.types.d.ts +0 -40
  214. package/lib/trusted-party/trusted-party.gql.d.ts +0 -85
  215. package/lib/trusted-party/trusted-party.gql.private.d.ts +0 -40
  216. package/lib/trusted-party/trusted-party.service.d.ts +0 -192
  217. package/lib/trusted-party/trusted-party.types.d.ts +0 -31
  218. package/lib/two-factor/two-factor.service.d.ts +0 -15
  219. package/lib/user/user.gql.d.ts +0 -8
  220. package/lib/user/user.service.d.ts +0 -9
  221. package/lib/user/user.types.d.ts +0 -16
  222. package/lib/web-crypto/web-crypto.service.d.ts +0 -5
  223. package/lifeready-core.d.ts +0 -16
  224. package/lifeready-core.metadata.json +0 -1
  225. package/public-api.d.ts +0 -56
@@ -1,11 +0,0 @@
1
- import { DocumentNode, FieldNode, FragmentDefinitionNode, NameNode, OperationDefinitionNode, OperationTypeNode } from 'graphql';
2
- export declare function getAstOperation(astDocument: any, operation: OperationTypeNode): OperationDefinitionNode;
3
- export declare function getQuery(doc: DocumentNode): OperationDefinitionNode;
4
- export declare function getMutation(doc: DocumentNode): OperationDefinitionNode;
5
- export declare function getFragments(doc: DocumentNode): FragmentDefinitionNode[];
6
- export declare function getFragment(astDocument: DocumentNode): FragmentDefinitionNode;
7
- export declare function name(value: string): NameNode;
8
- export declare function getAliasOrName(field: FieldNode): string;
9
- export interface TypedDocumentNode<T> extends DocumentNode {
10
- }
11
- export declare function gqlTyped<T = any>(literals: ReadonlyArray<string> | Readonly<string>, ...placeholders: any[]): TypedDocumentNode<T>;
@@ -1,12 +0,0 @@
1
- export declare type ResolvePromise<T> = (value?: T | PromiseLike<T>) => void;
2
- export declare type RejectPromise = (reason?: any) => void;
3
- export declare class DeferredPromise<T> {
4
- readonly promise: Promise<T>;
5
- private _resolve;
6
- private _reject;
7
- private _fulfilled;
8
- constructor();
9
- get resolve(): ResolvePromise<T>;
10
- get reject(): RejectPromise;
11
- get fulfilled(): boolean;
12
- }
@@ -1,126 +0,0 @@
1
- import { GraphQLError } from 'graphql';
2
- export declare function handleApolloError(errors: ReadonlyArray<GraphQLError>): void;
3
- export declare class KcError {
4
- /**
5
- * The _tag prevents being able to return an object when a class is required:
6
- * ref: https://medium.com/decathlondevelopers/whats-the-problem-with-typescript-s-classes-2e60aaad3f6
7
- * Example:
8
- * // This works because KcError is being treated as a type.
9
- * function test(): KcError {
10
- * return {message: "123"};
11
- * }
12
- * With the private _tag property, the above will cause a compiler error because _tag property is missing
13
- * from the returned object.
14
- *
15
- * The _type property also provides a type indicator when serialising the class to POJO.
16
- */
17
- private _type;
18
- code?: string;
19
- source?: string;
20
- data?: any;
21
- message: string;
22
- debug?: {
23
- locations: {
24
- line: number;
25
- column: number;
26
- }[];
27
- path: string[];
28
- };
29
- constructor(options: Partial<KcError>);
30
- }
31
- export declare class KcException {
32
- private _type;
33
- errors: KcError[];
34
- /**
35
- *
36
- * @param errors Each argument is a KcError.
37
- */
38
- constructor(...errors: KcError[]);
39
- toString(): string[];
40
- }
41
- export declare enum KcErrorCode {
42
- ARCHIVED_RESOURCE = "ARCHIVED_RESOURCE",
43
- BAD_ARGUMENT = "BAD_ARGUMENT",
44
- BAD_SIGNATURE = "BAD_SIGNATURE",
45
- BAD_STATE = "BAD_STATE",
46
- CHANGED_PERMISSIONS = "CHANGED_PERMISSIONS",
47
- CONCURRENT_ACCESS = "CONCURRENT_ACCESS",
48
- CONFIG_ERROR = "CONFIG_ERROR",
49
- CYCLE_DETECTED = "CYCLE_DETECTED",
50
- EXPIRED = "EXPIRED",
51
- INVALID_TOKEN = "INVALID_TOKEN",
52
- INTERNAL_ERROR = "INTERNAL_ERROR",
53
- JSON_DECODE_ERROR = "JSON_DECODE_ERROR",
54
- KEY_MISMATCH = "KEY_MISMATCH",
55
- LIMIT_REACHED = "LIMIT_REACHED",
56
- LOCKED = "LOCKED",
57
- LOGIC_ERROR = "LOGIC_ERROR",
58
- LR_DEBUG_ONLY = "LR_DEBUG_ONLY",
59
- MIN_DELAY = "MIN_DELAY",
60
- MISSING_FIELD = "MISSING_FIELD",
61
- MISSING_FIELD_VALUE = "MISSING_FIELD_VALUE",
62
- MISSING_QUERY_PARAM = "MISSING_QUERY_PARAM",
63
- NOT_IMPLEMENTED = "NOT_IMPLEMENTED",
64
- OBJECT_DOES_NOT_EXIST = "OBJECT_DOES_NOT_EXIST",
65
- OBJECT_EXISTS = "OBJECT_EXISTS",
66
- RANGE_ERROR = "RANGE_ERROR",
67
- TRUSTED_PARTY_NOT_FOUND = "TRUSTED_PARTY_NOT_FOUND",
68
- UNAUTHENTICATED_USER = "UNAUTHENTICATED_USER",
69
- USER_NOT_FOUND = "USER_NOT_FOUND",
70
- VERSION_MISMATCH = "VERSION_MISMATCH",
71
- WRONG_PERMISSIONS = "WRONG_PERMISSIONS",
72
- AUTH = "AUTH",
73
- BAD_LOGIC = "BAD_LOGIC",
74
- BAD_REQUEST = "BAD_REQUEST",
75
- BAD_TIME_SYNC = "BAD_TIME_SYNC",
76
- CODE_MISMATCH = "CODE_MISMATCH",
77
- ENCRYPTION = "ENCRYPTION",
78
- NOT_FOUND = "NOT_FOUND",
79
- SUSPICIOUS_OPERATION = "SUSPICIOUS_OPERATION",
80
- UNSUPPORTED = "UNSUPPORTED"
81
- }
82
- export declare class KcAuthException extends KcException {
83
- constructor(message: any);
84
- }
85
- export declare class KcBadArgumentException extends KcException {
86
- constructor(message: string);
87
- }
88
- export declare class KcBadLogicException extends KcException {
89
- constructor(message: any);
90
- }
91
- export declare class KcBadRequestException extends KcException {
92
- constructor(message: any);
93
- }
94
- export declare class KcBadSignatureException extends KcException {
95
- constructor(message: any);
96
- }
97
- export declare class KcBadStateException extends KcException {
98
- constructor(message: any);
99
- }
100
- export declare class KcBadTimeSyncException extends KcException {
101
- constructor(message: any);
102
- }
103
- export declare class KcCodeMismatchException extends KcException {
104
- constructor(message: any);
105
- }
106
- export declare class KcConcurrentAccessException extends KcException {
107
- constructor(message: any);
108
- }
109
- export declare class KcEncryptionException extends KcException {
110
- constructor(message: any);
111
- }
112
- export declare class KcInternalErrorException extends KcException {
113
- constructor(message: any);
114
- }
115
- export declare class KcLockedException extends KcException {
116
- constructor(message: any);
117
- }
118
- export declare class KcNotFoundException extends KcException {
119
- constructor(message: any);
120
- }
121
- export declare class KcSuspiciousOperationException extends KcException {
122
- constructor(message: any);
123
- }
124
- export declare class KcUnsupportedException extends KcException {
125
- constructor(message: any);
126
- }
@@ -1,2 +0,0 @@
1
- import * as lodash from './kc-lodash';
2
- export { lodash };
@@ -1,5 +0,0 @@
1
- import cloneDeep from 'lodash/cloneDeep';
2
- import isEqual from 'lodash/isEqual';
3
- import keyBy from 'lodash/keyBy';
4
- import omit from 'lodash/omit';
5
- export { cloneDeep, isEqual, keyBy, omit };
@@ -1,14 +0,0 @@
1
- export declare class KeyContainer {
2
- private _key;
3
- private timer;
4
- constructor(_key: CryptoKey, timeout: number);
5
- get key(): CryptoKey;
6
- /**
7
- * Clears the reference to the key, clears the timer, return the key.
8
- * It's important to call this function when the key is no longer needed because
9
- * the anonymous function in setTimeout() holds a reference to "this", and hence
10
- * keeps the "this._key" reference until the timer expired. So if we have used
11
- * the key before it expired, we should clear the "this._key" reference immediately.
12
- */
13
- pop(): CryptoKey;
14
- }
@@ -1,4 +0,0 @@
1
- export declare const KeyGraphFragment: import("graphql").DocumentNode;
2
- export declare const KeyGraphField: string;
3
- export declare const FetchKeyGraphField: string;
4
- export declare const DirectoryQuery: import("graphql").DocumentNode;
@@ -1,14 +0,0 @@
1
- export interface RunOutsideAngularConfig {
2
- ngZoneName: string;
3
- exceptLastPromise?: boolean;
4
- excludeMethods?: string[];
5
- patchSetters?: boolean;
6
- }
7
- /**
8
- * If you wish to change the behaviour of those, you'll need to create a derived
9
- * class and override the methods.
10
- * However, can't figure out a way to call the super() in the derived class ctor, error says
11
- * the super call can't be in tested function.
12
- */
13
- export declare const EXCLUDE_METHODS: string[];
14
- export declare function RunOutsideAngular({ ngZoneName, exceptLastPromise, excludeMethods, patchSetters, }: RunOutsideAngularConfig): (target: any) => any;
@@ -1,13 +0,0 @@
1
- /**
2
- * Remove all keys in localstorage with matching prefix.
3
- * A prefix must be specified. If you want to remove everything, then just use localStorage.clear().
4
- *
5
- * @param prefix Keys with this prefix will be removed.
6
- */
7
- export declare function clearLocalStorage(prefix: string): void;
8
- /**
9
- * Clear all items related to cognito in localstorage.
10
- * The remember device function sometimes interferes with creating new users
11
- * on TP based password reset.
12
- */
13
- export declare function clearCognitoLocalStorage(): void;
@@ -1,15 +0,0 @@
1
- /**
2
- * Change a set of specified keys to optional, while the rest remain unchanged
3
- */
4
- export declare type SomePartial<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
5
- /**
6
- * Change a set of specified keys to required, while the rest remain unchanged
7
- */
8
- export declare type SomeRequired<T, K extends keyof T> = Pick<Required<T>, K> & Omit<T, K>;
9
- export interface Edge<T> {
10
- node: T;
11
- }
12
- export interface HasEdges<T> {
13
- edges: Edge<T>[];
14
- }
15
- export declare type MayAsync<T> = T | Promise<T>;
@@ -1,12 +0,0 @@
1
- import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
2
- export declare function promiseAllMayAsync(values: any[]): Promise<any> | any;
3
- export declare function mapValuesMayAsync(obj: Record<string, any>, callback: (value: any, key: string, obj: Record<string, any>) => any | Promise<any>): Promise<any> | any;
4
- export declare function mapValuesAsync(obj: Record<string, any>, callback?: (value: any, key: string, obj: Record<string, any>) => any | Promise<any>): Promise<any>;
5
- /**
6
- * Returns the defaultValue when value is undefined
7
- * @param value The value to check
8
- * @param defaultValue The value to return if value is undefined.
9
- */
10
- export declare function undefinedDefault(value: any, defaultValue: any): any;
11
- export declare function getAccessJwtToken(auth: AuthClass): Promise<string>;
12
- export declare function assertExactlyOne(options: Record<string, unknown>): void;
@@ -1,15 +0,0 @@
1
- import { MutationOptions, QueryOptions } from '@apollo/client/core';
2
- import { Apollo } from 'apollo-angular';
3
- import { KeyGraphService } from '../key/key-graph.service';
4
- export declare class LrApolloService {
5
- private apollo;
6
- private keyGraph;
7
- constructor(apollo: Apollo, keyGraph: KeyGraphService);
8
- private addKeys;
9
- query<T, V = {
10
- [key: string]: any;
11
- }>(options: QueryOptions<V>): Promise<T>;
12
- mutate<T extends any, V = {
13
- [key: string]: any;
14
- }>(options: MutationOptions<T, V>): Promise<T>;
15
- }
@@ -1,5 +0,0 @@
1
- export * from './lr-graphql.service';
2
- export * from './lr-merged-mutation';
3
- export * from './lr-mutation';
4
- export * from './lr-mutation-base';
5
- export * from './lr.service';
@@ -1,81 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { FetchPolicy, MutationOptions, OperationVariables, QueryOptions } from '@apollo/client/core';
3
- import { MutationBaseOptions } from '@apollo/client/core/watchQueryOptions';
4
- import { Apollo } from 'apollo-angular';
5
- import { KeyGraphService } from '../../key/key-graph.service';
6
- import { TypedDocumentNode } from '../../_common/ast';
7
- import { MayAsync } from '../../_common/types';
8
- import { ProcessorOptions, QueryProcessorService } from '../query-processor';
9
- import { LrMutationBase } from './lr-mutation-base';
10
- export interface LrQueryOptions<T, TVariables> extends QueryOptions<TVariables> {
11
- query: TypedDocumentNode<T>;
12
- includeKeyGraph?: boolean;
13
- name?: string;
14
- processorOptions?: ProcessorOptions;
15
- }
16
- export interface LrMutationOptions<T = {
17
- [key: string]: any;
18
- }, TVariables = OperationVariables> extends MutationBaseOptions<T, TVariables> {
19
- context?: any;
20
- fetchPolicy?: FetchPolicy;
21
- includeKeyGraph?: boolean;
22
- name?: string;
23
- }
24
- export interface LrApolloMutationOptions<T, TVariables = OperationVariables> extends MutationOptions<T, TVariables> {
25
- mutation: TypedDocumentNode<T>;
26
- includeKeyGraph?: boolean;
27
- name?: string;
28
- processorOptions?: ProcessorOptions;
29
- }
30
- interface LrGraphQLServiceStats {
31
- queryCount: number;
32
- mutationCount: number;
33
- }
34
- export declare class LrGraphQLService {
35
- private ngZone;
36
- private apollo;
37
- private keyGraph;
38
- private queryProcessor;
39
- private stats;
40
- constructor(ngZone: NgZone, apollo: Apollo, keyGraph: KeyGraphService, queryProcessor: QueryProcessorService);
41
- query<T, V = {
42
- [key: string]: any;
43
- }>(options: LrQueryOptions<T, V>): Promise<T>;
44
- private lrMutateImpl;
45
- apolloMutate<T extends any, TVariables = {
46
- [key: string]: any;
47
- }>(options: LrApolloMutationOptions<T, TVariables>): Promise<T>;
48
- statsSnapshot(): LrGraphQLServiceStats;
49
- private addKeys;
50
- private isIncludeKeyGraph;
51
- lrMutate<T1, TVariables1, T2, TVariables2>(lrMutations: [
52
- LrMutationMayAsync<T1, TVariables1>,
53
- LrMutationMayAsync<T2, TVariables2>
54
- ], options?: LrMutationOptions): Promise<[T1, T2]>;
55
- lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3>(lrMutations: [
56
- LrMutationMayAsync<T1, TVariables1>,
57
- LrMutationMayAsync<T2, TVariables2>,
58
- LrMutationMayAsync<T3, TVariables3>
59
- ], options?: LrMutationOptions): Promise<[T1, T2, T3]>;
60
- lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3, T4, TVariables4>(lrMutations: [
61
- LrMutationMayAsync<T1, TVariables1>,
62
- LrMutationMayAsync<T2, TVariables2>,
63
- LrMutationMayAsync<T3, TVariables3>,
64
- LrMutationMayAsync<T4, TVariables4>
65
- ], options?: LrMutationOptions): Promise<[T1, T2, T3, T4]>;
66
- lrMutate<T1, TVariables1, T2, TVariables2, T3, TVariables3, T4, TVariables4, T5, TVariables5>(lrMutations: [
67
- LrMutationMayAsync<T1, TVariables1>,
68
- LrMutationMayAsync<T2, TVariables2>,
69
- LrMutationMayAsync<T3, TVariables3>,
70
- LrMutationMayAsync<T4, TVariables4>,
71
- LrMutationMayAsync<T5, TVariables5>
72
- ], options?: LrMutationOptions): Promise<[T1, T2, T3, T4, T5]>;
73
- lrMutate<T, TVariables = {
74
- [key: string]: any;
75
- }>(lrMutation: LrMutationMayAsync<T, TVariables>, options?: LrMutationOptions<T, TVariables>): Promise<T>;
76
- lrMutate<T, TVariables = {
77
- [key: string]: any;
78
- }>(lrMutations: LrMutationMayAsync<T, TVariables>[], options?: LrMutationOptions): any;
79
- }
80
- export declare type LrMutationMayAsync<T, TVariables = OperationVariables> = MayAsync<LrMutationBase<T, TVariables>>;
81
- export {};
@@ -1,46 +0,0 @@
1
- import { LrMutationBase } from './lr-mutation-base';
2
- export declare class LrMergedMutation<T> extends LrMutationBase<T> {
3
- readonly lrMutations: LrMutationBase<any>[];
4
- readonly descendants: Set<LrMutationBase<any>>;
5
- protected prefixes: string[];
6
- constructor(lrMutations: LrMutationBase<any>[]);
7
- static create<T1, T2>(lrMutations: [
8
- LrMutationBase<T1> | LrMergedMutation<T1>,
9
- LrMutationBase<T2> | LrMergedMutation<T2>
10
- ]): LrMergedMutation<[T1, T2]>;
11
- static create<T1, T2, T3>(lrMutations: [
12
- LrMutationBase<T1> | LrMergedMutation<T1>,
13
- LrMutationBase<T2> | LrMergedMutation<T2>,
14
- LrMutationBase<T3> | LrMergedMutation<T3>
15
- ]): LrMergedMutation<[T1, T2, T3]>;
16
- static create<T1, T2, T3, T4>(lrMutations: [
17
- LrMutationBase<T1> | LrMergedMutation<T1>,
18
- LrMutationBase<T2> | LrMergedMutation<T2>,
19
- LrMutationBase<T3> | LrMergedMutation<T3>,
20
- LrMutationBase<T4> | LrMergedMutation<T4>
21
- ]): LrMergedMutation<[T1, T2, T3, T4]>;
22
- static create<T1, T2, T3, T4, T5>(lrMutations: [
23
- LrMutationBase<T1> | LrMergedMutation<T1>,
24
- LrMutationBase<T2> | LrMergedMutation<T2>,
25
- LrMutationBase<T3> | LrMergedMutation<T3>,
26
- LrMutationBase<T4> | LrMergedMutation<T4>,
27
- LrMutationBase<T5> | LrMergedMutation<T5>
28
- ]): LrMergedMutation<[T1, T2, T3, T4, T5]>;
29
- static create<T>(lrMutations: LrMutationBase<T>[]): LrMergedMutation<T[]>;
30
- static create(lrMutations: LrMutationBase<any>[]): LrMergedMutation<any[]>;
31
- private getDescendants;
32
- resolve(value: any): void;
33
- reject(reason?: any): void;
34
- setExecuted(): void;
35
- private renameVariableDefinition;
36
- private renameVariableDefinitions;
37
- private renameArgument;
38
- private renameField;
39
- private renameFragmentSpread;
40
- private processSelection;
41
- private processSelectionSet;
42
- private renameSelections;
43
- private renameFragmentDefinition;
44
- private renameFragmentDefinitions;
45
- private merge;
46
- }
@@ -1,28 +0,0 @@
1
- import { OperationVariables } from '@apollo/client/core';
2
- import { FragmentSpreadNode } from 'graphql';
3
- import { TypedDocumentNode } from '../../_common/ast';
4
- import { DeferredPromise } from '../../_common/deferred-promise';
5
- export interface LrMutationData<T, TVariables = OperationVariables> {
6
- mutation: TypedDocumentNode<T>;
7
- variables?: TVariables;
8
- }
9
- export declare const fragmentSpreadAstSelection: FragmentSpreadNode;
10
- /**
11
- * DECISION: LrMutationBase does not provide a convenience method to call lrGraphQL.lrMutate()
12
- * because this class could be made independent of what lib is used to call the API. If we
13
- * provided a configurable call back to make the API call, then the typing for that callback
14
- * needs to be known. But since the API lib (eg. Apollo) has it's own unique return type, so
15
- * it's not possible to do in general.
16
- */
17
- export declare abstract class LrMutationBase<T, TVariables = OperationVariables> {
18
- protected mutation: TypedDocumentNode<T>;
19
- protected variables?: TVariables;
20
- protected _executed: boolean;
21
- readonly deferredPromise: DeferredPromise<T>;
22
- get promise(): Promise<T>;
23
- resolve(value: T): void;
24
- reject(reason?: any): void;
25
- get lrMutationData(): LrMutationData<T, TVariables>;
26
- get executed(): boolean;
27
- setExecuted(): void;
28
- }
@@ -1,48 +0,0 @@
1
- import { OperationVariables } from '@apollo/client/core';
2
- import { TypedDocumentNode } from '../../_common/ast';
3
- import { LrMutationBase, LrMutationData } from './lr-mutation-base';
4
- export declare class LrMutation<T extends any, TVariables = OperationVariables> extends LrMutationBase<T, TVariables> {
5
- constructor(options: LrMutationData<T, TVariables>);
6
- /**
7
- * Select a different set of fields from the mutation. Example usage:
8
- *
9
- * interface CreateDirectoryMutationResult {
10
- * createDirectory: {
11
- * directory: DirectoryNode;
12
- * };
13
- * };
14
- *
15
- * const CreateDirectoryMutation = gqlTyped<CreateDirectoryMutationResult>`
16
- * mutation CreateDirectoryMutation(...) {
17
- * createDirectory(...) {
18
- * directory {
19
- * id
20
- * }
21
- * }
22
- * }
23
- * `
24
- * interface CreateDirectoryFragmentResult {
25
- * createDirectory: {
26
- * directory: DirectoryNode;
27
- * };
28
- * };
29
- *
30
- * const CreateDirectoryFragment = gqlTyped<CreateDirectoryFragmentResult>`
31
- * // Note that the string 'createDirectory' can not be changed.
32
- * // It must match with the mutation field above.
33
- * // The 'CreateDirectoryPayload' is the return type of the mutation.
34
- * fragment createDirectory on CreateDirectoryPayload {
35
- * directory {
36
- * plainMeta
37
- * }
38
- * }
39
- * `
40
- * lrGraphQLService.lrMutate({
41
- * mutation: CreateDirectoryMutation
42
- * }).select(CreateDirectoryFragment).createDirectory.directory.plainMeta.
43
- *
44
- * @param fragments
45
- * @returns
46
- */
47
- select<TResult>(fragments: TypedDocumentNode<TResult>): LrMutation<TResult, TVariables>;
48
- }
@@ -1,9 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- import { LrGraphQLService, LrMutationOptions, LrQueryOptions } from './lr-graphql.service';
3
- import { LrMutationBase } from './lr-mutation-base';
4
- export declare class LrService {
5
- protected lrGraphQL: LrGraphQLService;
6
- constructor(injector: Injector);
7
- protected mutate<T, TVariables>(lrMutation: LrMutationBase<T, TVariables> | Promise<LrMutationBase<T, TVariables>>, options?: LrMutationOptions<T, TVariables>): Promise<T>;
8
- protected query<T, V>(options: LrQueryOptions<T, V>): Promise<T>;
9
- }
@@ -1,36 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { KeyGraphService } from '../../key/key-graph.service';
3
- import { Connection } from '../types';
4
- export interface ProcessorOptions {
5
- hasKeys: boolean;
6
- }
7
- export declare const DefaultProcessorOptions: ProcessorOptions;
8
- export interface ProcessorContext {
9
- path: ReadonlyArray<string>;
10
- processChildren: boolean;
11
- }
12
- export interface ProcessorCallbackParams<T = any> {
13
- field: T;
14
- context: ProcessorContext;
15
- options: ProcessorOptions;
16
- }
17
- export declare type ProcessorCallback<T = any> = (params: ProcessorCallbackParams<T>) => T | Promise<T>;
18
- interface ParseJsonProcessorOptions {
19
- plainFieldName?: string;
20
- jsonFieldSuffix?: string;
21
- }
22
- interface DecryptionProcessorOptions {
23
- cipherFieldName?: string;
24
- clearFieldSuffix?: string;
25
- getKeyId?: (params: ProcessorCallbackParams) => Promise<string> | string;
26
- }
27
- export declare function processConnection<Node>(field: Connection<Node>, processNode: (node: Node) => Node | Promise<Node>): Promise<Connection<Node>>;
28
- export declare class CommonProcessorsService {
29
- private ngZone;
30
- private keyGraph;
31
- constructor(ngZone: NgZone, keyGraph: KeyGraphService);
32
- series(processors: ProcessorCallback[]): ProcessorCallback;
33
- makeJsonParseProcessor({ plainFieldName, jsonFieldSuffix, }?: ParseJsonProcessorOptions): ProcessorCallback;
34
- makeDecryptionProcessor({ cipherFieldName, clearFieldSuffix, getKeyId, }?: DecryptionProcessorOptions): ProcessorCallback;
35
- }
36
- export {};
@@ -1,2 +0,0 @@
1
- export * from './query-processor.service';
2
- export * from './common-processors.service';
@@ -1,18 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { KeyService } from '../../key/key.service';
3
- import { CommonProcessorsService, ProcessorOptions } from './common-processors.service';
4
- import { TpPasswordResetProcessorService } from './tp-password-reset-processor.service';
5
- export declare class QueryProcessorService {
6
- private ngZone;
7
- private keyService;
8
- private common;
9
- private tpprProcessor;
10
- readonly TYPENAME = "__typename";
11
- private processors;
12
- processQuery(fields: {
13
- [key: string]: any;
14
- }, options: ProcessorOptions): Promise<any>;
15
- private processField;
16
- private registerProcessor;
17
- constructor(ngZone: NgZone, keyService: KeyService, common: CommonProcessorsService, tpprProcessor: TpPasswordResetProcessorService);
18
- }
@@ -1,15 +0,0 @@
1
- import { NgZone } from '@angular/core';
2
- import { KeyGraphService } from '../../key/key-graph.service';
3
- import { TpPasswordResetNode, TpPasswordResetUser } from '../types';
4
- import { ProcessorCallbackParams } from './common-processors.service';
5
- export declare class TpPasswordResetProcessorService {
6
- private ngZone;
7
- private keyGraph;
8
- constructor(ngZone: NgZone, keyGraph: KeyGraphService);
9
- processTpPasswordResetUser(node: TpPasswordResetUser): Promise<TpPasswordResetUser>;
10
- private processTpPasswordResetUserApprovalNode;
11
- makeTpPasswordResetNodeProcessor(): ({ field, }: ProcessorCallbackParams) => Promise<TpPasswordResetNode>;
12
- private processTpAssemblyNode;
13
- private processTpSubAssemblyNode;
14
- private processTpAssemblyApproverNode;
15
- }
@@ -1,30 +0,0 @@
1
- export declare type ID = string;
2
- export declare type LrRelayIdInput = string;
3
- export declare type DateTime = string;
4
- export declare type LrJSONString = string;
5
- export declare type JSONString = string;
6
- export declare type JSONObject = any;
7
- export declare type LrEmail = string;
8
- export declare type GenericScalar = any;
9
- export declare type UUID = string;
10
- export interface Node {
11
- id?: string;
12
- }
13
- export interface TimeStamped {
14
- created?: DateTime;
15
- modified?: DateTime;
16
- }
17
- export interface Edge<NodeType extends Node> {
18
- node?: NodeType;
19
- cursor?: string;
20
- }
21
- export interface Connection<NodeType> {
22
- pageInfo?: PageInfo;
23
- edges?: Edge<NodeType>[];
24
- }
25
- export interface PageInfo {
26
- hasNextPage?: boolean;
27
- hasPreviousPage?: boolean;
28
- startCursor?: string;
29
- endCursor?: string;
30
- }
@@ -1,2 +0,0 @@
1
- export * from './graphql.types';
2
- export * from './lr-graphql.types';