@metriport/shared 0.14.0 → 0.14.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.
@@ -2,8 +2,8 @@ import dayjs, { ConfigType } from "dayjs";
2
2
  import { z } from "zod";
3
3
  export declare const ISO_DATE = "YYYY-MM-DD";
4
4
  export declare function isValidISODate(date: string): boolean;
5
- export declare function validateIsPast(date: string): boolean;
6
- export declare function validateIsPastSafe(date: string): boolean;
5
+ export declare function validateIsPastOrPresent(date: string): boolean;
6
+ export declare function validateIsPastOrPresentSafe(date: string): boolean;
7
7
  export declare function validateDateRange(start: string, end: string): boolean;
8
8
  export declare const optionalDateSchema: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>;
9
9
  export declare const dateSchema: z.ZodEffects<z.ZodString, string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/common/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAqB,CAAC,EAAE,MAAM,KAAK,CAAC;AAK3C,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAMD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKpD;AACD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQrE;AAID,eAAO,MAAM,kBAAkB,+GAIiB,CAAC;AAEjD,eAAO,MAAM,UAAU,2CAA0D,CAAC;AAElF,wBAAgB,kBAAkB,CAChC,IAAI,CAAC,EAAE,IAAI,EACX,MAAM,GAAE,KAAK,CAAC,YAA4B,GACzC,MAAM,CAER;AAED,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAE5F"}
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/common/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAqB,CAAC,EAAE,MAAM,KAAK,CAAC;AAK3C,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAMD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAK7D;AACD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGjE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQrE;AAID,eAAO,MAAM,kBAAkB,+GAIiB,CAAC;AAEjD,eAAO,MAAM,UAAU,2CAA0D,CAAC;AAElF,wBAAgB,kBAAkB,CAChC,IAAI,CAAC,EAAE,IAAI,EACX,MAAM,GAAE,KAAK,CAAC,YAA4B,GACzC,MAAM,CAER;AAED,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAE5F"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.buildDayjs = exports.elapsedTimeFromNow = exports.dateSchema = exports.optionalDateSchema = exports.validateDateRange = exports.validateIsPastSafe = exports.validateIsPast = exports.isValidISODate = exports.ISO_DATE = void 0;
6
+ exports.buildDayjs = exports.elapsedTimeFromNow = exports.dateSchema = exports.optionalDateSchema = exports.validateDateRange = exports.validateIsPastOrPresentSafe = exports.validateIsPastOrPresent = exports.isValidISODate = exports.ISO_DATE = void 0;
7
7
  const dayjs_1 = __importDefault(require("dayjs"));
8
8
  const utc_1 = __importDefault(require("dayjs/plugin/utc"));
9
9
  const zod_1 = require("zod");
@@ -17,19 +17,19 @@ exports.isValidISODate = isValidISODate;
17
17
  function isValidISODateOptional(date) {
18
18
  return date ? isValidISODate(date) : true;
19
19
  }
20
- function validateIsPast(date) {
21
- if ((0, dayjs_1.default)(date).isAfter((0, dayjs_1.default)())) {
22
- throw new bad_request_1.BadRequestError(`Date must be in the past`, undefined, { date });
20
+ function validateIsPastOrPresent(date) {
21
+ if (!validateIsPastOrPresentSafe(date)) {
22
+ throw new bad_request_1.BadRequestError(`Date can't be in the future`, undefined, { date });
23
23
  }
24
24
  return true;
25
25
  }
26
- exports.validateIsPast = validateIsPast;
27
- function validateIsPastSafe(date) {
26
+ exports.validateIsPastOrPresent = validateIsPastOrPresent;
27
+ function validateIsPastOrPresentSafe(date) {
28
28
  if ((0, dayjs_1.default)(date).isAfter((0, dayjs_1.default)()))
29
29
  return false;
30
30
  return true;
31
31
  }
32
- exports.validateIsPastSafe = validateIsPastSafe;
32
+ exports.validateIsPastOrPresentSafe = validateIsPastOrPresentSafe;
33
33
  function validateDateRange(start, end) {
34
34
  if ((0, dayjs_1.default)(start).isAfter(end)) {
35
35
  throw new bad_request_1.BadRequestError(`Invalid date range: 'start' must be before 'end'`, undefined, {
@@ -1 +1 @@
1
- {"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/common/date.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0C;AAC1C,2DAAmC;AAEnC,6BAA2C;AAC3C,sDAAuD;AAEvD,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAEL,QAAA,QAAQ,GAAG,YAAY,CAAC;AAErC,SAAgB,cAA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AAE,CAAC;QAAE,OAAO,KAAK,CAAC;IAC/C,OAAO,IAAI,CAAC;AACd,CAAC;AAHD,kEAGC;AAED,SAAgB,iBAAiB,CAAC,KAAa,EAAE,GAAW;IAC1D,IAAI,IAAA,eAAK,EAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC7B,MAAM,IAAI,6BAAe,CAAC,kDAAkD,EAAE,SAAS,EAAE;YACvF,KAAK;YACL,GAAG;SACJ,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AARD,8CAQC;AAED,MAAM,aAAa,GAAsB,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE5D,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,EAAE;KACR,IAAI,EAAE;KACN,OAAO,EAAE;KACT,MAAM,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAEpC,QAAA,UAAU,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAElF,SAAgB,kBAAkB,CAChC,IAAW,EACX,SAA6B,aAAa;IAE1C,OAAO,UAAU,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AALD,gDAKC;AAED,SAAgB,UAAU,CAAC,IAAiB,EAAE,MAAe,EAAE,MAAgB;IAC7E,OAAO,eAAK,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAFD,gCAEC"}
@@ -33,9 +33,9 @@ export declare const baseWebhookMetadataSchema: z.ZodObject<{
33
33
  data?: unknown;
34
34
  }>;
35
35
  export declare const webhookMetadataSchema: z.ZodObject<{
36
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
37
36
  messageId: z.ZodString;
38
37
  when: z.ZodEffects<z.ZodString, string, string>;
38
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
39
39
  type: z.ZodString;
40
40
  }, "strip", z.ZodTypeAny, {
41
41
  type: string;
@@ -51,9 +51,9 @@ export declare const webhookMetadataSchema: z.ZodObject<{
51
51
  export type WebhookMetadata = z.infer<typeof webhookMetadataSchema>;
52
52
  export declare const pingWebhookRequestDataSchema: z.ZodObject<{
53
53
  meta: z.ZodObject<{
54
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
55
54
  messageId: z.ZodString;
56
55
  when: z.ZodEffects<z.ZodString, string, string>;
56
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
57
57
  type: z.ZodLiteral<"ping">;
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  type: "ping";
@@ -68,21 +68,21 @@ export declare const pingWebhookRequestDataSchema: z.ZodObject<{
68
68
  }>;
69
69
  ping: z.ZodString;
70
70
  }, "strip", z.ZodTypeAny, {
71
+ ping: string;
71
72
  meta: {
72
73
  type: "ping";
73
74
  messageId: string;
74
75
  when: string;
75
76
  data?: unknown;
76
77
  };
77
- ping: string;
78
78
  }, {
79
+ ping: string;
79
80
  meta: {
80
81
  type: "ping";
81
82
  messageId: string;
82
83
  when: string;
83
84
  data?: unknown;
84
85
  };
85
- ping: string;
86
86
  }>;
87
87
  export type PingWebhookRequest = z.infer<typeof pingWebhookRequestDataSchema>;
88
88
  export declare const filtersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>>;
@@ -105,9 +105,9 @@ export declare const consolidatedWebhookPatientSchema: z.ZodObject<{
105
105
  export type ConsolidatedWebhookPatient = z.infer<typeof consolidatedWebhookPatientSchema>;
106
106
  export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
107
107
  meta: z.ZodObject<{
108
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
109
108
  messageId: z.ZodString;
110
109
  when: z.ZodEffects<z.ZodString, string, string>;
110
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
111
111
  type: z.ZodLiteral<"medical.consolidated-data">;
112
112
  }, "strip", z.ZodTypeAny, {
113
113
  type: "medical.consolidated-data";
@@ -137,38 +137,38 @@ export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
137
137
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
138
138
  }>, "many">;
139
139
  }, "strip", z.ZodTypeAny, {
140
- patients: {
141
- status: "completed" | "failed";
142
- patientId: string;
143
- bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
144
- filters?: Record<string, string | boolean | null | undefined> | null | undefined;
145
- }[];
146
140
  meta: {
147
141
  type: "medical.consolidated-data";
148
142
  messageId: string;
149
143
  when: string;
150
144
  data?: unknown;
151
145
  };
152
- }, {
153
146
  patients: {
154
147
  status: "completed" | "failed";
155
148
  patientId: string;
156
149
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
157
150
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
158
151
  }[];
152
+ }, {
159
153
  meta: {
160
154
  type: "medical.consolidated-data";
161
155
  messageId: string;
162
156
  when: string;
163
157
  data?: unknown;
164
158
  };
159
+ patients: {
160
+ status: "completed" | "failed";
161
+ patientId: string;
162
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
163
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
164
+ }[];
165
165
  }>;
166
166
  export type ConsolidatedWebhookRequest = z.infer<typeof consolidatedWebhookRequestSchema>;
167
167
  export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
168
168
  meta: z.ZodObject<{
169
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
170
169
  messageId: z.ZodString;
171
170
  when: z.ZodEffects<z.ZodString, string, string>;
171
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
172
172
  type: z.ZodLiteral<"medical.document-download">;
173
173
  }, "strip", z.ZodTypeAny, {
174
174
  type: "medical.document-download";
@@ -199,9 +199,9 @@ export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
199
199
  export type DocumentDownloadWebhookRequest = z.infer<typeof documentDownloadWebhookRequestSchema>;
200
200
  export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
201
201
  meta: z.ZodObject<{
202
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
203
202
  messageId: z.ZodString;
204
203
  when: z.ZodEffects<z.ZodString, string, string>;
204
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
205
205
  type: z.ZodLiteral<"medical.document-conversion">;
206
206
  }, "strip", z.ZodTypeAny, {
207
207
  type: "medical.document-conversion";
@@ -232,9 +232,9 @@ export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
232
232
  export type DocumentConversionWebhookRequest = z.infer<typeof documentConversionWebhookRequestSchema>;
233
233
  export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
234
234
  meta: z.ZodObject<{
235
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
236
235
  messageId: z.ZodString;
237
236
  when: z.ZodEffects<z.ZodString, string, string>;
237
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
238
238
  type: z.ZodLiteral<"medical.document-bulk-download-urls">;
239
239
  }, "strip", z.ZodTypeAny, {
240
240
  type: "medical.document-bulk-download-urls";
@@ -265,9 +265,9 @@ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
265
265
  export type DocumentBulkDownloadWebhookRequest = z.infer<typeof documentBulkDownloadWebhookRequestSchema>;
266
266
  export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
267
267
  meta: z.ZodObject<{
268
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
269
268
  messageId: z.ZodString;
270
269
  when: z.ZodEffects<z.ZodString, string, string>;
270
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
271
271
  type: z.ZodLiteral<"ping">;
272
272
  }, "strip", z.ZodTypeAny, {
273
273
  type: "ping";
@@ -282,26 +282,26 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
282
282
  }>;
283
283
  ping: z.ZodString;
284
284
  }, "strip", z.ZodTypeAny, {
285
+ ping: string;
285
286
  meta: {
286
287
  type: "ping";
287
288
  messageId: string;
288
289
  when: string;
289
290
  data?: unknown;
290
291
  };
291
- ping: string;
292
292
  }, {
293
+ ping: string;
293
294
  meta: {
294
295
  type: "ping";
295
296
  messageId: string;
296
297
  when: string;
297
298
  data?: unknown;
298
299
  };
299
- ping: string;
300
300
  }>, z.ZodObject<{
301
301
  meta: z.ZodObject<{
302
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
303
302
  messageId: z.ZodString;
304
303
  when: z.ZodEffects<z.ZodString, string, string>;
304
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
305
305
  type: z.ZodLiteral<"medical.consolidated-data">;
306
306
  }, "strip", z.ZodTypeAny, {
307
307
  type: "medical.consolidated-data";
@@ -331,36 +331,36 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
331
331
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
332
332
  }>, "many">;
333
333
  }, "strip", z.ZodTypeAny, {
334
- patients: {
335
- status: "completed" | "failed";
336
- patientId: string;
337
- bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
338
- filters?: Record<string, string | boolean | null | undefined> | null | undefined;
339
- }[];
340
334
  meta: {
341
335
  type: "medical.consolidated-data";
342
336
  messageId: string;
343
337
  when: string;
344
338
  data?: unknown;
345
339
  };
346
- }, {
347
340
  patients: {
348
341
  status: "completed" | "failed";
349
342
  patientId: string;
350
343
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
351
344
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
352
345
  }[];
346
+ }, {
353
347
  meta: {
354
348
  type: "medical.consolidated-data";
355
349
  messageId: string;
356
350
  when: string;
357
351
  data?: unknown;
358
352
  };
353
+ patients: {
354
+ status: "completed" | "failed";
355
+ patientId: string;
356
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
357
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
358
+ }[];
359
359
  }>, z.ZodObject<{
360
360
  meta: z.ZodObject<{
361
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
362
361
  messageId: z.ZodString;
363
362
  when: z.ZodEffects<z.ZodString, string, string>;
363
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
364
364
  type: z.ZodLiteral<"medical.document-download">;
365
365
  }, "strip", z.ZodTypeAny, {
366
366
  type: "medical.document-download";
@@ -389,9 +389,9 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
389
389
  };
390
390
  }>, z.ZodObject<{
391
391
  meta: z.ZodObject<{
392
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
393
392
  messageId: z.ZodString;
394
393
  when: z.ZodEffects<z.ZodString, string, string>;
394
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
395
395
  type: z.ZodLiteral<"medical.document-conversion">;
396
396
  }, "strip", z.ZodTypeAny, {
397
397
  type: "medical.document-conversion";
@@ -420,9 +420,9 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
420
420
  };
421
421
  }>, z.ZodObject<{
422
422
  meta: z.ZodObject<{
423
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
424
423
  messageId: z.ZodString;
425
424
  when: z.ZodEffects<z.ZodString, string, string>;
425
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
426
426
  type: z.ZodLiteral<"medical.document-bulk-download-urls">;
427
427
  }, "strip", z.ZodTypeAny, {
428
428
  type: "medical.document-bulk-download-urls";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/shared",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Common code shared across packages - by Metriport Inc.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -50,7 +50,8 @@
50
50
  "url": "https://github.com/metriport/metriport/issues"
51
51
  },
52
52
  "scripts": {
53
- "clean": "rimraf dist && rimraf node_modules",
53
+ "clean": "rimraf dist",
54
+ "deepclean": "npm run clean && rimraf node_modules",
54
55
  "tsc": "tsc",
55
56
  "watch": "tsc --watch",
56
57
  "build": "tsc -p .",
@@ -65,5 +66,5 @@
65
66
  "devDependencies": {
66
67
  "@faker-js/faker": "^8.0.2"
67
68
  },
68
- "gitHead": "f09d805b784ad64e33660e52102e59dc3cf4999a"
69
+ "gitHead": "09a06299b2c6ecf0a8a1500e0dcf2a40dff23edd"
69
70
  }