@metriport/commonwell-sdk 4.3.3 → 4.3.4
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/LICENSE +20 -20
- package/README.md +40 -40
- package/lib/client/commonwell-api.d.ts +49 -49
- package/lib/client/commonwell-api.js +2 -2
- package/lib/client/commonwell.d.ts +425 -425
- package/lib/client/commonwell.js +739 -739
- package/lib/client/document.d.ts +7 -7
- package/lib/client/document.js +71 -71
- package/lib/common/commonwell-error.d.ts +12 -12
- package/lib/common/commonwell-error.js +34 -34
- package/lib/common/fileDownload.d.ts +11 -11
- package/lib/common/fileDownload.js +43 -43
- package/lib/common/make-jwt.d.ts +24 -24
- package/lib/common/make-jwt.js +90 -90
- package/lib/common/metriport-error.d.ts +4 -4
- package/lib/common/metriport-error.js +33 -33
- package/lib/common/util.d.ts +25 -25
- package/lib/common/util.js +70 -70
- package/lib/common/validate-npi.d.ts +9 -9
- package/lib/common/validate-npi.js +39 -39
- package/lib/index.d.ts +20 -20
- package/lib/index.js +54 -54
- package/lib/models/address.d.ts +50 -50
- package/lib/models/address.js +28 -28
- package/lib/models/certificates.d.ts +156 -156
- package/lib/models/certificates.js +26 -26
- package/lib/models/contact.d.ts +50 -50
- package/lib/models/contact.js +39 -39
- package/lib/models/demographics.d.ts +292 -292
- package/lib/models/demographics.js +34 -34
- package/lib/models/document.d.ts +4421 -4421
- package/lib/models/document.js +151 -151
- package/lib/models/enrollment-summary.d.ts +18 -18
- package/lib/models/enrollment-summary.js +14 -14
- package/lib/models/facility.d.ts +75 -75
- package/lib/models/facility.js +10 -10
- package/lib/models/human-name.d.ts +53 -53
- package/lib/models/human-name.js +37 -37
- package/lib/models/identifier.d.ts +79 -79
- package/lib/models/identifier.js +36 -36
- package/lib/models/iso-date.d.ts +3 -3
- package/lib/models/iso-date.js +6 -6
- package/lib/models/iso-datetime.d.ts +3 -3
- package/lib/models/iso-datetime.js +8 -8
- package/lib/models/link.d.ts +642 -642
- package/lib/models/link.js +50 -50
- package/lib/models/organization.d.ts +763 -763
- package/lib/models/organization.js +83 -83
- package/lib/models/patient.d.ts +3617 -3617
- package/lib/models/patient.js +49 -49
- package/lib/models/period.d.ts +12 -12
- package/lib/models/period.js +12 -12
- package/lib/models/person.d.ts +2440 -2440
- package/lib/models/person.js +39 -39
- package/lib/models/purpose-of-use.d.ts +29 -29
- package/lib/models/purpose-of-use.js +34 -34
- package/package.json +2 -2
package/lib/models/human-name.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanNameSchema = exports.nameUseCodesSchema = exports.NameUseCodes = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const period_1 = require("./period");
|
|
6
|
-
// The value set definition for use of a human name. This value set defines its own
|
|
7
|
-
// terms in the system http://hl7.org/fhir/R4/valueset-name-use.html.
|
|
8
|
-
// See https://specification.commonwellalliance.org/appendix/terminology-bindings#c9-name-use-codes
|
|
9
|
-
var NameUseCodes;
|
|
10
|
-
(function (NameUseCodes) {
|
|
11
|
-
NameUseCodes["usual"] = "usual";
|
|
12
|
-
NameUseCodes["official"] = "official";
|
|
13
|
-
NameUseCodes["temp"] = "temp";
|
|
14
|
-
NameUseCodes["nickname"] = "nickname";
|
|
15
|
-
NameUseCodes["anonymous"] = "anonymous";
|
|
16
|
-
NameUseCodes["old"] = "old";
|
|
17
|
-
NameUseCodes["maiden"] = "maiden";
|
|
18
|
-
NameUseCodes["unspecified"] = "unspecified";
|
|
19
|
-
})(NameUseCodes = exports.NameUseCodes || (exports.NameUseCodes = {}));
|
|
20
|
-
exports.nameUseCodesSchema = zod_1.z.enum(Object.keys(NameUseCodes));
|
|
21
|
-
// A name of a Person with text, parts and usage information.
|
|
22
|
-
// Names may be changed or repudiated. People may have different names in different contexts.
|
|
23
|
-
// Names may be divided into parts of different type that have variable significance
|
|
24
|
-
// depending on context, though the division into parts does not always matter. With personal
|
|
25
|
-
// names, the different parts may or may not be imbued with some implicit meaning; various
|
|
26
|
-
// cultures associate different importance with the name parts and the degree to which systems
|
|
27
|
-
// must care about name parts around the world varies widely.
|
|
28
|
-
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.10 HumanName)
|
|
29
|
-
exports.humanNameSchema = zod_1.z.object({
|
|
30
|
-
use: exports.nameUseCodesSchema.optional().nullable(),
|
|
31
|
-
text: zod_1.z.string().optional().nullable(),
|
|
32
|
-
family: zod_1.z.array(zod_1.z.string()),
|
|
33
|
-
given: zod_1.z.array(zod_1.z.string()).optional(),
|
|
34
|
-
prefix: zod_1.z.string().or(zod_1.z.array(zod_1.z.string())).optional().nullable(),
|
|
35
|
-
suffix: zod_1.z.string().optional().nullable(),
|
|
36
|
-
period: period_1.periodSchema.optional().nullable(),
|
|
37
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.humanNameSchema = exports.nameUseCodesSchema = exports.NameUseCodes = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const period_1 = require("./period");
|
|
6
|
+
// The value set definition for use of a human name. This value set defines its own
|
|
7
|
+
// terms in the system http://hl7.org/fhir/R4/valueset-name-use.html.
|
|
8
|
+
// See https://specification.commonwellalliance.org/appendix/terminology-bindings#c9-name-use-codes
|
|
9
|
+
var NameUseCodes;
|
|
10
|
+
(function (NameUseCodes) {
|
|
11
|
+
NameUseCodes["usual"] = "usual";
|
|
12
|
+
NameUseCodes["official"] = "official";
|
|
13
|
+
NameUseCodes["temp"] = "temp";
|
|
14
|
+
NameUseCodes["nickname"] = "nickname";
|
|
15
|
+
NameUseCodes["anonymous"] = "anonymous";
|
|
16
|
+
NameUseCodes["old"] = "old";
|
|
17
|
+
NameUseCodes["maiden"] = "maiden";
|
|
18
|
+
NameUseCodes["unspecified"] = "unspecified";
|
|
19
|
+
})(NameUseCodes = exports.NameUseCodes || (exports.NameUseCodes = {}));
|
|
20
|
+
exports.nameUseCodesSchema = zod_1.z.enum(Object.keys(NameUseCodes));
|
|
21
|
+
// A name of a Person with text, parts and usage information.
|
|
22
|
+
// Names may be changed or repudiated. People may have different names in different contexts.
|
|
23
|
+
// Names may be divided into parts of different type that have variable significance
|
|
24
|
+
// depending on context, though the division into parts does not always matter. With personal
|
|
25
|
+
// names, the different parts may or may not be imbued with some implicit meaning; various
|
|
26
|
+
// cultures associate different importance with the name parts and the degree to which systems
|
|
27
|
+
// must care about name parts around the world varies widely.
|
|
28
|
+
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.10 HumanName)
|
|
29
|
+
exports.humanNameSchema = zod_1.z.object({
|
|
30
|
+
use: exports.nameUseCodesSchema.optional().nullable(),
|
|
31
|
+
text: zod_1.z.string().optional().nullable(),
|
|
32
|
+
family: zod_1.z.array(zod_1.z.string()),
|
|
33
|
+
given: zod_1.z.array(zod_1.z.string()).optional(),
|
|
34
|
+
prefix: zod_1.z.string().or(zod_1.z.array(zod_1.z.string())).optional().nullable(),
|
|
35
|
+
suffix: zod_1.z.string().optional().nullable(),
|
|
36
|
+
period: period_1.periodSchema.optional().nullable(),
|
|
37
|
+
});
|
|
38
38
|
//# sourceMappingURL=human-name.js.map
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const identifierUseCodesSchema: z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>;
|
|
3
|
-
export type IdentifierUseCodes = z.infer<typeof identifierUseCodesSchema>;
|
|
4
|
-
export declare const identifierSchema: z.ZodObject<{
|
|
5
|
-
system: z.ZodString;
|
|
6
|
-
key: z.ZodString;
|
|
7
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
8
|
-
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
10
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
11
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
start?: string | undefined;
|
|
14
|
-
end?: string | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
start?: string | undefined;
|
|
17
|
-
end?: string | undefined;
|
|
18
|
-
}>>>;
|
|
19
|
-
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
system: string;
|
|
22
|
-
key: string;
|
|
23
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
24
|
-
label?: string | null | undefined;
|
|
25
|
-
period?: {
|
|
26
|
-
start?: string | undefined;
|
|
27
|
-
end?: string | undefined;
|
|
28
|
-
} | null | undefined;
|
|
29
|
-
assigner?: string | null | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
system: string;
|
|
32
|
-
key: string;
|
|
33
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
34
|
-
label?: string | null | undefined;
|
|
35
|
-
period?: {
|
|
36
|
-
start?: string | undefined;
|
|
37
|
-
end?: string | undefined;
|
|
38
|
-
} | null | undefined;
|
|
39
|
-
assigner?: string | null | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
export type Identifier = z.infer<typeof identifierSchema>;
|
|
42
|
-
export declare const strongIdSchema: z.ZodObject<{
|
|
43
|
-
system: z.ZodString;
|
|
44
|
-
key: z.ZodString;
|
|
45
|
-
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
46
|
-
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
-
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
48
|
-
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
49
|
-
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
start?: string | undefined;
|
|
52
|
-
end?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
start?: string | undefined;
|
|
55
|
-
end?: string | undefined;
|
|
56
|
-
}>>>;
|
|
57
|
-
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
system: string;
|
|
60
|
-
key: string;
|
|
61
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
62
|
-
label?: string | null | undefined;
|
|
63
|
-
period?: {
|
|
64
|
-
start?: string | undefined;
|
|
65
|
-
end?: string | undefined;
|
|
66
|
-
} | null | undefined;
|
|
67
|
-
assigner?: string | null | undefined;
|
|
68
|
-
}, {
|
|
69
|
-
system: string;
|
|
70
|
-
key: string;
|
|
71
|
-
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
72
|
-
label?: string | null | undefined;
|
|
73
|
-
period?: {
|
|
74
|
-
start?: string | undefined;
|
|
75
|
-
end?: string | undefined;
|
|
76
|
-
} | null | undefined;
|
|
77
|
-
assigner?: string | null | undefined;
|
|
78
|
-
}>;
|
|
79
|
-
export type StrongId = z.infer<typeof strongIdSchema>;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const identifierUseCodesSchema: z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>;
|
|
3
|
+
export type IdentifierUseCodes = z.infer<typeof identifierUseCodesSchema>;
|
|
4
|
+
export declare const identifierSchema: z.ZodObject<{
|
|
5
|
+
system: z.ZodString;
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
8
|
+
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
10
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
11
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
start?: string | undefined;
|
|
14
|
+
end?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
start?: string | undefined;
|
|
17
|
+
end?: string | undefined;
|
|
18
|
+
}>>>;
|
|
19
|
+
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
system: string;
|
|
22
|
+
key: string;
|
|
23
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
24
|
+
label?: string | null | undefined;
|
|
25
|
+
period?: {
|
|
26
|
+
start?: string | undefined;
|
|
27
|
+
end?: string | undefined;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
assigner?: string | null | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
system: string;
|
|
32
|
+
key: string;
|
|
33
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
34
|
+
label?: string | null | undefined;
|
|
35
|
+
period?: {
|
|
36
|
+
start?: string | undefined;
|
|
37
|
+
end?: string | undefined;
|
|
38
|
+
} | null | undefined;
|
|
39
|
+
assigner?: string | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type Identifier = z.infer<typeof identifierSchema>;
|
|
42
|
+
export declare const strongIdSchema: z.ZodObject<{
|
|
43
|
+
system: z.ZodString;
|
|
44
|
+
key: z.ZodString;
|
|
45
|
+
use: z.ZodNullable<z.ZodOptional<z.ZodEnum<["usual", "official", "temp", "secondary", "old", "unspecified"]>>>;
|
|
46
|
+
label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
period: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
48
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
49
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
start?: string | undefined;
|
|
52
|
+
end?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
start?: string | undefined;
|
|
55
|
+
end?: string | undefined;
|
|
56
|
+
}>>>;
|
|
57
|
+
assigner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
system: string;
|
|
60
|
+
key: string;
|
|
61
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
62
|
+
label?: string | null | undefined;
|
|
63
|
+
period?: {
|
|
64
|
+
start?: string | undefined;
|
|
65
|
+
end?: string | undefined;
|
|
66
|
+
} | null | undefined;
|
|
67
|
+
assigner?: string | null | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
system: string;
|
|
70
|
+
key: string;
|
|
71
|
+
use?: "usual" | "official" | "temp" | "secondary" | "old" | "unspecified" | null | undefined;
|
|
72
|
+
label?: string | null | undefined;
|
|
73
|
+
period?: {
|
|
74
|
+
start?: string | undefined;
|
|
75
|
+
end?: string | undefined;
|
|
76
|
+
} | null | undefined;
|
|
77
|
+
assigner?: string | null | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export type StrongId = z.infer<typeof strongIdSchema>;
|
package/lib/models/identifier.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.strongIdSchema = exports.identifierSchema = exports.identifierUseCodesSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const period_1 = require("./period");
|
|
6
|
-
// Identifies the use for an identifier, if known. This value set defines its own
|
|
7
|
-
// terms in the system http://hl7.org/fhir/identifier-use
|
|
8
|
-
// See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c8-identifier-use-codes
|
|
9
|
-
exports.identifierUseCodesSchema = zod_1.z.enum([
|
|
10
|
-
"usual",
|
|
11
|
-
"official",
|
|
12
|
-
"temp",
|
|
13
|
-
"secondary",
|
|
14
|
-
"old",
|
|
15
|
-
"unspecified",
|
|
16
|
-
]);
|
|
17
|
-
// An identifier intended for use external to the FHIR protocol. As an external identifier,
|
|
18
|
-
// it may be changed or retired due to human or system process and errors.
|
|
19
|
-
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.11 Identifier)
|
|
20
|
-
exports.identifierSchema = zod_1.z.object({
|
|
21
|
-
system: zod_1.z.string(),
|
|
22
|
-
key: zod_1.z.string(),
|
|
23
|
-
use: exports.identifierUseCodesSchema.optional().nullable(),
|
|
24
|
-
label: zod_1.z.string().optional().nullable(),
|
|
25
|
-
period: period_1.periodSchema.optional().nullable(),
|
|
26
|
-
assigner: zod_1.z.string().optional().nullable(),
|
|
27
|
-
});
|
|
28
|
-
exports.strongIdSchema = exports.identifierSchema
|
|
29
|
-
.omit({
|
|
30
|
-
system: true,
|
|
31
|
-
key: true,
|
|
32
|
-
})
|
|
33
|
-
.merge(exports.identifierSchema.required({
|
|
34
|
-
system: true,
|
|
35
|
-
key: true,
|
|
36
|
-
}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.strongIdSchema = exports.identifierSchema = exports.identifierUseCodesSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const period_1 = require("./period");
|
|
6
|
+
// Identifies the use for an identifier, if known. This value set defines its own
|
|
7
|
+
// terms in the system http://hl7.org/fhir/identifier-use
|
|
8
|
+
// See: https://specification.commonwellalliance.org/appendix/terminology-bindings#c8-identifier-use-codes
|
|
9
|
+
exports.identifierUseCodesSchema = zod_1.z.enum([
|
|
10
|
+
"usual",
|
|
11
|
+
"official",
|
|
12
|
+
"temp",
|
|
13
|
+
"secondary",
|
|
14
|
+
"old",
|
|
15
|
+
"unspecified",
|
|
16
|
+
]);
|
|
17
|
+
// An identifier intended for use external to the FHIR protocol. As an external identifier,
|
|
18
|
+
// it may be changed or retired due to human or system process and errors.
|
|
19
|
+
// See: https://specification.commonwellalliance.org/services/rest-api-reference (8.4.11 Identifier)
|
|
20
|
+
exports.identifierSchema = zod_1.z.object({
|
|
21
|
+
system: zod_1.z.string(),
|
|
22
|
+
key: zod_1.z.string(),
|
|
23
|
+
use: exports.identifierUseCodesSchema.optional().nullable(),
|
|
24
|
+
label: zod_1.z.string().optional().nullable(),
|
|
25
|
+
period: period_1.periodSchema.optional().nullable(),
|
|
26
|
+
assigner: zod_1.z.string().optional().nullable(),
|
|
27
|
+
});
|
|
28
|
+
exports.strongIdSchema = exports.identifierSchema
|
|
29
|
+
.omit({
|
|
30
|
+
system: true,
|
|
31
|
+
key: true,
|
|
32
|
+
})
|
|
33
|
+
.merge(exports.identifierSchema.required({
|
|
34
|
+
system: true,
|
|
35
|
+
key: true,
|
|
36
|
+
}));
|
|
37
37
|
//# sourceMappingURL=identifier.js.map
|
package/lib/models/iso-date.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const ISO_DATE_REGEX: RegExp;
|
|
3
|
-
export declare const isoDateSchema: z.ZodString;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ISO_DATE_REGEX: RegExp;
|
|
3
|
+
export declare const isoDateSchema: z.ZodString;
|
package/lib/models/iso-date.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isoDateSchema = exports.ISO_DATE_REGEX = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.ISO_DATE_REGEX = /\d{4}-[01]\d-[0-3]\d/;
|
|
6
|
-
exports.isoDateSchema = zod_1.z.string().regex(exports.ISO_DATE_REGEX, "date must be a valid ISO date");
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isoDateSchema = exports.ISO_DATE_REGEX = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ISO_DATE_REGEX = /\d{4}-[01]\d-[0-3]\d/;
|
|
6
|
+
exports.isoDateSchema = zod_1.z.string().regex(exports.ISO_DATE_REGEX, "date must be a valid ISO date");
|
|
7
7
|
//# sourceMappingURL=iso-date.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const ISO_DATETIME_REGEX: RegExp;
|
|
3
|
-
export declare const isoDateTimeSchema: z.ZodString;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ISO_DATETIME_REGEX: RegExp;
|
|
3
|
+
export declare const isoDateTimeSchema: z.ZodString;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isoDateTimeSchema = exports.ISO_DATETIME_REGEX = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.ISO_DATETIME_REGEX = /(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:Z|[+-][01]\d:[0-5]\d)/;
|
|
6
|
-
exports.isoDateTimeSchema = zod_1.z
|
|
7
|
-
.string()
|
|
8
|
-
.regex(exports.ISO_DATETIME_REGEX, "dateTime must be a valid ISO dateTime");
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isoDateTimeSchema = exports.ISO_DATETIME_REGEX = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ISO_DATETIME_REGEX = /(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:Z|[+-][01]\d:[0-5]\d)/;
|
|
6
|
+
exports.isoDateTimeSchema = zod_1.z
|
|
7
|
+
.string()
|
|
8
|
+
.regex(exports.ISO_DATETIME_REGEX, "dateTime must be a valid ISO dateTime");
|
|
9
9
|
//# sourceMappingURL=iso-datetime.js.map
|