@primitivedotdev/sdk 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.js +3 -3
- package/dist/{api-CZIBnM4Q.js → api-3znV8SSN.js} +59 -8
- package/dist/contract/index.d.ts +8 -2
- package/dist/contract/index.js +7 -2
- package/dist/{errors-T_0JE528.d.ts → errors-CO-rv_nK.d.ts} +1 -1
- package/dist/{index-9Rqocr-c.d.ts → index-BKeS9sOb.d.ts} +209 -19
- package/dist/{index-EQZK4vWT.d.ts → index-D_v8-0zX.d.ts} +19 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-T3exFpgJ.js → operations.generated-x1Go1Xkb.js} +485 -11
- package/dist/parser/index.d.ts +2 -1
- package/dist/parser/index.js +2 -0
- package/dist/{types-Nslo1CU0.d.ts → types-BRWDMD7H.d.ts} +8 -0
- package/dist/webhook/index.d.ts +3 -3
- package/dist/webhook/index.js +1 -1
- package/dist/{webhook-Bra-g1q8.js → webhook-D4FTpj38.js} +643 -460
- package/package.json +1 -1
|
@@ -729,6 +729,13 @@ const schema18 = {
|
|
|
729
729
|
}, { "type": "null" }],
|
|
730
730
|
"description": "Parsed BCC header addresses. Null if the email had no BCC header. Note: BCC is only available for outgoing emails or when explicitly provided."
|
|
731
731
|
},
|
|
732
|
+
"to_addresses": {
|
|
733
|
+
"anyOf": [{
|
|
734
|
+
"type": "array",
|
|
735
|
+
"items": { "$ref": "#/definitions/EmailAddress" }
|
|
736
|
+
}, { "type": "null" }],
|
|
737
|
+
"description": "Parsed To header addresses. Null if the email had no To header."
|
|
738
|
+
},
|
|
732
739
|
"in_reply_to": {
|
|
733
740
|
"anyOf": [{
|
|
734
741
|
"type": "array",
|
|
@@ -765,6 +772,7 @@ const schema18 = {
|
|
|
765
772
|
"reply_to",
|
|
766
773
|
"cc",
|
|
767
774
|
"bcc",
|
|
775
|
+
"to_addresses",
|
|
768
776
|
"in_reply_to",
|
|
769
777
|
"references",
|
|
770
778
|
"attachments",
|
|
@@ -787,7 +795,7 @@ const schema19 = {
|
|
|
787
795
|
"required": ["address", "name"],
|
|
788
796
|
"description": "A parsed email address with optional display name.\n\nThis structure is used in the `parsed` section of the webhook payload (e.g., `reply_to`, `cc`, `bcc`). For unparsed header strings, see the `headers` section (e.g., `event.email.headers.from`)."
|
|
789
797
|
};
|
|
790
|
-
const
|
|
798
|
+
const schema23 = {
|
|
791
799
|
"type": "object",
|
|
792
800
|
"properties": {
|
|
793
801
|
"filename": {
|
|
@@ -916,122 +924,134 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
916
924
|
else vErrors.push(err6);
|
|
917
925
|
errors++;
|
|
918
926
|
}
|
|
919
|
-
if (data.
|
|
927
|
+
if (data.to_addresses === void 0) {
|
|
920
928
|
const err7 = {
|
|
921
929
|
instancePath,
|
|
922
930
|
schemaPath: "#/required",
|
|
923
931
|
keyword: "required",
|
|
924
|
-
params: { missingProperty: "
|
|
925
|
-
message: "must have required property '
|
|
932
|
+
params: { missingProperty: "to_addresses" },
|
|
933
|
+
message: "must have required property 'to_addresses'"
|
|
926
934
|
};
|
|
927
935
|
if (vErrors === null) vErrors = [err7];
|
|
928
936
|
else vErrors.push(err7);
|
|
929
937
|
errors++;
|
|
930
938
|
}
|
|
931
|
-
if (data.
|
|
939
|
+
if (data.in_reply_to === void 0) {
|
|
932
940
|
const err8 = {
|
|
933
941
|
instancePath,
|
|
934
942
|
schemaPath: "#/required",
|
|
935
943
|
keyword: "required",
|
|
936
|
-
params: { missingProperty: "
|
|
937
|
-
message: "must have required property '
|
|
944
|
+
params: { missingProperty: "in_reply_to" },
|
|
945
|
+
message: "must have required property 'in_reply_to'"
|
|
938
946
|
};
|
|
939
947
|
if (vErrors === null) vErrors = [err8];
|
|
940
948
|
else vErrors.push(err8);
|
|
941
949
|
errors++;
|
|
942
950
|
}
|
|
943
|
-
if (data.
|
|
951
|
+
if (data.references === void 0) {
|
|
944
952
|
const err9 = {
|
|
945
953
|
instancePath,
|
|
946
954
|
schemaPath: "#/required",
|
|
947
955
|
keyword: "required",
|
|
948
|
-
params: { missingProperty: "
|
|
949
|
-
message: "must have required property '
|
|
956
|
+
params: { missingProperty: "references" },
|
|
957
|
+
message: "must have required property 'references'"
|
|
950
958
|
};
|
|
951
959
|
if (vErrors === null) vErrors = [err9];
|
|
952
960
|
else vErrors.push(err9);
|
|
953
961
|
errors++;
|
|
954
962
|
}
|
|
955
|
-
if (data.
|
|
963
|
+
if (data.attachments === void 0) {
|
|
956
964
|
const err10 = {
|
|
957
965
|
instancePath,
|
|
958
966
|
schemaPath: "#/required",
|
|
959
967
|
keyword: "required",
|
|
960
|
-
params: { missingProperty: "
|
|
961
|
-
message: "must have required property '
|
|
968
|
+
params: { missingProperty: "attachments" },
|
|
969
|
+
message: "must have required property 'attachments'"
|
|
962
970
|
};
|
|
963
971
|
if (vErrors === null) vErrors = [err10];
|
|
964
972
|
else vErrors.push(err10);
|
|
965
973
|
errors++;
|
|
966
974
|
}
|
|
975
|
+
if (data.attachments_download_url === void 0) {
|
|
976
|
+
const err11 = {
|
|
977
|
+
instancePath,
|
|
978
|
+
schemaPath: "#/required",
|
|
979
|
+
keyword: "required",
|
|
980
|
+
params: { missingProperty: "attachments_download_url" },
|
|
981
|
+
message: "must have required property 'attachments_download_url'"
|
|
982
|
+
};
|
|
983
|
+
if (vErrors === null) vErrors = [err11];
|
|
984
|
+
else vErrors.push(err11);
|
|
985
|
+
errors++;
|
|
986
|
+
}
|
|
967
987
|
if (data.status !== void 0) {
|
|
968
988
|
let data0 = data.status;
|
|
969
989
|
if (typeof data0 !== "string") {
|
|
970
|
-
const
|
|
990
|
+
const err12 = {
|
|
971
991
|
instancePath: instancePath + "/status",
|
|
972
992
|
schemaPath: "#/properties/status/type",
|
|
973
993
|
keyword: "type",
|
|
974
994
|
params: { type: "string" },
|
|
975
995
|
message: "must be string"
|
|
976
996
|
};
|
|
977
|
-
if (vErrors === null) vErrors = [
|
|
978
|
-
else vErrors.push(
|
|
997
|
+
if (vErrors === null) vErrors = [err12];
|
|
998
|
+
else vErrors.push(err12);
|
|
979
999
|
errors++;
|
|
980
1000
|
}
|
|
981
1001
|
if ("complete" !== data0) {
|
|
982
|
-
const
|
|
1002
|
+
const err13 = {
|
|
983
1003
|
instancePath: instancePath + "/status",
|
|
984
1004
|
schemaPath: "#/properties/status/const",
|
|
985
1005
|
keyword: "const",
|
|
986
1006
|
params: { allowedValue: "complete" },
|
|
987
1007
|
message: "must be equal to constant"
|
|
988
1008
|
};
|
|
989
|
-
if (vErrors === null) vErrors = [
|
|
990
|
-
else vErrors.push(
|
|
1009
|
+
if (vErrors === null) vErrors = [err13];
|
|
1010
|
+
else vErrors.push(err13);
|
|
991
1011
|
errors++;
|
|
992
1012
|
}
|
|
993
1013
|
}
|
|
994
1014
|
if (data.error !== void 0) {
|
|
995
1015
|
if (data.error !== null) {
|
|
996
|
-
const
|
|
1016
|
+
const err14 = {
|
|
997
1017
|
instancePath: instancePath + "/error",
|
|
998
1018
|
schemaPath: "#/properties/error/type",
|
|
999
1019
|
keyword: "type",
|
|
1000
1020
|
params: { type: "null" },
|
|
1001
1021
|
message: "must be null"
|
|
1002
1022
|
};
|
|
1003
|
-
if (vErrors === null) vErrors = [
|
|
1004
|
-
else vErrors.push(
|
|
1023
|
+
if (vErrors === null) vErrors = [err14];
|
|
1024
|
+
else vErrors.push(err14);
|
|
1005
1025
|
errors++;
|
|
1006
1026
|
}
|
|
1007
1027
|
}
|
|
1008
1028
|
if (data.body_text !== void 0) {
|
|
1009
1029
|
let data2 = data.body_text;
|
|
1010
1030
|
if (typeof data2 !== "string" && data2 !== null) {
|
|
1011
|
-
const
|
|
1031
|
+
const err15 = {
|
|
1012
1032
|
instancePath: instancePath + "/body_text",
|
|
1013
1033
|
schemaPath: "#/properties/body_text/type",
|
|
1014
1034
|
keyword: "type",
|
|
1015
1035
|
params: { type: schema18.properties.body_text.type },
|
|
1016
1036
|
message: "must be string,null"
|
|
1017
1037
|
};
|
|
1018
|
-
if (vErrors === null) vErrors = [
|
|
1019
|
-
else vErrors.push(
|
|
1038
|
+
if (vErrors === null) vErrors = [err15];
|
|
1039
|
+
else vErrors.push(err15);
|
|
1020
1040
|
errors++;
|
|
1021
1041
|
}
|
|
1022
1042
|
}
|
|
1023
1043
|
if (data.body_html !== void 0) {
|
|
1024
1044
|
let data3 = data.body_html;
|
|
1025
1045
|
if (typeof data3 !== "string" && data3 !== null) {
|
|
1026
|
-
const
|
|
1046
|
+
const err16 = {
|
|
1027
1047
|
instancePath: instancePath + "/body_html",
|
|
1028
1048
|
schemaPath: "#/properties/body_html/type",
|
|
1029
1049
|
keyword: "type",
|
|
1030
1050
|
params: { type: schema18.properties.body_html.type },
|
|
1031
1051
|
message: "must be string,null"
|
|
1032
1052
|
};
|
|
1033
|
-
if (vErrors === null) vErrors = [
|
|
1034
|
-
else vErrors.push(
|
|
1053
|
+
if (vErrors === null) vErrors = [err16];
|
|
1054
|
+
else vErrors.push(err16);
|
|
1035
1055
|
errors++;
|
|
1036
1056
|
}
|
|
1037
1057
|
}
|
|
@@ -1046,81 +1066,81 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1046
1066
|
let data5 = data4[i0];
|
|
1047
1067
|
if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
|
|
1048
1068
|
if (data5.address === void 0) {
|
|
1049
|
-
const
|
|
1069
|
+
const err17 = {
|
|
1050
1070
|
instancePath: instancePath + "/reply_to/" + i0,
|
|
1051
1071
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1052
1072
|
keyword: "required",
|
|
1053
1073
|
params: { missingProperty: "address" },
|
|
1054
1074
|
message: "must have required property 'address'"
|
|
1055
1075
|
};
|
|
1056
|
-
if (vErrors === null) vErrors = [
|
|
1057
|
-
else vErrors.push(
|
|
1076
|
+
if (vErrors === null) vErrors = [err17];
|
|
1077
|
+
else vErrors.push(err17);
|
|
1058
1078
|
errors++;
|
|
1059
1079
|
}
|
|
1060
1080
|
if (data5.name === void 0) {
|
|
1061
|
-
const
|
|
1081
|
+
const err18 = {
|
|
1062
1082
|
instancePath: instancePath + "/reply_to/" + i0,
|
|
1063
1083
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1064
1084
|
keyword: "required",
|
|
1065
1085
|
params: { missingProperty: "name" },
|
|
1066
1086
|
message: "must have required property 'name'"
|
|
1067
1087
|
};
|
|
1068
|
-
if (vErrors === null) vErrors = [
|
|
1069
|
-
else vErrors.push(
|
|
1088
|
+
if (vErrors === null) vErrors = [err18];
|
|
1089
|
+
else vErrors.push(err18);
|
|
1070
1090
|
errors++;
|
|
1071
1091
|
}
|
|
1072
1092
|
if (data5.address !== void 0) {
|
|
1073
1093
|
if (typeof data5.address !== "string") {
|
|
1074
|
-
const
|
|
1094
|
+
const err19 = {
|
|
1075
1095
|
instancePath: instancePath + "/reply_to/" + i0 + "/address",
|
|
1076
1096
|
schemaPath: "#/definitions/EmailAddress/properties/address/type",
|
|
1077
1097
|
keyword: "type",
|
|
1078
1098
|
params: { type: "string" },
|
|
1079
1099
|
message: "must be string"
|
|
1080
1100
|
};
|
|
1081
|
-
if (vErrors === null) vErrors = [
|
|
1082
|
-
else vErrors.push(
|
|
1101
|
+
if (vErrors === null) vErrors = [err19];
|
|
1102
|
+
else vErrors.push(err19);
|
|
1083
1103
|
errors++;
|
|
1084
1104
|
}
|
|
1085
1105
|
}
|
|
1086
1106
|
if (data5.name !== void 0) {
|
|
1087
1107
|
let data7 = data5.name;
|
|
1088
1108
|
if (typeof data7 !== "string" && data7 !== null) {
|
|
1089
|
-
const
|
|
1109
|
+
const err20 = {
|
|
1090
1110
|
instancePath: instancePath + "/reply_to/" + i0 + "/name",
|
|
1091
1111
|
schemaPath: "#/definitions/EmailAddress/properties/name/type",
|
|
1092
1112
|
keyword: "type",
|
|
1093
1113
|
params: { type: schema19.properties.name.type },
|
|
1094
1114
|
message: "must be string,null"
|
|
1095
1115
|
};
|
|
1096
|
-
if (vErrors === null) vErrors = [
|
|
1097
|
-
else vErrors.push(
|
|
1116
|
+
if (vErrors === null) vErrors = [err20];
|
|
1117
|
+
else vErrors.push(err20);
|
|
1098
1118
|
errors++;
|
|
1099
1119
|
}
|
|
1100
1120
|
}
|
|
1101
1121
|
} else {
|
|
1102
|
-
const
|
|
1122
|
+
const err21 = {
|
|
1103
1123
|
instancePath: instancePath + "/reply_to/" + i0,
|
|
1104
1124
|
schemaPath: "#/definitions/EmailAddress/type",
|
|
1105
1125
|
keyword: "type",
|
|
1106
1126
|
params: { type: "object" },
|
|
1107
1127
|
message: "must be object"
|
|
1108
1128
|
};
|
|
1109
|
-
if (vErrors === null) vErrors = [
|
|
1110
|
-
else vErrors.push(
|
|
1129
|
+
if (vErrors === null) vErrors = [err21];
|
|
1130
|
+
else vErrors.push(err21);
|
|
1111
1131
|
errors++;
|
|
1112
1132
|
}
|
|
1113
1133
|
}
|
|
1114
1134
|
} else {
|
|
1115
|
-
const
|
|
1135
|
+
const err22 = {
|
|
1116
1136
|
instancePath: instancePath + "/reply_to",
|
|
1117
1137
|
schemaPath: "#/properties/reply_to/anyOf/0/type",
|
|
1118
1138
|
keyword: "type",
|
|
1119
1139
|
params: { type: "array" },
|
|
1120
1140
|
message: "must be array"
|
|
1121
1141
|
};
|
|
1122
|
-
if (vErrors === null) vErrors = [
|
|
1123
|
-
else vErrors.push(
|
|
1142
|
+
if (vErrors === null) vErrors = [err22];
|
|
1143
|
+
else vErrors.push(err22);
|
|
1124
1144
|
errors++;
|
|
1125
1145
|
}
|
|
1126
1146
|
var _valid0 = _errs11 === errors;
|
|
@@ -1128,30 +1148,30 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1128
1148
|
if (!valid1) {
|
|
1129
1149
|
const _errs20 = errors;
|
|
1130
1150
|
if (data4 !== null) {
|
|
1131
|
-
const
|
|
1151
|
+
const err23 = {
|
|
1132
1152
|
instancePath: instancePath + "/reply_to",
|
|
1133
1153
|
schemaPath: "#/properties/reply_to/anyOf/1/type",
|
|
1134
1154
|
keyword: "type",
|
|
1135
1155
|
params: { type: "null" },
|
|
1136
1156
|
message: "must be null"
|
|
1137
1157
|
};
|
|
1138
|
-
if (vErrors === null) vErrors = [
|
|
1139
|
-
else vErrors.push(
|
|
1158
|
+
if (vErrors === null) vErrors = [err23];
|
|
1159
|
+
else vErrors.push(err23);
|
|
1140
1160
|
errors++;
|
|
1141
1161
|
}
|
|
1142
1162
|
var _valid0 = _errs20 === errors;
|
|
1143
1163
|
valid1 = valid1 || _valid0;
|
|
1144
1164
|
}
|
|
1145
1165
|
if (!valid1) {
|
|
1146
|
-
const
|
|
1166
|
+
const err24 = {
|
|
1147
1167
|
instancePath: instancePath + "/reply_to",
|
|
1148
1168
|
schemaPath: "#/properties/reply_to/anyOf",
|
|
1149
1169
|
keyword: "anyOf",
|
|
1150
1170
|
params: {},
|
|
1151
1171
|
message: "must match a schema in anyOf"
|
|
1152
1172
|
};
|
|
1153
|
-
if (vErrors === null) vErrors = [
|
|
1154
|
-
else vErrors.push(
|
|
1173
|
+
if (vErrors === null) vErrors = [err24];
|
|
1174
|
+
else vErrors.push(err24);
|
|
1155
1175
|
errors++;
|
|
1156
1176
|
} else {
|
|
1157
1177
|
errors = _errs10;
|
|
@@ -1170,81 +1190,81 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1170
1190
|
let data9 = data8[i1];
|
|
1171
1191
|
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
1172
1192
|
if (data9.address === void 0) {
|
|
1173
|
-
const
|
|
1193
|
+
const err25 = {
|
|
1174
1194
|
instancePath: instancePath + "/cc/" + i1,
|
|
1175
1195
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1176
1196
|
keyword: "required",
|
|
1177
1197
|
params: { missingProperty: "address" },
|
|
1178
1198
|
message: "must have required property 'address'"
|
|
1179
1199
|
};
|
|
1180
|
-
if (vErrors === null) vErrors = [
|
|
1181
|
-
else vErrors.push(
|
|
1200
|
+
if (vErrors === null) vErrors = [err25];
|
|
1201
|
+
else vErrors.push(err25);
|
|
1182
1202
|
errors++;
|
|
1183
1203
|
}
|
|
1184
1204
|
if (data9.name === void 0) {
|
|
1185
|
-
const
|
|
1205
|
+
const err26 = {
|
|
1186
1206
|
instancePath: instancePath + "/cc/" + i1,
|
|
1187
1207
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1188
1208
|
keyword: "required",
|
|
1189
1209
|
params: { missingProperty: "name" },
|
|
1190
1210
|
message: "must have required property 'name'"
|
|
1191
1211
|
};
|
|
1192
|
-
if (vErrors === null) vErrors = [
|
|
1193
|
-
else vErrors.push(
|
|
1212
|
+
if (vErrors === null) vErrors = [err26];
|
|
1213
|
+
else vErrors.push(err26);
|
|
1194
1214
|
errors++;
|
|
1195
1215
|
}
|
|
1196
1216
|
if (data9.address !== void 0) {
|
|
1197
1217
|
if (typeof data9.address !== "string") {
|
|
1198
|
-
const
|
|
1218
|
+
const err27 = {
|
|
1199
1219
|
instancePath: instancePath + "/cc/" + i1 + "/address",
|
|
1200
1220
|
schemaPath: "#/definitions/EmailAddress/properties/address/type",
|
|
1201
1221
|
keyword: "type",
|
|
1202
1222
|
params: { type: "string" },
|
|
1203
1223
|
message: "must be string"
|
|
1204
1224
|
};
|
|
1205
|
-
if (vErrors === null) vErrors = [
|
|
1206
|
-
else vErrors.push(
|
|
1225
|
+
if (vErrors === null) vErrors = [err27];
|
|
1226
|
+
else vErrors.push(err27);
|
|
1207
1227
|
errors++;
|
|
1208
1228
|
}
|
|
1209
1229
|
}
|
|
1210
1230
|
if (data9.name !== void 0) {
|
|
1211
1231
|
let data11 = data9.name;
|
|
1212
1232
|
if (typeof data11 !== "string" && data11 !== null) {
|
|
1213
|
-
const
|
|
1233
|
+
const err28 = {
|
|
1214
1234
|
instancePath: instancePath + "/cc/" + i1 + "/name",
|
|
1215
1235
|
schemaPath: "#/definitions/EmailAddress/properties/name/type",
|
|
1216
1236
|
keyword: "type",
|
|
1217
1237
|
params: { type: schema19.properties.name.type },
|
|
1218
1238
|
message: "must be string,null"
|
|
1219
1239
|
};
|
|
1220
|
-
if (vErrors === null) vErrors = [
|
|
1221
|
-
else vErrors.push(
|
|
1240
|
+
if (vErrors === null) vErrors = [err28];
|
|
1241
|
+
else vErrors.push(err28);
|
|
1222
1242
|
errors++;
|
|
1223
1243
|
}
|
|
1224
1244
|
}
|
|
1225
1245
|
} else {
|
|
1226
|
-
const
|
|
1246
|
+
const err29 = {
|
|
1227
1247
|
instancePath: instancePath + "/cc/" + i1,
|
|
1228
1248
|
schemaPath: "#/definitions/EmailAddress/type",
|
|
1229
1249
|
keyword: "type",
|
|
1230
1250
|
params: { type: "object" },
|
|
1231
1251
|
message: "must be object"
|
|
1232
1252
|
};
|
|
1233
|
-
if (vErrors === null) vErrors = [
|
|
1234
|
-
else vErrors.push(
|
|
1253
|
+
if (vErrors === null) vErrors = [err29];
|
|
1254
|
+
else vErrors.push(err29);
|
|
1235
1255
|
errors++;
|
|
1236
1256
|
}
|
|
1237
1257
|
}
|
|
1238
1258
|
} else {
|
|
1239
|
-
const
|
|
1259
|
+
const err30 = {
|
|
1240
1260
|
instancePath: instancePath + "/cc",
|
|
1241
1261
|
schemaPath: "#/properties/cc/anyOf/0/type",
|
|
1242
1262
|
keyword: "type",
|
|
1243
1263
|
params: { type: "array" },
|
|
1244
1264
|
message: "must be array"
|
|
1245
1265
|
};
|
|
1246
|
-
if (vErrors === null) vErrors = [
|
|
1247
|
-
else vErrors.push(
|
|
1266
|
+
if (vErrors === null) vErrors = [err30];
|
|
1267
|
+
else vErrors.push(err30);
|
|
1248
1268
|
errors++;
|
|
1249
1269
|
}
|
|
1250
1270
|
var _valid1 = _errs24 === errors;
|
|
@@ -1252,30 +1272,30 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1252
1272
|
if (!valid6) {
|
|
1253
1273
|
const _errs33 = errors;
|
|
1254
1274
|
if (data8 !== null) {
|
|
1255
|
-
const
|
|
1275
|
+
const err31 = {
|
|
1256
1276
|
instancePath: instancePath + "/cc",
|
|
1257
1277
|
schemaPath: "#/properties/cc/anyOf/1/type",
|
|
1258
1278
|
keyword: "type",
|
|
1259
1279
|
params: { type: "null" },
|
|
1260
1280
|
message: "must be null"
|
|
1261
1281
|
};
|
|
1262
|
-
if (vErrors === null) vErrors = [
|
|
1263
|
-
else vErrors.push(
|
|
1282
|
+
if (vErrors === null) vErrors = [err31];
|
|
1283
|
+
else vErrors.push(err31);
|
|
1264
1284
|
errors++;
|
|
1265
1285
|
}
|
|
1266
1286
|
var _valid1 = _errs33 === errors;
|
|
1267
1287
|
valid6 = valid6 || _valid1;
|
|
1268
1288
|
}
|
|
1269
1289
|
if (!valid6) {
|
|
1270
|
-
const
|
|
1290
|
+
const err32 = {
|
|
1271
1291
|
instancePath: instancePath + "/cc",
|
|
1272
1292
|
schemaPath: "#/properties/cc/anyOf",
|
|
1273
1293
|
keyword: "anyOf",
|
|
1274
1294
|
params: {},
|
|
1275
1295
|
message: "must match a schema in anyOf"
|
|
1276
1296
|
};
|
|
1277
|
-
if (vErrors === null) vErrors = [
|
|
1278
|
-
else vErrors.push(
|
|
1297
|
+
if (vErrors === null) vErrors = [err32];
|
|
1298
|
+
else vErrors.push(err32);
|
|
1279
1299
|
errors++;
|
|
1280
1300
|
} else {
|
|
1281
1301
|
errors = _errs23;
|
|
@@ -1294,81 +1314,81 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1294
1314
|
let data13 = data12[i2];
|
|
1295
1315
|
if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
|
|
1296
1316
|
if (data13.address === void 0) {
|
|
1297
|
-
const
|
|
1317
|
+
const err33 = {
|
|
1298
1318
|
instancePath: instancePath + "/bcc/" + i2,
|
|
1299
1319
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1300
1320
|
keyword: "required",
|
|
1301
1321
|
params: { missingProperty: "address" },
|
|
1302
1322
|
message: "must have required property 'address'"
|
|
1303
1323
|
};
|
|
1304
|
-
if (vErrors === null) vErrors = [
|
|
1305
|
-
else vErrors.push(
|
|
1324
|
+
if (vErrors === null) vErrors = [err33];
|
|
1325
|
+
else vErrors.push(err33);
|
|
1306
1326
|
errors++;
|
|
1307
1327
|
}
|
|
1308
1328
|
if (data13.name === void 0) {
|
|
1309
|
-
const
|
|
1329
|
+
const err34 = {
|
|
1310
1330
|
instancePath: instancePath + "/bcc/" + i2,
|
|
1311
1331
|
schemaPath: "#/definitions/EmailAddress/required",
|
|
1312
1332
|
keyword: "required",
|
|
1313
1333
|
params: { missingProperty: "name" },
|
|
1314
1334
|
message: "must have required property 'name'"
|
|
1315
1335
|
};
|
|
1316
|
-
if (vErrors === null) vErrors = [
|
|
1317
|
-
else vErrors.push(
|
|
1336
|
+
if (vErrors === null) vErrors = [err34];
|
|
1337
|
+
else vErrors.push(err34);
|
|
1318
1338
|
errors++;
|
|
1319
1339
|
}
|
|
1320
1340
|
if (data13.address !== void 0) {
|
|
1321
1341
|
if (typeof data13.address !== "string") {
|
|
1322
|
-
const
|
|
1342
|
+
const err35 = {
|
|
1323
1343
|
instancePath: instancePath + "/bcc/" + i2 + "/address",
|
|
1324
1344
|
schemaPath: "#/definitions/EmailAddress/properties/address/type",
|
|
1325
1345
|
keyword: "type",
|
|
1326
1346
|
params: { type: "string" },
|
|
1327
1347
|
message: "must be string"
|
|
1328
1348
|
};
|
|
1329
|
-
if (vErrors === null) vErrors = [
|
|
1330
|
-
else vErrors.push(
|
|
1349
|
+
if (vErrors === null) vErrors = [err35];
|
|
1350
|
+
else vErrors.push(err35);
|
|
1331
1351
|
errors++;
|
|
1332
1352
|
}
|
|
1333
1353
|
}
|
|
1334
1354
|
if (data13.name !== void 0) {
|
|
1335
1355
|
let data15 = data13.name;
|
|
1336
1356
|
if (typeof data15 !== "string" && data15 !== null) {
|
|
1337
|
-
const
|
|
1357
|
+
const err36 = {
|
|
1338
1358
|
instancePath: instancePath + "/bcc/" + i2 + "/name",
|
|
1339
1359
|
schemaPath: "#/definitions/EmailAddress/properties/name/type",
|
|
1340
1360
|
keyword: "type",
|
|
1341
1361
|
params: { type: schema19.properties.name.type },
|
|
1342
1362
|
message: "must be string,null"
|
|
1343
1363
|
};
|
|
1344
|
-
if (vErrors === null) vErrors = [
|
|
1345
|
-
else vErrors.push(
|
|
1364
|
+
if (vErrors === null) vErrors = [err36];
|
|
1365
|
+
else vErrors.push(err36);
|
|
1346
1366
|
errors++;
|
|
1347
1367
|
}
|
|
1348
1368
|
}
|
|
1349
1369
|
} else {
|
|
1350
|
-
const
|
|
1370
|
+
const err37 = {
|
|
1351
1371
|
instancePath: instancePath + "/bcc/" + i2,
|
|
1352
1372
|
schemaPath: "#/definitions/EmailAddress/type",
|
|
1353
1373
|
keyword: "type",
|
|
1354
1374
|
params: { type: "object" },
|
|
1355
1375
|
message: "must be object"
|
|
1356
1376
|
};
|
|
1357
|
-
if (vErrors === null) vErrors = [
|
|
1358
|
-
else vErrors.push(
|
|
1377
|
+
if (vErrors === null) vErrors = [err37];
|
|
1378
|
+
else vErrors.push(err37);
|
|
1359
1379
|
errors++;
|
|
1360
1380
|
}
|
|
1361
1381
|
}
|
|
1362
1382
|
} else {
|
|
1363
|
-
const
|
|
1383
|
+
const err38 = {
|
|
1364
1384
|
instancePath: instancePath + "/bcc",
|
|
1365
1385
|
schemaPath: "#/properties/bcc/anyOf/0/type",
|
|
1366
1386
|
keyword: "type",
|
|
1367
1387
|
params: { type: "array" },
|
|
1368
1388
|
message: "must be array"
|
|
1369
1389
|
};
|
|
1370
|
-
if (vErrors === null) vErrors = [
|
|
1371
|
-
else vErrors.push(
|
|
1390
|
+
if (vErrors === null) vErrors = [err38];
|
|
1391
|
+
else vErrors.push(err38);
|
|
1372
1392
|
errors++;
|
|
1373
1393
|
}
|
|
1374
1394
|
var _valid2 = _errs37 === errors;
|
|
@@ -1376,30 +1396,30 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1376
1396
|
if (!valid11) {
|
|
1377
1397
|
const _errs46 = errors;
|
|
1378
1398
|
if (data12 !== null) {
|
|
1379
|
-
const
|
|
1399
|
+
const err39 = {
|
|
1380
1400
|
instancePath: instancePath + "/bcc",
|
|
1381
1401
|
schemaPath: "#/properties/bcc/anyOf/1/type",
|
|
1382
1402
|
keyword: "type",
|
|
1383
1403
|
params: { type: "null" },
|
|
1384
1404
|
message: "must be null"
|
|
1385
1405
|
};
|
|
1386
|
-
if (vErrors === null) vErrors = [
|
|
1387
|
-
else vErrors.push(
|
|
1406
|
+
if (vErrors === null) vErrors = [err39];
|
|
1407
|
+
else vErrors.push(err39);
|
|
1388
1408
|
errors++;
|
|
1389
1409
|
}
|
|
1390
1410
|
var _valid2 = _errs46 === errors;
|
|
1391
1411
|
valid11 = valid11 || _valid2;
|
|
1392
1412
|
}
|
|
1393
1413
|
if (!valid11) {
|
|
1394
|
-
const
|
|
1414
|
+
const err40 = {
|
|
1395
1415
|
instancePath: instancePath + "/bcc",
|
|
1396
1416
|
schemaPath: "#/properties/bcc/anyOf",
|
|
1397
1417
|
keyword: "anyOf",
|
|
1398
1418
|
params: {},
|
|
1399
1419
|
message: "must match a schema in anyOf"
|
|
1400
1420
|
};
|
|
1401
|
-
if (vErrors === null) vErrors = [
|
|
1402
|
-
else vErrors.push(
|
|
1421
|
+
if (vErrors === null) vErrors = [err40];
|
|
1422
|
+
else vErrors.push(err40);
|
|
1403
1423
|
errors++;
|
|
1404
1424
|
} else {
|
|
1405
1425
|
errors = _errs36;
|
|
@@ -1407,266 +1427,390 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1407
1427
|
else vErrors = null;
|
|
1408
1428
|
}
|
|
1409
1429
|
}
|
|
1410
|
-
if (data.
|
|
1411
|
-
let data16 = data.
|
|
1430
|
+
if (data.to_addresses !== void 0) {
|
|
1431
|
+
let data16 = data.to_addresses;
|
|
1412
1432
|
const _errs49 = errors;
|
|
1413
1433
|
let valid16 = false;
|
|
1414
1434
|
const _errs50 = errors;
|
|
1415
1435
|
if (Array.isArray(data16)) {
|
|
1416
1436
|
const len3 = data16.length;
|
|
1417
|
-
for (let i3 = 0; i3 < len3; i3++)
|
|
1418
|
-
|
|
1419
|
-
|
|
1437
|
+
for (let i3 = 0; i3 < len3; i3++) {
|
|
1438
|
+
let data17 = data16[i3];
|
|
1439
|
+
if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
|
|
1440
|
+
if (data17.address === void 0) {
|
|
1441
|
+
const err41 = {
|
|
1442
|
+
instancePath: instancePath + "/to_addresses/" + i3,
|
|
1443
|
+
schemaPath: "#/definitions/EmailAddress/required",
|
|
1444
|
+
keyword: "required",
|
|
1445
|
+
params: { missingProperty: "address" },
|
|
1446
|
+
message: "must have required property 'address'"
|
|
1447
|
+
};
|
|
1448
|
+
if (vErrors === null) vErrors = [err41];
|
|
1449
|
+
else vErrors.push(err41);
|
|
1450
|
+
errors++;
|
|
1451
|
+
}
|
|
1452
|
+
if (data17.name === void 0) {
|
|
1453
|
+
const err42 = {
|
|
1454
|
+
instancePath: instancePath + "/to_addresses/" + i3,
|
|
1455
|
+
schemaPath: "#/definitions/EmailAddress/required",
|
|
1456
|
+
keyword: "required",
|
|
1457
|
+
params: { missingProperty: "name" },
|
|
1458
|
+
message: "must have required property 'name'"
|
|
1459
|
+
};
|
|
1460
|
+
if (vErrors === null) vErrors = [err42];
|
|
1461
|
+
else vErrors.push(err42);
|
|
1462
|
+
errors++;
|
|
1463
|
+
}
|
|
1464
|
+
if (data17.address !== void 0) {
|
|
1465
|
+
if (typeof data17.address !== "string") {
|
|
1466
|
+
const err43 = {
|
|
1467
|
+
instancePath: instancePath + "/to_addresses/" + i3 + "/address",
|
|
1468
|
+
schemaPath: "#/definitions/EmailAddress/properties/address/type",
|
|
1469
|
+
keyword: "type",
|
|
1470
|
+
params: { type: "string" },
|
|
1471
|
+
message: "must be string"
|
|
1472
|
+
};
|
|
1473
|
+
if (vErrors === null) vErrors = [err43];
|
|
1474
|
+
else vErrors.push(err43);
|
|
1475
|
+
errors++;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
if (data17.name !== void 0) {
|
|
1479
|
+
let data19 = data17.name;
|
|
1480
|
+
if (typeof data19 !== "string" && data19 !== null) {
|
|
1481
|
+
const err44 = {
|
|
1482
|
+
instancePath: instancePath + "/to_addresses/" + i3 + "/name",
|
|
1483
|
+
schemaPath: "#/definitions/EmailAddress/properties/name/type",
|
|
1484
|
+
keyword: "type",
|
|
1485
|
+
params: { type: schema19.properties.name.type },
|
|
1486
|
+
message: "must be string,null"
|
|
1487
|
+
};
|
|
1488
|
+
if (vErrors === null) vErrors = [err44];
|
|
1489
|
+
else vErrors.push(err44);
|
|
1490
|
+
errors++;
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
} else {
|
|
1494
|
+
const err45 = {
|
|
1495
|
+
instancePath: instancePath + "/to_addresses/" + i3,
|
|
1496
|
+
schemaPath: "#/definitions/EmailAddress/type",
|
|
1497
|
+
keyword: "type",
|
|
1498
|
+
params: { type: "object" },
|
|
1499
|
+
message: "must be object"
|
|
1500
|
+
};
|
|
1501
|
+
if (vErrors === null) vErrors = [err45];
|
|
1502
|
+
else vErrors.push(err45);
|
|
1503
|
+
errors++;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
} else {
|
|
1507
|
+
const err46 = {
|
|
1508
|
+
instancePath: instancePath + "/to_addresses",
|
|
1509
|
+
schemaPath: "#/properties/to_addresses/anyOf/0/type",
|
|
1510
|
+
keyword: "type",
|
|
1511
|
+
params: { type: "array" },
|
|
1512
|
+
message: "must be array"
|
|
1513
|
+
};
|
|
1514
|
+
if (vErrors === null) vErrors = [err46];
|
|
1515
|
+
else vErrors.push(err46);
|
|
1516
|
+
errors++;
|
|
1517
|
+
}
|
|
1518
|
+
var _valid3 = _errs50 === errors;
|
|
1519
|
+
valid16 = valid16 || _valid3;
|
|
1520
|
+
if (!valid16) {
|
|
1521
|
+
const _errs59 = errors;
|
|
1522
|
+
if (data16 !== null) {
|
|
1523
|
+
const err47 = {
|
|
1524
|
+
instancePath: instancePath + "/to_addresses",
|
|
1525
|
+
schemaPath: "#/properties/to_addresses/anyOf/1/type",
|
|
1526
|
+
keyword: "type",
|
|
1527
|
+
params: { type: "null" },
|
|
1528
|
+
message: "must be null"
|
|
1529
|
+
};
|
|
1530
|
+
if (vErrors === null) vErrors = [err47];
|
|
1531
|
+
else vErrors.push(err47);
|
|
1532
|
+
errors++;
|
|
1533
|
+
}
|
|
1534
|
+
var _valid3 = _errs59 === errors;
|
|
1535
|
+
valid16 = valid16 || _valid3;
|
|
1536
|
+
}
|
|
1537
|
+
if (!valid16) {
|
|
1538
|
+
const err48 = {
|
|
1539
|
+
instancePath: instancePath + "/to_addresses",
|
|
1540
|
+
schemaPath: "#/properties/to_addresses/anyOf",
|
|
1541
|
+
keyword: "anyOf",
|
|
1542
|
+
params: {},
|
|
1543
|
+
message: "must match a schema in anyOf"
|
|
1544
|
+
};
|
|
1545
|
+
if (vErrors === null) vErrors = [err48];
|
|
1546
|
+
else vErrors.push(err48);
|
|
1547
|
+
errors++;
|
|
1548
|
+
} else {
|
|
1549
|
+
errors = _errs49;
|
|
1550
|
+
if (vErrors !== null) if (_errs49) vErrors.length = _errs49;
|
|
1551
|
+
else vErrors = null;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
if (data.in_reply_to !== void 0) {
|
|
1555
|
+
let data20 = data.in_reply_to;
|
|
1556
|
+
const _errs62 = errors;
|
|
1557
|
+
let valid21 = false;
|
|
1558
|
+
const _errs63 = errors;
|
|
1559
|
+
if (Array.isArray(data20)) {
|
|
1560
|
+
const len4 = data20.length;
|
|
1561
|
+
for (let i4 = 0; i4 < len4; i4++) if (typeof data20[i4] !== "string") {
|
|
1562
|
+
const err49 = {
|
|
1563
|
+
instancePath: instancePath + "/in_reply_to/" + i4,
|
|
1420
1564
|
schemaPath: "#/properties/in_reply_to/anyOf/0/items/type",
|
|
1421
1565
|
keyword: "type",
|
|
1422
1566
|
params: { type: "string" },
|
|
1423
1567
|
message: "must be string"
|
|
1424
1568
|
};
|
|
1425
|
-
if (vErrors === null) vErrors = [
|
|
1426
|
-
else vErrors.push(
|
|
1569
|
+
if (vErrors === null) vErrors = [err49];
|
|
1570
|
+
else vErrors.push(err49);
|
|
1427
1571
|
errors++;
|
|
1428
1572
|
}
|
|
1429
1573
|
} else {
|
|
1430
|
-
const
|
|
1574
|
+
const err50 = {
|
|
1431
1575
|
instancePath: instancePath + "/in_reply_to",
|
|
1432
1576
|
schemaPath: "#/properties/in_reply_to/anyOf/0/type",
|
|
1433
1577
|
keyword: "type",
|
|
1434
1578
|
params: { type: "array" },
|
|
1435
1579
|
message: "must be array"
|
|
1436
1580
|
};
|
|
1437
|
-
if (vErrors === null) vErrors = [
|
|
1438
|
-
else vErrors.push(
|
|
1581
|
+
if (vErrors === null) vErrors = [err50];
|
|
1582
|
+
else vErrors.push(err50);
|
|
1439
1583
|
errors++;
|
|
1440
1584
|
}
|
|
1441
|
-
var
|
|
1442
|
-
|
|
1443
|
-
if (!
|
|
1444
|
-
const
|
|
1445
|
-
if (
|
|
1446
|
-
const
|
|
1585
|
+
var _valid4 = _errs63 === errors;
|
|
1586
|
+
valid21 = valid21 || _valid4;
|
|
1587
|
+
if (!valid21) {
|
|
1588
|
+
const _errs67 = errors;
|
|
1589
|
+
if (data20 !== null) {
|
|
1590
|
+
const err51 = {
|
|
1447
1591
|
instancePath: instancePath + "/in_reply_to",
|
|
1448
1592
|
schemaPath: "#/properties/in_reply_to/anyOf/1/type",
|
|
1449
1593
|
keyword: "type",
|
|
1450
1594
|
params: { type: "null" },
|
|
1451
1595
|
message: "must be null"
|
|
1452
1596
|
};
|
|
1453
|
-
if (vErrors === null) vErrors = [
|
|
1454
|
-
else vErrors.push(
|
|
1597
|
+
if (vErrors === null) vErrors = [err51];
|
|
1598
|
+
else vErrors.push(err51);
|
|
1455
1599
|
errors++;
|
|
1456
1600
|
}
|
|
1457
|
-
var
|
|
1458
|
-
|
|
1601
|
+
var _valid4 = _errs67 === errors;
|
|
1602
|
+
valid21 = valid21 || _valid4;
|
|
1459
1603
|
}
|
|
1460
|
-
if (!
|
|
1461
|
-
const
|
|
1604
|
+
if (!valid21) {
|
|
1605
|
+
const err52 = {
|
|
1462
1606
|
instancePath: instancePath + "/in_reply_to",
|
|
1463
1607
|
schemaPath: "#/properties/in_reply_to/anyOf",
|
|
1464
1608
|
keyword: "anyOf",
|
|
1465
1609
|
params: {},
|
|
1466
1610
|
message: "must match a schema in anyOf"
|
|
1467
1611
|
};
|
|
1468
|
-
if (vErrors === null) vErrors = [
|
|
1469
|
-
else vErrors.push(
|
|
1612
|
+
if (vErrors === null) vErrors = [err52];
|
|
1613
|
+
else vErrors.push(err52);
|
|
1470
1614
|
errors++;
|
|
1471
1615
|
} else {
|
|
1472
|
-
errors =
|
|
1473
|
-
if (vErrors !== null) if (
|
|
1616
|
+
errors = _errs62;
|
|
1617
|
+
if (vErrors !== null) if (_errs62) vErrors.length = _errs62;
|
|
1474
1618
|
else vErrors = null;
|
|
1475
1619
|
}
|
|
1476
1620
|
}
|
|
1477
1621
|
if (data.references !== void 0) {
|
|
1478
|
-
let
|
|
1479
|
-
const
|
|
1480
|
-
let
|
|
1481
|
-
const
|
|
1482
|
-
if (Array.isArray(
|
|
1483
|
-
const
|
|
1484
|
-
for (let
|
|
1485
|
-
const
|
|
1486
|
-
instancePath: instancePath + "/references/" +
|
|
1622
|
+
let data22 = data.references;
|
|
1623
|
+
const _errs70 = errors;
|
|
1624
|
+
let valid24 = false;
|
|
1625
|
+
const _errs71 = errors;
|
|
1626
|
+
if (Array.isArray(data22)) {
|
|
1627
|
+
const len5 = data22.length;
|
|
1628
|
+
for (let i5 = 0; i5 < len5; i5++) if (typeof data22[i5] !== "string") {
|
|
1629
|
+
const err53 = {
|
|
1630
|
+
instancePath: instancePath + "/references/" + i5,
|
|
1487
1631
|
schemaPath: "#/properties/references/anyOf/0/items/type",
|
|
1488
1632
|
keyword: "type",
|
|
1489
1633
|
params: { type: "string" },
|
|
1490
1634
|
message: "must be string"
|
|
1491
1635
|
};
|
|
1492
|
-
if (vErrors === null) vErrors = [
|
|
1493
|
-
else vErrors.push(
|
|
1636
|
+
if (vErrors === null) vErrors = [err53];
|
|
1637
|
+
else vErrors.push(err53);
|
|
1494
1638
|
errors++;
|
|
1495
1639
|
}
|
|
1496
1640
|
} else {
|
|
1497
|
-
const
|
|
1641
|
+
const err54 = {
|
|
1498
1642
|
instancePath: instancePath + "/references",
|
|
1499
1643
|
schemaPath: "#/properties/references/anyOf/0/type",
|
|
1500
1644
|
keyword: "type",
|
|
1501
1645
|
params: { type: "array" },
|
|
1502
1646
|
message: "must be array"
|
|
1503
1647
|
};
|
|
1504
|
-
if (vErrors === null) vErrors = [
|
|
1505
|
-
else vErrors.push(
|
|
1648
|
+
if (vErrors === null) vErrors = [err54];
|
|
1649
|
+
else vErrors.push(err54);
|
|
1506
1650
|
errors++;
|
|
1507
1651
|
}
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1510
|
-
if (!
|
|
1511
|
-
const
|
|
1512
|
-
if (
|
|
1513
|
-
const
|
|
1652
|
+
var _valid5 = _errs71 === errors;
|
|
1653
|
+
valid24 = valid24 || _valid5;
|
|
1654
|
+
if (!valid24) {
|
|
1655
|
+
const _errs75 = errors;
|
|
1656
|
+
if (data22 !== null) {
|
|
1657
|
+
const err55 = {
|
|
1514
1658
|
instancePath: instancePath + "/references",
|
|
1515
1659
|
schemaPath: "#/properties/references/anyOf/1/type",
|
|
1516
1660
|
keyword: "type",
|
|
1517
1661
|
params: { type: "null" },
|
|
1518
1662
|
message: "must be null"
|
|
1519
1663
|
};
|
|
1520
|
-
if (vErrors === null) vErrors = [
|
|
1521
|
-
else vErrors.push(
|
|
1664
|
+
if (vErrors === null) vErrors = [err55];
|
|
1665
|
+
else vErrors.push(err55);
|
|
1522
1666
|
errors++;
|
|
1523
1667
|
}
|
|
1524
|
-
var
|
|
1525
|
-
|
|
1668
|
+
var _valid5 = _errs75 === errors;
|
|
1669
|
+
valid24 = valid24 || _valid5;
|
|
1526
1670
|
}
|
|
1527
|
-
if (!
|
|
1528
|
-
const
|
|
1671
|
+
if (!valid24) {
|
|
1672
|
+
const err56 = {
|
|
1529
1673
|
instancePath: instancePath + "/references",
|
|
1530
1674
|
schemaPath: "#/properties/references/anyOf",
|
|
1531
1675
|
keyword: "anyOf",
|
|
1532
1676
|
params: {},
|
|
1533
1677
|
message: "must match a schema in anyOf"
|
|
1534
1678
|
};
|
|
1535
|
-
if (vErrors === null) vErrors = [
|
|
1536
|
-
else vErrors.push(
|
|
1679
|
+
if (vErrors === null) vErrors = [err56];
|
|
1680
|
+
else vErrors.push(err56);
|
|
1537
1681
|
errors++;
|
|
1538
1682
|
} else {
|
|
1539
|
-
errors =
|
|
1540
|
-
if (vErrors !== null) if (
|
|
1683
|
+
errors = _errs70;
|
|
1684
|
+
if (vErrors !== null) if (_errs70) vErrors.length = _errs70;
|
|
1541
1685
|
else vErrors = null;
|
|
1542
1686
|
}
|
|
1543
1687
|
}
|
|
1544
1688
|
if (data.attachments !== void 0) {
|
|
1545
|
-
let
|
|
1546
|
-
if (Array.isArray(
|
|
1547
|
-
const
|
|
1548
|
-
for (let
|
|
1549
|
-
let
|
|
1550
|
-
if (
|
|
1551
|
-
if (
|
|
1552
|
-
const
|
|
1553
|
-
instancePath: instancePath + "/attachments/" +
|
|
1689
|
+
let data24 = data.attachments;
|
|
1690
|
+
if (Array.isArray(data24)) {
|
|
1691
|
+
const len6 = data24.length;
|
|
1692
|
+
for (let i6 = 0; i6 < len6; i6++) {
|
|
1693
|
+
let data25 = data24[i6];
|
|
1694
|
+
if (data25 && typeof data25 == "object" && !Array.isArray(data25)) {
|
|
1695
|
+
if (data25.filename === void 0) {
|
|
1696
|
+
const err57 = {
|
|
1697
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1554
1698
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1555
1699
|
keyword: "required",
|
|
1556
1700
|
params: { missingProperty: "filename" },
|
|
1557
1701
|
message: "must have required property 'filename'"
|
|
1558
1702
|
};
|
|
1559
|
-
if (vErrors === null) vErrors = [
|
|
1560
|
-
else vErrors.push(
|
|
1703
|
+
if (vErrors === null) vErrors = [err57];
|
|
1704
|
+
else vErrors.push(err57);
|
|
1561
1705
|
errors++;
|
|
1562
1706
|
}
|
|
1563
|
-
if (
|
|
1564
|
-
const
|
|
1565
|
-
instancePath: instancePath + "/attachments/" +
|
|
1707
|
+
if (data25.content_type === void 0) {
|
|
1708
|
+
const err58 = {
|
|
1709
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1566
1710
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1567
1711
|
keyword: "required",
|
|
1568
1712
|
params: { missingProperty: "content_type" },
|
|
1569
1713
|
message: "must have required property 'content_type'"
|
|
1570
1714
|
};
|
|
1571
|
-
if (vErrors === null) vErrors = [
|
|
1572
|
-
else vErrors.push(
|
|
1715
|
+
if (vErrors === null) vErrors = [err58];
|
|
1716
|
+
else vErrors.push(err58);
|
|
1573
1717
|
errors++;
|
|
1574
1718
|
}
|
|
1575
|
-
if (
|
|
1576
|
-
const
|
|
1577
|
-
instancePath: instancePath + "/attachments/" +
|
|
1719
|
+
if (data25.size_bytes === void 0) {
|
|
1720
|
+
const err59 = {
|
|
1721
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1578
1722
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1579
1723
|
keyword: "required",
|
|
1580
1724
|
params: { missingProperty: "size_bytes" },
|
|
1581
1725
|
message: "must have required property 'size_bytes'"
|
|
1582
1726
|
};
|
|
1583
|
-
if (vErrors === null) vErrors = [
|
|
1584
|
-
else vErrors.push(
|
|
1727
|
+
if (vErrors === null) vErrors = [err59];
|
|
1728
|
+
else vErrors.push(err59);
|
|
1585
1729
|
errors++;
|
|
1586
1730
|
}
|
|
1587
|
-
if (
|
|
1588
|
-
const
|
|
1589
|
-
instancePath: instancePath + "/attachments/" +
|
|
1731
|
+
if (data25.sha256 === void 0) {
|
|
1732
|
+
const err60 = {
|
|
1733
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1590
1734
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1591
1735
|
keyword: "required",
|
|
1592
1736
|
params: { missingProperty: "sha256" },
|
|
1593
1737
|
message: "must have required property 'sha256'"
|
|
1594
1738
|
};
|
|
1595
|
-
if (vErrors === null) vErrors = [
|
|
1596
|
-
else vErrors.push(
|
|
1739
|
+
if (vErrors === null) vErrors = [err60];
|
|
1740
|
+
else vErrors.push(err60);
|
|
1597
1741
|
errors++;
|
|
1598
1742
|
}
|
|
1599
|
-
if (
|
|
1600
|
-
const
|
|
1601
|
-
instancePath: instancePath + "/attachments/" +
|
|
1743
|
+
if (data25.part_index === void 0) {
|
|
1744
|
+
const err61 = {
|
|
1745
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1602
1746
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1603
1747
|
keyword: "required",
|
|
1604
1748
|
params: { missingProperty: "part_index" },
|
|
1605
1749
|
message: "must have required property 'part_index'"
|
|
1606
1750
|
};
|
|
1607
|
-
if (vErrors === null) vErrors = [
|
|
1608
|
-
else vErrors.push(
|
|
1751
|
+
if (vErrors === null) vErrors = [err61];
|
|
1752
|
+
else vErrors.push(err61);
|
|
1609
1753
|
errors++;
|
|
1610
1754
|
}
|
|
1611
|
-
if (
|
|
1612
|
-
const
|
|
1613
|
-
instancePath: instancePath + "/attachments/" +
|
|
1755
|
+
if (data25.tar_path === void 0) {
|
|
1756
|
+
const err62 = {
|
|
1757
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1614
1758
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
1615
1759
|
keyword: "required",
|
|
1616
1760
|
params: { missingProperty: "tar_path" },
|
|
1617
1761
|
message: "must have required property 'tar_path'"
|
|
1618
1762
|
};
|
|
1619
|
-
if (vErrors === null) vErrors = [
|
|
1620
|
-
else vErrors.push(
|
|
1763
|
+
if (vErrors === null) vErrors = [err62];
|
|
1764
|
+
else vErrors.push(err62);
|
|
1621
1765
|
errors++;
|
|
1622
1766
|
}
|
|
1623
|
-
if (
|
|
1624
|
-
let
|
|
1625
|
-
if (typeof
|
|
1626
|
-
const
|
|
1627
|
-
instancePath: instancePath + "/attachments/" +
|
|
1767
|
+
if (data25.filename !== void 0) {
|
|
1768
|
+
let data26 = data25.filename;
|
|
1769
|
+
if (typeof data26 !== "string" && data26 !== null) {
|
|
1770
|
+
const err63 = {
|
|
1771
|
+
instancePath: instancePath + "/attachments/" + i6 + "/filename",
|
|
1628
1772
|
schemaPath: "#/definitions/WebhookAttachment/properties/filename/type",
|
|
1629
1773
|
keyword: "type",
|
|
1630
|
-
params: { type:
|
|
1774
|
+
params: { type: schema23.properties.filename.type },
|
|
1631
1775
|
message: "must be string,null"
|
|
1632
1776
|
};
|
|
1633
|
-
if (vErrors === null) vErrors = [
|
|
1634
|
-
else vErrors.push(
|
|
1777
|
+
if (vErrors === null) vErrors = [err63];
|
|
1778
|
+
else vErrors.push(err63);
|
|
1635
1779
|
errors++;
|
|
1636
1780
|
}
|
|
1637
1781
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
if (typeof
|
|
1640
|
-
const
|
|
1641
|
-
instancePath: instancePath + "/attachments/" +
|
|
1782
|
+
if (data25.content_type !== void 0) {
|
|
1783
|
+
if (typeof data25.content_type !== "string") {
|
|
1784
|
+
const err64 = {
|
|
1785
|
+
instancePath: instancePath + "/attachments/" + i6 + "/content_type",
|
|
1642
1786
|
schemaPath: "#/definitions/WebhookAttachment/properties/content_type/type",
|
|
1643
1787
|
keyword: "type",
|
|
1644
1788
|
params: { type: "string" },
|
|
1645
1789
|
message: "must be string"
|
|
1646
1790
|
};
|
|
1647
|
-
if (vErrors === null) vErrors = [
|
|
1648
|
-
else vErrors.push(
|
|
1791
|
+
if (vErrors === null) vErrors = [err64];
|
|
1792
|
+
else vErrors.push(err64);
|
|
1649
1793
|
errors++;
|
|
1650
1794
|
}
|
|
1651
1795
|
}
|
|
1652
|
-
if (
|
|
1653
|
-
let
|
|
1654
|
-
if (!(typeof
|
|
1655
|
-
const
|
|
1656
|
-
instancePath: instancePath + "/attachments/" +
|
|
1796
|
+
if (data25.size_bytes !== void 0) {
|
|
1797
|
+
let data28 = data25.size_bytes;
|
|
1798
|
+
if (!(typeof data28 == "number" && !(data28 % 1) && !isNaN(data28))) {
|
|
1799
|
+
const err65 = {
|
|
1800
|
+
instancePath: instancePath + "/attachments/" + i6 + "/size_bytes",
|
|
1657
1801
|
schemaPath: "#/definitions/WebhookAttachment/properties/size_bytes/type",
|
|
1658
1802
|
keyword: "type",
|
|
1659
1803
|
params: { type: "integer" },
|
|
1660
1804
|
message: "must be integer"
|
|
1661
1805
|
};
|
|
1662
|
-
if (vErrors === null) vErrors = [
|
|
1663
|
-
else vErrors.push(
|
|
1806
|
+
if (vErrors === null) vErrors = [err65];
|
|
1807
|
+
else vErrors.push(err65);
|
|
1664
1808
|
errors++;
|
|
1665
1809
|
}
|
|
1666
|
-
if (typeof
|
|
1667
|
-
if (
|
|
1668
|
-
const
|
|
1669
|
-
instancePath: instancePath + "/attachments/" +
|
|
1810
|
+
if (typeof data28 == "number") {
|
|
1811
|
+
if (data28 < 0 || isNaN(data28)) {
|
|
1812
|
+
const err66 = {
|
|
1813
|
+
instancePath: instancePath + "/attachments/" + i6 + "/size_bytes",
|
|
1670
1814
|
schemaPath: "#/definitions/WebhookAttachment/properties/size_bytes/minimum",
|
|
1671
1815
|
keyword: "minimum",
|
|
1672
1816
|
params: {
|
|
@@ -1675,58 +1819,58 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1675
1819
|
},
|
|
1676
1820
|
message: "must be >= 0"
|
|
1677
1821
|
};
|
|
1678
|
-
if (vErrors === null) vErrors = [
|
|
1679
|
-
else vErrors.push(
|
|
1822
|
+
if (vErrors === null) vErrors = [err66];
|
|
1823
|
+
else vErrors.push(err66);
|
|
1680
1824
|
errors++;
|
|
1681
1825
|
}
|
|
1682
1826
|
}
|
|
1683
1827
|
}
|
|
1684
|
-
if (
|
|
1685
|
-
let
|
|
1686
|
-
if (typeof
|
|
1687
|
-
if (!pattern2.test(
|
|
1688
|
-
const
|
|
1689
|
-
instancePath: instancePath + "/attachments/" +
|
|
1828
|
+
if (data25.sha256 !== void 0) {
|
|
1829
|
+
let data29 = data25.sha256;
|
|
1830
|
+
if (typeof data29 === "string") {
|
|
1831
|
+
if (!pattern2.test(data29)) {
|
|
1832
|
+
const err67 = {
|
|
1833
|
+
instancePath: instancePath + "/attachments/" + i6 + "/sha256",
|
|
1690
1834
|
schemaPath: "#/definitions/WebhookAttachment/properties/sha256/pattern",
|
|
1691
1835
|
keyword: "pattern",
|
|
1692
1836
|
params: { pattern: "^[a-fA-F0-9]{64}$" },
|
|
1693
1837
|
message: "must match pattern \"^[a-fA-F0-9]{64}$\""
|
|
1694
1838
|
};
|
|
1695
|
-
if (vErrors === null) vErrors = [
|
|
1696
|
-
else vErrors.push(
|
|
1839
|
+
if (vErrors === null) vErrors = [err67];
|
|
1840
|
+
else vErrors.push(err67);
|
|
1697
1841
|
errors++;
|
|
1698
1842
|
}
|
|
1699
1843
|
} else {
|
|
1700
|
-
const
|
|
1701
|
-
instancePath: instancePath + "/attachments/" +
|
|
1844
|
+
const err68 = {
|
|
1845
|
+
instancePath: instancePath + "/attachments/" + i6 + "/sha256",
|
|
1702
1846
|
schemaPath: "#/definitions/WebhookAttachment/properties/sha256/type",
|
|
1703
1847
|
keyword: "type",
|
|
1704
1848
|
params: { type: "string" },
|
|
1705
1849
|
message: "must be string"
|
|
1706
1850
|
};
|
|
1707
|
-
if (vErrors === null) vErrors = [
|
|
1708
|
-
else vErrors.push(
|
|
1851
|
+
if (vErrors === null) vErrors = [err68];
|
|
1852
|
+
else vErrors.push(err68);
|
|
1709
1853
|
errors++;
|
|
1710
1854
|
}
|
|
1711
1855
|
}
|
|
1712
|
-
if (
|
|
1713
|
-
let
|
|
1714
|
-
if (!(typeof
|
|
1715
|
-
const
|
|
1716
|
-
instancePath: instancePath + "/attachments/" +
|
|
1856
|
+
if (data25.part_index !== void 0) {
|
|
1857
|
+
let data30 = data25.part_index;
|
|
1858
|
+
if (!(typeof data30 == "number" && !(data30 % 1) && !isNaN(data30))) {
|
|
1859
|
+
const err69 = {
|
|
1860
|
+
instancePath: instancePath + "/attachments/" + i6 + "/part_index",
|
|
1717
1861
|
schemaPath: "#/definitions/WebhookAttachment/properties/part_index/type",
|
|
1718
1862
|
keyword: "type",
|
|
1719
1863
|
params: { type: "integer" },
|
|
1720
1864
|
message: "must be integer"
|
|
1721
1865
|
};
|
|
1722
|
-
if (vErrors === null) vErrors = [
|
|
1723
|
-
else vErrors.push(
|
|
1866
|
+
if (vErrors === null) vErrors = [err69];
|
|
1867
|
+
else vErrors.push(err69);
|
|
1724
1868
|
errors++;
|
|
1725
1869
|
}
|
|
1726
|
-
if (typeof
|
|
1727
|
-
if (
|
|
1728
|
-
const
|
|
1729
|
-
instancePath: instancePath + "/attachments/" +
|
|
1870
|
+
if (typeof data30 == "number") {
|
|
1871
|
+
if (data30 < 0 || isNaN(data30)) {
|
|
1872
|
+
const err70 = {
|
|
1873
|
+
instancePath: instancePath + "/attachments/" + i6 + "/part_index",
|
|
1730
1874
|
schemaPath: "#/definitions/WebhookAttachment/properties/part_index/minimum",
|
|
1731
1875
|
keyword: "minimum",
|
|
1732
1876
|
params: {
|
|
@@ -1735,109 +1879,109 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1735
1879
|
},
|
|
1736
1880
|
message: "must be >= 0"
|
|
1737
1881
|
};
|
|
1738
|
-
if (vErrors === null) vErrors = [
|
|
1739
|
-
else vErrors.push(
|
|
1882
|
+
if (vErrors === null) vErrors = [err70];
|
|
1883
|
+
else vErrors.push(err70);
|
|
1740
1884
|
errors++;
|
|
1741
1885
|
}
|
|
1742
1886
|
}
|
|
1743
1887
|
}
|
|
1744
|
-
if (
|
|
1745
|
-
if (typeof
|
|
1746
|
-
const
|
|
1747
|
-
instancePath: instancePath + "/attachments/" +
|
|
1888
|
+
if (data25.tar_path !== void 0) {
|
|
1889
|
+
if (typeof data25.tar_path !== "string") {
|
|
1890
|
+
const err71 = {
|
|
1891
|
+
instancePath: instancePath + "/attachments/" + i6 + "/tar_path",
|
|
1748
1892
|
schemaPath: "#/definitions/WebhookAttachment/properties/tar_path/type",
|
|
1749
1893
|
keyword: "type",
|
|
1750
1894
|
params: { type: "string" },
|
|
1751
1895
|
message: "must be string"
|
|
1752
1896
|
};
|
|
1753
|
-
if (vErrors === null) vErrors = [
|
|
1754
|
-
else vErrors.push(
|
|
1897
|
+
if (vErrors === null) vErrors = [err71];
|
|
1898
|
+
else vErrors.push(err71);
|
|
1755
1899
|
errors++;
|
|
1756
1900
|
}
|
|
1757
1901
|
}
|
|
1758
1902
|
} else {
|
|
1759
|
-
const
|
|
1760
|
-
instancePath: instancePath + "/attachments/" +
|
|
1903
|
+
const err72 = {
|
|
1904
|
+
instancePath: instancePath + "/attachments/" + i6,
|
|
1761
1905
|
schemaPath: "#/definitions/WebhookAttachment/type",
|
|
1762
1906
|
keyword: "type",
|
|
1763
1907
|
params: { type: "object" },
|
|
1764
1908
|
message: "must be object"
|
|
1765
1909
|
};
|
|
1766
|
-
if (vErrors === null) vErrors = [
|
|
1767
|
-
else vErrors.push(
|
|
1910
|
+
if (vErrors === null) vErrors = [err72];
|
|
1911
|
+
else vErrors.push(err72);
|
|
1768
1912
|
errors++;
|
|
1769
1913
|
}
|
|
1770
1914
|
}
|
|
1771
1915
|
} else {
|
|
1772
|
-
const
|
|
1916
|
+
const err73 = {
|
|
1773
1917
|
instancePath: instancePath + "/attachments",
|
|
1774
1918
|
schemaPath: "#/properties/attachments/type",
|
|
1775
1919
|
keyword: "type",
|
|
1776
1920
|
params: { type: "array" },
|
|
1777
1921
|
message: "must be array"
|
|
1778
1922
|
};
|
|
1779
|
-
if (vErrors === null) vErrors = [
|
|
1780
|
-
else vErrors.push(
|
|
1923
|
+
if (vErrors === null) vErrors = [err73];
|
|
1924
|
+
else vErrors.push(err73);
|
|
1781
1925
|
errors++;
|
|
1782
1926
|
}
|
|
1783
1927
|
}
|
|
1784
1928
|
if (data.attachments_download_url !== void 0) {
|
|
1785
|
-
let
|
|
1786
|
-
if (typeof
|
|
1787
|
-
const
|
|
1929
|
+
let data32 = data.attachments_download_url;
|
|
1930
|
+
if (typeof data32 !== "string" && data32 !== null) {
|
|
1931
|
+
const err74 = {
|
|
1788
1932
|
instancePath: instancePath + "/attachments_download_url",
|
|
1789
1933
|
schemaPath: "#/properties/attachments_download_url/type",
|
|
1790
1934
|
keyword: "type",
|
|
1791
1935
|
params: { type: schema18.properties.attachments_download_url.type },
|
|
1792
1936
|
message: "must be string,null"
|
|
1793
1937
|
};
|
|
1794
|
-
if (vErrors === null) vErrors = [
|
|
1795
|
-
else vErrors.push(
|
|
1938
|
+
if (vErrors === null) vErrors = [err74];
|
|
1939
|
+
else vErrors.push(err74);
|
|
1796
1940
|
errors++;
|
|
1797
1941
|
}
|
|
1798
|
-
if (typeof
|
|
1799
|
-
if (!pattern4.test(
|
|
1800
|
-
const
|
|
1942
|
+
if (typeof data32 === "string") {
|
|
1943
|
+
if (!pattern4.test(data32)) {
|
|
1944
|
+
const err75 = {
|
|
1801
1945
|
instancePath: instancePath + "/attachments_download_url",
|
|
1802
1946
|
schemaPath: "#/properties/attachments_download_url/pattern",
|
|
1803
1947
|
keyword: "pattern",
|
|
1804
1948
|
params: { pattern: "^https?://" },
|
|
1805
1949
|
message: "must match pattern \"^https?://\""
|
|
1806
1950
|
};
|
|
1807
|
-
if (vErrors === null) vErrors = [
|
|
1808
|
-
else vErrors.push(
|
|
1951
|
+
if (vErrors === null) vErrors = [err75];
|
|
1952
|
+
else vErrors.push(err75);
|
|
1809
1953
|
errors++;
|
|
1810
1954
|
}
|
|
1811
|
-
if (!formats4.test(
|
|
1812
|
-
const
|
|
1955
|
+
if (!formats4.test(data32)) {
|
|
1956
|
+
const err76 = {
|
|
1813
1957
|
instancePath: instancePath + "/attachments_download_url",
|
|
1814
1958
|
schemaPath: "#/properties/attachments_download_url/format",
|
|
1815
1959
|
keyword: "format",
|
|
1816
1960
|
params: { format: "uri" },
|
|
1817
1961
|
message: "must match format \"uri\""
|
|
1818
1962
|
};
|
|
1819
|
-
if (vErrors === null) vErrors = [
|
|
1820
|
-
else vErrors.push(
|
|
1963
|
+
if (vErrors === null) vErrors = [err76];
|
|
1964
|
+
else vErrors.push(err76);
|
|
1821
1965
|
errors++;
|
|
1822
1966
|
}
|
|
1823
1967
|
}
|
|
1824
1968
|
}
|
|
1825
1969
|
} else {
|
|
1826
|
-
const
|
|
1970
|
+
const err77 = {
|
|
1827
1971
|
instancePath,
|
|
1828
1972
|
schemaPath: "#/type",
|
|
1829
1973
|
keyword: "type",
|
|
1830
1974
|
params: { type: "object" },
|
|
1831
1975
|
message: "must be object"
|
|
1832
1976
|
};
|
|
1833
|
-
if (vErrors === null) vErrors = [
|
|
1834
|
-
else vErrors.push(
|
|
1977
|
+
if (vErrors === null) vErrors = [err77];
|
|
1978
|
+
else vErrors.push(err77);
|
|
1835
1979
|
errors++;
|
|
1836
1980
|
}
|
|
1837
1981
|
validate15.errors = vErrors;
|
|
1838
1982
|
return errors === 0;
|
|
1839
1983
|
}
|
|
1840
|
-
const
|
|
1984
|
+
const schema25 = {
|
|
1841
1985
|
"type": "object",
|
|
1842
1986
|
"properties": {
|
|
1843
1987
|
"code": {
|
|
@@ -1949,78 +2093,90 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1949
2093
|
else vErrors.push(err6);
|
|
1950
2094
|
errors++;
|
|
1951
2095
|
}
|
|
1952
|
-
if (data.
|
|
2096
|
+
if (data.to_addresses === void 0) {
|
|
1953
2097
|
const err7 = {
|
|
1954
2098
|
instancePath,
|
|
1955
2099
|
schemaPath: "#/required",
|
|
1956
2100
|
keyword: "required",
|
|
1957
|
-
params: { missingProperty: "
|
|
1958
|
-
message: "must have required property '
|
|
2101
|
+
params: { missingProperty: "to_addresses" },
|
|
2102
|
+
message: "must have required property 'to_addresses'"
|
|
1959
2103
|
};
|
|
1960
2104
|
if (vErrors === null) vErrors = [err7];
|
|
1961
2105
|
else vErrors.push(err7);
|
|
1962
2106
|
errors++;
|
|
1963
2107
|
}
|
|
1964
|
-
if (data.
|
|
2108
|
+
if (data.in_reply_to === void 0) {
|
|
1965
2109
|
const err8 = {
|
|
1966
2110
|
instancePath,
|
|
1967
2111
|
schemaPath: "#/required",
|
|
1968
2112
|
keyword: "required",
|
|
1969
|
-
params: { missingProperty: "
|
|
1970
|
-
message: "must have required property '
|
|
2113
|
+
params: { missingProperty: "in_reply_to" },
|
|
2114
|
+
message: "must have required property 'in_reply_to'"
|
|
1971
2115
|
};
|
|
1972
2116
|
if (vErrors === null) vErrors = [err8];
|
|
1973
2117
|
else vErrors.push(err8);
|
|
1974
2118
|
errors++;
|
|
1975
2119
|
}
|
|
1976
|
-
if (data.
|
|
2120
|
+
if (data.references === void 0) {
|
|
1977
2121
|
const err9 = {
|
|
1978
2122
|
instancePath,
|
|
1979
2123
|
schemaPath: "#/required",
|
|
1980
2124
|
keyword: "required",
|
|
1981
|
-
params: { missingProperty: "
|
|
1982
|
-
message: "must have required property '
|
|
2125
|
+
params: { missingProperty: "references" },
|
|
2126
|
+
message: "must have required property 'references'"
|
|
1983
2127
|
};
|
|
1984
2128
|
if (vErrors === null) vErrors = [err9];
|
|
1985
2129
|
else vErrors.push(err9);
|
|
1986
2130
|
errors++;
|
|
1987
2131
|
}
|
|
1988
|
-
if (data.
|
|
2132
|
+
if (data.attachments === void 0) {
|
|
1989
2133
|
const err10 = {
|
|
1990
2134
|
instancePath,
|
|
1991
2135
|
schemaPath: "#/required",
|
|
1992
2136
|
keyword: "required",
|
|
1993
|
-
params: { missingProperty: "
|
|
1994
|
-
message: "must have required property '
|
|
2137
|
+
params: { missingProperty: "attachments" },
|
|
2138
|
+
message: "must have required property 'attachments'"
|
|
1995
2139
|
};
|
|
1996
2140
|
if (vErrors === null) vErrors = [err10];
|
|
1997
2141
|
else vErrors.push(err10);
|
|
1998
2142
|
errors++;
|
|
1999
2143
|
}
|
|
2144
|
+
if (data.attachments_download_url === void 0) {
|
|
2145
|
+
const err11 = {
|
|
2146
|
+
instancePath,
|
|
2147
|
+
schemaPath: "#/required",
|
|
2148
|
+
keyword: "required",
|
|
2149
|
+
params: { missingProperty: "attachments_download_url" },
|
|
2150
|
+
message: "must have required property 'attachments_download_url'"
|
|
2151
|
+
};
|
|
2152
|
+
if (vErrors === null) vErrors = [err11];
|
|
2153
|
+
else vErrors.push(err11);
|
|
2154
|
+
errors++;
|
|
2155
|
+
}
|
|
2000
2156
|
if (data.status !== void 0) {
|
|
2001
2157
|
let data0 = data.status;
|
|
2002
2158
|
if (typeof data0 !== "string") {
|
|
2003
|
-
const
|
|
2159
|
+
const err12 = {
|
|
2004
2160
|
instancePath: instancePath + "/status",
|
|
2005
2161
|
schemaPath: "#/properties/status/type",
|
|
2006
2162
|
keyword: "type",
|
|
2007
2163
|
params: { type: "string" },
|
|
2008
2164
|
message: "must be string"
|
|
2009
2165
|
};
|
|
2010
|
-
if (vErrors === null) vErrors = [
|
|
2011
|
-
else vErrors.push(
|
|
2166
|
+
if (vErrors === null) vErrors = [err12];
|
|
2167
|
+
else vErrors.push(err12);
|
|
2012
2168
|
errors++;
|
|
2013
2169
|
}
|
|
2014
2170
|
if ("failed" !== data0) {
|
|
2015
|
-
const
|
|
2171
|
+
const err13 = {
|
|
2016
2172
|
instancePath: instancePath + "/status",
|
|
2017
2173
|
schemaPath: "#/properties/status/const",
|
|
2018
2174
|
keyword: "const",
|
|
2019
2175
|
params: { allowedValue: "failed" },
|
|
2020
2176
|
message: "must be equal to constant"
|
|
2021
2177
|
};
|
|
2022
|
-
if (vErrors === null) vErrors = [
|
|
2023
|
-
else vErrors.push(
|
|
2178
|
+
if (vErrors === null) vErrors = [err13];
|
|
2179
|
+
else vErrors.push(err13);
|
|
2024
2180
|
errors++;
|
|
2025
2181
|
}
|
|
2026
2182
|
}
|
|
@@ -2028,332 +2184,346 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2028
2184
|
let data1 = data.error;
|
|
2029
2185
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2030
2186
|
if (data1.code === void 0) {
|
|
2031
|
-
const
|
|
2187
|
+
const err14 = {
|
|
2032
2188
|
instancePath: instancePath + "/error",
|
|
2033
2189
|
schemaPath: "#/definitions/ParsedError/required",
|
|
2034
2190
|
keyword: "required",
|
|
2035
2191
|
params: { missingProperty: "code" },
|
|
2036
2192
|
message: "must have required property 'code'"
|
|
2037
2193
|
};
|
|
2038
|
-
if (vErrors === null) vErrors = [
|
|
2039
|
-
else vErrors.push(
|
|
2194
|
+
if (vErrors === null) vErrors = [err14];
|
|
2195
|
+
else vErrors.push(err14);
|
|
2040
2196
|
errors++;
|
|
2041
2197
|
}
|
|
2042
2198
|
if (data1.message === void 0) {
|
|
2043
|
-
const
|
|
2199
|
+
const err15 = {
|
|
2044
2200
|
instancePath: instancePath + "/error",
|
|
2045
2201
|
schemaPath: "#/definitions/ParsedError/required",
|
|
2046
2202
|
keyword: "required",
|
|
2047
2203
|
params: { missingProperty: "message" },
|
|
2048
2204
|
message: "must have required property 'message'"
|
|
2049
2205
|
};
|
|
2050
|
-
if (vErrors === null) vErrors = [
|
|
2051
|
-
else vErrors.push(
|
|
2206
|
+
if (vErrors === null) vErrors = [err15];
|
|
2207
|
+
else vErrors.push(err15);
|
|
2052
2208
|
errors++;
|
|
2053
2209
|
}
|
|
2054
2210
|
if (data1.retryable === void 0) {
|
|
2055
|
-
const
|
|
2211
|
+
const err16 = {
|
|
2056
2212
|
instancePath: instancePath + "/error",
|
|
2057
2213
|
schemaPath: "#/definitions/ParsedError/required",
|
|
2058
2214
|
keyword: "required",
|
|
2059
2215
|
params: { missingProperty: "retryable" },
|
|
2060
2216
|
message: "must have required property 'retryable'"
|
|
2061
2217
|
};
|
|
2062
|
-
if (vErrors === null) vErrors = [
|
|
2063
|
-
else vErrors.push(
|
|
2218
|
+
if (vErrors === null) vErrors = [err16];
|
|
2219
|
+
else vErrors.push(err16);
|
|
2064
2220
|
errors++;
|
|
2065
2221
|
}
|
|
2066
2222
|
if (data1.code !== void 0) {
|
|
2067
2223
|
let data2 = data1.code;
|
|
2068
2224
|
if (typeof data2 !== "string") {
|
|
2069
|
-
const
|
|
2225
|
+
const err17 = {
|
|
2070
2226
|
instancePath: instancePath + "/error/code",
|
|
2071
2227
|
schemaPath: "#/definitions/ParsedError/properties/code/type",
|
|
2072
2228
|
keyword: "type",
|
|
2073
2229
|
params: { type: "string" },
|
|
2074
2230
|
message: "must be string"
|
|
2075
2231
|
};
|
|
2076
|
-
if (vErrors === null) vErrors = [
|
|
2077
|
-
else vErrors.push(
|
|
2232
|
+
if (vErrors === null) vErrors = [err17];
|
|
2233
|
+
else vErrors.push(err17);
|
|
2078
2234
|
errors++;
|
|
2079
2235
|
}
|
|
2080
2236
|
if (!(data2 === "PARSE_FAILED" || data2 === "ATTACHMENT_EXTRACTION_FAILED")) {
|
|
2081
|
-
const
|
|
2237
|
+
const err18 = {
|
|
2082
2238
|
instancePath: instancePath + "/error/code",
|
|
2083
2239
|
schemaPath: "#/definitions/ParsedError/properties/code/enum",
|
|
2084
2240
|
keyword: "enum",
|
|
2085
|
-
params: { allowedValues:
|
|
2241
|
+
params: { allowedValues: schema25.properties.code.enum },
|
|
2086
2242
|
message: "must be equal to one of the allowed values"
|
|
2087
2243
|
};
|
|
2088
|
-
if (vErrors === null) vErrors = [
|
|
2089
|
-
else vErrors.push(
|
|
2244
|
+
if (vErrors === null) vErrors = [err18];
|
|
2245
|
+
else vErrors.push(err18);
|
|
2090
2246
|
errors++;
|
|
2091
2247
|
}
|
|
2092
2248
|
}
|
|
2093
2249
|
if (data1.message !== void 0) {
|
|
2094
2250
|
if (typeof data1.message !== "string") {
|
|
2095
|
-
const
|
|
2251
|
+
const err19 = {
|
|
2096
2252
|
instancePath: instancePath + "/error/message",
|
|
2097
2253
|
schemaPath: "#/definitions/ParsedError/properties/message/type",
|
|
2098
2254
|
keyword: "type",
|
|
2099
2255
|
params: { type: "string" },
|
|
2100
2256
|
message: "must be string"
|
|
2101
2257
|
};
|
|
2102
|
-
if (vErrors === null) vErrors = [
|
|
2103
|
-
else vErrors.push(
|
|
2258
|
+
if (vErrors === null) vErrors = [err19];
|
|
2259
|
+
else vErrors.push(err19);
|
|
2104
2260
|
errors++;
|
|
2105
2261
|
}
|
|
2106
2262
|
}
|
|
2107
2263
|
if (data1.retryable !== void 0) {
|
|
2108
2264
|
if (typeof data1.retryable !== "boolean") {
|
|
2109
|
-
const
|
|
2265
|
+
const err20 = {
|
|
2110
2266
|
instancePath: instancePath + "/error/retryable",
|
|
2111
2267
|
schemaPath: "#/definitions/ParsedError/properties/retryable/type",
|
|
2112
2268
|
keyword: "type",
|
|
2113
2269
|
params: { type: "boolean" },
|
|
2114
2270
|
message: "must be boolean"
|
|
2115
2271
|
};
|
|
2116
|
-
if (vErrors === null) vErrors = [
|
|
2117
|
-
else vErrors.push(
|
|
2272
|
+
if (vErrors === null) vErrors = [err20];
|
|
2273
|
+
else vErrors.push(err20);
|
|
2118
2274
|
errors++;
|
|
2119
2275
|
}
|
|
2120
2276
|
}
|
|
2121
2277
|
} else {
|
|
2122
|
-
const
|
|
2278
|
+
const err21 = {
|
|
2123
2279
|
instancePath: instancePath + "/error",
|
|
2124
2280
|
schemaPath: "#/definitions/ParsedError/type",
|
|
2125
2281
|
keyword: "type",
|
|
2126
2282
|
params: { type: "object" },
|
|
2127
2283
|
message: "must be object"
|
|
2128
2284
|
};
|
|
2129
|
-
if (vErrors === null) vErrors = [
|
|
2130
|
-
else vErrors.push(
|
|
2285
|
+
if (vErrors === null) vErrors = [err21];
|
|
2286
|
+
else vErrors.push(err21);
|
|
2131
2287
|
errors++;
|
|
2132
2288
|
}
|
|
2133
2289
|
}
|
|
2134
2290
|
if (data.body_text !== void 0) {
|
|
2135
2291
|
if (data.body_text !== null) {
|
|
2136
|
-
const
|
|
2292
|
+
const err22 = {
|
|
2137
2293
|
instancePath: instancePath + "/body_text",
|
|
2138
2294
|
schemaPath: "#/properties/body_text/type",
|
|
2139
2295
|
keyword: "type",
|
|
2140
2296
|
params: { type: "null" },
|
|
2141
2297
|
message: "must be null"
|
|
2142
2298
|
};
|
|
2143
|
-
if (vErrors === null) vErrors = [
|
|
2144
|
-
else vErrors.push(
|
|
2299
|
+
if (vErrors === null) vErrors = [err22];
|
|
2300
|
+
else vErrors.push(err22);
|
|
2145
2301
|
errors++;
|
|
2146
2302
|
}
|
|
2147
2303
|
}
|
|
2148
2304
|
if (data.body_html !== void 0) {
|
|
2149
2305
|
if (data.body_html !== null) {
|
|
2150
|
-
const
|
|
2306
|
+
const err23 = {
|
|
2151
2307
|
instancePath: instancePath + "/body_html",
|
|
2152
2308
|
schemaPath: "#/properties/body_html/type",
|
|
2153
2309
|
keyword: "type",
|
|
2154
2310
|
params: { type: "null" },
|
|
2155
2311
|
message: "must be null"
|
|
2156
2312
|
};
|
|
2157
|
-
if (vErrors === null) vErrors = [
|
|
2158
|
-
else vErrors.push(
|
|
2313
|
+
if (vErrors === null) vErrors = [err23];
|
|
2314
|
+
else vErrors.push(err23);
|
|
2159
2315
|
errors++;
|
|
2160
2316
|
}
|
|
2161
2317
|
}
|
|
2162
2318
|
if (data.reply_to !== void 0) {
|
|
2163
2319
|
if (data.reply_to !== null) {
|
|
2164
|
-
const
|
|
2320
|
+
const err24 = {
|
|
2165
2321
|
instancePath: instancePath + "/reply_to",
|
|
2166
2322
|
schemaPath: "#/properties/reply_to/type",
|
|
2167
2323
|
keyword: "type",
|
|
2168
2324
|
params: { type: "null" },
|
|
2169
2325
|
message: "must be null"
|
|
2170
2326
|
};
|
|
2171
|
-
if (vErrors === null) vErrors = [
|
|
2172
|
-
else vErrors.push(
|
|
2327
|
+
if (vErrors === null) vErrors = [err24];
|
|
2328
|
+
else vErrors.push(err24);
|
|
2173
2329
|
errors++;
|
|
2174
2330
|
}
|
|
2175
2331
|
}
|
|
2176
2332
|
if (data.cc !== void 0) {
|
|
2177
2333
|
if (data.cc !== null) {
|
|
2178
|
-
const
|
|
2334
|
+
const err25 = {
|
|
2179
2335
|
instancePath: instancePath + "/cc",
|
|
2180
2336
|
schemaPath: "#/properties/cc/type",
|
|
2181
2337
|
keyword: "type",
|
|
2182
2338
|
params: { type: "null" },
|
|
2183
2339
|
message: "must be null"
|
|
2184
2340
|
};
|
|
2185
|
-
if (vErrors === null) vErrors = [
|
|
2186
|
-
else vErrors.push(
|
|
2341
|
+
if (vErrors === null) vErrors = [err25];
|
|
2342
|
+
else vErrors.push(err25);
|
|
2187
2343
|
errors++;
|
|
2188
2344
|
}
|
|
2189
2345
|
}
|
|
2190
2346
|
if (data.bcc !== void 0) {
|
|
2191
2347
|
if (data.bcc !== null) {
|
|
2192
|
-
const
|
|
2348
|
+
const err26 = {
|
|
2193
2349
|
instancePath: instancePath + "/bcc",
|
|
2194
2350
|
schemaPath: "#/properties/bcc/type",
|
|
2195
2351
|
keyword: "type",
|
|
2196
2352
|
params: { type: "null" },
|
|
2197
2353
|
message: "must be null"
|
|
2198
2354
|
};
|
|
2199
|
-
if (vErrors === null) vErrors = [
|
|
2200
|
-
else vErrors.push(
|
|
2355
|
+
if (vErrors === null) vErrors = [err26];
|
|
2356
|
+
else vErrors.push(err26);
|
|
2357
|
+
errors++;
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
if (data.to_addresses !== void 0) {
|
|
2361
|
+
if (data.to_addresses !== null) {
|
|
2362
|
+
const err27 = {
|
|
2363
|
+
instancePath: instancePath + "/to_addresses",
|
|
2364
|
+
schemaPath: "#/properties/to_addresses/type",
|
|
2365
|
+
keyword: "type",
|
|
2366
|
+
params: { type: "null" },
|
|
2367
|
+
message: "must be null"
|
|
2368
|
+
};
|
|
2369
|
+
if (vErrors === null) vErrors = [err27];
|
|
2370
|
+
else vErrors.push(err27);
|
|
2201
2371
|
errors++;
|
|
2202
2372
|
}
|
|
2203
2373
|
}
|
|
2204
2374
|
if (data.in_reply_to !== void 0) {
|
|
2205
2375
|
if (data.in_reply_to !== null) {
|
|
2206
|
-
const
|
|
2376
|
+
const err28 = {
|
|
2207
2377
|
instancePath: instancePath + "/in_reply_to",
|
|
2208
2378
|
schemaPath: "#/properties/in_reply_to/type",
|
|
2209
2379
|
keyword: "type",
|
|
2210
2380
|
params: { type: "null" },
|
|
2211
2381
|
message: "must be null"
|
|
2212
2382
|
};
|
|
2213
|
-
if (vErrors === null) vErrors = [
|
|
2214
|
-
else vErrors.push(
|
|
2383
|
+
if (vErrors === null) vErrors = [err28];
|
|
2384
|
+
else vErrors.push(err28);
|
|
2215
2385
|
errors++;
|
|
2216
2386
|
}
|
|
2217
2387
|
}
|
|
2218
2388
|
if (data.references !== void 0) {
|
|
2219
2389
|
if (data.references !== null) {
|
|
2220
|
-
const
|
|
2390
|
+
const err29 = {
|
|
2221
2391
|
instancePath: instancePath + "/references",
|
|
2222
2392
|
schemaPath: "#/properties/references/type",
|
|
2223
2393
|
keyword: "type",
|
|
2224
2394
|
params: { type: "null" },
|
|
2225
2395
|
message: "must be null"
|
|
2226
2396
|
};
|
|
2227
|
-
if (vErrors === null) vErrors = [
|
|
2228
|
-
else vErrors.push(
|
|
2397
|
+
if (vErrors === null) vErrors = [err29];
|
|
2398
|
+
else vErrors.push(err29);
|
|
2229
2399
|
errors++;
|
|
2230
2400
|
}
|
|
2231
2401
|
}
|
|
2232
2402
|
if (data.attachments !== void 0) {
|
|
2233
|
-
let
|
|
2234
|
-
if (Array.isArray(
|
|
2235
|
-
const len0 =
|
|
2403
|
+
let data13 = data.attachments;
|
|
2404
|
+
if (Array.isArray(data13)) {
|
|
2405
|
+
const len0 = data13.length;
|
|
2236
2406
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
2237
|
-
let
|
|
2238
|
-
if (
|
|
2239
|
-
if (
|
|
2240
|
-
const
|
|
2407
|
+
let data14 = data13[i0];
|
|
2408
|
+
if (data14 && typeof data14 == "object" && !Array.isArray(data14)) {
|
|
2409
|
+
if (data14.filename === void 0) {
|
|
2410
|
+
const err30 = {
|
|
2241
2411
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2242
2412
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2243
2413
|
keyword: "required",
|
|
2244
2414
|
params: { missingProperty: "filename" },
|
|
2245
2415
|
message: "must have required property 'filename'"
|
|
2246
2416
|
};
|
|
2247
|
-
if (vErrors === null) vErrors = [
|
|
2248
|
-
else vErrors.push(
|
|
2417
|
+
if (vErrors === null) vErrors = [err30];
|
|
2418
|
+
else vErrors.push(err30);
|
|
2249
2419
|
errors++;
|
|
2250
2420
|
}
|
|
2251
|
-
if (
|
|
2252
|
-
const
|
|
2421
|
+
if (data14.content_type === void 0) {
|
|
2422
|
+
const err31 = {
|
|
2253
2423
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2254
2424
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2255
2425
|
keyword: "required",
|
|
2256
2426
|
params: { missingProperty: "content_type" },
|
|
2257
2427
|
message: "must have required property 'content_type'"
|
|
2258
2428
|
};
|
|
2259
|
-
if (vErrors === null) vErrors = [
|
|
2260
|
-
else vErrors.push(
|
|
2429
|
+
if (vErrors === null) vErrors = [err31];
|
|
2430
|
+
else vErrors.push(err31);
|
|
2261
2431
|
errors++;
|
|
2262
2432
|
}
|
|
2263
|
-
if (
|
|
2264
|
-
const
|
|
2433
|
+
if (data14.size_bytes === void 0) {
|
|
2434
|
+
const err32 = {
|
|
2265
2435
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2266
2436
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2267
2437
|
keyword: "required",
|
|
2268
2438
|
params: { missingProperty: "size_bytes" },
|
|
2269
2439
|
message: "must have required property 'size_bytes'"
|
|
2270
2440
|
};
|
|
2271
|
-
if (vErrors === null) vErrors = [
|
|
2272
|
-
else vErrors.push(
|
|
2441
|
+
if (vErrors === null) vErrors = [err32];
|
|
2442
|
+
else vErrors.push(err32);
|
|
2273
2443
|
errors++;
|
|
2274
2444
|
}
|
|
2275
|
-
if (
|
|
2276
|
-
const
|
|
2445
|
+
if (data14.sha256 === void 0) {
|
|
2446
|
+
const err33 = {
|
|
2277
2447
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2278
2448
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2279
2449
|
keyword: "required",
|
|
2280
2450
|
params: { missingProperty: "sha256" },
|
|
2281
2451
|
message: "must have required property 'sha256'"
|
|
2282
2452
|
};
|
|
2283
|
-
if (vErrors === null) vErrors = [
|
|
2284
|
-
else vErrors.push(
|
|
2453
|
+
if (vErrors === null) vErrors = [err33];
|
|
2454
|
+
else vErrors.push(err33);
|
|
2285
2455
|
errors++;
|
|
2286
2456
|
}
|
|
2287
|
-
if (
|
|
2288
|
-
const
|
|
2457
|
+
if (data14.part_index === void 0) {
|
|
2458
|
+
const err34 = {
|
|
2289
2459
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2290
2460
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2291
2461
|
keyword: "required",
|
|
2292
2462
|
params: { missingProperty: "part_index" },
|
|
2293
2463
|
message: "must have required property 'part_index'"
|
|
2294
2464
|
};
|
|
2295
|
-
if (vErrors === null) vErrors = [
|
|
2296
|
-
else vErrors.push(
|
|
2465
|
+
if (vErrors === null) vErrors = [err34];
|
|
2466
|
+
else vErrors.push(err34);
|
|
2297
2467
|
errors++;
|
|
2298
2468
|
}
|
|
2299
|
-
if (
|
|
2300
|
-
const
|
|
2469
|
+
if (data14.tar_path === void 0) {
|
|
2470
|
+
const err35 = {
|
|
2301
2471
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2302
2472
|
schemaPath: "#/definitions/WebhookAttachment/required",
|
|
2303
2473
|
keyword: "required",
|
|
2304
2474
|
params: { missingProperty: "tar_path" },
|
|
2305
2475
|
message: "must have required property 'tar_path'"
|
|
2306
2476
|
};
|
|
2307
|
-
if (vErrors === null) vErrors = [
|
|
2308
|
-
else vErrors.push(
|
|
2477
|
+
if (vErrors === null) vErrors = [err35];
|
|
2478
|
+
else vErrors.push(err35);
|
|
2309
2479
|
errors++;
|
|
2310
2480
|
}
|
|
2311
|
-
if (
|
|
2312
|
-
let
|
|
2313
|
-
if (typeof
|
|
2314
|
-
const
|
|
2481
|
+
if (data14.filename !== void 0) {
|
|
2482
|
+
let data15 = data14.filename;
|
|
2483
|
+
if (typeof data15 !== "string" && data15 !== null) {
|
|
2484
|
+
const err36 = {
|
|
2315
2485
|
instancePath: instancePath + "/attachments/" + i0 + "/filename",
|
|
2316
2486
|
schemaPath: "#/definitions/WebhookAttachment/properties/filename/type",
|
|
2317
2487
|
keyword: "type",
|
|
2318
|
-
params: { type:
|
|
2488
|
+
params: { type: schema23.properties.filename.type },
|
|
2319
2489
|
message: "must be string,null"
|
|
2320
2490
|
};
|
|
2321
|
-
if (vErrors === null) vErrors = [
|
|
2322
|
-
else vErrors.push(
|
|
2491
|
+
if (vErrors === null) vErrors = [err36];
|
|
2492
|
+
else vErrors.push(err36);
|
|
2323
2493
|
errors++;
|
|
2324
2494
|
}
|
|
2325
2495
|
}
|
|
2326
|
-
if (
|
|
2327
|
-
if (typeof
|
|
2328
|
-
const
|
|
2496
|
+
if (data14.content_type !== void 0) {
|
|
2497
|
+
if (typeof data14.content_type !== "string") {
|
|
2498
|
+
const err37 = {
|
|
2329
2499
|
instancePath: instancePath + "/attachments/" + i0 + "/content_type",
|
|
2330
2500
|
schemaPath: "#/definitions/WebhookAttachment/properties/content_type/type",
|
|
2331
2501
|
keyword: "type",
|
|
2332
2502
|
params: { type: "string" },
|
|
2333
2503
|
message: "must be string"
|
|
2334
2504
|
};
|
|
2335
|
-
if (vErrors === null) vErrors = [
|
|
2336
|
-
else vErrors.push(
|
|
2505
|
+
if (vErrors === null) vErrors = [err37];
|
|
2506
|
+
else vErrors.push(err37);
|
|
2337
2507
|
errors++;
|
|
2338
2508
|
}
|
|
2339
2509
|
}
|
|
2340
|
-
if (
|
|
2341
|
-
let
|
|
2342
|
-
if (!(typeof
|
|
2343
|
-
const
|
|
2510
|
+
if (data14.size_bytes !== void 0) {
|
|
2511
|
+
let data17 = data14.size_bytes;
|
|
2512
|
+
if (!(typeof data17 == "number" && !(data17 % 1) && !isNaN(data17))) {
|
|
2513
|
+
const err38 = {
|
|
2344
2514
|
instancePath: instancePath + "/attachments/" + i0 + "/size_bytes",
|
|
2345
2515
|
schemaPath: "#/definitions/WebhookAttachment/properties/size_bytes/type",
|
|
2346
2516
|
keyword: "type",
|
|
2347
2517
|
params: { type: "integer" },
|
|
2348
2518
|
message: "must be integer"
|
|
2349
2519
|
};
|
|
2350
|
-
if (vErrors === null) vErrors = [
|
|
2351
|
-
else vErrors.push(
|
|
2520
|
+
if (vErrors === null) vErrors = [err38];
|
|
2521
|
+
else vErrors.push(err38);
|
|
2352
2522
|
errors++;
|
|
2353
2523
|
}
|
|
2354
|
-
if (typeof
|
|
2355
|
-
if (
|
|
2356
|
-
const
|
|
2524
|
+
if (typeof data17 == "number") {
|
|
2525
|
+
if (data17 < 0 || isNaN(data17)) {
|
|
2526
|
+
const err39 = {
|
|
2357
2527
|
instancePath: instancePath + "/attachments/" + i0 + "/size_bytes",
|
|
2358
2528
|
schemaPath: "#/definitions/WebhookAttachment/properties/size_bytes/minimum",
|
|
2359
2529
|
keyword: "minimum",
|
|
@@ -2363,57 +2533,57 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2363
2533
|
},
|
|
2364
2534
|
message: "must be >= 0"
|
|
2365
2535
|
};
|
|
2366
|
-
if (vErrors === null) vErrors = [
|
|
2367
|
-
else vErrors.push(
|
|
2536
|
+
if (vErrors === null) vErrors = [err39];
|
|
2537
|
+
else vErrors.push(err39);
|
|
2368
2538
|
errors++;
|
|
2369
2539
|
}
|
|
2370
2540
|
}
|
|
2371
2541
|
}
|
|
2372
|
-
if (
|
|
2373
|
-
let
|
|
2374
|
-
if (typeof
|
|
2375
|
-
if (!pattern2.test(
|
|
2376
|
-
const
|
|
2542
|
+
if (data14.sha256 !== void 0) {
|
|
2543
|
+
let data18 = data14.sha256;
|
|
2544
|
+
if (typeof data18 === "string") {
|
|
2545
|
+
if (!pattern2.test(data18)) {
|
|
2546
|
+
const err40 = {
|
|
2377
2547
|
instancePath: instancePath + "/attachments/" + i0 + "/sha256",
|
|
2378
2548
|
schemaPath: "#/definitions/WebhookAttachment/properties/sha256/pattern",
|
|
2379
2549
|
keyword: "pattern",
|
|
2380
2550
|
params: { pattern: "^[a-fA-F0-9]{64}$" },
|
|
2381
2551
|
message: "must match pattern \"^[a-fA-F0-9]{64}$\""
|
|
2382
2552
|
};
|
|
2383
|
-
if (vErrors === null) vErrors = [
|
|
2384
|
-
else vErrors.push(
|
|
2553
|
+
if (vErrors === null) vErrors = [err40];
|
|
2554
|
+
else vErrors.push(err40);
|
|
2385
2555
|
errors++;
|
|
2386
2556
|
}
|
|
2387
2557
|
} else {
|
|
2388
|
-
const
|
|
2558
|
+
const err41 = {
|
|
2389
2559
|
instancePath: instancePath + "/attachments/" + i0 + "/sha256",
|
|
2390
2560
|
schemaPath: "#/definitions/WebhookAttachment/properties/sha256/type",
|
|
2391
2561
|
keyword: "type",
|
|
2392
2562
|
params: { type: "string" },
|
|
2393
2563
|
message: "must be string"
|
|
2394
2564
|
};
|
|
2395
|
-
if (vErrors === null) vErrors = [
|
|
2396
|
-
else vErrors.push(
|
|
2565
|
+
if (vErrors === null) vErrors = [err41];
|
|
2566
|
+
else vErrors.push(err41);
|
|
2397
2567
|
errors++;
|
|
2398
2568
|
}
|
|
2399
2569
|
}
|
|
2400
|
-
if (
|
|
2401
|
-
let
|
|
2402
|
-
if (!(typeof
|
|
2403
|
-
const
|
|
2570
|
+
if (data14.part_index !== void 0) {
|
|
2571
|
+
let data19 = data14.part_index;
|
|
2572
|
+
if (!(typeof data19 == "number" && !(data19 % 1) && !isNaN(data19))) {
|
|
2573
|
+
const err42 = {
|
|
2404
2574
|
instancePath: instancePath + "/attachments/" + i0 + "/part_index",
|
|
2405
2575
|
schemaPath: "#/definitions/WebhookAttachment/properties/part_index/type",
|
|
2406
2576
|
keyword: "type",
|
|
2407
2577
|
params: { type: "integer" },
|
|
2408
2578
|
message: "must be integer"
|
|
2409
2579
|
};
|
|
2410
|
-
if (vErrors === null) vErrors = [
|
|
2411
|
-
else vErrors.push(
|
|
2580
|
+
if (vErrors === null) vErrors = [err42];
|
|
2581
|
+
else vErrors.push(err42);
|
|
2412
2582
|
errors++;
|
|
2413
2583
|
}
|
|
2414
|
-
if (typeof
|
|
2415
|
-
if (
|
|
2416
|
-
const
|
|
2584
|
+
if (typeof data19 == "number") {
|
|
2585
|
+
if (data19 < 0 || isNaN(data19)) {
|
|
2586
|
+
const err43 = {
|
|
2417
2587
|
instancePath: instancePath + "/attachments/" + i0 + "/part_index",
|
|
2418
2588
|
schemaPath: "#/definitions/WebhookAttachment/properties/part_index/minimum",
|
|
2419
2589
|
keyword: "minimum",
|
|
@@ -2423,76 +2593,76 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2423
2593
|
},
|
|
2424
2594
|
message: "must be >= 0"
|
|
2425
2595
|
};
|
|
2426
|
-
if (vErrors === null) vErrors = [
|
|
2427
|
-
else vErrors.push(
|
|
2596
|
+
if (vErrors === null) vErrors = [err43];
|
|
2597
|
+
else vErrors.push(err43);
|
|
2428
2598
|
errors++;
|
|
2429
2599
|
}
|
|
2430
2600
|
}
|
|
2431
2601
|
}
|
|
2432
|
-
if (
|
|
2433
|
-
if (typeof
|
|
2434
|
-
const
|
|
2602
|
+
if (data14.tar_path !== void 0) {
|
|
2603
|
+
if (typeof data14.tar_path !== "string") {
|
|
2604
|
+
const err44 = {
|
|
2435
2605
|
instancePath: instancePath + "/attachments/" + i0 + "/tar_path",
|
|
2436
2606
|
schemaPath: "#/definitions/WebhookAttachment/properties/tar_path/type",
|
|
2437
2607
|
keyword: "type",
|
|
2438
2608
|
params: { type: "string" },
|
|
2439
2609
|
message: "must be string"
|
|
2440
2610
|
};
|
|
2441
|
-
if (vErrors === null) vErrors = [
|
|
2442
|
-
else vErrors.push(
|
|
2611
|
+
if (vErrors === null) vErrors = [err44];
|
|
2612
|
+
else vErrors.push(err44);
|
|
2443
2613
|
errors++;
|
|
2444
2614
|
}
|
|
2445
2615
|
}
|
|
2446
2616
|
} else {
|
|
2447
|
-
const
|
|
2617
|
+
const err45 = {
|
|
2448
2618
|
instancePath: instancePath + "/attachments/" + i0,
|
|
2449
2619
|
schemaPath: "#/definitions/WebhookAttachment/type",
|
|
2450
2620
|
keyword: "type",
|
|
2451
2621
|
params: { type: "object" },
|
|
2452
2622
|
message: "must be object"
|
|
2453
2623
|
};
|
|
2454
|
-
if (vErrors === null) vErrors = [
|
|
2455
|
-
else vErrors.push(
|
|
2624
|
+
if (vErrors === null) vErrors = [err45];
|
|
2625
|
+
else vErrors.push(err45);
|
|
2456
2626
|
errors++;
|
|
2457
2627
|
}
|
|
2458
2628
|
}
|
|
2459
2629
|
} else {
|
|
2460
|
-
const
|
|
2630
|
+
const err46 = {
|
|
2461
2631
|
instancePath: instancePath + "/attachments",
|
|
2462
2632
|
schemaPath: "#/properties/attachments/type",
|
|
2463
2633
|
keyword: "type",
|
|
2464
2634
|
params: { type: "array" },
|
|
2465
2635
|
message: "must be array"
|
|
2466
2636
|
};
|
|
2467
|
-
if (vErrors === null) vErrors = [
|
|
2468
|
-
else vErrors.push(
|
|
2637
|
+
if (vErrors === null) vErrors = [err46];
|
|
2638
|
+
else vErrors.push(err46);
|
|
2469
2639
|
errors++;
|
|
2470
2640
|
}
|
|
2471
2641
|
}
|
|
2472
2642
|
if (data.attachments_download_url !== void 0) {
|
|
2473
2643
|
if (data.attachments_download_url !== null) {
|
|
2474
|
-
const
|
|
2644
|
+
const err47 = {
|
|
2475
2645
|
instancePath: instancePath + "/attachments_download_url",
|
|
2476
2646
|
schemaPath: "#/properties/attachments_download_url/type",
|
|
2477
2647
|
keyword: "type",
|
|
2478
2648
|
params: { type: "null" },
|
|
2479
2649
|
message: "must be null"
|
|
2480
2650
|
};
|
|
2481
|
-
if (vErrors === null) vErrors = [
|
|
2482
|
-
else vErrors.push(
|
|
2651
|
+
if (vErrors === null) vErrors = [err47];
|
|
2652
|
+
else vErrors.push(err47);
|
|
2483
2653
|
errors++;
|
|
2484
2654
|
}
|
|
2485
2655
|
}
|
|
2486
2656
|
} else {
|
|
2487
|
-
const
|
|
2657
|
+
const err48 = {
|
|
2488
2658
|
instancePath,
|
|
2489
2659
|
schemaPath: "#/type",
|
|
2490
2660
|
keyword: "type",
|
|
2491
2661
|
params: { type: "object" },
|
|
2492
2662
|
message: "must be object"
|
|
2493
2663
|
};
|
|
2494
|
-
if (vErrors === null) vErrors = [
|
|
2495
|
-
else vErrors.push(
|
|
2664
|
+
if (vErrors === null) vErrors = [err48];
|
|
2665
|
+
else vErrors.push(err48);
|
|
2496
2666
|
errors++;
|
|
2497
2667
|
}
|
|
2498
2668
|
validate17.errors = vErrors;
|
|
@@ -2548,7 +2718,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2548
2718
|
validate14.errors = vErrors;
|
|
2549
2719
|
return errors === 0;
|
|
2550
2720
|
}
|
|
2551
|
-
const
|
|
2721
|
+
const schema28 = {
|
|
2552
2722
|
"type": "object",
|
|
2553
2723
|
"properties": {
|
|
2554
2724
|
"detected": {
|
|
@@ -2585,7 +2755,7 @@ const schema27 = {
|
|
|
2585
2755
|
],
|
|
2586
2756
|
"description": "Forward detection and analysis results."
|
|
2587
2757
|
};
|
|
2588
|
-
const
|
|
2758
|
+
const schema38 = {
|
|
2589
2759
|
"type": "object",
|
|
2590
2760
|
"properties": {
|
|
2591
2761
|
"type": {
|
|
@@ -2629,7 +2799,7 @@ const schema37 = {
|
|
|
2629
2799
|
],
|
|
2630
2800
|
"description": "Result for an attachment forward that was detected but not analyzed. This occurs when attachment analysis is disabled or the limit was reached."
|
|
2631
2801
|
};
|
|
2632
|
-
const
|
|
2802
|
+
const schema32 = {
|
|
2633
2803
|
"type": "object",
|
|
2634
2804
|
"properties": {
|
|
2635
2805
|
"verdict": {
|
|
@@ -2662,12 +2832,12 @@ const schema31 = {
|
|
|
2662
2832
|
],
|
|
2663
2833
|
"description": "Verification result for a forwarded email."
|
|
2664
2834
|
};
|
|
2665
|
-
const
|
|
2835
|
+
const schema33 = {
|
|
2666
2836
|
"type": "string",
|
|
2667
2837
|
"enum": ["legit", "unknown"],
|
|
2668
2838
|
"description": "Verdict for forwarded email verification.\n\n- `legit`: DKIM signature verified the original sender\n- `unknown`: Could not verify the forwarded email's authenticity"
|
|
2669
2839
|
};
|
|
2670
|
-
const
|
|
2840
|
+
const schema34 = {
|
|
2671
2841
|
"type": "string",
|
|
2672
2842
|
"enum": [
|
|
2673
2843
|
"high",
|
|
@@ -2676,7 +2846,7 @@ const schema33 = {
|
|
|
2676
2846
|
],
|
|
2677
2847
|
"description": "Confidence level for the authentication verdict.\n\n- `high`: Strong cryptographic evidence (DKIM aligned + DMARC pass)\n- `medium`: Good evidence but with caveats (SPF-only alignment)\n- `low`: Weak evidence (missing authentication or unclear results)"
|
|
2678
2848
|
};
|
|
2679
|
-
const
|
|
2849
|
+
const schema35 = {
|
|
2680
2850
|
"type": ["string", "null"],
|
|
2681
2851
|
"enum": [
|
|
2682
2852
|
"reject",
|
|
@@ -2769,7 +2939,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2769
2939
|
instancePath: instancePath + "/verdict",
|
|
2770
2940
|
schemaPath: "#/definitions/ForwardVerdict/enum",
|
|
2771
2941
|
keyword: "enum",
|
|
2772
|
-
params: { allowedValues:
|
|
2942
|
+
params: { allowedValues: schema33.enum },
|
|
2773
2943
|
message: "must be equal to one of the allowed values"
|
|
2774
2944
|
};
|
|
2775
2945
|
if (vErrors === null) vErrors = [err6];
|
|
@@ -2796,7 +2966,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2796
2966
|
instancePath: instancePath + "/confidence",
|
|
2797
2967
|
schemaPath: "#/definitions/AuthConfidence/enum",
|
|
2798
2968
|
keyword: "enum",
|
|
2799
|
-
params: { allowedValues:
|
|
2969
|
+
params: { allowedValues: schema34.enum },
|
|
2800
2970
|
message: "must be equal to one of the allowed values"
|
|
2801
2971
|
};
|
|
2802
2972
|
if (vErrors === null) vErrors = [err8];
|
|
@@ -2825,7 +2995,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2825
2995
|
instancePath: instancePath + "/dkim_domain",
|
|
2826
2996
|
schemaPath: "#/properties/dkim_domain/type",
|
|
2827
2997
|
keyword: "type",
|
|
2828
|
-
params: { type:
|
|
2998
|
+
params: { type: schema32.properties.dkim_domain.type },
|
|
2829
2999
|
message: "must be string,null"
|
|
2830
3000
|
};
|
|
2831
3001
|
if (vErrors === null) vErrors = [err10];
|
|
@@ -2840,7 +3010,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2840
3010
|
instancePath: instancePath + "/dmarc_policy",
|
|
2841
3011
|
schemaPath: "#/definitions/DmarcPolicy/type",
|
|
2842
3012
|
keyword: "type",
|
|
2843
|
-
params: { type:
|
|
3013
|
+
params: { type: schema35.type },
|
|
2844
3014
|
message: "must be string,null"
|
|
2845
3015
|
};
|
|
2846
3016
|
if (vErrors === null) vErrors = [err11];
|
|
@@ -2852,7 +3022,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2852
3022
|
instancePath: instancePath + "/dmarc_policy",
|
|
2853
3023
|
schemaPath: "#/definitions/DmarcPolicy/enum",
|
|
2854
3024
|
keyword: "enum",
|
|
2855
|
-
params: { allowedValues:
|
|
3025
|
+
params: { allowedValues: schema35.enum },
|
|
2856
3026
|
message: "must be equal to one of the allowed values"
|
|
2857
3027
|
};
|
|
2858
3028
|
if (vErrors === null) vErrors = [err12];
|
|
@@ -3100,7 +3270,7 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3100
3270
|
validate23.errors = vErrors;
|
|
3101
3271
|
return errors === 0;
|
|
3102
3272
|
}
|
|
3103
|
-
const
|
|
3273
|
+
const schema36 = {
|
|
3104
3274
|
"type": "object",
|
|
3105
3275
|
"properties": {
|
|
3106
3276
|
"type": {
|
|
@@ -3280,7 +3450,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3280
3450
|
instancePath: instancePath + "/attachment_filename",
|
|
3281
3451
|
schemaPath: "#/properties/attachment_filename/type",
|
|
3282
3452
|
keyword: "type",
|
|
3283
|
-
params: { type:
|
|
3453
|
+
params: { type: schema36.properties.attachment_filename.type },
|
|
3284
3454
|
message: "must be string,null"
|
|
3285
3455
|
};
|
|
3286
3456
|
if (vErrors === null) vErrors = [err10];
|
|
@@ -3626,7 +3796,7 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3626
3796
|
instancePath: instancePath + "/attachment_filename",
|
|
3627
3797
|
schemaPath: "#/definitions/ForwardResultAttachmentSkipped/properties/attachment_filename/type",
|
|
3628
3798
|
keyword: "type",
|
|
3629
|
-
params: { type:
|
|
3799
|
+
params: { type: schema38.properties.attachment_filename.type },
|
|
3630
3800
|
message: "must be string,null"
|
|
3631
3801
|
};
|
|
3632
3802
|
if (vErrors === null) vErrors = [err10];
|
|
@@ -3913,7 +4083,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3913
4083
|
instancePath: instancePath + "/attachments_limit",
|
|
3914
4084
|
schemaPath: "#/properties/attachments_limit/type",
|
|
3915
4085
|
keyword: "type",
|
|
3916
|
-
params: { type:
|
|
4086
|
+
params: { type: schema28.properties.attachments_limit.type },
|
|
3917
4087
|
message: "must be integer,null"
|
|
3918
4088
|
};
|
|
3919
4089
|
if (vErrors === null) vErrors = [err11];
|
|
@@ -4025,7 +4195,7 @@ function validate20(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4025
4195
|
validate20.errors = vErrors;
|
|
4026
4196
|
return errors === 0;
|
|
4027
4197
|
}
|
|
4028
|
-
const
|
|
4198
|
+
const schema39 = {
|
|
4029
4199
|
"type": "object",
|
|
4030
4200
|
"properties": {
|
|
4031
4201
|
"spf": {
|
|
@@ -4079,7 +4249,7 @@ const schema38 = {
|
|
|
4079
4249
|
],
|
|
4080
4250
|
"description": "Email authentication results for SPF, DKIM, and DMARC.\n\nUse `validateEmailAuth()` to compute a verdict based on these results."
|
|
4081
4251
|
};
|
|
4082
|
-
const
|
|
4252
|
+
const schema40 = {
|
|
4083
4253
|
"type": "string",
|
|
4084
4254
|
"enum": [
|
|
4085
4255
|
"pass",
|
|
@@ -4092,7 +4262,7 @@ const schema39 = {
|
|
|
4092
4262
|
],
|
|
4093
4263
|
"description": "SPF verification result."
|
|
4094
4264
|
};
|
|
4095
|
-
const
|
|
4265
|
+
const schema41 = {
|
|
4096
4266
|
"type": "string",
|
|
4097
4267
|
"enum": [
|
|
4098
4268
|
"pass",
|
|
@@ -4103,7 +4273,7 @@ const schema40 = {
|
|
|
4103
4273
|
],
|
|
4104
4274
|
"description": "DMARC verification result."
|
|
4105
4275
|
};
|
|
4106
|
-
const
|
|
4276
|
+
const schema43 = {
|
|
4107
4277
|
"type": "object",
|
|
4108
4278
|
"properties": {
|
|
4109
4279
|
"domain": {
|
|
@@ -4143,7 +4313,7 @@ const schema42 = {
|
|
|
4143
4313
|
],
|
|
4144
4314
|
"description": "Details about a single DKIM signature found in the email.\n\nAn email may have multiple DKIM signatures (e.g., one from the sending domain and one from the ESP). Each signature is verified independently."
|
|
4145
4315
|
};
|
|
4146
|
-
const
|
|
4316
|
+
const schema44 = {
|
|
4147
4317
|
"type": "string",
|
|
4148
4318
|
"enum": [
|
|
4149
4319
|
"pass",
|
|
@@ -4250,7 +4420,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4250
4420
|
instancePath: instancePath + "/selector",
|
|
4251
4421
|
schemaPath: "#/properties/selector/type",
|
|
4252
4422
|
keyword: "type",
|
|
4253
|
-
params: { type:
|
|
4423
|
+
params: { type: schema43.properties.selector.type },
|
|
4254
4424
|
message: "must be string,null"
|
|
4255
4425
|
};
|
|
4256
4426
|
if (vErrors === null) vErrors = [err7];
|
|
@@ -4277,7 +4447,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4277
4447
|
instancePath: instancePath + "/result",
|
|
4278
4448
|
schemaPath: "#/definitions/DkimResult/enum",
|
|
4279
4449
|
keyword: "enum",
|
|
4280
|
-
params: { allowedValues:
|
|
4450
|
+
params: { allowedValues: schema44.enum },
|
|
4281
4451
|
message: "must be equal to one of the allowed values"
|
|
4282
4452
|
};
|
|
4283
4453
|
if (vErrors === null) vErrors = [err9];
|
|
@@ -4306,7 +4476,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4306
4476
|
instancePath: instancePath + "/keyBits",
|
|
4307
4477
|
schemaPath: "#/properties/keyBits/type",
|
|
4308
4478
|
keyword: "type",
|
|
4309
|
-
params: { type:
|
|
4479
|
+
params: { type: schema43.properties.keyBits.type },
|
|
4310
4480
|
message: "must be integer,null"
|
|
4311
4481
|
};
|
|
4312
4482
|
if (vErrors === null) vErrors = [err11];
|
|
@@ -4353,7 +4523,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4353
4523
|
instancePath: instancePath + "/algo",
|
|
4354
4524
|
schemaPath: "#/properties/algo/type",
|
|
4355
4525
|
keyword: "type",
|
|
4356
|
-
params: { type:
|
|
4526
|
+
params: { type: schema43.properties.algo.type },
|
|
4357
4527
|
message: "must be string,null"
|
|
4358
4528
|
};
|
|
4359
4529
|
if (vErrors === null) vErrors = [err14];
|
|
@@ -4507,7 +4677,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4507
4677
|
instancePath: instancePath + "/spf",
|
|
4508
4678
|
schemaPath: "#/definitions/SpfResult/enum",
|
|
4509
4679
|
keyword: "enum",
|
|
4510
|
-
params: { allowedValues:
|
|
4680
|
+
params: { allowedValues: schema40.enum },
|
|
4511
4681
|
message: "must be equal to one of the allowed values"
|
|
4512
4682
|
};
|
|
4513
4683
|
if (vErrors === null) vErrors = [err10];
|
|
@@ -4534,7 +4704,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4534
4704
|
instancePath: instancePath + "/dmarc",
|
|
4535
4705
|
schemaPath: "#/definitions/DmarcResult/enum",
|
|
4536
4706
|
keyword: "enum",
|
|
4537
|
-
params: { allowedValues:
|
|
4707
|
+
params: { allowedValues: schema41.enum },
|
|
4538
4708
|
message: "must be equal to one of the allowed values"
|
|
4539
4709
|
};
|
|
4540
4710
|
if (vErrors === null) vErrors = [err12];
|
|
@@ -4549,7 +4719,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4549
4719
|
instancePath: instancePath + "/dmarcPolicy",
|
|
4550
4720
|
schemaPath: "#/definitions/DmarcPolicy/type",
|
|
4551
4721
|
keyword: "type",
|
|
4552
|
-
params: { type:
|
|
4722
|
+
params: { type: schema35.type },
|
|
4553
4723
|
message: "must be string,null"
|
|
4554
4724
|
};
|
|
4555
4725
|
if (vErrors === null) vErrors = [err13];
|
|
@@ -4561,7 +4731,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4561
4731
|
instancePath: instancePath + "/dmarcPolicy",
|
|
4562
4732
|
schemaPath: "#/definitions/DmarcPolicy/enum",
|
|
4563
4733
|
keyword: "enum",
|
|
4564
|
-
params: { allowedValues:
|
|
4734
|
+
params: { allowedValues: schema35.enum },
|
|
4565
4735
|
message: "must be equal to one of the allowed values"
|
|
4566
4736
|
};
|
|
4567
4737
|
if (vErrors === null) vErrors = [err14];
|
|
@@ -4576,7 +4746,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4576
4746
|
instancePath: instancePath + "/dmarcFromDomain",
|
|
4577
4747
|
schemaPath: "#/properties/dmarcFromDomain/type",
|
|
4578
4748
|
keyword: "type",
|
|
4579
|
-
params: { type:
|
|
4749
|
+
params: { type: schema39.properties.dmarcFromDomain.type },
|
|
4580
4750
|
message: "must be string,null"
|
|
4581
4751
|
};
|
|
4582
4752
|
if (vErrors === null) vErrors = [err15];
|
|
@@ -4619,7 +4789,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4619
4789
|
instancePath: instancePath + "/dmarcSpfStrict",
|
|
4620
4790
|
schemaPath: "#/properties/dmarcSpfStrict/type",
|
|
4621
4791
|
keyword: "type",
|
|
4622
|
-
params: { type:
|
|
4792
|
+
params: { type: schema39.properties.dmarcSpfStrict.type },
|
|
4623
4793
|
message: "must be boolean,null"
|
|
4624
4794
|
};
|
|
4625
4795
|
if (vErrors === null) vErrors = [err18];
|
|
@@ -4634,7 +4804,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4634
4804
|
instancePath: instancePath + "/dmarcDkimStrict",
|
|
4635
4805
|
schemaPath: "#/properties/dmarcDkimStrict/type",
|
|
4636
4806
|
keyword: "type",
|
|
4637
|
-
params: { type:
|
|
4807
|
+
params: { type: schema39.properties.dmarcDkimStrict.type },
|
|
4638
4808
|
message: "must be boolean,null"
|
|
4639
4809
|
};
|
|
4640
4810
|
if (vErrors === null) vErrors = [err19];
|
|
@@ -6576,6 +6746,13 @@ const emailReceivedEventJsonSchema = {
|
|
|
6576
6746
|
}, { "type": "null" }],
|
|
6577
6747
|
"description": "Parsed BCC header addresses. Null if the email had no BCC header. Note: BCC is only available for outgoing emails or when explicitly provided."
|
|
6578
6748
|
},
|
|
6749
|
+
"to_addresses": {
|
|
6750
|
+
"anyOf": [{
|
|
6751
|
+
"type": "array",
|
|
6752
|
+
"items": { "$ref": "#/definitions/EmailAddress" }
|
|
6753
|
+
}, { "type": "null" }],
|
|
6754
|
+
"description": "Parsed To header addresses. Null if the email had no To header."
|
|
6755
|
+
},
|
|
6579
6756
|
"in_reply_to": {
|
|
6580
6757
|
"anyOf": [{
|
|
6581
6758
|
"type": "array",
|
|
@@ -6612,6 +6789,7 @@ const emailReceivedEventJsonSchema = {
|
|
|
6612
6789
|
"reply_to",
|
|
6613
6790
|
"cc",
|
|
6614
6791
|
"bcc",
|
|
6792
|
+
"to_addresses",
|
|
6615
6793
|
"in_reply_to",
|
|
6616
6794
|
"references",
|
|
6617
6795
|
"attachments",
|
|
@@ -6707,6 +6885,10 @@ const emailReceivedEventJsonSchema = {
|
|
|
6707
6885
|
"type": "null",
|
|
6708
6886
|
"description": "Always null when parsing fails."
|
|
6709
6887
|
},
|
|
6888
|
+
"to_addresses": {
|
|
6889
|
+
"type": "null",
|
|
6890
|
+
"description": "Always null when parsing fails."
|
|
6891
|
+
},
|
|
6710
6892
|
"in_reply_to": {
|
|
6711
6893
|
"type": "null",
|
|
6712
6894
|
"description": "Always null when parsing fails."
|
|
@@ -6733,6 +6915,7 @@ const emailReceivedEventJsonSchema = {
|
|
|
6733
6915
|
"reply_to",
|
|
6734
6916
|
"cc",
|
|
6735
6917
|
"bcc",
|
|
6918
|
+
"to_addresses",
|
|
6736
6919
|
"in_reply_to",
|
|
6737
6920
|
"references",
|
|
6738
6921
|
"attachments",
|