← Files AixcutARCHIVED FILE
scripts/schema-validators.mjs
228 KB · Nov 6, 2026 · 07:28 UTC
// Generated by scripts/generate-validators.mjs. Do not edit.
import { isDeepStrictEqual } from "node:util";
"use strict";
export const edit_plan = validate20;
const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/edit-plan.schema.json","type":"object","additionalProperties":false,"required":["schema_version","plan_id","project_id","timeline_id","base_revision","intent","mode","scope","budget","acceptance"],"properties":{"schema_version":{"const":"1.0.0"},"plan_id":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"base_revision":{"type":"integer","minimum":0},"intent":{"enum":["inspect","mechanical_edit","talking_head","speech","assembly","generation","export","verify"]},"mode":{"enum":["inspect_only","mechanical","local_edit","full_assembly"]},"scope":{"type":"object","additionalProperties":false,"required":["source_refs","target_refs","preserve","delete_refs","optional_enhancements"],"properties":{"source_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"target_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"preserve":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"delete_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"optional_enhancements":{"type":"array","uniqueItems":true,"items":{"enum":["voice","music","b_roll","motion_graphics","export"]}},"authorized_actions":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500}}},"sources":{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["ref","duration_ms"],"properties":{"ref":{"type":"string","minLength":1},"duration_ms":{"type":"integer","minimum":0},"input_version":{"type":"string","minLength":1}}}},"shots":{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["shot_ref","source_ref","source_range","output_range","audio_role"],"properties":{"shot_ref":{"type":"string","minLength":1},"source_ref":{"type":"string","minLength":1},"source_range":{"type":"object","additionalProperties":false,"required":["start_ms","end_ms"],"properties":{"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":1}}},"output_range":{"type":"object","additionalProperties":false,"required":["start_ms","end_ms"],"properties":{"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":1}}},"audio_role":{"enum":["dialogue","voiceover","music","ambience","silent"]},"depends_on":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500}}}},"audio":{"type":"object","additionalProperties":false,"required":["preserve_original","roles"],"properties":{"preserve_original":{"type":"boolean"},"roles":{"type":"array","items":{"enum":["dialogue","voiceover","music","ambience","silent"]}},"checks":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500}}},"captions":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"enum":["preserve","none","transcript","speech"]},"source_ref":{"type":"string","minLength":1},"checks":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500}}},"budget":{"type":"object","additionalProperties":false,"required":["max_calls","max_retries","max_wait_ms"],"properties":{"max_calls":{"type":"integer","minimum":1,"maximum":1000},"max_retries":{"type":"integer","minimum":0,"maximum":10},"max_wait_ms":{"type":"integer","minimum":0,"maximum":43200000}}},"acceptance":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["layer","check"],"properties":{"layer":{"enum":["structure","semantic","visual","audio"]},"check":{"type":"string","minLength":1}}}}},"allOf":[{"if":{"properties":{"mode":{"const":"mechanical"}}},"then":{"properties":{"scope":{"properties":{"optional_enhancements":{"maxItems":0}}}}}},{"if":{"properties":{"intent":{"enum":["mechanical_edit","talking_head","assembly"]}}},"then":{"required":["sources","shots"],"properties":{"shots":{"minItems":1}}}}]};
const func1 = Object.prototype.hasOwnProperty;
const func2 = (value => Array.from(value).length);
const func0 = isDeepStrictEqual;
function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/edit-plan.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate20.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
const _errs2 = errors;
let valid1 = true;
const _errs3 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.mode !== undefined){
if("mechanical" !== data.mode){
const err0 = {};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
}
}
var _valid0 = _errs3 === errors;
errors = _errs2;
if(vErrors !== null){
if(_errs2){
vErrors.length = _errs2;
}
else {
vErrors = null;
}
}
if(_valid0){
const _errs5 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.scope !== undefined){
let data1 = data.scope;
if(data1 && typeof data1 == "object" && !Array.isArray(data1)){
if(data1.optional_enhancements !== undefined){
let data2 = data1.optional_enhancements;
if(Array.isArray(data2)){
if(data2.length > 0){
const err1 = {instancePath:instancePath+"/scope/optional_enhancements",schemaPath:"#/allOf/0/then/properties/scope/properties/optional_enhancements/maxItems",keyword:"maxItems",params:{limit: 0},message:"must NOT have more than 0 items"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
}
}
}
}
}
var _valid0 = _errs5 === errors;
valid1 = _valid0;
if(valid1){
var props0 = {};
props0.scope = true;
props0.mode = true;
}
}
if(!valid1){
const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
const _errs9 = errors;
let valid5 = true;
const _errs10 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.intent !== undefined){
let data3 = data.intent;
if(!(((data3 === "mechanical_edit") || (data3 === "talking_head")) || (data3 === "assembly"))){
const err3 = {};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
}
}
var _valid1 = _errs10 === errors;
errors = _errs9;
if(vErrors !== null){
if(_errs9){
vErrors.length = _errs9;
}
else {
vErrors = null;
}
}
if(_valid1){
const _errs12 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.sources === undefined){
const err4 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "sources"},message:"must have required property '"+"sources"+"'"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
if(data.shots === undefined){
const err5 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "shots"},message:"must have required property '"+"shots"+"'"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
if(data.shots !== undefined){
let data4 = data.shots;
if(Array.isArray(data4)){
if(data4.length < 1){
const err6 = {instancePath:instancePath+"/shots",schemaPath:"#/allOf/1/then/properties/shots/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
}
}
}
var _valid1 = _errs12 === errors;
valid5 = _valid1;
if(valid5){
var props1 = {};
props1.shots = true;
props1.intent = true;
}
}
if(!valid5){
const err7 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
if(props0 !== true && props1 !== undefined){
if(props1 === true){
props0 = true;
}
else {
props0 = props0 || {};
Object.assign(props0, props1);
}
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.schema_version === undefined){
const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
if(data.plan_id === undefined){
const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "plan_id"},message:"must have required property '"+"plan_id"+"'"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
if(data.project_id === undefined){
const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
if(data.timeline_id === undefined){
const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
if(data.base_revision === undefined){
const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "base_revision"},message:"must have required property '"+"base_revision"+"'"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
if(data.intent === undefined){
const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "intent"},message:"must have required property '"+"intent"+"'"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
if(data.mode === undefined){
const err14 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
if(data.scope === undefined){
const err15 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
if(data.budget === undefined){
const err16 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "budget"},message:"must have required property '"+"budget"+"'"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
if(data.acceptance === undefined){
const err17 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "acceptance"},message:"must have required property '"+"acceptance"+"'"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
for(const key0 in data){
if(!(func1.call(schema31.properties, key0))){
const err18 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
}
if(data.schema_version !== undefined){
if("1.0.0" !== data.schema_version){
const err19 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: "1.0.0"},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
if(data.plan_id !== undefined){
let data6 = data.plan_id;
if(typeof data6 === "string"){
if(func2(data6) < 1){
const err20 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
else {
const err21 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
}
if(data.project_id !== undefined){
let data7 = data.project_id;
if(typeof data7 === "string"){
if(func2(data7) < 1){
const err22 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
else {
const err23 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
}
if(data.timeline_id !== undefined){
let data8 = data.timeline_id;
if(typeof data8 === "string"){
if(func2(data8) < 1){
const err24 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
else {
const err25 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
if(data.base_revision !== undefined){
let data9 = data.base_revision;
if(!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))){
const err26 = {instancePath:instancePath+"/base_revision",schemaPath:"#/properties/base_revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
}
if((typeof data9 == "number") && (isFinite(data9))){
if(data9 < 0 || isNaN(data9)){
const err27 = {instancePath:instancePath+"/base_revision",schemaPath:"#/properties/base_revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
}
if(data.intent !== undefined){
let data10 = data.intent;
if(!((((((((data10 === "inspect") || (data10 === "mechanical_edit")) || (data10 === "talking_head")) || (data10 === "speech")) || (data10 === "assembly")) || (data10 === "generation")) || (data10 === "export")) || (data10 === "verify"))){
const err28 = {instancePath:instancePath+"/intent",schemaPath:"#/properties/intent/enum",keyword:"enum",params:{allowedValues: schema31.properties.intent.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
}
if(data.mode !== undefined){
let data11 = data.mode;
if(!((((data11 === "inspect_only") || (data11 === "mechanical")) || (data11 === "local_edit")) || (data11 === "full_assembly"))){
const err29 = {instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema31.properties.mode.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
if(data.scope !== undefined){
let data12 = data.scope;
if(data12 && typeof data12 == "object" && !Array.isArray(data12)){
if(data12.source_refs === undefined){
const err30 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/required",keyword:"required",params:{missingProperty: "source_refs"},message:"must have required property '"+"source_refs"+"'"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
if(data12.target_refs === undefined){
const err31 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/required",keyword:"required",params:{missingProperty: "target_refs"},message:"must have required property '"+"target_refs"+"'"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
}
if(data12.preserve === undefined){
const err32 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/required",keyword:"required",params:{missingProperty: "preserve"},message:"must have required property '"+"preserve"+"'"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
if(data12.delete_refs === undefined){
const err33 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/required",keyword:"required",params:{missingProperty: "delete_refs"},message:"must have required property '"+"delete_refs"+"'"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
if(data12.optional_enhancements === undefined){
const err34 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/required",keyword:"required",params:{missingProperty: "optional_enhancements"},message:"must have required property '"+"optional_enhancements"+"'"};
if(vErrors === null){
vErrors = [err34];
}
else {
vErrors.push(err34);
}
errors++;
}
for(const key1 in data12){
if(!((((((key1 === "source_refs") || (key1 === "target_refs")) || (key1 === "preserve")) || (key1 === "delete_refs")) || (key1 === "optional_enhancements")) || (key1 === "authorized_actions"))){
const err35 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err35];
}
else {
vErrors.push(err35);
}
errors++;
}
}
if(data12.source_refs !== undefined){
let data13 = data12.source_refs;
if(Array.isArray(data13)){
if(data13.length > 500){
const err36 = {instancePath:instancePath+"/scope/source_refs",schemaPath:"#/properties/scope/properties/source_refs/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err36];
}
else {
vErrors.push(err36);
}
errors++;
}
const len0 = data13.length;
for(let i0=0; i0<len0; i0++){
let data14 = data13[i0];
if(typeof data14 === "string"){
if(func2(data14) < 1){
const err37 = {instancePath:instancePath+"/scope/source_refs/" + i0,schemaPath:"#/properties/scope/properties/source_refs/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err37];
}
else {
vErrors.push(err37);
}
errors++;
}
}
else {
const err38 = {instancePath:instancePath+"/scope/source_refs/" + i0,schemaPath:"#/properties/scope/properties/source_refs/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err38];
}
else {
vErrors.push(err38);
}
errors++;
}
}
let i1 = data13.length;
let j0;
if(i1 > 1){
const indices0 = {};
for(;i1--;){
let item0 = data13[i1];
if(typeof item0 !== "string"){
continue;
}
if(typeof indices0[item0] == "number"){
j0 = indices0[item0];
const err39 = {instancePath:instancePath+"/scope/source_refs",schemaPath:"#/properties/scope/properties/source_refs/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
if(vErrors === null){
vErrors = [err39];
}
else {
vErrors.push(err39);
}
errors++;
break;
}
indices0[item0] = i1;
}
}
}
else {
const err40 = {instancePath:instancePath+"/scope/source_refs",schemaPath:"#/properties/scope/properties/source_refs/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err40];
}
else {
vErrors.push(err40);
}
errors++;
}
}
if(data12.target_refs !== undefined){
let data15 = data12.target_refs;
if(Array.isArray(data15)){
if(data15.length > 500){
const err41 = {instancePath:instancePath+"/scope/target_refs",schemaPath:"#/properties/scope/properties/target_refs/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err41];
}
else {
vErrors.push(err41);
}
errors++;
}
const len1 = data15.length;
for(let i2=0; i2<len1; i2++){
let data16 = data15[i2];
if(typeof data16 === "string"){
if(func2(data16) < 1){
const err42 = {instancePath:instancePath+"/scope/target_refs/" + i2,schemaPath:"#/properties/scope/properties/target_refs/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err42];
}
else {
vErrors.push(err42);
}
errors++;
}
}
else {
const err43 = {instancePath:instancePath+"/scope/target_refs/" + i2,schemaPath:"#/properties/scope/properties/target_refs/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err43];
}
else {
vErrors.push(err43);
}
errors++;
}
}
let i3 = data15.length;
let j1;
if(i3 > 1){
const indices1 = {};
for(;i3--;){
let item1 = data15[i3];
if(typeof item1 !== "string"){
continue;
}
if(typeof indices1[item1] == "number"){
j1 = indices1[item1];
const err44 = {instancePath:instancePath+"/scope/target_refs",schemaPath:"#/properties/scope/properties/target_refs/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};
if(vErrors === null){
vErrors = [err44];
}
else {
vErrors.push(err44);
}
errors++;
break;
}
indices1[item1] = i3;
}
}
}
else {
const err45 = {instancePath:instancePath+"/scope/target_refs",schemaPath:"#/properties/scope/properties/target_refs/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err45];
}
else {
vErrors.push(err45);
}
errors++;
}
}
if(data12.preserve !== undefined){
let data17 = data12.preserve;
if(Array.isArray(data17)){
if(data17.length > 500){
const err46 = {instancePath:instancePath+"/scope/preserve",schemaPath:"#/properties/scope/properties/preserve/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err46];
}
else {
vErrors.push(err46);
}
errors++;
}
const len2 = data17.length;
for(let i4=0; i4<len2; i4++){
let data18 = data17[i4];
if(typeof data18 === "string"){
if(func2(data18) < 1){
const err47 = {instancePath:instancePath+"/scope/preserve/" + i4,schemaPath:"#/properties/scope/properties/preserve/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err47];
}
else {
vErrors.push(err47);
}
errors++;
}
}
else {
const err48 = {instancePath:instancePath+"/scope/preserve/" + i4,schemaPath:"#/properties/scope/properties/preserve/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err48];
}
else {
vErrors.push(err48);
}
errors++;
}
}
let i5 = data17.length;
let j2;
if(i5 > 1){
const indices2 = {};
for(;i5--;){
let item2 = data17[i5];
if(typeof item2 !== "string"){
continue;
}
if(typeof indices2[item2] == "number"){
j2 = indices2[item2];
const err49 = {instancePath:instancePath+"/scope/preserve",schemaPath:"#/properties/scope/properties/preserve/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};
if(vErrors === null){
vErrors = [err49];
}
else {
vErrors.push(err49);
}
errors++;
break;
}
indices2[item2] = i5;
}
}
}
else {
const err50 = {instancePath:instancePath+"/scope/preserve",schemaPath:"#/properties/scope/properties/preserve/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err50];
}
else {
vErrors.push(err50);
}
errors++;
}
}
if(data12.delete_refs !== undefined){
let data19 = data12.delete_refs;
if(Array.isArray(data19)){
if(data19.length > 500){
const err51 = {instancePath:instancePath+"/scope/delete_refs",schemaPath:"#/properties/scope/properties/delete_refs/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err51];
}
else {
vErrors.push(err51);
}
errors++;
}
const len3 = data19.length;
for(let i6=0; i6<len3; i6++){
let data20 = data19[i6];
if(typeof data20 === "string"){
if(func2(data20) < 1){
const err52 = {instancePath:instancePath+"/scope/delete_refs/" + i6,schemaPath:"#/properties/scope/properties/delete_refs/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err52];
}
else {
vErrors.push(err52);
}
errors++;
}
}
else {
const err53 = {instancePath:instancePath+"/scope/delete_refs/" + i6,schemaPath:"#/properties/scope/properties/delete_refs/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err53];
}
else {
vErrors.push(err53);
}
errors++;
}
}
let i7 = data19.length;
let j3;
if(i7 > 1){
const indices3 = {};
for(;i7--;){
let item3 = data19[i7];
if(typeof item3 !== "string"){
continue;
}
if(typeof indices3[item3] == "number"){
j3 = indices3[item3];
const err54 = {instancePath:instancePath+"/scope/delete_refs",schemaPath:"#/properties/scope/properties/delete_refs/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i7+" are identical)"};
if(vErrors === null){
vErrors = [err54];
}
else {
vErrors.push(err54);
}
errors++;
break;
}
indices3[item3] = i7;
}
}
}
else {
const err55 = {instancePath:instancePath+"/scope/delete_refs",schemaPath:"#/properties/scope/properties/delete_refs/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err55];
}
else {
vErrors.push(err55);
}
errors++;
}
}
if(data12.optional_enhancements !== undefined){
let data21 = data12.optional_enhancements;
if(Array.isArray(data21)){
const len4 = data21.length;
for(let i8=0; i8<len4; i8++){
let data22 = data21[i8];
if(!(((((data22 === "voice") || (data22 === "music")) || (data22 === "b_roll")) || (data22 === "motion_graphics")) || (data22 === "export"))){
const err56 = {instancePath:instancePath+"/scope/optional_enhancements/" + i8,schemaPath:"#/properties/scope/properties/optional_enhancements/items/enum",keyword:"enum",params:{allowedValues: schema31.properties.scope.properties.optional_enhancements.items.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err56];
}
else {
vErrors.push(err56);
}
errors++;
}
}
let i9 = data21.length;
let j4;
if(i9 > 1){
outer0:
for(;i9--;){
for(j4 = i9; j4--;){
if(func0(data21[i9], data21[j4])){
const err57 = {instancePath:instancePath+"/scope/optional_enhancements",schemaPath:"#/properties/scope/properties/optional_enhancements/uniqueItems",keyword:"uniqueItems",params:{i: i9, j: j4},message:"must NOT have duplicate items (items ## "+j4+" and "+i9+" are identical)"};
if(vErrors === null){
vErrors = [err57];
}
else {
vErrors.push(err57);
}
errors++;
break outer0;
}
}
}
}
}
else {
const err58 = {instancePath:instancePath+"/scope/optional_enhancements",schemaPath:"#/properties/scope/properties/optional_enhancements/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err58];
}
else {
vErrors.push(err58);
}
errors++;
}
}
if(data12.authorized_actions !== undefined){
let data23 = data12.authorized_actions;
if(Array.isArray(data23)){
if(data23.length > 500){
const err59 = {instancePath:instancePath+"/scope/authorized_actions",schemaPath:"#/properties/scope/properties/authorized_actions/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err59];
}
else {
vErrors.push(err59);
}
errors++;
}
const len5 = data23.length;
for(let i10=0; i10<len5; i10++){
let data24 = data23[i10];
if(typeof data24 === "string"){
if(func2(data24) < 1){
const err60 = {instancePath:instancePath+"/scope/authorized_actions/" + i10,schemaPath:"#/properties/scope/properties/authorized_actions/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err60];
}
else {
vErrors.push(err60);
}
errors++;
}
}
else {
const err61 = {instancePath:instancePath+"/scope/authorized_actions/" + i10,schemaPath:"#/properties/scope/properties/authorized_actions/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err61];
}
else {
vErrors.push(err61);
}
errors++;
}
}
let i11 = data23.length;
let j5;
if(i11 > 1){
const indices4 = {};
for(;i11--;){
let item4 = data23[i11];
if(typeof item4 !== "string"){
continue;
}
if(typeof indices4[item4] == "number"){
j5 = indices4[item4];
const err62 = {instancePath:instancePath+"/scope/authorized_actions",schemaPath:"#/properties/scope/properties/authorized_actions/uniqueItems",keyword:"uniqueItems",params:{i: i11, j: j5},message:"must NOT have duplicate items (items ## "+j5+" and "+i11+" are identical)"};
if(vErrors === null){
vErrors = [err62];
}
else {
vErrors.push(err62);
}
errors++;
break;
}
indices4[item4] = i11;
}
}
}
else {
const err63 = {instancePath:instancePath+"/scope/authorized_actions",schemaPath:"#/properties/scope/properties/authorized_actions/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err63];
}
else {
vErrors.push(err63);
}
errors++;
}
}
}
else {
const err64 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err64];
}
else {
vErrors.push(err64);
}
errors++;
}
}
if(data.sources !== undefined){
let data25 = data.sources;
if(Array.isArray(data25)){
if(data25.length > 500){
const err65 = {instancePath:instancePath+"/sources",schemaPath:"#/properties/sources/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err65];
}
else {
vErrors.push(err65);
}
errors++;
}
const len6 = data25.length;
for(let i12=0; i12<len6; i12++){
let data26 = data25[i12];
if(data26 && typeof data26 == "object" && !Array.isArray(data26)){
if(data26.ref === undefined){
const err66 = {instancePath:instancePath+"/sources/" + i12,schemaPath:"#/properties/sources/items/required",keyword:"required",params:{missingProperty: "ref"},message:"must have required property '"+"ref"+"'"};
if(vErrors === null){
vErrors = [err66];
}
else {
vErrors.push(err66);
}
errors++;
}
if(data26.duration_ms === undefined){
const err67 = {instancePath:instancePath+"/sources/" + i12,schemaPath:"#/properties/sources/items/required",keyword:"required",params:{missingProperty: "duration_ms"},message:"must have required property '"+"duration_ms"+"'"};
if(vErrors === null){
vErrors = [err67];
}
else {
vErrors.push(err67);
}
errors++;
}
for(const key2 in data26){
if(!(((key2 === "ref") || (key2 === "duration_ms")) || (key2 === "input_version"))){
const err68 = {instancePath:instancePath+"/sources/" + i12,schemaPath:"#/properties/sources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err68];
}
else {
vErrors.push(err68);
}
errors++;
}
}
if(data26.ref !== undefined){
let data27 = data26.ref;
if(typeof data27 === "string"){
if(func2(data27) < 1){
const err69 = {instancePath:instancePath+"/sources/" + i12+"/ref",schemaPath:"#/properties/sources/items/properties/ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err69];
}
else {
vErrors.push(err69);
}
errors++;
}
}
else {
const err70 = {instancePath:instancePath+"/sources/" + i12+"/ref",schemaPath:"#/properties/sources/items/properties/ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err70];
}
else {
vErrors.push(err70);
}
errors++;
}
}
if(data26.duration_ms !== undefined){
let data28 = data26.duration_ms;
if(!(((typeof data28 == "number") && (!(data28 % 1) && !isNaN(data28))) && (isFinite(data28)))){
const err71 = {instancePath:instancePath+"/sources/" + i12+"/duration_ms",schemaPath:"#/properties/sources/items/properties/duration_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err71];
}
else {
vErrors.push(err71);
}
errors++;
}
if((typeof data28 == "number") && (isFinite(data28))){
if(data28 < 0 || isNaN(data28)){
const err72 = {instancePath:instancePath+"/sources/" + i12+"/duration_ms",schemaPath:"#/properties/sources/items/properties/duration_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err72];
}
else {
vErrors.push(err72);
}
errors++;
}
}
}
if(data26.input_version !== undefined){
let data29 = data26.input_version;
if(typeof data29 === "string"){
if(func2(data29) < 1){
const err73 = {instancePath:instancePath+"/sources/" + i12+"/input_version",schemaPath:"#/properties/sources/items/properties/input_version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err73];
}
else {
vErrors.push(err73);
}
errors++;
}
}
else {
const err74 = {instancePath:instancePath+"/sources/" + i12+"/input_version",schemaPath:"#/properties/sources/items/properties/input_version/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err74];
}
else {
vErrors.push(err74);
}
errors++;
}
}
}
else {
const err75 = {instancePath:instancePath+"/sources/" + i12,schemaPath:"#/properties/sources/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err75];
}
else {
vErrors.push(err75);
}
errors++;
}
}
}
else {
const err76 = {instancePath:instancePath+"/sources",schemaPath:"#/properties/sources/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err76];
}
else {
vErrors.push(err76);
}
errors++;
}
}
if(data.shots !== undefined){
let data30 = data.shots;
if(Array.isArray(data30)){
if(data30.length > 500){
const err77 = {instancePath:instancePath+"/shots",schemaPath:"#/properties/shots/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err77];
}
else {
vErrors.push(err77);
}
errors++;
}
const len7 = data30.length;
for(let i13=0; i13<len7; i13++){
let data31 = data30[i13];
if(data31 && typeof data31 == "object" && !Array.isArray(data31)){
if(data31.shot_ref === undefined){
const err78 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/required",keyword:"required",params:{missingProperty: "shot_ref"},message:"must have required property '"+"shot_ref"+"'"};
if(vErrors === null){
vErrors = [err78];
}
else {
vErrors.push(err78);
}
errors++;
}
if(data31.source_ref === undefined){
const err79 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/required",keyword:"required",params:{missingProperty: "source_ref"},message:"must have required property '"+"source_ref"+"'"};
if(vErrors === null){
vErrors = [err79];
}
else {
vErrors.push(err79);
}
errors++;
}
if(data31.source_range === undefined){
const err80 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/required",keyword:"required",params:{missingProperty: "source_range"},message:"must have required property '"+"source_range"+"'"};
if(vErrors === null){
vErrors = [err80];
}
else {
vErrors.push(err80);
}
errors++;
}
if(data31.output_range === undefined){
const err81 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/required",keyword:"required",params:{missingProperty: "output_range"},message:"must have required property '"+"output_range"+"'"};
if(vErrors === null){
vErrors = [err81];
}
else {
vErrors.push(err81);
}
errors++;
}
if(data31.audio_role === undefined){
const err82 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/required",keyword:"required",params:{missingProperty: "audio_role"},message:"must have required property '"+"audio_role"+"'"};
if(vErrors === null){
vErrors = [err82];
}
else {
vErrors.push(err82);
}
errors++;
}
for(const key3 in data31){
if(!((((((key3 === "shot_ref") || (key3 === "source_ref")) || (key3 === "source_range")) || (key3 === "output_range")) || (key3 === "audio_role")) || (key3 === "depends_on"))){
const err83 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err83];
}
else {
vErrors.push(err83);
}
errors++;
}
}
if(data31.shot_ref !== undefined){
let data32 = data31.shot_ref;
if(typeof data32 === "string"){
if(func2(data32) < 1){
const err84 = {instancePath:instancePath+"/shots/" + i13+"/shot_ref",schemaPath:"#/properties/shots/items/properties/shot_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err84];
}
else {
vErrors.push(err84);
}
errors++;
}
}
else {
const err85 = {instancePath:instancePath+"/shots/" + i13+"/shot_ref",schemaPath:"#/properties/shots/items/properties/shot_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err85];
}
else {
vErrors.push(err85);
}
errors++;
}
}
if(data31.source_ref !== undefined){
let data33 = data31.source_ref;
if(typeof data33 === "string"){
if(func2(data33) < 1){
const err86 = {instancePath:instancePath+"/shots/" + i13+"/source_ref",schemaPath:"#/properties/shots/items/properties/source_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err86];
}
else {
vErrors.push(err86);
}
errors++;
}
}
else {
const err87 = {instancePath:instancePath+"/shots/" + i13+"/source_ref",schemaPath:"#/properties/shots/items/properties/source_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err87];
}
else {
vErrors.push(err87);
}
errors++;
}
}
if(data31.source_range !== undefined){
let data34 = data31.source_range;
if(data34 && typeof data34 == "object" && !Array.isArray(data34)){
if(data34.start_ms === undefined){
const err88 = {instancePath:instancePath+"/shots/" + i13+"/source_range",schemaPath:"#/properties/shots/items/properties/source_range/required",keyword:"required",params:{missingProperty: "start_ms"},message:"must have required property '"+"start_ms"+"'"};
if(vErrors === null){
vErrors = [err88];
}
else {
vErrors.push(err88);
}
errors++;
}
if(data34.end_ms === undefined){
const err89 = {instancePath:instancePath+"/shots/" + i13+"/source_range",schemaPath:"#/properties/shots/items/properties/source_range/required",keyword:"required",params:{missingProperty: "end_ms"},message:"must have required property '"+"end_ms"+"'"};
if(vErrors === null){
vErrors = [err89];
}
else {
vErrors.push(err89);
}
errors++;
}
for(const key4 in data34){
if(!((key4 === "start_ms") || (key4 === "end_ms"))){
const err90 = {instancePath:instancePath+"/shots/" + i13+"/source_range",schemaPath:"#/properties/shots/items/properties/source_range/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err90];
}
else {
vErrors.push(err90);
}
errors++;
}
}
if(data34.start_ms !== undefined){
let data35 = data34.start_ms;
if(!(((typeof data35 == "number") && (!(data35 % 1) && !isNaN(data35))) && (isFinite(data35)))){
const err91 = {instancePath:instancePath+"/shots/" + i13+"/source_range/start_ms",schemaPath:"#/properties/shots/items/properties/source_range/properties/start_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err91];
}
else {
vErrors.push(err91);
}
errors++;
}
if((typeof data35 == "number") && (isFinite(data35))){
if(data35 < 0 || isNaN(data35)){
const err92 = {instancePath:instancePath+"/shots/" + i13+"/source_range/start_ms",schemaPath:"#/properties/shots/items/properties/source_range/properties/start_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err92];
}
else {
vErrors.push(err92);
}
errors++;
}
}
}
if(data34.end_ms !== undefined){
let data36 = data34.end_ms;
if(!(((typeof data36 == "number") && (!(data36 % 1) && !isNaN(data36))) && (isFinite(data36)))){
const err93 = {instancePath:instancePath+"/shots/" + i13+"/source_range/end_ms",schemaPath:"#/properties/shots/items/properties/source_range/properties/end_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err93];
}
else {
vErrors.push(err93);
}
errors++;
}
if((typeof data36 == "number") && (isFinite(data36))){
if(data36 < 1 || isNaN(data36)){
const err94 = {instancePath:instancePath+"/shots/" + i13+"/source_range/end_ms",schemaPath:"#/properties/shots/items/properties/source_range/properties/end_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
if(vErrors === null){
vErrors = [err94];
}
else {
vErrors.push(err94);
}
errors++;
}
}
}
}
else {
const err95 = {instancePath:instancePath+"/shots/" + i13+"/source_range",schemaPath:"#/properties/shots/items/properties/source_range/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err95];
}
else {
vErrors.push(err95);
}
errors++;
}
}
if(data31.output_range !== undefined){
let data37 = data31.output_range;
if(data37 && typeof data37 == "object" && !Array.isArray(data37)){
if(data37.start_ms === undefined){
const err96 = {instancePath:instancePath+"/shots/" + i13+"/output_range",schemaPath:"#/properties/shots/items/properties/output_range/required",keyword:"required",params:{missingProperty: "start_ms"},message:"must have required property '"+"start_ms"+"'"};
if(vErrors === null){
vErrors = [err96];
}
else {
vErrors.push(err96);
}
errors++;
}
if(data37.end_ms === undefined){
const err97 = {instancePath:instancePath+"/shots/" + i13+"/output_range",schemaPath:"#/properties/shots/items/properties/output_range/required",keyword:"required",params:{missingProperty: "end_ms"},message:"must have required property '"+"end_ms"+"'"};
if(vErrors === null){
vErrors = [err97];
}
else {
vErrors.push(err97);
}
errors++;
}
for(const key5 in data37){
if(!((key5 === "start_ms") || (key5 === "end_ms"))){
const err98 = {instancePath:instancePath+"/shots/" + i13+"/output_range",schemaPath:"#/properties/shots/items/properties/output_range/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err98];
}
else {
vErrors.push(err98);
}
errors++;
}
}
if(data37.start_ms !== undefined){
let data38 = data37.start_ms;
if(!(((typeof data38 == "number") && (!(data38 % 1) && !isNaN(data38))) && (isFinite(data38)))){
const err99 = {instancePath:instancePath+"/shots/" + i13+"/output_range/start_ms",schemaPath:"#/properties/shots/items/properties/output_range/properties/start_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err99];
}
else {
vErrors.push(err99);
}
errors++;
}
if((typeof data38 == "number") && (isFinite(data38))){
if(data38 < 0 || isNaN(data38)){
const err100 = {instancePath:instancePath+"/shots/" + i13+"/output_range/start_ms",schemaPath:"#/properties/shots/items/properties/output_range/properties/start_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err100];
}
else {
vErrors.push(err100);
}
errors++;
}
}
}
if(data37.end_ms !== undefined){
let data39 = data37.end_ms;
if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){
const err101 = {instancePath:instancePath+"/shots/" + i13+"/output_range/end_ms",schemaPath:"#/properties/shots/items/properties/output_range/properties/end_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err101];
}
else {
vErrors.push(err101);
}
errors++;
}
if((typeof data39 == "number") && (isFinite(data39))){
if(data39 < 1 || isNaN(data39)){
const err102 = {instancePath:instancePath+"/shots/" + i13+"/output_range/end_ms",schemaPath:"#/properties/shots/items/properties/output_range/properties/end_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
if(vErrors === null){
vErrors = [err102];
}
else {
vErrors.push(err102);
}
errors++;
}
}
}
}
else {
const err103 = {instancePath:instancePath+"/shots/" + i13+"/output_range",schemaPath:"#/properties/shots/items/properties/output_range/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err103];
}
else {
vErrors.push(err103);
}
errors++;
}
}
if(data31.audio_role !== undefined){
let data40 = data31.audio_role;
if(!(((((data40 === "dialogue") || (data40 === "voiceover")) || (data40 === "music")) || (data40 === "ambience")) || (data40 === "silent"))){
const err104 = {instancePath:instancePath+"/shots/" + i13+"/audio_role",schemaPath:"#/properties/shots/items/properties/audio_role/enum",keyword:"enum",params:{allowedValues: schema31.properties.shots.items.properties.audio_role.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err104];
}
else {
vErrors.push(err104);
}
errors++;
}
}
if(data31.depends_on !== undefined){
let data41 = data31.depends_on;
if(Array.isArray(data41)){
if(data41.length > 500){
const err105 = {instancePath:instancePath+"/shots/" + i13+"/depends_on",schemaPath:"#/properties/shots/items/properties/depends_on/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err105];
}
else {
vErrors.push(err105);
}
errors++;
}
const len8 = data41.length;
for(let i14=0; i14<len8; i14++){
let data42 = data41[i14];
if(typeof data42 === "string"){
if(func2(data42) < 1){
const err106 = {instancePath:instancePath+"/shots/" + i13+"/depends_on/" + i14,schemaPath:"#/properties/shots/items/properties/depends_on/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err106];
}
else {
vErrors.push(err106);
}
errors++;
}
}
else {
const err107 = {instancePath:instancePath+"/shots/" + i13+"/depends_on/" + i14,schemaPath:"#/properties/shots/items/properties/depends_on/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err107];
}
else {
vErrors.push(err107);
}
errors++;
}
}
let i15 = data41.length;
let j6;
if(i15 > 1){
const indices5 = {};
for(;i15--;){
let item5 = data41[i15];
if(typeof item5 !== "string"){
continue;
}
if(typeof indices5[item5] == "number"){
j6 = indices5[item5];
const err108 = {instancePath:instancePath+"/shots/" + i13+"/depends_on",schemaPath:"#/properties/shots/items/properties/depends_on/uniqueItems",keyword:"uniqueItems",params:{i: i15, j: j6},message:"must NOT have duplicate items (items ## "+j6+" and "+i15+" are identical)"};
if(vErrors === null){
vErrors = [err108];
}
else {
vErrors.push(err108);
}
errors++;
break;
}
indices5[item5] = i15;
}
}
}
else {
const err109 = {instancePath:instancePath+"/shots/" + i13+"/depends_on",schemaPath:"#/properties/shots/items/properties/depends_on/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err109];
}
else {
vErrors.push(err109);
}
errors++;
}
}
}
else {
const err110 = {instancePath:instancePath+"/shots/" + i13,schemaPath:"#/properties/shots/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err110];
}
else {
vErrors.push(err110);
}
errors++;
}
}
}
else {
const err111 = {instancePath:instancePath+"/shots",schemaPath:"#/properties/shots/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err111];
}
else {
vErrors.push(err111);
}
errors++;
}
}
if(data.audio !== undefined){
let data43 = data.audio;
if(data43 && typeof data43 == "object" && !Array.isArray(data43)){
if(data43.preserve_original === undefined){
const err112 = {instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/required",keyword:"required",params:{missingProperty: "preserve_original"},message:"must have required property '"+"preserve_original"+"'"};
if(vErrors === null){
vErrors = [err112];
}
else {
vErrors.push(err112);
}
errors++;
}
if(data43.roles === undefined){
const err113 = {instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/required",keyword:"required",params:{missingProperty: "roles"},message:"must have required property '"+"roles"+"'"};
if(vErrors === null){
vErrors = [err113];
}
else {
vErrors.push(err113);
}
errors++;
}
for(const key6 in data43){
if(!(((key6 === "preserve_original") || (key6 === "roles")) || (key6 === "checks"))){
const err114 = {instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err114];
}
else {
vErrors.push(err114);
}
errors++;
}
}
if(data43.preserve_original !== undefined){
if(typeof data43.preserve_original !== "boolean"){
const err115 = {instancePath:instancePath+"/audio/preserve_original",schemaPath:"#/properties/audio/properties/preserve_original/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
if(vErrors === null){
vErrors = [err115];
}
else {
vErrors.push(err115);
}
errors++;
}
}
if(data43.roles !== undefined){
let data45 = data43.roles;
if(Array.isArray(data45)){
const len9 = data45.length;
for(let i16=0; i16<len9; i16++){
let data46 = data45[i16];
if(!(((((data46 === "dialogue") || (data46 === "voiceover")) || (data46 === "music")) || (data46 === "ambience")) || (data46 === "silent"))){
const err116 = {instancePath:instancePath+"/audio/roles/" + i16,schemaPath:"#/properties/audio/properties/roles/items/enum",keyword:"enum",params:{allowedValues: schema31.properties.audio.properties.roles.items.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err116];
}
else {
vErrors.push(err116);
}
errors++;
}
}
}
else {
const err117 = {instancePath:instancePath+"/audio/roles",schemaPath:"#/properties/audio/properties/roles/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err117];
}
else {
vErrors.push(err117);
}
errors++;
}
}
if(data43.checks !== undefined){
let data47 = data43.checks;
if(Array.isArray(data47)){
if(data47.length > 500){
const err118 = {instancePath:instancePath+"/audio/checks",schemaPath:"#/properties/audio/properties/checks/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err118];
}
else {
vErrors.push(err118);
}
errors++;
}
const len10 = data47.length;
for(let i17=0; i17<len10; i17++){
let data48 = data47[i17];
if(typeof data48 === "string"){
if(func2(data48) < 1){
const err119 = {instancePath:instancePath+"/audio/checks/" + i17,schemaPath:"#/properties/audio/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err119];
}
else {
vErrors.push(err119);
}
errors++;
}
}
else {
const err120 = {instancePath:instancePath+"/audio/checks/" + i17,schemaPath:"#/properties/audio/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err120];
}
else {
vErrors.push(err120);
}
errors++;
}
}
let i18 = data47.length;
let j7;
if(i18 > 1){
const indices6 = {};
for(;i18--;){
let item6 = data47[i18];
if(typeof item6 !== "string"){
continue;
}
if(typeof indices6[item6] == "number"){
j7 = indices6[item6];
const err121 = {instancePath:instancePath+"/audio/checks",schemaPath:"#/properties/audio/properties/checks/uniqueItems",keyword:"uniqueItems",params:{i: i18, j: j7},message:"must NOT have duplicate items (items ## "+j7+" and "+i18+" are identical)"};
if(vErrors === null){
vErrors = [err121];
}
else {
vErrors.push(err121);
}
errors++;
break;
}
indices6[item6] = i18;
}
}
}
else {
const err122 = {instancePath:instancePath+"/audio/checks",schemaPath:"#/properties/audio/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err122];
}
else {
vErrors.push(err122);
}
errors++;
}
}
}
else {
const err123 = {instancePath:instancePath+"/audio",schemaPath:"#/properties/audio/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err123];
}
else {
vErrors.push(err123);
}
errors++;
}
}
if(data.captions !== undefined){
let data49 = data.captions;
if(data49 && typeof data49 == "object" && !Array.isArray(data49)){
if(data49.mode === undefined){
const err124 = {instancePath:instancePath+"/captions",schemaPath:"#/properties/captions/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};
if(vErrors === null){
vErrors = [err124];
}
else {
vErrors.push(err124);
}
errors++;
}
for(const key7 in data49){
if(!(((key7 === "mode") || (key7 === "source_ref")) || (key7 === "checks"))){
const err125 = {instancePath:instancePath+"/captions",schemaPath:"#/properties/captions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err125];
}
else {
vErrors.push(err125);
}
errors++;
}
}
if(data49.mode !== undefined){
let data50 = data49.mode;
if(!((((data50 === "preserve") || (data50 === "none")) || (data50 === "transcript")) || (data50 === "speech"))){
const err126 = {instancePath:instancePath+"/captions/mode",schemaPath:"#/properties/captions/properties/mode/enum",keyword:"enum",params:{allowedValues: schema31.properties.captions.properties.mode.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err126];
}
else {
vErrors.push(err126);
}
errors++;
}
}
if(data49.source_ref !== undefined){
let data51 = data49.source_ref;
if(typeof data51 === "string"){
if(func2(data51) < 1){
const err127 = {instancePath:instancePath+"/captions/source_ref",schemaPath:"#/properties/captions/properties/source_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err127];
}
else {
vErrors.push(err127);
}
errors++;
}
}
else {
const err128 = {instancePath:instancePath+"/captions/source_ref",schemaPath:"#/properties/captions/properties/source_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err128];
}
else {
vErrors.push(err128);
}
errors++;
}
}
if(data49.checks !== undefined){
let data52 = data49.checks;
if(Array.isArray(data52)){
if(data52.length > 500){
const err129 = {instancePath:instancePath+"/captions/checks",schemaPath:"#/properties/captions/properties/checks/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err129];
}
else {
vErrors.push(err129);
}
errors++;
}
const len11 = data52.length;
for(let i19=0; i19<len11; i19++){
let data53 = data52[i19];
if(typeof data53 === "string"){
if(func2(data53) < 1){
const err130 = {instancePath:instancePath+"/captions/checks/" + i19,schemaPath:"#/properties/captions/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err130];
}
else {
vErrors.push(err130);
}
errors++;
}
}
else {
const err131 = {instancePath:instancePath+"/captions/checks/" + i19,schemaPath:"#/properties/captions/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err131];
}
else {
vErrors.push(err131);
}
errors++;
}
}
let i20 = data52.length;
let j8;
if(i20 > 1){
const indices7 = {};
for(;i20--;){
let item7 = data52[i20];
if(typeof item7 !== "string"){
continue;
}
if(typeof indices7[item7] == "number"){
j8 = indices7[item7];
const err132 = {instancePath:instancePath+"/captions/checks",schemaPath:"#/properties/captions/properties/checks/uniqueItems",keyword:"uniqueItems",params:{i: i20, j: j8},message:"must NOT have duplicate items (items ## "+j8+" and "+i20+" are identical)"};
if(vErrors === null){
vErrors = [err132];
}
else {
vErrors.push(err132);
}
errors++;
break;
}
indices7[item7] = i20;
}
}
}
else {
const err133 = {instancePath:instancePath+"/captions/checks",schemaPath:"#/properties/captions/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err133];
}
else {
vErrors.push(err133);
}
errors++;
}
}
}
else {
const err134 = {instancePath:instancePath+"/captions",schemaPath:"#/properties/captions/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err134];
}
else {
vErrors.push(err134);
}
errors++;
}
}
if(data.budget !== undefined){
let data54 = data.budget;
if(data54 && typeof data54 == "object" && !Array.isArray(data54)){
if(data54.max_calls === undefined){
const err135 = {instancePath:instancePath+"/budget",schemaPath:"#/properties/budget/required",keyword:"required",params:{missingProperty: "max_calls"},message:"must have required property '"+"max_calls"+"'"};
if(vErrors === null){
vErrors = [err135];
}
else {
vErrors.push(err135);
}
errors++;
}
if(data54.max_retries === undefined){
const err136 = {instancePath:instancePath+"/budget",schemaPath:"#/properties/budget/required",keyword:"required",params:{missingProperty: "max_retries"},message:"must have required property '"+"max_retries"+"'"};
if(vErrors === null){
vErrors = [err136];
}
else {
vErrors.push(err136);
}
errors++;
}
if(data54.max_wait_ms === undefined){
const err137 = {instancePath:instancePath+"/budget",schemaPath:"#/properties/budget/required",keyword:"required",params:{missingProperty: "max_wait_ms"},message:"must have required property '"+"max_wait_ms"+"'"};
if(vErrors === null){
vErrors = [err137];
}
else {
vErrors.push(err137);
}
errors++;
}
for(const key8 in data54){
if(!(((key8 === "max_calls") || (key8 === "max_retries")) || (key8 === "max_wait_ms"))){
const err138 = {instancePath:instancePath+"/budget",schemaPath:"#/properties/budget/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err138];
}
else {
vErrors.push(err138);
}
errors++;
}
}
if(data54.max_calls !== undefined){
let data55 = data54.max_calls;
if(!(((typeof data55 == "number") && (!(data55 % 1) && !isNaN(data55))) && (isFinite(data55)))){
const err139 = {instancePath:instancePath+"/budget/max_calls",schemaPath:"#/properties/budget/properties/max_calls/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err139];
}
else {
vErrors.push(err139);
}
errors++;
}
if((typeof data55 == "number") && (isFinite(data55))){
if(data55 > 1000 || isNaN(data55)){
const err140 = {instancePath:instancePath+"/budget/max_calls",schemaPath:"#/properties/budget/properties/max_calls/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1000},message:"must be <= 1000"};
if(vErrors === null){
vErrors = [err140];
}
else {
vErrors.push(err140);
}
errors++;
}
if(data55 < 1 || isNaN(data55)){
const err141 = {instancePath:instancePath+"/budget/max_calls",schemaPath:"#/properties/budget/properties/max_calls/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
if(vErrors === null){
vErrors = [err141];
}
else {
vErrors.push(err141);
}
errors++;
}
}
}
if(data54.max_retries !== undefined){
let data56 = data54.max_retries;
if(!(((typeof data56 == "number") && (!(data56 % 1) && !isNaN(data56))) && (isFinite(data56)))){
const err142 = {instancePath:instancePath+"/budget/max_retries",schemaPath:"#/properties/budget/properties/max_retries/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err142];
}
else {
vErrors.push(err142);
}
errors++;
}
if((typeof data56 == "number") && (isFinite(data56))){
if(data56 > 10 || isNaN(data56)){
const err143 = {instancePath:instancePath+"/budget/max_retries",schemaPath:"#/properties/budget/properties/max_retries/maximum",keyword:"maximum",params:{comparison: "<=", limit: 10},message:"must be <= 10"};
if(vErrors === null){
vErrors = [err143];
}
else {
vErrors.push(err143);
}
errors++;
}
if(data56 < 0 || isNaN(data56)){
const err144 = {instancePath:instancePath+"/budget/max_retries",schemaPath:"#/properties/budget/properties/max_retries/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err144];
}
else {
vErrors.push(err144);
}
errors++;
}
}
}
if(data54.max_wait_ms !== undefined){
let data57 = data54.max_wait_ms;
if(!(((typeof data57 == "number") && (!(data57 % 1) && !isNaN(data57))) && (isFinite(data57)))){
const err145 = {instancePath:instancePath+"/budget/max_wait_ms",schemaPath:"#/properties/budget/properties/max_wait_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err145];
}
else {
vErrors.push(err145);
}
errors++;
}
if((typeof data57 == "number") && (isFinite(data57))){
if(data57 > 43200000 || isNaN(data57)){
const err146 = {instancePath:instancePath+"/budget/max_wait_ms",schemaPath:"#/properties/budget/properties/max_wait_ms/maximum",keyword:"maximum",params:{comparison: "<=", limit: 43200000},message:"must be <= 43200000"};
if(vErrors === null){
vErrors = [err146];
}
else {
vErrors.push(err146);
}
errors++;
}
if(data57 < 0 || isNaN(data57)){
const err147 = {instancePath:instancePath+"/budget/max_wait_ms",schemaPath:"#/properties/budget/properties/max_wait_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err147];
}
else {
vErrors.push(err147);
}
errors++;
}
}
}
}
else {
const err148 = {instancePath:instancePath+"/budget",schemaPath:"#/properties/budget/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err148];
}
else {
vErrors.push(err148);
}
errors++;
}
}
if(data.acceptance !== undefined){
let data58 = data.acceptance;
if(Array.isArray(data58)){
if(data58.length > 100){
const err149 = {instancePath:instancePath+"/acceptance",schemaPath:"#/properties/acceptance/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err149];
}
else {
vErrors.push(err149);
}
errors++;
}
if(data58.length < 1){
const err150 = {instancePath:instancePath+"/acceptance",schemaPath:"#/properties/acceptance/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};
if(vErrors === null){
vErrors = [err150];
}
else {
vErrors.push(err150);
}
errors++;
}
const len12 = data58.length;
for(let i21=0; i21<len12; i21++){
let data59 = data58[i21];
if(data59 && typeof data59 == "object" && !Array.isArray(data59)){
if(data59.layer === undefined){
const err151 = {instancePath:instancePath+"/acceptance/" + i21,schemaPath:"#/properties/acceptance/items/required",keyword:"required",params:{missingProperty: "layer"},message:"must have required property '"+"layer"+"'"};
if(vErrors === null){
vErrors = [err151];
}
else {
vErrors.push(err151);
}
errors++;
}
if(data59.check === undefined){
const err152 = {instancePath:instancePath+"/acceptance/" + i21,schemaPath:"#/properties/acceptance/items/required",keyword:"required",params:{missingProperty: "check"},message:"must have required property '"+"check"+"'"};
if(vErrors === null){
vErrors = [err152];
}
else {
vErrors.push(err152);
}
errors++;
}
for(const key9 in data59){
if(!((key9 === "layer") || (key9 === "check"))){
const err153 = {instancePath:instancePath+"/acceptance/" + i21,schemaPath:"#/properties/acceptance/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key9},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err153];
}
else {
vErrors.push(err153);
}
errors++;
}
}
if(data59.layer !== undefined){
let data60 = data59.layer;
if(!((((data60 === "structure") || (data60 === "semantic")) || (data60 === "visual")) || (data60 === "audio"))){
const err154 = {instancePath:instancePath+"/acceptance/" + i21+"/layer",schemaPath:"#/properties/acceptance/items/properties/layer/enum",keyword:"enum",params:{allowedValues: schema31.properties.acceptance.items.properties.layer.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err154];
}
else {
vErrors.push(err154);
}
errors++;
}
}
if(data59.check !== undefined){
let data61 = data59.check;
if(typeof data61 === "string"){
if(func2(data61) < 1){
const err155 = {instancePath:instancePath+"/acceptance/" + i21+"/check",schemaPath:"#/properties/acceptance/items/properties/check/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err155];
}
else {
vErrors.push(err155);
}
errors++;
}
}
else {
const err156 = {instancePath:instancePath+"/acceptance/" + i21+"/check",schemaPath:"#/properties/acceptance/items/properties/check/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err156];
}
else {
vErrors.push(err156);
}
errors++;
}
}
}
else {
const err157 = {instancePath:instancePath+"/acceptance/" + i21,schemaPath:"#/properties/acceptance/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err157];
}
else {
vErrors.push(err157);
}
errors++;
}
}
}
else {
const err158 = {instancePath:instancePath+"/acceptance",schemaPath:"#/properties/acceptance/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err158];
}
else {
vErrors.push(err158);
}
errors++;
}
}
}
else {
const err159 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err159];
}
else {
vErrors.push(err159);
}
errors++;
}
validate20.errors = vErrors;
return errors === 0;
}
validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
export const checkpoint = validate21;
const schema32 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/checkpoint.schema.json","type":"object","additionalProperties":false,"required":["schema_version","plan_id","host","project_id","timeline_id","phase","last_confirmed_revision","completed_steps","pending_mutations","job_ids","next_step"],"properties":{"schema_version":{"const":"1.0.0"},"plan_id":{"type":"string","minLength":1},"host":{"enum":["codex","workbuddy"]},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"phase":{"enum":["intent","inspect","plan","execute","verify","deliver"]},"last_confirmed_revision":{"type":"integer","minimum":0},"completed_steps":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"pending_mutations":{"type":"array","maxItems":500,"items":{"$ref":"operation-receipt.schema.json"}},"job_ids":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"next_step":{"type":"string","minLength":1},"source_versions":{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["source_ref","input_version"],"properties":{"source_ref":{"type":"string","minLength":1},"input_version":{"type":"string","minLength":1}}}},"evidence_ids":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500}}};
const schema33 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/operation-receipt.schema.json","type":"object","additionalProperties":false,"required":["schema_version","status","project_id","next_action"],"properties":{"schema_version":{"const":"1.0.0"},"operation_id":{"type":"string","minLength":1},"mutation_id":{"type":"string","minLength":1},"idempotency_key":{"type":"string","minLength":1},"job_id":{"type":"string","minLength":1},"request_digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"enum":["applied","duplicate","noop","pending","unknown","not_found","rejected","cancelled"]},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"revision_before":{"type":"integer","minimum":0},"revision_after":{"type":"integer","minimum":0},"children":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"warnings":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"failed_items":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"next_action":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"kind":{"enum":["read_back","wait_then_read","poll","wait","retry","reinspect","ask_user","deliver"]},"after_seconds":{"type":"integer","minimum":0},"read":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"allOf":[{"if":{"properties":{"kind":{"const":"wait_then_read"}}},"then":{"required":["read"]}}]}},"anyOf":[{"required":["operation_id"]},{"required":["mutation_id"]},{"required":["idempotency_key"]},{"required":["job_id"]}],"allOf":[{"if":{"properties":{"status":{"enum":["unknown","not_found"]}}},"then":{"properties":{"next_action":{"properties":{"kind":{"enum":["wait","ask_user","wait_then_read"]},"read":{"type":"string","minLength":1}}}}}},{"if":{"properties":{"status":{"const":"duplicate"}}},"then":{"required":["request_digest"]}}]};
const pattern4 = new RegExp("^[a-f0-9]{64}$", "u");
function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/checkpoint.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate21.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.schema_version === undefined){
const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
if(data.plan_id === undefined){
const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "plan_id"},message:"must have required property '"+"plan_id"+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
if(data.host === undefined){
const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "host"},message:"must have required property '"+"host"+"'"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
if(data.project_id === undefined){
const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
if(data.timeline_id === undefined){
const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
if(data.phase === undefined){
const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "phase"},message:"must have required property '"+"phase"+"'"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
if(data.last_confirmed_revision === undefined){
const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "last_confirmed_revision"},message:"must have required property '"+"last_confirmed_revision"+"'"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
if(data.completed_steps === undefined){
const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "completed_steps"},message:"must have required property '"+"completed_steps"+"'"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
if(data.pending_mutations === undefined){
const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pending_mutations"},message:"must have required property '"+"pending_mutations"+"'"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
if(data.job_ids === undefined){
const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "job_ids"},message:"must have required property '"+"job_ids"+"'"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
if(data.next_step === undefined){
const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "next_step"},message:"must have required property '"+"next_step"+"'"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
for(const key0 in data){
if(!(func1.call(schema32.properties, key0))){
const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
}
if(data.schema_version !== undefined){
if("1.0.0" !== data.schema_version){
const err12 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: "1.0.0"},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
}
if(data.plan_id !== undefined){
let data1 = data.plan_id;
if(typeof data1 === "string"){
if(func2(data1) < 1){
const err13 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
}
else {
const err14 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
}
if(data.host !== undefined){
let data2 = data.host;
if(!((data2 === "codex") || (data2 === "workbuddy"))){
const err15 = {instancePath:instancePath+"/host",schemaPath:"#/properties/host/enum",keyword:"enum",params:{allowedValues: schema32.properties.host.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
}
if(data.project_id !== undefined){
let data3 = data.project_id;
if(typeof data3 === "string"){
if(func2(data3) < 1){
const err16 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
}
else {
const err17 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
}
if(data.timeline_id !== undefined){
let data4 = data.timeline_id;
if(typeof data4 === "string"){
if(func2(data4) < 1){
const err18 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
}
else {
const err19 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
if(data.phase !== undefined){
let data5 = data.phase;
if(!((((((data5 === "intent") || (data5 === "inspect")) || (data5 === "plan")) || (data5 === "execute")) || (data5 === "verify")) || (data5 === "deliver"))){
const err20 = {instancePath:instancePath+"/phase",schemaPath:"#/properties/phase/enum",keyword:"enum",params:{allowedValues: schema32.properties.phase.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
if(data.last_confirmed_revision !== undefined){
let data6 = data.last_confirmed_revision;
if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){
const err21 = {instancePath:instancePath+"/last_confirmed_revision",schemaPath:"#/properties/last_confirmed_revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
if((typeof data6 == "number") && (isFinite(data6))){
if(data6 < 0 || isNaN(data6)){
const err22 = {instancePath:instancePath+"/last_confirmed_revision",schemaPath:"#/properties/last_confirmed_revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
}
if(data.completed_steps !== undefined){
let data7 = data.completed_steps;
if(Array.isArray(data7)){
if(data7.length > 500){
const err23 = {instancePath:instancePath+"/completed_steps",schemaPath:"#/properties/completed_steps/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
const len0 = data7.length;
for(let i0=0; i0<len0; i0++){
let data8 = data7[i0];
if(typeof data8 === "string"){
if(func2(data8) < 1){
const err24 = {instancePath:instancePath+"/completed_steps/" + i0,schemaPath:"#/properties/completed_steps/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
else {
const err25 = {instancePath:instancePath+"/completed_steps/" + i0,schemaPath:"#/properties/completed_steps/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
let i1 = data7.length;
let j0;
if(i1 > 1){
const indices0 = {};
for(;i1--;){
let item0 = data7[i1];
if(typeof item0 !== "string"){
continue;
}
if(typeof indices0[item0] == "number"){
j0 = indices0[item0];
const err26 = {instancePath:instancePath+"/completed_steps",schemaPath:"#/properties/completed_steps/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
break;
}
indices0[item0] = i1;
}
}
}
else {
const err27 = {instancePath:instancePath+"/completed_steps",schemaPath:"#/properties/completed_steps/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
if(data.pending_mutations !== undefined){
let data9 = data.pending_mutations;
if(Array.isArray(data9)){
if(data9.length > 500){
const err28 = {instancePath:instancePath+"/pending_mutations",schemaPath:"#/properties/pending_mutations/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
const len1 = data9.length;
for(let i2=0; i2<len1; i2++){
let data10 = data9[i2];
const _errs22 = errors;
let valid7 = false;
const _errs23 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.operation_id === undefined){
const err29 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/anyOf/0/required",keyword:"required",params:{missingProperty: "operation_id"},message:"must have required property '"+"operation_id"+"'"};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
var _valid0 = _errs23 === errors;
valid7 = valid7 || _valid0;
const _errs24 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.mutation_id === undefined){
const err30 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/anyOf/1/required",keyword:"required",params:{missingProperty: "mutation_id"},message:"must have required property '"+"mutation_id"+"'"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
}
var _valid0 = _errs24 === errors;
valid7 = valid7 || _valid0;
const _errs25 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.idempotency_key === undefined){
const err31 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/anyOf/2/required",keyword:"required",params:{missingProperty: "idempotency_key"},message:"must have required property '"+"idempotency_key"+"'"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
}
}
var _valid0 = _errs25 === errors;
valid7 = valid7 || _valid0;
const _errs26 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.job_id === undefined){
const err32 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/anyOf/3/required",keyword:"required",params:{missingProperty: "job_id"},message:"must have required property '"+"job_id"+"'"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
}
var _valid0 = _errs26 === errors;
valid7 = valid7 || _valid0;
if(!valid7){
const err33 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
else {
errors = _errs22;
if(vErrors !== null){
if(_errs22){
vErrors.length = _errs22;
}
else {
vErrors = null;
}
}
}
const _errs28 = errors;
let valid9 = true;
const _errs29 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.status !== undefined){
let data11 = data10.status;
if(!((data11 === "unknown") || (data11 === "not_found"))){
const err34 = {};
if(vErrors === null){
vErrors = [err34];
}
else {
vErrors.push(err34);
}
errors++;
}
}
}
var _valid1 = _errs29 === errors;
errors = _errs28;
if(vErrors !== null){
if(_errs28){
vErrors.length = _errs28;
}
else {
vErrors = null;
}
}
if(_valid1){
const _errs31 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.next_action !== undefined){
let data12 = data10.next_action;
if(data12 && typeof data12 == "object" && !Array.isArray(data12)){
if(data12.kind !== undefined){
let data13 = data12.kind;
if(!(((data13 === "wait") || (data13 === "ask_user")) || (data13 === "wait_then_read"))){
const err35 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/kind",schemaPath:"operation-receipt.schema.json/allOf/0/then/properties/next_action/properties/kind/enum",keyword:"enum",params:{allowedValues: schema33.allOf[0].then.properties.next_action.properties.kind.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err35];
}
else {
vErrors.push(err35);
}
errors++;
}
}
if(data12.read !== undefined){
let data14 = data12.read;
if(typeof data14 === "string"){
if(func2(data14) < 1){
const err36 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/read",schemaPath:"operation-receipt.schema.json/allOf/0/then/properties/next_action/properties/read/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err36];
}
else {
vErrors.push(err36);
}
errors++;
}
}
else {
const err37 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/read",schemaPath:"operation-receipt.schema.json/allOf/0/then/properties/next_action/properties/read/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err37];
}
else {
vErrors.push(err37);
}
errors++;
}
}
}
}
}
var _valid1 = _errs31 === errors;
valid9 = _valid1;
if(valid9){
var props0 = {};
props0.next_action = true;
props0.status = true;
}
}
if(!valid9){
const err38 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err38];
}
else {
vErrors.push(err38);
}
errors++;
}
const _errs37 = errors;
let valid13 = true;
const _errs38 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.status !== undefined){
if("duplicate" !== data10.status){
const err39 = {};
if(vErrors === null){
vErrors = [err39];
}
else {
vErrors.push(err39);
}
errors++;
}
}
}
var _valid2 = _errs38 === errors;
errors = _errs37;
if(vErrors !== null){
if(_errs37){
vErrors.length = _errs37;
}
else {
vErrors = null;
}
}
if(_valid2){
const _errs40 = errors;
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.request_digest === undefined){
const err40 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/allOf/1/then/required",keyword:"required",params:{missingProperty: "request_digest"},message:"must have required property '"+"request_digest"+"'"};
if(vErrors === null){
vErrors = [err40];
}
else {
vErrors.push(err40);
}
errors++;
}
}
var _valid2 = _errs40 === errors;
valid13 = _valid2;
}
if(!valid13){
const err41 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err41];
}
else {
vErrors.push(err41);
}
errors++;
}
if(props0 !== true){
props0 = props0 || {};
props0.status = true;
}
if(data10 && typeof data10 == "object" && !Array.isArray(data10)){
if(data10.schema_version === undefined){
const err42 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};
if(vErrors === null){
vErrors = [err42];
}
else {
vErrors.push(err42);
}
errors++;
}
if(data10.status === undefined){
const err43 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err43];
}
else {
vErrors.push(err43);
}
errors++;
}
if(data10.project_id === undefined){
const err44 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err44];
}
else {
vErrors.push(err44);
}
errors++;
}
if(data10.next_action === undefined){
const err45 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/required",keyword:"required",params:{missingProperty: "next_action"},message:"must have required property '"+"next_action"+"'"};
if(vErrors === null){
vErrors = [err45];
}
else {
vErrors.push(err45);
}
errors++;
}
for(const key1 in data10){
if(!(func1.call(schema33.properties, key1))){
const err46 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err46];
}
else {
vErrors.push(err46);
}
errors++;
}
}
if(data10.schema_version !== undefined){
if("1.0.0" !== data10.schema_version){
const err47 = {instancePath:instancePath+"/pending_mutations/" + i2+"/schema_version",schemaPath:"operation-receipt.schema.json/properties/schema_version/const",keyword:"const",params:{allowedValue: "1.0.0"},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err47];
}
else {
vErrors.push(err47);
}
errors++;
}
}
if(data10.operation_id !== undefined){
let data17 = data10.operation_id;
if(typeof data17 === "string"){
if(func2(data17) < 1){
const err48 = {instancePath:instancePath+"/pending_mutations/" + i2+"/operation_id",schemaPath:"operation-receipt.schema.json/properties/operation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err48];
}
else {
vErrors.push(err48);
}
errors++;
}
}
else {
const err49 = {instancePath:instancePath+"/pending_mutations/" + i2+"/operation_id",schemaPath:"operation-receipt.schema.json/properties/operation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err49];
}
else {
vErrors.push(err49);
}
errors++;
}
}
if(data10.mutation_id !== undefined){
let data18 = data10.mutation_id;
if(typeof data18 === "string"){
if(func2(data18) < 1){
const err50 = {instancePath:instancePath+"/pending_mutations/" + i2+"/mutation_id",schemaPath:"operation-receipt.schema.json/properties/mutation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err50];
}
else {
vErrors.push(err50);
}
errors++;
}
}
else {
const err51 = {instancePath:instancePath+"/pending_mutations/" + i2+"/mutation_id",schemaPath:"operation-receipt.schema.json/properties/mutation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err51];
}
else {
vErrors.push(err51);
}
errors++;
}
}
if(data10.idempotency_key !== undefined){
let data19 = data10.idempotency_key;
if(typeof data19 === "string"){
if(func2(data19) < 1){
const err52 = {instancePath:instancePath+"/pending_mutations/" + i2+"/idempotency_key",schemaPath:"operation-receipt.schema.json/properties/idempotency_key/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err52];
}
else {
vErrors.push(err52);
}
errors++;
}
}
else {
const err53 = {instancePath:instancePath+"/pending_mutations/" + i2+"/idempotency_key",schemaPath:"operation-receipt.schema.json/properties/idempotency_key/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err53];
}
else {
vErrors.push(err53);
}
errors++;
}
}
if(data10.job_id !== undefined){
let data20 = data10.job_id;
if(typeof data20 === "string"){
if(func2(data20) < 1){
const err54 = {instancePath:instancePath+"/pending_mutations/" + i2+"/job_id",schemaPath:"operation-receipt.schema.json/properties/job_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err54];
}
else {
vErrors.push(err54);
}
errors++;
}
}
else {
const err55 = {instancePath:instancePath+"/pending_mutations/" + i2+"/job_id",schemaPath:"operation-receipt.schema.json/properties/job_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err55];
}
else {
vErrors.push(err55);
}
errors++;
}
}
if(data10.request_digest !== undefined){
let data21 = data10.request_digest;
if(typeof data21 === "string"){
if(!pattern4.test(data21)){
const err56 = {instancePath:instancePath+"/pending_mutations/" + i2+"/request_digest",schemaPath:"operation-receipt.schema.json/properties/request_digest/pattern",keyword:"pattern",params:{pattern: "^[a-f0-9]{64}$"},message:"must match pattern \""+"^[a-f0-9]{64}$"+"\""};
if(vErrors === null){
vErrors = [err56];
}
else {
vErrors.push(err56);
}
errors++;
}
}
else {
const err57 = {instancePath:instancePath+"/pending_mutations/" + i2+"/request_digest",schemaPath:"operation-receipt.schema.json/properties/request_digest/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err57];
}
else {
vErrors.push(err57);
}
errors++;
}
}
if(data10.status !== undefined){
let data22 = data10.status;
if(!((((((((data22 === "applied") || (data22 === "duplicate")) || (data22 === "noop")) || (data22 === "pending")) || (data22 === "unknown")) || (data22 === "not_found")) || (data22 === "rejected")) || (data22 === "cancelled"))){
const err58 = {instancePath:instancePath+"/pending_mutations/" + i2+"/status",schemaPath:"operation-receipt.schema.json/properties/status/enum",keyword:"enum",params:{allowedValues: schema33.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err58];
}
else {
vErrors.push(err58);
}
errors++;
}
}
if(data10.project_id !== undefined){
let data23 = data10.project_id;
if(typeof data23 === "string"){
if(func2(data23) < 1){
const err59 = {instancePath:instancePath+"/pending_mutations/" + i2+"/project_id",schemaPath:"operation-receipt.schema.json/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err59];
}
else {
vErrors.push(err59);
}
errors++;
}
}
else {
const err60 = {instancePath:instancePath+"/pending_mutations/" + i2+"/project_id",schemaPath:"operation-receipt.schema.json/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err60];
}
else {
vErrors.push(err60);
}
errors++;
}
}
if(data10.timeline_id !== undefined){
let data24 = data10.timeline_id;
if(typeof data24 === "string"){
if(func2(data24) < 1){
const err61 = {instancePath:instancePath+"/pending_mutations/" + i2+"/timeline_id",schemaPath:"operation-receipt.schema.json/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err61];
}
else {
vErrors.push(err61);
}
errors++;
}
}
else {
const err62 = {instancePath:instancePath+"/pending_mutations/" + i2+"/timeline_id",schemaPath:"operation-receipt.schema.json/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err62];
}
else {
vErrors.push(err62);
}
errors++;
}
}
if(data10.revision_before !== undefined){
let data25 = data10.revision_before;
if(!(((typeof data25 == "number") && (!(data25 % 1) && !isNaN(data25))) && (isFinite(data25)))){
const err63 = {instancePath:instancePath+"/pending_mutations/" + i2+"/revision_before",schemaPath:"operation-receipt.schema.json/properties/revision_before/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err63];
}
else {
vErrors.push(err63);
}
errors++;
}
if((typeof data25 == "number") && (isFinite(data25))){
if(data25 < 0 || isNaN(data25)){
const err64 = {instancePath:instancePath+"/pending_mutations/" + i2+"/revision_before",schemaPath:"operation-receipt.schema.json/properties/revision_before/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err64];
}
else {
vErrors.push(err64);
}
errors++;
}
}
}
if(data10.revision_after !== undefined){
let data26 = data10.revision_after;
if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){
const err65 = {instancePath:instancePath+"/pending_mutations/" + i2+"/revision_after",schemaPath:"operation-receipt.schema.json/properties/revision_after/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err65];
}
else {
vErrors.push(err65);
}
errors++;
}
if((typeof data26 == "number") && (isFinite(data26))){
if(data26 < 0 || isNaN(data26)){
const err66 = {instancePath:instancePath+"/pending_mutations/" + i2+"/revision_after",schemaPath:"operation-receipt.schema.json/properties/revision_after/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err66];
}
else {
vErrors.push(err66);
}
errors++;
}
}
}
if(data10.children !== undefined){
let data27 = data10.children;
if(Array.isArray(data27)){
if(data27.length > 500){
const err67 = {instancePath:instancePath+"/pending_mutations/" + i2+"/children",schemaPath:"operation-receipt.schema.json/properties/children/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err67];
}
else {
vErrors.push(err67);
}
errors++;
}
const len2 = data27.length;
for(let i3=0; i3<len2; i3++){
let data28 = data27[i3];
if(typeof data28 === "string"){
if(func2(data28) < 1){
const err68 = {instancePath:instancePath+"/pending_mutations/" + i2+"/children/" + i3,schemaPath:"operation-receipt.schema.json/properties/children/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err68];
}
else {
vErrors.push(err68);
}
errors++;
}
}
else {
const err69 = {instancePath:instancePath+"/pending_mutations/" + i2+"/children/" + i3,schemaPath:"operation-receipt.schema.json/properties/children/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err69];
}
else {
vErrors.push(err69);
}
errors++;
}
}
let i4 = data27.length;
let j1;
if(i4 > 1){
const indices1 = {};
for(;i4--;){
let item1 = data27[i4];
if(typeof item1 !== "string"){
continue;
}
if(typeof indices1[item1] == "number"){
j1 = indices1[item1];
const err70 = {instancePath:instancePath+"/pending_mutations/" + i2+"/children",schemaPath:"operation-receipt.schema.json/properties/children/uniqueItems",keyword:"uniqueItems",params:{i: i4, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i4+" are identical)"};
if(vErrors === null){
vErrors = [err70];
}
else {
vErrors.push(err70);
}
errors++;
break;
}
indices1[item1] = i4;
}
}
}
else {
const err71 = {instancePath:instancePath+"/pending_mutations/" + i2+"/children",schemaPath:"operation-receipt.schema.json/properties/children/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err71];
}
else {
vErrors.push(err71);
}
errors++;
}
}
if(data10.warnings !== undefined){
let data29 = data10.warnings;
if(Array.isArray(data29)){
if(data29.length > 500){
const err72 = {instancePath:instancePath+"/pending_mutations/" + i2+"/warnings",schemaPath:"operation-receipt.schema.json/properties/warnings/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err72];
}
else {
vErrors.push(err72);
}
errors++;
}
const len3 = data29.length;
for(let i5=0; i5<len3; i5++){
let data30 = data29[i5];
if(typeof data30 === "string"){
if(func2(data30) < 1){
const err73 = {instancePath:instancePath+"/pending_mutations/" + i2+"/warnings/" + i5,schemaPath:"operation-receipt.schema.json/properties/warnings/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err73];
}
else {
vErrors.push(err73);
}
errors++;
}
}
else {
const err74 = {instancePath:instancePath+"/pending_mutations/" + i2+"/warnings/" + i5,schemaPath:"operation-receipt.schema.json/properties/warnings/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err74];
}
else {
vErrors.push(err74);
}
errors++;
}
}
let i6 = data29.length;
let j2;
if(i6 > 1){
const indices2 = {};
for(;i6--;){
let item2 = data29[i6];
if(typeof item2 !== "string"){
continue;
}
if(typeof indices2[item2] == "number"){
j2 = indices2[item2];
const err75 = {instancePath:instancePath+"/pending_mutations/" + i2+"/warnings",schemaPath:"operation-receipt.schema.json/properties/warnings/uniqueItems",keyword:"uniqueItems",params:{i: i6, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i6+" are identical)"};
if(vErrors === null){
vErrors = [err75];
}
else {
vErrors.push(err75);
}
errors++;
break;
}
indices2[item2] = i6;
}
}
}
else {
const err76 = {instancePath:instancePath+"/pending_mutations/" + i2+"/warnings",schemaPath:"operation-receipt.schema.json/properties/warnings/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err76];
}
else {
vErrors.push(err76);
}
errors++;
}
}
if(data10.failed_items !== undefined){
let data31 = data10.failed_items;
if(Array.isArray(data31)){
if(data31.length > 500){
const err77 = {instancePath:instancePath+"/pending_mutations/" + i2+"/failed_items",schemaPath:"operation-receipt.schema.json/properties/failed_items/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err77];
}
else {
vErrors.push(err77);
}
errors++;
}
const len4 = data31.length;
for(let i7=0; i7<len4; i7++){
let data32 = data31[i7];
if(typeof data32 === "string"){
if(func2(data32) < 1){
const err78 = {instancePath:instancePath+"/pending_mutations/" + i2+"/failed_items/" + i7,schemaPath:"operation-receipt.schema.json/properties/failed_items/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err78];
}
else {
vErrors.push(err78);
}
errors++;
}
}
else {
const err79 = {instancePath:instancePath+"/pending_mutations/" + i2+"/failed_items/" + i7,schemaPath:"operation-receipt.schema.json/properties/failed_items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err79];
}
else {
vErrors.push(err79);
}
errors++;
}
}
let i8 = data31.length;
let j3;
if(i8 > 1){
const indices3 = {};
for(;i8--;){
let item3 = data31[i8];
if(typeof item3 !== "string"){
continue;
}
if(typeof indices3[item3] == "number"){
j3 = indices3[item3];
const err80 = {instancePath:instancePath+"/pending_mutations/" + i2+"/failed_items",schemaPath:"operation-receipt.schema.json/properties/failed_items/uniqueItems",keyword:"uniqueItems",params:{i: i8, j: j3},message:"must NOT have duplicate items (items ## "+j3+" and "+i8+" are identical)"};
if(vErrors === null){
vErrors = [err80];
}
else {
vErrors.push(err80);
}
errors++;
break;
}
indices3[item3] = i8;
}
}
}
else {
const err81 = {instancePath:instancePath+"/pending_mutations/" + i2+"/failed_items",schemaPath:"operation-receipt.schema.json/properties/failed_items/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err81];
}
else {
vErrors.push(err81);
}
errors++;
}
}
if(data10.next_action !== undefined){
let data33 = data10.next_action;
const _errs77 = errors;
let valid26 = true;
const _errs78 = errors;
if(data33 && typeof data33 == "object" && !Array.isArray(data33)){
if(data33.kind !== undefined){
if("wait_then_read" !== data33.kind){
const err82 = {};
if(vErrors === null){
vErrors = [err82];
}
else {
vErrors.push(err82);
}
errors++;
}
}
}
var _valid3 = _errs78 === errors;
errors = _errs77;
if(vErrors !== null){
if(_errs77){
vErrors.length = _errs77;
}
else {
vErrors = null;
}
}
if(_valid3){
const _errs80 = errors;
if(data33 && typeof data33 == "object" && !Array.isArray(data33)){
if(data33.read === undefined){
const err83 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action",schemaPath:"operation-receipt.schema.json/properties/next_action/allOf/0/then/required",keyword:"required",params:{missingProperty: "read"},message:"must have required property '"+"read"+"'"};
if(vErrors === null){
vErrors = [err83];
}
else {
vErrors.push(err83);
}
errors++;
}
}
var _valid3 = _errs80 === errors;
valid26 = _valid3;
}
if(!valid26){
const err84 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action",schemaPath:"operation-receipt.schema.json/properties/next_action/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err84];
}
else {
vErrors.push(err84);
}
errors++;
}
if(data33 && typeof data33 == "object" && !Array.isArray(data33)){
if(data33.kind === undefined){
const err85 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action",schemaPath:"operation-receipt.schema.json/properties/next_action/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};
if(vErrors === null){
vErrors = [err85];
}
else {
vErrors.push(err85);
}
errors++;
}
for(const key2 in data33){
if(!((((key2 === "kind") || (key2 === "after_seconds")) || (key2 === "read")) || (key2 === "reason"))){
const err86 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action",schemaPath:"operation-receipt.schema.json/properties/next_action/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err86];
}
else {
vErrors.push(err86);
}
errors++;
}
}
if(data33.kind !== undefined){
let data35 = data33.kind;
if(!((((((((data35 === "read_back") || (data35 === "wait_then_read")) || (data35 === "poll")) || (data35 === "wait")) || (data35 === "retry")) || (data35 === "reinspect")) || (data35 === "ask_user")) || (data35 === "deliver"))){
const err87 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/kind",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/kind/enum",keyword:"enum",params:{allowedValues: schema33.properties.next_action.properties.kind.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err87];
}
else {
vErrors.push(err87);
}
errors++;
}
}
if(data33.after_seconds !== undefined){
let data36 = data33.after_seconds;
if(!(((typeof data36 == "number") && (!(data36 % 1) && !isNaN(data36))) && (isFinite(data36)))){
const err88 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/after_seconds",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/after_seconds/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err88];
}
else {
vErrors.push(err88);
}
errors++;
}
if((typeof data36 == "number") && (isFinite(data36))){
if(data36 < 0 || isNaN(data36)){
const err89 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/after_seconds",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/after_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err89];
}
else {
vErrors.push(err89);
}
errors++;
}
}
}
if(data33.read !== undefined){
let data37 = data33.read;
if(typeof data37 === "string"){
if(func2(data37) < 1){
const err90 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/read",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/read/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err90];
}
else {
vErrors.push(err90);
}
errors++;
}
}
else {
const err91 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/read",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/read/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err91];
}
else {
vErrors.push(err91);
}
errors++;
}
}
if(data33.reason !== undefined){
let data38 = data33.reason;
if(typeof data38 === "string"){
if(func2(data38) < 1){
const err92 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/reason",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err92];
}
else {
vErrors.push(err92);
}
errors++;
}
}
else {
const err93 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action/reason",schemaPath:"operation-receipt.schema.json/properties/next_action/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err93];
}
else {
vErrors.push(err93);
}
errors++;
}
}
}
else {
const err94 = {instancePath:instancePath+"/pending_mutations/" + i2+"/next_action",schemaPath:"operation-receipt.schema.json/properties/next_action/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err94];
}
else {
vErrors.push(err94);
}
errors++;
}
}
}
else {
const err95 = {instancePath:instancePath+"/pending_mutations/" + i2,schemaPath:"operation-receipt.schema.json/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err95];
}
else {
vErrors.push(err95);
}
errors++;
}
}
}
else {
const err96 = {instancePath:instancePath+"/pending_mutations",schemaPath:"#/properties/pending_mutations/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err96];
}
else {
vErrors.push(err96);
}
errors++;
}
}
if(data.job_ids !== undefined){
let data39 = data.job_ids;
if(Array.isArray(data39)){
if(data39.length > 500){
const err97 = {instancePath:instancePath+"/job_ids",schemaPath:"#/properties/job_ids/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err97];
}
else {
vErrors.push(err97);
}
errors++;
}
const len5 = data39.length;
for(let i9=0; i9<len5; i9++){
let data40 = data39[i9];
if(typeof data40 === "string"){
if(func2(data40) < 1){
const err98 = {instancePath:instancePath+"/job_ids/" + i9,schemaPath:"#/properties/job_ids/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err98];
}
else {
vErrors.push(err98);
}
errors++;
}
}
else {
const err99 = {instancePath:instancePath+"/job_ids/" + i9,schemaPath:"#/properties/job_ids/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err99];
}
else {
vErrors.push(err99);
}
errors++;
}
}
let i10 = data39.length;
let j4;
if(i10 > 1){
const indices4 = {};
for(;i10--;){
let item4 = data39[i10];
if(typeof item4 !== "string"){
continue;
}
if(typeof indices4[item4] == "number"){
j4 = indices4[item4];
const err100 = {instancePath:instancePath+"/job_ids",schemaPath:"#/properties/job_ids/uniqueItems",keyword:"uniqueItems",params:{i: i10, j: j4},message:"must NOT have duplicate items (items ## "+j4+" and "+i10+" are identical)"};
if(vErrors === null){
vErrors = [err100];
}
else {
vErrors.push(err100);
}
errors++;
break;
}
indices4[item4] = i10;
}
}
}
else {
const err101 = {instancePath:instancePath+"/job_ids",schemaPath:"#/properties/job_ids/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err101];
}
else {
vErrors.push(err101);
}
errors++;
}
}
if(data.next_step !== undefined){
let data41 = data.next_step;
if(typeof data41 === "string"){
if(func2(data41) < 1){
const err102 = {instancePath:instancePath+"/next_step",schemaPath:"#/properties/next_step/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err102];
}
else {
vErrors.push(err102);
}
errors++;
}
}
else {
const err103 = {instancePath:instancePath+"/next_step",schemaPath:"#/properties/next_step/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err103];
}
else {
vErrors.push(err103);
}
errors++;
}
}
if(data.source_versions !== undefined){
let data42 = data.source_versions;
if(Array.isArray(data42)){
if(data42.length > 500){
const err104 = {instancePath:instancePath+"/source_versions",schemaPath:"#/properties/source_versions/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err104];
}
else {
vErrors.push(err104);
}
errors++;
}
const len6 = data42.length;
for(let i11=0; i11<len6; i11++){
let data43 = data42[i11];
if(data43 && typeof data43 == "object" && !Array.isArray(data43)){
if(data43.source_ref === undefined){
const err105 = {instancePath:instancePath+"/source_versions/" + i11,schemaPath:"#/properties/source_versions/items/required",keyword:"required",params:{missingProperty: "source_ref"},message:"must have required property '"+"source_ref"+"'"};
if(vErrors === null){
vErrors = [err105];
}
else {
vErrors.push(err105);
}
errors++;
}
if(data43.input_version === undefined){
const err106 = {instancePath:instancePath+"/source_versions/" + i11,schemaPath:"#/properties/source_versions/items/required",keyword:"required",params:{missingProperty: "input_version"},message:"must have required property '"+"input_version"+"'"};
if(vErrors === null){
vErrors = [err106];
}
else {
vErrors.push(err106);
}
errors++;
}
for(const key3 in data43){
if(!((key3 === "source_ref") || (key3 === "input_version"))){
const err107 = {instancePath:instancePath+"/source_versions/" + i11,schemaPath:"#/properties/source_versions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err107];
}
else {
vErrors.push(err107);
}
errors++;
}
}
if(data43.source_ref !== undefined){
let data44 = data43.source_ref;
if(typeof data44 === "string"){
if(func2(data44) < 1){
const err108 = {instancePath:instancePath+"/source_versions/" + i11+"/source_ref",schemaPath:"#/properties/source_versions/items/properties/source_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err108];
}
else {
vErrors.push(err108);
}
errors++;
}
}
else {
const err109 = {instancePath:instancePath+"/source_versions/" + i11+"/source_ref",schemaPath:"#/properties/source_versions/items/properties/source_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err109];
}
else {
vErrors.push(err109);
}
errors++;
}
}
if(data43.input_version !== undefined){
let data45 = data43.input_version;
if(typeof data45 === "string"){
if(func2(data45) < 1){
const err110 = {instancePath:instancePath+"/source_versions/" + i11+"/input_version",schemaPath:"#/properties/source_versions/items/properties/input_version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err110];
}
else {
vErrors.push(err110);
}
errors++;
}
}
else {
const err111 = {instancePath:instancePath+"/source_versions/" + i11+"/input_version",schemaPath:"#/properties/source_versions/items/properties/input_version/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err111];
}
else {
vErrors.push(err111);
}
errors++;
}
}
}
else {
const err112 = {instancePath:instancePath+"/source_versions/" + i11,schemaPath:"#/properties/source_versions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err112];
}
else {
vErrors.push(err112);
}
errors++;
}
}
}
else {
const err113 = {instancePath:instancePath+"/source_versions",schemaPath:"#/properties/source_versions/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err113];
}
else {
vErrors.push(err113);
}
errors++;
}
}
if(data.evidence_ids !== undefined){
let data46 = data.evidence_ids;
if(Array.isArray(data46)){
if(data46.length > 500){
const err114 = {instancePath:instancePath+"/evidence_ids",schemaPath:"#/properties/evidence_ids/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err114];
}
else {
vErrors.push(err114);
}
errors++;
}
const len7 = data46.length;
for(let i12=0; i12<len7; i12++){
let data47 = data46[i12];
if(typeof data47 === "string"){
if(func2(data47) < 1){
const err115 = {instancePath:instancePath+"/evidence_ids/" + i12,schemaPath:"#/properties/evidence_ids/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err115];
}
else {
vErrors.push(err115);
}
errors++;
}
}
else {
const err116 = {instancePath:instancePath+"/evidence_ids/" + i12,schemaPath:"#/properties/evidence_ids/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err116];
}
else {
vErrors.push(err116);
}
errors++;
}
}
let i13 = data46.length;
let j5;
if(i13 > 1){
const indices5 = {};
for(;i13--;){
let item5 = data46[i13];
if(typeof item5 !== "string"){
continue;
}
if(typeof indices5[item5] == "number"){
j5 = indices5[item5];
const err117 = {instancePath:instancePath+"/evidence_ids",schemaPath:"#/properties/evidence_ids/uniqueItems",keyword:"uniqueItems",params:{i: i13, j: j5},message:"must NOT have duplicate items (items ## "+j5+" and "+i13+" are identical)"};
if(vErrors === null){
vErrors = [err117];
}
else {
vErrors.push(err117);
}
errors++;
break;
}
indices5[item5] = i13;
}
}
}
else {
const err118 = {instancePath:instancePath+"/evidence_ids",schemaPath:"#/properties/evidence_ids/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err118];
}
else {
vErrors.push(err118);
}
errors++;
}
}
}
else {
const err119 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err119];
}
else {
vErrors.push(err119);
}
errors++;
}
validate21.errors = vErrors;
return errors === 0;
}
validate21.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
export const operation_receipt = validate22;
function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/operation-receipt.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate22.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
const _errs1 = errors;
let valid0 = false;
const _errs2 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.operation_id === undefined){
const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: "operation_id"},message:"must have required property '"+"operation_id"+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
}
var _valid0 = _errs2 === errors;
valid0 = valid0 || _valid0;
const _errs3 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.mutation_id === undefined){
const err1 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "mutation_id"},message:"must have required property '"+"mutation_id"+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
}
var _valid0 = _errs3 === errors;
valid0 = valid0 || _valid0;
const _errs4 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.idempotency_key === undefined){
const err2 = {instancePath,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty: "idempotency_key"},message:"must have required property '"+"idempotency_key"+"'"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
}
var _valid0 = _errs4 === errors;
valid0 = valid0 || _valid0;
const _errs5 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.job_id === undefined){
const err3 = {instancePath,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty: "job_id"},message:"must have required property '"+"job_id"+"'"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
}
var _valid0 = _errs5 === errors;
valid0 = valid0 || _valid0;
if(!valid0){
const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
else {
errors = _errs1;
if(vErrors !== null){
if(_errs1){
vErrors.length = _errs1;
}
else {
vErrors = null;
}
}
}
const _errs7 = errors;
let valid2 = true;
const _errs8 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.status !== undefined){
let data0 = data.status;
if(!((data0 === "unknown") || (data0 === "not_found"))){
const err5 = {};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
}
}
var _valid1 = _errs8 === errors;
errors = _errs7;
if(vErrors !== null){
if(_errs7){
vErrors.length = _errs7;
}
else {
vErrors = null;
}
}
if(_valid1){
const _errs10 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.next_action !== undefined){
let data1 = data.next_action;
if(data1 && typeof data1 == "object" && !Array.isArray(data1)){
if(data1.kind !== undefined){
let data2 = data1.kind;
if(!(((data2 === "wait") || (data2 === "ask_user")) || (data2 === "wait_then_read"))){
const err6 = {instancePath:instancePath+"/next_action/kind",schemaPath:"#/allOf/0/then/properties/next_action/properties/kind/enum",keyword:"enum",params:{allowedValues: schema33.allOf[0].then.properties.next_action.properties.kind.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
}
if(data1.read !== undefined){
let data3 = data1.read;
if(typeof data3 === "string"){
if(func2(data3) < 1){
const err7 = {instancePath:instancePath+"/next_action/read",schemaPath:"#/allOf/0/then/properties/next_action/properties/read/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
}
else {
const err8 = {instancePath:instancePath+"/next_action/read",schemaPath:"#/allOf/0/then/properties/next_action/properties/read/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
}
}
}
}
var _valid1 = _errs10 === errors;
valid2 = _valid1;
if(valid2){
var props0 = {};
props0.next_action = true;
props0.status = true;
}
}
if(!valid2){
const err9 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
const _errs16 = errors;
let valid6 = true;
const _errs17 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.status !== undefined){
if("duplicate" !== data.status){
const err10 = {};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
}
}
var _valid2 = _errs17 === errors;
errors = _errs16;
if(vErrors !== null){
if(_errs16){
vErrors.length = _errs16;
}
else {
vErrors = null;
}
}
if(_valid2){
const _errs19 = errors;
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.request_digest === undefined){
const err11 = {instancePath,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty: "request_digest"},message:"must have required property '"+"request_digest"+"'"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
}
var _valid2 = _errs19 === errors;
valid6 = _valid2;
}
if(!valid6){
const err12 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
if(props0 !== true){
props0 = props0 || {};
props0.status = true;
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.schema_version === undefined){
const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
if(data.status === undefined){
const err14 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
if(data.project_id === undefined){
const err15 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
if(data.next_action === undefined){
const err16 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "next_action"},message:"must have required property '"+"next_action"+"'"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
for(const key0 in data){
if(!(func1.call(schema33.properties, key0))){
const err17 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
}
if(data.schema_version !== undefined){
if("1.0.0" !== data.schema_version){
const err18 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: "1.0.0"},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
}
if(data.operation_id !== undefined){
let data6 = data.operation_id;
if(typeof data6 === "string"){
if(func2(data6) < 1){
const err19 = {instancePath:instancePath+"/operation_id",schemaPath:"#/properties/operation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
else {
const err20 = {instancePath:instancePath+"/operation_id",schemaPath:"#/properties/operation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
if(data.mutation_id !== undefined){
let data7 = data.mutation_id;
if(typeof data7 === "string"){
if(func2(data7) < 1){
const err21 = {instancePath:instancePath+"/mutation_id",schemaPath:"#/properties/mutation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
}
else {
const err22 = {instancePath:instancePath+"/mutation_id",schemaPath:"#/properties/mutation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
if(data.idempotency_key !== undefined){
let data8 = data.idempotency_key;
if(typeof data8 === "string"){
if(func2(data8) < 1){
const err23 = {instancePath:instancePath+"/idempotency_key",schemaPath:"#/properties/idempotency_key/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
}
else {
const err24 = {instancePath:instancePath+"/idempotency_key",schemaPath:"#/properties/idempotency_key/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
if(data.job_id !== undefined){
let data9 = data.job_id;
if(typeof data9 === "string"){
if(func2(data9) < 1){
const err25 = {instancePath:instancePath+"/job_id",schemaPath:"#/properties/job_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
else {
const err26 = {instancePath:instancePath+"/job_id",schemaPath:"#/properties/job_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
}
}
if(data.request_digest !== undefined){
let data10 = data.request_digest;
if(typeof data10 === "string"){
if(!pattern4.test(data10)){
const err27 = {instancePath:instancePath+"/request_digest",schemaPath:"#/properties/request_digest/pattern",keyword:"pattern",params:{pattern: "^[a-f0-9]{64}$"},message:"must match pattern \""+"^[a-f0-9]{64}$"+"\""};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
else {
const err28 = {instancePath:instancePath+"/request_digest",schemaPath:"#/properties/request_digest/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
}
if(data.status !== undefined){
let data11 = data.status;
if(!((((((((data11 === "applied") || (data11 === "duplicate")) || (data11 === "noop")) || (data11 === "pending")) || (data11 === "unknown")) || (data11 === "not_found")) || (data11 === "rejected")) || (data11 === "cancelled"))){
const err29 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/enum",keyword:"enum",params:{allowedValues: schema33.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
if(data.project_id !== undefined){
let data12 = data.project_id;
if(typeof data12 === "string"){
if(func2(data12) < 1){
const err30 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
}
else {
const err31 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
}
}
if(data.timeline_id !== undefined){
let data13 = data.timeline_id;
if(typeof data13 === "string"){
if(func2(data13) < 1){
const err32 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
}
else {
const err33 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
}
if(data.revision_before !== undefined){
let data14 = data.revision_before;
if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){
const err34 = {instancePath:instancePath+"/revision_before",schemaPath:"#/properties/revision_before/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err34];
}
else {
vErrors.push(err34);
}
errors++;
}
if((typeof data14 == "number") && (isFinite(data14))){
if(data14 < 0 || isNaN(data14)){
const err35 = {instancePath:instancePath+"/revision_before",schemaPath:"#/properties/revision_before/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err35];
}
else {
vErrors.push(err35);
}
errors++;
}
}
}
if(data.revision_after !== undefined){
let data15 = data.revision_after;
if(!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))){
const err36 = {instancePath:instancePath+"/revision_after",schemaPath:"#/properties/revision_after/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err36];
}
else {
vErrors.push(err36);
}
errors++;
}
if((typeof data15 == "number") && (isFinite(data15))){
if(data15 < 0 || isNaN(data15)){
const err37 = {instancePath:instancePath+"/revision_after",schemaPath:"#/properties/revision_after/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err37];
}
else {
vErrors.push(err37);
}
errors++;
}
}
}
if(data.children !== undefined){
let data16 = data.children;
if(Array.isArray(data16)){
if(data16.length > 500){
const err38 = {instancePath:instancePath+"/children",schemaPath:"#/properties/children/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err38];
}
else {
vErrors.push(err38);
}
errors++;
}
const len0 = data16.length;
for(let i0=0; i0<len0; i0++){
let data17 = data16[i0];
if(typeof data17 === "string"){
if(func2(data17) < 1){
const err39 = {instancePath:instancePath+"/children/" + i0,schemaPath:"#/properties/children/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err39];
}
else {
vErrors.push(err39);
}
errors++;
}
}
else {
const err40 = {instancePath:instancePath+"/children/" + i0,schemaPath:"#/properties/children/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err40];
}
else {
vErrors.push(err40);
}
errors++;
}
}
let i1 = data16.length;
let j0;
if(i1 > 1){
const indices0 = {};
for(;i1--;){
let item0 = data16[i1];
if(typeof item0 !== "string"){
continue;
}
if(typeof indices0[item0] == "number"){
j0 = indices0[item0];
const err41 = {instancePath:instancePath+"/children",schemaPath:"#/properties/children/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
if(vErrors === null){
vErrors = [err41];
}
else {
vErrors.push(err41);
}
errors++;
break;
}
indices0[item0] = i1;
}
}
}
else {
const err42 = {instancePath:instancePath+"/children",schemaPath:"#/properties/children/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err42];
}
else {
vErrors.push(err42);
}
errors++;
}
}
if(data.warnings !== undefined){
let data18 = data.warnings;
if(Array.isArray(data18)){
if(data18.length > 500){
const err43 = {instancePath:instancePath+"/warnings",schemaPath:"#/properties/warnings/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err43];
}
else {
vErrors.push(err43);
}
errors++;
}
const len1 = data18.length;
for(let i2=0; i2<len1; i2++){
let data19 = data18[i2];
if(typeof data19 === "string"){
if(func2(data19) < 1){
const err44 = {instancePath:instancePath+"/warnings/" + i2,schemaPath:"#/properties/warnings/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err44];
}
else {
vErrors.push(err44);
}
errors++;
}
}
else {
const err45 = {instancePath:instancePath+"/warnings/" + i2,schemaPath:"#/properties/warnings/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err45];
}
else {
vErrors.push(err45);
}
errors++;
}
}
let i3 = data18.length;
let j1;
if(i3 > 1){
const indices1 = {};
for(;i3--;){
let item1 = data18[i3];
if(typeof item1 !== "string"){
continue;
}
if(typeof indices1[item1] == "number"){
j1 = indices1[item1];
const err46 = {instancePath:instancePath+"/warnings",schemaPath:"#/properties/warnings/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};
if(vErrors === null){
vErrors = [err46];
}
else {
vErrors.push(err46);
}
errors++;
break;
}
indices1[item1] = i3;
}
}
}
else {
const err47 = {instancePath:instancePath+"/warnings",schemaPath:"#/properties/warnings/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err47];
}
else {
vErrors.push(err47);
}
errors++;
}
}
if(data.failed_items !== undefined){
let data20 = data.failed_items;
if(Array.isArray(data20)){
if(data20.length > 500){
const err48 = {instancePath:instancePath+"/failed_items",schemaPath:"#/properties/failed_items/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err48];
}
else {
vErrors.push(err48);
}
errors++;
}
const len2 = data20.length;
for(let i4=0; i4<len2; i4++){
let data21 = data20[i4];
if(typeof data21 === "string"){
if(func2(data21) < 1){
const err49 = {instancePath:instancePath+"/failed_items/" + i4,schemaPath:"#/properties/failed_items/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err49];
}
else {
vErrors.push(err49);
}
errors++;
}
}
else {
const err50 = {instancePath:instancePath+"/failed_items/" + i4,schemaPath:"#/properties/failed_items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err50];
}
else {
vErrors.push(err50);
}
errors++;
}
}
let i5 = data20.length;
let j2;
if(i5 > 1){
const indices2 = {};
for(;i5--;){
let item2 = data20[i5];
if(typeof item2 !== "string"){
continue;
}
if(typeof indices2[item2] == "number"){
j2 = indices2[item2];
const err51 = {instancePath:instancePath+"/failed_items",schemaPath:"#/properties/failed_items/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};
if(vErrors === null){
vErrors = [err51];
}
else {
vErrors.push(err51);
}
errors++;
break;
}
indices2[item2] = i5;
}
}
}
else {
const err52 = {instancePath:instancePath+"/failed_items",schemaPath:"#/properties/failed_items/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err52];
}
else {
vErrors.push(err52);
}
errors++;
}
}
if(data.next_action !== undefined){
let data22 = data.next_action;
const _errs56 = errors;
let valid19 = true;
const _errs57 = errors;
if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
if(data22.kind !== undefined){
if("wait_then_read" !== data22.kind){
const err53 = {};
if(vErrors === null){
vErrors = [err53];
}
else {
vErrors.push(err53);
}
errors++;
}
}
}
var _valid3 = _errs57 === errors;
errors = _errs56;
if(vErrors !== null){
if(_errs56){
vErrors.length = _errs56;
}
else {
vErrors = null;
}
}
if(_valid3){
const _errs59 = errors;
if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
if(data22.read === undefined){
const err54 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/allOf/0/then/required",keyword:"required",params:{missingProperty: "read"},message:"must have required property '"+"read"+"'"};
if(vErrors === null){
vErrors = [err54];
}
else {
vErrors.push(err54);
}
errors++;
}
}
var _valid3 = _errs59 === errors;
valid19 = _valid3;
}
if(!valid19){
const err55 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
if(vErrors === null){
vErrors = [err55];
}
else {
vErrors.push(err55);
}
errors++;
}
if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
if(data22.kind === undefined){
const err56 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};
if(vErrors === null){
vErrors = [err56];
}
else {
vErrors.push(err56);
}
errors++;
}
for(const key1 in data22){
if(!((((key1 === "kind") || (key1 === "after_seconds")) || (key1 === "read")) || (key1 === "reason"))){
const err57 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err57];
}
else {
vErrors.push(err57);
}
errors++;
}
}
if(data22.kind !== undefined){
let data24 = data22.kind;
if(!((((((((data24 === "read_back") || (data24 === "wait_then_read")) || (data24 === "poll")) || (data24 === "wait")) || (data24 === "retry")) || (data24 === "reinspect")) || (data24 === "ask_user")) || (data24 === "deliver"))){
const err58 = {instancePath:instancePath+"/next_action/kind",schemaPath:"#/properties/next_action/properties/kind/enum",keyword:"enum",params:{allowedValues: schema33.properties.next_action.properties.kind.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err58];
}
else {
vErrors.push(err58);
}
errors++;
}
}
if(data22.after_seconds !== undefined){
let data25 = data22.after_seconds;
if(!(((typeof data25 == "number") && (!(data25 % 1) && !isNaN(data25))) && (isFinite(data25)))){
const err59 = {instancePath:instancePath+"/next_action/after_seconds",schemaPath:"#/properties/next_action/properties/after_seconds/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err59];
}
else {
vErrors.push(err59);
}
errors++;
}
if((typeof data25 == "number") && (isFinite(data25))){
if(data25 < 0 || isNaN(data25)){
const err60 = {instancePath:instancePath+"/next_action/after_seconds",schemaPath:"#/properties/next_action/properties/after_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err60];
}
else {
vErrors.push(err60);
}
errors++;
}
}
}
if(data22.read !== undefined){
let data26 = data22.read;
if(typeof data26 === "string"){
if(func2(data26) < 1){
const err61 = {instancePath:instancePath+"/next_action/read",schemaPath:"#/properties/next_action/properties/read/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err61];
}
else {
vErrors.push(err61);
}
errors++;
}
}
else {
const err62 = {instancePath:instancePath+"/next_action/read",schemaPath:"#/properties/next_action/properties/read/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err62];
}
else {
vErrors.push(err62);
}
errors++;
}
}
if(data22.reason !== undefined){
let data27 = data22.reason;
if(typeof data27 === "string"){
if(func2(data27) < 1){
const err63 = {instancePath:instancePath+"/next_action/reason",schemaPath:"#/properties/next_action/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err63];
}
else {
vErrors.push(err63);
}
errors++;
}
}
else {
const err64 = {instancePath:instancePath+"/next_action/reason",schemaPath:"#/properties/next_action/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err64];
}
else {
vErrors.push(err64);
}
errors++;
}
}
}
else {
const err65 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err65];
}
else {
vErrors.push(err65);
}
errors++;
}
}
}
else {
const err66 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err66];
}
else {
vErrors.push(err66);
}
errors++;
}
validate22.errors = vErrors;
return errors === 0;
}
validate22.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
export const review_evidence = validate23;
const schema35 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/review-evidence.schema.json","$defs":{"observation":{"type":"object","additionalProperties":false,"required":["artifact_ref","project_id","timeline_id","revision"],"properties":{"artifact_ref":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0}}}},"type":"object","additionalProperties":false,"required":["schema_version","evidence_id","project_id","timeline_id","revision","layers","hard_failures","next_action"],"properties":{"schema_version":{"const":"1.0.0"},"evidence_id":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0},"layers":{"type":"object","additionalProperties":false,"required":["structure","semantic","visual","audio"],"properties":{"structure":{"type":"object","additionalProperties":false,"required":["status","checks","observations"],"properties":{"status":{"enum":["pass","fail","unjudgeable"]},"checks":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100},"reason":{"type":"string","minLength":1},"observations":{"type":"array","maxItems":100,"items":{"$ref":"#/$defs/observation"}}}},"semantic":{"type":"object","additionalProperties":false,"required":["status","checks"],"properties":{"status":{"enum":["pass","fail","unjudgeable"]},"checks":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100},"reason":{"type":"string","minLength":1}}},"visual":{"type":"object","additionalProperties":false,"required":["status","checks","frames"],"properties":{"status":{"enum":["pass","fail","unjudgeable"]},"checks":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100},"reason":{"type":"string","minLength":1},"frames":{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":false,"required":["artifact_ref","project_id","timeline_id","revision","timestamp_ms","composed"],"properties":{"artifact_ref":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0},"timestamp_ms":{"type":"integer","minimum":0},"composed":{"const":true}}}}}},"audio":{"type":"object","additionalProperties":false,"required":["status","checks","listened"],"properties":{"status":{"enum":["pass","fail","unjudgeable"]},"checks":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100},"reason":{"type":"string","minLength":1},"listened":{"type":"boolean"},"listening":{"$ref":"#/$defs/observation"}}}}},"hard_failures":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"next_action":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"kind":{"enum":["read_back","confirm_receipt","poll","wait","retry","reinspect","ask_user","deliver"]},"after_seconds":{"type":"integer","minimum":0},"reason":{"type":"string","minLength":1}}}}};
const schema36 = {"type":"object","additionalProperties":false,"required":["artifact_ref","project_id","timeline_id","revision"],"properties":{"artifact_ref":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0}}};
function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/review-evidence.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate23.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.schema_version === undefined){
const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
if(data.evidence_id === undefined){
const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "evidence_id"},message:"must have required property '"+"evidence_id"+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
if(data.project_id === undefined){
const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
if(data.timeline_id === undefined){
const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
if(data.revision === undefined){
const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
if(data.layers === undefined){
const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "layers"},message:"must have required property '"+"layers"+"'"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
if(data.hard_failures === undefined){
const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hard_failures"},message:"must have required property '"+"hard_failures"+"'"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
if(data.next_action === undefined){
const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "next_action"},message:"must have required property '"+"next_action"+"'"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
for(const key0 in data){
if(!((((((((key0 === "schema_version") || (key0 === "evidence_id")) || (key0 === "project_id")) || (key0 === "timeline_id")) || (key0 === "revision")) || (key0 === "layers")) || (key0 === "hard_failures")) || (key0 === "next_action"))){
const err8 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
}
if(data.schema_version !== undefined){
if("1.0.0" !== data.schema_version){
const err9 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: "1.0.0"},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
}
if(data.evidence_id !== undefined){
let data1 = data.evidence_id;
if(typeof data1 === "string"){
if(func2(data1) < 1){
const err10 = {instancePath:instancePath+"/evidence_id",schemaPath:"#/properties/evidence_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
}
else {
const err11 = {instancePath:instancePath+"/evidence_id",schemaPath:"#/properties/evidence_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
}
if(data.project_id !== undefined){
let data2 = data.project_id;
if(typeof data2 === "string"){
if(func2(data2) < 1){
const err12 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
}
else {
const err13 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
}
if(data.timeline_id !== undefined){
let data3 = data.timeline_id;
if(typeof data3 === "string"){
if(func2(data3) < 1){
const err14 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
}
else {
const err15 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
}
if(data.revision !== undefined){
let data4 = data.revision;
if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){
const err16 = {instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
if((typeof data4 == "number") && (isFinite(data4))){
if(data4 < 0 || isNaN(data4)){
const err17 = {instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
}
}
if(data.layers !== undefined){
let data5 = data.layers;
if(data5 && typeof data5 == "object" && !Array.isArray(data5)){
if(data5.structure === undefined){
const err18 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/required",keyword:"required",params:{missingProperty: "structure"},message:"must have required property '"+"structure"+"'"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
if(data5.semantic === undefined){
const err19 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/required",keyword:"required",params:{missingProperty: "semantic"},message:"must have required property '"+"semantic"+"'"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
if(data5.visual === undefined){
const err20 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/required",keyword:"required",params:{missingProperty: "visual"},message:"must have required property '"+"visual"+"'"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
if(data5.audio === undefined){
const err21 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/required",keyword:"required",params:{missingProperty: "audio"},message:"must have required property '"+"audio"+"'"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
for(const key1 in data5){
if(!((((key1 === "structure") || (key1 === "semantic")) || (key1 === "visual")) || (key1 === "audio"))){
const err22 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
if(data5.structure !== undefined){
let data6 = data5.structure;
if(data6 && typeof data6 == "object" && !Array.isArray(data6)){
if(data6.status === undefined){
const err23 = {instancePath:instancePath+"/layers/structure",schemaPath:"#/properties/layers/properties/structure/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
if(data6.checks === undefined){
const err24 = {instancePath:instancePath+"/layers/structure",schemaPath:"#/properties/layers/properties/structure/required",keyword:"required",params:{missingProperty: "checks"},message:"must have required property '"+"checks"+"'"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
if(data6.observations === undefined){
const err25 = {instancePath:instancePath+"/layers/structure",schemaPath:"#/properties/layers/properties/structure/required",keyword:"required",params:{missingProperty: "observations"},message:"must have required property '"+"observations"+"'"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
for(const key2 in data6){
if(!((((key2 === "status") || (key2 === "checks")) || (key2 === "reason")) || (key2 === "observations"))){
const err26 = {instancePath:instancePath+"/layers/structure",schemaPath:"#/properties/layers/properties/structure/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
}
}
if(data6.status !== undefined){
let data7 = data6.status;
if(!(((data7 === "pass") || (data7 === "fail")) || (data7 === "unjudgeable"))){
const err27 = {instancePath:instancePath+"/layers/structure/status",schemaPath:"#/properties/layers/properties/structure/properties/status/enum",keyword:"enum",params:{allowedValues: schema35.properties.layers.properties.structure.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
if(data6.checks !== undefined){
let data8 = data6.checks;
if(Array.isArray(data8)){
if(data8.length > 100){
const err28 = {instancePath:instancePath+"/layers/structure/checks",schemaPath:"#/properties/layers/properties/structure/properties/checks/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
const len0 = data8.length;
for(let i0=0; i0<len0; i0++){
let data9 = data8[i0];
if(typeof data9 === "string"){
if(func2(data9) < 1){
const err29 = {instancePath:instancePath+"/layers/structure/checks/" + i0,schemaPath:"#/properties/layers/properties/structure/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
else {
const err30 = {instancePath:instancePath+"/layers/structure/checks/" + i0,schemaPath:"#/properties/layers/properties/structure/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
}
}
else {
const err31 = {instancePath:instancePath+"/layers/structure/checks",schemaPath:"#/properties/layers/properties/structure/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
}
}
if(data6.reason !== undefined){
let data10 = data6.reason;
if(typeof data10 === "string"){
if(func2(data10) < 1){
const err32 = {instancePath:instancePath+"/layers/structure/reason",schemaPath:"#/properties/layers/properties/structure/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
}
else {
const err33 = {instancePath:instancePath+"/layers/structure/reason",schemaPath:"#/properties/layers/properties/structure/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
}
if(data6.observations !== undefined){
let data11 = data6.observations;
if(Array.isArray(data11)){
if(data11.length > 100){
const err34 = {instancePath:instancePath+"/layers/structure/observations",schemaPath:"#/properties/layers/properties/structure/properties/observations/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err34];
}
else {
vErrors.push(err34);
}
errors++;
}
const len1 = data11.length;
for(let i1=0; i1<len1; i1++){
let data12 = data11[i1];
if(data12 && typeof data12 == "object" && !Array.isArray(data12)){
if(data12.artifact_ref === undefined){
const err35 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "artifact_ref"},message:"must have required property '"+"artifact_ref"+"'"};
if(vErrors === null){
vErrors = [err35];
}
else {
vErrors.push(err35);
}
errors++;
}
if(data12.project_id === undefined){
const err36 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err36];
}
else {
vErrors.push(err36);
}
errors++;
}
if(data12.timeline_id === undefined){
const err37 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err37];
}
else {
vErrors.push(err37);
}
errors++;
}
if(data12.revision === undefined){
const err38 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};
if(vErrors === null){
vErrors = [err38];
}
else {
vErrors.push(err38);
}
errors++;
}
for(const key3 in data12){
if(!((((key3 === "artifact_ref") || (key3 === "project_id")) || (key3 === "timeline_id")) || (key3 === "revision"))){
const err39 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err39];
}
else {
vErrors.push(err39);
}
errors++;
}
}
if(data12.artifact_ref !== undefined){
let data13 = data12.artifact_ref;
if(typeof data13 === "string"){
if(func2(data13) < 1){
const err40 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/artifact_ref",schemaPath:"#/$defs/observation/properties/artifact_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err40];
}
else {
vErrors.push(err40);
}
errors++;
}
}
else {
const err41 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/artifact_ref",schemaPath:"#/$defs/observation/properties/artifact_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err41];
}
else {
vErrors.push(err41);
}
errors++;
}
}
if(data12.project_id !== undefined){
let data14 = data12.project_id;
if(typeof data14 === "string"){
if(func2(data14) < 1){
const err42 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/project_id",schemaPath:"#/$defs/observation/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err42];
}
else {
vErrors.push(err42);
}
errors++;
}
}
else {
const err43 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/project_id",schemaPath:"#/$defs/observation/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err43];
}
else {
vErrors.push(err43);
}
errors++;
}
}
if(data12.timeline_id !== undefined){
let data15 = data12.timeline_id;
if(typeof data15 === "string"){
if(func2(data15) < 1){
const err44 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/timeline_id",schemaPath:"#/$defs/observation/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err44];
}
else {
vErrors.push(err44);
}
errors++;
}
}
else {
const err45 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/timeline_id",schemaPath:"#/$defs/observation/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err45];
}
else {
vErrors.push(err45);
}
errors++;
}
}
if(data12.revision !== undefined){
let data16 = data12.revision;
if(!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))){
const err46 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/revision",schemaPath:"#/$defs/observation/properties/revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err46];
}
else {
vErrors.push(err46);
}
errors++;
}
if((typeof data16 == "number") && (isFinite(data16))){
if(data16 < 0 || isNaN(data16)){
const err47 = {instancePath:instancePath+"/layers/structure/observations/" + i1+"/revision",schemaPath:"#/$defs/observation/properties/revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err47];
}
else {
vErrors.push(err47);
}
errors++;
}
}
}
}
else {
const err48 = {instancePath:instancePath+"/layers/structure/observations/" + i1,schemaPath:"#/$defs/observation/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err48];
}
else {
vErrors.push(err48);
}
errors++;
}
}
}
else {
const err49 = {instancePath:instancePath+"/layers/structure/observations",schemaPath:"#/properties/layers/properties/structure/properties/observations/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err49];
}
else {
vErrors.push(err49);
}
errors++;
}
}
}
else {
const err50 = {instancePath:instancePath+"/layers/structure",schemaPath:"#/properties/layers/properties/structure/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err50];
}
else {
vErrors.push(err50);
}
errors++;
}
}
if(data5.semantic !== undefined){
let data17 = data5.semantic;
if(data17 && typeof data17 == "object" && !Array.isArray(data17)){
if(data17.status === undefined){
const err51 = {instancePath:instancePath+"/layers/semantic",schemaPath:"#/properties/layers/properties/semantic/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err51];
}
else {
vErrors.push(err51);
}
errors++;
}
if(data17.checks === undefined){
const err52 = {instancePath:instancePath+"/layers/semantic",schemaPath:"#/properties/layers/properties/semantic/required",keyword:"required",params:{missingProperty: "checks"},message:"must have required property '"+"checks"+"'"};
if(vErrors === null){
vErrors = [err52];
}
else {
vErrors.push(err52);
}
errors++;
}
for(const key4 in data17){
if(!(((key4 === "status") || (key4 === "checks")) || (key4 === "reason"))){
const err53 = {instancePath:instancePath+"/layers/semantic",schemaPath:"#/properties/layers/properties/semantic/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err53];
}
else {
vErrors.push(err53);
}
errors++;
}
}
if(data17.status !== undefined){
let data18 = data17.status;
if(!(((data18 === "pass") || (data18 === "fail")) || (data18 === "unjudgeable"))){
const err54 = {instancePath:instancePath+"/layers/semantic/status",schemaPath:"#/properties/layers/properties/semantic/properties/status/enum",keyword:"enum",params:{allowedValues: schema35.properties.layers.properties.semantic.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err54];
}
else {
vErrors.push(err54);
}
errors++;
}
}
if(data17.checks !== undefined){
let data19 = data17.checks;
if(Array.isArray(data19)){
if(data19.length > 100){
const err55 = {instancePath:instancePath+"/layers/semantic/checks",schemaPath:"#/properties/layers/properties/semantic/properties/checks/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err55];
}
else {
vErrors.push(err55);
}
errors++;
}
const len2 = data19.length;
for(let i2=0; i2<len2; i2++){
let data20 = data19[i2];
if(typeof data20 === "string"){
if(func2(data20) < 1){
const err56 = {instancePath:instancePath+"/layers/semantic/checks/" + i2,schemaPath:"#/properties/layers/properties/semantic/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err56];
}
else {
vErrors.push(err56);
}
errors++;
}
}
else {
const err57 = {instancePath:instancePath+"/layers/semantic/checks/" + i2,schemaPath:"#/properties/layers/properties/semantic/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err57];
}
else {
vErrors.push(err57);
}
errors++;
}
}
}
else {
const err58 = {instancePath:instancePath+"/layers/semantic/checks",schemaPath:"#/properties/layers/properties/semantic/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err58];
}
else {
vErrors.push(err58);
}
errors++;
}
}
if(data17.reason !== undefined){
let data21 = data17.reason;
if(typeof data21 === "string"){
if(func2(data21) < 1){
const err59 = {instancePath:instancePath+"/layers/semantic/reason",schemaPath:"#/properties/layers/properties/semantic/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err59];
}
else {
vErrors.push(err59);
}
errors++;
}
}
else {
const err60 = {instancePath:instancePath+"/layers/semantic/reason",schemaPath:"#/properties/layers/properties/semantic/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err60];
}
else {
vErrors.push(err60);
}
errors++;
}
}
}
else {
const err61 = {instancePath:instancePath+"/layers/semantic",schemaPath:"#/properties/layers/properties/semantic/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err61];
}
else {
vErrors.push(err61);
}
errors++;
}
}
if(data5.visual !== undefined){
let data22 = data5.visual;
if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
if(data22.status === undefined){
const err62 = {instancePath:instancePath+"/layers/visual",schemaPath:"#/properties/layers/properties/visual/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err62];
}
else {
vErrors.push(err62);
}
errors++;
}
if(data22.checks === undefined){
const err63 = {instancePath:instancePath+"/layers/visual",schemaPath:"#/properties/layers/properties/visual/required",keyword:"required",params:{missingProperty: "checks"},message:"must have required property '"+"checks"+"'"};
if(vErrors === null){
vErrors = [err63];
}
else {
vErrors.push(err63);
}
errors++;
}
if(data22.frames === undefined){
const err64 = {instancePath:instancePath+"/layers/visual",schemaPath:"#/properties/layers/properties/visual/required",keyword:"required",params:{missingProperty: "frames"},message:"must have required property '"+"frames"+"'"};
if(vErrors === null){
vErrors = [err64];
}
else {
vErrors.push(err64);
}
errors++;
}
for(const key5 in data22){
if(!((((key5 === "status") || (key5 === "checks")) || (key5 === "reason")) || (key5 === "frames"))){
const err65 = {instancePath:instancePath+"/layers/visual",schemaPath:"#/properties/layers/properties/visual/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err65];
}
else {
vErrors.push(err65);
}
errors++;
}
}
if(data22.status !== undefined){
let data23 = data22.status;
if(!(((data23 === "pass") || (data23 === "fail")) || (data23 === "unjudgeable"))){
const err66 = {instancePath:instancePath+"/layers/visual/status",schemaPath:"#/properties/layers/properties/visual/properties/status/enum",keyword:"enum",params:{allowedValues: schema35.properties.layers.properties.visual.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err66];
}
else {
vErrors.push(err66);
}
errors++;
}
}
if(data22.checks !== undefined){
let data24 = data22.checks;
if(Array.isArray(data24)){
if(data24.length > 100){
const err67 = {instancePath:instancePath+"/layers/visual/checks",schemaPath:"#/properties/layers/properties/visual/properties/checks/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err67];
}
else {
vErrors.push(err67);
}
errors++;
}
const len3 = data24.length;
for(let i3=0; i3<len3; i3++){
let data25 = data24[i3];
if(typeof data25 === "string"){
if(func2(data25) < 1){
const err68 = {instancePath:instancePath+"/layers/visual/checks/" + i3,schemaPath:"#/properties/layers/properties/visual/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err68];
}
else {
vErrors.push(err68);
}
errors++;
}
}
else {
const err69 = {instancePath:instancePath+"/layers/visual/checks/" + i3,schemaPath:"#/properties/layers/properties/visual/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err69];
}
else {
vErrors.push(err69);
}
errors++;
}
}
}
else {
const err70 = {instancePath:instancePath+"/layers/visual/checks",schemaPath:"#/properties/layers/properties/visual/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err70];
}
else {
vErrors.push(err70);
}
errors++;
}
}
if(data22.reason !== undefined){
let data26 = data22.reason;
if(typeof data26 === "string"){
if(func2(data26) < 1){
const err71 = {instancePath:instancePath+"/layers/visual/reason",schemaPath:"#/properties/layers/properties/visual/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err71];
}
else {
vErrors.push(err71);
}
errors++;
}
}
else {
const err72 = {instancePath:instancePath+"/layers/visual/reason",schemaPath:"#/properties/layers/properties/visual/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err72];
}
else {
vErrors.push(err72);
}
errors++;
}
}
if(data22.frames !== undefined){
let data27 = data22.frames;
if(Array.isArray(data27)){
if(data27.length > 500){
const err73 = {instancePath:instancePath+"/layers/visual/frames",schemaPath:"#/properties/layers/properties/visual/properties/frames/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err73];
}
else {
vErrors.push(err73);
}
errors++;
}
const len4 = data27.length;
for(let i4=0; i4<len4; i4++){
let data28 = data27[i4];
if(data28 && typeof data28 == "object" && !Array.isArray(data28)){
if(data28.artifact_ref === undefined){
const err74 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "artifact_ref"},message:"must have required property '"+"artifact_ref"+"'"};
if(vErrors === null){
vErrors = [err74];
}
else {
vErrors.push(err74);
}
errors++;
}
if(data28.project_id === undefined){
const err75 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err75];
}
else {
vErrors.push(err75);
}
errors++;
}
if(data28.timeline_id === undefined){
const err76 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err76];
}
else {
vErrors.push(err76);
}
errors++;
}
if(data28.revision === undefined){
const err77 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};
if(vErrors === null){
vErrors = [err77];
}
else {
vErrors.push(err77);
}
errors++;
}
if(data28.timestamp_ms === undefined){
const err78 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "timestamp_ms"},message:"must have required property '"+"timestamp_ms"+"'"};
if(vErrors === null){
vErrors = [err78];
}
else {
vErrors.push(err78);
}
errors++;
}
if(data28.composed === undefined){
const err79 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/required",keyword:"required",params:{missingProperty: "composed"},message:"must have required property '"+"composed"+"'"};
if(vErrors === null){
vErrors = [err79];
}
else {
vErrors.push(err79);
}
errors++;
}
for(const key6 in data28){
if(!((((((key6 === "artifact_ref") || (key6 === "project_id")) || (key6 === "timeline_id")) || (key6 === "revision")) || (key6 === "timestamp_ms")) || (key6 === "composed"))){
const err80 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err80];
}
else {
vErrors.push(err80);
}
errors++;
}
}
if(data28.artifact_ref !== undefined){
let data29 = data28.artifact_ref;
if(typeof data29 === "string"){
if(func2(data29) < 1){
const err81 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/artifact_ref",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/artifact_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err81];
}
else {
vErrors.push(err81);
}
errors++;
}
}
else {
const err82 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/artifact_ref",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/artifact_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err82];
}
else {
vErrors.push(err82);
}
errors++;
}
}
if(data28.project_id !== undefined){
let data30 = data28.project_id;
if(typeof data30 === "string"){
if(func2(data30) < 1){
const err83 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/project_id",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err83];
}
else {
vErrors.push(err83);
}
errors++;
}
}
else {
const err84 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/project_id",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err84];
}
else {
vErrors.push(err84);
}
errors++;
}
}
if(data28.timeline_id !== undefined){
let data31 = data28.timeline_id;
if(typeof data31 === "string"){
if(func2(data31) < 1){
const err85 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/timeline_id",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err85];
}
else {
vErrors.push(err85);
}
errors++;
}
}
else {
const err86 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/timeline_id",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err86];
}
else {
vErrors.push(err86);
}
errors++;
}
}
if(data28.revision !== undefined){
let data32 = data28.revision;
if(!(((typeof data32 == "number") && (!(data32 % 1) && !isNaN(data32))) && (isFinite(data32)))){
const err87 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/revision",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err87];
}
else {
vErrors.push(err87);
}
errors++;
}
if((typeof data32 == "number") && (isFinite(data32))){
if(data32 < 0 || isNaN(data32)){
const err88 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/revision",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err88];
}
else {
vErrors.push(err88);
}
errors++;
}
}
}
if(data28.timestamp_ms !== undefined){
let data33 = data28.timestamp_ms;
if(!(((typeof data33 == "number") && (!(data33 % 1) && !isNaN(data33))) && (isFinite(data33)))){
const err89 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/timestamp_ms",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/timestamp_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err89];
}
else {
vErrors.push(err89);
}
errors++;
}
if((typeof data33 == "number") && (isFinite(data33))){
if(data33 < 0 || isNaN(data33)){
const err90 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/timestamp_ms",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/timestamp_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err90];
}
else {
vErrors.push(err90);
}
errors++;
}
}
}
if(data28.composed !== undefined){
if(true !== data28.composed){
const err91 = {instancePath:instancePath+"/layers/visual/frames/" + i4+"/composed",schemaPath:"#/properties/layers/properties/visual/properties/frames/items/properties/composed/const",keyword:"const",params:{allowedValue: true},message:"must be equal to constant"};
if(vErrors === null){
vErrors = [err91];
}
else {
vErrors.push(err91);
}
errors++;
}
}
}
else {
const err92 = {instancePath:instancePath+"/layers/visual/frames/" + i4,schemaPath:"#/properties/layers/properties/visual/properties/frames/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err92];
}
else {
vErrors.push(err92);
}
errors++;
}
}
}
else {
const err93 = {instancePath:instancePath+"/layers/visual/frames",schemaPath:"#/properties/layers/properties/visual/properties/frames/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err93];
}
else {
vErrors.push(err93);
}
errors++;
}
}
}
else {
const err94 = {instancePath:instancePath+"/layers/visual",schemaPath:"#/properties/layers/properties/visual/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err94];
}
else {
vErrors.push(err94);
}
errors++;
}
}
if(data5.audio !== undefined){
let data35 = data5.audio;
if(data35 && typeof data35 == "object" && !Array.isArray(data35)){
if(data35.status === undefined){
const err95 = {instancePath:instancePath+"/layers/audio",schemaPath:"#/properties/layers/properties/audio/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};
if(vErrors === null){
vErrors = [err95];
}
else {
vErrors.push(err95);
}
errors++;
}
if(data35.checks === undefined){
const err96 = {instancePath:instancePath+"/layers/audio",schemaPath:"#/properties/layers/properties/audio/required",keyword:"required",params:{missingProperty: "checks"},message:"must have required property '"+"checks"+"'"};
if(vErrors === null){
vErrors = [err96];
}
else {
vErrors.push(err96);
}
errors++;
}
if(data35.listened === undefined){
const err97 = {instancePath:instancePath+"/layers/audio",schemaPath:"#/properties/layers/properties/audio/required",keyword:"required",params:{missingProperty: "listened"},message:"must have required property '"+"listened"+"'"};
if(vErrors === null){
vErrors = [err97];
}
else {
vErrors.push(err97);
}
errors++;
}
for(const key7 in data35){
if(!(((((key7 === "status") || (key7 === "checks")) || (key7 === "reason")) || (key7 === "listened")) || (key7 === "listening"))){
const err98 = {instancePath:instancePath+"/layers/audio",schemaPath:"#/properties/layers/properties/audio/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err98];
}
else {
vErrors.push(err98);
}
errors++;
}
}
if(data35.status !== undefined){
let data36 = data35.status;
if(!(((data36 === "pass") || (data36 === "fail")) || (data36 === "unjudgeable"))){
const err99 = {instancePath:instancePath+"/layers/audio/status",schemaPath:"#/properties/layers/properties/audio/properties/status/enum",keyword:"enum",params:{allowedValues: schema35.properties.layers.properties.audio.properties.status.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err99];
}
else {
vErrors.push(err99);
}
errors++;
}
}
if(data35.checks !== undefined){
let data37 = data35.checks;
if(Array.isArray(data37)){
if(data37.length > 100){
const err100 = {instancePath:instancePath+"/layers/audio/checks",schemaPath:"#/properties/layers/properties/audio/properties/checks/maxItems",keyword:"maxItems",params:{limit: 100},message:"must NOT have more than 100 items"};
if(vErrors === null){
vErrors = [err100];
}
else {
vErrors.push(err100);
}
errors++;
}
const len5 = data37.length;
for(let i5=0; i5<len5; i5++){
let data38 = data37[i5];
if(typeof data38 === "string"){
if(func2(data38) < 1){
const err101 = {instancePath:instancePath+"/layers/audio/checks/" + i5,schemaPath:"#/properties/layers/properties/audio/properties/checks/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err101];
}
else {
vErrors.push(err101);
}
errors++;
}
}
else {
const err102 = {instancePath:instancePath+"/layers/audio/checks/" + i5,schemaPath:"#/properties/layers/properties/audio/properties/checks/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err102];
}
else {
vErrors.push(err102);
}
errors++;
}
}
}
else {
const err103 = {instancePath:instancePath+"/layers/audio/checks",schemaPath:"#/properties/layers/properties/audio/properties/checks/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err103];
}
else {
vErrors.push(err103);
}
errors++;
}
}
if(data35.reason !== undefined){
let data39 = data35.reason;
if(typeof data39 === "string"){
if(func2(data39) < 1){
const err104 = {instancePath:instancePath+"/layers/audio/reason",schemaPath:"#/properties/layers/properties/audio/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err104];
}
else {
vErrors.push(err104);
}
errors++;
}
}
else {
const err105 = {instancePath:instancePath+"/layers/audio/reason",schemaPath:"#/properties/layers/properties/audio/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err105];
}
else {
vErrors.push(err105);
}
errors++;
}
}
if(data35.listened !== undefined){
if(typeof data35.listened !== "boolean"){
const err106 = {instancePath:instancePath+"/layers/audio/listened",schemaPath:"#/properties/layers/properties/audio/properties/listened/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
if(vErrors === null){
vErrors = [err106];
}
else {
vErrors.push(err106);
}
errors++;
}
}
if(data35.listening !== undefined){
let data41 = data35.listening;
if(data41 && typeof data41 == "object" && !Array.isArray(data41)){
if(data41.artifact_ref === undefined){
const err107 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "artifact_ref"},message:"must have required property '"+"artifact_ref"+"'"};
if(vErrors === null){
vErrors = [err107];
}
else {
vErrors.push(err107);
}
errors++;
}
if(data41.project_id === undefined){
const err108 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err108];
}
else {
vErrors.push(err108);
}
errors++;
}
if(data41.timeline_id === undefined){
const err109 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err109];
}
else {
vErrors.push(err109);
}
errors++;
}
if(data41.revision === undefined){
const err110 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};
if(vErrors === null){
vErrors = [err110];
}
else {
vErrors.push(err110);
}
errors++;
}
for(const key8 in data41){
if(!((((key8 === "artifact_ref") || (key8 === "project_id")) || (key8 === "timeline_id")) || (key8 === "revision"))){
const err111 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err111];
}
else {
vErrors.push(err111);
}
errors++;
}
}
if(data41.artifact_ref !== undefined){
let data42 = data41.artifact_ref;
if(typeof data42 === "string"){
if(func2(data42) < 1){
const err112 = {instancePath:instancePath+"/layers/audio/listening/artifact_ref",schemaPath:"#/$defs/observation/properties/artifact_ref/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err112];
}
else {
vErrors.push(err112);
}
errors++;
}
}
else {
const err113 = {instancePath:instancePath+"/layers/audio/listening/artifact_ref",schemaPath:"#/$defs/observation/properties/artifact_ref/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err113];
}
else {
vErrors.push(err113);
}
errors++;
}
}
if(data41.project_id !== undefined){
let data43 = data41.project_id;
if(typeof data43 === "string"){
if(func2(data43) < 1){
const err114 = {instancePath:instancePath+"/layers/audio/listening/project_id",schemaPath:"#/$defs/observation/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err114];
}
else {
vErrors.push(err114);
}
errors++;
}
}
else {
const err115 = {instancePath:instancePath+"/layers/audio/listening/project_id",schemaPath:"#/$defs/observation/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err115];
}
else {
vErrors.push(err115);
}
errors++;
}
}
if(data41.timeline_id !== undefined){
let data44 = data41.timeline_id;
if(typeof data44 === "string"){
if(func2(data44) < 1){
const err116 = {instancePath:instancePath+"/layers/audio/listening/timeline_id",schemaPath:"#/$defs/observation/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err116];
}
else {
vErrors.push(err116);
}
errors++;
}
}
else {
const err117 = {instancePath:instancePath+"/layers/audio/listening/timeline_id",schemaPath:"#/$defs/observation/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err117];
}
else {
vErrors.push(err117);
}
errors++;
}
}
if(data41.revision !== undefined){
let data45 = data41.revision;
if(!(((typeof data45 == "number") && (!(data45 % 1) && !isNaN(data45))) && (isFinite(data45)))){
const err118 = {instancePath:instancePath+"/layers/audio/listening/revision",schemaPath:"#/$defs/observation/properties/revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err118];
}
else {
vErrors.push(err118);
}
errors++;
}
if((typeof data45 == "number") && (isFinite(data45))){
if(data45 < 0 || isNaN(data45)){
const err119 = {instancePath:instancePath+"/layers/audio/listening/revision",schemaPath:"#/$defs/observation/properties/revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err119];
}
else {
vErrors.push(err119);
}
errors++;
}
}
}
}
else {
const err120 = {instancePath:instancePath+"/layers/audio/listening",schemaPath:"#/$defs/observation/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err120];
}
else {
vErrors.push(err120);
}
errors++;
}
}
}
else {
const err121 = {instancePath:instancePath+"/layers/audio",schemaPath:"#/properties/layers/properties/audio/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err121];
}
else {
vErrors.push(err121);
}
errors++;
}
}
}
else {
const err122 = {instancePath:instancePath+"/layers",schemaPath:"#/properties/layers/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err122];
}
else {
vErrors.push(err122);
}
errors++;
}
}
if(data.hard_failures !== undefined){
let data46 = data.hard_failures;
if(Array.isArray(data46)){
if(data46.length > 500){
const err123 = {instancePath:instancePath+"/hard_failures",schemaPath:"#/properties/hard_failures/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err123];
}
else {
vErrors.push(err123);
}
errors++;
}
const len6 = data46.length;
for(let i6=0; i6<len6; i6++){
let data47 = data46[i6];
if(typeof data47 === "string"){
if(func2(data47) < 1){
const err124 = {instancePath:instancePath+"/hard_failures/" + i6,schemaPath:"#/properties/hard_failures/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err124];
}
else {
vErrors.push(err124);
}
errors++;
}
}
else {
const err125 = {instancePath:instancePath+"/hard_failures/" + i6,schemaPath:"#/properties/hard_failures/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err125];
}
else {
vErrors.push(err125);
}
errors++;
}
}
let i7 = data46.length;
let j0;
if(i7 > 1){
const indices0 = {};
for(;i7--;){
let item0 = data46[i7];
if(typeof item0 !== "string"){
continue;
}
if(typeof indices0[item0] == "number"){
j0 = indices0[item0];
const err126 = {instancePath:instancePath+"/hard_failures",schemaPath:"#/properties/hard_failures/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i7+" are identical)"};
if(vErrors === null){
vErrors = [err126];
}
else {
vErrors.push(err126);
}
errors++;
break;
}
indices0[item0] = i7;
}
}
}
else {
const err127 = {instancePath:instancePath+"/hard_failures",schemaPath:"#/properties/hard_failures/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err127];
}
else {
vErrors.push(err127);
}
errors++;
}
}
if(data.next_action !== undefined){
let data48 = data.next_action;
if(data48 && typeof data48 == "object" && !Array.isArray(data48)){
if(data48.kind === undefined){
const err128 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};
if(vErrors === null){
vErrors = [err128];
}
else {
vErrors.push(err128);
}
errors++;
}
for(const key9 in data48){
if(!(((key9 === "kind") || (key9 === "after_seconds")) || (key9 === "reason"))){
const err129 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key9},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err129];
}
else {
vErrors.push(err129);
}
errors++;
}
}
if(data48.kind !== undefined){
let data49 = data48.kind;
if(!((((((((data49 === "read_back") || (data49 === "confirm_receipt")) || (data49 === "poll")) || (data49 === "wait")) || (data49 === "retry")) || (data49 === "reinspect")) || (data49 === "ask_user")) || (data49 === "deliver"))){
const err130 = {instancePath:instancePath+"/next_action/kind",schemaPath:"#/properties/next_action/properties/kind/enum",keyword:"enum",params:{allowedValues: schema35.properties.next_action.properties.kind.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err130];
}
else {
vErrors.push(err130);
}
errors++;
}
}
if(data48.after_seconds !== undefined){
let data50 = data48.after_seconds;
if(!(((typeof data50 == "number") && (!(data50 % 1) && !isNaN(data50))) && (isFinite(data50)))){
const err131 = {instancePath:instancePath+"/next_action/after_seconds",schemaPath:"#/properties/next_action/properties/after_seconds/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err131];
}
else {
vErrors.push(err131);
}
errors++;
}
if((typeof data50 == "number") && (isFinite(data50))){
if(data50 < 0 || isNaN(data50)){
const err132 = {instancePath:instancePath+"/next_action/after_seconds",schemaPath:"#/properties/next_action/properties/after_seconds/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err132];
}
else {
vErrors.push(err132);
}
errors++;
}
}
}
if(data48.reason !== undefined){
let data51 = data48.reason;
if(typeof data51 === "string"){
if(func2(data51) < 1){
const err133 = {instancePath:instancePath+"/next_action/reason",schemaPath:"#/properties/next_action/properties/reason/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err133];
}
else {
vErrors.push(err133);
}
errors++;
}
}
else {
const err134 = {instancePath:instancePath+"/next_action/reason",schemaPath:"#/properties/next_action/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err134];
}
else {
vErrors.push(err134);
}
errors++;
}
}
}
else {
const err135 = {instancePath:instancePath+"/next_action",schemaPath:"#/properties/next_action/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err135];
}
else {
vErrors.push(err135);
}
errors++;
}
}
}
else {
const err136 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err136];
}
else {
vErrors.push(err136);
}
errors++;
}
validate23.errors = vErrors;
return errors === 0;
}
validate23.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
export const plan_context = validate24;
const schema38 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/plan-context.schema.json","type":"object","additionalProperties":false,"required":["plan_id","project_id","timeline_id","base_revision","mode","preserve","delete_refs","authorized_actions"],"properties":{"plan_id":{"type":"string","minLength":1},"project_id":{"type":"string","minLength":1},"timeline_id":{"type":"string","minLength":1},"base_revision":{"type":"integer","minimum":0},"mode":{"enum":["mechanical","local_edit","full_assembly"]},"preserve":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"delete_refs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"maxItems":500},"authorized_actions":{"type":"array","items":{"type":"string","pattern":"^aixcut_[a-z]+\\.[a-z_]+$"},"uniqueItems":true,"maxItems":500}}};
const pattern6 = new RegExp("^aixcut_[a-z]+\\.[a-z_]+$", "u");
function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/plan-context.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate24.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.plan_id === undefined){
const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "plan_id"},message:"must have required property '"+"plan_id"+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
if(data.project_id === undefined){
const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "project_id"},message:"must have required property '"+"project_id"+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
if(data.timeline_id === undefined){
const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "timeline_id"},message:"must have required property '"+"timeline_id"+"'"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
if(data.base_revision === undefined){
const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "base_revision"},message:"must have required property '"+"base_revision"+"'"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
if(data.mode === undefined){
const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
if(data.preserve === undefined){
const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "preserve"},message:"must have required property '"+"preserve"+"'"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
if(data.delete_refs === undefined){
const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "delete_refs"},message:"must have required property '"+"delete_refs"+"'"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
if(data.authorized_actions === undefined){
const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "authorized_actions"},message:"must have required property '"+"authorized_actions"+"'"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
for(const key0 in data){
if(!((((((((key0 === "plan_id") || (key0 === "project_id")) || (key0 === "timeline_id")) || (key0 === "base_revision")) || (key0 === "mode")) || (key0 === "preserve")) || (key0 === "delete_refs")) || (key0 === "authorized_actions"))){
const err8 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
}
if(data.plan_id !== undefined){
let data0 = data.plan_id;
if(typeof data0 === "string"){
if(func2(data0) < 1){
const err9 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
}
else {
const err10 = {instancePath:instancePath+"/plan_id",schemaPath:"#/properties/plan_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
}
if(data.project_id !== undefined){
let data1 = data.project_id;
if(typeof data1 === "string"){
if(func2(data1) < 1){
const err11 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
}
else {
const err12 = {instancePath:instancePath+"/project_id",schemaPath:"#/properties/project_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
}
if(data.timeline_id !== undefined){
let data2 = data.timeline_id;
if(typeof data2 === "string"){
if(func2(data2) < 1){
const err13 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
}
else {
const err14 = {instancePath:instancePath+"/timeline_id",schemaPath:"#/properties/timeline_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
}
if(data.base_revision !== undefined){
let data3 = data.base_revision;
if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){
const err15 = {instancePath:instancePath+"/base_revision",schemaPath:"#/properties/base_revision/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
if((typeof data3 == "number") && (isFinite(data3))){
if(data3 < 0 || isNaN(data3)){
const err16 = {instancePath:instancePath+"/base_revision",schemaPath:"#/properties/base_revision/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
}
}
if(data.mode !== undefined){
let data4 = data.mode;
if(!(((data4 === "mechanical") || (data4 === "local_edit")) || (data4 === "full_assembly"))){
const err17 = {instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema38.properties.mode.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
}
if(data.preserve !== undefined){
let data5 = data.preserve;
if(Array.isArray(data5)){
if(data5.length > 500){
const err18 = {instancePath:instancePath+"/preserve",schemaPath:"#/properties/preserve/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
const len0 = data5.length;
for(let i0=0; i0<len0; i0++){
let data6 = data5[i0];
if(typeof data6 === "string"){
if(func2(data6) < 1){
const err19 = {instancePath:instancePath+"/preserve/" + i0,schemaPath:"#/properties/preserve/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
else {
const err20 = {instancePath:instancePath+"/preserve/" + i0,schemaPath:"#/properties/preserve/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
let i1 = data5.length;
let j0;
if(i1 > 1){
const indices0 = {};
for(;i1--;){
let item0 = data5[i1];
if(typeof item0 !== "string"){
continue;
}
if(typeof indices0[item0] == "number"){
j0 = indices0[item0];
const err21 = {instancePath:instancePath+"/preserve",schemaPath:"#/properties/preserve/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
break;
}
indices0[item0] = i1;
}
}
}
else {
const err22 = {instancePath:instancePath+"/preserve",schemaPath:"#/properties/preserve/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
if(data.delete_refs !== undefined){
let data7 = data.delete_refs;
if(Array.isArray(data7)){
if(data7.length > 500){
const err23 = {instancePath:instancePath+"/delete_refs",schemaPath:"#/properties/delete_refs/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
const len1 = data7.length;
for(let i2=0; i2<len1; i2++){
let data8 = data7[i2];
if(typeof data8 === "string"){
if(func2(data8) < 1){
const err24 = {instancePath:instancePath+"/delete_refs/" + i2,schemaPath:"#/properties/delete_refs/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
else {
const err25 = {instancePath:instancePath+"/delete_refs/" + i2,schemaPath:"#/properties/delete_refs/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
let i3 = data7.length;
let j1;
if(i3 > 1){
const indices1 = {};
for(;i3--;){
let item1 = data7[i3];
if(typeof item1 !== "string"){
continue;
}
if(typeof indices1[item1] == "number"){
j1 = indices1[item1];
const err26 = {instancePath:instancePath+"/delete_refs",schemaPath:"#/properties/delete_refs/uniqueItems",keyword:"uniqueItems",params:{i: i3, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i3+" are identical)"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
break;
}
indices1[item1] = i3;
}
}
}
else {
const err27 = {instancePath:instancePath+"/delete_refs",schemaPath:"#/properties/delete_refs/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
if(data.authorized_actions !== undefined){
let data9 = data.authorized_actions;
if(Array.isArray(data9)){
if(data9.length > 500){
const err28 = {instancePath:instancePath+"/authorized_actions",schemaPath:"#/properties/authorized_actions/maxItems",keyword:"maxItems",params:{limit: 500},message:"must NOT have more than 500 items"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
const len2 = data9.length;
for(let i4=0; i4<len2; i4++){
let data10 = data9[i4];
if(typeof data10 === "string"){
if(!pattern6.test(data10)){
const err29 = {instancePath:instancePath+"/authorized_actions/" + i4,schemaPath:"#/properties/authorized_actions/items/pattern",keyword:"pattern",params:{pattern: "^aixcut_[a-z]+\\.[a-z_]+$"},message:"must match pattern \""+"^aixcut_[a-z]+\\.[a-z_]+$"+"\""};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
else {
const err30 = {instancePath:instancePath+"/authorized_actions/" + i4,schemaPath:"#/properties/authorized_actions/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
}
let i5 = data9.length;
let j2;
if(i5 > 1){
const indices2 = {};
for(;i5--;){
let item2 = data9[i5];
if(typeof item2 !== "string"){
continue;
}
if(typeof indices2[item2] == "number"){
j2 = indices2[item2];
const err31 = {instancePath:instancePath+"/authorized_actions",schemaPath:"#/properties/authorized_actions/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j2},message:"must NOT have duplicate items (items ## "+j2+" and "+i5+" are identical)"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
break;
}
indices2[item2] = i5;
}
}
}
else {
const err32 = {instancePath:instancePath+"/authorized_actions",schemaPath:"#/properties/authorized_actions/type",keyword:"type",params:{type: "array"},message:"must be array"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
}
}
else {
const err33 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
validate24.errors = vErrors;
return errors === 0;
}
validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
export const trace_event = validate25;
const schema39 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://aixcut.com/plugin-core/trace-event.schema.json","type":"object","additionalProperties":false,"required":["type","host","run_id","seq"],"properties":{"type":{"enum":["intent_received","skill_candidate","skill_loaded","capability_snapshot","tool_call","receipt","job_poll","checkpoint_saved","evidence_collected","delivery_reported"]},"host":{"enum":["codex","workbuddy"]},"run_id":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"tool":{"type":"string","minLength":1,"maxLength":128},"action":{"type":"string","minLength":1,"maxLength":128},"view":{"type":"string","minLength":1,"maxLength":128},"purpose":{"enum":["inspect","read_back","write","mutation","submit","poll","status","receipt","capability"]},"duration_ms":{"type":"integer","minimum":0},"input_fingerprint":{"type":"string","minLength":1},"idempotency_key":{"type":"string","minLength":1},"operation_id":{"type":"string","minLength":1},"mutation_id":{"type":"string","minLength":1},"job_id":{"type":"string","minLength":1},"revision_before":{"type":"integer","minimum":0},"revision_after":{"type":"integer","minimum":0},"status":{"type":"string","minLength":1},"cost_credits":{"type":"number","minimum":0},"synthetic":{"type":"boolean"}}};
function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
/*# sourceURL="https://aixcut.com/plugin-core/trace-event.schema.json" */;
let vErrors = null;
let errors = 0;
const evaluated0 = validate25.evaluated;
if(evaluated0.dynamicProps){
evaluated0.props = undefined;
}
if(evaluated0.dynamicItems){
evaluated0.items = undefined;
}
if(data && typeof data == "object" && !Array.isArray(data)){
if(data.type === undefined){
const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};
if(vErrors === null){
vErrors = [err0];
}
else {
vErrors.push(err0);
}
errors++;
}
if(data.host === undefined){
const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "host"},message:"must have required property '"+"host"+"'"};
if(vErrors === null){
vErrors = [err1];
}
else {
vErrors.push(err1);
}
errors++;
}
if(data.run_id === undefined){
const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "run_id"},message:"must have required property '"+"run_id"+"'"};
if(vErrors === null){
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
if(data.seq === undefined){
const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "seq"},message:"must have required property '"+"seq"+"'"};
if(vErrors === null){
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
for(const key0 in data){
if(!(func1.call(schema39.properties, key0))){
const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
if(vErrors === null){
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
}
if(data.type !== undefined){
let data0 = data.type;
if(!((((((((((data0 === "intent_received") || (data0 === "skill_candidate")) || (data0 === "skill_loaded")) || (data0 === "capability_snapshot")) || (data0 === "tool_call")) || (data0 === "receipt")) || (data0 === "job_poll")) || (data0 === "checkpoint_saved")) || (data0 === "evidence_collected")) || (data0 === "delivery_reported"))){
const err5 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema39.properties.type.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err5];
}
else {
vErrors.push(err5);
}
errors++;
}
}
if(data.host !== undefined){
let data1 = data.host;
if(!((data1 === "codex") || (data1 === "workbuddy"))){
const err6 = {instancePath:instancePath+"/host",schemaPath:"#/properties/host/enum",keyword:"enum",params:{allowedValues: schema39.properties.host.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err6];
}
else {
vErrors.push(err6);
}
errors++;
}
}
if(data.run_id !== undefined){
let data2 = data.run_id;
if(typeof data2 === "string"){
if(func2(data2) < 1){
const err7 = {instancePath:instancePath+"/run_id",schemaPath:"#/properties/run_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err7];
}
else {
vErrors.push(err7);
}
errors++;
}
}
else {
const err8 = {instancePath:instancePath+"/run_id",schemaPath:"#/properties/run_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err8];
}
else {
vErrors.push(err8);
}
errors++;
}
}
if(data.seq !== undefined){
let data3 = data.seq;
if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){
const err9 = {instancePath:instancePath+"/seq",schemaPath:"#/properties/seq/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err9];
}
else {
vErrors.push(err9);
}
errors++;
}
if((typeof data3 == "number") && (isFinite(data3))){
if(data3 < 1 || isNaN(data3)){
const err10 = {instancePath:instancePath+"/seq",schemaPath:"#/properties/seq/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
if(vErrors === null){
vErrors = [err10];
}
else {
vErrors.push(err10);
}
errors++;
}
}
}
if(data.tool !== undefined){
let data4 = data.tool;
if(typeof data4 === "string"){
if(func2(data4) > 128){
const err11 = {instancePath:instancePath+"/tool",schemaPath:"#/properties/tool/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};
if(vErrors === null){
vErrors = [err11];
}
else {
vErrors.push(err11);
}
errors++;
}
if(func2(data4) < 1){
const err12 = {instancePath:instancePath+"/tool",schemaPath:"#/properties/tool/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err12];
}
else {
vErrors.push(err12);
}
errors++;
}
}
else {
const err13 = {instancePath:instancePath+"/tool",schemaPath:"#/properties/tool/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err13];
}
else {
vErrors.push(err13);
}
errors++;
}
}
if(data.action !== undefined){
let data5 = data.action;
if(typeof data5 === "string"){
if(func2(data5) > 128){
const err14 = {instancePath:instancePath+"/action",schemaPath:"#/properties/action/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};
if(vErrors === null){
vErrors = [err14];
}
else {
vErrors.push(err14);
}
errors++;
}
if(func2(data5) < 1){
const err15 = {instancePath:instancePath+"/action",schemaPath:"#/properties/action/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err15];
}
else {
vErrors.push(err15);
}
errors++;
}
}
else {
const err16 = {instancePath:instancePath+"/action",schemaPath:"#/properties/action/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err16];
}
else {
vErrors.push(err16);
}
errors++;
}
}
if(data.view !== undefined){
let data6 = data.view;
if(typeof data6 === "string"){
if(func2(data6) > 128){
const err17 = {instancePath:instancePath+"/view",schemaPath:"#/properties/view/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};
if(vErrors === null){
vErrors = [err17];
}
else {
vErrors.push(err17);
}
errors++;
}
if(func2(data6) < 1){
const err18 = {instancePath:instancePath+"/view",schemaPath:"#/properties/view/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err18];
}
else {
vErrors.push(err18);
}
errors++;
}
}
else {
const err19 = {instancePath:instancePath+"/view",schemaPath:"#/properties/view/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err19];
}
else {
vErrors.push(err19);
}
errors++;
}
}
if(data.purpose !== undefined){
let data7 = data.purpose;
if(!(((((((((data7 === "inspect") || (data7 === "read_back")) || (data7 === "write")) || (data7 === "mutation")) || (data7 === "submit")) || (data7 === "poll")) || (data7 === "status")) || (data7 === "receipt")) || (data7 === "capability"))){
const err20 = {instancePath:instancePath+"/purpose",schemaPath:"#/properties/purpose/enum",keyword:"enum",params:{allowedValues: schema39.properties.purpose.enum},message:"must be equal to one of the allowed values"};
if(vErrors === null){
vErrors = [err20];
}
else {
vErrors.push(err20);
}
errors++;
}
}
if(data.duration_ms !== undefined){
let data8 = data.duration_ms;
if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){
const err21 = {instancePath:instancePath+"/duration_ms",schemaPath:"#/properties/duration_ms/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err21];
}
else {
vErrors.push(err21);
}
errors++;
}
if((typeof data8 == "number") && (isFinite(data8))){
if(data8 < 0 || isNaN(data8)){
const err22 = {instancePath:instancePath+"/duration_ms",schemaPath:"#/properties/duration_ms/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err22];
}
else {
vErrors.push(err22);
}
errors++;
}
}
}
if(data.input_fingerprint !== undefined){
let data9 = data.input_fingerprint;
if(typeof data9 === "string"){
if(func2(data9) < 1){
const err23 = {instancePath:instancePath+"/input_fingerprint",schemaPath:"#/properties/input_fingerprint/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err23];
}
else {
vErrors.push(err23);
}
errors++;
}
}
else {
const err24 = {instancePath:instancePath+"/input_fingerprint",schemaPath:"#/properties/input_fingerprint/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err24];
}
else {
vErrors.push(err24);
}
errors++;
}
}
if(data.idempotency_key !== undefined){
let data10 = data.idempotency_key;
if(typeof data10 === "string"){
if(func2(data10) < 1){
const err25 = {instancePath:instancePath+"/idempotency_key",schemaPath:"#/properties/idempotency_key/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err25];
}
else {
vErrors.push(err25);
}
errors++;
}
}
else {
const err26 = {instancePath:instancePath+"/idempotency_key",schemaPath:"#/properties/idempotency_key/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err26];
}
else {
vErrors.push(err26);
}
errors++;
}
}
if(data.operation_id !== undefined){
let data11 = data.operation_id;
if(typeof data11 === "string"){
if(func2(data11) < 1){
const err27 = {instancePath:instancePath+"/operation_id",schemaPath:"#/properties/operation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err27];
}
else {
vErrors.push(err27);
}
errors++;
}
}
else {
const err28 = {instancePath:instancePath+"/operation_id",schemaPath:"#/properties/operation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err28];
}
else {
vErrors.push(err28);
}
errors++;
}
}
if(data.mutation_id !== undefined){
let data12 = data.mutation_id;
if(typeof data12 === "string"){
if(func2(data12) < 1){
const err29 = {instancePath:instancePath+"/mutation_id",schemaPath:"#/properties/mutation_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err29];
}
else {
vErrors.push(err29);
}
errors++;
}
}
else {
const err30 = {instancePath:instancePath+"/mutation_id",schemaPath:"#/properties/mutation_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err30];
}
else {
vErrors.push(err30);
}
errors++;
}
}
if(data.job_id !== undefined){
let data13 = data.job_id;
if(typeof data13 === "string"){
if(func2(data13) < 1){
const err31 = {instancePath:instancePath+"/job_id",schemaPath:"#/properties/job_id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err31];
}
else {
vErrors.push(err31);
}
errors++;
}
}
else {
const err32 = {instancePath:instancePath+"/job_id",schemaPath:"#/properties/job_id/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err32];
}
else {
vErrors.push(err32);
}
errors++;
}
}
if(data.revision_before !== undefined){
let data14 = data.revision_before;
if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){
const err33 = {instancePath:instancePath+"/revision_before",schemaPath:"#/properties/revision_before/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err33];
}
else {
vErrors.push(err33);
}
errors++;
}
if((typeof data14 == "number") && (isFinite(data14))){
if(data14 < 0 || isNaN(data14)){
const err34 = {instancePath:instancePath+"/revision_before",schemaPath:"#/properties/revision_before/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err34];
}
else {
vErrors.push(err34);
}
errors++;
}
}
}
if(data.revision_after !== undefined){
let data15 = data.revision_after;
if(!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))){
const err35 = {instancePath:instancePath+"/revision_after",schemaPath:"#/properties/revision_after/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
if(vErrors === null){
vErrors = [err35];
}
else {
vErrors.push(err35);
}
errors++;
}
if((typeof data15 == "number") && (isFinite(data15))){
if(data15 < 0 || isNaN(data15)){
const err36 = {instancePath:instancePath+"/revision_after",schemaPath:"#/properties/revision_after/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err36];
}
else {
vErrors.push(err36);
}
errors++;
}
}
}
if(data.status !== undefined){
let data16 = data.status;
if(typeof data16 === "string"){
if(func2(data16) < 1){
const err37 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
if(vErrors === null){
vErrors = [err37];
}
else {
vErrors.push(err37);
}
errors++;
}
}
else {
const err38 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/type",keyword:"type",params:{type: "string"},message:"must be string"};
if(vErrors === null){
vErrors = [err38];
}
else {
vErrors.push(err38);
}
errors++;
}
}
if(data.cost_credits !== undefined){
let data17 = data.cost_credits;
if((typeof data17 == "number") && (isFinite(data17))){
if(data17 < 0 || isNaN(data17)){
const err39 = {instancePath:instancePath+"/cost_credits",schemaPath:"#/properties/cost_credits/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};
if(vErrors === null){
vErrors = [err39];
}
else {
vErrors.push(err39);
}
errors++;
}
}
else {
const err40 = {instancePath:instancePath+"/cost_credits",schemaPath:"#/properties/cost_credits/type",keyword:"type",params:{type: "number"},message:"must be number"};
if(vErrors === null){
vErrors = [err40];
}
else {
vErrors.push(err40);
}
errors++;
}
}
if(data.synthetic !== undefined){
if(typeof data.synthetic !== "boolean"){
const err41 = {instancePath:instancePath+"/synthetic",schemaPath:"#/properties/synthetic/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
if(vErrors === null){
vErrors = [err41];
}
else {
vErrors.push(err41);
}
errors++;
}
}
}
else {
const err42 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
if(vErrors === null){
vErrors = [err42];
}
else {
vErrors.push(err42);
}
errors++;
}
validate25.errors = vErrors;
return errors === 0;
}
validate25.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
SHA-256: 26449333a067472cc7f41e281cc62a7c0c585c96f6ba233145ae4b83e2474d0e