@medplum/core 0.9.4 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- /**
2
- * Returns a cryptographically secure random string.
3
- */
4
- export declare function getRandomString(): string;
5
- /**
6
- * Encrypts a string with SHA256 encryption.
7
- * @param str
8
- */
9
- export declare function encryptSHA256(str: string): Promise<ArrayBuffer>;
1
+ /**
2
+ * Returns a cryptographically secure random string.
3
+ */
4
+ export declare function getRandomString(): string;
5
+ /**
6
+ * Encrypts a string with SHA256 encryption.
7
+ * @param str
8
+ */
9
+ export declare function encryptSHA256(str: string): Promise<ArrayBuffer>;
@@ -1,13 +1,13 @@
1
- interface Event {
2
- readonly type: string;
3
- readonly defaultPrevented?: boolean;
4
- }
5
- declare type EventListener = (e: Event) => void;
6
- export declare class EventTarget {
7
- #private;
8
- constructor();
9
- addEventListener(type: string, callback: EventListener): void;
10
- removeEventListeneer(type: string, callback: EventListener): void;
11
- dispatchEvent(event: Event): boolean;
12
- }
13
- export {};
1
+ interface Event {
2
+ readonly type: string;
3
+ readonly defaultPrevented?: boolean;
4
+ }
5
+ declare type EventListener = (e: Event) => void;
6
+ export declare class EventTarget {
7
+ #private;
8
+ constructor();
9
+ addEventListener(type: string, callback: EventListener): void;
10
+ removeEventListeneer(type: string, callback: EventListener): void;
11
+ dispatchEvent(event: Event): boolean;
12
+ }
13
+ export {};
@@ -0,0 +1,150 @@
1
+ import { Quantity } from '@medplum/fhirtypes';
2
+ export interface Atom {
3
+ eval(context: unknown): unknown;
4
+ }
5
+ export declare class FhirPathAtom implements Atom {
6
+ readonly original: string;
7
+ readonly child: Atom;
8
+ constructor(original: string, child: Atom);
9
+ eval(context: unknown): unknown[];
10
+ }
11
+ export declare class LiteralAtom implements Atom {
12
+ readonly value: Quantity | boolean | number | string;
13
+ constructor(value: Quantity | boolean | number | string);
14
+ eval(): unknown;
15
+ }
16
+ export declare class SymbolAtom implements Atom {
17
+ readonly name: string;
18
+ constructor(name: string);
19
+ eval(context: unknown): unknown;
20
+ }
21
+ export declare class EmptySetAtom implements Atom {
22
+ eval(): [];
23
+ }
24
+ export declare class UnaryOperatorAtom implements Atom {
25
+ readonly child: Atom;
26
+ readonly impl: (x: unknown) => unknown;
27
+ constructor(child: Atom, impl: (x: unknown) => unknown);
28
+ eval(context: unknown): unknown;
29
+ }
30
+ export declare class AsAtom implements Atom {
31
+ readonly left: Atom;
32
+ readonly right: Atom;
33
+ constructor(left: Atom, right: Atom);
34
+ eval(context: unknown): unknown;
35
+ }
36
+ export declare class ArithemticOperatorAtom implements Atom {
37
+ readonly left: Atom;
38
+ readonly right: Atom;
39
+ readonly impl: (x: number, y: number) => number;
40
+ constructor(left: Atom, right: Atom, impl: (x: number, y: number) => number);
41
+ eval(context: unknown): unknown;
42
+ }
43
+ export declare class ComparisonOperatorAtom implements Atom {
44
+ readonly left: Atom;
45
+ readonly right: Atom;
46
+ readonly impl: (x: number, y: number) => boolean;
47
+ constructor(left: Atom, right: Atom, impl: (x: number, y: number) => boolean);
48
+ eval(context: unknown): unknown;
49
+ }
50
+ export declare class ConcatAtom implements Atom {
51
+ readonly left: Atom;
52
+ readonly right: Atom;
53
+ constructor(left: Atom, right: Atom);
54
+ eval(context: unknown): unknown;
55
+ }
56
+ export declare class ContainsAtom implements Atom {
57
+ readonly left: Atom;
58
+ readonly right: Atom;
59
+ constructor(left: Atom, right: Atom);
60
+ eval(context: unknown): unknown;
61
+ }
62
+ export declare class InAtom implements Atom {
63
+ readonly left: Atom;
64
+ readonly right: Atom;
65
+ constructor(left: Atom, right: Atom);
66
+ eval(context: unknown): unknown;
67
+ }
68
+ export declare class DotAtom implements Atom {
69
+ readonly left: Atom;
70
+ readonly right: Atom;
71
+ constructor(left: Atom, right: Atom);
72
+ eval(context: unknown): unknown;
73
+ }
74
+ export declare class UnionAtom implements Atom {
75
+ readonly left: Atom;
76
+ readonly right: Atom;
77
+ constructor(left: Atom, right: Atom);
78
+ eval(context: unknown): unknown;
79
+ }
80
+ export declare class EqualsAtom implements Atom {
81
+ readonly left: Atom;
82
+ readonly right: Atom;
83
+ constructor(left: Atom, right: Atom);
84
+ eval(context: unknown): unknown;
85
+ }
86
+ export declare class NotEqualsAtom implements Atom {
87
+ readonly left: Atom;
88
+ readonly right: Atom;
89
+ constructor(left: Atom, right: Atom);
90
+ eval(context: unknown): unknown;
91
+ }
92
+ export declare class EquivalentAtom implements Atom {
93
+ readonly left: Atom;
94
+ readonly right: Atom;
95
+ constructor(left: Atom, right: Atom);
96
+ eval(context: unknown): unknown;
97
+ }
98
+ export declare class NotEquivalentAtom implements Atom {
99
+ readonly left: Atom;
100
+ readonly right: Atom;
101
+ constructor(left: Atom, right: Atom);
102
+ eval(context: unknown): unknown;
103
+ }
104
+ export declare class IsAtom implements Atom {
105
+ readonly left: Atom;
106
+ readonly right: Atom;
107
+ constructor(left: Atom, right: Atom);
108
+ eval(context: unknown): unknown;
109
+ }
110
+ /**
111
+ * 6.5.1. and
112
+ * Returns true if both operands evaluate to true, false if either operand evaluates to false, and the empty collection ({ }) otherwise.
113
+ */
114
+ export declare class AndAtom implements Atom {
115
+ readonly left: Atom;
116
+ readonly right: Atom;
117
+ constructor(left: Atom, right: Atom);
118
+ eval(context: unknown): unknown;
119
+ }
120
+ export declare class OrAtom implements Atom {
121
+ readonly left: Atom;
122
+ readonly right: Atom;
123
+ constructor(left: Atom, right: Atom);
124
+ eval(context: unknown): unknown;
125
+ }
126
+ /**
127
+ * 6.5.4. xor
128
+ * Returns true if exactly one of the operands evaluates to true,
129
+ * false if either both operands evaluate to true or both operands evaluate to false,
130
+ * and the empty collection ({ }) otherwise:
131
+ */
132
+ export declare class XorAtom implements Atom {
133
+ readonly left: Atom;
134
+ readonly right: Atom;
135
+ constructor(left: Atom, right: Atom);
136
+ eval(context: unknown): unknown;
137
+ }
138
+ export declare class FunctionAtom implements Atom {
139
+ readonly name: string;
140
+ readonly args: Atom[];
141
+ readonly impl: (context: unknown[], ...a: Atom[]) => unknown[];
142
+ constructor(name: string, args: Atom[], impl: (context: unknown[], ...a: Atom[]) => unknown[]);
143
+ eval(context: unknown): unknown;
144
+ }
145
+ export declare class IndexerAtom implements Atom {
146
+ readonly left: Atom;
147
+ readonly expr: Atom;
148
+ constructor(left: Atom, expr: Atom);
149
+ eval(context: unknown): unknown;
150
+ }
@@ -0,0 +1 @@
1
+ export declare function parseDateString(str: string): string;