@medplum/core 3.1.8 → 3.1.9
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/README.md +1 -1
- package/dist/cjs/index.cjs +5 -5
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +110 -67
- package/dist/esm/index.d.ts +110 -67
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +3 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export declare interface AgentHeartbeatResponse extends BaseAgentMessage {
|
|
|
124
124
|
|
|
125
125
|
export declare type AgentMessage = AgentRequestMessage | AgentResponseMessage;
|
|
126
126
|
|
|
127
|
-
export declare interface AgentReloadConfigRequest extends
|
|
127
|
+
export declare interface AgentReloadConfigRequest extends BaseAgentRequestMessage {
|
|
128
128
|
type: 'agent:reloadconfig:request';
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -133,9 +133,9 @@ export declare interface AgentReloadConfigResponse extends BaseAgentMessage {
|
|
|
133
133
|
statusCode: number;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
export declare type AgentRequestMessage = AgentConnectRequest | AgentHeartbeatRequest | AgentTransmitRequest | AgentReloadConfigRequest;
|
|
136
|
+
export declare type AgentRequestMessage = AgentConnectRequest | AgentHeartbeatRequest | AgentTransmitRequest | AgentReloadConfigRequest | AgentUpgradeRequest;
|
|
137
137
|
|
|
138
|
-
export declare type AgentResponseMessage = AgentConnectResponse | AgentHeartbeatResponse | AgentTransmitResponse | AgentReloadConfigResponse | AgentError;
|
|
138
|
+
export declare type AgentResponseMessage = AgentConnectResponse | AgentHeartbeatResponse | AgentTransmitResponse | AgentReloadConfigResponse | AgentUpgradeResponse | AgentError;
|
|
139
139
|
|
|
140
140
|
export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
|
|
141
141
|
type: 'agent:transmit:request';
|
|
@@ -154,6 +154,16 @@ export declare interface AgentTransmitResponse extends BaseAgentMessage {
|
|
|
154
154
|
body: string;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
export declare interface AgentUpgradeRequest extends BaseAgentRequestMessage {
|
|
158
|
+
type: 'agent:upgrade:request';
|
|
159
|
+
version?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export declare interface AgentUpgradeResponse extends BaseAgentMessage {
|
|
163
|
+
type: 'agent:upgrade:response';
|
|
164
|
+
statusCode: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
export declare const allOk: OperationOutcome;
|
|
158
168
|
|
|
159
169
|
/**
|
|
@@ -233,6 +243,14 @@ export declare function assertContextVersionOptional(event: string): asserts eve
|
|
|
233
243
|
*/
|
|
234
244
|
export declare function assertOk<T>(outcome: OperationOutcome, resource: T | undefined): asserts resource is T;
|
|
235
245
|
|
|
246
|
+
export declare interface AsyncResourceVisitor {
|
|
247
|
+
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
248
|
+
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
249
|
+
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
250
|
+
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
251
|
+
visitPropertyAsync: (parent: TypedValueWithPath, key: string, path: string, value: TypedValueWithPath | TypedValueWithPath[], schema: InternalTypeSchema) => Promise<void>;
|
|
252
|
+
}
|
|
253
|
+
|
|
236
254
|
export declare interface Atom {
|
|
237
255
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
238
256
|
toString(): string;
|
|
@@ -517,6 +535,8 @@ export declare const CPT = "http://www.ama-assn.org/go/cpt";
|
|
|
517
535
|
|
|
518
536
|
export declare function crawlResource(resource: Resource, visitor: ResourceVisitor, schema?: InternalTypeSchema, initialPath?: string): void;
|
|
519
537
|
|
|
538
|
+
export declare function crawlResource(resource: Resource, visitor: AsyncResourceVisitor, options: ResourceCrawlerOptions): Promise<void>;
|
|
539
|
+
|
|
520
540
|
/**
|
|
521
541
|
* Binary upload options.
|
|
522
542
|
*/
|
|
@@ -1587,6 +1607,8 @@ export declare interface GetTypedPropertyValueOptions {
|
|
|
1587
1607
|
profileUrl?: string;
|
|
1588
1608
|
}
|
|
1589
1609
|
|
|
1610
|
+
export declare function getTypedPropertyValueWithPath(input: TypedValue | TypedValueWithPath, path: string, options?: GetTypedPropertyValueOptions): TypedValueWithPath[] | TypedValueWithPath;
|
|
1611
|
+
|
|
1590
1612
|
/**
|
|
1591
1613
|
* Returns the value of the property and the property type using a type schema.
|
|
1592
1614
|
* @param typedValue - The base context (FHIR resource or backbone element).
|
|
@@ -2453,6 +2475,14 @@ export declare interface MailOptions {
|
|
|
2453
2475
|
readonly attachments?: MailAttachment[];
|
|
2454
2476
|
}
|
|
2455
2477
|
|
|
2478
|
+
/**
|
|
2479
|
+
* Returns a Map of resources from a bundle, using the specified identifier system as the key.
|
|
2480
|
+
* @param resourceBundle - The bundle of resources.
|
|
2481
|
+
* @param identifierSystem - The identifier system to use for keys.
|
|
2482
|
+
* @returns Map of resources keyed by identifier value for the specified system.
|
|
2483
|
+
*/
|
|
2484
|
+
export declare function mapByIdentifier<T extends Resource = Resource>(resourceBundle: Bundle<T>, identifierSystem: string): Map<string, T>;
|
|
2485
|
+
|
|
2456
2486
|
export declare interface Marker {
|
|
2457
2487
|
index: number;
|
|
2458
2488
|
line: number;
|
|
@@ -3987,9 +4017,10 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3987
4017
|
*
|
|
3988
4018
|
* @category Subscriptions
|
|
3989
4019
|
* @param criteria - The criteria to subscribe to.
|
|
4020
|
+
* @param subscriptionProps - Optional properties to add to the created `Subscription` resource.
|
|
3990
4021
|
* @returns a `SubscriptionEmitter` that emits `Bundle` resources containing changes to resources based on the given criteria.
|
|
3991
4022
|
*/
|
|
3992
|
-
subscribeToCriteria(criteria: string): SubscriptionEmitter;
|
|
4023
|
+
subscribeToCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
|
|
3993
4024
|
/**
|
|
3994
4025
|
* Unsubscribes from the given criteria.
|
|
3995
4026
|
*
|
|
@@ -3998,8 +4029,9 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3998
4029
|
*
|
|
3999
4030
|
* @category Subscriptions
|
|
4000
4031
|
* @param criteria - The criteria to unsubscribe from.
|
|
4032
|
+
* @param subscriptionProps - The optional properties that `subscribeToCriteria` was called with.
|
|
4001
4033
|
*/
|
|
4002
|
-
unsubscribeFromCriteria(criteria: string): void;
|
|
4034
|
+
unsubscribeFromCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
|
|
4003
4035
|
/**
|
|
4004
4036
|
* Get the master `SubscriptionEmitter` for the `SubscriptionManager`.
|
|
4005
4037
|
*
|
|
@@ -4883,65 +4915,65 @@ export declare const projectAdminResourceTypes: string[];
|
|
|
4883
4915
|
* The list here includes additions found from StructureDefinition resources.
|
|
4884
4916
|
*/
|
|
4885
4917
|
export declare const PropertyType: {
|
|
4886
|
-
Address:
|
|
4887
|
-
Age:
|
|
4888
|
-
Annotation:
|
|
4889
|
-
Attachment:
|
|
4890
|
-
BackboneElement:
|
|
4891
|
-
CodeableConcept:
|
|
4892
|
-
Coding:
|
|
4893
|
-
ContactDetail:
|
|
4894
|
-
ContactPoint:
|
|
4895
|
-
Contributor:
|
|
4896
|
-
Count:
|
|
4897
|
-
DataRequirement:
|
|
4898
|
-
Distance:
|
|
4899
|
-
Dosage:
|
|
4900
|
-
Duration:
|
|
4901
|
-
Expression:
|
|
4902
|
-
Extension:
|
|
4903
|
-
HumanName:
|
|
4904
|
-
Identifier:
|
|
4905
|
-
MarketingStatus:
|
|
4906
|
-
Meta:
|
|
4907
|
-
Money:
|
|
4908
|
-
Narrative:
|
|
4909
|
-
ParameterDefinition:
|
|
4910
|
-
Period:
|
|
4911
|
-
Population:
|
|
4912
|
-
ProdCharacteristic:
|
|
4913
|
-
ProductShelfLife:
|
|
4914
|
-
Quantity:
|
|
4915
|
-
Range:
|
|
4916
|
-
Ratio:
|
|
4917
|
-
Reference:
|
|
4918
|
-
RelatedArtifact:
|
|
4919
|
-
SampledData:
|
|
4920
|
-
Signature:
|
|
4921
|
-
SubstanceAmount:
|
|
4922
|
-
SystemString:
|
|
4923
|
-
Timing:
|
|
4924
|
-
TriggerDefinition:
|
|
4925
|
-
UsageContext:
|
|
4926
|
-
base64Binary:
|
|
4927
|
-
boolean:
|
|
4928
|
-
canonical:
|
|
4929
|
-
code:
|
|
4930
|
-
date:
|
|
4931
|
-
dateTime:
|
|
4932
|
-
decimal:
|
|
4933
|
-
id:
|
|
4934
|
-
instant:
|
|
4935
|
-
integer:
|
|
4936
|
-
markdown:
|
|
4937
|
-
oid:
|
|
4938
|
-
positiveInt:
|
|
4939
|
-
string: string;
|
|
4940
|
-
time:
|
|
4941
|
-
unsignedInt:
|
|
4942
|
-
uri:
|
|
4943
|
-
url:
|
|
4944
|
-
uuid:
|
|
4918
|
+
readonly Address: "Address";
|
|
4919
|
+
readonly Age: "Age";
|
|
4920
|
+
readonly Annotation: "Annotation";
|
|
4921
|
+
readonly Attachment: "Attachment";
|
|
4922
|
+
readonly BackboneElement: "BackboneElement";
|
|
4923
|
+
readonly CodeableConcept: "CodeableConcept";
|
|
4924
|
+
readonly Coding: "Coding";
|
|
4925
|
+
readonly ContactDetail: "ContactDetail";
|
|
4926
|
+
readonly ContactPoint: "ContactPoint";
|
|
4927
|
+
readonly Contributor: "Contributor";
|
|
4928
|
+
readonly Count: "Count";
|
|
4929
|
+
readonly DataRequirement: "DataRequirement";
|
|
4930
|
+
readonly Distance: "Distance";
|
|
4931
|
+
readonly Dosage: "Dosage";
|
|
4932
|
+
readonly Duration: "Duration";
|
|
4933
|
+
readonly Expression: "Expression";
|
|
4934
|
+
readonly Extension: "Extension";
|
|
4935
|
+
readonly HumanName: "HumanName";
|
|
4936
|
+
readonly Identifier: "Identifier";
|
|
4937
|
+
readonly MarketingStatus: "MarketingStatus";
|
|
4938
|
+
readonly Meta: "Meta";
|
|
4939
|
+
readonly Money: "Money";
|
|
4940
|
+
readonly Narrative: "Narrative";
|
|
4941
|
+
readonly ParameterDefinition: "ParameterDefinition";
|
|
4942
|
+
readonly Period: "Period";
|
|
4943
|
+
readonly Population: "Population";
|
|
4944
|
+
readonly ProdCharacteristic: "ProdCharacteristic";
|
|
4945
|
+
readonly ProductShelfLife: "ProductShelfLife";
|
|
4946
|
+
readonly Quantity: "Quantity";
|
|
4947
|
+
readonly Range: "Range";
|
|
4948
|
+
readonly Ratio: "Ratio";
|
|
4949
|
+
readonly Reference: "Reference";
|
|
4950
|
+
readonly RelatedArtifact: "RelatedArtifact";
|
|
4951
|
+
readonly SampledData: "SampledData";
|
|
4952
|
+
readonly Signature: "Signature";
|
|
4953
|
+
readonly SubstanceAmount: "SubstanceAmount";
|
|
4954
|
+
readonly SystemString: "http://hl7.org/fhirpath/System.String";
|
|
4955
|
+
readonly Timing: "Timing";
|
|
4956
|
+
readonly TriggerDefinition: "TriggerDefinition";
|
|
4957
|
+
readonly UsageContext: "UsageContext";
|
|
4958
|
+
readonly base64Binary: "base64Binary";
|
|
4959
|
+
readonly boolean: "boolean";
|
|
4960
|
+
readonly canonical: "canonical";
|
|
4961
|
+
readonly code: "code";
|
|
4962
|
+
readonly date: "date";
|
|
4963
|
+
readonly dateTime: "dateTime";
|
|
4964
|
+
readonly decimal: "decimal";
|
|
4965
|
+
readonly id: "id";
|
|
4966
|
+
readonly instant: "instant";
|
|
4967
|
+
readonly integer: "integer";
|
|
4968
|
+
readonly markdown: "markdown";
|
|
4969
|
+
readonly oid: "oid";
|
|
4970
|
+
readonly positiveInt: "positiveInt";
|
|
4971
|
+
readonly string: "string";
|
|
4972
|
+
readonly time: "time";
|
|
4973
|
+
readonly unsignedInt: "unsignedInt";
|
|
4974
|
+
readonly uri: "uri";
|
|
4975
|
+
readonly url: "url";
|
|
4976
|
+
readonly uuid: "uuid";
|
|
4945
4977
|
};
|
|
4946
4978
|
|
|
4947
4979
|
/**
|
|
@@ -5062,6 +5094,12 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
|
5062
5094
|
bundle: Bundle<T>;
|
|
5063
5095
|
};
|
|
5064
5096
|
|
|
5097
|
+
export declare type ResourceCrawlerOptions = {
|
|
5098
|
+
skipMissingProperties?: boolean;
|
|
5099
|
+
schema?: InternalTypeSchema;
|
|
5100
|
+
initialPath?: string;
|
|
5101
|
+
};
|
|
5102
|
+
|
|
5065
5103
|
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
5066
5104
|
resource: Resource;
|
|
5067
5105
|
subscription: Subscription;
|
|
@@ -5077,7 +5115,7 @@ export declare interface ResourceVisitor {
|
|
|
5077
5115
|
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5078
5116
|
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5079
5117
|
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5080
|
-
visitProperty
|
|
5118
|
+
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
5081
5119
|
}
|
|
5082
5120
|
|
|
5083
5121
|
export declare type ResourceWithCode = Resource & Code;
|
|
@@ -5378,9 +5416,14 @@ export declare class SubscriptionManager {
|
|
|
5378
5416
|
private setupWebSocketListeners;
|
|
5379
5417
|
private emitConnect;
|
|
5380
5418
|
private emitError;
|
|
5419
|
+
private maybeEmitDisconnect;
|
|
5381
5420
|
private getTokenForCriteria;
|
|
5382
|
-
|
|
5383
|
-
|
|
5421
|
+
private maybeGetCriteriaEntry;
|
|
5422
|
+
private getAllCriteriaEmitters;
|
|
5423
|
+
private addCriteriaEntry;
|
|
5424
|
+
private removeCriteriaEntry;
|
|
5425
|
+
addCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
|
|
5426
|
+
removeCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
|
|
5384
5427
|
closeWebSocket(): void;
|
|
5385
5428
|
getCriteriaCount(): number;
|
|
5386
5429
|
getMasterEmitter(): SubscriptionEmitter;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export declare interface AgentHeartbeatResponse extends BaseAgentMessage {
|
|
|
124
124
|
|
|
125
125
|
export declare type AgentMessage = AgentRequestMessage | AgentResponseMessage;
|
|
126
126
|
|
|
127
|
-
export declare interface AgentReloadConfigRequest extends
|
|
127
|
+
export declare interface AgentReloadConfigRequest extends BaseAgentRequestMessage {
|
|
128
128
|
type: 'agent:reloadconfig:request';
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -133,9 +133,9 @@ export declare interface AgentReloadConfigResponse extends BaseAgentMessage {
|
|
|
133
133
|
statusCode: number;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
export declare type AgentRequestMessage = AgentConnectRequest | AgentHeartbeatRequest | AgentTransmitRequest | AgentReloadConfigRequest;
|
|
136
|
+
export declare type AgentRequestMessage = AgentConnectRequest | AgentHeartbeatRequest | AgentTransmitRequest | AgentReloadConfigRequest | AgentUpgradeRequest;
|
|
137
137
|
|
|
138
|
-
export declare type AgentResponseMessage = AgentConnectResponse | AgentHeartbeatResponse | AgentTransmitResponse | AgentReloadConfigResponse | AgentError;
|
|
138
|
+
export declare type AgentResponseMessage = AgentConnectResponse | AgentHeartbeatResponse | AgentTransmitResponse | AgentReloadConfigResponse | AgentUpgradeResponse | AgentError;
|
|
139
139
|
|
|
140
140
|
export declare interface AgentTransmitRequest extends BaseAgentRequestMessage {
|
|
141
141
|
type: 'agent:transmit:request';
|
|
@@ -154,6 +154,16 @@ export declare interface AgentTransmitResponse extends BaseAgentMessage {
|
|
|
154
154
|
body: string;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
export declare interface AgentUpgradeRequest extends BaseAgentRequestMessage {
|
|
158
|
+
type: 'agent:upgrade:request';
|
|
159
|
+
version?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export declare interface AgentUpgradeResponse extends BaseAgentMessage {
|
|
163
|
+
type: 'agent:upgrade:response';
|
|
164
|
+
statusCode: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
export declare const allOk: OperationOutcome;
|
|
158
168
|
|
|
159
169
|
/**
|
|
@@ -233,6 +243,14 @@ export declare function assertContextVersionOptional(event: string): asserts eve
|
|
|
233
243
|
*/
|
|
234
244
|
export declare function assertOk<T>(outcome: OperationOutcome, resource: T | undefined): asserts resource is T;
|
|
235
245
|
|
|
246
|
+
export declare interface AsyncResourceVisitor {
|
|
247
|
+
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
248
|
+
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
249
|
+
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
250
|
+
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
251
|
+
visitPropertyAsync: (parent: TypedValueWithPath, key: string, path: string, value: TypedValueWithPath | TypedValueWithPath[], schema: InternalTypeSchema) => Promise<void>;
|
|
252
|
+
}
|
|
253
|
+
|
|
236
254
|
export declare interface Atom {
|
|
237
255
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
238
256
|
toString(): string;
|
|
@@ -517,6 +535,8 @@ export declare const CPT = "http://www.ama-assn.org/go/cpt";
|
|
|
517
535
|
|
|
518
536
|
export declare function crawlResource(resource: Resource, visitor: ResourceVisitor, schema?: InternalTypeSchema, initialPath?: string): void;
|
|
519
537
|
|
|
538
|
+
export declare function crawlResource(resource: Resource, visitor: AsyncResourceVisitor, options: ResourceCrawlerOptions): Promise<void>;
|
|
539
|
+
|
|
520
540
|
/**
|
|
521
541
|
* Binary upload options.
|
|
522
542
|
*/
|
|
@@ -1587,6 +1607,8 @@ export declare interface GetTypedPropertyValueOptions {
|
|
|
1587
1607
|
profileUrl?: string;
|
|
1588
1608
|
}
|
|
1589
1609
|
|
|
1610
|
+
export declare function getTypedPropertyValueWithPath(input: TypedValue | TypedValueWithPath, path: string, options?: GetTypedPropertyValueOptions): TypedValueWithPath[] | TypedValueWithPath;
|
|
1611
|
+
|
|
1590
1612
|
/**
|
|
1591
1613
|
* Returns the value of the property and the property type using a type schema.
|
|
1592
1614
|
* @param typedValue - The base context (FHIR resource or backbone element).
|
|
@@ -2453,6 +2475,14 @@ export declare interface MailOptions {
|
|
|
2453
2475
|
readonly attachments?: MailAttachment[];
|
|
2454
2476
|
}
|
|
2455
2477
|
|
|
2478
|
+
/**
|
|
2479
|
+
* Returns a Map of resources from a bundle, using the specified identifier system as the key.
|
|
2480
|
+
* @param resourceBundle - The bundle of resources.
|
|
2481
|
+
* @param identifierSystem - The identifier system to use for keys.
|
|
2482
|
+
* @returns Map of resources keyed by identifier value for the specified system.
|
|
2483
|
+
*/
|
|
2484
|
+
export declare function mapByIdentifier<T extends Resource = Resource>(resourceBundle: Bundle<T>, identifierSystem: string): Map<string, T>;
|
|
2485
|
+
|
|
2456
2486
|
export declare interface Marker {
|
|
2457
2487
|
index: number;
|
|
2458
2488
|
line: number;
|
|
@@ -3987,9 +4017,10 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3987
4017
|
*
|
|
3988
4018
|
* @category Subscriptions
|
|
3989
4019
|
* @param criteria - The criteria to subscribe to.
|
|
4020
|
+
* @param subscriptionProps - Optional properties to add to the created `Subscription` resource.
|
|
3990
4021
|
* @returns a `SubscriptionEmitter` that emits `Bundle` resources containing changes to resources based on the given criteria.
|
|
3991
4022
|
*/
|
|
3992
|
-
subscribeToCriteria(criteria: string): SubscriptionEmitter;
|
|
4023
|
+
subscribeToCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
|
|
3993
4024
|
/**
|
|
3994
4025
|
* Unsubscribes from the given criteria.
|
|
3995
4026
|
*
|
|
@@ -3998,8 +4029,9 @@ export declare class MedplumClient extends EventTarget_2 {
|
|
|
3998
4029
|
*
|
|
3999
4030
|
* @category Subscriptions
|
|
4000
4031
|
* @param criteria - The criteria to unsubscribe from.
|
|
4032
|
+
* @param subscriptionProps - The optional properties that `subscribeToCriteria` was called with.
|
|
4001
4033
|
*/
|
|
4002
|
-
unsubscribeFromCriteria(criteria: string): void;
|
|
4034
|
+
unsubscribeFromCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
|
|
4003
4035
|
/**
|
|
4004
4036
|
* Get the master `SubscriptionEmitter` for the `SubscriptionManager`.
|
|
4005
4037
|
*
|
|
@@ -4883,65 +4915,65 @@ export declare const projectAdminResourceTypes: string[];
|
|
|
4883
4915
|
* The list here includes additions found from StructureDefinition resources.
|
|
4884
4916
|
*/
|
|
4885
4917
|
export declare const PropertyType: {
|
|
4886
|
-
Address:
|
|
4887
|
-
Age:
|
|
4888
|
-
Annotation:
|
|
4889
|
-
Attachment:
|
|
4890
|
-
BackboneElement:
|
|
4891
|
-
CodeableConcept:
|
|
4892
|
-
Coding:
|
|
4893
|
-
ContactDetail:
|
|
4894
|
-
ContactPoint:
|
|
4895
|
-
Contributor:
|
|
4896
|
-
Count:
|
|
4897
|
-
DataRequirement:
|
|
4898
|
-
Distance:
|
|
4899
|
-
Dosage:
|
|
4900
|
-
Duration:
|
|
4901
|
-
Expression:
|
|
4902
|
-
Extension:
|
|
4903
|
-
HumanName:
|
|
4904
|
-
Identifier:
|
|
4905
|
-
MarketingStatus:
|
|
4906
|
-
Meta:
|
|
4907
|
-
Money:
|
|
4908
|
-
Narrative:
|
|
4909
|
-
ParameterDefinition:
|
|
4910
|
-
Period:
|
|
4911
|
-
Population:
|
|
4912
|
-
ProdCharacteristic:
|
|
4913
|
-
ProductShelfLife:
|
|
4914
|
-
Quantity:
|
|
4915
|
-
Range:
|
|
4916
|
-
Ratio:
|
|
4917
|
-
Reference:
|
|
4918
|
-
RelatedArtifact:
|
|
4919
|
-
SampledData:
|
|
4920
|
-
Signature:
|
|
4921
|
-
SubstanceAmount:
|
|
4922
|
-
SystemString:
|
|
4923
|
-
Timing:
|
|
4924
|
-
TriggerDefinition:
|
|
4925
|
-
UsageContext:
|
|
4926
|
-
base64Binary:
|
|
4927
|
-
boolean:
|
|
4928
|
-
canonical:
|
|
4929
|
-
code:
|
|
4930
|
-
date:
|
|
4931
|
-
dateTime:
|
|
4932
|
-
decimal:
|
|
4933
|
-
id:
|
|
4934
|
-
instant:
|
|
4935
|
-
integer:
|
|
4936
|
-
markdown:
|
|
4937
|
-
oid:
|
|
4938
|
-
positiveInt:
|
|
4939
|
-
string: string;
|
|
4940
|
-
time:
|
|
4941
|
-
unsignedInt:
|
|
4942
|
-
uri:
|
|
4943
|
-
url:
|
|
4944
|
-
uuid:
|
|
4918
|
+
readonly Address: "Address";
|
|
4919
|
+
readonly Age: "Age";
|
|
4920
|
+
readonly Annotation: "Annotation";
|
|
4921
|
+
readonly Attachment: "Attachment";
|
|
4922
|
+
readonly BackboneElement: "BackboneElement";
|
|
4923
|
+
readonly CodeableConcept: "CodeableConcept";
|
|
4924
|
+
readonly Coding: "Coding";
|
|
4925
|
+
readonly ContactDetail: "ContactDetail";
|
|
4926
|
+
readonly ContactPoint: "ContactPoint";
|
|
4927
|
+
readonly Contributor: "Contributor";
|
|
4928
|
+
readonly Count: "Count";
|
|
4929
|
+
readonly DataRequirement: "DataRequirement";
|
|
4930
|
+
readonly Distance: "Distance";
|
|
4931
|
+
readonly Dosage: "Dosage";
|
|
4932
|
+
readonly Duration: "Duration";
|
|
4933
|
+
readonly Expression: "Expression";
|
|
4934
|
+
readonly Extension: "Extension";
|
|
4935
|
+
readonly HumanName: "HumanName";
|
|
4936
|
+
readonly Identifier: "Identifier";
|
|
4937
|
+
readonly MarketingStatus: "MarketingStatus";
|
|
4938
|
+
readonly Meta: "Meta";
|
|
4939
|
+
readonly Money: "Money";
|
|
4940
|
+
readonly Narrative: "Narrative";
|
|
4941
|
+
readonly ParameterDefinition: "ParameterDefinition";
|
|
4942
|
+
readonly Period: "Period";
|
|
4943
|
+
readonly Population: "Population";
|
|
4944
|
+
readonly ProdCharacteristic: "ProdCharacteristic";
|
|
4945
|
+
readonly ProductShelfLife: "ProductShelfLife";
|
|
4946
|
+
readonly Quantity: "Quantity";
|
|
4947
|
+
readonly Range: "Range";
|
|
4948
|
+
readonly Ratio: "Ratio";
|
|
4949
|
+
readonly Reference: "Reference";
|
|
4950
|
+
readonly RelatedArtifact: "RelatedArtifact";
|
|
4951
|
+
readonly SampledData: "SampledData";
|
|
4952
|
+
readonly Signature: "Signature";
|
|
4953
|
+
readonly SubstanceAmount: "SubstanceAmount";
|
|
4954
|
+
readonly SystemString: "http://hl7.org/fhirpath/System.String";
|
|
4955
|
+
readonly Timing: "Timing";
|
|
4956
|
+
readonly TriggerDefinition: "TriggerDefinition";
|
|
4957
|
+
readonly UsageContext: "UsageContext";
|
|
4958
|
+
readonly base64Binary: "base64Binary";
|
|
4959
|
+
readonly boolean: "boolean";
|
|
4960
|
+
readonly canonical: "canonical";
|
|
4961
|
+
readonly code: "code";
|
|
4962
|
+
readonly date: "date";
|
|
4963
|
+
readonly dateTime: "dateTime";
|
|
4964
|
+
readonly decimal: "decimal";
|
|
4965
|
+
readonly id: "id";
|
|
4966
|
+
readonly instant: "instant";
|
|
4967
|
+
readonly integer: "integer";
|
|
4968
|
+
readonly markdown: "markdown";
|
|
4969
|
+
readonly oid: "oid";
|
|
4970
|
+
readonly positiveInt: "positiveInt";
|
|
4971
|
+
readonly string: "string";
|
|
4972
|
+
readonly time: "time";
|
|
4973
|
+
readonly unsignedInt: "unsignedInt";
|
|
4974
|
+
readonly uri: "uri";
|
|
4975
|
+
readonly url: "url";
|
|
4976
|
+
readonly uuid: "uuid";
|
|
4945
4977
|
};
|
|
4946
4978
|
|
|
4947
4979
|
/**
|
|
@@ -5062,6 +5094,12 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
|
5062
5094
|
bundle: Bundle<T>;
|
|
5063
5095
|
};
|
|
5064
5096
|
|
|
5097
|
+
export declare type ResourceCrawlerOptions = {
|
|
5098
|
+
skipMissingProperties?: boolean;
|
|
5099
|
+
schema?: InternalTypeSchema;
|
|
5100
|
+
initialPath?: string;
|
|
5101
|
+
};
|
|
5102
|
+
|
|
5065
5103
|
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
5066
5104
|
resource: Resource;
|
|
5067
5105
|
subscription: Subscription;
|
|
@@ -5077,7 +5115,7 @@ export declare interface ResourceVisitor {
|
|
|
5077
5115
|
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5078
5116
|
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5079
5117
|
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5080
|
-
visitProperty
|
|
5118
|
+
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
5081
5119
|
}
|
|
5082
5120
|
|
|
5083
5121
|
export declare type ResourceWithCode = Resource & Code;
|
|
@@ -5378,9 +5416,14 @@ export declare class SubscriptionManager {
|
|
|
5378
5416
|
private setupWebSocketListeners;
|
|
5379
5417
|
private emitConnect;
|
|
5380
5418
|
private emitError;
|
|
5419
|
+
private maybeEmitDisconnect;
|
|
5381
5420
|
private getTokenForCriteria;
|
|
5382
|
-
|
|
5383
|
-
|
|
5421
|
+
private maybeGetCriteriaEntry;
|
|
5422
|
+
private getAllCriteriaEmitters;
|
|
5423
|
+
private addCriteriaEntry;
|
|
5424
|
+
private removeCriteriaEntry;
|
|
5425
|
+
addCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
|
|
5426
|
+
removeCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
|
|
5384
5427
|
closeWebSocket(): void;
|
|
5385
5428
|
getCriteriaCount(): number;
|
|
5386
5429
|
getMasterEmitter(): SubscriptionEmitter;
|