@metriport/api-sdk 12.2.0 → 12.2.1

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.
@@ -232,7 +232,6 @@ export declare const facilitySchema: z.ZodObject<{
232
232
  id: z.ZodString;
233
233
  eTag: z.ZodOptional<z.ZodString>;
234
234
  }, "strip", z.ZodTypeAny, {
235
- id: string;
236
235
  address: {
237
236
  addressLine1: string;
238
237
  city: string;
@@ -247,11 +246,11 @@ export declare const facilitySchema: z.ZodObject<{
247
246
  };
248
247
  name: string;
249
248
  npi: string;
249
+ id: string;
250
250
  tin?: string | null | undefined;
251
251
  active?: boolean | null | undefined;
252
252
  eTag?: string | undefined;
253
253
  }, {
254
- id: string;
255
254
  address: {
256
255
  addressLine1: string;
257
256
  city: string;
@@ -266,6 +265,7 @@ export declare const facilitySchema: z.ZodObject<{
266
265
  };
267
266
  name: string;
268
267
  npi: string;
268
+ id: string;
269
269
  tin?: string | null | undefined;
270
270
  active?: boolean | null | undefined;
271
271
  eTag?: string | undefined;
@@ -372,7 +372,6 @@ export declare const facilityListSchema: z.ZodObject<{
372
372
  id: z.ZodString;
373
373
  eTag: z.ZodOptional<z.ZodString>;
374
374
  }, "strip", z.ZodTypeAny, {
375
- id: string;
376
375
  address: {
377
376
  addressLine1: string;
378
377
  city: string;
@@ -387,11 +386,11 @@ export declare const facilityListSchema: z.ZodObject<{
387
386
  };
388
387
  name: string;
389
388
  npi: string;
389
+ id: string;
390
390
  tin?: string | null | undefined;
391
391
  active?: boolean | null | undefined;
392
392
  eTag?: string | undefined;
393
393
  }, {
394
- id: string;
395
394
  address: {
396
395
  addressLine1: string;
397
396
  city: string;
@@ -406,13 +405,13 @@ export declare const facilityListSchema: z.ZodObject<{
406
405
  };
407
406
  name: string;
408
407
  npi: string;
408
+ id: string;
409
409
  tin?: string | null | undefined;
410
410
  active?: boolean | null | undefined;
411
411
  eTag?: string | undefined;
412
412
  }>, "many">;
413
413
  }, "strip", z.ZodTypeAny, {
414
414
  facilities: {
415
- id: string;
416
415
  address: {
417
416
  addressLine1: string;
418
417
  city: string;
@@ -427,13 +426,13 @@ export declare const facilityListSchema: z.ZodObject<{
427
426
  };
428
427
  name: string;
429
428
  npi: string;
429
+ id: string;
430
430
  tin?: string | null | undefined;
431
431
  active?: boolean | null | undefined;
432
432
  eTag?: string | undefined;
433
433
  }[];
434
434
  }, {
435
435
  facilities: {
436
- id: string;
437
436
  address: {
438
437
  addressLine1: string;
439
438
  city: string;
@@ -448,6 +447,7 @@ export declare const facilityListSchema: z.ZodObject<{
448
447
  };
449
448
  name: string;
450
449
  npi: string;
450
+ id: string;
451
451
  tin?: string | null | undefined;
452
452
  active?: boolean | null | undefined;
453
453
  eTag?: string | undefined;
@@ -56,16 +56,16 @@ export declare const consolidatedCountSchema: z.ZodObject<{
56
56
  dateFrom?: string | undefined;
57
57
  dateTo?: string | undefined;
58
58
  };
59
- total: number;
60
59
  resources: Record<string, number>;
60
+ total: number;
61
61
  }, {
62
62
  filter: {
63
63
  resources: string;
64
64
  dateFrom?: string | undefined;
65
65
  dateTo?: string | undefined;
66
66
  };
67
- total: number;
68
67
  resources: Record<string, number>;
68
+ total: number;
69
69
  }>;
70
70
  export type ConsolidatedCountResponse = z.infer<typeof consolidatedCountSchema>;
71
71
  export declare const consolidatedQuerySchema: z.ZodObject<{
@@ -235,8 +235,8 @@ export declare const organizationSchema: z.ZodObject<{
235
235
  eTag: z.ZodOptional<z.ZodString>;
236
236
  }, "strip", z.ZodTypeAny, {
237
237
  type: OrgType;
238
- id: string;
239
238
  name: string;
239
+ id: string;
240
240
  location: {
241
241
  addressLine1: string;
242
242
  city: string;
@@ -253,8 +253,8 @@ export declare const organizationSchema: z.ZodObject<{
253
253
  eTag?: string | undefined;
254
254
  }, {
255
255
  type: OrgType;
256
- id: string;
257
256
  name: string;
257
+ id: string;
258
258
  location: {
259
259
  addressLine1: string;
260
260
  city: string;
@@ -945,7 +945,6 @@ export declare const patientUpdateSchema: z.ZodObject<{
945
945
  id: z.ZodString;
946
946
  eTag: z.ZodOptional<z.ZodString>;
947
947
  }, "strip", z.ZodTypeAny, {
948
- id: string;
949
948
  firstName: string;
950
949
  lastName: string;
951
950
  dob: string;
@@ -1017,6 +1016,7 @@ export declare const patientUpdateSchema: z.ZodObject<{
1017
1016
  lon: number;
1018
1017
  } | undefined;
1019
1018
  }[]] | undefined);
1019
+ id: string;
1020
1020
  personalIdentifiers?: ({
1021
1021
  type: "driversLicense";
1022
1022
  value: string;
@@ -1051,7 +1051,6 @@ export declare const patientUpdateSchema: z.ZodObject<{
1051
1051
  externalId?: string | undefined;
1052
1052
  eTag?: string | undefined;
1053
1053
  }, {
1054
- id: string;
1055
1054
  firstName: string;
1056
1055
  lastName: string;
1057
1056
  dob: string;
@@ -1123,6 +1122,7 @@ export declare const patientUpdateSchema: z.ZodObject<{
1123
1122
  } | undefined;
1124
1123
  country?: "USA" | undefined;
1125
1124
  }[]] | undefined);
1125
+ id: string;
1126
1126
  personalIdentifiers?: ({
1127
1127
  type: "driversLicense";
1128
1128
  value: string;
@@ -1159,8 +1159,6 @@ export declare const patientUpdateSchema: z.ZodObject<{
1159
1159
  }>;
1160
1160
  export type PatientUpdate = z.infer<typeof patientUpdateSchema>;
1161
1161
  export declare const patientSchema: z.ZodObject<{
1162
- id: z.ZodString;
1163
- eTag: z.ZodOptional<z.ZodString>;
1164
1162
  firstName: z.ZodString;
1165
1163
  lastName: z.ZodString;
1166
1164
  dob: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -1525,10 +1523,11 @@ export declare const patientSchema: z.ZodObject<{
1525
1523
  phone?: string | null | undefined;
1526
1524
  email?: string | null | undefined;
1527
1525
  }>>]>;
1526
+ id: z.ZodString;
1527
+ eTag: z.ZodOptional<z.ZodString>;
1528
1528
  externalId: z.ZodOptional<z.ZodString>;
1529
1529
  facilityIds: z.ZodArray<z.ZodString, "many">;
1530
1530
  }, "strip", z.ZodTypeAny, {
1531
- id: string;
1532
1531
  firstName: string;
1533
1532
  lastName: string;
1534
1533
  dob: string;
@@ -1600,8 +1599,8 @@ export declare const patientSchema: z.ZodObject<{
1600
1599
  lon: number;
1601
1600
  } | undefined;
1602
1601
  }[]] | undefined);
1602
+ id: string;
1603
1603
  facilityIds: string[];
1604
- eTag?: string | undefined;
1605
1604
  personalIdentifiers?: ({
1606
1605
  type: "driversLicense";
1607
1606
  value: string;
@@ -1633,9 +1632,9 @@ export declare const patientSchema: z.ZodObject<{
1633
1632
  phone?: string | null | undefined;
1634
1633
  email?: string | null | undefined;
1635
1634
  }[] | undefined;
1635
+ eTag?: string | undefined;
1636
1636
  externalId?: string | undefined;
1637
1637
  }, {
1638
- id: string;
1639
1638
  firstName: string;
1640
1639
  lastName: string;
1641
1640
  dob: string;
@@ -1707,8 +1706,8 @@ export declare const patientSchema: z.ZodObject<{
1707
1706
  } | undefined;
1708
1707
  country?: "USA" | undefined;
1709
1708
  }[]] | undefined);
1709
+ id: string;
1710
1710
  facilityIds: string[];
1711
- eTag?: string | undefined;
1712
1711
  personalIdentifiers?: ({
1713
1712
  type: "driversLicense";
1714
1713
  value: string;
@@ -1740,13 +1739,12 @@ export declare const patientSchema: z.ZodObject<{
1740
1739
  phone?: string | null | undefined;
1741
1740
  email?: string | null | undefined;
1742
1741
  }[] | undefined;
1742
+ eTag?: string | undefined;
1743
1743
  externalId?: string | undefined;
1744
1744
  }>;
1745
1745
  export type Patient = z.infer<typeof patientSchema>;
1746
1746
  export declare const patientListSchema: z.ZodObject<{
1747
1747
  patients: z.ZodArray<z.ZodObject<{
1748
- id: z.ZodString;
1749
- eTag: z.ZodOptional<z.ZodString>;
1750
1748
  firstName: z.ZodString;
1751
1749
  lastName: z.ZodString;
1752
1750
  dob: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -2111,10 +2109,11 @@ export declare const patientListSchema: z.ZodObject<{
2111
2109
  phone?: string | null | undefined;
2112
2110
  email?: string | null | undefined;
2113
2111
  }>>]>;
2112
+ id: z.ZodString;
2113
+ eTag: z.ZodOptional<z.ZodString>;
2114
2114
  externalId: z.ZodOptional<z.ZodString>;
2115
2115
  facilityIds: z.ZodArray<z.ZodString, "many">;
2116
2116
  }, "strip", z.ZodTypeAny, {
2117
- id: string;
2118
2117
  firstName: string;
2119
2118
  lastName: string;
2120
2119
  dob: string;
@@ -2186,8 +2185,8 @@ export declare const patientListSchema: z.ZodObject<{
2186
2185
  lon: number;
2187
2186
  } | undefined;
2188
2187
  }[]] | undefined);
2188
+ id: string;
2189
2189
  facilityIds: string[];
2190
- eTag?: string | undefined;
2191
2190
  personalIdentifiers?: ({
2192
2191
  type: "driversLicense";
2193
2192
  value: string;
@@ -2219,9 +2218,9 @@ export declare const patientListSchema: z.ZodObject<{
2219
2218
  phone?: string | null | undefined;
2220
2219
  email?: string | null | undefined;
2221
2220
  }[] | undefined;
2221
+ eTag?: string | undefined;
2222
2222
  externalId?: string | undefined;
2223
2223
  }, {
2224
- id: string;
2225
2224
  firstName: string;
2226
2225
  lastName: string;
2227
2226
  dob: string;
@@ -2293,8 +2292,8 @@ export declare const patientListSchema: z.ZodObject<{
2293
2292
  } | undefined;
2294
2293
  country?: "USA" | undefined;
2295
2294
  }[]] | undefined);
2295
+ id: string;
2296
2296
  facilityIds: string[];
2297
- eTag?: string | undefined;
2298
2297
  personalIdentifiers?: ({
2299
2298
  type: "driversLicense";
2300
2299
  value: string;
@@ -2326,11 +2325,11 @@ export declare const patientListSchema: z.ZodObject<{
2326
2325
  phone?: string | null | undefined;
2327
2326
  email?: string | null | undefined;
2328
2327
  }[] | undefined;
2328
+ eTag?: string | undefined;
2329
2329
  externalId?: string | undefined;
2330
2330
  }>, "many">;
2331
2331
  }, "strip", z.ZodTypeAny, {
2332
2332
  patients: {
2333
- id: string;
2334
2333
  firstName: string;
2335
2334
  lastName: string;
2336
2335
  dob: string;
@@ -2402,8 +2401,8 @@ export declare const patientListSchema: z.ZodObject<{
2402
2401
  lon: number;
2403
2402
  } | undefined;
2404
2403
  }[]] | undefined);
2404
+ id: string;
2405
2405
  facilityIds: string[];
2406
- eTag?: string | undefined;
2407
2406
  personalIdentifiers?: ({
2408
2407
  type: "driversLicense";
2409
2408
  value: string;
@@ -2435,11 +2434,11 @@ export declare const patientListSchema: z.ZodObject<{
2435
2434
  phone?: string | null | undefined;
2436
2435
  email?: string | null | undefined;
2437
2436
  }[] | undefined;
2437
+ eTag?: string | undefined;
2438
2438
  externalId?: string | undefined;
2439
2439
  }[];
2440
2440
  }, {
2441
2441
  patients: {
2442
- id: string;
2443
2442
  firstName: string;
2444
2443
  lastName: string;
2445
2444
  dob: string;
@@ -2511,8 +2510,8 @@ export declare const patientListSchema: z.ZodObject<{
2511
2510
  } | undefined;
2512
2511
  country?: "USA" | undefined;
2513
2512
  }[]] | undefined);
2513
+ id: string;
2514
2514
  facilityIds: string[];
2515
- eTag?: string | undefined;
2516
2515
  personalIdentifiers?: ({
2517
2516
  type: "driversLicense";
2518
2517
  value: string;
@@ -2544,6 +2543,7 @@ export declare const patientListSchema: z.ZodObject<{
2544
2543
  phone?: string | null | undefined;
2545
2544
  email?: string | null | undefined;
2546
2545
  }[] | undefined;
2546
+ eTag?: string | undefined;
2547
2547
  externalId?: string | undefined;
2548
2548
  }[];
2549
2549
  }>;
package/dist/shared.js CHANGED
@@ -22,7 +22,7 @@ exports.defaultOptionalString = (0, exports.optionalString)(exports.defaultStrin
22
22
  exports.defaultDateString = exports.defaultString.refine(date_1.isValidISODate, {
23
23
  message: `Date must be a valid ISO 8601 date formatted ${exports.ISO_DATE}. Example: 2023-03-15`,
24
24
  });
25
- exports.pastOrTodayDateString = exports.defaultDateString.refine(date_1.validateIsPastSafe, {
25
+ exports.pastOrTodayDateString = exports.defaultDateString.refine(date_1.validateIsPastOrPresentSafe, {
26
26
  message: `Date can't be in the future`,
27
27
  });
28
28
  exports.defaultNameString = exports.defaultString.min(1);
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","s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,CAAC;KAC/C;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/api-sdk",
3
- "version": "12.2.0",
3
+ "version": "12.2.1",
4
4
  "description": "Metriport helps you access and manage health and medical data, through a single open source API.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -35,7 +35,8 @@
35
35
  }
36
36
  },
37
37
  "scripts": {
38
- "clean": "rimraf dist && rimraf node_modules",
38
+ "clean": "rimraf dist",
39
+ "deepclean": "npm run clean && rimraf node_modules",
39
40
  "tsc": "tsc",
40
41
  "watch": "tsc --watch",
41
42
  "build": "tsc -p .",
@@ -57,8 +58,8 @@
57
58
  },
58
59
  "dependencies": {
59
60
  "@medplum/fhirtypes": "^2.0.32",
60
- "@metriport/commonwell-sdk": "^5.1.5",
61
- "@metriport/shared": "^0.14.0",
61
+ "@metriport/commonwell-sdk": "^5.1.6",
62
+ "@metriport/shared": "^0.14.1",
62
63
  "axios": "^1.4.0",
63
64
  "dayjs": "^1.11.7",
64
65
  "dotenv": "^16.3.1",
@@ -76,5 +77,5 @@
76
77
  "ts-jest": "29.1.1",
77
78
  "typescript": "^4.9.5"
78
79
  },
79
- "gitHead": "f09d805b784ad64e33660e52102e59dc3cf4999a"
80
+ "gitHead": "09a06299b2c6ecf0a8a1500e0dcf2a40dff23edd"
80
81
  }