@medplum/core 5.1.4 → 5.1.5

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.
@@ -1009,6 +1009,8 @@ export declare function createReference<T extends Resource>(resource: T): Refere
1009
1009
 
1010
1010
  export declare function createStructureIssue(expression: string, details: string): OperationOutcomeIssue;
1011
1011
 
1012
+ export declare type CriteriaState = 'idle' | 'connecting' | 'active' | 'refreshing' | 'removed';
1013
+
1012
1014
  export declare type CurrentContext<T extends FhircastAnchorResourceType | '' = FhircastAnchorResourceType | ''> = T extends '' ? {
1013
1015
  'context.type': '';
1014
1016
  context: never[];
@@ -7145,20 +7147,30 @@ export declare class ParserBuilder {
7145
7147
  private currentProfile;
7146
7148
  constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
7147
7149
  private setupListeners;
7150
+ private sendBind;
7151
+ private sendUnbind;
7148
7152
  private emitError;
7149
7153
  private maybeEmitDisconnect;
7150
- private getTokenForCriteria;
7154
+ private isStale;
7151
7155
  private maybeGetCriteriaEntry;
7152
7156
  private getAllCriteriaEmitters;
7153
7157
  private addCriteriaEntry;
7154
7158
  private removeCriteriaEntry;
7155
7159
  private subscribeToCriteria;
7156
7160
  private refreshAllSubscriptions;
7157
- private isReconnecting;
7158
7161
  private rebindCriteriaEntry;
7159
7162
  private checkTokenExpirations;
7160
7163
  addCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
7161
7164
  removeCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
7165
+ /**
7166
+ * Garbage-collects criteria entries whose refCount has been 0 for longer than the grace period.
7167
+ * For each such entry, emits a disconnect event and performs the full removal
7168
+ * (unbind-from-token, map cleanup).
7169
+ *
7170
+ * Called automatically on the ping and token-refresh timers.
7171
+ */
7172
+ private gcUnrefEntries;
7173
+ private isEntryGettingRemoved;
7162
7174
  getWebSocket(): IReconnectingWebSocket;
7163
7175
  closeWebSocket(): void;
7164
7176
  reconnectWebSocket(): void;
@@ -1009,6 +1009,8 @@ export declare function createReference<T extends Resource>(resource: T): Refere
1009
1009
 
1010
1010
  export declare function createStructureIssue(expression: string, details: string): OperationOutcomeIssue;
1011
1011
 
1012
+ export declare type CriteriaState = 'idle' | 'connecting' | 'active' | 'refreshing' | 'removed';
1013
+
1012
1014
  export declare type CurrentContext<T extends FhircastAnchorResourceType | '' = FhircastAnchorResourceType | ''> = T extends '' ? {
1013
1015
  'context.type': '';
1014
1016
  context: never[];
@@ -7145,20 +7147,30 @@ export declare class ParserBuilder {
7145
7147
  private currentProfile;
7146
7148
  constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
7147
7149
  private setupListeners;
7150
+ private sendBind;
7151
+ private sendUnbind;
7148
7152
  private emitError;
7149
7153
  private maybeEmitDisconnect;
7150
- private getTokenForCriteria;
7154
+ private isStale;
7151
7155
  private maybeGetCriteriaEntry;
7152
7156
  private getAllCriteriaEmitters;
7153
7157
  private addCriteriaEntry;
7154
7158
  private removeCriteriaEntry;
7155
7159
  private subscribeToCriteria;
7156
7160
  private refreshAllSubscriptions;
7157
- private isReconnecting;
7158
7161
  private rebindCriteriaEntry;
7159
7162
  private checkTokenExpirations;
7160
7163
  addCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
7161
7164
  removeCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
7165
+ /**
7166
+ * Garbage-collects criteria entries whose refCount has been 0 for longer than the grace period.
7167
+ * For each such entry, emits a disconnect event and performs the full removal
7168
+ * (unbind-from-token, map cleanup).
7169
+ *
7170
+ * Called automatically on the ping and token-refresh timers.
7171
+ */
7172
+ private gcUnrefEntries;
7173
+ private isEntryGettingRemoved;
7162
7174
  getWebSocket(): IReconnectingWebSocket;
7163
7175
  closeWebSocket(): void;
7164
7176
  reconnectWebSocket(): void;