@medplum/core 4.1.8 → 4.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +7 -7
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +46 -20
- package/dist/esm/index.d.ts +46 -20
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +3 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -72,25 +72,25 @@ export declare const AccessPolicyInteraction: {
|
|
|
72
72
|
readonly READ: "read";
|
|
73
73
|
readonly VREAD: "vread";
|
|
74
74
|
readonly UPDATE: "update";
|
|
75
|
-
readonly PATCH: "patch";
|
|
76
75
|
readonly DELETE: "delete";
|
|
77
76
|
readonly HISTORY: "history";
|
|
78
|
-
readonly HISTORY_INSTANCE: "history-instance";
|
|
79
|
-
readonly HISTORY_TYPE: "history-type";
|
|
80
|
-
readonly HISTORY_SYSTEM: "history-system";
|
|
81
77
|
readonly CREATE: "create";
|
|
82
78
|
readonly SEARCH: "search";
|
|
83
|
-
readonly SEARCH_TYPE: "search-type";
|
|
84
|
-
readonly SEARCH_SYSTEM: "search-system";
|
|
85
|
-
readonly SEARCH_COMPARTMENT: "search-compartment";
|
|
86
|
-
readonly CAPABILITIES: "capabilities";
|
|
87
|
-
readonly TRANSACTION: "transaction";
|
|
88
|
-
readonly BATCH: "batch";
|
|
89
|
-
readonly OPERATION: "operation";
|
|
90
79
|
};
|
|
91
80
|
|
|
92
81
|
export declare type AccessPolicyInteraction = (typeof AccessPolicyInteraction)[keyof typeof AccessPolicyInteraction];
|
|
93
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Shallow check that an interaction is permitted by the AccessPolicy on a given resource type,
|
|
85
|
+
* at least for some resources. A more in-depth check for the specific resource(s) being accessed
|
|
86
|
+
* is required in addition to this one.
|
|
87
|
+
* @param accessPolicy - The AccessPolicy to check against.
|
|
88
|
+
* @param interaction - The FHIR interaction being performed.
|
|
89
|
+
* @param resourceType - The type of resource being interacted with.
|
|
90
|
+
* @returns True when the interaction is provisionally permitted by the AccessPolicy.
|
|
91
|
+
*/
|
|
92
|
+
export declare function accessPolicySupportsInteraction(accessPolicy: AccessPolicy, interaction: AccessPolicyInteraction, resourceType: ResourceType): boolean;
|
|
93
|
+
|
|
94
94
|
export declare const AckCode: {
|
|
95
95
|
/** AA - Application Accept */
|
|
96
96
|
readonly AA: "AA";
|
|
@@ -406,6 +406,7 @@ export declare type CanBePopulated = {
|
|
|
406
406
|
* @param accessPolicy - The access policy.
|
|
407
407
|
* @param resourceType - The resource type.
|
|
408
408
|
* @returns True if the current user can read the specified resource type.
|
|
409
|
+
* @deprecated Use accessPolicySupportsInteraction() instead.
|
|
409
410
|
*/
|
|
410
411
|
export declare function canReadResourceType(accessPolicy: AccessPolicy, resourceType: ResourceType): boolean;
|
|
411
412
|
|
|
@@ -415,6 +416,7 @@ export declare function canReadResourceType(accessPolicy: AccessPolicy, resource
|
|
|
415
416
|
* @param accessPolicy - The access policy.
|
|
416
417
|
* @param resource - The resource.
|
|
417
418
|
* @returns True if the current user can write the specified resource type.
|
|
419
|
+
* @deprecated Use satisfiedAccessPolicy() instead.
|
|
418
420
|
*/
|
|
419
421
|
export declare function canWriteResource(accessPolicy: AccessPolicy, resource: Resource): boolean;
|
|
420
422
|
|
|
@@ -425,6 +427,7 @@ export declare function canWriteResource(accessPolicy: AccessPolicy, resource: R
|
|
|
425
427
|
* @param accessPolicy - The access policy.
|
|
426
428
|
* @param resourceType - The resource type.
|
|
427
429
|
* @returns True if the current user can write the specified resource type.
|
|
430
|
+
* @deprecated Use accessPolicySupportsInteraction() instead.
|
|
428
431
|
*/
|
|
429
432
|
export declare function canWriteResourceType(accessPolicy: AccessPolicy, resourceType: ResourceType): boolean;
|
|
430
433
|
|
|
@@ -728,6 +731,15 @@ export declare type CurrentContext<T extends FhircastAnchorResourceType | '' = F
|
|
|
728
731
|
context: FhircastEventContext<AnchorResourceOpenEvent<T>>[];
|
|
729
732
|
} : never;
|
|
730
733
|
|
|
734
|
+
export declare interface DataSampleOptions {
|
|
735
|
+
/** Code for the data points. */
|
|
736
|
+
code?: CodeableConcept;
|
|
737
|
+
/** Unit for the data points. */
|
|
738
|
+
unit?: QuantityUnit;
|
|
739
|
+
/** Sampling information for high-frequency Observations. */
|
|
740
|
+
sampling?: Omit<SampledData, 'data'>;
|
|
741
|
+
}
|
|
742
|
+
|
|
731
743
|
export declare class DataSampler {
|
|
732
744
|
private code?;
|
|
733
745
|
private unit?;
|
|
@@ -735,15 +747,8 @@ export declare class DataSampler {
|
|
|
735
747
|
private readonly dataPoints;
|
|
736
748
|
/**
|
|
737
749
|
* @param opts - Optional parameters.
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
* @param opts.sampling - Sampling information for high-frequency Observations.
|
|
741
|
-
*/
|
|
742
|
-
constructor(opts?: {
|
|
743
|
-
code?: CodeableConcept;
|
|
744
|
-
unit?: QuantityUnit;
|
|
745
|
-
sampling?: SamplingInfo;
|
|
746
|
-
});
|
|
750
|
+
*/
|
|
751
|
+
constructor(opts?: DataSampleOptions);
|
|
747
752
|
addObservation(obs: Observation): void;
|
|
748
753
|
addData(...data: number[]): void;
|
|
749
754
|
private checkUnit;
|
|
@@ -763,6 +768,13 @@ export declare type DataTypesMap = {
|
|
|
763
768
|
*/
|
|
764
769
|
export declare function decodeBase64(data: string): string;
|
|
765
770
|
|
|
771
|
+
/**
|
|
772
|
+
* Decodes a string from Base64URL format.
|
|
773
|
+
* @param data - The Base64URL encoded input string.
|
|
774
|
+
* @returns The decoded string.
|
|
775
|
+
*/
|
|
776
|
+
export declare function decodeBase64Url(data: string): string;
|
|
777
|
+
|
|
766
778
|
/**
|
|
767
779
|
* Creates a deep clone of the input value.
|
|
768
780
|
*
|
|
@@ -879,6 +891,14 @@ export declare class EmptySetAtom implements Atom {
|
|
|
879
891
|
*/
|
|
880
892
|
export declare function encodeBase64(data: string): string;
|
|
881
893
|
|
|
894
|
+
/**
|
|
895
|
+
* Encodes a string into Base64URL format.
|
|
896
|
+
* This is the encoding required for JWT parts.
|
|
897
|
+
* @param data - The unencoded input string.
|
|
898
|
+
* @returns The Base64URL encoded string.
|
|
899
|
+
*/
|
|
900
|
+
export declare function encodeBase64Url(data: string): string;
|
|
901
|
+
|
|
882
902
|
/**
|
|
883
903
|
* Encrypts a string with SHA256 encryption.
|
|
884
904
|
* @param str - The unencrypted input string.
|
|
@@ -4862,6 +4882,8 @@ export declare interface MedplumInfraConfig {
|
|
|
4862
4882
|
clamscanLoggingPrefix: string;
|
|
4863
4883
|
skipDns?: boolean;
|
|
4864
4884
|
hostedZoneName?: string;
|
|
4885
|
+
wafLogGroupName?: string;
|
|
4886
|
+
wafLogGroupCreate?: boolean;
|
|
4865
4887
|
additionalContainers?: {
|
|
4866
4888
|
name: string;
|
|
4867
4889
|
image: string;
|
|
@@ -4996,6 +5018,8 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4996
5018
|
clamscanLoggingPrefix: ValueOrExternalSecret<string>;
|
|
4997
5019
|
skipDns?: ValueOrExternalSecret<boolean>;
|
|
4998
5020
|
hostedZoneName?: ValueOrExternalSecret<string>;
|
|
5021
|
+
wafLogGroupName?: ValueOrExternalSecret<string>;
|
|
5022
|
+
wafLogGroupCreate?: ValueOrExternalSecret<boolean>;
|
|
4999
5023
|
additionalContainers?: {
|
|
5000
5024
|
name: ValueOrExternalSecret<string>;
|
|
5001
5025
|
image: ValueOrExternalSecret<string>;
|
|
@@ -5683,6 +5707,8 @@ export declare class ReadablePromise<T> implements Promise<T> {
|
|
|
5683
5707
|
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
5684
5708
|
}
|
|
5685
5709
|
|
|
5710
|
+
export declare const readInteractions: AccessPolicyInteraction[];
|
|
5711
|
+
|
|
5686
5712
|
export declare class ReconnectingWebSocket<WS extends IWebSocket = WebSocket> extends TypedEventTarget<WebSocketEventMap_2> implements IReconnectingWebSocket {
|
|
5687
5713
|
private _ws;
|
|
5688
5714
|
private _retryCount;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -72,25 +72,25 @@ export declare const AccessPolicyInteraction: {
|
|
|
72
72
|
readonly READ: "read";
|
|
73
73
|
readonly VREAD: "vread";
|
|
74
74
|
readonly UPDATE: "update";
|
|
75
|
-
readonly PATCH: "patch";
|
|
76
75
|
readonly DELETE: "delete";
|
|
77
76
|
readonly HISTORY: "history";
|
|
78
|
-
readonly HISTORY_INSTANCE: "history-instance";
|
|
79
|
-
readonly HISTORY_TYPE: "history-type";
|
|
80
|
-
readonly HISTORY_SYSTEM: "history-system";
|
|
81
77
|
readonly CREATE: "create";
|
|
82
78
|
readonly SEARCH: "search";
|
|
83
|
-
readonly SEARCH_TYPE: "search-type";
|
|
84
|
-
readonly SEARCH_SYSTEM: "search-system";
|
|
85
|
-
readonly SEARCH_COMPARTMENT: "search-compartment";
|
|
86
|
-
readonly CAPABILITIES: "capabilities";
|
|
87
|
-
readonly TRANSACTION: "transaction";
|
|
88
|
-
readonly BATCH: "batch";
|
|
89
|
-
readonly OPERATION: "operation";
|
|
90
79
|
};
|
|
91
80
|
|
|
92
81
|
export declare type AccessPolicyInteraction = (typeof AccessPolicyInteraction)[keyof typeof AccessPolicyInteraction];
|
|
93
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Shallow check that an interaction is permitted by the AccessPolicy on a given resource type,
|
|
85
|
+
* at least for some resources. A more in-depth check for the specific resource(s) being accessed
|
|
86
|
+
* is required in addition to this one.
|
|
87
|
+
* @param accessPolicy - The AccessPolicy to check against.
|
|
88
|
+
* @param interaction - The FHIR interaction being performed.
|
|
89
|
+
* @param resourceType - The type of resource being interacted with.
|
|
90
|
+
* @returns True when the interaction is provisionally permitted by the AccessPolicy.
|
|
91
|
+
*/
|
|
92
|
+
export declare function accessPolicySupportsInteraction(accessPolicy: AccessPolicy, interaction: AccessPolicyInteraction, resourceType: ResourceType): boolean;
|
|
93
|
+
|
|
94
94
|
export declare const AckCode: {
|
|
95
95
|
/** AA - Application Accept */
|
|
96
96
|
readonly AA: "AA";
|
|
@@ -406,6 +406,7 @@ export declare type CanBePopulated = {
|
|
|
406
406
|
* @param accessPolicy - The access policy.
|
|
407
407
|
* @param resourceType - The resource type.
|
|
408
408
|
* @returns True if the current user can read the specified resource type.
|
|
409
|
+
* @deprecated Use accessPolicySupportsInteraction() instead.
|
|
409
410
|
*/
|
|
410
411
|
export declare function canReadResourceType(accessPolicy: AccessPolicy, resourceType: ResourceType): boolean;
|
|
411
412
|
|
|
@@ -415,6 +416,7 @@ export declare function canReadResourceType(accessPolicy: AccessPolicy, resource
|
|
|
415
416
|
* @param accessPolicy - The access policy.
|
|
416
417
|
* @param resource - The resource.
|
|
417
418
|
* @returns True if the current user can write the specified resource type.
|
|
419
|
+
* @deprecated Use satisfiedAccessPolicy() instead.
|
|
418
420
|
*/
|
|
419
421
|
export declare function canWriteResource(accessPolicy: AccessPolicy, resource: Resource): boolean;
|
|
420
422
|
|
|
@@ -425,6 +427,7 @@ export declare function canWriteResource(accessPolicy: AccessPolicy, resource: R
|
|
|
425
427
|
* @param accessPolicy - The access policy.
|
|
426
428
|
* @param resourceType - The resource type.
|
|
427
429
|
* @returns True if the current user can write the specified resource type.
|
|
430
|
+
* @deprecated Use accessPolicySupportsInteraction() instead.
|
|
428
431
|
*/
|
|
429
432
|
export declare function canWriteResourceType(accessPolicy: AccessPolicy, resourceType: ResourceType): boolean;
|
|
430
433
|
|
|
@@ -728,6 +731,15 @@ export declare type CurrentContext<T extends FhircastAnchorResourceType | '' = F
|
|
|
728
731
|
context: FhircastEventContext<AnchorResourceOpenEvent<T>>[];
|
|
729
732
|
} : never;
|
|
730
733
|
|
|
734
|
+
export declare interface DataSampleOptions {
|
|
735
|
+
/** Code for the data points. */
|
|
736
|
+
code?: CodeableConcept;
|
|
737
|
+
/** Unit for the data points. */
|
|
738
|
+
unit?: QuantityUnit;
|
|
739
|
+
/** Sampling information for high-frequency Observations. */
|
|
740
|
+
sampling?: Omit<SampledData, 'data'>;
|
|
741
|
+
}
|
|
742
|
+
|
|
731
743
|
export declare class DataSampler {
|
|
732
744
|
private code?;
|
|
733
745
|
private unit?;
|
|
@@ -735,15 +747,8 @@ export declare class DataSampler {
|
|
|
735
747
|
private readonly dataPoints;
|
|
736
748
|
/**
|
|
737
749
|
* @param opts - Optional parameters.
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
* @param opts.sampling - Sampling information for high-frequency Observations.
|
|
741
|
-
*/
|
|
742
|
-
constructor(opts?: {
|
|
743
|
-
code?: CodeableConcept;
|
|
744
|
-
unit?: QuantityUnit;
|
|
745
|
-
sampling?: SamplingInfo;
|
|
746
|
-
});
|
|
750
|
+
*/
|
|
751
|
+
constructor(opts?: DataSampleOptions);
|
|
747
752
|
addObservation(obs: Observation): void;
|
|
748
753
|
addData(...data: number[]): void;
|
|
749
754
|
private checkUnit;
|
|
@@ -763,6 +768,13 @@ export declare type DataTypesMap = {
|
|
|
763
768
|
*/
|
|
764
769
|
export declare function decodeBase64(data: string): string;
|
|
765
770
|
|
|
771
|
+
/**
|
|
772
|
+
* Decodes a string from Base64URL format.
|
|
773
|
+
* @param data - The Base64URL encoded input string.
|
|
774
|
+
* @returns The decoded string.
|
|
775
|
+
*/
|
|
776
|
+
export declare function decodeBase64Url(data: string): string;
|
|
777
|
+
|
|
766
778
|
/**
|
|
767
779
|
* Creates a deep clone of the input value.
|
|
768
780
|
*
|
|
@@ -879,6 +891,14 @@ export declare class EmptySetAtom implements Atom {
|
|
|
879
891
|
*/
|
|
880
892
|
export declare function encodeBase64(data: string): string;
|
|
881
893
|
|
|
894
|
+
/**
|
|
895
|
+
* Encodes a string into Base64URL format.
|
|
896
|
+
* This is the encoding required for JWT parts.
|
|
897
|
+
* @param data - The unencoded input string.
|
|
898
|
+
* @returns The Base64URL encoded string.
|
|
899
|
+
*/
|
|
900
|
+
export declare function encodeBase64Url(data: string): string;
|
|
901
|
+
|
|
882
902
|
/**
|
|
883
903
|
* Encrypts a string with SHA256 encryption.
|
|
884
904
|
* @param str - The unencrypted input string.
|
|
@@ -4862,6 +4882,8 @@ export declare interface MedplumInfraConfig {
|
|
|
4862
4882
|
clamscanLoggingPrefix: string;
|
|
4863
4883
|
skipDns?: boolean;
|
|
4864
4884
|
hostedZoneName?: string;
|
|
4885
|
+
wafLogGroupName?: string;
|
|
4886
|
+
wafLogGroupCreate?: boolean;
|
|
4865
4887
|
additionalContainers?: {
|
|
4866
4888
|
name: string;
|
|
4867
4889
|
image: string;
|
|
@@ -4996,6 +5018,8 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4996
5018
|
clamscanLoggingPrefix: ValueOrExternalSecret<string>;
|
|
4997
5019
|
skipDns?: ValueOrExternalSecret<boolean>;
|
|
4998
5020
|
hostedZoneName?: ValueOrExternalSecret<string>;
|
|
5021
|
+
wafLogGroupName?: ValueOrExternalSecret<string>;
|
|
5022
|
+
wafLogGroupCreate?: ValueOrExternalSecret<boolean>;
|
|
4999
5023
|
additionalContainers?: {
|
|
5000
5024
|
name: ValueOrExternalSecret<string>;
|
|
5001
5025
|
image: ValueOrExternalSecret<string>;
|
|
@@ -5683,6 +5707,8 @@ export declare class ReadablePromise<T> implements Promise<T> {
|
|
|
5683
5707
|
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
5684
5708
|
}
|
|
5685
5709
|
|
|
5710
|
+
export declare const readInteractions: AccessPolicyInteraction[];
|
|
5711
|
+
|
|
5686
5712
|
export declare class ReconnectingWebSocket<WS extends IWebSocket = WebSocket> extends TypedEventTarget<WebSocketEventMap_2> implements IReconnectingWebSocket {
|
|
5687
5713
|
private _ws;
|
|
5688
5714
|
private _retryCount;
|