@metriport/shared 0.14.5 → 0.14.6-alpha.0
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/domain/secrets.d.ts +3 -0
- package/dist/domain/secrets.d.ts.map +1 -0
- package/dist/domain/secrets.js +6 -0
- package/dist/domain/secrets.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/external/elation/appointment.d.ts +60 -0
- package/dist/interface/external/elation/appointment.d.ts.map +1 -0
- package/dist/interface/external/elation/appointment.js +19 -0
- package/dist/interface/external/elation/appointment.js.map +1 -0
- package/dist/interface/external/elation/index.d.ts +4 -0
- package/dist/interface/external/elation/index.d.ts.map +1 -0
- package/dist/interface/external/elation/index.js +20 -0
- package/dist/interface/external/elation/index.js.map +1 -0
- package/dist/interface/external/elation/patient.d.ts +96 -0
- package/dist/interface/external/elation/patient.d.ts.map +1 -0
- package/dist/interface/external/elation/patient.js +33 -0
- package/dist/interface/external/elation/patient.js.map +1 -0
- package/dist/interface/external/elation/subscription.d.ts +2 -0
- package/dist/interface/external/elation/subscription.d.ts.map +1 -0
- package/dist/interface/external/elation/subscription.js +3 -0
- package/dist/interface/external/elation/subscription.js.map +1 -0
- package/dist/interface/index.d.ts +0 -1
- package/dist/interface/index.d.ts.map +1 -1
- package/dist/interface/index.js +0 -1
- package/dist/interface/index.js.map +1 -1
- package/dist/interface/internal/consolidated.d.ts +3 -0
- package/dist/interface/internal/consolidated.d.ts.map +1 -1
- package/dist/interface/internal/consolidated.js +1 -0
- package/dist/interface/internal/consolidated.js.map +1 -1
- package/dist/medical/webhook/webhook-request.d.ts +77 -33
- package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/common/__tests__/string.test copy.d.ts +0 -2
- package/dist/common/__tests__/string.test copy.d.ts.map +0 -1
- package/dist/common/__tests__/string.test copy.js +0 -62
- package/dist/common/__tests__/string.test copy.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/domain/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mCAAmC,uCAAmC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cxClientKeyAndSecretMapSecretSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.cxClientKeyAndSecretMapSecretSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.string());
|
|
6
|
+
//# sourceMappingURL=secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/domain/secrets.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from "./domain/gender";
|
|
|
27
27
|
export { metriportCompanyDetails } from "./domain/metriport";
|
|
28
28
|
export * from "./domain/patient/patient";
|
|
29
29
|
export * from "./domain/patient/patient-import";
|
|
30
|
+
export * from "./domain/secrets";
|
|
30
31
|
export * from "./domain/rate-limiting";
|
|
31
32
|
export { BadRequestError } from "./error/bad-request";
|
|
32
33
|
export { MetriportError } from "./error/metriport-error";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,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B,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -71,6 +71,7 @@ var metriport_1 = require("./domain/metriport");
|
|
|
71
71
|
Object.defineProperty(exports, "metriportCompanyDetails", { enumerable: true, get: function () { return metriport_1.metriportCompanyDetails; } });
|
|
72
72
|
__exportStar(require("./domain/patient/patient"), exports);
|
|
73
73
|
__exportStar(require("./domain/patient/patient-import"), exports);
|
|
74
|
+
__exportStar(require("./domain/secrets"), exports);
|
|
74
75
|
__exportStar(require("./domain/rate-limiting"), exports);
|
|
75
76
|
var bad_request_1 = require("./error/bad-request");
|
|
76
77
|
Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return bad_request_1.BadRequestError; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;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are const appointmentSchema: z.ZodObject<{
|
|
3
|
+
patient: z.ZodNullable<z.ZodEffects<z.ZodNumber, string, number>>;
|
|
4
|
+
status: z.ZodNullable<z.ZodObject<{
|
|
5
|
+
status: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
status: string;
|
|
8
|
+
}, {
|
|
9
|
+
status: string;
|
|
10
|
+
}>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
status: {
|
|
13
|
+
status: string;
|
|
14
|
+
} | null;
|
|
15
|
+
patient: string | null;
|
|
16
|
+
}, {
|
|
17
|
+
status: {
|
|
18
|
+
status: string;
|
|
19
|
+
} | null;
|
|
20
|
+
patient: number | null;
|
|
21
|
+
}>;
|
|
22
|
+
export type Appointment = z.infer<typeof appointmentSchema>;
|
|
23
|
+
export declare const appointmentsGetResponseSchema: z.ZodObject<{
|
|
24
|
+
results: z.ZodArray<z.ZodObject<{
|
|
25
|
+
patient: z.ZodNullable<z.ZodEffects<z.ZodNumber, string, number>>;
|
|
26
|
+
status: z.ZodNullable<z.ZodObject<{
|
|
27
|
+
status: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
status: string;
|
|
30
|
+
}, {
|
|
31
|
+
status: string;
|
|
32
|
+
}>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
status: {
|
|
35
|
+
status: string;
|
|
36
|
+
} | null;
|
|
37
|
+
patient: string | null;
|
|
38
|
+
}, {
|
|
39
|
+
status: {
|
|
40
|
+
status: string;
|
|
41
|
+
} | null;
|
|
42
|
+
patient: number | null;
|
|
43
|
+
}>, "many">;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
results: {
|
|
46
|
+
status: {
|
|
47
|
+
status: string;
|
|
48
|
+
} | null;
|
|
49
|
+
patient: string | null;
|
|
50
|
+
}[];
|
|
51
|
+
}, {
|
|
52
|
+
results: {
|
|
53
|
+
status: {
|
|
54
|
+
status: string;
|
|
55
|
+
} | null;
|
|
56
|
+
patient: number | null;
|
|
57
|
+
}[];
|
|
58
|
+
}>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=appointment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/elation/appointment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;EAUrB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appointmentsGetResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const appointmentSchema = zod_1.z.object({
|
|
6
|
+
patient: zod_1.z
|
|
7
|
+
.number()
|
|
8
|
+
.transform(val => `${val}`)
|
|
9
|
+
.nullable(),
|
|
10
|
+
status: zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
status: zod_1.z.string(),
|
|
13
|
+
})
|
|
14
|
+
.nullable(),
|
|
15
|
+
});
|
|
16
|
+
exports.appointmentsGetResponseSchema = zod_1.z.object({
|
|
17
|
+
results: appointmentSchema.array(),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=appointment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.js","sourceRoot":"","sources":["../../../../src/interface/external/elation/appointment.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC;SAC1B,QAAQ,EAAE;IACb,MAAM,EAAE,OAAC;SACN,MAAM,CAAC;QACN,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;KACnB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/elation/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./subscription"), exports);
|
|
18
|
+
__exportStar(require("./appointment"), exports);
|
|
19
|
+
__exportStar(require("./patient"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interface/external/elation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B;AAC9B,4CAA0B"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const patientResourceSchema: z.ZodObject<{
|
|
3
|
+
first_name: z.ZodString;
|
|
4
|
+
last_name: z.ZodString;
|
|
5
|
+
middle_name: z.ZodString;
|
|
6
|
+
sex: z.ZodString;
|
|
7
|
+
address: z.ZodObject<{
|
|
8
|
+
state: z.ZodString;
|
|
9
|
+
address_line1: z.ZodString;
|
|
10
|
+
address_line2: z.ZodString;
|
|
11
|
+
city: z.ZodString;
|
|
12
|
+
zip: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
state: string;
|
|
15
|
+
zip: string;
|
|
16
|
+
city: string;
|
|
17
|
+
address_line1: string;
|
|
18
|
+
address_line2: string;
|
|
19
|
+
}, {
|
|
20
|
+
state: string;
|
|
21
|
+
zip: string;
|
|
22
|
+
city: string;
|
|
23
|
+
address_line1: string;
|
|
24
|
+
address_line2: string;
|
|
25
|
+
}>;
|
|
26
|
+
dob: z.ZodString;
|
|
27
|
+
phones: z.ZodArray<z.ZodObject<{
|
|
28
|
+
phone: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
phone: string;
|
|
31
|
+
}, {
|
|
32
|
+
phone: string;
|
|
33
|
+
}>, "many">;
|
|
34
|
+
emails: z.ZodArray<z.ZodObject<{
|
|
35
|
+
email: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
email: string;
|
|
38
|
+
}, {
|
|
39
|
+
email: string;
|
|
40
|
+
}>, "many">;
|
|
41
|
+
ssn: z.ZodNullable<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
dob: string;
|
|
44
|
+
address: {
|
|
45
|
+
state: string;
|
|
46
|
+
zip: string;
|
|
47
|
+
city: string;
|
|
48
|
+
address_line1: string;
|
|
49
|
+
address_line2: string;
|
|
50
|
+
};
|
|
51
|
+
first_name: string;
|
|
52
|
+
last_name: string;
|
|
53
|
+
middle_name: string;
|
|
54
|
+
sex: string;
|
|
55
|
+
phones: {
|
|
56
|
+
phone: string;
|
|
57
|
+
}[];
|
|
58
|
+
emails: {
|
|
59
|
+
email: string;
|
|
60
|
+
}[];
|
|
61
|
+
ssn: string | null;
|
|
62
|
+
}, {
|
|
63
|
+
dob: string;
|
|
64
|
+
address: {
|
|
65
|
+
state: string;
|
|
66
|
+
zip: string;
|
|
67
|
+
city: string;
|
|
68
|
+
address_line1: string;
|
|
69
|
+
address_line2: string;
|
|
70
|
+
};
|
|
71
|
+
first_name: string;
|
|
72
|
+
last_name: string;
|
|
73
|
+
middle_name: string;
|
|
74
|
+
sex: string;
|
|
75
|
+
phones: {
|
|
76
|
+
phone: string;
|
|
77
|
+
}[];
|
|
78
|
+
emails: {
|
|
79
|
+
email: string;
|
|
80
|
+
}[];
|
|
81
|
+
ssn: string | null;
|
|
82
|
+
}>;
|
|
83
|
+
export type PatientResource = z.infer<typeof patientResourceSchema>;
|
|
84
|
+
declare const metadata: z.ZodObject<{
|
|
85
|
+
object_id: z.ZodString;
|
|
86
|
+
object_web_link: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
object_id: string;
|
|
89
|
+
object_web_link: string;
|
|
90
|
+
}, {
|
|
91
|
+
object_id: string;
|
|
92
|
+
object_web_link: string;
|
|
93
|
+
}>;
|
|
94
|
+
export type Metadata = z.infer<typeof metadata>;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=patient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/elation/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,QAAA,MAAM,QAAQ;;;;;;;;;EAGZ,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.patientResourceSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const address = zod_1.z.object({
|
|
6
|
+
state: zod_1.z.string(),
|
|
7
|
+
address_line1: zod_1.z.string(),
|
|
8
|
+
address_line2: zod_1.z.string(),
|
|
9
|
+
city: zod_1.z.string(),
|
|
10
|
+
zip: zod_1.z.string(),
|
|
11
|
+
});
|
|
12
|
+
const phone = zod_1.z.object({
|
|
13
|
+
phone: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
const email = zod_1.z.object({
|
|
16
|
+
email: zod_1.z.string(),
|
|
17
|
+
});
|
|
18
|
+
exports.patientResourceSchema = zod_1.z.object({
|
|
19
|
+
first_name: zod_1.z.string(),
|
|
20
|
+
last_name: zod_1.z.string(),
|
|
21
|
+
middle_name: zod_1.z.string(),
|
|
22
|
+
sex: zod_1.z.string(),
|
|
23
|
+
address,
|
|
24
|
+
dob: zod_1.z.string(),
|
|
25
|
+
phones: phone.array(),
|
|
26
|
+
emails: email.array(),
|
|
27
|
+
ssn: zod_1.z.string().nullable(),
|
|
28
|
+
});
|
|
29
|
+
const metadata = zod_1.z.object({
|
|
30
|
+
object_id: zod_1.z.string(),
|
|
31
|
+
object_web_link: zod_1.z.string(),
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=patient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patient.js","sourceRoot":"","sources":["../../../../src/interface/external/elation/patient.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,OAAO,GAAG,OAAC,CAAC,MAAM,CAAC;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO;IACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE;IACrB,MAAM,EAAE,KAAK,CAAC,KAAK,EAAE;IACrB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC;AAIH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../src/interface/external/elation/subscription.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../../src/interface/external/elation/subscription.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
package/dist/interface/index.js
CHANGED
|
@@ -15,6 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./internal"), exports);
|
|
18
|
-
__exportStar(require("./external"), exports);
|
|
19
18
|
__exportStar(require("./schema"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB"}
|
|
@@ -8,6 +8,7 @@ export declare const internalSendConsolidatedSchema: z.ZodObject<{
|
|
|
8
8
|
resources: z.ZodOptional<z.ZodArray<z.ZodEnum<["Account", "AllergyIntolerance", "Appointment", "AppointmentResponse", "AuditEvent", "Basic", "BodyStructure", "CarePlan", "CareTeam", "ChargeItem", "Claim", "ClaimResponse", "ClinicalImpression", "Communication", "CommunicationRequest", "Composition", "Condition", "Consent", "Contract", "Coverage", "CoverageEligibilityRequest", "CoverageEligibilityResponse", "DetectedIssue", "Device", "DeviceRequest", "DeviceUseStatement", "DiagnosticReport", "DocumentManifest", "DocumentReference", "Encounter", "EnrollmentRequest", "EpisodeOfCare", "ExplanationOfBenefit", "FamilyMemberHistory", "Flag", "Goal", "GuidanceResponse", "ImagingStudy", "Immunization", "ImmunizationEvaluation", "ImmunizationRecommendation", "Invoice", "List", "MeasureReport", "Media", "MedicationAdministration", "MedicationDispense", "MedicationRequest", "MedicationStatement", "MolecularSequence", "NutritionOrder", "Observation", "Person", "Procedure", "Provenance", "QuestionnaireResponse", "RelatedPerson", "RequestGroup", "ResearchSubject", "RiskAssessment", "ServiceRequest", "Specimen", "AdverseEvent", "Task", "Location", "Organization", "Patient", "Practitioner"]>, "many">>;
|
|
9
9
|
dateFrom: z.ZodOptional<z.ZodString>;
|
|
10
10
|
dateTo: z.ZodOptional<z.ZodString>;
|
|
11
|
+
fromDashboard: z.ZodOptional<z.ZodBoolean>;
|
|
11
12
|
}, "strip", z.ZodTypeAny, {
|
|
12
13
|
requestId: string;
|
|
13
14
|
bundleLocation: string;
|
|
@@ -17,6 +18,7 @@ export declare const internalSendConsolidatedSchema: z.ZodObject<{
|
|
|
17
18
|
resources?: ("Organization" | "Account" | "AllergyIntolerance" | "Appointment" | "AppointmentResponse" | "AuditEvent" | "Basic" | "BodyStructure" | "CarePlan" | "CareTeam" | "ChargeItem" | "Claim" | "ClaimResponse" | "ClinicalImpression" | "Communication" | "CommunicationRequest" | "Composition" | "Condition" | "Consent" | "Contract" | "Coverage" | "CoverageEligibilityRequest" | "CoverageEligibilityResponse" | "DetectedIssue" | "Device" | "DeviceRequest" | "DeviceUseStatement" | "DiagnosticReport" | "DocumentManifest" | "DocumentReference" | "Encounter" | "EnrollmentRequest" | "EpisodeOfCare" | "ExplanationOfBenefit" | "FamilyMemberHistory" | "Flag" | "Goal" | "GuidanceResponse" | "ImagingStudy" | "Immunization" | "ImmunizationEvaluation" | "ImmunizationRecommendation" | "Invoice" | "List" | "MeasureReport" | "Media" | "MedicationAdministration" | "MedicationDispense" | "MedicationRequest" | "MedicationStatement" | "MolecularSequence" | "NutritionOrder" | "Observation" | "Person" | "Procedure" | "Provenance" | "QuestionnaireResponse" | "RelatedPerson" | "RequestGroup" | "ResearchSubject" | "RiskAssessment" | "ServiceRequest" | "Specimen" | "AdverseEvent" | "Task" | "Location" | "Patient" | "Practitioner")[] | undefined;
|
|
18
19
|
dateFrom?: string | undefined;
|
|
19
20
|
dateTo?: string | undefined;
|
|
21
|
+
fromDashboard?: boolean | undefined;
|
|
20
22
|
}, {
|
|
21
23
|
requestId: string;
|
|
22
24
|
bundleLocation: string;
|
|
@@ -26,6 +28,7 @@ export declare const internalSendConsolidatedSchema: z.ZodObject<{
|
|
|
26
28
|
resources?: ("Organization" | "Account" | "AllergyIntolerance" | "Appointment" | "AppointmentResponse" | "AuditEvent" | "Basic" | "BodyStructure" | "CarePlan" | "CareTeam" | "ChargeItem" | "Claim" | "ClaimResponse" | "ClinicalImpression" | "Communication" | "CommunicationRequest" | "Composition" | "Condition" | "Consent" | "Contract" | "Coverage" | "CoverageEligibilityRequest" | "CoverageEligibilityResponse" | "DetectedIssue" | "Device" | "DeviceRequest" | "DeviceUseStatement" | "DiagnosticReport" | "DocumentManifest" | "DocumentReference" | "Encounter" | "EnrollmentRequest" | "EpisodeOfCare" | "ExplanationOfBenefit" | "FamilyMemberHistory" | "Flag" | "Goal" | "GuidanceResponse" | "ImagingStudy" | "Immunization" | "ImmunizationEvaluation" | "ImmunizationRecommendation" | "Invoice" | "List" | "MeasureReport" | "Media" | "MedicationAdministration" | "MedicationDispense" | "MedicationRequest" | "MedicationStatement" | "MolecularSequence" | "NutritionOrder" | "Observation" | "Person" | "Procedure" | "Provenance" | "QuestionnaireResponse" | "RelatedPerson" | "RequestGroup" | "ResearchSubject" | "RiskAssessment" | "ServiceRequest" | "Specimen" | "AdverseEvent" | "Task" | "Location" | "Patient" | "Practitioner")[] | undefined;
|
|
27
29
|
dateFrom?: string | undefined;
|
|
28
30
|
dateTo?: string | undefined;
|
|
31
|
+
fromDashboard?: boolean | undefined;
|
|
29
32
|
}>;
|
|
30
33
|
export type InternalSendConsolidated = z.infer<typeof internalSendConsolidatedSchema>;
|
|
31
34
|
//# sourceMappingURL=consolidated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidated.d.ts","sourceRoot":"","sources":["../../../src/interface/internal/consolidated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"consolidated.d.ts","sourceRoot":"","sources":["../../../src/interface/internal/consolidated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -12,5 +12,6 @@ exports.internalSendConsolidatedSchema = zod_1.z.object({
|
|
|
12
12
|
resources: zod_1.z.array(zod_1.z.enum(medical_1.resourceTypeForConsolidation)).optional(),
|
|
13
13
|
dateFrom: zod_1.z.string().optional(),
|
|
14
14
|
dateTo: zod_1.z.string().optional(),
|
|
15
|
+
fromDashboard: zod_1.z.boolean().optional(),
|
|
15
16
|
});
|
|
16
17
|
//# sourceMappingURL=consolidated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidated.js","sourceRoot":"","sources":["../../../src/interface/internal/consolidated.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2CAA0F;AAE7E,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,cAAc,EAAE,OAAC,CAAC,IAAI,CAAC,qCAA2B,CAAC,CAAC,QAAQ,EAAE;IAC9D,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,sCAA4B,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"consolidated.js","sourceRoot":"","sources":["../../../src/interface/internal/consolidated.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2CAA0F;AAE7E,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,cAAc,EAAE,OAAC,CAAC,IAAI,CAAC,qCAA2B,CAAC,CAAC,QAAQ,EAAE;IAC9D,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,sCAA4B,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC"}
|
|
@@ -32,12 +32,16 @@ export declare const baseWebhookMetadataSchema: z.ZodObject<{
|
|
|
32
32
|
when: string;
|
|
33
33
|
data?: unknown;
|
|
34
34
|
}>;
|
|
35
|
-
export declare const webhookMetadataSchema: z.ZodObject<{
|
|
36
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
35
|
+
export declare const webhookMetadataSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
37
36
|
messageId: z.ZodString;
|
|
38
37
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
38
|
+
/**
|
|
39
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
40
|
+
*/
|
|
41
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
42
|
+
}, {
|
|
39
43
|
type: z.ZodString;
|
|
40
|
-
}
|
|
44
|
+
}>, "strip", z.ZodTypeAny, {
|
|
41
45
|
type: string;
|
|
42
46
|
messageId: string;
|
|
43
47
|
when: string;
|
|
@@ -50,12 +54,16 @@ export declare const webhookMetadataSchema: z.ZodObject<{
|
|
|
50
54
|
}>;
|
|
51
55
|
export type WebhookMetadata = z.infer<typeof webhookMetadataSchema>;
|
|
52
56
|
export declare const pingWebhookRequestDataSchema: z.ZodObject<{
|
|
53
|
-
meta: z.ZodObject<{
|
|
54
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
57
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
55
58
|
messageId: z.ZodString;
|
|
56
59
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
60
|
+
/**
|
|
61
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
62
|
+
*/
|
|
63
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
64
|
+
}, {
|
|
57
65
|
type: z.ZodLiteral<"ping">;
|
|
58
|
-
}
|
|
66
|
+
}>, "strip", z.ZodTypeAny, {
|
|
59
67
|
type: "ping";
|
|
60
68
|
messageId: string;
|
|
61
69
|
when: string;
|
|
@@ -104,12 +112,16 @@ export declare const consolidatedWebhookPatientSchema: z.ZodObject<{
|
|
|
104
112
|
}>;
|
|
105
113
|
export type ConsolidatedWebhookPatient = z.infer<typeof consolidatedWebhookPatientSchema>;
|
|
106
114
|
export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
|
|
107
|
-
meta: z.ZodObject<{
|
|
108
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
115
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
109
116
|
messageId: z.ZodString;
|
|
110
117
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
118
|
+
/**
|
|
119
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
120
|
+
*/
|
|
121
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
122
|
+
}, {
|
|
111
123
|
type: z.ZodLiteral<"medical.consolidated-data">;
|
|
112
|
-
}
|
|
124
|
+
}>, "strip", z.ZodTypeAny, {
|
|
113
125
|
type: "medical.consolidated-data";
|
|
114
126
|
messageId: string;
|
|
115
127
|
when: string;
|
|
@@ -165,12 +177,16 @@ export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
|
|
|
165
177
|
}>;
|
|
166
178
|
export type ConsolidatedWebhookRequest = z.infer<typeof consolidatedWebhookRequestSchema>;
|
|
167
179
|
export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
|
|
168
|
-
meta: z.ZodObject<{
|
|
169
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
180
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
170
181
|
messageId: z.ZodString;
|
|
171
182
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
183
|
+
/**
|
|
184
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
185
|
+
*/
|
|
186
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
187
|
+
}, {
|
|
172
188
|
type: z.ZodLiteral<"medical.document-download">;
|
|
173
|
-
}
|
|
189
|
+
}>, "strip", z.ZodTypeAny, {
|
|
174
190
|
type: "medical.document-download";
|
|
175
191
|
messageId: string;
|
|
176
192
|
when: string;
|
|
@@ -198,12 +214,16 @@ export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
|
|
|
198
214
|
}>;
|
|
199
215
|
export type DocumentDownloadWebhookRequest = z.infer<typeof documentDownloadWebhookRequestSchema>;
|
|
200
216
|
export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
|
|
201
|
-
meta: z.ZodObject<{
|
|
202
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
217
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
203
218
|
messageId: z.ZodString;
|
|
204
219
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
220
|
+
/**
|
|
221
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
222
|
+
*/
|
|
223
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
224
|
+
}, {
|
|
205
225
|
type: z.ZodLiteral<"medical.document-conversion">;
|
|
206
|
-
}
|
|
226
|
+
}>, "strip", z.ZodTypeAny, {
|
|
207
227
|
type: "medical.document-conversion";
|
|
208
228
|
messageId: string;
|
|
209
229
|
when: string;
|
|
@@ -231,12 +251,16 @@ export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
|
|
|
231
251
|
}>;
|
|
232
252
|
export type DocumentConversionWebhookRequest = z.infer<typeof documentConversionWebhookRequestSchema>;
|
|
233
253
|
export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
|
|
234
|
-
meta: z.ZodObject<{
|
|
235
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
254
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
236
255
|
messageId: z.ZodString;
|
|
237
256
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
257
|
+
/**
|
|
258
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
259
|
+
*/
|
|
260
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
261
|
+
}, {
|
|
238
262
|
type: z.ZodLiteral<"medical.document-bulk-download-urls">;
|
|
239
|
-
}
|
|
263
|
+
}>, "strip", z.ZodTypeAny, {
|
|
240
264
|
type: "medical.document-bulk-download-urls";
|
|
241
265
|
messageId: string;
|
|
242
266
|
when: string;
|
|
@@ -264,12 +288,16 @@ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
|
|
|
264
288
|
}>;
|
|
265
289
|
export type DocumentBulkDownloadWebhookRequest = z.infer<typeof documentBulkDownloadWebhookRequestSchema>;
|
|
266
290
|
export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
267
|
-
meta: z.ZodObject<{
|
|
268
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
291
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
269
292
|
messageId: z.ZodString;
|
|
270
293
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
294
|
+
/**
|
|
295
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
296
|
+
*/
|
|
297
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
298
|
+
}, {
|
|
271
299
|
type: z.ZodLiteral<"ping">;
|
|
272
|
-
}
|
|
300
|
+
}>, "strip", z.ZodTypeAny, {
|
|
273
301
|
type: "ping";
|
|
274
302
|
messageId: string;
|
|
275
303
|
when: string;
|
|
@@ -298,12 +326,16 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
298
326
|
};
|
|
299
327
|
ping: string;
|
|
300
328
|
}>, z.ZodObject<{
|
|
301
|
-
meta: z.ZodObject<{
|
|
302
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
329
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
303
330
|
messageId: z.ZodString;
|
|
304
331
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
332
|
+
/**
|
|
333
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
334
|
+
*/
|
|
335
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
336
|
+
}, {
|
|
305
337
|
type: z.ZodLiteral<"medical.consolidated-data">;
|
|
306
|
-
}
|
|
338
|
+
}>, "strip", z.ZodTypeAny, {
|
|
307
339
|
type: "medical.consolidated-data";
|
|
308
340
|
messageId: string;
|
|
309
341
|
when: string;
|
|
@@ -357,12 +389,16 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
357
389
|
data?: unknown;
|
|
358
390
|
};
|
|
359
391
|
}>, z.ZodObject<{
|
|
360
|
-
meta: z.ZodObject<{
|
|
361
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
392
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
362
393
|
messageId: z.ZodString;
|
|
363
394
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
395
|
+
/**
|
|
396
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
397
|
+
*/
|
|
398
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
399
|
+
}, {
|
|
364
400
|
type: z.ZodLiteral<"medical.document-download">;
|
|
365
|
-
}
|
|
401
|
+
}>, "strip", z.ZodTypeAny, {
|
|
366
402
|
type: "medical.document-download";
|
|
367
403
|
messageId: string;
|
|
368
404
|
when: string;
|
|
@@ -388,12 +424,16 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
388
424
|
data?: unknown;
|
|
389
425
|
};
|
|
390
426
|
}>, z.ZodObject<{
|
|
391
|
-
meta: z.ZodObject<{
|
|
392
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
427
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
393
428
|
messageId: z.ZodString;
|
|
394
429
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
430
|
+
/**
|
|
431
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
432
|
+
*/
|
|
433
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
434
|
+
}, {
|
|
395
435
|
type: z.ZodLiteral<"medical.document-conversion">;
|
|
396
|
-
}
|
|
436
|
+
}>, "strip", z.ZodTypeAny, {
|
|
397
437
|
type: "medical.document-conversion";
|
|
398
438
|
messageId: string;
|
|
399
439
|
when: string;
|
|
@@ -419,12 +459,16 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
419
459
|
data?: unknown;
|
|
420
460
|
};
|
|
421
461
|
}>, z.ZodObject<{
|
|
422
|
-
meta: z.ZodObject<{
|
|
423
|
-
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
462
|
+
meta: z.ZodObject<z.objectUtil.extendShape<{
|
|
424
463
|
messageId: z.ZodString;
|
|
425
464
|
when: z.ZodEffects<z.ZodString, string, string>;
|
|
465
|
+
/**
|
|
466
|
+
* The metadata sent by the customer when they triggered the operation that resulted in this webhook.
|
|
467
|
+
*/
|
|
468
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
469
|
+
}, {
|
|
426
470
|
type: z.ZodLiteral<"medical.document-bulk-download-urls">;
|
|
427
|
-
}
|
|
471
|
+
}>, "strip", z.ZodTypeAny, {
|
|
428
472
|
type: "medical.document-bulk-download-urls";
|
|
429
473
|
messageId: string;
|
|
430
474
|
when: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-request.d.ts","sourceRoot":"","sources":["../../../src/medical/webhook/webhook-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,qBAAqB,sBAAoB,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B,2CAAyC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B,2CAAyC,CAAC;AACnF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF,eAAO,MAAM,8BAA8B,6CAA2C,CAAC;AACvF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE3F,eAAO,MAAM,gCAAgC,qDAAmD,CAAC;AACjG,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE/F,eAAO,MAAM,qBAAqB,2RAIK,CAAC;AACxC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,+TAAkD,CAAC;AACjF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,oBAAoB,+CAAgD,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,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CAAkC,CAKjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/shared",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6-alpha.0",
|
|
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/",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"ts-jest": "29.1.1",
|
|
84
84
|
"typescript": "^4.9.5"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "78d920b44a21342a1cf6469e228321a610c1740b"
|
|
87
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.test copy.d.ts","sourceRoot":"","sources":["../../../src/common/__tests__/string.test copy.ts"],"names":[],"mappings":""}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const faker_1 = require("@faker-js/faker");
|
|
4
|
-
const string_1 = require("../string");
|
|
5
|
-
describe("limitStringLength", () => {
|
|
6
|
-
it("returns undefined when it gets undefined", async () => {
|
|
7
|
-
const resp = (0, string_1.limitStringLength)(undefined);
|
|
8
|
-
expect(resp).toBeUndefined();
|
|
9
|
-
});
|
|
10
|
-
it("returns empty when it gets empty", async () => {
|
|
11
|
-
const expected = "";
|
|
12
|
-
const resp = (0, string_1.limitStringLength)(expected);
|
|
13
|
-
expect(resp).toEqual(expected);
|
|
14
|
-
});
|
|
15
|
-
it("returns input when it gets one char string", async () => {
|
|
16
|
-
const expected = faker_1.faker.string.alphanumeric(1);
|
|
17
|
-
const resp = (0, string_1.limitStringLength)(expected);
|
|
18
|
-
expect(resp).toEqual(expected);
|
|
19
|
-
});
|
|
20
|
-
it("returns input when it gets multiple char string", async () => {
|
|
21
|
-
const stringLength = faker_1.faker.number.int({ min: 2, max: 254 });
|
|
22
|
-
const expected = faker_1.faker.string.alphanumeric(stringLength);
|
|
23
|
-
const resp = (0, string_1.limitStringLength)(expected);
|
|
24
|
-
expect(resp).toEqual(expected);
|
|
25
|
-
});
|
|
26
|
-
it("returns input when it gets max char string", async () => {
|
|
27
|
-
const expected = faker_1.faker.string.alphanumeric(255);
|
|
28
|
-
const resp = (0, string_1.limitStringLength)(expected);
|
|
29
|
-
expect(resp).toEqual(expected);
|
|
30
|
-
});
|
|
31
|
-
it("does not cap string if length < suffix", async () => {
|
|
32
|
-
const expected = faker_1.faker.string.alphanumeric(2);
|
|
33
|
-
const resp = (0, string_1.limitStringLength)(expected, 1);
|
|
34
|
-
expect(resp).toEqual(expected);
|
|
35
|
-
});
|
|
36
|
-
it("caps string if length > max", async () => {
|
|
37
|
-
const expected = "123456";
|
|
38
|
-
const resp = (0, string_1.limitStringLength)(expected, 5);
|
|
39
|
-
expect(resp).not.toContain(expected);
|
|
40
|
-
expect(resp).toContain("12");
|
|
41
|
-
});
|
|
42
|
-
it("defaults max chars to 255", async () => {
|
|
43
|
-
const input = faker_1.faker.string.alphanumeric(256);
|
|
44
|
-
const expected = input.substring(0, 252) + "...";
|
|
45
|
-
const resp = (0, string_1.limitStringLength)(input);
|
|
46
|
-
expect(resp).toEqual(expected);
|
|
47
|
-
});
|
|
48
|
-
it("defaults suffix to three dots", async () => {
|
|
49
|
-
const expected = "123456";
|
|
50
|
-
const resp = (0, string_1.limitStringLength)(expected, 5);
|
|
51
|
-
expect(resp).not.toContain(expected);
|
|
52
|
-
expect(resp).toContain("12...");
|
|
53
|
-
});
|
|
54
|
-
it("uses custom suffix when provided", async () => {
|
|
55
|
-
const expected = "123456";
|
|
56
|
-
const customSuffix = "!!!";
|
|
57
|
-
const resp = (0, string_1.limitStringLength)(expected, 5, customSuffix);
|
|
58
|
-
expect(resp).not.toContain(expected);
|
|
59
|
-
expect(resp).toContain("12" + customSuffix);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=string.test%20copy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.test copy.js","sourceRoot":"","sources":["../../../src/common/__tests__/string.test copy.ts"],"names":[],"mappings":";;AAAA,2CAAwC;AACxC,sCAA8C;AAE9C,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QACxD,MAAM,IAAI,GAAG,IAAA,0BAAiB,EAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,IAAA,0BAAiB,EAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,QAAQ,GAAG,aAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAG,IAAA,0BAAiB,EAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,YAAY,GAAG,aAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,aAAK,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QACzD,MAAM,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