@medplum/core 5.0.11 → 5.0.12
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 +18 -1
- package/dist/esm/index.d.ts +18 -1
- 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
|
@@ -370,6 +370,22 @@ export declare interface BotEvent<T = unknown> {
|
|
|
370
370
|
readonly requester?: Reference<Bot | ClientApplication | Patient | Practitioner | RelatedPerson>;
|
|
371
371
|
/** Headers from the original request, when invoked by HTTP request */
|
|
372
372
|
readonly headers?: Record<string, string | string[] | undefined>;
|
|
373
|
+
/** Optional response stream when invoked with SSE (Server Side Events) */
|
|
374
|
+
readonly responseStream?: BotResponseStream;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Response stream interface for bot streaming responses.
|
|
379
|
+
* Compatible with both VMContext and AWS Lambda runtimes.
|
|
380
|
+
*/
|
|
381
|
+
export declare interface BotResponseStream extends NodeJS.WritableStream {
|
|
382
|
+
/**
|
|
383
|
+
* Starts streaming with the given status code and headers.
|
|
384
|
+
* Must be called before write() to commit the HTTP response.
|
|
385
|
+
* @param statusCode - HTTP status code (e.g., 200)
|
|
386
|
+
* @param headers - HTTP headers to send
|
|
387
|
+
*/
|
|
388
|
+
startStreaming(statusCode: number, headers: Record<string, string>): void;
|
|
373
389
|
}
|
|
374
390
|
|
|
375
391
|
/**
|
|
@@ -3855,7 +3871,7 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
3855
3871
|
* @param reference - The FHIR reference.
|
|
3856
3872
|
* @returns The resource if it is available in the cache; undefined otherwise.
|
|
3857
3873
|
*/
|
|
3858
|
-
getCachedReference<T extends Resource>(reference: Reference<T>): T | undefined;
|
|
3874
|
+
getCachedReference<T extends Resource>(reference: Reference<T>): WithId<T> | undefined;
|
|
3859
3875
|
/**
|
|
3860
3876
|
* Reads a resource by resource type and ID.
|
|
3861
3877
|
*
|
|
@@ -7104,6 +7120,7 @@ export declare class ParserBuilder {
|
|
|
7104
7120
|
collect?: {
|
|
7105
7121
|
tokens?: Record<string, TypedValueWithPath[]>;
|
|
7106
7122
|
};
|
|
7123
|
+
base64BinaryMaxBytes?: number;
|
|
7107
7124
|
}
|
|
7108
7125
|
|
|
7109
7126
|
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -370,6 +370,22 @@ export declare interface BotEvent<T = unknown> {
|
|
|
370
370
|
readonly requester?: Reference<Bot | ClientApplication | Patient | Practitioner | RelatedPerson>;
|
|
371
371
|
/** Headers from the original request, when invoked by HTTP request */
|
|
372
372
|
readonly headers?: Record<string, string | string[] | undefined>;
|
|
373
|
+
/** Optional response stream when invoked with SSE (Server Side Events) */
|
|
374
|
+
readonly responseStream?: BotResponseStream;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Response stream interface for bot streaming responses.
|
|
379
|
+
* Compatible with both VMContext and AWS Lambda runtimes.
|
|
380
|
+
*/
|
|
381
|
+
export declare interface BotResponseStream extends NodeJS.WritableStream {
|
|
382
|
+
/**
|
|
383
|
+
* Starts streaming with the given status code and headers.
|
|
384
|
+
* Must be called before write() to commit the HTTP response.
|
|
385
|
+
* @param statusCode - HTTP status code (e.g., 200)
|
|
386
|
+
* @param headers - HTTP headers to send
|
|
387
|
+
*/
|
|
388
|
+
startStreaming(statusCode: number, headers: Record<string, string>): void;
|
|
373
389
|
}
|
|
374
390
|
|
|
375
391
|
/**
|
|
@@ -3855,7 +3871,7 @@ export declare class MedplumClient extends TypedEventTarget<MedplumClientEventMa
|
|
|
3855
3871
|
* @param reference - The FHIR reference.
|
|
3856
3872
|
* @returns The resource if it is available in the cache; undefined otherwise.
|
|
3857
3873
|
*/
|
|
3858
|
-
getCachedReference<T extends Resource>(reference: Reference<T>): T | undefined;
|
|
3874
|
+
getCachedReference<T extends Resource>(reference: Reference<T>): WithId<T> | undefined;
|
|
3859
3875
|
/**
|
|
3860
3876
|
* Reads a resource by resource type and ID.
|
|
3861
3877
|
*
|
|
@@ -7104,6 +7120,7 @@ export declare class ParserBuilder {
|
|
|
7104
7120
|
collect?: {
|
|
7105
7121
|
tokens?: Record<string, TypedValueWithPath[]>;
|
|
7106
7122
|
};
|
|
7123
|
+
base64BinaryMaxBytes?: number;
|
|
7107
7124
|
}
|
|
7108
7125
|
|
|
7109
7126
|
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|