@learncard/helpers 1.6.3 → 1.7.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.
@@ -0,0 +1,14 @@
1
+ export declare class CredentialFieldError extends Error {
2
+ readonly field: 'creditsEarned' | 'creditsAvailable' | 'awardedDate';
3
+ constructor(field: 'creditsEarned' | 'creditsAvailable' | 'awardedDate');
4
+ }
5
+ /** Parse a complete finite decimal, without guessing locale or accepting partial input. */
6
+ export declare const parseCredentialNumber: (value: unknown) => number;
7
+ /** Calendar dates keep their day; timestamps must declare their timezone. */
8
+ export declare const normalizeCredentialAwardDate: (value: string) => string;
9
+ /**
10
+ * Materialize declared OBv3/CLR numeric fields after template substitution.
11
+ * Result values and identifiers remain strings. Signed credentials are never changed.
12
+ */
13
+ export declare const materializeCredentialFields: (credential: Record<string, unknown>) => Record<string, unknown>;
14
+ //# sourceMappingURL=credential-materialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-materialization.d.ts","sourceRoot":"","sources":["../src/credential-materialization.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAqB,SAAQ,KAAK;IAC/B,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,kBAAkB,GAAG,aAAa;gBAA3D,KAAK,EAAE,eAAe,GAAG,kBAAkB,GAAG,aAAa;CAInF;AAED,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,MAUtD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,GAAI,OAAO,MAAM,KAAG,MAuB5D,CAAC;AAKF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACpC,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CA6CxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=credential-materialization.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-materialization.test.d.ts","sourceRoot":"","sources":["../src/credential-materialization.test.ts"],"names":[],"mappings":""}