@awarevue/api-types 1.0.30 → 1.0.31

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.
@@ -1038,153 +1038,782 @@ export declare const sGetAvailableDevicesRs: z.ZodIntersection<z.ZodObject<{
1038
1038
  provider: string;
1039
1039
  })[];
1040
1040
  }>>;
1041
- export declare const sObjectMerge: z.ZodObject<{
1041
+ export declare const sObjectMerge: z.ZodIntersection<z.ZodObject<{
1042
1042
  kind: z.ZodLiteral<"merge">;
1043
1043
  objectId: z.ZodString;
1044
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1045
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1046
1044
  }, "strip", z.ZodTypeAny, {
1047
1045
  kind: "merge";
1048
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1049
1046
  objectId: string;
1050
- props: Record<string, unknown>;
1051
1047
  }, {
1052
1048
  kind: "merge";
1053
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1054
1049
  objectId: string;
1055
- props: Record<string, unknown>;
1056
- }>;
1057
- export declare const sObjectDelete: z.ZodObject<{
1058
- kind: z.ZodLiteral<"delete">;
1059
- objectId: z.ZodString;
1060
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1050
+ }>, z.ZodDiscriminatedUnion<"objectKind", [z.ZodObject<{
1051
+ objectKind: z.ZodLiteral<"accessRule">;
1052
+ props: z.ZodObject<{
1053
+ displayName: z.ZodOptional<z.ZodString>;
1054
+ appliedTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1055
+ permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1056
+ deviceId: z.ZodString;
1057
+ scheduleId: z.ZodString;
1058
+ }, "strip", z.ZodTypeAny, {
1059
+ deviceId: string;
1060
+ scheduleId: string;
1061
+ }, {
1062
+ deviceId: string;
1063
+ scheduleId: string;
1064
+ }>, "many">>;
1065
+ groupPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1066
+ groupId: z.ZodString;
1067
+ scheduleId: z.ZodString;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ scheduleId: string;
1070
+ groupId: string;
1071
+ }, {
1072
+ scheduleId: string;
1073
+ groupId: string;
1074
+ }>, "many">>;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ displayName?: string | undefined;
1077
+ appliedTo?: string[] | undefined;
1078
+ permissions?: {
1079
+ deviceId: string;
1080
+ scheduleId: string;
1081
+ }[] | undefined;
1082
+ groupPermissions?: {
1083
+ scheduleId: string;
1084
+ groupId: string;
1085
+ }[] | undefined;
1086
+ }, {
1087
+ displayName?: string | undefined;
1088
+ appliedTo?: string[] | undefined;
1089
+ permissions?: {
1090
+ deviceId: string;
1091
+ scheduleId: string;
1092
+ }[] | undefined;
1093
+ groupPermissions?: {
1094
+ scheduleId: string;
1095
+ groupId: string;
1096
+ }[] | undefined;
1097
+ }>;
1061
1098
  }, "strip", z.ZodTypeAny, {
1062
- kind: "delete";
1063
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1064
- objectId: string;
1099
+ objectKind: "accessRule";
1100
+ props: {
1101
+ displayName?: string | undefined;
1102
+ appliedTo?: string[] | undefined;
1103
+ permissions?: {
1104
+ deviceId: string;
1105
+ scheduleId: string;
1106
+ }[] | undefined;
1107
+ groupPermissions?: {
1108
+ scheduleId: string;
1109
+ groupId: string;
1110
+ }[] | undefined;
1111
+ };
1065
1112
  }, {
1066
- kind: "delete";
1067
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1068
- objectId: string;
1069
- }>;
1070
- export declare const sRelationMerge: z.ZodObject<{
1071
- kind: z.ZodLiteral<"relation-merge">;
1072
- left: z.ZodObject<{
1073
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1074
- objectId: z.ZodOptional<z.ZodString>;
1113
+ objectKind: "accessRule";
1114
+ props: {
1115
+ displayName?: string | undefined;
1116
+ appliedTo?: string[] | undefined;
1117
+ permissions?: {
1118
+ deviceId: string;
1119
+ scheduleId: string;
1120
+ }[] | undefined;
1121
+ groupPermissions?: {
1122
+ scheduleId: string;
1123
+ groupId: string;
1124
+ }[] | undefined;
1125
+ };
1126
+ }>, z.ZodObject<{
1127
+ objectKind: z.ZodLiteral<"schedule">;
1128
+ props: z.ZodObject<{
1129
+ displayName: z.ZodOptional<z.ZodString>;
1130
+ flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
1131
+ include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1132
+ startDate: z.ZodNullable<z.ZodString>;
1133
+ endDate: z.ZodNullable<z.ZodString>;
1134
+ timeIntervals: z.ZodArray<z.ZodObject<{
1135
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1136
+ from: z.ZodNumber;
1137
+ to: z.ZodNumber;
1138
+ }, "strip", z.ZodTypeAny, {
1139
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1140
+ from: number;
1141
+ to: number;
1142
+ }, {
1143
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1144
+ from: number;
1145
+ to: number;
1146
+ }>, "many">;
1147
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1148
+ }, "strip", z.ZodTypeAny, {
1149
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1150
+ startDate: string | null;
1151
+ endDate: string | null;
1152
+ timeIntervals: {
1153
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1154
+ from: number;
1155
+ to: number;
1156
+ }[];
1157
+ }, {
1158
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1159
+ startDate: string | null;
1160
+ endDate: string | null;
1161
+ timeIntervals: {
1162
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1163
+ from: number;
1164
+ to: number;
1165
+ }[];
1166
+ }>>>;
1167
+ exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1168
+ startDate: z.ZodNullable<z.ZodString>;
1169
+ endDate: z.ZodNullable<z.ZodString>;
1170
+ timeIntervals: z.ZodArray<z.ZodObject<{
1171
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1172
+ from: z.ZodNumber;
1173
+ to: z.ZodNumber;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1176
+ from: number;
1177
+ to: number;
1178
+ }, {
1179
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1180
+ from: number;
1181
+ to: number;
1182
+ }>, "many">;
1183
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1186
+ startDate: string | null;
1187
+ endDate: string | null;
1188
+ timeIntervals: {
1189
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1190
+ from: number;
1191
+ to: number;
1192
+ }[];
1193
+ }, {
1194
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1195
+ startDate: string | null;
1196
+ endDate: string | null;
1197
+ timeIntervals: {
1198
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1199
+ from: number;
1200
+ to: number;
1201
+ }[];
1202
+ }>>>;
1075
1203
  }, "strip", z.ZodTypeAny, {
1076
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1077
- objectId?: string | undefined;
1204
+ include?: {
1205
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1206
+ startDate: string | null;
1207
+ endDate: string | null;
1208
+ timeIntervals: {
1209
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1210
+ from: number;
1211
+ to: number;
1212
+ }[];
1213
+ } | null | undefined;
1214
+ exclude?: {
1215
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1216
+ startDate: string | null;
1217
+ endDate: string | null;
1218
+ timeIntervals: {
1219
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1220
+ from: number;
1221
+ to: number;
1222
+ }[];
1223
+ } | null | undefined;
1224
+ displayName?: string | undefined;
1225
+ flag?: "always" | "never" | null | undefined;
1078
1226
  }, {
1079
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1080
- objectId?: string | undefined;
1227
+ include?: {
1228
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1229
+ startDate: string | null;
1230
+ endDate: string | null;
1231
+ timeIntervals: {
1232
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1233
+ from: number;
1234
+ to: number;
1235
+ }[];
1236
+ } | null | undefined;
1237
+ exclude?: {
1238
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1239
+ startDate: string | null;
1240
+ endDate: string | null;
1241
+ timeIntervals: {
1242
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1243
+ from: number;
1244
+ to: number;
1245
+ }[];
1246
+ } | null | undefined;
1247
+ displayName?: string | undefined;
1248
+ flag?: "always" | "never" | null | undefined;
1081
1249
  }>;
1082
- right: z.ZodObject<{
1083
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1084
- objectId: z.ZodOptional<z.ZodString>;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ objectKind: "schedule";
1252
+ props: {
1253
+ include?: {
1254
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1255
+ startDate: string | null;
1256
+ endDate: string | null;
1257
+ timeIntervals: {
1258
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1259
+ from: number;
1260
+ to: number;
1261
+ }[];
1262
+ } | null | undefined;
1263
+ exclude?: {
1264
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1265
+ startDate: string | null;
1266
+ endDate: string | null;
1267
+ timeIntervals: {
1268
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1269
+ from: number;
1270
+ to: number;
1271
+ }[];
1272
+ } | null | undefined;
1273
+ displayName?: string | undefined;
1274
+ flag?: "always" | "never" | null | undefined;
1275
+ };
1276
+ }, {
1277
+ objectKind: "schedule";
1278
+ props: {
1279
+ include?: {
1280
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1281
+ startDate: string | null;
1282
+ endDate: string | null;
1283
+ timeIntervals: {
1284
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1285
+ from: number;
1286
+ to: number;
1287
+ }[];
1288
+ } | null | undefined;
1289
+ exclude?: {
1290
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1291
+ startDate: string | null;
1292
+ endDate: string | null;
1293
+ timeIntervals: {
1294
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1295
+ from: number;
1296
+ to: number;
1297
+ }[];
1298
+ } | null | undefined;
1299
+ displayName?: string | undefined;
1300
+ flag?: "always" | "never" | null | undefined;
1301
+ };
1302
+ }>, z.ZodObject<{
1303
+ objectKind: z.ZodLiteral<"person">;
1304
+ props: z.ZodObject<{
1305
+ firstName: z.ZodOptional<z.ZodString>;
1306
+ lastName: z.ZodOptional<z.ZodString>;
1307
+ position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1308
+ accessSuspended: z.ZodOptional<z.ZodBoolean>;
1309
+ staffMember: z.ZodOptional<z.ZodBoolean>;
1310
+ validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1311
+ validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1312
+ avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1313
+ credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
1314
+ type: z.ZodEnum<["card", "pin", "fingerprint"]>;
1315
+ value: z.ZodString;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ type: "card" | "pin" | "fingerprint";
1318
+ value: string;
1319
+ }, {
1320
+ type: "card" | "pin" | "fingerprint";
1321
+ value: string;
1322
+ }>, "many">>;
1323
+ accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1324
+ customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1085
1325
  }, "strip", z.ZodTypeAny, {
1086
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1087
- objectId?: string | undefined;
1326
+ position?: string | null | undefined;
1327
+ firstName?: string | undefined;
1328
+ lastName?: string | undefined;
1329
+ avatarId?: string | null | undefined;
1330
+ validFrom?: string | null | undefined;
1331
+ validTo?: string | null | undefined;
1332
+ accessSuspended?: boolean | undefined;
1333
+ staffMember?: boolean | undefined;
1334
+ credentials?: {
1335
+ type: "card" | "pin" | "fingerprint";
1336
+ value: string;
1337
+ }[] | undefined;
1338
+ accessRules?: string[] | undefined;
1339
+ customFields?: Record<string, string> | null | undefined;
1088
1340
  }, {
1089
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1090
- objectId?: string | undefined;
1341
+ position?: string | null | undefined;
1342
+ firstName?: string | undefined;
1343
+ lastName?: string | undefined;
1344
+ avatarId?: string | null | undefined;
1345
+ validFrom?: string | null | undefined;
1346
+ validTo?: string | null | undefined;
1347
+ accessSuspended?: boolean | undefined;
1348
+ staffMember?: boolean | undefined;
1349
+ credentials?: {
1350
+ type: "card" | "pin" | "fingerprint";
1351
+ value: string;
1352
+ }[] | undefined;
1353
+ accessRules?: string[] | undefined;
1354
+ customFields?: Record<string, string> | null | undefined;
1091
1355
  }>;
1092
- linkExists: z.ZodBoolean;
1093
1356
  }, "strip", z.ZodTypeAny, {
1094
- left: {
1095
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1096
- objectId?: string | undefined;
1097
- };
1098
- right: {
1099
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1100
- objectId?: string | undefined;
1357
+ objectKind: "person";
1358
+ props: {
1359
+ position?: string | null | undefined;
1360
+ firstName?: string | undefined;
1361
+ lastName?: string | undefined;
1362
+ avatarId?: string | null | undefined;
1363
+ validFrom?: string | null | undefined;
1364
+ validTo?: string | null | undefined;
1365
+ accessSuspended?: boolean | undefined;
1366
+ staffMember?: boolean | undefined;
1367
+ credentials?: {
1368
+ type: "card" | "pin" | "fingerprint";
1369
+ value: string;
1370
+ }[] | undefined;
1371
+ accessRules?: string[] | undefined;
1372
+ customFields?: Record<string, string> | null | undefined;
1101
1373
  };
1102
- kind: "relation-merge";
1103
- linkExists: boolean;
1104
1374
  }, {
1105
- left: {
1106
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1107
- objectId?: string | undefined;
1375
+ objectKind: "person";
1376
+ props: {
1377
+ position?: string | null | undefined;
1378
+ firstName?: string | undefined;
1379
+ lastName?: string | undefined;
1380
+ avatarId?: string | null | undefined;
1381
+ validFrom?: string | null | undefined;
1382
+ validTo?: string | null | undefined;
1383
+ accessSuspended?: boolean | undefined;
1384
+ staffMember?: boolean | undefined;
1385
+ credentials?: {
1386
+ type: "card" | "pin" | "fingerprint";
1387
+ value: string;
1388
+ }[] | undefined;
1389
+ accessRules?: string[] | undefined;
1390
+ customFields?: Record<string, string> | null | undefined;
1108
1391
  };
1109
- right: {
1110
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1111
- objectId?: string | undefined;
1392
+ }>, z.ZodObject<{
1393
+ objectKind: z.ZodLiteral<"zone">;
1394
+ props: z.ZodObject<{
1395
+ displayName: z.ZodOptional<z.ZodString>;
1396
+ devices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ displayName?: string | undefined;
1399
+ devices?: string[] | undefined;
1400
+ }, {
1401
+ displayName?: string | undefined;
1402
+ devices?: string[] | undefined;
1403
+ }>;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ objectKind: "zone";
1406
+ props: {
1407
+ displayName?: string | undefined;
1408
+ devices?: string[] | undefined;
1112
1409
  };
1113
- kind: "relation-merge";
1114
- linkExists: boolean;
1115
- }>;
1116
- export declare const sAccessMutation: z.ZodUnion<[z.ZodObject<{
1117
- kind: z.ZodLiteral<"merge">;
1410
+ }, {
1411
+ objectKind: "zone";
1412
+ props: {
1413
+ displayName?: string | undefined;
1414
+ devices?: string[] | undefined;
1415
+ };
1416
+ }>]>>;
1417
+ export declare const sObjectDelete: z.ZodObject<{
1418
+ kind: z.ZodLiteral<"delete">;
1118
1419
  objectId: z.ZodString;
1119
1420
  objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1120
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1121
1421
  }, "strip", z.ZodTypeAny, {
1122
- kind: "merge";
1422
+ kind: "delete";
1123
1423
  objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1124
1424
  objectId: string;
1125
- props: Record<string, unknown>;
1126
1425
  }, {
1127
- kind: "merge";
1426
+ kind: "delete";
1128
1427
  objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1129
1428
  objectId: string;
1130
- props: Record<string, unknown>;
1131
- }>, z.ZodObject<{
1132
- kind: z.ZodLiteral<"delete">;
1429
+ }>;
1430
+ export declare const sAccessMutation: z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
1431
+ kind: z.ZodLiteral<"merge">;
1133
1432
  objectId: z.ZodString;
1134
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1135
1433
  }, "strip", z.ZodTypeAny, {
1136
- kind: "delete";
1137
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1434
+ kind: "merge";
1138
1435
  objectId: string;
1139
1436
  }, {
1140
- kind: "delete";
1141
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1437
+ kind: "merge";
1142
1438
  objectId: string;
1143
- }>, z.ZodObject<{
1144
- kind: z.ZodLiteral<"relation-merge">;
1145
- left: z.ZodObject<{
1146
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1147
- objectId: z.ZodOptional<z.ZodString>;
1439
+ }>, z.ZodDiscriminatedUnion<"objectKind", [z.ZodObject<{
1440
+ objectKind: z.ZodLiteral<"accessRule">;
1441
+ props: z.ZodObject<{
1442
+ displayName: z.ZodOptional<z.ZodString>;
1443
+ appliedTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1444
+ permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1445
+ deviceId: z.ZodString;
1446
+ scheduleId: z.ZodString;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ deviceId: string;
1449
+ scheduleId: string;
1450
+ }, {
1451
+ deviceId: string;
1452
+ scheduleId: string;
1453
+ }>, "many">>;
1454
+ groupPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1455
+ groupId: z.ZodString;
1456
+ scheduleId: z.ZodString;
1457
+ }, "strip", z.ZodTypeAny, {
1458
+ scheduleId: string;
1459
+ groupId: string;
1460
+ }, {
1461
+ scheduleId: string;
1462
+ groupId: string;
1463
+ }>, "many">>;
1148
1464
  }, "strip", z.ZodTypeAny, {
1149
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1150
- objectId?: string | undefined;
1465
+ displayName?: string | undefined;
1466
+ appliedTo?: string[] | undefined;
1467
+ permissions?: {
1468
+ deviceId: string;
1469
+ scheduleId: string;
1470
+ }[] | undefined;
1471
+ groupPermissions?: {
1472
+ scheduleId: string;
1473
+ groupId: string;
1474
+ }[] | undefined;
1151
1475
  }, {
1152
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1153
- objectId?: string | undefined;
1476
+ displayName?: string | undefined;
1477
+ appliedTo?: string[] | undefined;
1478
+ permissions?: {
1479
+ deviceId: string;
1480
+ scheduleId: string;
1481
+ }[] | undefined;
1482
+ groupPermissions?: {
1483
+ scheduleId: string;
1484
+ groupId: string;
1485
+ }[] | undefined;
1154
1486
  }>;
1155
- right: z.ZodObject<{
1156
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1157
- objectId: z.ZodOptional<z.ZodString>;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ objectKind: "accessRule";
1489
+ props: {
1490
+ displayName?: string | undefined;
1491
+ appliedTo?: string[] | undefined;
1492
+ permissions?: {
1493
+ deviceId: string;
1494
+ scheduleId: string;
1495
+ }[] | undefined;
1496
+ groupPermissions?: {
1497
+ scheduleId: string;
1498
+ groupId: string;
1499
+ }[] | undefined;
1500
+ };
1501
+ }, {
1502
+ objectKind: "accessRule";
1503
+ props: {
1504
+ displayName?: string | undefined;
1505
+ appliedTo?: string[] | undefined;
1506
+ permissions?: {
1507
+ deviceId: string;
1508
+ scheduleId: string;
1509
+ }[] | undefined;
1510
+ groupPermissions?: {
1511
+ scheduleId: string;
1512
+ groupId: string;
1513
+ }[] | undefined;
1514
+ };
1515
+ }>, z.ZodObject<{
1516
+ objectKind: z.ZodLiteral<"schedule">;
1517
+ props: z.ZodObject<{
1518
+ displayName: z.ZodOptional<z.ZodString>;
1519
+ flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
1520
+ include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1521
+ startDate: z.ZodNullable<z.ZodString>;
1522
+ endDate: z.ZodNullable<z.ZodString>;
1523
+ timeIntervals: z.ZodArray<z.ZodObject<{
1524
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1525
+ from: z.ZodNumber;
1526
+ to: z.ZodNumber;
1527
+ }, "strip", z.ZodTypeAny, {
1528
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1529
+ from: number;
1530
+ to: number;
1531
+ }, {
1532
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1533
+ from: number;
1534
+ to: number;
1535
+ }>, "many">;
1536
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1537
+ }, "strip", z.ZodTypeAny, {
1538
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1539
+ startDate: string | null;
1540
+ endDate: string | null;
1541
+ timeIntervals: {
1542
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1543
+ from: number;
1544
+ to: number;
1545
+ }[];
1546
+ }, {
1547
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1548
+ startDate: string | null;
1549
+ endDate: string | null;
1550
+ timeIntervals: {
1551
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1552
+ from: number;
1553
+ to: number;
1554
+ }[];
1555
+ }>>>;
1556
+ exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1557
+ startDate: z.ZodNullable<z.ZodString>;
1558
+ endDate: z.ZodNullable<z.ZodString>;
1559
+ timeIntervals: z.ZodArray<z.ZodObject<{
1560
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1561
+ from: z.ZodNumber;
1562
+ to: z.ZodNumber;
1563
+ }, "strip", z.ZodTypeAny, {
1564
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1565
+ from: number;
1566
+ to: number;
1567
+ }, {
1568
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1569
+ from: number;
1570
+ to: number;
1571
+ }>, "many">;
1572
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1573
+ }, "strip", z.ZodTypeAny, {
1574
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1575
+ startDate: string | null;
1576
+ endDate: string | null;
1577
+ timeIntervals: {
1578
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1579
+ from: number;
1580
+ to: number;
1581
+ }[];
1582
+ }, {
1583
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1584
+ startDate: string | null;
1585
+ endDate: string | null;
1586
+ timeIntervals: {
1587
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1588
+ from: number;
1589
+ to: number;
1590
+ }[];
1591
+ }>>>;
1158
1592
  }, "strip", z.ZodTypeAny, {
1159
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1160
- objectId?: string | undefined;
1593
+ include?: {
1594
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1595
+ startDate: string | null;
1596
+ endDate: string | null;
1597
+ timeIntervals: {
1598
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1599
+ from: number;
1600
+ to: number;
1601
+ }[];
1602
+ } | null | undefined;
1603
+ exclude?: {
1604
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1605
+ startDate: string | null;
1606
+ endDate: string | null;
1607
+ timeIntervals: {
1608
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1609
+ from: number;
1610
+ to: number;
1611
+ }[];
1612
+ } | null | undefined;
1613
+ displayName?: string | undefined;
1614
+ flag?: "always" | "never" | null | undefined;
1161
1615
  }, {
1162
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1163
- objectId?: string | undefined;
1616
+ include?: {
1617
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1618
+ startDate: string | null;
1619
+ endDate: string | null;
1620
+ timeIntervals: {
1621
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1622
+ from: number;
1623
+ to: number;
1624
+ }[];
1625
+ } | null | undefined;
1626
+ exclude?: {
1627
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1628
+ startDate: string | null;
1629
+ endDate: string | null;
1630
+ timeIntervals: {
1631
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1632
+ from: number;
1633
+ to: number;
1634
+ }[];
1635
+ } | null | undefined;
1636
+ displayName?: string | undefined;
1637
+ flag?: "always" | "never" | null | undefined;
1164
1638
  }>;
1165
- linkExists: z.ZodBoolean;
1166
1639
  }, "strip", z.ZodTypeAny, {
1167
- left: {
1168
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1169
- objectId?: string | undefined;
1640
+ objectKind: "schedule";
1641
+ props: {
1642
+ include?: {
1643
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1644
+ startDate: string | null;
1645
+ endDate: string | null;
1646
+ timeIntervals: {
1647
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1648
+ from: number;
1649
+ to: number;
1650
+ }[];
1651
+ } | null | undefined;
1652
+ exclude?: {
1653
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1654
+ startDate: string | null;
1655
+ endDate: string | null;
1656
+ timeIntervals: {
1657
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1658
+ from: number;
1659
+ to: number;
1660
+ }[];
1661
+ } | null | undefined;
1662
+ displayName?: string | undefined;
1663
+ flag?: "always" | "never" | null | undefined;
1170
1664
  };
1171
- right: {
1172
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1173
- objectId?: string | undefined;
1665
+ }, {
1666
+ objectKind: "schedule";
1667
+ props: {
1668
+ include?: {
1669
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1670
+ startDate: string | null;
1671
+ endDate: string | null;
1672
+ timeIntervals: {
1673
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1674
+ from: number;
1675
+ to: number;
1676
+ }[];
1677
+ } | null | undefined;
1678
+ exclude?: {
1679
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1680
+ startDate: string | null;
1681
+ endDate: string | null;
1682
+ timeIntervals: {
1683
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1684
+ from: number;
1685
+ to: number;
1686
+ }[];
1687
+ } | null | undefined;
1688
+ displayName?: string | undefined;
1689
+ flag?: "always" | "never" | null | undefined;
1690
+ };
1691
+ }>, z.ZodObject<{
1692
+ objectKind: z.ZodLiteral<"person">;
1693
+ props: z.ZodObject<{
1694
+ firstName: z.ZodOptional<z.ZodString>;
1695
+ lastName: z.ZodOptional<z.ZodString>;
1696
+ position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1697
+ accessSuspended: z.ZodOptional<z.ZodBoolean>;
1698
+ staffMember: z.ZodOptional<z.ZodBoolean>;
1699
+ validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1700
+ validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1701
+ avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1702
+ credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
1703
+ type: z.ZodEnum<["card", "pin", "fingerprint"]>;
1704
+ value: z.ZodString;
1705
+ }, "strip", z.ZodTypeAny, {
1706
+ type: "card" | "pin" | "fingerprint";
1707
+ value: string;
1708
+ }, {
1709
+ type: "card" | "pin" | "fingerprint";
1710
+ value: string;
1711
+ }>, "many">>;
1712
+ accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1713
+ customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1714
+ }, "strip", z.ZodTypeAny, {
1715
+ position?: string | null | undefined;
1716
+ firstName?: string | undefined;
1717
+ lastName?: string | undefined;
1718
+ avatarId?: string | null | undefined;
1719
+ validFrom?: string | null | undefined;
1720
+ validTo?: string | null | undefined;
1721
+ accessSuspended?: boolean | undefined;
1722
+ staffMember?: boolean | undefined;
1723
+ credentials?: {
1724
+ type: "card" | "pin" | "fingerprint";
1725
+ value: string;
1726
+ }[] | undefined;
1727
+ accessRules?: string[] | undefined;
1728
+ customFields?: Record<string, string> | null | undefined;
1729
+ }, {
1730
+ position?: string | null | undefined;
1731
+ firstName?: string | undefined;
1732
+ lastName?: string | undefined;
1733
+ avatarId?: string | null | undefined;
1734
+ validFrom?: string | null | undefined;
1735
+ validTo?: string | null | undefined;
1736
+ accessSuspended?: boolean | undefined;
1737
+ staffMember?: boolean | undefined;
1738
+ credentials?: {
1739
+ type: "card" | "pin" | "fingerprint";
1740
+ value: string;
1741
+ }[] | undefined;
1742
+ accessRules?: string[] | undefined;
1743
+ customFields?: Record<string, string> | null | undefined;
1744
+ }>;
1745
+ }, "strip", z.ZodTypeAny, {
1746
+ objectKind: "person";
1747
+ props: {
1748
+ position?: string | null | undefined;
1749
+ firstName?: string | undefined;
1750
+ lastName?: string | undefined;
1751
+ avatarId?: string | null | undefined;
1752
+ validFrom?: string | null | undefined;
1753
+ validTo?: string | null | undefined;
1754
+ accessSuspended?: boolean | undefined;
1755
+ staffMember?: boolean | undefined;
1756
+ credentials?: {
1757
+ type: "card" | "pin" | "fingerprint";
1758
+ value: string;
1759
+ }[] | undefined;
1760
+ accessRules?: string[] | undefined;
1761
+ customFields?: Record<string, string> | null | undefined;
1174
1762
  };
1175
- kind: "relation-merge";
1176
- linkExists: boolean;
1177
1763
  }, {
1178
- left: {
1179
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1180
- objectId?: string | undefined;
1764
+ objectKind: "person";
1765
+ props: {
1766
+ position?: string | null | undefined;
1767
+ firstName?: string | undefined;
1768
+ lastName?: string | undefined;
1769
+ avatarId?: string | null | undefined;
1770
+ validFrom?: string | null | undefined;
1771
+ validTo?: string | null | undefined;
1772
+ accessSuspended?: boolean | undefined;
1773
+ staffMember?: boolean | undefined;
1774
+ credentials?: {
1775
+ type: "card" | "pin" | "fingerprint";
1776
+ value: string;
1777
+ }[] | undefined;
1778
+ accessRules?: string[] | undefined;
1779
+ customFields?: Record<string, string> | null | undefined;
1181
1780
  };
1182
- right: {
1183
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1184
- objectId?: string | undefined;
1781
+ }>, z.ZodObject<{
1782
+ objectKind: z.ZodLiteral<"zone">;
1783
+ props: z.ZodObject<{
1784
+ displayName: z.ZodOptional<z.ZodString>;
1785
+ devices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1786
+ }, "strip", z.ZodTypeAny, {
1787
+ displayName?: string | undefined;
1788
+ devices?: string[] | undefined;
1789
+ }, {
1790
+ displayName?: string | undefined;
1791
+ devices?: string[] | undefined;
1792
+ }>;
1793
+ }, "strip", z.ZodTypeAny, {
1794
+ objectKind: "zone";
1795
+ props: {
1796
+ displayName?: string | undefined;
1797
+ devices?: string[] | undefined;
1185
1798
  };
1186
- kind: "relation-merge";
1187
- linkExists: boolean;
1799
+ }, {
1800
+ objectKind: "zone";
1801
+ props: {
1802
+ displayName?: string | undefined;
1803
+ devices?: string[] | undefined;
1804
+ };
1805
+ }>]>>, z.ZodObject<{
1806
+ kind: z.ZodLiteral<"delete">;
1807
+ objectId: z.ZodString;
1808
+ objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1809
+ }, "strip", z.ZodTypeAny, {
1810
+ kind: "delete";
1811
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1812
+ objectId: string;
1813
+ }, {
1814
+ kind: "delete";
1815
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1816
+ objectId: string;
1188
1817
  }>]>;
1189
1818
  export declare const sDeviceMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1190
1819
  export declare const sRefMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
@@ -1193,130 +1822,547 @@ export declare const sValidateChangeRq: z.ZodObject<{
1193
1822
  provider: z.ZodString;
1194
1823
  devices: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1195
1824
  refMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1196
- mutations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1825
+ mutations: z.ZodArray<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
1197
1826
  kind: z.ZodLiteral<"merge">;
1198
1827
  objectId: z.ZodString;
1199
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1200
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1201
1828
  }, "strip", z.ZodTypeAny, {
1202
1829
  kind: "merge";
1203
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1204
1830
  objectId: string;
1205
- props: Record<string, unknown>;
1206
1831
  }, {
1207
1832
  kind: "merge";
1208
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1209
1833
  objectId: string;
1210
- props: Record<string, unknown>;
1211
- }>, z.ZodObject<{
1212
- kind: z.ZodLiteral<"delete">;
1213
- objectId: z.ZodString;
1214
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1834
+ }>, z.ZodDiscriminatedUnion<"objectKind", [z.ZodObject<{
1835
+ objectKind: z.ZodLiteral<"accessRule">;
1836
+ props: z.ZodObject<{
1837
+ displayName: z.ZodOptional<z.ZodString>;
1838
+ appliedTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1839
+ permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1840
+ deviceId: z.ZodString;
1841
+ scheduleId: z.ZodString;
1842
+ }, "strip", z.ZodTypeAny, {
1843
+ deviceId: string;
1844
+ scheduleId: string;
1845
+ }, {
1846
+ deviceId: string;
1847
+ scheduleId: string;
1848
+ }>, "many">>;
1849
+ groupPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1850
+ groupId: z.ZodString;
1851
+ scheduleId: z.ZodString;
1852
+ }, "strip", z.ZodTypeAny, {
1853
+ scheduleId: string;
1854
+ groupId: string;
1855
+ }, {
1856
+ scheduleId: string;
1857
+ groupId: string;
1858
+ }>, "many">>;
1859
+ }, "strip", z.ZodTypeAny, {
1860
+ displayName?: string | undefined;
1861
+ appliedTo?: string[] | undefined;
1862
+ permissions?: {
1863
+ deviceId: string;
1864
+ scheduleId: string;
1865
+ }[] | undefined;
1866
+ groupPermissions?: {
1867
+ scheduleId: string;
1868
+ groupId: string;
1869
+ }[] | undefined;
1870
+ }, {
1871
+ displayName?: string | undefined;
1872
+ appliedTo?: string[] | undefined;
1873
+ permissions?: {
1874
+ deviceId: string;
1875
+ scheduleId: string;
1876
+ }[] | undefined;
1877
+ groupPermissions?: {
1878
+ scheduleId: string;
1879
+ groupId: string;
1880
+ }[] | undefined;
1881
+ }>;
1215
1882
  }, "strip", z.ZodTypeAny, {
1216
- kind: "delete";
1217
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1218
- objectId: string;
1883
+ objectKind: "accessRule";
1884
+ props: {
1885
+ displayName?: string | undefined;
1886
+ appliedTo?: string[] | undefined;
1887
+ permissions?: {
1888
+ deviceId: string;
1889
+ scheduleId: string;
1890
+ }[] | undefined;
1891
+ groupPermissions?: {
1892
+ scheduleId: string;
1893
+ groupId: string;
1894
+ }[] | undefined;
1895
+ };
1219
1896
  }, {
1220
- kind: "delete";
1221
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1222
- objectId: string;
1897
+ objectKind: "accessRule";
1898
+ props: {
1899
+ displayName?: string | undefined;
1900
+ appliedTo?: string[] | undefined;
1901
+ permissions?: {
1902
+ deviceId: string;
1903
+ scheduleId: string;
1904
+ }[] | undefined;
1905
+ groupPermissions?: {
1906
+ scheduleId: string;
1907
+ groupId: string;
1908
+ }[] | undefined;
1909
+ };
1223
1910
  }>, z.ZodObject<{
1224
- kind: z.ZodLiteral<"relation-merge">;
1225
- left: z.ZodObject<{
1226
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1227
- objectId: z.ZodOptional<z.ZodString>;
1911
+ objectKind: z.ZodLiteral<"schedule">;
1912
+ props: z.ZodObject<{
1913
+ displayName: z.ZodOptional<z.ZodString>;
1914
+ flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
1915
+ include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1916
+ startDate: z.ZodNullable<z.ZodString>;
1917
+ endDate: z.ZodNullable<z.ZodString>;
1918
+ timeIntervals: z.ZodArray<z.ZodObject<{
1919
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1920
+ from: z.ZodNumber;
1921
+ to: z.ZodNumber;
1922
+ }, "strip", z.ZodTypeAny, {
1923
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1924
+ from: number;
1925
+ to: number;
1926
+ }, {
1927
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1928
+ from: number;
1929
+ to: number;
1930
+ }>, "many">;
1931
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1932
+ }, "strip", z.ZodTypeAny, {
1933
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1934
+ startDate: string | null;
1935
+ endDate: string | null;
1936
+ timeIntervals: {
1937
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1938
+ from: number;
1939
+ to: number;
1940
+ }[];
1941
+ }, {
1942
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1943
+ startDate: string | null;
1944
+ endDate: string | null;
1945
+ timeIntervals: {
1946
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1947
+ from: number;
1948
+ to: number;
1949
+ }[];
1950
+ }>>>;
1951
+ exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1952
+ startDate: z.ZodNullable<z.ZodString>;
1953
+ endDate: z.ZodNullable<z.ZodString>;
1954
+ timeIntervals: z.ZodArray<z.ZodObject<{
1955
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
1956
+ from: z.ZodNumber;
1957
+ to: z.ZodNumber;
1958
+ }, "strip", z.ZodTypeAny, {
1959
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1960
+ from: number;
1961
+ to: number;
1962
+ }, {
1963
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1964
+ from: number;
1965
+ to: number;
1966
+ }>, "many">;
1967
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
1968
+ }, "strip", z.ZodTypeAny, {
1969
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1970
+ startDate: string | null;
1971
+ endDate: string | null;
1972
+ timeIntervals: {
1973
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1974
+ from: number;
1975
+ to: number;
1976
+ }[];
1977
+ }, {
1978
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1979
+ startDate: string | null;
1980
+ endDate: string | null;
1981
+ timeIntervals: {
1982
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1983
+ from: number;
1984
+ to: number;
1985
+ }[];
1986
+ }>>>;
1228
1987
  }, "strip", z.ZodTypeAny, {
1229
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1230
- objectId?: string | undefined;
1988
+ include?: {
1989
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
1990
+ startDate: string | null;
1991
+ endDate: string | null;
1992
+ timeIntervals: {
1993
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
1994
+ from: number;
1995
+ to: number;
1996
+ }[];
1997
+ } | null | undefined;
1998
+ exclude?: {
1999
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2000
+ startDate: string | null;
2001
+ endDate: string | null;
2002
+ timeIntervals: {
2003
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2004
+ from: number;
2005
+ to: number;
2006
+ }[];
2007
+ } | null | undefined;
2008
+ displayName?: string | undefined;
2009
+ flag?: "always" | "never" | null | undefined;
1231
2010
  }, {
1232
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1233
- objectId?: string | undefined;
2011
+ include?: {
2012
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2013
+ startDate: string | null;
2014
+ endDate: string | null;
2015
+ timeIntervals: {
2016
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2017
+ from: number;
2018
+ to: number;
2019
+ }[];
2020
+ } | null | undefined;
2021
+ exclude?: {
2022
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2023
+ startDate: string | null;
2024
+ endDate: string | null;
2025
+ timeIntervals: {
2026
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2027
+ from: number;
2028
+ to: number;
2029
+ }[];
2030
+ } | null | undefined;
2031
+ displayName?: string | undefined;
2032
+ flag?: "always" | "never" | null | undefined;
1234
2033
  }>;
1235
- right: z.ZodObject<{
1236
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1237
- objectId: z.ZodOptional<z.ZodString>;
2034
+ }, "strip", z.ZodTypeAny, {
2035
+ objectKind: "schedule";
2036
+ props: {
2037
+ include?: {
2038
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2039
+ startDate: string | null;
2040
+ endDate: string | null;
2041
+ timeIntervals: {
2042
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2043
+ from: number;
2044
+ to: number;
2045
+ }[];
2046
+ } | null | undefined;
2047
+ exclude?: {
2048
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2049
+ startDate: string | null;
2050
+ endDate: string | null;
2051
+ timeIntervals: {
2052
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2053
+ from: number;
2054
+ to: number;
2055
+ }[];
2056
+ } | null | undefined;
2057
+ displayName?: string | undefined;
2058
+ flag?: "always" | "never" | null | undefined;
2059
+ };
2060
+ }, {
2061
+ objectKind: "schedule";
2062
+ props: {
2063
+ include?: {
2064
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2065
+ startDate: string | null;
2066
+ endDate: string | null;
2067
+ timeIntervals: {
2068
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2069
+ from: number;
2070
+ to: number;
2071
+ }[];
2072
+ } | null | undefined;
2073
+ exclude?: {
2074
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2075
+ startDate: string | null;
2076
+ endDate: string | null;
2077
+ timeIntervals: {
2078
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2079
+ from: number;
2080
+ to: number;
2081
+ }[];
2082
+ } | null | undefined;
2083
+ displayName?: string | undefined;
2084
+ flag?: "always" | "never" | null | undefined;
2085
+ };
2086
+ }>, z.ZodObject<{
2087
+ objectKind: z.ZodLiteral<"person">;
2088
+ props: z.ZodObject<{
2089
+ firstName: z.ZodOptional<z.ZodString>;
2090
+ lastName: z.ZodOptional<z.ZodString>;
2091
+ position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2092
+ accessSuspended: z.ZodOptional<z.ZodBoolean>;
2093
+ staffMember: z.ZodOptional<z.ZodBoolean>;
2094
+ validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2095
+ validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2096
+ avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2097
+ credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
2098
+ type: z.ZodEnum<["card", "pin", "fingerprint"]>;
2099
+ value: z.ZodString;
2100
+ }, "strip", z.ZodTypeAny, {
2101
+ type: "card" | "pin" | "fingerprint";
2102
+ value: string;
2103
+ }, {
2104
+ type: "card" | "pin" | "fingerprint";
2105
+ value: string;
2106
+ }>, "many">>;
2107
+ accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2108
+ customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1238
2109
  }, "strip", z.ZodTypeAny, {
1239
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1240
- objectId?: string | undefined;
2110
+ position?: string | null | undefined;
2111
+ firstName?: string | undefined;
2112
+ lastName?: string | undefined;
2113
+ avatarId?: string | null | undefined;
2114
+ validFrom?: string | null | undefined;
2115
+ validTo?: string | null | undefined;
2116
+ accessSuspended?: boolean | undefined;
2117
+ staffMember?: boolean | undefined;
2118
+ credentials?: {
2119
+ type: "card" | "pin" | "fingerprint";
2120
+ value: string;
2121
+ }[] | undefined;
2122
+ accessRules?: string[] | undefined;
2123
+ customFields?: Record<string, string> | null | undefined;
1241
2124
  }, {
1242
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1243
- objectId?: string | undefined;
2125
+ position?: string | null | undefined;
2126
+ firstName?: string | undefined;
2127
+ lastName?: string | undefined;
2128
+ avatarId?: string | null | undefined;
2129
+ validFrom?: string | null | undefined;
2130
+ validTo?: string | null | undefined;
2131
+ accessSuspended?: boolean | undefined;
2132
+ staffMember?: boolean | undefined;
2133
+ credentials?: {
2134
+ type: "card" | "pin" | "fingerprint";
2135
+ value: string;
2136
+ }[] | undefined;
2137
+ accessRules?: string[] | undefined;
2138
+ customFields?: Record<string, string> | null | undefined;
1244
2139
  }>;
1245
- linkExists: z.ZodBoolean;
1246
2140
  }, "strip", z.ZodTypeAny, {
1247
- left: {
1248
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1249
- objectId?: string | undefined;
2141
+ objectKind: "person";
2142
+ props: {
2143
+ position?: string | null | undefined;
2144
+ firstName?: string | undefined;
2145
+ lastName?: string | undefined;
2146
+ avatarId?: string | null | undefined;
2147
+ validFrom?: string | null | undefined;
2148
+ validTo?: string | null | undefined;
2149
+ accessSuspended?: boolean | undefined;
2150
+ staffMember?: boolean | undefined;
2151
+ credentials?: {
2152
+ type: "card" | "pin" | "fingerprint";
2153
+ value: string;
2154
+ }[] | undefined;
2155
+ accessRules?: string[] | undefined;
2156
+ customFields?: Record<string, string> | null | undefined;
1250
2157
  };
1251
- right: {
1252
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1253
- objectId?: string | undefined;
1254
- };
1255
- kind: "relation-merge";
1256
- linkExists: boolean;
1257
2158
  }, {
1258
- left: {
1259
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1260
- objectId?: string | undefined;
2159
+ objectKind: "person";
2160
+ props: {
2161
+ position?: string | null | undefined;
2162
+ firstName?: string | undefined;
2163
+ lastName?: string | undefined;
2164
+ avatarId?: string | null | undefined;
2165
+ validFrom?: string | null | undefined;
2166
+ validTo?: string | null | undefined;
2167
+ accessSuspended?: boolean | undefined;
2168
+ staffMember?: boolean | undefined;
2169
+ credentials?: {
2170
+ type: "card" | "pin" | "fingerprint";
2171
+ value: string;
2172
+ }[] | undefined;
2173
+ accessRules?: string[] | undefined;
2174
+ customFields?: Record<string, string> | null | undefined;
1261
2175
  };
1262
- right: {
1263
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1264
- objectId?: string | undefined;
2176
+ }>, z.ZodObject<{
2177
+ objectKind: z.ZodLiteral<"zone">;
2178
+ props: z.ZodObject<{
2179
+ displayName: z.ZodOptional<z.ZodString>;
2180
+ devices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ displayName?: string | undefined;
2183
+ devices?: string[] | undefined;
2184
+ }, {
2185
+ displayName?: string | undefined;
2186
+ devices?: string[] | undefined;
2187
+ }>;
2188
+ }, "strip", z.ZodTypeAny, {
2189
+ objectKind: "zone";
2190
+ props: {
2191
+ displayName?: string | undefined;
2192
+ devices?: string[] | undefined;
1265
2193
  };
1266
- kind: "relation-merge";
1267
- linkExists: boolean;
2194
+ }, {
2195
+ objectKind: "zone";
2196
+ props: {
2197
+ displayName?: string | undefined;
2198
+ devices?: string[] | undefined;
2199
+ };
2200
+ }>]>>, z.ZodObject<{
2201
+ kind: z.ZodLiteral<"delete">;
2202
+ objectId: z.ZodString;
2203
+ objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
2204
+ }, "strip", z.ZodTypeAny, {
2205
+ kind: "delete";
2206
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2207
+ objectId: string;
2208
+ }, {
2209
+ kind: "delete";
2210
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2211
+ objectId: string;
1268
2212
  }>]>, "many">;
1269
2213
  }, "strip", z.ZodTypeAny, {
1270
2214
  kind: "validate-change";
1271
2215
  devices: Record<string, Record<string, unknown>>;
1272
2216
  provider: string;
1273
2217
  refMap: Record<string, Record<string, string[]>>;
1274
- mutations: ({
2218
+ mutations: (({
1275
2219
  kind: "merge";
1276
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1277
2220
  objectId: string;
1278
- props: Record<string, unknown>;
2221
+ } & ({
2222
+ objectKind: "accessRule";
2223
+ props: {
2224
+ displayName?: string | undefined;
2225
+ appliedTo?: string[] | undefined;
2226
+ permissions?: {
2227
+ deviceId: string;
2228
+ scheduleId: string;
2229
+ }[] | undefined;
2230
+ groupPermissions?: {
2231
+ scheduleId: string;
2232
+ groupId: string;
2233
+ }[] | undefined;
2234
+ };
1279
2235
  } | {
1280
- kind: "delete";
1281
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1282
- objectId: string;
2236
+ objectKind: "schedule";
2237
+ props: {
2238
+ include?: {
2239
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2240
+ startDate: string | null;
2241
+ endDate: string | null;
2242
+ timeIntervals: {
2243
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2244
+ from: number;
2245
+ to: number;
2246
+ }[];
2247
+ } | null | undefined;
2248
+ exclude?: {
2249
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2250
+ startDate: string | null;
2251
+ endDate: string | null;
2252
+ timeIntervals: {
2253
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2254
+ from: number;
2255
+ to: number;
2256
+ }[];
2257
+ } | null | undefined;
2258
+ displayName?: string | undefined;
2259
+ flag?: "always" | "never" | null | undefined;
2260
+ };
1283
2261
  } | {
1284
- left: {
1285
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1286
- objectId?: string | undefined;
2262
+ objectKind: "person";
2263
+ props: {
2264
+ position?: string | null | undefined;
2265
+ firstName?: string | undefined;
2266
+ lastName?: string | undefined;
2267
+ avatarId?: string | null | undefined;
2268
+ validFrom?: string | null | undefined;
2269
+ validTo?: string | null | undefined;
2270
+ accessSuspended?: boolean | undefined;
2271
+ staffMember?: boolean | undefined;
2272
+ credentials?: {
2273
+ type: "card" | "pin" | "fingerprint";
2274
+ value: string;
2275
+ }[] | undefined;
2276
+ accessRules?: string[] | undefined;
2277
+ customFields?: Record<string, string> | null | undefined;
1287
2278
  };
1288
- right: {
1289
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1290
- objectId?: string | undefined;
2279
+ } | {
2280
+ objectKind: "zone";
2281
+ props: {
2282
+ displayName?: string | undefined;
2283
+ devices?: string[] | undefined;
1291
2284
  };
1292
- kind: "relation-merge";
1293
- linkExists: boolean;
2285
+ })) | {
2286
+ kind: "delete";
2287
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2288
+ objectId: string;
1294
2289
  })[];
1295
2290
  }, {
1296
2291
  kind: "validate-change";
1297
2292
  devices: Record<string, Record<string, unknown>>;
1298
2293
  provider: string;
1299
2294
  refMap: Record<string, Record<string, string[]>>;
1300
- mutations: ({
2295
+ mutations: (({
1301
2296
  kind: "merge";
1302
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1303
2297
  objectId: string;
1304
- props: Record<string, unknown>;
2298
+ } & ({
2299
+ objectKind: "accessRule";
2300
+ props: {
2301
+ displayName?: string | undefined;
2302
+ appliedTo?: string[] | undefined;
2303
+ permissions?: {
2304
+ deviceId: string;
2305
+ scheduleId: string;
2306
+ }[] | undefined;
2307
+ groupPermissions?: {
2308
+ scheduleId: string;
2309
+ groupId: string;
2310
+ }[] | undefined;
2311
+ };
1305
2312
  } | {
1306
- kind: "delete";
1307
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1308
- objectId: string;
2313
+ objectKind: "schedule";
2314
+ props: {
2315
+ include?: {
2316
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2317
+ startDate: string | null;
2318
+ endDate: string | null;
2319
+ timeIntervals: {
2320
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2321
+ from: number;
2322
+ to: number;
2323
+ }[];
2324
+ } | null | undefined;
2325
+ exclude?: {
2326
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2327
+ startDate: string | null;
2328
+ endDate: string | null;
2329
+ timeIntervals: {
2330
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2331
+ from: number;
2332
+ to: number;
2333
+ }[];
2334
+ } | null | undefined;
2335
+ displayName?: string | undefined;
2336
+ flag?: "always" | "never" | null | undefined;
2337
+ };
1309
2338
  } | {
1310
- left: {
1311
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1312
- objectId?: string | undefined;
2339
+ objectKind: "person";
2340
+ props: {
2341
+ position?: string | null | undefined;
2342
+ firstName?: string | undefined;
2343
+ lastName?: string | undefined;
2344
+ avatarId?: string | null | undefined;
2345
+ validFrom?: string | null | undefined;
2346
+ validTo?: string | null | undefined;
2347
+ accessSuspended?: boolean | undefined;
2348
+ staffMember?: boolean | undefined;
2349
+ credentials?: {
2350
+ type: "card" | "pin" | "fingerprint";
2351
+ value: string;
2352
+ }[] | undefined;
2353
+ accessRules?: string[] | undefined;
2354
+ customFields?: Record<string, string> | null | undefined;
1313
2355
  };
1314
- right: {
1315
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1316
- objectId?: string | undefined;
2356
+ } | {
2357
+ objectKind: "zone";
2358
+ props: {
2359
+ displayName?: string | undefined;
2360
+ devices?: string[] | undefined;
1317
2361
  };
1318
- kind: "relation-merge";
1319
- linkExists: boolean;
2362
+ })) | {
2363
+ kind: "delete";
2364
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2365
+ objectId: string;
1320
2366
  })[];
1321
2367
  }>;
1322
2368
  export declare const sChangeIssueCode: z.ZodEnum<["BAD_REFERENCE", "NOT_FOUND", "NOT_UNIQUE", "INVALID", "NOT_SUPPORTED"]>;
@@ -1398,130 +2444,547 @@ export declare const sApplyChange: z.ZodObject<{
1398
2444
  provider: z.ZodString;
1399
2445
  devices: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1400
2446
  refMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1401
- mutations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
2447
+ mutations: z.ZodArray<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
1402
2448
  kind: z.ZodLiteral<"merge">;
1403
2449
  objectId: z.ZodString;
1404
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1405
- props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1406
2450
  }, "strip", z.ZodTypeAny, {
1407
2451
  kind: "merge";
1408
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1409
2452
  objectId: string;
1410
- props: Record<string, unknown>;
1411
2453
  }, {
1412
2454
  kind: "merge";
1413
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1414
2455
  objectId: string;
1415
- props: Record<string, unknown>;
1416
- }>, z.ZodObject<{
1417
- kind: z.ZodLiteral<"delete">;
1418
- objectId: z.ZodString;
1419
- objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
2456
+ }>, z.ZodDiscriminatedUnion<"objectKind", [z.ZodObject<{
2457
+ objectKind: z.ZodLiteral<"accessRule">;
2458
+ props: z.ZodObject<{
2459
+ displayName: z.ZodOptional<z.ZodString>;
2460
+ appliedTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2461
+ permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2462
+ deviceId: z.ZodString;
2463
+ scheduleId: z.ZodString;
2464
+ }, "strip", z.ZodTypeAny, {
2465
+ deviceId: string;
2466
+ scheduleId: string;
2467
+ }, {
2468
+ deviceId: string;
2469
+ scheduleId: string;
2470
+ }>, "many">>;
2471
+ groupPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2472
+ groupId: z.ZodString;
2473
+ scheduleId: z.ZodString;
2474
+ }, "strip", z.ZodTypeAny, {
2475
+ scheduleId: string;
2476
+ groupId: string;
2477
+ }, {
2478
+ scheduleId: string;
2479
+ groupId: string;
2480
+ }>, "many">>;
2481
+ }, "strip", z.ZodTypeAny, {
2482
+ displayName?: string | undefined;
2483
+ appliedTo?: string[] | undefined;
2484
+ permissions?: {
2485
+ deviceId: string;
2486
+ scheduleId: string;
2487
+ }[] | undefined;
2488
+ groupPermissions?: {
2489
+ scheduleId: string;
2490
+ groupId: string;
2491
+ }[] | undefined;
2492
+ }, {
2493
+ displayName?: string | undefined;
2494
+ appliedTo?: string[] | undefined;
2495
+ permissions?: {
2496
+ deviceId: string;
2497
+ scheduleId: string;
2498
+ }[] | undefined;
2499
+ groupPermissions?: {
2500
+ scheduleId: string;
2501
+ groupId: string;
2502
+ }[] | undefined;
2503
+ }>;
1420
2504
  }, "strip", z.ZodTypeAny, {
1421
- kind: "delete";
1422
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1423
- objectId: string;
2505
+ objectKind: "accessRule";
2506
+ props: {
2507
+ displayName?: string | undefined;
2508
+ appliedTo?: string[] | undefined;
2509
+ permissions?: {
2510
+ deviceId: string;
2511
+ scheduleId: string;
2512
+ }[] | undefined;
2513
+ groupPermissions?: {
2514
+ scheduleId: string;
2515
+ groupId: string;
2516
+ }[] | undefined;
2517
+ };
1424
2518
  }, {
1425
- kind: "delete";
1426
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1427
- objectId: string;
2519
+ objectKind: "accessRule";
2520
+ props: {
2521
+ displayName?: string | undefined;
2522
+ appliedTo?: string[] | undefined;
2523
+ permissions?: {
2524
+ deviceId: string;
2525
+ scheduleId: string;
2526
+ }[] | undefined;
2527
+ groupPermissions?: {
2528
+ scheduleId: string;
2529
+ groupId: string;
2530
+ }[] | undefined;
2531
+ };
1428
2532
  }>, z.ZodObject<{
1429
- kind: z.ZodLiteral<"relation-merge">;
1430
- left: z.ZodObject<{
1431
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1432
- objectId: z.ZodOptional<z.ZodString>;
2533
+ objectKind: z.ZodLiteral<"schedule">;
2534
+ props: z.ZodObject<{
2535
+ displayName: z.ZodOptional<z.ZodString>;
2536
+ flag: z.ZodOptional<z.ZodNullable<z.ZodEnum<["always", "never"]>>>;
2537
+ include: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2538
+ startDate: z.ZodNullable<z.ZodString>;
2539
+ endDate: z.ZodNullable<z.ZodString>;
2540
+ timeIntervals: z.ZodArray<z.ZodObject<{
2541
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
2542
+ from: z.ZodNumber;
2543
+ to: z.ZodNumber;
2544
+ }, "strip", z.ZodTypeAny, {
2545
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2546
+ from: number;
2547
+ to: number;
2548
+ }, {
2549
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2550
+ from: number;
2551
+ to: number;
2552
+ }>, "many">;
2553
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
2554
+ }, "strip", z.ZodTypeAny, {
2555
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2556
+ startDate: string | null;
2557
+ endDate: string | null;
2558
+ timeIntervals: {
2559
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2560
+ from: number;
2561
+ to: number;
2562
+ }[];
2563
+ }, {
2564
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2565
+ startDate: string | null;
2566
+ endDate: string | null;
2567
+ timeIntervals: {
2568
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2569
+ from: number;
2570
+ to: number;
2571
+ }[];
2572
+ }>>>;
2573
+ exclude: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2574
+ startDate: z.ZodNullable<z.ZodString>;
2575
+ endDate: z.ZodNullable<z.ZodString>;
2576
+ timeIntervals: z.ZodArray<z.ZodObject<{
2577
+ weekDay: z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>;
2578
+ from: z.ZodNumber;
2579
+ to: z.ZodNumber;
2580
+ }, "strip", z.ZodTypeAny, {
2581
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2582
+ from: number;
2583
+ to: number;
2584
+ }, {
2585
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2586
+ from: number;
2587
+ to: number;
2588
+ }>, "many">;
2589
+ repeat: z.ZodNullable<z.ZodEnum<["daily", "weekly", "monthly", "yearly"]>>;
2590
+ }, "strip", z.ZodTypeAny, {
2591
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2592
+ startDate: string | null;
2593
+ endDate: string | null;
2594
+ timeIntervals: {
2595
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2596
+ from: number;
2597
+ to: number;
2598
+ }[];
2599
+ }, {
2600
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2601
+ startDate: string | null;
2602
+ endDate: string | null;
2603
+ timeIntervals: {
2604
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2605
+ from: number;
2606
+ to: number;
2607
+ }[];
2608
+ }>>>;
1433
2609
  }, "strip", z.ZodTypeAny, {
1434
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1435
- objectId?: string | undefined;
2610
+ include?: {
2611
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2612
+ startDate: string | null;
2613
+ endDate: string | null;
2614
+ timeIntervals: {
2615
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2616
+ from: number;
2617
+ to: number;
2618
+ }[];
2619
+ } | null | undefined;
2620
+ exclude?: {
2621
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2622
+ startDate: string | null;
2623
+ endDate: string | null;
2624
+ timeIntervals: {
2625
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2626
+ from: number;
2627
+ to: number;
2628
+ }[];
2629
+ } | null | undefined;
2630
+ displayName?: string | undefined;
2631
+ flag?: "always" | "never" | null | undefined;
1436
2632
  }, {
1437
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1438
- objectId?: string | undefined;
2633
+ include?: {
2634
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2635
+ startDate: string | null;
2636
+ endDate: string | null;
2637
+ timeIntervals: {
2638
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2639
+ from: number;
2640
+ to: number;
2641
+ }[];
2642
+ } | null | undefined;
2643
+ exclude?: {
2644
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2645
+ startDate: string | null;
2646
+ endDate: string | null;
2647
+ timeIntervals: {
2648
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2649
+ from: number;
2650
+ to: number;
2651
+ }[];
2652
+ } | null | undefined;
2653
+ displayName?: string | undefined;
2654
+ flag?: "always" | "never" | null | undefined;
1439
2655
  }>;
1440
- right: z.ZodObject<{
1441
- kind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
1442
- objectId: z.ZodOptional<z.ZodString>;
2656
+ }, "strip", z.ZodTypeAny, {
2657
+ objectKind: "schedule";
2658
+ props: {
2659
+ include?: {
2660
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2661
+ startDate: string | null;
2662
+ endDate: string | null;
2663
+ timeIntervals: {
2664
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2665
+ from: number;
2666
+ to: number;
2667
+ }[];
2668
+ } | null | undefined;
2669
+ exclude?: {
2670
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2671
+ startDate: string | null;
2672
+ endDate: string | null;
2673
+ timeIntervals: {
2674
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2675
+ from: number;
2676
+ to: number;
2677
+ }[];
2678
+ } | null | undefined;
2679
+ displayName?: string | undefined;
2680
+ flag?: "always" | "never" | null | undefined;
2681
+ };
2682
+ }, {
2683
+ objectKind: "schedule";
2684
+ props: {
2685
+ include?: {
2686
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2687
+ startDate: string | null;
2688
+ endDate: string | null;
2689
+ timeIntervals: {
2690
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2691
+ from: number;
2692
+ to: number;
2693
+ }[];
2694
+ } | null | undefined;
2695
+ exclude?: {
2696
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2697
+ startDate: string | null;
2698
+ endDate: string | null;
2699
+ timeIntervals: {
2700
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2701
+ from: number;
2702
+ to: number;
2703
+ }[];
2704
+ } | null | undefined;
2705
+ displayName?: string | undefined;
2706
+ flag?: "always" | "never" | null | undefined;
2707
+ };
2708
+ }>, z.ZodObject<{
2709
+ objectKind: z.ZodLiteral<"person">;
2710
+ props: z.ZodObject<{
2711
+ firstName: z.ZodOptional<z.ZodString>;
2712
+ lastName: z.ZodOptional<z.ZodString>;
2713
+ position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2714
+ accessSuspended: z.ZodOptional<z.ZodBoolean>;
2715
+ staffMember: z.ZodOptional<z.ZodBoolean>;
2716
+ validFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2717
+ validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2718
+ avatarId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2719
+ credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
2720
+ type: z.ZodEnum<["card", "pin", "fingerprint"]>;
2721
+ value: z.ZodString;
2722
+ }, "strip", z.ZodTypeAny, {
2723
+ type: "card" | "pin" | "fingerprint";
2724
+ value: string;
2725
+ }, {
2726
+ type: "card" | "pin" | "fingerprint";
2727
+ value: string;
2728
+ }>, "many">>;
2729
+ accessRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2730
+ customFields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1443
2731
  }, "strip", z.ZodTypeAny, {
1444
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1445
- objectId?: string | undefined;
2732
+ position?: string | null | undefined;
2733
+ firstName?: string | undefined;
2734
+ lastName?: string | undefined;
2735
+ avatarId?: string | null | undefined;
2736
+ validFrom?: string | null | undefined;
2737
+ validTo?: string | null | undefined;
2738
+ accessSuspended?: boolean | undefined;
2739
+ staffMember?: boolean | undefined;
2740
+ credentials?: {
2741
+ type: "card" | "pin" | "fingerprint";
2742
+ value: string;
2743
+ }[] | undefined;
2744
+ accessRules?: string[] | undefined;
2745
+ customFields?: Record<string, string> | null | undefined;
1446
2746
  }, {
1447
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1448
- objectId?: string | undefined;
2747
+ position?: string | null | undefined;
2748
+ firstName?: string | undefined;
2749
+ lastName?: string | undefined;
2750
+ avatarId?: string | null | undefined;
2751
+ validFrom?: string | null | undefined;
2752
+ validTo?: string | null | undefined;
2753
+ accessSuspended?: boolean | undefined;
2754
+ staffMember?: boolean | undefined;
2755
+ credentials?: {
2756
+ type: "card" | "pin" | "fingerprint";
2757
+ value: string;
2758
+ }[] | undefined;
2759
+ accessRules?: string[] | undefined;
2760
+ customFields?: Record<string, string> | null | undefined;
1449
2761
  }>;
1450
- linkExists: z.ZodBoolean;
1451
2762
  }, "strip", z.ZodTypeAny, {
1452
- left: {
1453
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1454
- objectId?: string | undefined;
2763
+ objectKind: "person";
2764
+ props: {
2765
+ position?: string | null | undefined;
2766
+ firstName?: string | undefined;
2767
+ lastName?: string | undefined;
2768
+ avatarId?: string | null | undefined;
2769
+ validFrom?: string | null | undefined;
2770
+ validTo?: string | null | undefined;
2771
+ accessSuspended?: boolean | undefined;
2772
+ staffMember?: boolean | undefined;
2773
+ credentials?: {
2774
+ type: "card" | "pin" | "fingerprint";
2775
+ value: string;
2776
+ }[] | undefined;
2777
+ accessRules?: string[] | undefined;
2778
+ customFields?: Record<string, string> | null | undefined;
1455
2779
  };
1456
- right: {
1457
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1458
- objectId?: string | undefined;
1459
- };
1460
- kind: "relation-merge";
1461
- linkExists: boolean;
1462
2780
  }, {
1463
- left: {
1464
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1465
- objectId?: string | undefined;
2781
+ objectKind: "person";
2782
+ props: {
2783
+ position?: string | null | undefined;
2784
+ firstName?: string | undefined;
2785
+ lastName?: string | undefined;
2786
+ avatarId?: string | null | undefined;
2787
+ validFrom?: string | null | undefined;
2788
+ validTo?: string | null | undefined;
2789
+ accessSuspended?: boolean | undefined;
2790
+ staffMember?: boolean | undefined;
2791
+ credentials?: {
2792
+ type: "card" | "pin" | "fingerprint";
2793
+ value: string;
2794
+ }[] | undefined;
2795
+ accessRules?: string[] | undefined;
2796
+ customFields?: Record<string, string> | null | undefined;
2797
+ };
2798
+ }>, z.ZodObject<{
2799
+ objectKind: z.ZodLiteral<"zone">;
2800
+ props: z.ZodObject<{
2801
+ displayName: z.ZodOptional<z.ZodString>;
2802
+ devices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2803
+ }, "strip", z.ZodTypeAny, {
2804
+ displayName?: string | undefined;
2805
+ devices?: string[] | undefined;
2806
+ }, {
2807
+ displayName?: string | undefined;
2808
+ devices?: string[] | undefined;
2809
+ }>;
2810
+ }, "strip", z.ZodTypeAny, {
2811
+ objectKind: "zone";
2812
+ props: {
2813
+ displayName?: string | undefined;
2814
+ devices?: string[] | undefined;
1466
2815
  };
1467
- right: {
1468
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1469
- objectId?: string | undefined;
2816
+ }, {
2817
+ objectKind: "zone";
2818
+ props: {
2819
+ displayName?: string | undefined;
2820
+ devices?: string[] | undefined;
1470
2821
  };
1471
- kind: "relation-merge";
1472
- linkExists: boolean;
2822
+ }>]>>, z.ZodObject<{
2823
+ kind: z.ZodLiteral<"delete">;
2824
+ objectId: z.ZodString;
2825
+ objectKind: z.ZodEnum<["accessRule", "schedule", "person", "device", "zone"]>;
2826
+ }, "strip", z.ZodTypeAny, {
2827
+ kind: "delete";
2828
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2829
+ objectId: string;
2830
+ }, {
2831
+ kind: "delete";
2832
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2833
+ objectId: string;
1473
2834
  }>]>, "many">;
1474
2835
  }, "strip", z.ZodTypeAny, {
1475
2836
  kind: "apply-change";
1476
2837
  devices: Record<string, Record<string, unknown>>;
1477
2838
  provider: string;
1478
2839
  refMap: Record<string, Record<string, string[]>>;
1479
- mutations: ({
2840
+ mutations: (({
1480
2841
  kind: "merge";
1481
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1482
2842
  objectId: string;
1483
- props: Record<string, unknown>;
2843
+ } & ({
2844
+ objectKind: "accessRule";
2845
+ props: {
2846
+ displayName?: string | undefined;
2847
+ appliedTo?: string[] | undefined;
2848
+ permissions?: {
2849
+ deviceId: string;
2850
+ scheduleId: string;
2851
+ }[] | undefined;
2852
+ groupPermissions?: {
2853
+ scheduleId: string;
2854
+ groupId: string;
2855
+ }[] | undefined;
2856
+ };
1484
2857
  } | {
1485
- kind: "delete";
1486
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1487
- objectId: string;
2858
+ objectKind: "schedule";
2859
+ props: {
2860
+ include?: {
2861
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2862
+ startDate: string | null;
2863
+ endDate: string | null;
2864
+ timeIntervals: {
2865
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2866
+ from: number;
2867
+ to: number;
2868
+ }[];
2869
+ } | null | undefined;
2870
+ exclude?: {
2871
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2872
+ startDate: string | null;
2873
+ endDate: string | null;
2874
+ timeIntervals: {
2875
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2876
+ from: number;
2877
+ to: number;
2878
+ }[];
2879
+ } | null | undefined;
2880
+ displayName?: string | undefined;
2881
+ flag?: "always" | "never" | null | undefined;
2882
+ };
1488
2883
  } | {
1489
- left: {
1490
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1491
- objectId?: string | undefined;
2884
+ objectKind: "person";
2885
+ props: {
2886
+ position?: string | null | undefined;
2887
+ firstName?: string | undefined;
2888
+ lastName?: string | undefined;
2889
+ avatarId?: string | null | undefined;
2890
+ validFrom?: string | null | undefined;
2891
+ validTo?: string | null | undefined;
2892
+ accessSuspended?: boolean | undefined;
2893
+ staffMember?: boolean | undefined;
2894
+ credentials?: {
2895
+ type: "card" | "pin" | "fingerprint";
2896
+ value: string;
2897
+ }[] | undefined;
2898
+ accessRules?: string[] | undefined;
2899
+ customFields?: Record<string, string> | null | undefined;
1492
2900
  };
1493
- right: {
1494
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1495
- objectId?: string | undefined;
2901
+ } | {
2902
+ objectKind: "zone";
2903
+ props: {
2904
+ displayName?: string | undefined;
2905
+ devices?: string[] | undefined;
1496
2906
  };
1497
- kind: "relation-merge";
1498
- linkExists: boolean;
2907
+ })) | {
2908
+ kind: "delete";
2909
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2910
+ objectId: string;
1499
2911
  })[];
1500
2912
  }, {
1501
2913
  kind: "apply-change";
1502
2914
  devices: Record<string, Record<string, unknown>>;
1503
2915
  provider: string;
1504
2916
  refMap: Record<string, Record<string, string[]>>;
1505
- mutations: ({
2917
+ mutations: (({
1506
2918
  kind: "merge";
1507
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1508
2919
  objectId: string;
1509
- props: Record<string, unknown>;
2920
+ } & ({
2921
+ objectKind: "accessRule";
2922
+ props: {
2923
+ displayName?: string | undefined;
2924
+ appliedTo?: string[] | undefined;
2925
+ permissions?: {
2926
+ deviceId: string;
2927
+ scheduleId: string;
2928
+ }[] | undefined;
2929
+ groupPermissions?: {
2930
+ scheduleId: string;
2931
+ groupId: string;
2932
+ }[] | undefined;
2933
+ };
1510
2934
  } | {
1511
- kind: "delete";
1512
- objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
1513
- objectId: string;
2935
+ objectKind: "schedule";
2936
+ props: {
2937
+ include?: {
2938
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2939
+ startDate: string | null;
2940
+ endDate: string | null;
2941
+ timeIntervals: {
2942
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2943
+ from: number;
2944
+ to: number;
2945
+ }[];
2946
+ } | null | undefined;
2947
+ exclude?: {
2948
+ repeat: "daily" | "weekly" | "monthly" | "yearly" | null;
2949
+ startDate: string | null;
2950
+ endDate: string | null;
2951
+ timeIntervals: {
2952
+ weekDay: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
2953
+ from: number;
2954
+ to: number;
2955
+ }[];
2956
+ } | null | undefined;
2957
+ displayName?: string | undefined;
2958
+ flag?: "always" | "never" | null | undefined;
2959
+ };
1514
2960
  } | {
1515
- left: {
1516
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1517
- objectId?: string | undefined;
2961
+ objectKind: "person";
2962
+ props: {
2963
+ position?: string | null | undefined;
2964
+ firstName?: string | undefined;
2965
+ lastName?: string | undefined;
2966
+ avatarId?: string | null | undefined;
2967
+ validFrom?: string | null | undefined;
2968
+ validTo?: string | null | undefined;
2969
+ accessSuspended?: boolean | undefined;
2970
+ staffMember?: boolean | undefined;
2971
+ credentials?: {
2972
+ type: "card" | "pin" | "fingerprint";
2973
+ value: string;
2974
+ }[] | undefined;
2975
+ accessRules?: string[] | undefined;
2976
+ customFields?: Record<string, string> | null | undefined;
1518
2977
  };
1519
- right: {
1520
- kind: "person" | "zone" | "device" | "schedule" | "accessRule";
1521
- objectId?: string | undefined;
2978
+ } | {
2979
+ objectKind: "zone";
2980
+ props: {
2981
+ displayName?: string | undefined;
2982
+ devices?: string[] | undefined;
1522
2983
  };
1523
- kind: "relation-merge";
1524
- linkExists: boolean;
2984
+ })) | {
2985
+ kind: "delete";
2986
+ objectKind: "person" | "zone" | "device" | "schedule" | "accessRule";
2987
+ objectId: string;
1525
2988
  })[];
1526
2989
  }>;
1527
2990
  export declare const sApplyChangeRs: z.ZodIntersection<z.ZodObject<{