@@ -83,7 +83,7 @@ const orgSchema = z.object({
8383 ) ,
8484 assignedPlans : z . array (
8585 z . object ( {
86- assignedDateTime : z . string ( ) ,
86+ assignedDateTime : z . string ( ) . datetime ( ) ,
8787 capabilityStatus : z . enum ( [
8888 "Enabled" ,
8989 "Warning" ,
@@ -205,8 +205,8 @@ export const users = defineSyncEntity("users", {
205205 businessPhones : z . array ( z . string ( ) ) . optional ( ) ,
206206 mobilePhone : z . string ( ) . optional ( ) ,
207207 preferredLanguage : z . string ( ) . optional ( ) ,
208- lastPasswordChangeDateTime : z . string ( ) . optional ( ) ,
209- createdDateTime : z . string ( ) ,
208+ lastPasswordChangeDateTime : z . string ( ) . datetime ( ) . optional ( ) ,
209+ createdDateTime : z . string ( ) . datetime ( ) ,
210210 } ) ,
211211 upsert : async ( db , data , _syncId ) => {
212212 const tx = db . transaction ( "users" , "readwrite" ) ;
@@ -311,8 +311,8 @@ export const devices = defineSyncEntity("devices", {
311311 model : z . string ( ) . optional ( ) ,
312312 operatingSystem : z . string ( ) . optional ( ) ,
313313 operatingSystemVersion : z . string ( ) . optional ( ) ,
314- approximateLastSignInDateTime : z . string ( ) . optional ( ) ,
315- registrationDateTime : z . string ( ) . optional ( ) ,
314+ approximateLastSignInDateTime : z . string ( ) . datetime ( ) . optional ( ) ,
315+ registrationDateTime : z . string ( ) . datetime ( ) . optional ( ) ,
316316 deviceCategory : z . string ( ) . optional ( ) ,
317317 } ) ,
318318 upsert : async ( db , data , _syncId ) => {
@@ -366,7 +366,7 @@ export const groups = defineSyncEntity("groups", {
366366 description : z . string ( ) . optional ( ) ,
367367 securityEnabled : z . boolean ( ) . default ( false ) ,
368368 visibility : z . enum ( [ "Private" , "Public" , "HiddenMembership" ] ) . nullable ( ) ,
369- createdDateTime : z . string ( ) ,
369+ createdDateTime : z . string ( ) . datetime ( ) ,
370370 "members@delta" : z
371371 . array (
372372 z . object ( {
@@ -477,8 +477,8 @@ export const policies = defineSyncEntity("policies", {
477477 . nullable ( )
478478 // Microsoft's endpoints are inconsistent.
479479 . transform ( ( v ) => ( v === "" ? null : v ) ) ,
480- createdDateTime : z . string ( ) ,
481- lastModifiedDateTime : z . string ( ) ,
480+ createdDateTime : z . string ( ) . datetime ( ) ,
481+ lastModifiedDateTime : z . string ( ) . datetime ( ) ,
482482 assignments : z . array (
483483 z . object ( {
484484 id : z . string ( ) ,
@@ -585,8 +585,8 @@ export const scripts = defineSyncEntity("scripts", {
585585 . nullable ( )
586586 // Microsoft's endpoints are cringe.
587587 . transform ( ( v ) => ( v === "" ? null : v ) ) ,
588- createdDateTime : z . string ( ) ,
589- lastModifiedDateTime : z . string ( ) ,
588+ createdDateTime : z . string ( ) . datetime ( ) ,
589+ lastModifiedDateTime : z . string ( ) . datetime ( ) ,
590590 runAsAccount : z . enum ( [ "system" , "user" ] ) ,
591591 fileName : z . string ( ) ,
592592 scriptContent : z . string ( ) . nullable ( ) ,
@@ -705,8 +705,8 @@ export const apps = defineSyncEntity("apps", {
705705 description : z . string ( ) . optional ( ) ,
706706 publisher : z . string ( ) . optional ( ) ,
707707 largeIcon : z . any ( ) . optional ( ) ,
708- createdDateTime : z . string ( ) ,
709- lastModifiedDateTime : z . string ( ) ,
708+ createdDateTime : z . string ( ) . datetime ( ) ,
709+ lastModifiedDateTime : z . string ( ) . datetime ( ) ,
710710 isFeatured : z . boolean ( ) . default ( false ) ,
711711 privacyInformationUrl : z . string ( ) . nullable ( ) ,
712712 informationUrl : z . string ( ) . nullable ( ) ,
0 commit comments