@medplum/core 3.2.6 → 3.2.8
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 +5 -5
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +85 -23
- package/dist/esm/index.d.ts +85 -23
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +4 -3
package/dist/cjs/index.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export declare function assertContextVersionOptional(event: string): asserts eve
|
|
|
245
245
|
*/
|
|
246
246
|
export declare function assertOk<T>(outcome: OperationOutcome, resource: T | undefined): asserts resource is T;
|
|
247
247
|
|
|
248
|
-
export declare interface
|
|
248
|
+
export declare interface AsyncCrawlerVisitor {
|
|
249
249
|
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
250
250
|
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
251
251
|
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
@@ -253,6 +253,9 @@ export declare interface AsyncResourceVisitor {
|
|
|
253
253
|
visitPropertyAsync: (parent: TypedValueWithPath, key: string, path: string, value: TypedValueWithPath | TypedValueWithPath[], schema: InternalTypeSchema) => Promise<void>;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/** @deprecated - Use AsyncCrawlerVisitor instead */
|
|
257
|
+
export declare type AsyncResourceVisitor = AsyncCrawlerVisitor;
|
|
258
|
+
|
|
256
259
|
export declare interface Atom {
|
|
257
260
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
258
261
|
toString(): string;
|
|
@@ -542,15 +545,29 @@ export declare type ConvertToUnion<T> = T[keyof T];
|
|
|
542
545
|
|
|
543
546
|
export declare const CPT = "http://www.ama-assn.org/go/cpt";
|
|
544
547
|
|
|
548
|
+
export declare interface CrawlerOptions {
|
|
549
|
+
skipMissingProperties?: boolean;
|
|
550
|
+
schema?: InternalTypeSchema;
|
|
551
|
+
initialPath?: string;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export declare interface CrawlerVisitor {
|
|
555
|
+
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
556
|
+
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
557
|
+
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
558
|
+
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
559
|
+
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
560
|
+
}
|
|
561
|
+
|
|
545
562
|
/**
|
|
546
563
|
* Crawls the resource synchronously.
|
|
547
564
|
* @param resource - The resource to crawl.
|
|
548
565
|
* @param visitor - The visitor functions to apply while crawling.
|
|
549
566
|
* @param schema - The schema to use for the resource.
|
|
550
567
|
* @param initialPath - The path within the resource form which to start crawling.
|
|
551
|
-
* @deprecated
|
|
568
|
+
* @deprecated - Use crawlTypedValue instead
|
|
552
569
|
*/
|
|
553
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
570
|
+
export declare function crawlResource(resource: Resource, visitor: CrawlerVisitor, schema?: InternalTypeSchema, initialPath?: string): void;
|
|
554
571
|
|
|
555
572
|
/**
|
|
556
573
|
* Crawls the resource asynchronously.
|
|
@@ -558,25 +575,45 @@ export declare function crawlResource(resource: Resource, visitor: ResourceVisit
|
|
|
558
575
|
* @param visitor - The visitor functions to apply while crawling.
|
|
559
576
|
* @param options - Options for how to crawl the resource.
|
|
560
577
|
* @returns void
|
|
561
|
-
* @deprecated
|
|
578
|
+
* @deprecated - Use crawlTypedValueAsync instead
|
|
562
579
|
*/
|
|
563
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
580
|
+
export declare function crawlResource(resource: Resource, visitor: AsyncCrawlerVisitor, options: CrawlerOptions): Promise<void>;
|
|
564
581
|
|
|
565
582
|
/**
|
|
566
583
|
* Crawls the resource synchronously.
|
|
567
584
|
* @param resource - The resource to crawl.
|
|
568
585
|
* @param visitor - The visitor functions to apply while crawling.
|
|
569
586
|
* @param options - Options for how to crawl the resource.
|
|
587
|
+
* @deprecated - Use crawlTypedValue instead
|
|
570
588
|
*/
|
|
571
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
589
|
+
export declare function crawlResource(resource: Resource, visitor: CrawlerVisitor, options?: CrawlerOptions): void;
|
|
572
590
|
|
|
573
591
|
/**
|
|
574
592
|
* Crawls the resource asynchronously.
|
|
575
593
|
* @param resource - The resource to crawl.
|
|
576
594
|
* @param visitor - The visitor functions to apply while crawling.
|
|
577
595
|
* @param options - Options for how to crawl the resource.
|
|
596
|
+
* @returns Promise
|
|
597
|
+
* @deprecated - Use crawlTypedValueAsync instead
|
|
598
|
+
*/
|
|
599
|
+
export declare function crawlResourceAsync(resource: Resource, visitor: AsyncCrawlerVisitor, options: CrawlerOptions): Promise<void>;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Crawls the typed value synchronously.
|
|
603
|
+
* @param typedValue - The typed value to crawl.
|
|
604
|
+
* @param visitor - The visitor functions to apply while crawling.
|
|
605
|
+
* @param options - Options for how to crawl the typed value.
|
|
578
606
|
*/
|
|
579
|
-
export declare function
|
|
607
|
+
export declare function crawlTypedValue(typedValue: TypedValue, visitor: CrawlerVisitor, options?: CrawlerOptions): void;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Crawls the typed value asynchronously.
|
|
611
|
+
* @param typedValue - The typed value to crawl.
|
|
612
|
+
* @param visitor - The visitor functions to apply while crawling.
|
|
613
|
+
* @param options - Options for how to crawl the typed value.
|
|
614
|
+
* @returns Promise to crawl the typed value.
|
|
615
|
+
*/
|
|
616
|
+
export declare function crawlTypedValueAsync(typedValue: TypedValue, visitor: AsyncCrawlerVisitor, options?: CrawlerOptions): Promise<void>;
|
|
580
617
|
|
|
581
618
|
/**
|
|
582
619
|
* Binary upload options.
|
|
@@ -2080,6 +2117,7 @@ export declare interface InternalSchemaElement {
|
|
|
2080
2117
|
export declare interface InternalTypeSchema {
|
|
2081
2118
|
name: string;
|
|
2082
2119
|
type: string;
|
|
2120
|
+
path: string;
|
|
2083
2121
|
title?: string;
|
|
2084
2122
|
url?: string;
|
|
2085
2123
|
kind?: string;
|
|
@@ -2237,6 +2275,13 @@ export declare function isPopulated<T extends {
|
|
|
2237
2275
|
length: number;
|
|
2238
2276
|
} | object>(arg: CanBePopulated | undefined | null): arg is T;
|
|
2239
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* Returns true if the type code is a primitive type.
|
|
2280
|
+
* @param code - The type code to check.
|
|
2281
|
+
* @returns True if the type code is a primitive type.
|
|
2282
|
+
*/
|
|
2283
|
+
export declare function isPrimitiveType(code: string): boolean;
|
|
2284
|
+
|
|
2240
2285
|
export declare function isProfileLoaded(profileUrl: string): boolean;
|
|
2241
2286
|
|
|
2242
2287
|
/**
|
|
@@ -2662,6 +2707,7 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
2662
2707
|
private readonly onUnauthenticated?;
|
|
2663
2708
|
private readonly autoBatchTime;
|
|
2664
2709
|
private readonly autoBatchQueue;
|
|
2710
|
+
private readonly refreshGracePeriod;
|
|
2665
2711
|
private subscriptionManager?;
|
|
2666
2712
|
private medplumServer?;
|
|
2667
2713
|
private clientId?;
|
|
@@ -3910,9 +3956,10 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
3910
3956
|
processCode(code: string, loginParams?: Partial<BaseLoginRequest>): Promise<ProfileResource>;
|
|
3911
3957
|
/**
|
|
3912
3958
|
* Refreshes the access token using the refresh token if available.
|
|
3959
|
+
* @param gracePeriod - Optional grace period in milliseconds. If not specified, uses the client configured grace period (default 5 minutes).
|
|
3913
3960
|
* @returns Promise to refresh the access token.
|
|
3914
3961
|
*/
|
|
3915
|
-
refreshIfExpired(): Promise<void>;
|
|
3962
|
+
refreshIfExpired(gracePeriod?: number): Promise<void>;
|
|
3916
3963
|
/**
|
|
3917
3964
|
* Tries to refresh the auth tokens.
|
|
3918
3965
|
* @returns The refresh promise if available; otherwise undefined.
|
|
@@ -4250,6 +4297,14 @@ export declare interface MedplumClientOptions {
|
|
|
4250
4297
|
* Default value is 0, which disables auto batching.
|
|
4251
4298
|
*/
|
|
4252
4299
|
autoBatchTime?: number;
|
|
4300
|
+
/**
|
|
4301
|
+
* The refresh grace period in milliseconds.
|
|
4302
|
+
*
|
|
4303
|
+
* This is the amount of time before the access token expires that the client will attempt to refresh the token.
|
|
4304
|
+
*
|
|
4305
|
+
* Default value is 300000 (5 minutes).
|
|
4306
|
+
*/
|
|
4307
|
+
refreshGracePeriod?: number;
|
|
4253
4308
|
/**
|
|
4254
4309
|
* Fetch implementation.
|
|
4255
4310
|
*
|
|
@@ -4359,6 +4414,7 @@ export declare interface MedplumInfraConfig {
|
|
|
4359
4414
|
rdsInstances: number;
|
|
4360
4415
|
rdsInstanceType: string;
|
|
4361
4416
|
rdsInstanceVersion?: string;
|
|
4417
|
+
rdsInstanceParameters?: StringMap;
|
|
4362
4418
|
rdsSecretsArn?: string;
|
|
4363
4419
|
rdsReaderInstanceType?: string;
|
|
4364
4420
|
rdsProxyEnabled?: boolean;
|
|
@@ -4484,6 +4540,7 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4484
4540
|
rdsSecretsArn?: ValueOrExternalSecret<string>;
|
|
4485
4541
|
rdsReaderInstanceType?: ValueOrExternalSecret<string>;
|
|
4486
4542
|
rdsProxyEnabled?: ValueOrExternalSecret<boolean>;
|
|
4543
|
+
rdsClusterParameters?: StringMap;
|
|
4487
4544
|
cacheNodeType?: ValueOrExternalSecret<string>;
|
|
4488
4545
|
cacheSecurityGroupId?: ValueOrExternalSecret<string>;
|
|
4489
4546
|
desiredServerCount: ValueOrExternalSecret<number>;
|
|
@@ -5335,11 +5392,8 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
|
5335
5392
|
bundle: Bundle<T>;
|
|
5336
5393
|
};
|
|
5337
5394
|
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
schema?: InternalTypeSchema;
|
|
5341
|
-
initialPath?: string;
|
|
5342
|
-
};
|
|
5395
|
+
/** @deprecated - Use CrawlerOptions instead */
|
|
5396
|
+
export declare type ResourceCrawlerOptions = CrawlerOptions;
|
|
5343
5397
|
|
|
5344
5398
|
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
5345
5399
|
resource: Resource;
|
|
@@ -5351,13 +5405,8 @@ export declare type ResourceMatchesSubscriptionCriteria = {
|
|
|
5351
5405
|
|
|
5352
5406
|
export declare function resourceMatchesSubscriptionCriteria({ resource, subscription, context, getPreviousResource, logger, }: ResourceMatchesSubscriptionCriteria): Promise<boolean>;
|
|
5353
5407
|
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5357
|
-
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5358
|
-
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5359
|
-
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
5360
|
-
}
|
|
5408
|
+
/** @deprecated - Use CrawlerVisitor instead */
|
|
5409
|
+
export declare type ResourceVisitor = CrawlerVisitor;
|
|
5361
5410
|
|
|
5362
5411
|
export declare type ResourceWithCode = Resource & Code;
|
|
5363
5412
|
|
|
@@ -5396,6 +5445,7 @@ export declare interface SearchRequest<T extends Resource = Resource> {
|
|
|
5396
5445
|
readonly resourceType: T['resourceType'];
|
|
5397
5446
|
filters?: Filter[];
|
|
5398
5447
|
sortRules?: SortRule[];
|
|
5448
|
+
cursor?: string;
|
|
5399
5449
|
offset?: number;
|
|
5400
5450
|
count?: number;
|
|
5401
5451
|
fields?: string[];
|
|
@@ -5568,10 +5618,10 @@ export declare type StringMap = {
|
|
|
5568
5618
|
*
|
|
5569
5619
|
* @param structureMap - The StructureMap to transform.
|
|
5570
5620
|
* @param input - The input values.
|
|
5571
|
-
* @param
|
|
5621
|
+
* @param transformMaps - Optional collection of imported StructureMaps and ConceptMaps.
|
|
5572
5622
|
* @returns The transformed values.
|
|
5573
5623
|
*/
|
|
5574
|
-
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[],
|
|
5624
|
+
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], transformMaps?: TransformMapCollection): TypedValue[];
|
|
5575
5625
|
|
|
5576
5626
|
export declare interface SubManagerOptions {
|
|
5577
5627
|
ReconnectingWebSocket?: IReconnectingWebSocketCtor;
|
|
@@ -5654,8 +5704,9 @@ export declare class SubscriptionManager {
|
|
|
5654
5704
|
private pingTimer;
|
|
5655
5705
|
private pingIntervalMs;
|
|
5656
5706
|
private waitingForPong;
|
|
5707
|
+
private currentProfile;
|
|
5657
5708
|
constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
|
|
5658
|
-
private
|
|
5709
|
+
private setupListeners;
|
|
5659
5710
|
private emitError;
|
|
5660
5711
|
private maybeEmitDisconnect;
|
|
5661
5712
|
private getTokenForCriteria;
|
|
@@ -5784,6 +5835,17 @@ export declare function toPeriod(input: unknown): Period | undefined;
|
|
|
5784
5835
|
*/
|
|
5785
5836
|
export declare function toTypedValue(value: unknown): TypedValue;
|
|
5786
5837
|
|
|
5838
|
+
/**
|
|
5839
|
+
* The TransformMapCollection class is a collection of StructureMap and ConceptMap resources.
|
|
5840
|
+
* It is used to store and retrieve imported StructureMaps and ConceptMaps by URL.
|
|
5841
|
+
*/
|
|
5842
|
+
export declare class TransformMapCollection {
|
|
5843
|
+
readonly resources: (StructureMap | ConceptMap)[];
|
|
5844
|
+
constructor(resources?: (StructureMap | ConceptMap)[]);
|
|
5845
|
+
get<K extends ResourceType>(resourceType: K, url: string): ExtractResource<K>[];
|
|
5846
|
+
private matchesUrl;
|
|
5847
|
+
}
|
|
5848
|
+
|
|
5787
5849
|
export declare function tryGetDataType(type: string, profileUrl?: string): InternalTypeSchema | undefined;
|
|
5788
5850
|
|
|
5789
5851
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export declare function assertContextVersionOptional(event: string): asserts eve
|
|
|
245
245
|
*/
|
|
246
246
|
export declare function assertOk<T>(outcome: OperationOutcome, resource: T | undefined): asserts resource is T;
|
|
247
247
|
|
|
248
|
-
export declare interface
|
|
248
|
+
export declare interface AsyncCrawlerVisitor {
|
|
249
249
|
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
250
250
|
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
251
251
|
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => Promise<void>;
|
|
@@ -253,6 +253,9 @@ export declare interface AsyncResourceVisitor {
|
|
|
253
253
|
visitPropertyAsync: (parent: TypedValueWithPath, key: string, path: string, value: TypedValueWithPath | TypedValueWithPath[], schema: InternalTypeSchema) => Promise<void>;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/** @deprecated - Use AsyncCrawlerVisitor instead */
|
|
257
|
+
export declare type AsyncResourceVisitor = AsyncCrawlerVisitor;
|
|
258
|
+
|
|
256
259
|
export declare interface Atom {
|
|
257
260
|
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
258
261
|
toString(): string;
|
|
@@ -542,15 +545,29 @@ export declare type ConvertToUnion<T> = T[keyof T];
|
|
|
542
545
|
|
|
543
546
|
export declare const CPT = "http://www.ama-assn.org/go/cpt";
|
|
544
547
|
|
|
548
|
+
export declare interface CrawlerOptions {
|
|
549
|
+
skipMissingProperties?: boolean;
|
|
550
|
+
schema?: InternalTypeSchema;
|
|
551
|
+
initialPath?: string;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export declare interface CrawlerVisitor {
|
|
555
|
+
onEnterObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
556
|
+
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
557
|
+
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
558
|
+
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
559
|
+
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
560
|
+
}
|
|
561
|
+
|
|
545
562
|
/**
|
|
546
563
|
* Crawls the resource synchronously.
|
|
547
564
|
* @param resource - The resource to crawl.
|
|
548
565
|
* @param visitor - The visitor functions to apply while crawling.
|
|
549
566
|
* @param schema - The schema to use for the resource.
|
|
550
567
|
* @param initialPath - The path within the resource form which to start crawling.
|
|
551
|
-
* @deprecated
|
|
568
|
+
* @deprecated - Use crawlTypedValue instead
|
|
552
569
|
*/
|
|
553
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
570
|
+
export declare function crawlResource(resource: Resource, visitor: CrawlerVisitor, schema?: InternalTypeSchema, initialPath?: string): void;
|
|
554
571
|
|
|
555
572
|
/**
|
|
556
573
|
* Crawls the resource asynchronously.
|
|
@@ -558,25 +575,45 @@ export declare function crawlResource(resource: Resource, visitor: ResourceVisit
|
|
|
558
575
|
* @param visitor - The visitor functions to apply while crawling.
|
|
559
576
|
* @param options - Options for how to crawl the resource.
|
|
560
577
|
* @returns void
|
|
561
|
-
* @deprecated
|
|
578
|
+
* @deprecated - Use crawlTypedValueAsync instead
|
|
562
579
|
*/
|
|
563
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
580
|
+
export declare function crawlResource(resource: Resource, visitor: AsyncCrawlerVisitor, options: CrawlerOptions): Promise<void>;
|
|
564
581
|
|
|
565
582
|
/**
|
|
566
583
|
* Crawls the resource synchronously.
|
|
567
584
|
* @param resource - The resource to crawl.
|
|
568
585
|
* @param visitor - The visitor functions to apply while crawling.
|
|
569
586
|
* @param options - Options for how to crawl the resource.
|
|
587
|
+
* @deprecated - Use crawlTypedValue instead
|
|
570
588
|
*/
|
|
571
|
-
export declare function crawlResource(resource: Resource, visitor:
|
|
589
|
+
export declare function crawlResource(resource: Resource, visitor: CrawlerVisitor, options?: CrawlerOptions): void;
|
|
572
590
|
|
|
573
591
|
/**
|
|
574
592
|
* Crawls the resource asynchronously.
|
|
575
593
|
* @param resource - The resource to crawl.
|
|
576
594
|
* @param visitor - The visitor functions to apply while crawling.
|
|
577
595
|
* @param options - Options for how to crawl the resource.
|
|
596
|
+
* @returns Promise
|
|
597
|
+
* @deprecated - Use crawlTypedValueAsync instead
|
|
598
|
+
*/
|
|
599
|
+
export declare function crawlResourceAsync(resource: Resource, visitor: AsyncCrawlerVisitor, options: CrawlerOptions): Promise<void>;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Crawls the typed value synchronously.
|
|
603
|
+
* @param typedValue - The typed value to crawl.
|
|
604
|
+
* @param visitor - The visitor functions to apply while crawling.
|
|
605
|
+
* @param options - Options for how to crawl the typed value.
|
|
578
606
|
*/
|
|
579
|
-
export declare function
|
|
607
|
+
export declare function crawlTypedValue(typedValue: TypedValue, visitor: CrawlerVisitor, options?: CrawlerOptions): void;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Crawls the typed value asynchronously.
|
|
611
|
+
* @param typedValue - The typed value to crawl.
|
|
612
|
+
* @param visitor - The visitor functions to apply while crawling.
|
|
613
|
+
* @param options - Options for how to crawl the typed value.
|
|
614
|
+
* @returns Promise to crawl the typed value.
|
|
615
|
+
*/
|
|
616
|
+
export declare function crawlTypedValueAsync(typedValue: TypedValue, visitor: AsyncCrawlerVisitor, options?: CrawlerOptions): Promise<void>;
|
|
580
617
|
|
|
581
618
|
/**
|
|
582
619
|
* Binary upload options.
|
|
@@ -2080,6 +2117,7 @@ export declare interface InternalSchemaElement {
|
|
|
2080
2117
|
export declare interface InternalTypeSchema {
|
|
2081
2118
|
name: string;
|
|
2082
2119
|
type: string;
|
|
2120
|
+
path: string;
|
|
2083
2121
|
title?: string;
|
|
2084
2122
|
url?: string;
|
|
2085
2123
|
kind?: string;
|
|
@@ -2237,6 +2275,13 @@ export declare function isPopulated<T extends {
|
|
|
2237
2275
|
length: number;
|
|
2238
2276
|
} | object>(arg: CanBePopulated | undefined | null): arg is T;
|
|
2239
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* Returns true if the type code is a primitive type.
|
|
2280
|
+
* @param code - The type code to check.
|
|
2281
|
+
* @returns True if the type code is a primitive type.
|
|
2282
|
+
*/
|
|
2283
|
+
export declare function isPrimitiveType(code: string): boolean;
|
|
2284
|
+
|
|
2240
2285
|
export declare function isProfileLoaded(profileUrl: string): boolean;
|
|
2241
2286
|
|
|
2242
2287
|
/**
|
|
@@ -2662,6 +2707,7 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
2662
2707
|
private readonly onUnauthenticated?;
|
|
2663
2708
|
private readonly autoBatchTime;
|
|
2664
2709
|
private readonly autoBatchQueue;
|
|
2710
|
+
private readonly refreshGracePeriod;
|
|
2665
2711
|
private subscriptionManager?;
|
|
2666
2712
|
private medplumServer?;
|
|
2667
2713
|
private clientId?;
|
|
@@ -3910,9 +3956,10 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
3910
3956
|
processCode(code: string, loginParams?: Partial<BaseLoginRequest>): Promise<ProfileResource>;
|
|
3911
3957
|
/**
|
|
3912
3958
|
* Refreshes the access token using the refresh token if available.
|
|
3959
|
+
* @param gracePeriod - Optional grace period in milliseconds. If not specified, uses the client configured grace period (default 5 minutes).
|
|
3913
3960
|
* @returns Promise to refresh the access token.
|
|
3914
3961
|
*/
|
|
3915
|
-
refreshIfExpired(): Promise<void>;
|
|
3962
|
+
refreshIfExpired(gracePeriod?: number): Promise<void>;
|
|
3916
3963
|
/**
|
|
3917
3964
|
* Tries to refresh the auth tokens.
|
|
3918
3965
|
* @returns The refresh promise if available; otherwise undefined.
|
|
@@ -4250,6 +4297,14 @@ export declare interface MedplumClientOptions {
|
|
|
4250
4297
|
* Default value is 0, which disables auto batching.
|
|
4251
4298
|
*/
|
|
4252
4299
|
autoBatchTime?: number;
|
|
4300
|
+
/**
|
|
4301
|
+
* The refresh grace period in milliseconds.
|
|
4302
|
+
*
|
|
4303
|
+
* This is the amount of time before the access token expires that the client will attempt to refresh the token.
|
|
4304
|
+
*
|
|
4305
|
+
* Default value is 300000 (5 minutes).
|
|
4306
|
+
*/
|
|
4307
|
+
refreshGracePeriod?: number;
|
|
4253
4308
|
/**
|
|
4254
4309
|
* Fetch implementation.
|
|
4255
4310
|
*
|
|
@@ -4359,6 +4414,7 @@ export declare interface MedplumInfraConfig {
|
|
|
4359
4414
|
rdsInstances: number;
|
|
4360
4415
|
rdsInstanceType: string;
|
|
4361
4416
|
rdsInstanceVersion?: string;
|
|
4417
|
+
rdsInstanceParameters?: StringMap;
|
|
4362
4418
|
rdsSecretsArn?: string;
|
|
4363
4419
|
rdsReaderInstanceType?: string;
|
|
4364
4420
|
rdsProxyEnabled?: boolean;
|
|
@@ -4484,6 +4540,7 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
4484
4540
|
rdsSecretsArn?: ValueOrExternalSecret<string>;
|
|
4485
4541
|
rdsReaderInstanceType?: ValueOrExternalSecret<string>;
|
|
4486
4542
|
rdsProxyEnabled?: ValueOrExternalSecret<boolean>;
|
|
4543
|
+
rdsClusterParameters?: StringMap;
|
|
4487
4544
|
cacheNodeType?: ValueOrExternalSecret<string>;
|
|
4488
4545
|
cacheSecurityGroupId?: ValueOrExternalSecret<string>;
|
|
4489
4546
|
desiredServerCount: ValueOrExternalSecret<number>;
|
|
@@ -5335,11 +5392,8 @@ export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
|
5335
5392
|
bundle: Bundle<T>;
|
|
5336
5393
|
};
|
|
5337
5394
|
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
schema?: InternalTypeSchema;
|
|
5341
|
-
initialPath?: string;
|
|
5342
|
-
};
|
|
5395
|
+
/** @deprecated - Use CrawlerOptions instead */
|
|
5396
|
+
export declare type ResourceCrawlerOptions = CrawlerOptions;
|
|
5343
5397
|
|
|
5344
5398
|
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
5345
5399
|
resource: Resource;
|
|
@@ -5351,13 +5405,8 @@ export declare type ResourceMatchesSubscriptionCriteria = {
|
|
|
5351
5405
|
|
|
5352
5406
|
export declare function resourceMatchesSubscriptionCriteria({ resource, subscription, context, getPreviousResource, logger, }: ResourceMatchesSubscriptionCriteria): Promise<boolean>;
|
|
5353
5407
|
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
onExitObject?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5357
|
-
onEnterResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5358
|
-
onExitResource?: (path: string, value: TypedValueWithPath, schema: InternalTypeSchema) => void;
|
|
5359
|
-
visitProperty: (parent: TypedValueWithPath, key: string, path: string, propertyValues: (TypedValueWithPath | TypedValueWithPath[])[], schema: InternalTypeSchema) => void;
|
|
5360
|
-
}
|
|
5408
|
+
/** @deprecated - Use CrawlerVisitor instead */
|
|
5409
|
+
export declare type ResourceVisitor = CrawlerVisitor;
|
|
5361
5410
|
|
|
5362
5411
|
export declare type ResourceWithCode = Resource & Code;
|
|
5363
5412
|
|
|
@@ -5396,6 +5445,7 @@ export declare interface SearchRequest<T extends Resource = Resource> {
|
|
|
5396
5445
|
readonly resourceType: T['resourceType'];
|
|
5397
5446
|
filters?: Filter[];
|
|
5398
5447
|
sortRules?: SortRule[];
|
|
5448
|
+
cursor?: string;
|
|
5399
5449
|
offset?: number;
|
|
5400
5450
|
count?: number;
|
|
5401
5451
|
fields?: string[];
|
|
@@ -5568,10 +5618,10 @@ export declare type StringMap = {
|
|
|
5568
5618
|
*
|
|
5569
5619
|
* @param structureMap - The StructureMap to transform.
|
|
5570
5620
|
* @param input - The input values.
|
|
5571
|
-
* @param
|
|
5621
|
+
* @param transformMaps - Optional collection of imported StructureMaps and ConceptMaps.
|
|
5572
5622
|
* @returns The transformed values.
|
|
5573
5623
|
*/
|
|
5574
|
-
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[],
|
|
5624
|
+
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], transformMaps?: TransformMapCollection): TypedValue[];
|
|
5575
5625
|
|
|
5576
5626
|
export declare interface SubManagerOptions {
|
|
5577
5627
|
ReconnectingWebSocket?: IReconnectingWebSocketCtor;
|
|
@@ -5654,8 +5704,9 @@ export declare class SubscriptionManager {
|
|
|
5654
5704
|
private pingTimer;
|
|
5655
5705
|
private pingIntervalMs;
|
|
5656
5706
|
private waitingForPong;
|
|
5707
|
+
private currentProfile;
|
|
5657
5708
|
constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
|
|
5658
|
-
private
|
|
5709
|
+
private setupListeners;
|
|
5659
5710
|
private emitError;
|
|
5660
5711
|
private maybeEmitDisconnect;
|
|
5661
5712
|
private getTokenForCriteria;
|
|
@@ -5784,6 +5835,17 @@ export declare function toPeriod(input: unknown): Period | undefined;
|
|
|
5784
5835
|
*/
|
|
5785
5836
|
export declare function toTypedValue(value: unknown): TypedValue;
|
|
5786
5837
|
|
|
5838
|
+
/**
|
|
5839
|
+
* The TransformMapCollection class is a collection of StructureMap and ConceptMap resources.
|
|
5840
|
+
* It is used to store and retrieve imported StructureMaps and ConceptMaps by URL.
|
|
5841
|
+
*/
|
|
5842
|
+
export declare class TransformMapCollection {
|
|
5843
|
+
readonly resources: (StructureMap | ConceptMap)[];
|
|
5844
|
+
constructor(resources?: (StructureMap | ConceptMap)[]);
|
|
5845
|
+
get<K extends ResourceType>(resourceType: K, url: string): ExtractResource<K>[];
|
|
5846
|
+
private matchesUrl;
|
|
5847
|
+
}
|
|
5848
|
+
|
|
5787
5849
|
export declare function tryGetDataType(type: string, profileUrl?: string): InternalTypeSchema | undefined;
|
|
5788
5850
|
|
|
5789
5851
|
/**
|