@timeback/sdk 0.1.11 → 0.1.13-beta.20260219190739
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-g67efaph.js → chunk-cxr7wpbj.js} +1 -1
- package/dist/chunk-pfkj4q4q.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -24
- package/dist/shared/types.d.ts +16 -1
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.ts +27 -1
- package/package.json +5 -5
- package/dist/chunk-sgcwg4j6.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Y}from"./chunk-
|
|
1
|
+
import{c as Y}from"./chunk-pfkj4q4q.js";import{O as V}from"./chunk-edk3nfj7.js";var{existsSync:ie}=(()=>({}));function b(e){if(typeof e!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function R(e,r){var i="",t=0,l=-1,n=0,s;for(var f=0;f<=e.length;++f){if(f<e.length)s=e.charCodeAt(f);else if(s===47)break;else s=47;if(s===47){if(l===f-1||n===1);else if(l!==f-1&&n===2){if(i.length<2||t!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var o=i.lastIndexOf("/");if(o!==i.length-1){if(o===-1)i="",t=0;else i=i.slice(0,o),t=i.length-1-i.lastIndexOf("/");l=f,n=0;continue}}else if(i.length===2||i.length===1){i="",t=0,l=f,n=0;continue}}if(r){if(i.length>0)i+="/..";else i="..";t=2}}else{if(i.length>0)i+="/"+e.slice(l+1,f);else i=e.slice(l+1,f);t=f-l-1}l=f,n=0}else if(s===46&&n!==-1)++n;else n=-1}return i}function E(e,r){var i=r.dir||r.root,t=r.base||(r.name||"")+(r.ext||"");if(!i)return t;if(i===r.root)return i+t;return i+e+t}function d(){var e="",r=!1,i;for(var t=arguments.length-1;t>=-1&&!r;t--){var l;if(t>=0)l=arguments[t];else{if(i===void 0)i=process.cwd();l=i}if(b(l),l.length===0)continue;e=l+"/"+e,r=l.charCodeAt(0)===47}if(e=R(e,!r),r)if(e.length>0)return"/"+e;else return"/";else if(e.length>0)return e;else return"."}function w(e){if(b(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;if(e=R(e,!r),e.length===0&&!r)e=".";if(e.length>0&&i)e+="/";if(r)return"/"+e;return e}function G(e){return b(e),e.length>0&&e.charCodeAt(0)===47}function $(){if(arguments.length===0)return".";var e;for(var r=0;r<arguments.length;++r){var i=arguments[r];if(b(i),i.length>0)if(e===void 0)e=i;else e+="/"+i}if(e===void 0)return".";return w(e)}function y(e,r){if(b(e),b(r),e===r)return"";if(e=d(e),r=d(r),e===r)return"";var i=1;for(;i<e.length;++i)if(e.charCodeAt(i)!==47)break;var t=e.length,l=t-i,n=1;for(;n<r.length;++n)if(r.charCodeAt(n)!==47)break;var s=r.length,f=s-n,o=l<f?l:f,a=-1,u=0;for(;u<=o;++u){if(u===o){if(f>o){if(r.charCodeAt(n+u)===47)return r.slice(n+u+1);else if(u===0)return r.slice(n+u)}else if(l>o){if(e.charCodeAt(i+u)===47)a=u;else if(u===0)a=0}break}var k=e.charCodeAt(i+u),M=r.charCodeAt(n+u);if(k!==M)break;else if(k===47)a=u}var m="";for(u=i+a+1;u<=t;++u)if(u===t||e.charCodeAt(u)===47)if(m.length===0)m+="..";else m+="/..";if(m.length>0)return m+r.slice(n+a);else{if(n+=a,r.charCodeAt(n)===47)++n;return r.slice(n)}}function z(e){return e}function H(e){if(b(e),e.length===0)return".";var r=e.charCodeAt(0),i=r===47,t=-1,l=!0;for(var n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!l){t=n;break}}else l=!1;if(t===-1)return i?"/":".";if(i&&t===1)return"//";return e.slice(0,t)}function h(e,r){if(r!==void 0&&typeof r!=="string")throw TypeError('"ext" argument must be a string');b(e);var i=0,t=-1,l=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,f=-1;for(n=e.length-1;n>=0;--n){var o=e.charCodeAt(n);if(o===47){if(!l){i=n+1;break}}else{if(f===-1)l=!1,f=n+1;if(s>=0)if(o===r.charCodeAt(s)){if(--s===-1)t=n}else s=-1,t=f}}if(i===t)t=f;else if(t===-1)t=e.length;return e.slice(i,t)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!l){i=n+1;break}}else if(t===-1)l=!1,t=n+1;if(t===-1)return"";return e.slice(i,t)}}function C(e){b(e);var r=-1,i=0,t=-1,l=!0,n=0;for(var s=e.length-1;s>=0;--s){var f=e.charCodeAt(s);if(f===47){if(!l){i=s+1;break}continue}if(t===-1)l=!1,t=s+1;if(f===46){if(r===-1)r=s;else if(n!==1)n=1}else if(r!==-1)n=-1}if(r===-1||t===-1||n===0||n===1&&r===t-1&&r===i+1)return"";return e.slice(r,t)}function U(e){if(e===null||typeof e!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return E("/",e)}function q(e){b(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),t=i===47,l;if(t)r.root="/",l=1;else l=0;var n=-1,s=0,f=-1,o=!0,a=e.length-1,u=0;for(;a>=l;--a){if(i=e.charCodeAt(a),i===47){if(!o){s=a+1;break}continue}if(f===-1)o=!1,f=a+1;if(i===46){if(n===-1)n=a;else if(u!==1)u=1}else if(n!==-1)u=-1}if(n===-1||f===-1||u===0||u===1&&n===f-1&&n===s+1){if(f!==-1)if(s===0&&t)r.base=r.name=e.slice(1,f);else r.base=r.name=e.slice(s,f)}else{if(s===0&&t)r.name=e.slice(1,n),r.base=e.slice(1,f);else r.name=e.slice(s,n),r.base=e.slice(s,f);r.ext=e.slice(n,f)}if(s>0)r.dir=e.slice(0,s-1);else if(t)r.dir="/";return r}var K="/",Q=":",le=((e)=>(e.posix=e,e))({resolve:d,normalize:w,isAbsolute:G,join:$,relative:y,_makeLong:z,dirname:H,basename:h,extname:C,format:U,parse:q,sep:K,delimiter:Q,win32:null,posix:null});import{loadConfig as ne}from"c12";var A={};V(A,{isatty:()=>B,default:()=>X,WriteStream:()=>S,ReadStream:()=>T});var B=()=>!1;function S(){throw Error("tty.WriteStream is not implemented for browsers")}function T(){throw Error("tty.ReadStream is not implemented for browsers")}var X={ReadStream:T,WriteStream:S,isatty:B};var{env:c={},argv:W=[],platform:Z=""}=typeof process>"u"?{}:process,I="NO_COLOR"in c||W.includes("--no-color"),J="FORCE_COLOR"in c||W.includes("--color"),j=Z==="win32",_=c.TERM==="dumb",F=A&&B&&B(1)&&c.TERM&&!_,N="CI"in c&&(("GITHUB_ACTIONS"in c)||("GITLAB_CI"in c)||("CIRCLECI"in c)),P=!I&&(J||j&&!_||F||N),L=(e,r,i,t,l=r.substring(0,e)+t,n=r.substring(e+i.length),s=n.indexOf(i))=>l+(s<0?n:L(s,n,i,t)),p=(e,r,i,t,l)=>e<0?i+r+t:i+L(e,r,t,l)+t,ee=(e,r,i=e,t=e.length+1)=>(l)=>l||!(l===""||l===void 0)?p((""+l).indexOf(r,t),l,e,r,i):"",g=(e,r,i)=>ee(`\x1B[${e}m`,`\x1B[${r}m`,i),D={reset:g(0,0),bold:g(1,22,"\x1B[22m\x1B[1m"),dim:g(2,22,"\x1B[22m\x1B[2m"),italic:g(3,23),underline:g(4,24),inverse:g(7,27),hidden:g(8,28),strikethrough:g(9,29),black:g(30,39),red:g(31,39),green:g(32,39),yellow:g(33,39),blue:g(34,39),magenta:g(35,39),cyan:g(36,39),white:g(37,39),gray:g(90,39),bgBlack:g(40,49),bgRed:g(41,49),bgGreen:g(42,49),bgYellow:g(43,49),bgBlue:g(44,49),bgMagenta:g(45,49),bgCyan:g(46,49),bgWhite:g(47,49),blackBright:g(90,39),redBright:g(91,39),greenBright:g(92,39),yellowBright:g(93,39),blueBright:g(94,39),magentaBright:g(95,39),cyanBright:g(96,39),whiteBright:g(97,39),bgBlackBright:g(100,49),bgRedBright:g(101,49),bgGreenBright:g(102,49),bgYellowBright:g(103,49),bgBlueBright:g(104,49),bgMagentaBright:g(105,49),bgCyanBright:g(106,49),bgWhiteBright:g(107,49)},re=({useColor:e=P}={})=>e?D:Object.keys(D).reduce((r,i)=>({...r,[i]:String}),{}),{reset:fe,bold:se,dim:ue,italic:oe,underline:ae,inverse:be,hidden:ce,strikethrough:de,black:me,red:Be,green:he,yellow:ve,blue:ye,magenta:Ce,cyan:Ae,white:ke,gray:Re,bgBlack:we,bgRed:Se,bgGreen:Te,bgYellow:De,bgBlue:We,bgMagenta:_e,bgCyan:Le,bgWhite:Oe,blackBright:Ye,redBright:xe,greenBright:O,yellowBright:Me,blueBright:Ee,magentaBright:Ge,cyanBright:$e,whiteBright:ze,bgBlackBright:He,bgRedBright:Ue,bgGreenBright:qe,bgYellowBright:Ke,bgBlueBright:Qe,bgMagentaBright:Ve,bgCyanBright:Xe,bgWhiteBright:Ze}=re();var v="timeback.config.json";function x(e){return C(e).toLowerCase()===".json"}async function te(e,r){if(r&&!x(r))throw Error(`Config file must be JSON (.json): ${r}`);let i=await ne({cwd:e,name:"timeback",configFile:r??v,rcFile:!1,packageJson:!1,dotenv:!1,envName:!1,extend:!1,omit$Keys:!0,defaults:{},overrides:{}});if(!i.config||Object.keys(i.config).length===0)return null;let t=i.config;if("extends"in t)throw Error("The 'extends' feature is not supported in timeback.config.json. Please inline all configuration.");let{$schema:l,...n}=t;return{config:n,configFile:i.configFile??d(e,r??v)}}async function rr(e={}){let r=process.cwd();try{if(e.configPath&&!x(e.configPath))return{success:!1,error:`Config file must be JSON (.json): ${e.configPath}`};if(e.configPath){let l=d(r,e.configPath);if(!ie(l))return{success:!1,error:`Config file not found: ${e.configPath}`}}let i=await te(r,e.configPath);if(!i)return{success:!1,error:`No timeback config found. Run ${O("timeback init")} to create one.`};let t=Y.safeParse(i.config);if(!t.success){let l=t.error.issues.map((n)=>` - ${n.path.join(".")}: ${n.message}`).join(`
|
|
2
2
|
`);return{success:!1,error:`Invalid config in ${h(i.configFile)}:
|
|
3
3
|
${l}`}}return{success:!0,config:t.data,configPath:i.configFile}}catch(i){return{success:!1,error:`Failed to load ${e.configPath?h(e.configPath):v}:
|
|
4
4
|
${i instanceof Error?i.message:String(i)}`}}}function ir(e){return y(process.cwd(),e)}export{te as loadWithC12,rr as loadConfig,ir as getRelativeConfigPath};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as J}from"zod/v4";import{z as $}from"zod/v4";var h_=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,P=$.string().min(1).regex(h_,"must be a valid ISO 8601 datetime"),T=$.string().min(1).regex(/^\d{4}-\d{2}-\d{2}$/,"must be a valid ISO 8601 date (YYYY-MM-DD)"),F=$.enum(["Reading","Language","Vocabulary","Social Studies","Writing","Science","FastMath","Math","None","Other"]).meta({id:"TimebackSubject",description:"Subject area"}),B=$.union([$.literal(-1),$.literal(0),$.literal(1),$.literal(2),$.literal(3),$.literal(4),$.literal(5),$.literal(6),$.literal(7),$.literal(8),$.literal(9),$.literal(10),$.literal(11),$.literal(12),$.literal(13)]).meta({id:"TimebackGrade",description:"Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"}),o=$.enum(["exempt","fully graded","not submitted","partially graded","submitted"]),m=$.enum(["department","school","district","local","state","national"]),u=$.enum(["administrator","aide","guardian","parent","proctor","relative","student","teacher"]),a=$.enum(["administrator","proctor","student","teacher"]),S=$.enum(["qti","text","audio","video","interactive","visual","course-material","assessment-bank"]),r=$.enum(["qti-test","qti-question","qti-stimulus","qti-test-bank"]),i=$.enum(["unit","course","resource-collection"]),e=$.enum(["choice","order","associate","match","hotspot","hottext","select-point","graphic-order","graphic-associate","graphic-gap-match","text-entry","extended-text","inline-choice","upload","slider","drawing","media","custom"]),n=$.enum(["easy","medium","hard"]),z=$.array($.object({source:$.string(),learningObjectiveIds:$.array($.string())})),t=$.object({consecutive_failures:$.number().int().min(1).optional(),stagnation_limit:$.number().int().min(1).optional()}).optional(),CZ=$.enum(["powerpath-100","quiz","test-out","placement","unit-test","alpha-read-article"]).nullable(),lZ=$.object({imsx_codeMajor:$.enum(["failure","success"]),imsx_severity:$.enum(["error","warning","status"]),imsx_description:$.string(),imsx_CodeMinor:$.object({imsx_codeMinorField:$.array($.object({imsx_codeMinorFieldName:$.string(),imsx_codeMinorFieldValue:$.string()}))}).optional()});var D_=J.object({staging:J.string().meta({description:"Course ID in staging environment"}).optional(),production:J.string().meta({description:"Course ID in production environment"}).optional()}).meta({id:"CourseIds",description:"Environment-specific course IDs (populated by sync)"}),f_=J.enum(["base","hole-filling","optional"]).meta({id:"CourseType",description:"Course classification type"}),u_=J.enum(["draft","testing","published","deactivated"]).meta({id:"PublishStatus",description:"Course publication status"}),T_=J.object({dailyXp:J.number().int().positive().meta({description:"Target XP to earn per day"}).optional(),dailyLessons:J.number().int().positive().meta({description:"Target lessons to complete per day"}).optional(),dailyActiveMinutes:J.number().int().positive().meta({description:"Target active learning minutes per day"}).optional(),dailyAccuracy:J.number().int().min(0).max(100).meta({description:"Target accuracy percentage (0-100)"}).optional(),dailyMasteredUnits:J.number().int().positive().meta({description:"Target units to master per day"}).optional()}).meta({id:"CourseGoals",description:"Daily learning goals for a course"}),C_=J.object({totalXp:J.number().int().positive().meta({description:"Total XP available in the course"}).optional(),totalLessons:J.number().int().positive().meta({description:"Total number of lessons/activities"}).optional(),totalGrades:J.number().int().positive().meta({description:"Total grade levels covered"}).optional()}).meta({id:"CourseMetrics",description:"Aggregate metrics for a course"}),Z_=J.object({courseType:f_.optional(),isSupplemental:J.boolean().meta({description:"Whether this is supplemental to a base course"}).optional(),isCustom:J.boolean().meta({description:"Whether this is a custom course for an individual student"}).optional(),publishStatus:u_.optional(),contactEmail:J.email().meta({description:"Contact email for course issues"}).optional(),primaryApp:J.string().meta({description:"Primary application identifier"}).optional(),goals:T_.optional(),metrics:C_.optional()}).meta({id:"CourseMetadata",description:"Course metadata (matches API metadata object)"}),x_=J.object({courseCode:J.string().meta({description:"Course code (e.g., 'MATH101')"}).optional(),level:J.string().meta({description:"Course level (e.g., 'AP', 'Honors')"}).optional(),metadata:Z_.optional()}).meta({id:"CourseDefaults",description:"Default properties that apply to all courses unless overridden"}),__=J.object({level:J.string().meta({description:"Course level for this environment"}).optional(),sensor:J.url().meta({description:"Caliper sensor endpoint URL for this environment"}).optional(),launchUrl:J.url().meta({description:"LTI launch URL for this environment"}).optional(),metadata:Z_.optional()}).meta({id:"CourseEnvOverrides",description:"Environment-specific course overrides (non-identity fields)"}),l_=J.object({staging:__.meta({description:"Overrides for staging environment"}).optional(),production:__.meta({description:"Overrides for production environment"}).optional()}).meta({id:"CourseOverrides",description:"Per-environment course overrides"}),R_=x_.extend({subject:F.meta({description:"Subject area for this course"}),grade:B.meta({description:"Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"}).optional(),ids:D_.nullable().optional(),sensor:J.url().meta({description:"Caliper sensor endpoint URL for this course"}).optional(),launchUrl:J.url().meta({description:"LTI launch URL for this course"}).optional(),overrides:l_.optional()}).meta({id:"CourseConfig",description:"Configuration for a single course. Must have either grade or courseCode (or both)."}),NZ=J.object({$schema:J.string().meta({description:"JSON Schema reference for editor support"}).optional(),name:J.string().min(1,"App name is required").meta({description:"Display name for your app"}),defaults:x_.meta({description:"Default properties applied to all courses"}).optional(),courses:J.array(R_).min(1,"At least one course is required").meta({description:"Courses available in this app"}),sensor:J.url().meta({description:"Default Caliper sensor endpoint URL for all courses"}).optional(),launchUrl:J.url().meta({description:"Default LTI launch URL for all courses"}).optional(),studio:J.object({telemetry:J.boolean().meta({description:"Enable anonymous usage telemetry for Studio (default: true)"}).optional().default(!0)}).meta({description:"Studio-specific configuration"}).optional()}).meta({id:"TimebackConfig",title:"Timeback Config",description:"Configuration schema for timeback.config.json files"}).refine((w)=>{return w.courses.every((V)=>V.grade!==void 0||V.courseCode!==void 0)},{message:"Each course must have either a grade or a courseCode",path:["courses"]}).refine((w)=>{let O=w.courses.filter((A)=>A.grade!==void 0).map((A)=>`${A.subject}:${A.grade}`);return new Set(O).size===O.length},{message:"Duplicate (subject, grade) pair found; each must be unique",path:["courses"]}).refine((w)=>{let O=w.courses.filter((A)=>A.courseCode!==void 0).map((A)=>A.courseCode);return new Set(O).size===O.length},{message:"Duplicate courseCode found; each must be unique",path:["courses"]}).refine((w)=>{return w.courses.every((V)=>{if(V.sensor!==void 0||w.sensor!==void 0)return!0;return[V.launchUrl,w.launchUrl,V.overrides?.staging?.launchUrl,V.overrides?.production?.launchUrl].filter(Boolean).length>0})},{message:"Each course must have an effective sensor. Either set `sensor` explicitly (top-level or per-course), or provide a `launchUrl` so sensor can be derived from its origin.",path:["courses"]});import{z as x}from"zod/v4";var C=x.object({id:x.string(),type:x.literal("TimebackUser"),email:x.string()}),R=x.object({id:x.string(),type:x.literal("TimebackActivityContext"),subject:F,app:x.object({name:x.string()}),activity:x.object({id:x.string().optional(),name:x.string()}).strict().optional(),course:x.object({id:x.string().optional(),name:x.string()}).strict().optional(),process:x.boolean().optional()}),j_=x.object({"@context":x.literal("http://purl.imsglobal.org/ctx/caliper/v1p2"),id:x.string(),type:x.string(),eventTime:P,profile:x.literal("TimebackProfile"),actor:C,action:x.string(),object:R,edApp:x.object({id:x.string(),name:x.string().optional()}).optional()}),H_=x.object({type:x.enum(["totalQuestions","correctQuestions","xpEarned","masteredUnits"]),value:x.number()}),c_=x.object({id:x.string(),type:x.literal("TimebackActivityMetricsCollection"),attempt:x.number().optional(),items:x.array(H_),extensions:x.record(x.string(),x.unknown()).optional()}),p_=j_.extend({type:x.literal("ActivityEvent"),action:x.literal("Completed"),generated:c_}),K_=x.object({type:x.enum(["active","inactive","waste","unknown","anti-pattern"]),value:x.number(),subType:x.string().optional()}),N_=x.object({id:x.string(),type:x.literal("TimebackTimeSpentMetricsCollection"),items:x.array(K_)}),y_=j_.extend({type:x.literal("TimeSpentEvent"),action:x.literal("SpentTime"),generated:N_}),oZ=x.object({actor:C,object:R,metrics:x.array(H_).min(1,"metrics must contain at least one metric"),eventTime:P.optional(),metricsId:x.string().optional(),id:x.string().optional(),extensions:x.record(x.string(),x.unknown()).optional(),edApp:x.union([x.string(),x.record(x.string(),x.unknown())]).optional(),session:x.union([x.string(),x.record(x.string(),x.unknown())]).optional(),attempt:x.number().int().min(1).optional(),generatedExtensions:x.object({pctCompleteApp:x.number().optional()}).loose().optional()}).strict(),mZ=x.object({actor:C,object:R,metrics:x.array(K_).min(1,"metrics must contain at least one metric"),eventTime:P.optional(),metricsId:x.string().optional(),id:x.string().optional(),extensions:x.record(x.string(),x.unknown()).optional(),edApp:x.union([x.string(),x.record(x.string(),x.unknown())]).optional(),session:x.union([x.string(),x.record(x.string(),x.unknown())]).optional()}).strict(),E_=x.union([p_,y_]),aZ=x.object({sensor:x.string(),sendTime:P,dataVersion:x.literal("http://purl.imsglobal.org/ctx/caliper/v1p2"),data:x.array(E_)}),g_=x.enum(["AnnotationProfile","AssessmentProfile","ToolUseProfile","GeneralProfile","FeedbackProfile","MediaProfile","SurveyProfile","ResourceManagementProfile","ForumProfile","AssignableProfile","GradingProfile","ReadingProfile","SessionProfile","SearchProfile","ToolLaunchProfile","TimebackProfile"]),d=x.union([x.string(),x.record(x.string(),x.unknown())]),o_=x.object({id:x.string(),type:x.string(),extensions:x.object({email:x.email()}).loose()}).strict(),X_=x.object({"@context":x.string().optional(),id:x.string(),type:x.string(),actor:x.union([x.string(),o_,C]),action:x.string(),object:d,eventTime:P,profile:g_,edApp:d.optional(),generated:d.optional(),target:d.optional(),referrer:d.optional(),group:d.optional(),membership:d.optional(),session:d.optional(),federatedSession:d.optional(),extensions:x.record(x.string(),x.unknown()).optional()}).strict(),SZ=x.object({sensor:x.string().min(1,"sensor must be a non-empty string"),sendTime:P,dataVersion:x.literal("http://purl.imsglobal.org/ctx/caliper/v1p2"),data:x.array(X_).min(1,"data must contain at least one event")}),rZ=x.object({sensor:x.string().min(1,"sensor must be a non-empty string"),events:x.array(X_).min(1,"events must contain at least one event")}),iZ=x.object({limit:x.number().int().positive().optional(),offset:x.number().int().min(0).optional(),sensor:x.string().min(1).optional(),startDate:P.optional(),endDate:P.optional(),actorId:x.string().min(1).optional(),actorEmail:x.email().optional()}).strict();import{z as U}from"zod/v4";var zZ=U.object({name:U.string().min(1,"name must be a non-empty string"),targetUrl:U.url("targetUrl must be a valid URL"),secret:U.string().min(1,"secret must be a non-empty string"),active:U.boolean(),sensor:U.string().nullable().optional(),description:U.string().nullable().optional()}).strict();var m_=U.enum(["string","number","boolean"]),a_=U.enum(["eq","neq","gt","gte","lt","lte","contains","notContains","in","notIn","startsWith","endsWith","regexp"]),tZ=U.object({webhookId:U.string().min(1,"webhookId must be a non-empty string"),filterKey:U.string().min(1,"filterKey must be a non-empty string"),filterValue:U.string().min(1,"filterValue must be a non-empty string"),filterType:m_,filterOperator:a_,active:U.boolean()}).strict();import{z as Y}from"zod/v4";var G=Y.string().trim().min(1),Y_=Y.object({title:G,identifier:G,uri:G}),S_=Y.object({identifier:G,uri:G,lastChangeDateTime:G,title:G,creator:G,officialSourceURL:Y.string().optional(),publisher:Y.string().optional(),description:Y.string().optional(),language:Y.string().optional(),version:Y.string().optional(),caseVersion:Y.string().optional(),adoptionStatus:Y.string().optional(),statusStartDate:Y.string().optional(),statusEndDate:Y.string().optional(),licenseUri:Y.string().optional(),notes:Y.string().optional(),subject:Y.array(Y.string()).optional(),extensions:Y.unknown().optional()}),r_=Y.object({identifier:G,uri:G,lastChangeDateTime:G,fullStatement:G,alternativeLabel:Y.string().optional(),CFItemType:Y.string().optional(),cfItemType:Y.string().optional(),humanCodingScheme:Y.string().optional(),listEnumeration:Y.string().optional(),abbreviatedStatement:Y.string().optional(),conceptKeywords:Y.array(Y.string()).optional(),notes:Y.string().optional(),subject:Y.array(Y.string()).optional(),language:Y.string().optional(),educationLevel:Y.array(Y.string()).optional(),CFItemTypeURI:Y.unknown().optional(),licenseURI:Y.unknown().optional(),statusStartDate:Y.string().optional(),statusEndDate:Y.string().optional(),extensions:Y.unknown().optional()}),i_=Y.object({identifier:G,uri:G,lastChangeDateTime:G,associationType:G,originNodeURI:Y_,destinationNodeURI:Y_,sequenceNumber:Y.number().optional(),extensions:Y.unknown().optional()}),e_=Y.object({CFItemTypes:Y.array(Y.unknown()).optional(),CFSubjects:Y.array(Y.unknown()).optional(),CFConcepts:Y.array(Y.unknown()).optional(),CFLicenses:Y.array(Y.unknown()).optional(),CFAssociationGroupings:Y.array(Y.unknown()).optional(),extensions:Y.unknown().optional()}),xx=Y.object({CFDocument:S_,CFItems:Y.array(r_),CFAssociations:Y.array(i_),CFDefinitions:e_.optional(),extensions:Y.unknown().optional()});import{z as q}from"zod/v4";var s=q.string().trim().min(1),D=q.array(q.string()).min(1),$_=q.object({id:s,type:q.literal("Image"),caption:q.string().optional()}),c=q.object({id:s,type:D,name:q.string().optional(),url:q.string().optional(),phone:q.string().optional(),description:q.string().optional(),image:$_.optional(),email:q.string().optional()}),q_=q.object({type:s,proofPurpose:s,verificationMethod:s,created:s,proofValue:s,cryptosuite:q.string().optional()}),n_=q.object({id:s,type:q.literal("1EdTechJsonSchemaValidator2019")}),z_=q.object({id:q.string().optional(),narrative:q.string().optional()}),t_=q.object({id:s,type:D,name:s,description:s,criteria:z_,image:$_.optional(),achievementType:q.string().optional(),creator:c.optional()}),_Z=q.object({type:q.literal("IdentityObject"),identityHash:s,identityType:s,hashed:q.boolean(),salt:q.string().optional()}),ZZ=q.enum(["exactMatchOf","isChildOf","isParentOf","isPartOf","isPeerOf","isRelatedTo","precedes","replacedBy"]),xZ=q.object({type:q.literal("Association"),associationType:ZZ,sourceId:s,targetId:s}),jZ=q.object({"@context":D,id:s,type:D,issuer:c,validFrom:s,validUntil:q.string().optional(),credentialSubject:q.object({id:q.string().optional()}),proof:q.array(q_).optional()}),HZ=q.object({id:q.string().optional(),type:D,identifier:q.array(_Z).optional(),achievement:q.array(t_).optional(),verifiableCredential:q.array(jZ).min(1),association:q.array(xZ).optional()}),Kx=q.object({"@context":D,id:s,type:D,issuer:c,name:s,description:q.string().optional(),validFrom:s,validUntil:q.string().optional(),credentialSubject:HZ,proof:q.array(q_).optional(),credentialSchema:q.array(n_).optional()});import{z as K}from"zod/v4";var b=K.union([P,T]),qx=K.object({id:K.string(),role:K.string(),beginDate:b.nullable(),endDate:b.nullable(),metadata:K.object({goals:K.object({dailyXp:K.number().optional()}).optional(),metrics:K.object({totalXp:K.number().optional(),totalLessons:K.number().optional()}).optional()}).optional(),course:K.object({id:K.string(),title:K.string(),subjects:K.array(K.string()).nullable(),grades:K.array(K.string()).nullable()}),school:K.object({id:K.string(),name:K.string()})}),KZ=K.object({activityMetrics:K.object({xpEarned:K.number(),totalQuestions:K.number(),correctQuestions:K.number(),masteredUnits:K.number()}),timeSpentMetrics:K.object({activeSeconds:K.number(),inactiveSeconds:K.number(),wasteSeconds:K.number()}),apps:K.array(K.string())}),XZ=K.record(K.string(),K.record(K.string(),KZ)),Jx=K.object({message:K.string(),enrollmentId:K.string(),startDate:b,endDate:b,facts:XZ,factsByApp:K.unknown()}),v=K.string().trim().min(1),J_=K.object({email:K.email().optional(),studentId:v.optional()}).superRefine((w,V)=>{if(!w.email&&!w.studentId)V.addIssue({code:K.ZodIssueCode.custom,message:"must provide either email or studentId",path:["email"]}),V.addIssue({code:K.ZodIssueCode.custom,message:"must provide either email or studentId",path:["studentId"]})}),Wx=K.object({subject:v,grade:v,courseId:v,orgSourcedId:v.optional()});var wx=K.object({userId:v}),Vx=K.object({sourcedId:v.optional(),role:a.optional(),beginDate:b.optional(),metadata:K.record(K.string(),K.unknown()).optional()}),sx=K.object({fields:K.string().optional(),limit:K.number().int().positive().optional(),offset:K.number().int().nonnegative().optional(),sort:K.string().optional(),orderBy:K.enum(["asc","desc"]).optional(),filter:K.string().optional(),search:K.string().optional(),roles:K.array(u).min(1),orgSourcedIds:K.array(v).optional()}),kx=J_.extend({startDate:b,endDate:b,timezone:K.string().optional()}),Lx=J_.extend({weekDate:b,timezone:K.string().optional()}),Qx=K.object({enrollmentId:v,startDate:b.optional(),endDate:b.optional(),timezone:K.string().optional()});import{z as L}from"zod/v4";var M=L.string().trim().min(1),Bx=L.object({email:L.email()}),Ux=L.object({name:M.optional(),timeback_id:M.optional(),grade:M.optional(),subject:M.optional(),all:L.boolean().optional()}),Ax=L.object({student_email:L.email(),timeback_id:M.optional(),subject:M.optional(),grade_rank:L.number().int().min(0).max(12).optional(),assessment_line_item_sourced_id:M.optional(),assessment_result_sourced_id:M.optional()}).superRefine((w,V)=>{let O=!!w.timeback_id,A=!!w.subject,l=w.grade_rank!==void 0;if(!O&&!A)V.addIssue({code:L.ZodIssueCode.custom,message:"must provide either timeback_id or subject",path:["timeback_id"]}),V.addIssue({code:L.ZodIssueCode.custom,message:"must provide either timeback_id or subject",path:["subject"]});if(l&&!A)V.addIssue({code:L.ZodIssueCode.custom,message:"grade_rank requires subject",path:["grade_rank"]});let g=!!w.assessment_line_item_sourced_id,v_=!!w.assessment_result_sourced_id;if(g!==v_)V.addIssue({code:L.ZodIssueCode.custom,message:"assessment_line_item_sourced_id and assessment_result_sourced_id must be provided together",path:g?["assessment_result_sourced_id"]:["assessment_line_item_sourced_id"]})}),Fx=L.object({student_email:L.email(),assignment_id:L.number().int().positive().optional(),timeback_id:M.optional(),subject:M.optional(),grade_rank:L.number().int().min(0).max(12).optional()}).superRefine((w,V)=>{let O=w.assignment_id!==void 0,A=!!w.timeback_id,l=!!w.subject&&w.grade_rank!==void 0;if(!O&&!A&&!l)V.addIssue({code:L.ZodIssueCode.custom,message:"Either assignment_id, timeback_id, or (subject and grade_rank) is required",path:["assignment_id"]});if(w.grade_rank!==void 0&&!w.subject)V.addIssue({code:L.ZodIssueCode.custom,message:"grade_rank requires subject",path:["grade_rank"]})});import{z as Z}from"zod/v4";var X=Z.string().min(1),Q=Z.enum(["active","tobedeleted"]),k=Z.record(Z.string(),Z.unknown()).nullable().optional(),W=Z.object({sourcedId:X,type:Z.string().optional(),href:Z.string().optional()}).strict(),I=Z.union([T,P]),YZ=Z.object({roleType:Z.enum(["primary","secondary"]),role:u,org:W,userProfile:Z.string().optional(),metadata:k,beginDate:I.optional(),endDate:I.optional()}).strict(),Mx=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string"),status:Q.optional(),enabledUser:Z.boolean(),givenName:X.describe("givenName must be a non-empty string"),familyName:X.describe("familyName must be a non-empty string"),middleName:X.optional(),username:X.optional(),email:Z.email().optional(),roles:Z.array(YZ).min(1,"roles must include at least one role"),userIds:Z.array(Z.object({type:X,identifier:X}).strict()).optional(),agents:Z.array(W).optional(),grades:Z.array(B).optional(),identifier:X.optional(),sms:X.optional(),phone:X.optional(),pronouns:X.optional(),password:X.optional(),metadata:k}).strict(),dx=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string").optional(),status:Q.optional(),title:X.describe("title must be a non-empty string"),org:W,courseCode:X.optional(),subjects:Z.array(F).optional(),grades:Z.array(B).optional(),level:X.optional(),metadata:k}).strict(),vx=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string").optional(),status:Q.optional(),title:X.describe("title must be a non-empty string"),terms:Z.array(W).min(1,"terms must have at least one item"),course:W,org:W,classCode:X.optional(),classType:Z.enum(["homeroom","scheduled"]).optional(),location:X.optional(),grades:Z.array(B).optional(),subjects:Z.array(F).optional(),subjectCodes:Z.array(X).optional(),periods:Z.array(X).optional(),metadata:k}).strict(),W_=Z.enum(["true","false"]),hx=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string").optional(),status:Q.optional(),user:W,class:W,school:W.optional(),role:u,primary:W_.optional(),beginDate:I.optional(),endDate:I.optional(),metadata:k}).strict(),Dx=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),status:Q,weight:Z.number().nullable().optional(),metadata:k}).strict(),fx=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),class:W,school:W,category:W,assignDate:I,dueDate:I,status:Q,description:Z.string().optional(),resultValueMin:Z.number().nullable().optional(),resultValueMax:Z.number().nullable().optional(),scoreScale:W.optional(),metadata:k}).strict(),ux=Z.object({sourcedId:X.optional(),lineItem:W,student:W,class:W.optional(),scoreDate:I,scoreStatus:Z.enum(["exempt","fully graded","not submitted","partially graded","submitted"]),score:Z.number().nullable().optional(),textScore:Z.string().nullable().optional(),status:Q,comment:Z.string().nullable().optional(),metadata:k}).strict(),Tx=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),status:Q.optional(),type:Z.string().optional(),class:W.optional(),course:W.nullable().optional(),scoreScaleValue:Z.array(Z.object({itemValueLHS:X,itemValueRHS:X,value:Z.string().optional(),description:Z.string().optional()}).strict()).optional(),minScore:Z.number().optional(),maxScore:Z.number().optional(),metadata:k}).strict(),Cx=Z.object({sourcedId:X.optional(),status:Q.optional(),dateLastModified:P.optional(),title:X.describe("title must be a non-empty string"),description:Z.string().nullable().optional(),class:W.nullable().optional(),parentAssessmentLineItem:W.nullable().optional(),scoreScale:W.nullable().optional(),resultValueMin:Z.number().nullable().optional(),resultValueMax:Z.number().nullable().optional(),component:W.nullable().optional(),componentResource:W.nullable().optional(),learningObjectiveSet:Z.array(Z.object({source:Z.string(),learningObjectiveIds:Z.array(Z.string())})).optional().nullable(),course:W.nullable().optional(),metadata:k}).strict(),$Z=Z.object({learningObjectiveId:Z.string(),score:Z.number().optional(),textScore:Z.string().optional()}),qZ=Z.array(Z.object({source:Z.string(),learningObjectiveResults:Z.array($Z)})),lx=Z.object({sourcedId:X.optional(),status:Q.optional(),dateLastModified:P.optional(),metadata:k,assessmentLineItem:W,student:W,score:Z.number().nullable().optional(),textScore:Z.string().nullable().optional(),scoreDate:Z.string().datetime(),scoreScale:W.nullable().optional(),scorePercentile:Z.number().nullable().optional(),scoreStatus:Z.enum(["exempt","fully graded","not submitted","partially graded","submitted"]),comment:Z.string().nullable().optional(),learningObjectiveSet:qZ.nullable().optional(),inProgress:Z.string().nullable().optional(),incomplete:Z.string().nullable().optional(),late:Z.string().nullable().optional(),missing:Z.string().nullable().optional()}).strict(),Rx=Z.object({sourcedId:X.optional(),status:Q.optional(),name:X.describe("name must be a non-empty string"),type:m,identifier:X.optional(),parent:W.optional(),metadata:k}).strict(),cx=Z.object({sourcedId:X.optional(),status:Q.optional(),name:X.describe("name must be a non-empty string"),type:Z.literal("school").optional(),identifier:X.optional(),parent:W.optional(),metadata:k}).strict(),px=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string"),status:Q,title:X.describe("title must be a non-empty string"),startDate:I,endDate:I,type:Z.enum(["gradingPeriod","semester","schoolYear","term"]),schoolYear:X.describe("schoolYear must be a non-empty string"),org:W,parent:W.optional(),children:Z.array(W).optional(),metadata:k}).strict(),Nx=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),courseComponent:W,resource:W,status:Q,metadata:k}).strict(),yx=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),course:W,status:Q,metadata:k}).strict(),Ex=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string"),role:Z.enum(["student","teacher"]),primary:W_.optional(),beginDate:I.optional(),endDate:I.optional(),metadata:k}).strict(),gx=Z.object({agentSourcedId:X.describe("agentSourcedId must be a non-empty string")}).strict(),ox=Z.object({type:X.describe("type must be a non-empty string"),username:X.describe("username must be a non-empty string"),password:Z.string().optional(),metadata:k}).strict(),mx=Z.object({sourcedId:X.describe("sourcedId must be a non-empty string")}).loose(),h=Z.object({type:S,subject:F.nullish(),grades:Z.array(B).nullish(),language:Z.string().nullish(),xp:Z.number().nullish(),url:Z.url().nullish(),keywords:Z.array(Z.string()).nullish(),learningObjectiveSet:z.nullish(),lessonType:Z.string().nullish()}).passthrough(),JZ=h.extend({type:Z.literal("qti"),subType:r,questionType:e.optional(),difficulty:n.optional()}),WZ=h.extend({type:Z.literal("text"),format:Z.string(),author:Z.string().optional(),pageCount:Z.number().optional()}),wZ=h.extend({type:Z.literal("audio"),duration:Z.string().regex(/^\d{2}:\d{2}:\d{2}(\.\d{2})?$/).optional(),format:Z.string(),speaker:Z.string().optional()}),VZ=h.extend({type:Z.literal("video"),duration:Z.string().regex(/^\d{2}:\d{2}:\d{2}(\.\d{2})?$/).optional(),captionsAvailable:Z.boolean().optional(),format:Z.string()}),sZ=h.extend({type:Z.literal("interactive"),launchUrl:Z.url().optional(),toolProvider:Z.string().optional(),instructionalMethod:Z.string().optional(),courseIdOnFail:Z.string().nullable().optional(),fail_fast:t}),kZ=h.extend({type:Z.literal("visual"),format:Z.string(),resolution:Z.string().optional()}),LZ=h.extend({type:Z.literal("course-material"),subType:i,author:Z.string().optional(),format:Z.string(),instructionalMethod:Z.string().optional()}),QZ=h.extend({type:Z.literal("assessment-bank"),resources:Z.array(Z.string())}),GZ=Z.discriminatedUnion("type",[JZ,WZ,wZ,VZ,sZ,kZ,LZ,QZ]),ax=Z.object({sourcedId:X.optional(),title:X.describe("title must be a non-empty string"),vendorResourceId:X.describe("vendorResourceId must be a non-empty string"),roles:Z.array(Z.enum(["primary","secondary"])).optional(),importance:Z.enum(["primary","secondary"]).optional(),vendorId:Z.string().optional(),applicationId:Z.string().optional(),status:Q.optional(),metadata:GZ.nullable().optional()}).strict(),PZ=Z.object({url:X.describe("courseStructure.url must be a non-empty string"),skillCode:X.describe("courseStructure.skillCode must be a non-empty string"),lessonCode:X.describe("courseStructure.lessonCode must be a non-empty string"),title:X.describe("courseStructure.title must be a non-empty string"),"unit-title":X.describe("courseStructure.unit-title must be a non-empty string"),status:X.describe("courseStructure.status must be a non-empty string"),xp:Z.number()}).loose(),Sx=Z.object({course:Z.object({sourcedId:X.describe("course.sourcedId must be a non-empty string").optional(),title:X.describe("course.title must be a non-empty string"),org:W,status:Q,metadata:k}).strict(),courseStructure:Z.record(Z.string(),PZ)}).strict(),BZ=Z.object({student:W}).loose(),rx=Z.array(BZ).min(1,"results must have at least one item");import{z as j}from"zod/v4";var H=j.string().trim().min(1),UZ=j.enum(["edulastic","mastery-track"]),AZ=j.enum(["powerpath-100","quiz","test-out","placement","unit-test","alpha-read-article"]),V_=j.array(B),s_=j.record(j.string(),j.unknown()).optional(),k_=j.object({courseId:H,lessonTitle:H.optional(),launchUrl:j.url().optional(),toolProvider:UZ,unitTitle:H.optional(),courseComponentSourcedId:H.optional(),vendorId:H.optional(),description:H.optional(),resourceMetadata:s_.nullable().optional(),grades:V_}),zx=k_.extend({lessonType:j.literal("test-out"),xp:j.number()}),tx=k_.extend({lessonType:j.literal("placement"),courseIdOnFail:H.optional(),xp:j.number().optional()});var w_=j.object({courseId:H,lessonType:AZ,lessonTitle:H.optional(),unitTitle:H.optional(),courseComponentSourcedId:H.optional(),resourceMetadata:s_.nullable().optional(),xp:j.number().optional(),grades:V_.optional(),courseIdOnFail:H.optional()}),_j=j.union([w_.extend({testType:j.literal("qti"),qti:j.object({url:j.url(),title:H.optional(),metadata:j.record(j.string(),j.unknown()).optional()})}),w_.extend({testType:j.literal("assessment-bank"),assessmentBank:j.object({resources:j.array(j.object({url:j.url(),title:H.optional(),metadata:j.record(j.string(),j.unknown()).optional()}))})})]),Zj=j.object({student:H,lesson:H}),xj=j.object({student:H,lesson:H}),jj=j.object({courseId:H,userId:H,classId:H.optional()}),f=j.object({type:j.enum(["component","resource"]),id:H}),FZ=j.union([j.object({type:j.literal("set-skipped"),payload:j.object({target:f,value:j.boolean()})}),j.object({type:j.literal("add-custom-resource"),payload:j.object({resource_id:H,parent_component_id:H,skipped:j.boolean().optional()})}),j.object({type:j.literal("move-item-before"),payload:j.object({target:f,reference_id:H})}),j.object({type:j.literal("move-item-after"),payload:j.object({target:f,reference_id:H})}),j.object({type:j.literal("move-item-to-start"),payload:j.object({target:f})}),j.object({type:j.literal("move-item-to-end"),payload:j.object({target:f})}),j.object({type:j.literal("change-item-parent"),payload:j.object({target:f,new_parent_id:H,position:j.enum(["start","end"]).optional()})})]),Hj=j.object({operation:j.array(FZ),reason:H.optional()}),Kj=j.object({studentId:H,componentResourceId:H,result:j.object({status:j.enum(["active","tobedeleted"]),metadata:j.record(j.string(),j.unknown()).optional(),score:j.number().optional(),textScore:H.optional(),scoreDate:H,scorePercentile:j.number().optional(),scoreStatus:o,comment:H.optional(),learningObjectiveSet:j.array(j.object({source:H,learningObjectiveResults:j.array(j.object({learningObjectiveId:H,score:j.number().optional(),textScore:H.optional()}))})).optional(),inProgress:H.optional(),incomplete:H.optional(),late:H.optional(),missing:H.optional()})}),Xj=j.object({student:H,lesson:H,applicationName:H.optional(),testId:H.optional(),skipCourseEnrollment:j.boolean().optional()}),Yj=j.object({student:H,subject:F}),$j=j.object({student:H,lesson:H}),qj=j.object({userId:H}),Jj=j.object({userId:H,subject:j.enum(["Math","Reading","Language","Science"])}),Wj=j.object({student:H,subject:F,grade:B,testName:H.optional()}),wj=j.object({testName:H}),IZ=j.object({student:H,subject:F,grade:B,testName:H.optional()}),Vj=j.object({items:j.array(IZ)}),sj=j.object({spreadsheetUrl:j.url(),sheet:H}),kj=j.object({student:H,status:j.enum(["assigned","in_progress","completed","failed","expired","cancelled"]).optional(),subject:H.optional(),grade:B.optional(),limit:j.number().int().positive().max(3000).optional(),offset:j.number().int().nonnegative().optional()}),Lj=j.object({student:H.optional(),status:j.enum(["assigned","in_progress","completed","failed","expired","cancelled"]).optional(),subject:H.optional(),grade:B.optional(),limit:j.number().int().positive().max(3000).optional(),offset:j.number().int().nonnegative().optional()}),Qj=j.object({student:H,question:H,response:j.union([H,j.array(H)]).optional(),responses:j.record(j.string(),j.union([H,j.array(H)])).optional(),lesson:H}),Gj=j.object({student:H,lesson:H,attempt:j.number().int().positive().optional()}),Pj=j.object({student:H,lesson:H}),Bj=j.object({student:H,lesson:H}),Uj=j.object({student:H,lesson:H.optional(),finalized:j.boolean().optional(),toolProvider:H.optional(),attempt:j.number().int().positive().optional()}),Aj=j.object({student:H,lesson:H,applicationName:H.optional()}),Fj=j.object({student:H,subject:F}),Ij=j.object({status:j.enum(["active","tobedeleted"]).optional()});import{z as _}from"zod/v4";var L_=_.enum(["choice","text-entry","extended-text","inline-choice","match","order","associate","select-point","graphic-order","graphic-associate","graphic-gap-match","hotspot","hottext","slider","drawing","media","upload"]),p=_.enum(["single","multiple","ordered","record"]),N=_.enum(["identifier","boolean","integer","float","string","point","pair","directedPair","duration","file","uri"]),OZ=_.enum(["easy","medium","hard"]),bZ=_.enum(["linear","nonlinear"]),MZ=_.enum(["individual","simultaneous"]),y=_.enum(["show","hide"]),Q_=_.enum(["test","item","stimulus"]),dj=_.enum(["QUESTION","LESSON"]),dZ=_.object({value:_.array(_.string())}).strict(),G_=_.object({identifier:_.string().min(1),cardinality:p,baseType:N.optional(),correctResponse:dZ}).strict(),P_=_.object({identifier:_.string().min(1),cardinality:p,baseType:N.optional()}).strict(),B_=_.object({identifier:_.string().min(1),cardinality:p.optional(),baseType:N,normalMaximum:_.number().optional(),normalMinimum:_.number().optional(),defaultValue:_.object({value:_.unknown().optional()}).strict().optional()}).strict(),vZ=_.object({outcomeIdentifier:_.string().min(1),variableIdentifier:_.string().min(1)}).strict(),U_=_.object({templateType:_.enum(["match_correct","map_response"]),responseDeclarationIdentifier:_.string().min(1),outcomeIdentifier:_.string().min(1),correctResponseIdentifier:_.string().min(1),incorrectResponseIdentifier:_.string().min(1),inlineFeedback:vZ.optional()}).strict(),hZ=_.object({source:_.string().min(1),learningObjectiveIds:_.array(_.string())}).strict(),E=_.object({subject:_.string().optional(),grade:B.optional(),difficulty:OZ.optional(),learningObjectiveSet:_.array(hZ).optional()}).loose(),A_=_.object({outcomeIdentifier:_.string().min(1),identifier:_.string().min(1),showHide:y,content:_.string(),title:_.string()}).strict(),F_=_.object({outcomeIdentifier:_.string().min(1),identifier:_.string().min(1),showHide:y,content:_.string(),class:_.array(_.string())}).strict(),I_=_.object({outcomeIdentifier:_.string().min(1),identifier:_.string().min(1),showHide:y,content:_.string(),class:_.array(_.string())}).strict(),O_=_.object({href:_.string().min(1),type:_.string().min(1)}).strict(),b_=_.object({id:_.string().min(1),support:_.string(),content:_.string()}).strict(),vj=_.object({page:_.number().int().positive().optional(),limit:_.number().int().positive().optional(),sort:_.string().optional(),order:_.enum(["asc","desc"]).optional()}).strict(),DZ=_.object({format:_.string().pipe(_.literal("xml")),xml:_.string().min(1),metadata:E.optional()}).strict(),fZ=_.object({identifier:_.string().min(1),title:_.string().min(1),type:L_,qtiVersion:_.string().optional(),timeDependent:_.boolean().optional(),adaptive:_.boolean().optional(),responseDeclarations:_.array(G_).optional(),outcomeDeclarations:_.array(P_).optional(),responseProcessing:U_.optional(),metadata:E.optional(),modalFeedback:_.array(A_).optional(),feedbackInline:_.array(F_).optional(),feedbackBlock:_.array(I_).optional()}).strict(),hj=_.union([DZ,fZ]),Dj=_.object({identifier:_.string().min(1).optional(),title:_.string().min(1),type:L_,qtiVersion:_.string().optional(),timeDependent:_.boolean().optional(),adaptive:_.boolean().optional(),responseDeclarations:_.array(G_).optional(),outcomeDeclarations:_.array(P_).optional(),responseProcessing:U_.optional(),metadata:E.optional(),modalFeedback:_.array(A_).optional(),feedbackInline:_.array(F_).optional(),feedbackBlock:_.array(I_).optional(),rawXml:_.string(),content:_.record(_.string(),_.unknown())}).strict(),fj=_.object({response:_.union([_.string(),_.array(_.string())])}).strict(),M_=_.object({identifier:_.string().min(1),href:_.union([_.string(),_.array(_.string()),_.array(_.array(_.string()))]).optional(),sequence:_.number().optional()}).strict(),uZ=_.object({identifier:_.string().min(1),title:_.string().min(1),visible:_.boolean(),required:_.boolean().optional(),fixed:_.boolean().optional(),sequence:_.number().optional(),"qti-assessment-item-ref":_.array(M_).optional()}).strict(),d_=_.object({identifier:_.string().min(1),navigationMode:_.string().pipe(bZ),submissionMode:_.string().pipe(MZ),"qti-assessment-section":_.array(uZ)}).strict(),uj=_.object({items:_.array(M_).min(1)}).strict(),Tj=_.object({metadata:_.record(_.string(),_.unknown()).optional()}).strict(),Cj=_.object({identifier:_.string().min(1),title:_.string().min(1),qtiVersion:_.string().optional(),toolName:_.string().optional(),toolVersion:_.string().optional(),timeLimit:_.number().optional(),maxAttempts:_.number().optional(),toolsEnabled:_.record(_.string(),_.boolean()).optional(),metadata:_.record(_.string(),_.unknown()).optional(),"qti-test-part":_.array(d_),"qti-outcome-declaration":_.array(B_).optional()}).strict(),lj=_.object({identifier:_.string().min(1).optional(),title:_.string().min(1),qtiVersion:_.string().optional(),toolName:_.string().optional(),toolVersion:_.string().optional(),timeLimit:_.number().optional(),maxAttempts:_.number().optional(),toolsEnabled:_.record(_.string(),_.boolean()).optional(),metadata:_.record(_.string(),_.unknown()).optional(),"qti-test-part":_.array(d_),"qti-outcome-declaration":_.array(B_).optional()}).strict(),Rj=_.object({identifier:_.string().min(1),title:_.string().min(1),label:_.string().optional(),language:_.string().optional(),stylesheet:O_.optional(),content:_.string(),catalogInfo:_.array(b_).optional(),toolName:_.string().optional(),toolVersion:_.string().optional(),metadata:_.record(_.string(),_.unknown()).optional()}).strict(),cj=_.object({identifier:_.string().min(1).optional(),title:_.string().min(1),label:_.string().optional(),language:_.string().optional(),stylesheet:O_.optional(),content:_.string(),catalogInfo:_.array(b_).optional(),toolName:_.string().optional(),toolVersion:_.string().optional(),metadata:_.record(_.string(),_.unknown()).optional()}).strict(),pj=_.object({xml:_.string().optional(),schema:Q_,entityId:_.string().optional()}).strict(),Nj=_.object({xml:_.array(_.string()),schema:Q_,entityIds:_.array(_.string())}).strict(),yj=_.object({questionId:_.string().optional(),userId:_.string().min(1),feedback:_.string().min(1),lessonId:_.string().min(1),humanApproved:_.boolean().optional()}).strict();export{F as a,B as b,NZ as c};
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { createTimeback, createTimebackIdentity } from './server';
|
|
|
43
43
|
export { toNativeHandler } from './server/adapters/native';
|
|
44
44
|
export { ROUTES } from './shared/constants';
|
|
45
45
|
export { TimebackClient } from '@timeback/core';
|
|
46
|
+
export { ApiError, ForbiddenError, isApiError, NotFoundError, UnauthorizedError, ValidationError, } from '@timeback/core';
|
|
46
47
|
export type { ApiCredentials, CustomIdentityConfig, Environment, IdentityConfig, SsoIdentityConfig, TimebackConfig, TimebackInstance, IdentityOnlyConfig, IdentityOnlyInstance, IdentityOnlyHandlers, BuildStateContext, CallbackSuccessContext, IdentityOnlyCallbackSuccessContext, CallbackErrorContext, OIDCTokens, OIDCUserInfo, IdpData, ActivityBeforeSendData, TimeSpentBeforeSendData, TimebackUserResolutionErrorCode, } from './server';
|
|
47
48
|
export type { TimebackIdentity, TimebackProfile, TimebackSessionUser, IdentityClaims, TimebackAuthUser, ActivityParams, ActivityMetrics, } from './shared/types';
|
|
48
49
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAM/C,OAAO,EACN,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,GACf,MAAM,gBAAgB,CAAA;AAMvB,YAAY,EACX,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,kCAAkC,EAClC,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,OAAO,EACP,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,GAC/B,MAAM,UAAU,CAAA;AAMjB,YAAY,EACX,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,GACf,MAAM,gBAAgB,CAAA"}
|