{"version":3,"file":"entity_state.schema.cjs","sources":["../../../../../src/schema/internal/entity_state/entity_state.schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport zodToCamelCase from \"zod-to-camel-case\";\n\nimport { timestampsSchema } from \"@/schema/public/components/base/base.schema\";\n\nexport const entityStatusSchema = z.enum([\n  \"api_neutral\",\n  \"api_queued\",\n  \"api_in_progress\",\n  \"api_failed\",\n  \"ingest_in_progress\",\n  \"ingest_failed\",\n  \"ingest_complete\",\n]);\nexport type EntityStatus = z.infer<typeof entityStatusSchema>;\n\nexport const entityTypeSchema = z.enum([\n  \"lesson\",\n  \"quiz\",\n  \"worksheet_answers\",\n  \"downloadable_file\",\n  \"supplementary_resource\",\n  \"worksheet\",\n  \"slidedeck\",\n  \"lesson_guide\",\n  \"media_clip\",\n  \"video\",\n  \"videocaption\",\n]);\nexport type EntityType = z.infer<typeof entityTypeSchema>;\n\nexport const entityStateSchema = timestampsSchema.extend({\n  entity_id: z.number(),\n  entity_type: entityTypeSchema,\n  entity_status: entityStatusSchema.default(\"api_neutral\"),\n  last_error_location: z.string().nullable(),\n  last_error_message: z.string().nullable(),\n  last_error_timestamp: z.string().nullable(),\n  last_ingest_id: z.uuid().nullable(),\n});\nexport type EntityState = z.infer<typeof entityStateSchema>;\n\nexport const entityStateSchemaCamel = zodToCamelCase(entityStateSchema);\nexport type EntityStateCamel = z.infer<typeof entityStateSchemaCamel>;\n"],"names":["entityStatusSchema","z","enum","entityTypeSchema","entityStateSchema","timestampsSchema","extend","entity_id","number","entity_type","entity_status","default","last_error_location","string","nullable","last_error_message","last_error_timestamp","last_ingest_id","uuid","entityStateSchemaCamel","zodToCamelCase"],"mappings":"yLAKO,MAAMA,EAAqBC,EAAAA,EAAEC,KAAK,CACvC,cACA,aACA,kBACA,aACA,qBACA,gBACA,oBAIWC,EAAmBF,EAAAA,EAAEC,KAAK,CACrC,SACA,OACA,oBACA,oBACA,yBACA,YACA,YACA,eACA,aACA,QACA,iBAIWE,EAAoBC,EAAAA,iBAAiBC,OAAO,CACvDC,UAAWN,EAAAA,EAAEO,SACbC,YAAaN,EACbO,cAAeV,EAAmBW,QAAQ,eAC1CC,oBAAqBX,EAAAA,EAAEY,SAASC,WAChCC,mBAAoBd,EAAAA,EAAEY,SAASC,WAC/BE,qBAAsBf,EAAAA,EAAEY,SAASC,WACjCG,eAAgBhB,EAAAA,EAAEiB,OAAOJ,aAIdK,EAAyBC,EAAAA,QAAehB"}