@oystehr/sdk 4.3.8 → 4.3.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.
Files changed (39) hide show
  1. package/README.md +105 -41
  2. package/dist/cjs/client/client.cjs +137 -5
  3. package/dist/cjs/client/client.cjs.map +1 -1
  4. package/dist/cjs/client/client.d.ts +28 -3
  5. package/dist/cjs/index.min.cjs +1 -1
  6. package/dist/cjs/index.min.cjs.map +1 -1
  7. package/dist/cjs/resources/classes/fhir-ext.cjs +277 -17
  8. package/dist/cjs/resources/classes/fhir-ext.cjs.map +1 -1
  9. package/dist/cjs/resources/classes/fhir-ext.d.ts +114 -12
  10. package/dist/cjs/resources/classes/fhir.cjs +14 -0
  11. package/dist/cjs/resources/classes/fhir.cjs.map +1 -1
  12. package/dist/cjs/resources/classes/fhir.d.ts +14 -0
  13. package/dist/cjs/resources/types/FaxSendParams.d.ts +1 -1
  14. package/dist/cjs/resources/types/ZambdaCreateParams.d.ts +1 -1
  15. package/dist/cjs/resources/types/ZambdaUpdateParams.d.ts +1 -1
  16. package/dist/cjs/resources/types/fhir.d.ts +74 -0
  17. package/dist/esm/client/client.d.ts +28 -3
  18. package/dist/esm/client/client.js +137 -5
  19. package/dist/esm/client/client.js.map +1 -1
  20. package/dist/esm/index.min.js +1 -1
  21. package/dist/esm/index.min.js.map +1 -1
  22. package/dist/esm/resources/classes/fhir-ext.d.ts +114 -12
  23. package/dist/esm/resources/classes/fhir-ext.js +273 -19
  24. package/dist/esm/resources/classes/fhir-ext.js.map +1 -1
  25. package/dist/esm/resources/classes/fhir.d.ts +14 -0
  26. package/dist/esm/resources/classes/fhir.js +15 -1
  27. package/dist/esm/resources/classes/fhir.js.map +1 -1
  28. package/dist/esm/resources/types/FaxSendParams.d.ts +1 -1
  29. package/dist/esm/resources/types/ZambdaCreateParams.d.ts +1 -1
  30. package/dist/esm/resources/types/ZambdaUpdateParams.d.ts +1 -1
  31. package/dist/esm/resources/types/fhir.d.ts +74 -0
  32. package/package.json +1 -1
  33. package/src/client/client.ts +214 -7
  34. package/src/resources/classes/fhir-ext.ts +483 -38
  35. package/src/resources/classes/fhir.ts +14 -0
  36. package/src/resources/types/FaxSendParams.ts +1 -1
  37. package/src/resources/types/ZambdaCreateParams.ts +1 -1
  38. package/src/resources/types/ZambdaUpdateParams.ts +1 -1
  39. package/src/resources/types/fhir.ts +97 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  export interface FaxSendParams {
4
4
  /**
5
- * A Z3 URL of the document you want to send. Your user must have access to this document.
5
+ * A Z3 URL of the PDF document you want to send. Your user must have access to this document.
6
6
  */
7
7
  media: string;
8
8
  /**
@@ -15,7 +15,7 @@ export interface ZambdaCreateParams {
15
15
  /**
16
16
  * The runtime to use for the Zambda Function.
17
17
  */
18
- runtime: 'nodejs20.x' | 'nodejs22.x' | 'nodejs24.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet8' | 'ruby3.3';
18
+ runtime: 'nodejs22.x' | 'nodejs24.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet8' | 'ruby3.3';
19
19
  /**
20
20
  * The amount of memory in MB to allocate to the Zambda Function. If not specified, a system default (1024MB) will be used. Min: 128MB, Max: 10240MB.
21
21
  */
@@ -15,7 +15,7 @@ export interface ZambdaUpdateParams {
15
15
  /**
16
16
  * The runtime to use for the Zambda Function.
17
17
  */
18
- runtime?: 'nodejs20.x' | 'nodejs22.x' | 'nodejs24.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet8' | 'ruby3.3';
18
+ runtime?: 'nodejs22.x' | 'nodejs24.x' | 'python3.13' | 'python3.12' | 'java21' | 'dotnet8' | 'ruby3.3';
19
19
  /**
20
20
  * The amount of memory in MB to allocate to the Zambda Function. If not specified, a system default (1024MB) will be used. Min: 128MB, Max: 10240MB.
21
21
  */
@@ -166,3 +166,100 @@ export type BatchInputRequest<F extends FhirResource> =
166
166
  export interface BatchInput<F extends FhirResource> {
167
167
  requests: BatchInputRequest<F>[];
168
168
  }
169
+
170
+ export interface FhirAsyncJobHandle {
171
+ jobId: string;
172
+ contentLocation: string;
173
+ mode: FhirAsyncResponseMode;
174
+ }
175
+
176
+ export type FhirResponseMode = 'sync' | 'async-bundle' | 'async-bulk';
177
+
178
+ export type FhirAsyncResponseMode = 'bundle' | 'bulk';
179
+
180
+ export interface FhirAsyncCompletionBundleEntry<T extends FhirResource> {
181
+ response?: {
182
+ status?: string;
183
+ outcome?: OperationOutcome;
184
+ };
185
+ resource?: T | OperationOutcome;
186
+ }
187
+
188
+ export type FhirAsyncCompletionBundle<T extends FhirResource> = EntrylessFhirBundle<T | OperationOutcome> & {
189
+ resourceType: 'Bundle';
190
+ type: 'batch-response';
191
+ entry?: Array<FhirAsyncCompletionBundleEntry<T>>;
192
+ };
193
+
194
+ export interface FhirAsyncJobInProgress {
195
+ status: 202;
196
+ xProgress?: string;
197
+ retryAfter?: string;
198
+ }
199
+
200
+ export interface FhirAsyncJobCompletedBundle<T extends FhirResource = FhirResource> {
201
+ status: 200;
202
+ mode: 'bundle';
203
+ bundle: FhirAsyncCompletionBundle<T>;
204
+ interactionStatus?: string;
205
+ resource?: T | OperationOutcome;
206
+ outcome?: OperationOutcome;
207
+ }
208
+
209
+ export interface FhirAsyncBulkOutputFile {
210
+ type: string;
211
+ url: string;
212
+ }
213
+
214
+ export interface FhirAsyncBulkManifest {
215
+ transactionTime: string;
216
+ request: string;
217
+ requiresAccessToken: boolean;
218
+ output: FhirAsyncBulkOutputFile[];
219
+ error: FhirAsyncBulkOutputFile[];
220
+ deleted?: FhirAsyncBulkOutputFile[];
221
+ extension?: Record<string, unknown>;
222
+ }
223
+
224
+ export interface FhirAsyncJobCompletedBulk {
225
+ status: 200;
226
+ mode: 'bulk';
227
+ manifest: FhirAsyncBulkManifest;
228
+ }
229
+
230
+ export interface FhirAsyncBulkOutputFileResult<T extends FhirResource = FhirResource> extends FhirAsyncBulkOutputFile {
231
+ resources: T[];
232
+ }
233
+
234
+ export interface FhirAsyncBulkOutputResult<T extends FhirResource = FhirResource> {
235
+ manifest: FhirAsyncBulkManifest;
236
+ output: FhirAsyncBulkOutputFileResult<T>[];
237
+ }
238
+
239
+ export interface FhirAsyncJobExpired {
240
+ status: 410;
241
+ }
242
+
243
+ export interface FhirAsyncJobNotFound {
244
+ status: 404;
245
+ }
246
+
247
+ export interface FhirAsyncJobUnexpected {
248
+ status: Exclude<number, 200 | 202 | 404 | 410>;
249
+ body: unknown;
250
+ }
251
+
252
+ export type FhirAsyncJobStatus<T extends FhirResource = FhirResource> =
253
+ | FhirAsyncJobInProgress
254
+ | FhirAsyncJobCompletedBundle<T>
255
+ | FhirAsyncJobCompletedBulk
256
+ | FhirAsyncJobExpired
257
+ | FhirAsyncJobNotFound
258
+ | FhirAsyncJobUnexpected;
259
+
260
+ export interface FhirAsyncWaitOptions {
261
+ /** Poll interval in milliseconds. Defaults to 1000 (1 second). */
262
+ pollIntervalMs: number;
263
+ /** Maximum wait time in milliseconds before timing out. Defaults to 900000 (15 minutes). */
264
+ timeoutMs: number;
265
+ }