@awarevue/api-types 1.0.2 → 1.0.3
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.
|
@@ -1033,36 +1033,30 @@ export declare const sGetAvailableDevicesRs: z.ZodIntersection<z.ZodObject<{
|
|
|
1033
1033
|
export declare const sObjectMerge: z.ZodObject<{
|
|
1034
1034
|
kind: z.ZodLiteral<"merge">;
|
|
1035
1035
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1036
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1037
1036
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1038
1037
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1039
1038
|
}, "strip", z.ZodTypeAny, {
|
|
1040
1039
|
kind: "merge";
|
|
1041
1040
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1042
|
-
objectForeignRefs: string[];
|
|
1043
1041
|
props: Record<string, unknown>;
|
|
1044
1042
|
objectId?: string | undefined;
|
|
1045
1043
|
}, {
|
|
1046
1044
|
kind: "merge";
|
|
1047
1045
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1048
|
-
objectForeignRefs: string[];
|
|
1049
1046
|
props: Record<string, unknown>;
|
|
1050
1047
|
objectId?: string | undefined;
|
|
1051
1048
|
}>;
|
|
1052
1049
|
export declare const sObjectDelete: z.ZodObject<{
|
|
1053
1050
|
kind: z.ZodLiteral<"delete">;
|
|
1054
1051
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1055
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1056
1052
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1057
1053
|
}, "strip", z.ZodTypeAny, {
|
|
1058
1054
|
kind: "delete";
|
|
1059
1055
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1060
|
-
objectForeignRefs: string[];
|
|
1061
1056
|
objectId?: string | undefined;
|
|
1062
1057
|
}, {
|
|
1063
1058
|
kind: "delete";
|
|
1064
1059
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1065
|
-
objectForeignRefs: string[];
|
|
1066
1060
|
objectId?: string | undefined;
|
|
1067
1061
|
}>;
|
|
1068
1062
|
export declare const sRelationMerge: z.ZodObject<{
|
|
@@ -1070,39 +1064,31 @@ export declare const sRelationMerge: z.ZodObject<{
|
|
|
1070
1064
|
left: z.ZodObject<{
|
|
1071
1065
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1072
1066
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1073
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1074
1067
|
}, "strip", z.ZodTypeAny, {
|
|
1075
1068
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1076
|
-
objectForeignRefs: string[];
|
|
1077
1069
|
objectId?: string | undefined;
|
|
1078
1070
|
}, {
|
|
1079
1071
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1080
|
-
objectForeignRefs: string[];
|
|
1081
1072
|
objectId?: string | undefined;
|
|
1082
1073
|
}>;
|
|
1083
1074
|
right: z.ZodObject<{
|
|
1084
1075
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1085
1076
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1086
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1087
1077
|
}, "strip", z.ZodTypeAny, {
|
|
1088
1078
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1089
|
-
objectForeignRefs: string[];
|
|
1090
1079
|
objectId?: string | undefined;
|
|
1091
1080
|
}, {
|
|
1092
1081
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1093
|
-
objectForeignRefs: string[];
|
|
1094
1082
|
objectId?: string | undefined;
|
|
1095
1083
|
}>;
|
|
1096
1084
|
linkExists: z.ZodBoolean;
|
|
1097
1085
|
}, "strip", z.ZodTypeAny, {
|
|
1098
1086
|
left: {
|
|
1099
1087
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1100
|
-
objectForeignRefs: string[];
|
|
1101
1088
|
objectId?: string | undefined;
|
|
1102
1089
|
};
|
|
1103
1090
|
right: {
|
|
1104
1091
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1105
|
-
objectForeignRefs: string[];
|
|
1106
1092
|
objectId?: string | undefined;
|
|
1107
1093
|
};
|
|
1108
1094
|
kind: "relation-merge";
|
|
@@ -1110,12 +1096,10 @@ export declare const sRelationMerge: z.ZodObject<{
|
|
|
1110
1096
|
}, {
|
|
1111
1097
|
left: {
|
|
1112
1098
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1113
|
-
objectForeignRefs: string[];
|
|
1114
1099
|
objectId?: string | undefined;
|
|
1115
1100
|
};
|
|
1116
1101
|
right: {
|
|
1117
1102
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1118
|
-
objectForeignRefs: string[];
|
|
1119
1103
|
objectId?: string | undefined;
|
|
1120
1104
|
};
|
|
1121
1105
|
kind: "relation-merge";
|
|
@@ -1124,74 +1108,60 @@ export declare const sRelationMerge: z.ZodObject<{
|
|
|
1124
1108
|
export declare const sAccessMutation: z.ZodUnion<[z.ZodObject<{
|
|
1125
1109
|
kind: z.ZodLiteral<"merge">;
|
|
1126
1110
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1127
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1128
1111
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1129
1112
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1130
1113
|
}, "strip", z.ZodTypeAny, {
|
|
1131
1114
|
kind: "merge";
|
|
1132
1115
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1133
|
-
objectForeignRefs: string[];
|
|
1134
1116
|
props: Record<string, unknown>;
|
|
1135
1117
|
objectId?: string | undefined;
|
|
1136
1118
|
}, {
|
|
1137
1119
|
kind: "merge";
|
|
1138
1120
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1139
|
-
objectForeignRefs: string[];
|
|
1140
1121
|
props: Record<string, unknown>;
|
|
1141
1122
|
objectId?: string | undefined;
|
|
1142
1123
|
}>, z.ZodObject<{
|
|
1143
1124
|
kind: z.ZodLiteral<"delete">;
|
|
1144
1125
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1145
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1146
1126
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1147
1127
|
}, "strip", z.ZodTypeAny, {
|
|
1148
1128
|
kind: "delete";
|
|
1149
1129
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1150
|
-
objectForeignRefs: string[];
|
|
1151
1130
|
objectId?: string | undefined;
|
|
1152
1131
|
}, {
|
|
1153
1132
|
kind: "delete";
|
|
1154
1133
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1155
|
-
objectForeignRefs: string[];
|
|
1156
1134
|
objectId?: string | undefined;
|
|
1157
1135
|
}>, z.ZodObject<{
|
|
1158
1136
|
kind: z.ZodLiteral<"relation-merge">;
|
|
1159
1137
|
left: z.ZodObject<{
|
|
1160
1138
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1161
1139
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1162
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1163
1140
|
}, "strip", z.ZodTypeAny, {
|
|
1164
1141
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1165
|
-
objectForeignRefs: string[];
|
|
1166
1142
|
objectId?: string | undefined;
|
|
1167
1143
|
}, {
|
|
1168
1144
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1169
|
-
objectForeignRefs: string[];
|
|
1170
1145
|
objectId?: string | undefined;
|
|
1171
1146
|
}>;
|
|
1172
1147
|
right: z.ZodObject<{
|
|
1173
1148
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1174
1149
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1175
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1176
1150
|
}, "strip", z.ZodTypeAny, {
|
|
1177
1151
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1178
|
-
objectForeignRefs: string[];
|
|
1179
1152
|
objectId?: string | undefined;
|
|
1180
1153
|
}, {
|
|
1181
1154
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1182
|
-
objectForeignRefs: string[];
|
|
1183
1155
|
objectId?: string | undefined;
|
|
1184
1156
|
}>;
|
|
1185
1157
|
linkExists: z.ZodBoolean;
|
|
1186
1158
|
}, "strip", z.ZodTypeAny, {
|
|
1187
1159
|
left: {
|
|
1188
1160
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1189
|
-
objectForeignRefs: string[];
|
|
1190
1161
|
objectId?: string | undefined;
|
|
1191
1162
|
};
|
|
1192
1163
|
right: {
|
|
1193
1164
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1194
|
-
objectForeignRefs: string[];
|
|
1195
1165
|
objectId?: string | undefined;
|
|
1196
1166
|
};
|
|
1197
1167
|
kind: "relation-merge";
|
|
@@ -1199,93 +1169,79 @@ export declare const sAccessMutation: z.ZodUnion<[z.ZodObject<{
|
|
|
1199
1169
|
}, {
|
|
1200
1170
|
left: {
|
|
1201
1171
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1202
|
-
objectForeignRefs: string[];
|
|
1203
1172
|
objectId?: string | undefined;
|
|
1204
1173
|
};
|
|
1205
1174
|
right: {
|
|
1206
1175
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1207
|
-
objectForeignRefs: string[];
|
|
1208
1176
|
objectId?: string | undefined;
|
|
1209
1177
|
};
|
|
1210
1178
|
kind: "relation-merge";
|
|
1211
1179
|
linkExists: boolean;
|
|
1212
1180
|
}>]>;
|
|
1213
1181
|
export declare const sDeviceMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1182
|
+
export declare const sRefMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1214
1183
|
export declare const sValidateChangeRq: z.ZodObject<{
|
|
1215
1184
|
kind: z.ZodLiteral<"validate-change">;
|
|
1216
1185
|
provider: z.ZodString;
|
|
1217
1186
|
devices: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1187
|
+
refMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1218
1188
|
mutations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1219
1189
|
kind: z.ZodLiteral<"merge">;
|
|
1220
1190
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1221
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1222
1191
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1223
1192
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1224
1193
|
}, "strip", z.ZodTypeAny, {
|
|
1225
1194
|
kind: "merge";
|
|
1226
1195
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1227
|
-
objectForeignRefs: string[];
|
|
1228
1196
|
props: Record<string, unknown>;
|
|
1229
1197
|
objectId?: string | undefined;
|
|
1230
1198
|
}, {
|
|
1231
1199
|
kind: "merge";
|
|
1232
1200
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1233
|
-
objectForeignRefs: string[];
|
|
1234
1201
|
props: Record<string, unknown>;
|
|
1235
1202
|
objectId?: string | undefined;
|
|
1236
1203
|
}>, z.ZodObject<{
|
|
1237
1204
|
kind: z.ZodLiteral<"delete">;
|
|
1238
1205
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1239
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1240
1206
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1241
1207
|
}, "strip", z.ZodTypeAny, {
|
|
1242
1208
|
kind: "delete";
|
|
1243
1209
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1244
|
-
objectForeignRefs: string[];
|
|
1245
1210
|
objectId?: string | undefined;
|
|
1246
1211
|
}, {
|
|
1247
1212
|
kind: "delete";
|
|
1248
1213
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1249
|
-
objectForeignRefs: string[];
|
|
1250
1214
|
objectId?: string | undefined;
|
|
1251
1215
|
}>, z.ZodObject<{
|
|
1252
1216
|
kind: z.ZodLiteral<"relation-merge">;
|
|
1253
1217
|
left: z.ZodObject<{
|
|
1254
1218
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1255
1219
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1256
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1257
1220
|
}, "strip", z.ZodTypeAny, {
|
|
1258
1221
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1259
|
-
objectForeignRefs: string[];
|
|
1260
1222
|
objectId?: string | undefined;
|
|
1261
1223
|
}, {
|
|
1262
1224
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1263
|
-
objectForeignRefs: string[];
|
|
1264
1225
|
objectId?: string | undefined;
|
|
1265
1226
|
}>;
|
|
1266
1227
|
right: z.ZodObject<{
|
|
1267
1228
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1268
1229
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1269
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1270
1230
|
}, "strip", z.ZodTypeAny, {
|
|
1271
1231
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1272
|
-
objectForeignRefs: string[];
|
|
1273
1232
|
objectId?: string | undefined;
|
|
1274
1233
|
}, {
|
|
1275
1234
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1276
|
-
objectForeignRefs: string[];
|
|
1277
1235
|
objectId?: string | undefined;
|
|
1278
1236
|
}>;
|
|
1279
1237
|
linkExists: z.ZodBoolean;
|
|
1280
1238
|
}, "strip", z.ZodTypeAny, {
|
|
1281
1239
|
left: {
|
|
1282
1240
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1283
|
-
objectForeignRefs: string[];
|
|
1284
1241
|
objectId?: string | undefined;
|
|
1285
1242
|
};
|
|
1286
1243
|
right: {
|
|
1287
1244
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1288
|
-
objectForeignRefs: string[];
|
|
1289
1245
|
objectId?: string | undefined;
|
|
1290
1246
|
};
|
|
1291
1247
|
kind: "relation-merge";
|
|
@@ -1293,12 +1249,10 @@ export declare const sValidateChangeRq: z.ZodObject<{
|
|
|
1293
1249
|
}, {
|
|
1294
1250
|
left: {
|
|
1295
1251
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1296
|
-
objectForeignRefs: string[];
|
|
1297
1252
|
objectId?: string | undefined;
|
|
1298
1253
|
};
|
|
1299
1254
|
right: {
|
|
1300
1255
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1301
|
-
objectForeignRefs: string[];
|
|
1302
1256
|
objectId?: string | undefined;
|
|
1303
1257
|
};
|
|
1304
1258
|
kind: "relation-merge";
|
|
@@ -1308,26 +1262,23 @@ export declare const sValidateChangeRq: z.ZodObject<{
|
|
|
1308
1262
|
kind: "validate-change";
|
|
1309
1263
|
devices: Record<string, Record<string, unknown>>;
|
|
1310
1264
|
provider: string;
|
|
1265
|
+
refMap: Record<string, Record<string, string[]>>;
|
|
1311
1266
|
mutations: ({
|
|
1312
1267
|
kind: "merge";
|
|
1313
1268
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1314
|
-
objectForeignRefs: string[];
|
|
1315
1269
|
props: Record<string, unknown>;
|
|
1316
1270
|
objectId?: string | undefined;
|
|
1317
1271
|
} | {
|
|
1318
1272
|
kind: "delete";
|
|
1319
1273
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1320
|
-
objectForeignRefs: string[];
|
|
1321
1274
|
objectId?: string | undefined;
|
|
1322
1275
|
} | {
|
|
1323
1276
|
left: {
|
|
1324
1277
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1325
|
-
objectForeignRefs: string[];
|
|
1326
1278
|
objectId?: string | undefined;
|
|
1327
1279
|
};
|
|
1328
1280
|
right: {
|
|
1329
1281
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1330
|
-
objectForeignRefs: string[];
|
|
1331
1282
|
objectId?: string | undefined;
|
|
1332
1283
|
};
|
|
1333
1284
|
kind: "relation-merge";
|
|
@@ -1337,26 +1288,23 @@ export declare const sValidateChangeRq: z.ZodObject<{
|
|
|
1337
1288
|
kind: "validate-change";
|
|
1338
1289
|
devices: Record<string, Record<string, unknown>>;
|
|
1339
1290
|
provider: string;
|
|
1291
|
+
refMap: Record<string, Record<string, string[]>>;
|
|
1340
1292
|
mutations: ({
|
|
1341
1293
|
kind: "merge";
|
|
1342
1294
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1343
|
-
objectForeignRefs: string[];
|
|
1344
1295
|
props: Record<string, unknown>;
|
|
1345
1296
|
objectId?: string | undefined;
|
|
1346
1297
|
} | {
|
|
1347
1298
|
kind: "delete";
|
|
1348
1299
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1349
|
-
objectForeignRefs: string[];
|
|
1350
1300
|
objectId?: string | undefined;
|
|
1351
1301
|
} | {
|
|
1352
1302
|
left: {
|
|
1353
1303
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1354
|
-
objectForeignRefs: string[];
|
|
1355
1304
|
objectId?: string | undefined;
|
|
1356
1305
|
};
|
|
1357
1306
|
right: {
|
|
1358
1307
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1359
|
-
objectForeignRefs: string[];
|
|
1360
1308
|
objectId?: string | undefined;
|
|
1361
1309
|
};
|
|
1362
1310
|
kind: "relation-merge";
|
|
@@ -1365,16 +1313,13 @@ export declare const sValidateChangeRq: z.ZodObject<{
|
|
|
1365
1313
|
}>;
|
|
1366
1314
|
export declare const sChangeIssue: z.ZodObject<{
|
|
1367
1315
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1368
|
-
objectForeignRef: z.ZodOptional<z.ZodString>;
|
|
1369
1316
|
issue: z.ZodString;
|
|
1370
1317
|
}, "strip", z.ZodTypeAny, {
|
|
1371
1318
|
issue: string;
|
|
1372
1319
|
objectId?: string | undefined;
|
|
1373
|
-
objectForeignRef?: string | undefined;
|
|
1374
1320
|
}, {
|
|
1375
1321
|
issue: string;
|
|
1376
1322
|
objectId?: string | undefined;
|
|
1377
|
-
objectForeignRef?: string | undefined;
|
|
1378
1323
|
}>;
|
|
1379
1324
|
export declare const sValidateChangeRs: z.ZodIntersection<z.ZodObject<{
|
|
1380
1325
|
requestId: z.ZodString;
|
|
@@ -1388,105 +1333,87 @@ export declare const sValidateChangeRs: z.ZodIntersection<z.ZodObject<{
|
|
|
1388
1333
|
}>, z.ZodObject<{
|
|
1389
1334
|
issues: z.ZodArray<z.ZodObject<{
|
|
1390
1335
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1391
|
-
objectForeignRef: z.ZodOptional<z.ZodString>;
|
|
1392
1336
|
issue: z.ZodString;
|
|
1393
1337
|
}, "strip", z.ZodTypeAny, {
|
|
1394
1338
|
issue: string;
|
|
1395
1339
|
objectId?: string | undefined;
|
|
1396
|
-
objectForeignRef?: string | undefined;
|
|
1397
1340
|
}, {
|
|
1398
1341
|
issue: string;
|
|
1399
1342
|
objectId?: string | undefined;
|
|
1400
|
-
objectForeignRef?: string | undefined;
|
|
1401
1343
|
}>, "many">;
|
|
1402
1344
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1403
1345
|
issues: {
|
|
1404
1346
|
issue: string;
|
|
1405
1347
|
objectId?: string | undefined;
|
|
1406
|
-
objectForeignRef?: string | undefined;
|
|
1407
1348
|
}[];
|
|
1408
1349
|
}, {
|
|
1409
1350
|
issues: {
|
|
1410
1351
|
issue: string;
|
|
1411
1352
|
objectId?: string | undefined;
|
|
1412
|
-
objectForeignRef?: string | undefined;
|
|
1413
1353
|
}[];
|
|
1414
1354
|
}>>;
|
|
1415
1355
|
export declare const sApplyChange: z.ZodObject<{
|
|
1416
1356
|
kind: z.ZodLiteral<"apply-change">;
|
|
1417
1357
|
provider: z.ZodString;
|
|
1418
1358
|
devices: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1359
|
+
refMap: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1419
1360
|
mutations: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1420
1361
|
kind: z.ZodLiteral<"merge">;
|
|
1421
1362
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1422
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1423
1363
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1424
1364
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1425
1365
|
}, "strip", z.ZodTypeAny, {
|
|
1426
1366
|
kind: "merge";
|
|
1427
1367
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1428
|
-
objectForeignRefs: string[];
|
|
1429
1368
|
props: Record<string, unknown>;
|
|
1430
1369
|
objectId?: string | undefined;
|
|
1431
1370
|
}, {
|
|
1432
1371
|
kind: "merge";
|
|
1433
1372
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1434
|
-
objectForeignRefs: string[];
|
|
1435
1373
|
props: Record<string, unknown>;
|
|
1436
1374
|
objectId?: string | undefined;
|
|
1437
1375
|
}>, z.ZodObject<{
|
|
1438
1376
|
kind: z.ZodLiteral<"delete">;
|
|
1439
1377
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1440
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1441
1378
|
objectKind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1442
1379
|
}, "strip", z.ZodTypeAny, {
|
|
1443
1380
|
kind: "delete";
|
|
1444
1381
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1445
|
-
objectForeignRefs: string[];
|
|
1446
1382
|
objectId?: string | undefined;
|
|
1447
1383
|
}, {
|
|
1448
1384
|
kind: "delete";
|
|
1449
1385
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1450
|
-
objectForeignRefs: string[];
|
|
1451
1386
|
objectId?: string | undefined;
|
|
1452
1387
|
}>, z.ZodObject<{
|
|
1453
1388
|
kind: z.ZodLiteral<"relation-merge">;
|
|
1454
1389
|
left: z.ZodObject<{
|
|
1455
1390
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1456
1391
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1457
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1458
1392
|
}, "strip", z.ZodTypeAny, {
|
|
1459
1393
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1460
|
-
objectForeignRefs: string[];
|
|
1461
1394
|
objectId?: string | undefined;
|
|
1462
1395
|
}, {
|
|
1463
1396
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1464
|
-
objectForeignRefs: string[];
|
|
1465
1397
|
objectId?: string | undefined;
|
|
1466
1398
|
}>;
|
|
1467
1399
|
right: z.ZodObject<{
|
|
1468
1400
|
kind: z.ZodEnum<["access-rule", "schedule", "zone", "person", "reader"]>;
|
|
1469
1401
|
objectId: z.ZodOptional<z.ZodString>;
|
|
1470
|
-
objectForeignRefs: z.ZodArray<z.ZodString, "many">;
|
|
1471
1402
|
}, "strip", z.ZodTypeAny, {
|
|
1472
1403
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1473
|
-
objectForeignRefs: string[];
|
|
1474
1404
|
objectId?: string | undefined;
|
|
1475
1405
|
}, {
|
|
1476
1406
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1477
|
-
objectForeignRefs: string[];
|
|
1478
1407
|
objectId?: string | undefined;
|
|
1479
1408
|
}>;
|
|
1480
1409
|
linkExists: z.ZodBoolean;
|
|
1481
1410
|
}, "strip", z.ZodTypeAny, {
|
|
1482
1411
|
left: {
|
|
1483
1412
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1484
|
-
objectForeignRefs: string[];
|
|
1485
1413
|
objectId?: string | undefined;
|
|
1486
1414
|
};
|
|
1487
1415
|
right: {
|
|
1488
1416
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1489
|
-
objectForeignRefs: string[];
|
|
1490
1417
|
objectId?: string | undefined;
|
|
1491
1418
|
};
|
|
1492
1419
|
kind: "relation-merge";
|
|
@@ -1494,12 +1421,10 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1494
1421
|
}, {
|
|
1495
1422
|
left: {
|
|
1496
1423
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1497
|
-
objectForeignRefs: string[];
|
|
1498
1424
|
objectId?: string | undefined;
|
|
1499
1425
|
};
|
|
1500
1426
|
right: {
|
|
1501
1427
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1502
|
-
objectForeignRefs: string[];
|
|
1503
1428
|
objectId?: string | undefined;
|
|
1504
1429
|
};
|
|
1505
1430
|
kind: "relation-merge";
|
|
@@ -1509,26 +1434,23 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1509
1434
|
kind: "apply-change";
|
|
1510
1435
|
devices: Record<string, Record<string, unknown>>;
|
|
1511
1436
|
provider: string;
|
|
1437
|
+
refMap: Record<string, Record<string, string[]>>;
|
|
1512
1438
|
mutations: ({
|
|
1513
1439
|
kind: "merge";
|
|
1514
1440
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1515
|
-
objectForeignRefs: string[];
|
|
1516
1441
|
props: Record<string, unknown>;
|
|
1517
1442
|
objectId?: string | undefined;
|
|
1518
1443
|
} | {
|
|
1519
1444
|
kind: "delete";
|
|
1520
1445
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1521
|
-
objectForeignRefs: string[];
|
|
1522
1446
|
objectId?: string | undefined;
|
|
1523
1447
|
} | {
|
|
1524
1448
|
left: {
|
|
1525
1449
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1526
|
-
objectForeignRefs: string[];
|
|
1527
1450
|
objectId?: string | undefined;
|
|
1528
1451
|
};
|
|
1529
1452
|
right: {
|
|
1530
1453
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1531
|
-
objectForeignRefs: string[];
|
|
1532
1454
|
objectId?: string | undefined;
|
|
1533
1455
|
};
|
|
1534
1456
|
kind: "relation-merge";
|
|
@@ -1538,26 +1460,23 @@ export declare const sApplyChange: z.ZodObject<{
|
|
|
1538
1460
|
kind: "apply-change";
|
|
1539
1461
|
devices: Record<string, Record<string, unknown>>;
|
|
1540
1462
|
provider: string;
|
|
1463
|
+
refMap: Record<string, Record<string, string[]>>;
|
|
1541
1464
|
mutations: ({
|
|
1542
1465
|
kind: "merge";
|
|
1543
1466
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1544
|
-
objectForeignRefs: string[];
|
|
1545
1467
|
props: Record<string, unknown>;
|
|
1546
1468
|
objectId?: string | undefined;
|
|
1547
1469
|
} | {
|
|
1548
1470
|
kind: "delete";
|
|
1549
1471
|
objectKind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1550
|
-
objectForeignRefs: string[];
|
|
1551
1472
|
objectId?: string | undefined;
|
|
1552
1473
|
} | {
|
|
1553
1474
|
left: {
|
|
1554
1475
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1555
|
-
objectForeignRefs: string[];
|
|
1556
1476
|
objectId?: string | undefined;
|
|
1557
1477
|
};
|
|
1558
1478
|
right: {
|
|
1559
1479
|
kind: "person" | "zone" | "reader" | "access-rule" | "schedule";
|
|
1560
|
-
objectForeignRefs: string[];
|
|
1561
1480
|
objectId?: string | undefined;
|
|
1562
1481
|
};
|
|
1563
1482
|
kind: "relation-merge";
|
|
@@ -1575,12 +1494,12 @@ export declare const sApplyChangeComplete: z.ZodIntersection<z.ZodObject<{
|
|
|
1575
1494
|
requestId: string;
|
|
1576
1495
|
}>, z.ZodObject<{
|
|
1577
1496
|
requestId: z.ZodString;
|
|
1578
|
-
refs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString
|
|
1497
|
+
refs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1579
1498
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1580
|
-
refs: Record<string, Record<string, string>>;
|
|
1499
|
+
refs: Record<string, Record<string, string[]>>;
|
|
1581
1500
|
requestId: string;
|
|
1582
1501
|
}, {
|
|
1583
|
-
refs: Record<string, Record<string, string>>;
|
|
1502
|
+
refs: Record<string, Record<string, string[]>>;
|
|
1584
1503
|
requestId: string;
|
|
1585
1504
|
}>>;
|
|
1586
1505
|
export declare const sApplyChangeProgress: z.ZodObject<{
|
|
@@ -1596,7 +1515,7 @@ export declare const sApplyChangeProgress: z.ZodObject<{
|
|
|
1596
1515
|
requestId: string;
|
|
1597
1516
|
mutationIndex: number;
|
|
1598
1517
|
}>;
|
|
1599
|
-
export declare const
|
|
1518
|
+
export declare const sAbortChange: z.ZodObject<{
|
|
1600
1519
|
kind: z.ZodLiteral<"abort-change">;
|
|
1601
1520
|
provider: z.ZodString;
|
|
1602
1521
|
policyVersion: z.ZodNumber;
|
|
@@ -1636,7 +1555,7 @@ export type AccessChangeIssue = z.infer<typeof sChangeIssue>;
|
|
|
1636
1555
|
export type AccessApplyChange = z.infer<typeof sApplyChange>;
|
|
1637
1556
|
export type AccessApplyChangeComplete = z.infer<typeof sApplyChangeComplete>;
|
|
1638
1557
|
export type AccessApplyChangeProgress = z.infer<typeof sApplyChangeProgress>;
|
|
1639
|
-
export type AccessAbortChange = z.infer<typeof
|
|
1558
|
+
export type AccessAbortChange = z.infer<typeof sAbortChange>;
|
|
1640
1559
|
export type AccessControlCapabilityReport = z.infer<typeof sAccessControlCapabilityReport>;
|
|
1641
1560
|
export type AccessTokenSpecs = z.infer<typeof sTokenSpecs>;
|
|
1642
1561
|
export type AccessObjectKind = z.infer<typeof sAccessObjectKind>;
|
|
@@ -1645,6 +1564,7 @@ export type UiOrderHint = z.infer<typeof sUiOrderHint>;
|
|
|
1645
1564
|
export type UiWidgetHint = z.infer<typeof sUiWidgetHint>;
|
|
1646
1565
|
export type ProviderSpecs = z.infer<typeof sProviderSpecs>;
|
|
1647
1566
|
export type ConfigurationIssue = z.infer<typeof sConfigurationIssue>;
|
|
1567
|
+
export type AccessRefMap = z.infer<typeof sRefMap>;
|
|
1648
1568
|
export type PayloadByKind = {
|
|
1649
1569
|
register: RegisterRq;
|
|
1650
1570
|
'register-rs': RegisterRs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.
|
|
3
|
+
exports.isMessageFromAgent = exports.getAgentMessageIssues = exports.sAbortChange = exports.sApplyChangeProgress = exports.sApplyChangeComplete = exports.sApplyChange = exports.sValidateChangeRs = exports.sChangeIssue = exports.sValidateChangeRq = exports.sRefMap = exports.sDeviceMap = exports.sAccessMutation = exports.sRelationMerge = exports.sObjectDelete = exports.sObjectMerge = exports.sGetAvailableDevicesRs = exports.sGetAvailableDevicesRq = exports.sPushEventRs = exports.sPushEventRq = exports.sPushStateUpdateRs = exports.sPushStateUpdateRq = exports.sRunCommandRs = exports.sRunCommandRq = exports.sStopServiceRs = exports.sStopServiceRq = exports.sStartServiceRs = exports.sStartServiceRq = exports.sValidateProviderConfigRs = exports.sConfigurationIssue = exports.sValidateProviderConfigRq = exports.sUnregister = exports.sRegisterRs = exports.sRegisterRq = exports.sAccessControlCapabilityReport = exports.sTokenSpecs = exports.sAccessObjectKind = exports.sProviderSpecs = exports.sUiHint = exports.sUiWidgetHint = exports.sUiOrderHint = exports.sErrorPayload = exports.sResponsePayload = exports.sMessageWithPayload = exports.sMessageHeader = void 0;
|
|
4
4
|
const device_1 = require("../device");
|
|
5
5
|
const device_import_1 = require("../device-import");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -180,9 +180,6 @@ exports.sObjectMerge = zod_1.z
|
|
|
180
180
|
.string()
|
|
181
181
|
.optional()
|
|
182
182
|
.describe('Object ID as in backend. Can be undefined if object is new to backend and agent is trying to create it'),
|
|
183
|
-
objectForeignRefs: zod_1.z
|
|
184
|
-
.array(zod_1.z.string())
|
|
185
|
-
.describe("Object foreign references as in target provider's repos. Can be undefined if object is new to agent and backend is trying to create it. It can be an array in case one access rule maps to many foreign refs"),
|
|
186
183
|
objectKind: exports.sAccessObjectKind,
|
|
187
184
|
props: zod_1.z.record(zod_1.z.unknown()),
|
|
188
185
|
})
|
|
@@ -194,9 +191,6 @@ exports.sObjectDelete = zod_1.z
|
|
|
194
191
|
.string()
|
|
195
192
|
.optional()
|
|
196
193
|
.describe('Object ID as in backend. Can be undefined if object is new to backend and agent is trying to create it'),
|
|
197
|
-
objectForeignRefs: zod_1.z
|
|
198
|
-
.array(zod_1.z.string())
|
|
199
|
-
.describe("Object foreign reference as in target provider's repos. Can be undefined if object is new to agent and backend is trying to create it"),
|
|
200
194
|
objectKind: exports.sAccessObjectKind,
|
|
201
195
|
})
|
|
202
196
|
.describe('Object delete request');
|
|
@@ -208,9 +202,6 @@ exports.sRelationMerge = zod_1.z.object({
|
|
|
208
202
|
.string()
|
|
209
203
|
.optional()
|
|
210
204
|
.describe('Object ID as in backend. Can be undefined if object is new to backend and agent is trying to create it'),
|
|
211
|
-
objectForeignRefs: zod_1.z
|
|
212
|
-
.array(zod_1.z.string())
|
|
213
|
-
.describe("Object foreign reference as in target provider's repos. Can be undefined if object is new to agent and backend is trying to create it"),
|
|
214
205
|
}),
|
|
215
206
|
right: zod_1.z.object({
|
|
216
207
|
kind: exports.sAccessObjectKind,
|
|
@@ -218,9 +209,6 @@ exports.sRelationMerge = zod_1.z.object({
|
|
|
218
209
|
.string()
|
|
219
210
|
.optional()
|
|
220
211
|
.describe('Object ID as in backend. Can be undefined if object is new to backend and agent is trying to create it'),
|
|
221
|
-
objectForeignRefs: zod_1.z
|
|
222
|
-
.array(zod_1.z.string())
|
|
223
|
-
.describe("Object foreign reference as in target provider's repos. Can be undefined if object is new to agent and backend is trying to create it"),
|
|
224
212
|
}),
|
|
225
213
|
linkExists: zod_1.z.boolean(),
|
|
226
214
|
});
|
|
@@ -230,19 +218,22 @@ exports.sAccessMutation = zod_1.z
|
|
|
230
218
|
exports.sDeviceMap = zod_1.z
|
|
231
219
|
.record(zod_1.z.record(zod_1.z.unknown()))
|
|
232
220
|
.describe('Map of devices (readers) and their stashed provider metadata');
|
|
221
|
+
exports.sRefMap = zod_1.z
|
|
222
|
+
.record(zod_1.z.record(zod_1.z.array(zod_1.z.string().nonempty())))
|
|
223
|
+
.describe('Map of foreign references to object IDs');
|
|
233
224
|
// A. VALIDATE ACCESS CHANGES
|
|
234
225
|
exports.sValidateChangeRq = zod_1.z
|
|
235
226
|
.object({
|
|
236
227
|
kind: zod_1.z.literal('validate-change'),
|
|
237
228
|
provider: zod_1.z.string().nonempty(),
|
|
238
229
|
devices: exports.sDeviceMap,
|
|
230
|
+
refMap: exports.sRefMap,
|
|
239
231
|
mutations: zod_1.z.array(exports.sAccessMutation),
|
|
240
232
|
})
|
|
241
233
|
.describe('Request to validate access changes');
|
|
242
234
|
exports.sChangeIssue = zod_1.z
|
|
243
235
|
.object({
|
|
244
236
|
objectId: zod_1.z.string().optional(),
|
|
245
|
-
objectForeignRef: zod_1.z.string().optional(),
|
|
246
237
|
issue: zod_1.z.string().nonempty(),
|
|
247
238
|
})
|
|
248
239
|
.describe('Access change issue description');
|
|
@@ -255,15 +246,14 @@ exports.sApplyChange = zod_1.z
|
|
|
255
246
|
kind: zod_1.z.literal('apply-change'),
|
|
256
247
|
provider: zod_1.z.string().nonempty(),
|
|
257
248
|
devices: exports.sDeviceMap,
|
|
249
|
+
refMap: exports.sRefMap,
|
|
258
250
|
mutations: zod_1.z.array(exports.sAccessMutation),
|
|
259
251
|
})
|
|
260
252
|
.describe('Request to apply access changes');
|
|
261
253
|
exports.sApplyChangeComplete = (0, exports.sResponsePayload)(zod_1.z.literal('apply-change-complete'), zod_1.z.object({
|
|
262
254
|
requestId: zod_1.z.string().nonempty(),
|
|
263
255
|
//error: z.string().optional().describe('Error message if request failed'),
|
|
264
|
-
refs:
|
|
265
|
-
.record(zod_1.z.record(zod_1.z.string().nonempty()))
|
|
266
|
-
.describe('Map of foreign references to object IDs'),
|
|
256
|
+
refs: exports.sRefMap,
|
|
267
257
|
})).describe('Response for applying access changes');
|
|
268
258
|
exports.sApplyChangeProgress = zod_1.z
|
|
269
259
|
.object({
|
|
@@ -277,7 +267,7 @@ exports.sApplyChangeProgress = zod_1.z
|
|
|
277
267
|
})
|
|
278
268
|
.describe('Progress of the access changes');
|
|
279
269
|
// C. ABORT CHANGES
|
|
280
|
-
exports.
|
|
270
|
+
exports.sAbortChange = zod_1.z
|
|
281
271
|
.object({
|
|
282
272
|
kind: zod_1.z.literal('abort-change'),
|
|
283
273
|
provider: zod_1.z.string().nonempty(),
|
package/dist/package.json
CHANGED