@metriport/commonwell-sdk 4.3.3 → 4.3.5

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 (57) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +40 -40
  3. package/lib/client/commonwell-api.d.ts +49 -49
  4. package/lib/client/commonwell-api.js +2 -2
  5. package/lib/client/commonwell.d.ts +425 -425
  6. package/lib/client/commonwell.js +739 -739
  7. package/lib/client/document.d.ts +7 -7
  8. package/lib/client/document.js +71 -71
  9. package/lib/common/commonwell-error.d.ts +12 -12
  10. package/lib/common/commonwell-error.js +34 -34
  11. package/lib/common/fileDownload.d.ts +11 -11
  12. package/lib/common/fileDownload.js +43 -43
  13. package/lib/common/make-jwt.d.ts +24 -24
  14. package/lib/common/make-jwt.js +90 -90
  15. package/lib/common/metriport-error.d.ts +4 -4
  16. package/lib/common/metriport-error.js +33 -33
  17. package/lib/common/util.d.ts +25 -25
  18. package/lib/common/util.js +70 -70
  19. package/lib/common/validate-npi.d.ts +9 -9
  20. package/lib/common/validate-npi.js +39 -39
  21. package/lib/index.d.ts +20 -20
  22. package/lib/index.js +54 -54
  23. package/lib/models/address.d.ts +50 -50
  24. package/lib/models/address.js +28 -28
  25. package/lib/models/certificates.d.ts +156 -156
  26. package/lib/models/certificates.js +26 -26
  27. package/lib/models/contact.d.ts +50 -50
  28. package/lib/models/contact.js +39 -39
  29. package/lib/models/demographics.d.ts +292 -292
  30. package/lib/models/demographics.js +34 -34
  31. package/lib/models/document.d.ts +4421 -4421
  32. package/lib/models/document.js +151 -151
  33. package/lib/models/enrollment-summary.d.ts +18 -18
  34. package/lib/models/enrollment-summary.js +14 -14
  35. package/lib/models/facility.d.ts +75 -75
  36. package/lib/models/facility.js +10 -10
  37. package/lib/models/human-name.d.ts +53 -53
  38. package/lib/models/human-name.js +37 -37
  39. package/lib/models/identifier.d.ts +79 -79
  40. package/lib/models/identifier.js +36 -36
  41. package/lib/models/iso-date.d.ts +3 -3
  42. package/lib/models/iso-date.js +6 -6
  43. package/lib/models/iso-datetime.d.ts +3 -3
  44. package/lib/models/iso-datetime.js +8 -8
  45. package/lib/models/link.d.ts +642 -642
  46. package/lib/models/link.js +50 -50
  47. package/lib/models/organization.d.ts +763 -763
  48. package/lib/models/organization.js +83 -83
  49. package/lib/models/patient.d.ts +3617 -3617
  50. package/lib/models/patient.js +49 -49
  51. package/lib/models/period.d.ts +12 -12
  52. package/lib/models/period.js +12 -12
  53. package/lib/models/person.d.ts +2440 -2440
  54. package/lib/models/person.js +39 -39
  55. package/lib/models/purpose-of-use.d.ts +29 -29
  56. package/lib/models/purpose-of-use.js +34 -34
  57. package/package.json +2 -2
@@ -1,29 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addressSchema = exports.addressUseCodesSchema = exports.AddressUseCodes = void 0;
4
- const zod_1 = require("zod");
5
- const period_1 = require("./period");
6
- // The use of an address. This value set defines its own terms in the
7
- // system http://hl7.org/fhir/address-use.
8
- // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c1-address-use-codes
9
- var AddressUseCodes;
10
- (function (AddressUseCodes) {
11
- AddressUseCodes["home"] = "home";
12
- AddressUseCodes["work"] = "work";
13
- AddressUseCodes["temp"] = "temp";
14
- AddressUseCodes["old"] = "old";
15
- AddressUseCodes["unspecified"] = "unspecified";
16
- })(AddressUseCodes = exports.AddressUseCodes || (exports.AddressUseCodes = {}));
17
- exports.addressUseCodesSchema = zod_1.z.enum(Object.keys(AddressUseCodes));
18
- // A postal address.
19
- // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.3 Address)
20
- exports.addressSchema = zod_1.z.object({
21
- use: exports.addressUseCodesSchema.optional().nullable(),
22
- line: zod_1.z.array(zod_1.z.string()).optional().nullable(),
23
- city: zod_1.z.string().optional().nullable(),
24
- state: zod_1.z.string().optional().nullable(),
25
- zip: zod_1.z.string(),
26
- country: zod_1.z.string().optional().nullable(),
27
- period: period_1.periodSchema.optional().nullable(),
28
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addressSchema = exports.addressUseCodesSchema = exports.AddressUseCodes = void 0;
4
+ const zod_1 = require("zod");
5
+ const period_1 = require("./period");
6
+ // The use of an address. This value set defines its own terms in the
7
+ // system http://hl7.org/fhir/address-use.
8
+ // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c1-address-use-codes
9
+ var AddressUseCodes;
10
+ (function (AddressUseCodes) {
11
+ AddressUseCodes["home"] = "home";
12
+ AddressUseCodes["work"] = "work";
13
+ AddressUseCodes["temp"] = "temp";
14
+ AddressUseCodes["old"] = "old";
15
+ AddressUseCodes["unspecified"] = "unspecified";
16
+ })(AddressUseCodes = exports.AddressUseCodes || (exports.AddressUseCodes = {}));
17
+ exports.addressUseCodesSchema = zod_1.z.enum(Object.keys(AddressUseCodes));
18
+ // A postal address.
19
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.3 Address)
20
+ exports.addressSchema = zod_1.z.object({
21
+ use: exports.addressUseCodesSchema.optional().nullable(),
22
+ line: zod_1.z.array(zod_1.z.string()).optional().nullable(),
23
+ city: zod_1.z.string().optional().nullable(),
24
+ state: zod_1.z.string().optional().nullable(),
25
+ zip: zod_1.z.string(),
26
+ country: zod_1.z.string().optional().nullable(),
27
+ period: period_1.periodSchema.optional().nullable(),
28
+ });
29
29
  //# sourceMappingURL=address.js.map
@@ -1,156 +1,156 @@
1
- import { z } from "zod";
2
- export declare enum CertificatePurpose {
3
- Signing = "Signing",
4
- Authentication = "Authentication"
5
- }
6
- export declare const certificatePurposeSchema: z.ZodEnum<[string, ...string[]]>;
7
- export declare const certificateSchema: z.ZodObject<{
8
- startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
9
- endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
- expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
- thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
- content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
- purpose: z.ZodEnum<[string, ...string[]]>;
14
- }, "strip", z.ZodTypeAny, {
15
- purpose: string;
16
- startDate?: string | null | undefined;
17
- endDate?: string | null | undefined;
18
- expirationDate?: string | null | undefined;
19
- thumbprint?: string | null | undefined;
20
- content?: string | null | undefined;
21
- }, {
22
- purpose: string;
23
- startDate?: string | null | undefined;
24
- endDate?: string | null | undefined;
25
- expirationDate?: string | null | undefined;
26
- thumbprint?: string | null | undefined;
27
- content?: string | null | undefined;
28
- }>;
29
- export type Certificate = z.infer<typeof certificateSchema>;
30
- export declare const certificatesParamSchema: z.ZodObject<{
31
- Certificates: z.ZodArray<z.ZodObject<{
32
- startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
33
- endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
- expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
- thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
36
- content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
- purpose: z.ZodEnum<[string, ...string[]]>;
38
- }, "strip", z.ZodTypeAny, {
39
- purpose: string;
40
- startDate?: string | null | undefined;
41
- endDate?: string | null | undefined;
42
- expirationDate?: string | null | undefined;
43
- thumbprint?: string | null | undefined;
44
- content?: string | null | undefined;
45
- }, {
46
- purpose: string;
47
- startDate?: string | null | undefined;
48
- endDate?: string | null | undefined;
49
- expirationDate?: string | null | undefined;
50
- thumbprint?: string | null | undefined;
51
- content?: string | null | undefined;
52
- }>, "many">;
53
- }, "strip", z.ZodTypeAny, {
54
- Certificates: {
55
- purpose: string;
56
- startDate?: string | null | undefined;
57
- endDate?: string | null | undefined;
58
- expirationDate?: string | null | undefined;
59
- thumbprint?: string | null | undefined;
60
- content?: string | null | undefined;
61
- }[];
62
- }, {
63
- Certificates: {
64
- purpose: string;
65
- startDate?: string | null | undefined;
66
- endDate?: string | null | undefined;
67
- expirationDate?: string | null | undefined;
68
- thumbprint?: string | null | undefined;
69
- content?: string | null | undefined;
70
- }[];
71
- }>;
72
- export type CertificateParam = z.infer<typeof certificatesParamSchema>;
73
- export declare const certificateRespSchema: z.ZodObject<{
74
- certificates: z.ZodArray<z.ZodObject<{
75
- startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
- endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
- expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
78
- thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
79
- content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
80
- purpose: z.ZodEnum<[string, ...string[]]>;
81
- }, "strip", z.ZodTypeAny, {
82
- purpose: string;
83
- startDate?: string | null | undefined;
84
- endDate?: string | null | undefined;
85
- expirationDate?: string | null | undefined;
86
- thumbprint?: string | null | undefined;
87
- content?: string | null | undefined;
88
- }, {
89
- purpose: string;
90
- startDate?: string | null | undefined;
91
- endDate?: string | null | undefined;
92
- expirationDate?: string | null | undefined;
93
- thumbprint?: string | null | undefined;
94
- content?: string | null | undefined;
95
- }>, "many">;
96
- _links: z.ZodObject<{
97
- self: z.ZodNullable<z.ZodOptional<z.ZodObject<{
98
- href: z.ZodNullable<z.ZodOptional<z.ZodString>>;
99
- templated: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
100
- type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
101
- }, "strip", z.ZodTypeAny, {
102
- href?: string | null | undefined;
103
- templated?: boolean | null | undefined;
104
- type?: string | null | undefined;
105
- }, {
106
- href?: string | null | undefined;
107
- templated?: boolean | null | undefined;
108
- type?: string | null | undefined;
109
- }>>>;
110
- }, "strip", z.ZodTypeAny, {
111
- self?: {
112
- href?: string | null | undefined;
113
- templated?: boolean | null | undefined;
114
- type?: string | null | undefined;
115
- } | null | undefined;
116
- }, {
117
- self?: {
118
- href?: string | null | undefined;
119
- templated?: boolean | null | undefined;
120
- type?: string | null | undefined;
121
- } | null | undefined;
122
- }>;
123
- }, "strip", z.ZodTypeAny, {
124
- _links: {
125
- self?: {
126
- href?: string | null | undefined;
127
- templated?: boolean | null | undefined;
128
- type?: string | null | undefined;
129
- } | null | undefined;
130
- };
131
- certificates: {
132
- purpose: string;
133
- startDate?: string | null | undefined;
134
- endDate?: string | null | undefined;
135
- expirationDate?: string | null | undefined;
136
- thumbprint?: string | null | undefined;
137
- content?: string | null | undefined;
138
- }[];
139
- }, {
140
- _links: {
141
- self?: {
142
- href?: string | null | undefined;
143
- templated?: boolean | null | undefined;
144
- type?: string | null | undefined;
145
- } | null | undefined;
146
- };
147
- certificates: {
148
- purpose: string;
149
- startDate?: string | null | undefined;
150
- endDate?: string | null | undefined;
151
- expirationDate?: string | null | undefined;
152
- thumbprint?: string | null | undefined;
153
- content?: string | null | undefined;
154
- }[];
155
- }>;
156
- export type CertificateResp = z.infer<typeof certificateRespSchema>;
1
+ import { z } from "zod";
2
+ export declare enum CertificatePurpose {
3
+ Signing = "Signing",
4
+ Authentication = "Authentication"
5
+ }
6
+ export declare const certificatePurposeSchema: z.ZodEnum<[string, ...string[]]>;
7
+ export declare const certificateSchema: z.ZodObject<{
8
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
9
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
+ purpose: z.ZodEnum<[string, ...string[]]>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ purpose: string;
16
+ startDate?: string | null | undefined;
17
+ endDate?: string | null | undefined;
18
+ expirationDate?: string | null | undefined;
19
+ thumbprint?: string | null | undefined;
20
+ content?: string | null | undefined;
21
+ }, {
22
+ purpose: string;
23
+ startDate?: string | null | undefined;
24
+ endDate?: string | null | undefined;
25
+ expirationDate?: string | null | undefined;
26
+ thumbprint?: string | null | undefined;
27
+ content?: string | null | undefined;
28
+ }>;
29
+ export type Certificate = z.infer<typeof certificateSchema>;
30
+ export declare const certificatesParamSchema: z.ZodObject<{
31
+ Certificates: z.ZodArray<z.ZodObject<{
32
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
33
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
36
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
+ purpose: z.ZodEnum<[string, ...string[]]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ purpose: string;
40
+ startDate?: string | null | undefined;
41
+ endDate?: string | null | undefined;
42
+ expirationDate?: string | null | undefined;
43
+ thumbprint?: string | null | undefined;
44
+ content?: string | null | undefined;
45
+ }, {
46
+ purpose: string;
47
+ startDate?: string | null | undefined;
48
+ endDate?: string | null | undefined;
49
+ expirationDate?: string | null | undefined;
50
+ thumbprint?: string | null | undefined;
51
+ content?: string | null | undefined;
52
+ }>, "many">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ Certificates: {
55
+ purpose: string;
56
+ startDate?: string | null | undefined;
57
+ endDate?: string | null | undefined;
58
+ expirationDate?: string | null | undefined;
59
+ thumbprint?: string | null | undefined;
60
+ content?: string | null | undefined;
61
+ }[];
62
+ }, {
63
+ Certificates: {
64
+ purpose: string;
65
+ startDate?: string | null | undefined;
66
+ endDate?: string | null | undefined;
67
+ expirationDate?: string | null | undefined;
68
+ thumbprint?: string | null | undefined;
69
+ content?: string | null | undefined;
70
+ }[];
71
+ }>;
72
+ export type CertificateParam = z.infer<typeof certificatesParamSchema>;
73
+ export declare const certificateRespSchema: z.ZodObject<{
74
+ certificates: z.ZodArray<z.ZodObject<{
75
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
+ expirationDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
78
+ thumbprint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
79
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
80
+ purpose: z.ZodEnum<[string, ...string[]]>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ purpose: string;
83
+ startDate?: string | null | undefined;
84
+ endDate?: string | null | undefined;
85
+ expirationDate?: string | null | undefined;
86
+ thumbprint?: string | null | undefined;
87
+ content?: string | null | undefined;
88
+ }, {
89
+ purpose: string;
90
+ startDate?: string | null | undefined;
91
+ endDate?: string | null | undefined;
92
+ expirationDate?: string | null | undefined;
93
+ thumbprint?: string | null | undefined;
94
+ content?: string | null | undefined;
95
+ }>, "many">;
96
+ _links: z.ZodObject<{
97
+ self: z.ZodNullable<z.ZodOptional<z.ZodObject<{
98
+ href: z.ZodNullable<z.ZodOptional<z.ZodString>>;
99
+ templated: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
100
+ type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ href?: string | null | undefined;
103
+ templated?: boolean | null | undefined;
104
+ type?: string | null | undefined;
105
+ }, {
106
+ href?: string | null | undefined;
107
+ templated?: boolean | null | undefined;
108
+ type?: string | null | undefined;
109
+ }>>>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ self?: {
112
+ href?: string | null | undefined;
113
+ templated?: boolean | null | undefined;
114
+ type?: string | null | undefined;
115
+ } | null | undefined;
116
+ }, {
117
+ self?: {
118
+ href?: string | null | undefined;
119
+ templated?: boolean | null | undefined;
120
+ type?: string | null | undefined;
121
+ } | null | undefined;
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ _links: {
125
+ self?: {
126
+ href?: string | null | undefined;
127
+ templated?: boolean | null | undefined;
128
+ type?: string | null | undefined;
129
+ } | null | undefined;
130
+ };
131
+ certificates: {
132
+ purpose: string;
133
+ startDate?: string | null | undefined;
134
+ endDate?: string | null | undefined;
135
+ expirationDate?: string | null | undefined;
136
+ thumbprint?: string | null | undefined;
137
+ content?: string | null | undefined;
138
+ }[];
139
+ }, {
140
+ _links: {
141
+ self?: {
142
+ href?: string | null | undefined;
143
+ templated?: boolean | null | undefined;
144
+ type?: string | null | undefined;
145
+ } | null | undefined;
146
+ };
147
+ certificates: {
148
+ purpose: string;
149
+ startDate?: string | null | undefined;
150
+ endDate?: string | null | undefined;
151
+ expirationDate?: string | null | undefined;
152
+ thumbprint?: string | null | undefined;
153
+ content?: string | null | undefined;
154
+ }[];
155
+ }>;
156
+ export type CertificateResp = z.infer<typeof certificateRespSchema>;
@@ -1,27 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.certificateRespSchema = exports.certificatesParamSchema = exports.certificateSchema = exports.certificatePurposeSchema = exports.CertificatePurpose = void 0;
4
- const zod_1 = require("zod");
5
- const link_1 = require("./link");
6
- var CertificatePurpose;
7
- (function (CertificatePurpose) {
8
- CertificatePurpose["Signing"] = "Signing";
9
- CertificatePurpose["Authentication"] = "Authentication";
10
- })(CertificatePurpose = exports.CertificatePurpose || (exports.CertificatePurpose = {}));
11
- exports.certificatePurposeSchema = zod_1.z.enum(Object.keys(CertificatePurpose));
12
- exports.certificateSchema = zod_1.z.object({
13
- startDate: zod_1.z.string().optional().nullable(),
14
- endDate: zod_1.z.string().optional().nullable(),
15
- expirationDate: zod_1.z.string().optional().nullable(),
16
- thumbprint: zod_1.z.string().optional().nullable(),
17
- content: zod_1.z.string().optional().nullable(),
18
- purpose: exports.certificatePurposeSchema,
19
- });
20
- exports.certificatesParamSchema = zod_1.z.object({
21
- Certificates: zod_1.z.array(exports.certificateSchema),
22
- });
23
- exports.certificateRespSchema = zod_1.z.object({
24
- certificates: zod_1.z.array(exports.certificateSchema),
25
- _links: zod_1.z.object({ self: link_1.linkSchema.optional().nullable() }),
26
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.certificateRespSchema = exports.certificatesParamSchema = exports.certificateSchema = exports.certificatePurposeSchema = exports.CertificatePurpose = void 0;
4
+ const zod_1 = require("zod");
5
+ const link_1 = require("./link");
6
+ var CertificatePurpose;
7
+ (function (CertificatePurpose) {
8
+ CertificatePurpose["Signing"] = "Signing";
9
+ CertificatePurpose["Authentication"] = "Authentication";
10
+ })(CertificatePurpose = exports.CertificatePurpose || (exports.CertificatePurpose = {}));
11
+ exports.certificatePurposeSchema = zod_1.z.enum(Object.keys(CertificatePurpose));
12
+ exports.certificateSchema = zod_1.z.object({
13
+ startDate: zod_1.z.string().optional().nullable(),
14
+ endDate: zod_1.z.string().optional().nullable(),
15
+ expirationDate: zod_1.z.string().optional().nullable(),
16
+ thumbprint: zod_1.z.string().optional().nullable(),
17
+ content: zod_1.z.string().optional().nullable(),
18
+ purpose: exports.certificatePurposeSchema,
19
+ });
20
+ exports.certificatesParamSchema = zod_1.z.object({
21
+ Certificates: zod_1.z.array(exports.certificateSchema),
22
+ });
23
+ exports.certificateRespSchema = zod_1.z.object({
24
+ certificates: zod_1.z.array(exports.certificateSchema),
25
+ _links: zod_1.z.object({ self: link_1.linkSchema.optional().nullable() }),
26
+ });
27
27
  //# sourceMappingURL=certificates.js.map
@@ -1,50 +1,50 @@
1
- import { z } from "zod";
2
- export declare enum ContactUseCodes {
3
- usual = "usual",
4
- home = "home",
5
- work = "work",
6
- temp = "temp",
7
- old = "old",
8
- mobile = "mobile",
9
- unspecified = "unspecified"
10
- }
11
- export declare const contactUseCodesSchema: z.ZodEnum<[string, ...string[]]>;
12
- export declare enum ContactSystemCodes {
13
- phone = "phone",
14
- fax = "fax",
15
- email = "email",
16
- url = "url"
17
- }
18
- export declare const contactSystemCodesSchema: z.ZodEnum<[string, ...string[]]>;
19
- export declare const contactSchema: z.ZodObject<{
20
- use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
21
- system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
- value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
- period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
24
- start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
25
- end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
26
- }, "strip", z.ZodTypeAny, {
27
- start?: string | undefined;
28
- end?: string | undefined;
29
- }, {
30
- start?: string | undefined;
31
- end?: string | undefined;
32
- }>>>;
33
- }, "strip", z.ZodTypeAny, {
34
- use?: string | null | undefined;
35
- system?: string | null | undefined;
36
- value?: string | null | undefined;
37
- period?: {
38
- start?: string | undefined;
39
- end?: string | undefined;
40
- } | null | undefined;
41
- }, {
42
- use?: string | null | undefined;
43
- system?: string | null | undefined;
44
- value?: string | null | undefined;
45
- period?: {
46
- start?: string | undefined;
47
- end?: string | undefined;
48
- } | null | undefined;
49
- }>;
50
- export type Contact = z.infer<typeof contactSchema>;
1
+ import { z } from "zod";
2
+ export declare enum ContactUseCodes {
3
+ usual = "usual",
4
+ home = "home",
5
+ work = "work",
6
+ temp = "temp",
7
+ old = "old",
8
+ mobile = "mobile",
9
+ unspecified = "unspecified"
10
+ }
11
+ export declare const contactUseCodesSchema: z.ZodEnum<[string, ...string[]]>;
12
+ export declare enum ContactSystemCodes {
13
+ phone = "phone",
14
+ fax = "fax",
15
+ email = "email",
16
+ url = "url"
17
+ }
18
+ export declare const contactSystemCodesSchema: z.ZodEnum<[string, ...string[]]>;
19
+ export declare const contactSchema: z.ZodObject<{
20
+ use: z.ZodNullable<z.ZodOptional<z.ZodEnum<[string, ...string[]]>>>;
21
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
+ value: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
+ period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
24
+ start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
25
+ end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ start?: string | undefined;
28
+ end?: string | undefined;
29
+ }, {
30
+ start?: string | undefined;
31
+ end?: string | undefined;
32
+ }>>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ use?: string | null | undefined;
35
+ system?: string | null | undefined;
36
+ value?: string | null | undefined;
37
+ period?: {
38
+ start?: string | undefined;
39
+ end?: string | undefined;
40
+ } | null | undefined;
41
+ }, {
42
+ use?: string | null | undefined;
43
+ system?: string | null | undefined;
44
+ value?: string | null | undefined;
45
+ period?: {
46
+ start?: string | undefined;
47
+ end?: string | undefined;
48
+ } | null | undefined;
49
+ }>;
50
+ export type Contact = z.infer<typeof contactSchema>;
@@ -1,40 +1,40 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contactSchema = exports.contactSystemCodesSchema = exports.ContactSystemCodes = exports.contactUseCodesSchema = exports.ContactUseCodes = void 0;
4
- const zod_1 = require("zod");
5
- const period_1 = require("./period");
6
- // How to use the contact/address. This value set defines its own terms in
7
- // the system http://hl7.org/fhir/R4/valueset-contact-point-use.html.
8
- // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c4-contact-use-codes
9
- var ContactUseCodes;
10
- (function (ContactUseCodes) {
11
- ContactUseCodes["usual"] = "usual";
12
- ContactUseCodes["home"] = "home";
13
- ContactUseCodes["work"] = "work";
14
- ContactUseCodes["temp"] = "temp";
15
- ContactUseCodes["old"] = "old";
16
- ContactUseCodes["mobile"] = "mobile";
17
- ContactUseCodes["unspecified"] = "unspecified";
18
- })(ContactUseCodes = exports.ContactUseCodes || (exports.ContactUseCodes = {}));
19
- exports.contactUseCodesSchema = zod_1.z.enum(Object.keys(ContactUseCodes));
20
- // Describes the kind of contact. This value set defines its own terms in the
21
- // system http://hl7.org/fhir/R4/valueset-contact-point-system.html.
22
- // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c3-contact-system-codes
23
- var ContactSystemCodes;
24
- (function (ContactSystemCodes) {
25
- ContactSystemCodes["phone"] = "phone";
26
- ContactSystemCodes["fax"] = "fax";
27
- ContactSystemCodes["email"] = "email";
28
- ContactSystemCodes["url"] = "url";
29
- })(ContactSystemCodes = exports.ContactSystemCodes || (exports.ContactSystemCodes = {}));
30
- exports.contactSystemCodesSchema = zod_1.z.enum(Object.keys(ContactSystemCodes));
31
- // A variety of technology-mediated contact details for a person or organization, including
32
- // telephone, email, etc.
33
- // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.7 Contact)
34
- exports.contactSchema = zod_1.z.object({
35
- use: exports.contactUseCodesSchema.optional().nullable(),
36
- system: zod_1.z.string().optional().nullable(),
37
- value: zod_1.z.string().optional().nullable(),
38
- period: period_1.periodSchema.optional().nullable(),
39
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contactSchema = exports.contactSystemCodesSchema = exports.ContactSystemCodes = exports.contactUseCodesSchema = exports.ContactUseCodes = void 0;
4
+ const zod_1 = require("zod");
5
+ const period_1 = require("./period");
6
+ // How to use the contact/address. This value set defines its own terms in
7
+ // the system http://hl7.org/fhir/R4/valueset-contact-point-use.html.
8
+ // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c4-contact-use-codes
9
+ var ContactUseCodes;
10
+ (function (ContactUseCodes) {
11
+ ContactUseCodes["usual"] = "usual";
12
+ ContactUseCodes["home"] = "home";
13
+ ContactUseCodes["work"] = "work";
14
+ ContactUseCodes["temp"] = "temp";
15
+ ContactUseCodes["old"] = "old";
16
+ ContactUseCodes["mobile"] = "mobile";
17
+ ContactUseCodes["unspecified"] = "unspecified";
18
+ })(ContactUseCodes = exports.ContactUseCodes || (exports.ContactUseCodes = {}));
19
+ exports.contactUseCodesSchema = zod_1.z.enum(Object.keys(ContactUseCodes));
20
+ // Describes the kind of contact. This value set defines its own terms in the
21
+ // system http://hl7.org/fhir/R4/valueset-contact-point-system.html.
22
+ // See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c3-contact-system-codes
23
+ var ContactSystemCodes;
24
+ (function (ContactSystemCodes) {
25
+ ContactSystemCodes["phone"] = "phone";
26
+ ContactSystemCodes["fax"] = "fax";
27
+ ContactSystemCodes["email"] = "email";
28
+ ContactSystemCodes["url"] = "url";
29
+ })(ContactSystemCodes = exports.ContactSystemCodes || (exports.ContactSystemCodes = {}));
30
+ exports.contactSystemCodesSchema = zod_1.z.enum(Object.keys(ContactSystemCodes));
31
+ // A variety of technology-mediated contact details for a person or organization, including
32
+ // telephone, email, etc.
33
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.7 Contact)
34
+ exports.contactSchema = zod_1.z.object({
35
+ use: exports.contactUseCodesSchema.optional().nullable(),
36
+ system: zod_1.z.string().optional().nullable(),
37
+ value: zod_1.z.string().optional().nullable(),
38
+ period: period_1.periodSchema.optional().nullable(),
39
+ });
40
40
  //# sourceMappingURL=contact.js.map