@burdenoff/cli-sdk 2026.1124.1 → 2026.1202.1
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-BGNPGKJM.js +1 -0
- package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
- package/dist/chunk-N7EXKGE2.js +34 -0
- package/dist/core/index.cjs +9 -9
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
- package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
- package/dist/modules/adaptercloud/index.cjs +38 -38
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +2 -2
- package/dist/modules/artistrybase/index.cjs +50 -50
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +2 -2
- package/dist/modules/assethandler/index.cjs +32 -32
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +2 -2
- package/dist/modules/atheletebridge/index.cjs +34 -34
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +2 -2
- package/dist/modules/auth/index.cjs +34 -34
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +4 -4
- package/dist/modules/billing/index.cjs +18 -18
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/brainyrich/index.cjs +45 -45
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +2 -2
- package/dist/modules/buildmyiq/index.cjs +32 -32
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +2 -2
- package/dist/modules/channels/index.cjs +12 -12
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/collabkin/index.cjs +34 -34
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +2 -2
- package/dist/modules/comradecircle/index.cjs +41 -41
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +2 -2
- package/dist/modules/conversations/index.cjs +32 -32
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +2 -2
- package/dist/modules/coolandlovely/index.cjs +41 -41
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +2 -2
- package/dist/modules/cosmicintersection/index.cjs +43 -43
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +2 -2
- package/dist/modules/crewfoundry/index.cjs +70 -70
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +2 -2
- package/dist/modules/devportal/index.cjs +23 -23
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +2 -2
- package/dist/modules/ecoimpacthub/index.cjs +41 -41
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +2 -2
- package/dist/modules/eventfullymanaged/index.cjs +92 -92
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +2 -2
- package/dist/modules/export/index.cjs +14 -14
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.cjs +11 -11
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +2 -2
- package/dist/modules/fluidgrids/index.cjs +29 -29
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +3 -3
- package/dist/modules/ggnomad/index.cjs +21 -21
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +2 -2
- package/dist/modules/govcitizenhub/index.cjs +35 -35
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +2 -2
- package/dist/modules/groups/index.cjs +12 -12
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +2 -2
- package/dist/modules/headshotmarketing/index.cjs +165 -165
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +2 -2
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +43 -43
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +2 -2
- package/dist/modules/housingvista/index.cjs +24 -24
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +2 -2
- package/dist/modules/integrations/index.cjs +27 -27
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +2 -2
- package/dist/modules/intelwatchtower/index.cjs +37 -37
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +26 -26
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +2 -2
- package/dist/modules/labsofscience/index.cjs +44 -44
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +2 -2
- package/dist/modules/manufacturedops/index.cjs +36 -36
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +2 -2
- package/dist/modules/movethewheels/index.cjs +78 -78
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +2 -2
- package/dist/modules/mybodyshield/index.cjs +36 -36
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +2 -2
- package/dist/modules/notifications/index.cjs +5 -5
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +5 -5
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +272 -272
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +2 -2
- package/dist/modules/products/index.cjs +19 -19
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/proserviceworld/index.cjs +24 -24
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +2 -2
- package/dist/modules/rbac/index.cjs +8 -8
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.cjs +39 -39
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +25 -25
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.cjs +14 -14
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/semanticfed/index.cjs +44 -44
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/semanticfed-sql/index.cjs +4 -4
- package/dist/modules/semanticfed-sql/index.d.cts +1 -1
- package/dist/modules/semanticfed-sql/index.d.ts +1 -1
- package/dist/modules/semanticfed-sql/index.js +1 -1
- package/dist/modules/store/index.cjs +21 -21
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/subscriberbot/index.cjs +41 -41
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +2 -2
- package/dist/modules/support/index.cjs +8 -8
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.cjs +10 -10
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/technospam/index.cjs +44 -44
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +2 -2
- package/dist/modules/theculturepost/index.cjs +32 -32
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +2 -2
- package/dist/modules/theglobalfuel/index.cjs +30 -30
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +2 -2
- package/dist/modules/timecampus/index.cjs +69 -69
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +4 -4
- package/dist/modules/tours/index.cjs +4 -4
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.cjs +460 -460
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +5 -5
- package/dist/modules/workspaces/index.cjs +16 -16
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +6 -1
- package/dist/chunk-3ZVMC2AF.js +0 -1
- package/dist/chunk-ZT6KOG7N.js +0 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$
|
|
1
|
+
import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$1,d}from'../../chunk-BGNPGKJM.js';import {j as j$1}from'../../chunk-N7EXKGE2.js';var R=`
|
|
2
2
|
query BuiGetCourse($id: ID!) {
|
|
3
3
|
buiCourse(id: $id) {
|
|
4
4
|
id workspaceId slug title summary description level status language
|
|
@@ -225,4 +225,4 @@ import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$2,d}from'../../chunk-3ZVMC2AF.js
|
|
|
225
225
|
query BuiHealth {
|
|
226
226
|
buiHealth
|
|
227
227
|
}
|
|
228
|
-
`;function E(a,i){try{return JSON.parse(i)}catch{throw new q$1(`--${a} must be valid JSON`)}}function c(a){let i=Number.parseInt(a,10);if(Number.isNaN(i))throw new q$1(`Expected an integer but got "${a}"`);return i}function C(a){let i=Number.parseFloat(a);if(Number.isNaN(i))throw new q$1(`Expected a number but got "${a}"`);return i}function b(a){return a==="true"}function y(a){return a.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function et(a){let i$1=a.command("courses").description("Buildmyiq courses");i$1.command("list").description("List courses").option("--status <s>","DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(O,{status:t.status?t.status.toUpperCase():void 0,level:t.level?t.level.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0});i(t,s.buiListCourses.items,{headers:["ID","Title","Level","Status","Language","Hours"],rows:s.buiListCourses.items.map(d=>[r(d.id,12),d.title,d.level,d.status,d.language??"-",d.estimatedHours!=null?String(d.estimatedHours):"-"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a course by id").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(R,{id:t});if(!s.buiCourse)throw new q$1(`Course ${t} not found`);i(e,s.buiCourse);}catch(s){h$1(s);}}),i$1.command("create").description("Create a course").requiredOption("--slug <slug>","URL slug").requiredOption("--title <title>","Course title").option("--summary <s>","Short summary").option("--description <s>","Description").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT","BEGINNER").option("--language <l>","Language code").option("--estimated-hours <n>","Estimated hours",c).option("--public","Make the course public").option("--instructor <id>","Instructor user ID").option("--skill <id>","Skill ID").option("--cover-file <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={slug:t.slug,title:t.title,level:(t.level??"BEGINNER").toUpperCase()};t.summary&&(e.summary=t.summary),t.description&&(e.description=t.description),t.language&&(e.language=t.language),t.estimatedHours!==void 0&&(e.estimatedHours=t.estimatedHours),t.public&&(e.isPublic=!0),t.instructor&&(e.instructorId=t.instructor),t.skill&&(e.skillId=t.skill),t.coverFile&&(e.coverFileId=t.coverFile),t.tags&&(e.tags=y(t.tags));let s=await b$1(h,{input:e});k$1(`Course created: ${s.buiCreateCourse.title}`),i(t,s.buiCreateCourse);}catch(e){h$1(e);}}),i$1.command("update").description("Update a course").argument("<id>","Course ID").option("--title <title>","Course title").option("--summary <s>","Short summary").option("--description <s>","Description").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--language <l>","Language code").option("--estimated-hours <n>","Estimated hours",c).option("--public <bool>","true|false",b).option("--instructor <id>","Instructor user ID").option("--skill <id>","Skill ID").option("--cover-file <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s={};if(e.title&&(s.title=e.title),e.summary!==void 0&&(s.summary=e.summary),e.description!==void 0&&(s.description=e.description),e.level&&(s.level=e.level.toUpperCase()),e.language&&(s.language=e.language),e.estimatedHours!==void 0&&(s.estimatedHours=e.estimatedHours),e.public!==void 0&&(s.isPublic=e.public),e.instructor&&(s.instructorId=e.instructor),e.skill&&(s.skillId=e.skill),e.coverFile&&(s.coverFileId=e.coverFile),e.tags&&(s.tags=y(e.tags)),!Object.keys(s).length)throw new q$1("No updates specified");let d=await b$1(w,{id:t,input:s});k$1("Course updated"),i(e,d.buiUpdateCourse);}catch(s){h$1(s);}}),i$1.command("publish").description("Publish a course through its authoring lifecycle").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(D,{id:t});k$1(`Course published: ${s.buiPublishCourse.title}`),i(e,s.buiPublishCourse);}catch(s){h$1(s);}}),i$1.command("archive").description("Archive a course").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(T,{id:t});k$1(s.buiArchiveCourse?"Course archived":"Course not archived"),i(e,{archived:s.buiArchiveCourse});}catch(s){h$1(s);}});}function st(a){let i$1=a.command("modules").description("Buildmyiq course modules");i$1.command("list").description("List modules for a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(k,{courseId:t.course});i(t,e.buiListModules.items,{headers:["ID","Title","Position","Description"],rows:e.buiListModules.items.map(s=>[r(s.id,12),s.title,String(s.position),r(s.description??"-",40)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a module").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Module title").option("--description <s>","Description").option("--position <n>","Ordering position",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title};t.description&&(e.description=t.description),t.position!==void 0&&(e.position=t.position);let s=await b$1(N,{input:e});k$1(`Module created: ${s.buiCreateModule.title}`),i(t,s.buiCreateModule);}catch(e){h$1(e);}});}function it(a){let i$1=a.command("lessons").description("Buildmyiq course lessons");i$1.command("list").description("List lessons for a course").requiredOption("--course <id>","Course ID").option("--module <id>","Filter by module ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1($,{courseId:t.course,moduleId:t.module});i(t,e.buiListLessons.items,{headers:["ID","Title","Type","Position","Duration","Preview"],rows:e.buiListLessons.items.map(s=>[r(s.id,12),s.title,s.type,String(s.position),s.durationMin!=null?String(s.durationMin):"-",s.isPreview?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a lesson").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Lesson title").option("--module <id>","Module ID").option("--type <t>","ARTICLE|VIDEO|QUIZ|ASSIGNMENT|LIVE_SESSION|INTERACTIVE","ARTICLE").option("--content <s>","Lesson content").option("--duration-min <n>","Duration (minutes)",c).option("--position <n>","Ordering position",c).option("--preview","Mark as a preview lesson").option("--media-file <id>","Media File ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,type:(t.type??"ARTICLE").toUpperCase()};t.module&&(e.moduleId=t.module),t.content&&(e.content=t.content),t.durationMin!==void 0&&(e.durationMin=t.durationMin),t.position!==void 0&&(e.position=t.position),t.preview&&(e.isPreview=!0),t.mediaFile&&(e.mediaFileId=t.mediaFile);let s=await b$1(x,{input:e});k$1(`Lesson created: ${s.buiCreateLesson.title}`),i(t,s.buiCreateLesson);}catch(e){h$1(e);}});}function rt(a){let i$1=a.command("skills").description("Buildmyiq skills taxonomy");i$1.command("list").description("List skills").option("--category <c>","TECHNICAL|COGNITIVE|CREATIVE|SOCIAL|BUSINESS|LANGUAGE").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(M,{category:t.category?t.category.toUpperCase():void 0});i(t,e.buiListSkills.items,{headers:["ID","Name","Category","Active","Description"],rows:e.buiListSkills.items.map(s=>[r(s.id,12),s.name,s.category,s.isActive?"yes":"no",r(s.description??"-",40)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a skill").requiredOption("--name <name>","Skill name").option("--category <c>","TECHNICAL|COGNITIVE|CREATIVE|SOCIAL|BUSINESS|LANGUAGE","TECHNICAL").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,category:(t.category??"TECHNICAL").toUpperCase()};t.description&&(e.description=t.description);let s=await b$1(P,{input:e});k$1(`Skill created: ${s.buiCreateSkill.name}`),i(t,s.buiCreateSkill);}catch(e){h$1(e);}});}function nt(a){let i$1=a.command("enrollments").description("Buildmyiq enrollments & lesson progress");i$1.command("list").description("List enrollments").option("--course <id>","Filter by course ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("--status <s>","ENROLLED|IN_PROGRESS|COMPLETED|DROPPED|EXPIRED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(B,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0}),d=t.learner?s.buiListEnrollments.items.filter(p=>p.learnerId===t.learner):s.buiListEnrollments.items;i(t,d,{headers:["ID","Course","Learner","Status","Progress %"],rows:d.map(p=>[r(p.id,12),r(p.courseId,12),r(p.learnerId,12),p.status,String(p.progressPct)])});}catch(e){h$1(e);}}),i$1.command("get").description("Get an enrollment by id").argument("<id>","Enrollment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(v,{id:t});if(!s.buiEnrollment)throw new q$1(`Enrollment ${t} not found`);i(e,s.buiEnrollment);}catch(s){h$1(s);}}),i$1.command("enroll").description("Enroll a learner in a course").requiredOption("--course <id>","Course ID").option("--learner <id>","Learner ID (defaults to the calling actor)").option("--cohort <id>","Cohort ID").option("--expires-at <iso>","Expiry (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course};t.learner&&(e.learnerId=t.learner),t.cohort&&(e.cohortId=t.cohort),t.expiresAt&&(e.expiresAt=t.expiresAt);let s=await b$1(U,{input:e});k$1(`Enrolled: ${s.buiEnroll.id}`),i(t,s.buiEnroll);}catch(e){h$1(e);}}),i$1.command("transition").description("Advance an enrollment through its lifecycle").argument("<id>","Enrollment ID").requiredOption("--status <s>","ENROLLED|IN_PROGRESS|COMPLETED|DROPPED|EXPIRED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(_,{id:t,status:e.status.toUpperCase()});k$1(`Enrollment status set to ${s.buiTransitionEnrollment.status}`),i(e,s.buiTransitionEnrollment);}catch(s){h$1(s);}}),i$1.command("record-progress").description("Record lesson progress for an enrollment").requiredOption("--enrollment <id>","Enrollment ID").requiredOption("--lesson <id>","Lesson ID").option("--status <s>","NOT_STARTED|IN_PROGRESS|COMPLETED","IN_PROGRESS").option("--seconds-spent <n>","Seconds spent",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={enrollmentId:t.enrollment,lessonId:t.lesson,status:(t.status??"IN_PROGRESS").toUpperCase()};t.secondsSpent!==void 0&&(e.secondsSpent=t.secondsSpent);let s=await b$1(q,{input:e});k$1(`Progress recorded: ${s.buiRecordLessonProgress.status}`),i(t,s.buiRecordLessonProgress);}catch(e){h$1(e);}});}function ot(a){let i$1=a.command("cohorts").description("Buildmyiq cohorts");i$1.command("list").description("List cohorts").option("--course <id>","Filter by course ID").option("--status <s>","SCHEDULED|ENROLLING|ACTIVE|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(G,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0});i(t,e.buiListCohorts.items,{headers:["ID","Name","Status","Capacity","Start","End"],rows:e.buiListCohorts.items.map(s=>[r(s.id,12),s.name,s.status,String(s.capacity),q$2(s.startDate),q$2(s.endDate)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a cohort").requiredOption("--course <id>","Course ID").requiredOption("--name <name>","Cohort name").option("--capacity <n>","Capacity",c).option("--facilitator <id>","Facilitator user ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,name:t.name};t.capacity!==void 0&&(e.capacity=t.capacity),t.facilitator&&(e.facilitatorId=t.facilitator),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate);let s=await b$1(H,{input:e});k$1(`Cohort created: ${s.buiCreateCohort.name}`),i(t,s.buiCreateCohort);}catch(e){h$1(e);}});}function at(a){let i$1=a.command("certificates").description("Buildmyiq certificates");i$1.command("list").description("List certificates").option("--course <id>","Filter by course ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(F,{courseId:t.course}),s=t.learner?e.buiListCertificates.items.filter(d=>d.learnerId===t.learner):e.buiListCertificates.items;i(t,s,{headers:["ID","Serial","Learner","Status","Score","Issued"],rows:s.map(d=>[r(d.id,12),d.serial,r(d.learnerId,12),d.status,d.finalScore!=null?String(d.finalScore):"-",q$2(d.issuedAt)])});}catch(e){h$1(e);}}),i$1.command("issue").description("Issue a certificate").requiredOption("--course <id>","Course ID").requiredOption("--learner <id>","Learner ID").requiredOption("--serial <s>","Certificate serial").option("--enrollment <id>","Enrollment ID").option("--final-score <n>","Final score",C).option("--file <id>","Rendered certificate PDF File ID").option("--expires-at <iso>","Expiry (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,learnerId:t.learner,serial:t.serial};t.enrollment&&(e.enrollmentId=t.enrollment),t.finalScore!==void 0&&(e.finalScore=t.finalScore),t.file&&(e.fileId=t.file),t.expiresAt&&(e.expiresAt=t.expiresAt);let s=await b$1(V,{input:e});k$1(`Certificate issued: ${s.buiIssueCertificate.serial}`),i(t,s.buiIssueCertificate);}catch(e){h$1(e);}}),i$1.command("revoke").description("Revoke a certificate").argument("<id>","Certificate ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(Q,{id:t});k$1(`Certificate revoked: ${s.buiRevokeCertificate.serial}`),i(e,s.buiRevokeCertificate);}catch(s){h$1(s);}});}function ut(a){let i$1=a.command("assessments").description("Buildmyiq assessments & questions");i$1.command("list").description("List assessments for a course").requiredOption("--course <id>","Course ID").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(K,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0});i(t,e.buiListAssessments.items,{headers:["ID","Title","Type","Status","Pass","Attempts","Graded"],rows:e.buiListAssessments.items.map(s=>[r(s.id,12),s.title,s.type,s.status,s.passingScore!=null?String(s.passingScore):"-",s.maxAttempts!=null?String(s.maxAttempts):"-",s.isGraded?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get an assessment by id").argument("<id>","Assessment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(W,{id:t});if(!s.buiAssessment)throw new q$1(`Assessment ${t} not found`);i(e,s.buiAssessment);}catch(s){h$1(s);}}),i$1.command("create").description("Create an assessment").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Assessment title").option("--type <t>","QUIZ|EXAM|ASSIGNMENT|SURVEY|PRACTICAL","QUIZ").option("--description <s>","Description").option("--passing-score <n>","Passing score",C).option("--max-attempts <n>","Max attempts",c).option("--time-limit-min <n>","Time limit (minutes)",c).option("--graded","Mark assessment as graded").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,type:(t.type??"QUIZ").toUpperCase()};t.description&&(e.description=t.description),t.passingScore!==void 0&&(e.passingScore=t.passingScore),t.maxAttempts!==void 0&&(e.maxAttempts=t.maxAttempts),t.timeLimitMin!==void 0&&(e.timeLimitMin=t.timeLimitMin),t.graded&&(e.isGraded=!0);let s=await b$1(j,{input:e});k$1(`Assessment created: ${s.buiCreateAssessment.title}`),i(t,s.buiCreateAssessment);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish an assessment").argument("<id>","Assessment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(J,{id:t});k$1(`Assessment published: ${s.buiPublishAssessment.title}`),i(e,s.buiPublishAssessment);}catch(s){h$1(s);}}),i$1.command("add-question").description("Add a question to an assessment").requiredOption("--assessment <id>","Assessment ID").requiredOption("--prompt <p>","Question prompt").option("--type <t>","SINGLE_CHOICE|MULTIPLE_CHOICE|TRUE_FALSE|SHORT_ANSWER|ESSAY|CODE","SINGLE_CHOICE").option("--points <n>","Points",C).option("--position <n>","Ordering position",c).option("--explanation <s>","Explanation").option("--options <json>","Options JSON").option("--answer-key <json>","Answer key JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={assessmentId:t.assessment,prompt:t.prompt,type:(t.type??"SINGLE_CHOICE").toUpperCase()};t.points!==void 0&&(e.points=t.points),t.position!==void 0&&(e.position=t.position),t.explanation&&(e.explanation=t.explanation),t.options&&(e.options=E("options",t.options)),t.answerKey&&(e.answerKey=E("answer-key",t.answerKey));let s=await b$1(X,{input:e});k$1(`Question added: ${r(s.buiCreateQuestion.prompt,40)}`),i(t,s.buiCreateQuestion);}catch(e){h$1(e);}});}function dt(a){let i$1=a.command("submissions").description("Buildmyiq assessment submissions");i$1.command("list").description("List submissions").option("--assessment <id>","Filter by assessment ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("--status <s>","IN_PROGRESS|SUBMITTED|GRADING|GRADED|RETURNED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(Z,{assessmentId:t.assessment,status:t.status?t.status.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0}),d=t.learner?s.buiListSubmissions.items.filter(p=>p.learnerId===t.learner):s.buiListSubmissions.items;i(t,d,{headers:["ID","Assessment","Learner","Attempt","Status","Score","Passed"],rows:d.map(p=>[r(p.id,12),r(p.assessmentId,12),r(p.learnerId,12),String(p.attempt),p.status,p.score!=null?String(p.score):"-",p.passed==null?"-":p.passed?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("submit").description("Submit an assessment attempt").requiredOption("--assessment <id>","Assessment ID").option("--enrollment <id>","Enrollment ID").option("--attempt <n>","Attempt number",c).option("--answers <json>","Answers JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={assessmentId:t.assessment};t.enrollment&&(e.enrollmentId=t.enrollment),t.attempt!==void 0&&(e.attempt=t.attempt),t.answers&&(e.answers=E("answers",t.answers));let s=await b$1(z,{input:e});k$1(`Submission created: ${s.buiSubmitAssessment.id}`),i(t,s.buiSubmitAssessment);}catch(e){h$1(e);}}),i$1.command("grade").description("Grade a submission").argument("<id>","Submission ID").requiredOption("--score <n>","Score",C).option("--passed <bool>","true|false",b).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s={score:e.score};e.passed!==void 0&&(s.passed=e.passed),e.feedback&&(s.feedback=e.feedback);let d=await b$1(Y,{id:t,input:s});k$1(`Submission graded: ${d.buiGradeSubmission.status}`),i(e,d.buiGradeSubmission);}catch(s){h$1(s);}});}function mt(a){a.command("health").description("Buildmyiq subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(tt);k$1(t.buiHealth),i(i$1,{health:t.buiHealth});}catch(t){h$1(t);}});}var ct={id:"buildmyiq",version:"1.0.0",displayName:"Buildmyiq",dependsOn:["auth","workspaces"],register(a$1,i){a(i);let t=a$1.command("buildmyiq").description("Buildmyiq education, learning & development platform");et(t),st(t),it(t),rt(t),nt(t),ot(t),at(t),ut(t),dt(t),mt(t);}},re=ct;export{re as default};
|
|
228
|
+
`;function E(a,i){try{return JSON.parse(i)}catch{throw new j$1(`--${a} must be valid JSON`)}}function c(a){let i=Number.parseInt(a,10);if(Number.isNaN(i))throw new j$1(`Expected an integer but got "${a}"`);return i}function C(a){let i=Number.parseFloat(a);if(Number.isNaN(i))throw new j$1(`Expected a number but got "${a}"`);return i}function b(a){return a==="true"}function y(a){return a.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function et(a){let i$1=a.command("courses").description("Buildmyiq courses");i$1.command("list").description("List courses").option("--status <s>","DRAFT|IN_REVIEW|PUBLISHED|ARCHIVED").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(O,{status:t.status?t.status.toUpperCase():void 0,level:t.level?t.level.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0});i(t,s.buiListCourses.items,{headers:["ID","Title","Level","Status","Language","Hours"],rows:s.buiListCourses.items.map(d=>[r(d.id,12),d.title,d.level,d.status,d.language??"-",d.estimatedHours!=null?String(d.estimatedHours):"-"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a course by id").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(R,{id:t});if(!s.buiCourse)throw new j$1(`Course ${t} not found`);i(e,s.buiCourse);}catch(s){h$1(s);}}),i$1.command("create").description("Create a course").requiredOption("--slug <slug>","URL slug").requiredOption("--title <title>","Course title").option("--summary <s>","Short summary").option("--description <s>","Description").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT","BEGINNER").option("--language <l>","Language code").option("--estimated-hours <n>","Estimated hours",c).option("--public","Make the course public").option("--instructor <id>","Instructor user ID").option("--skill <id>","Skill ID").option("--cover-file <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={slug:t.slug,title:t.title,level:(t.level??"BEGINNER").toUpperCase()};t.summary&&(e.summary=t.summary),t.description&&(e.description=t.description),t.language&&(e.language=t.language),t.estimatedHours!==void 0&&(e.estimatedHours=t.estimatedHours),t.public&&(e.isPublic=!0),t.instructor&&(e.instructorId=t.instructor),t.skill&&(e.skillId=t.skill),t.coverFile&&(e.coverFileId=t.coverFile),t.tags&&(e.tags=y(t.tags));let s=await b$1(h,{input:e});k$1(`Course created: ${s.buiCreateCourse.title}`),i(t,s.buiCreateCourse);}catch(e){h$1(e);}}),i$1.command("update").description("Update a course").argument("<id>","Course ID").option("--title <title>","Course title").option("--summary <s>","Short summary").option("--description <s>","Description").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--language <l>","Language code").option("--estimated-hours <n>","Estimated hours",c).option("--public <bool>","true|false",b).option("--instructor <id>","Instructor user ID").option("--skill <id>","Skill ID").option("--cover-file <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s={};if(e.title&&(s.title=e.title),e.summary!==void 0&&(s.summary=e.summary),e.description!==void 0&&(s.description=e.description),e.level&&(s.level=e.level.toUpperCase()),e.language&&(s.language=e.language),e.estimatedHours!==void 0&&(s.estimatedHours=e.estimatedHours),e.public!==void 0&&(s.isPublic=e.public),e.instructor&&(s.instructorId=e.instructor),e.skill&&(s.skillId=e.skill),e.coverFile&&(s.coverFileId=e.coverFile),e.tags&&(s.tags=y(e.tags)),!Object.keys(s).length)throw new j$1("No updates specified");let d=await b$1(w,{id:t,input:s});k$1("Course updated"),i(e,d.buiUpdateCourse);}catch(s){h$1(s);}}),i$1.command("publish").description("Publish a course through its authoring lifecycle").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(D,{id:t});k$1(`Course published: ${s.buiPublishCourse.title}`),i(e,s.buiPublishCourse);}catch(s){h$1(s);}}),i$1.command("archive").description("Archive a course").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(T,{id:t});k$1(s.buiArchiveCourse?"Course archived":"Course not archived"),i(e,{archived:s.buiArchiveCourse});}catch(s){h$1(s);}});}function st(a){let i$1=a.command("modules").description("Buildmyiq course modules");i$1.command("list").description("List modules for a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(k,{courseId:t.course});i(t,e.buiListModules.items,{headers:["ID","Title","Position","Description"],rows:e.buiListModules.items.map(s=>[r(s.id,12),s.title,String(s.position),r(s.description??"-",40)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a module").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Module title").option("--description <s>","Description").option("--position <n>","Ordering position",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title};t.description&&(e.description=t.description),t.position!==void 0&&(e.position=t.position);let s=await b$1(N,{input:e});k$1(`Module created: ${s.buiCreateModule.title}`),i(t,s.buiCreateModule);}catch(e){h$1(e);}});}function it(a){let i$1=a.command("lessons").description("Buildmyiq course lessons");i$1.command("list").description("List lessons for a course").requiredOption("--course <id>","Course ID").option("--module <id>","Filter by module ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1($,{courseId:t.course,moduleId:t.module});i(t,e.buiListLessons.items,{headers:["ID","Title","Type","Position","Duration","Preview"],rows:e.buiListLessons.items.map(s=>[r(s.id,12),s.title,s.type,String(s.position),s.durationMin!=null?String(s.durationMin):"-",s.isPreview?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a lesson").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Lesson title").option("--module <id>","Module ID").option("--type <t>","ARTICLE|VIDEO|QUIZ|ASSIGNMENT|LIVE_SESSION|INTERACTIVE","ARTICLE").option("--content <s>","Lesson content").option("--duration-min <n>","Duration (minutes)",c).option("--position <n>","Ordering position",c).option("--preview","Mark as a preview lesson").option("--media-file <id>","Media File ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,type:(t.type??"ARTICLE").toUpperCase()};t.module&&(e.moduleId=t.module),t.content&&(e.content=t.content),t.durationMin!==void 0&&(e.durationMin=t.durationMin),t.position!==void 0&&(e.position=t.position),t.preview&&(e.isPreview=!0),t.mediaFile&&(e.mediaFileId=t.mediaFile);let s=await b$1(x,{input:e});k$1(`Lesson created: ${s.buiCreateLesson.title}`),i(t,s.buiCreateLesson);}catch(e){h$1(e);}});}function rt(a){let i$1=a.command("skills").description("Buildmyiq skills taxonomy");i$1.command("list").description("List skills").option("--category <c>","TECHNICAL|COGNITIVE|CREATIVE|SOCIAL|BUSINESS|LANGUAGE").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(M,{category:t.category?t.category.toUpperCase():void 0});i(t,e.buiListSkills.items,{headers:["ID","Name","Category","Active","Description"],rows:e.buiListSkills.items.map(s=>[r(s.id,12),s.name,s.category,s.isActive?"yes":"no",r(s.description??"-",40)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a skill").requiredOption("--name <name>","Skill name").option("--category <c>","TECHNICAL|COGNITIVE|CREATIVE|SOCIAL|BUSINESS|LANGUAGE","TECHNICAL").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,category:(t.category??"TECHNICAL").toUpperCase()};t.description&&(e.description=t.description);let s=await b$1(P,{input:e});k$1(`Skill created: ${s.buiCreateSkill.name}`),i(t,s.buiCreateSkill);}catch(e){h$1(e);}});}function nt(a){let i$1=a.command("enrollments").description("Buildmyiq enrollments & lesson progress");i$1.command("list").description("List enrollments").option("--course <id>","Filter by course ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("--status <s>","ENROLLED|IN_PROGRESS|COMPLETED|DROPPED|EXPIRED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(B,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0}),d=t.learner?s.buiListEnrollments.items.filter(p=>p.learnerId===t.learner):s.buiListEnrollments.items;i(t,d,{headers:["ID","Course","Learner","Status","Progress %"],rows:d.map(p=>[r(p.id,12),r(p.courseId,12),r(p.learnerId,12),p.status,String(p.progressPct)])});}catch(e){h$1(e);}}),i$1.command("get").description("Get an enrollment by id").argument("<id>","Enrollment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(v,{id:t});if(!s.buiEnrollment)throw new j$1(`Enrollment ${t} not found`);i(e,s.buiEnrollment);}catch(s){h$1(s);}}),i$1.command("enroll").description("Enroll a learner in a course").requiredOption("--course <id>","Course ID").option("--learner <id>","Learner ID (defaults to the calling actor)").option("--cohort <id>","Cohort ID").option("--expires-at <iso>","Expiry (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course};t.learner&&(e.learnerId=t.learner),t.cohort&&(e.cohortId=t.cohort),t.expiresAt&&(e.expiresAt=t.expiresAt);let s=await b$1(U,{input:e});k$1(`Enrolled: ${s.buiEnroll.id}`),i(t,s.buiEnroll);}catch(e){h$1(e);}}),i$1.command("transition").description("Advance an enrollment through its lifecycle").argument("<id>","Enrollment ID").requiredOption("--status <s>","ENROLLED|IN_PROGRESS|COMPLETED|DROPPED|EXPIRED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(_,{id:t,status:e.status.toUpperCase()});k$1(`Enrollment status set to ${s.buiTransitionEnrollment.status}`),i(e,s.buiTransitionEnrollment);}catch(s){h$1(s);}}),i$1.command("record-progress").description("Record lesson progress for an enrollment").requiredOption("--enrollment <id>","Enrollment ID").requiredOption("--lesson <id>","Lesson ID").option("--status <s>","NOT_STARTED|IN_PROGRESS|COMPLETED","IN_PROGRESS").option("--seconds-spent <n>","Seconds spent",c).option("-f, --format <format>","Output format").action(async t=>{try{let e={enrollmentId:t.enrollment,lessonId:t.lesson,status:(t.status??"IN_PROGRESS").toUpperCase()};t.secondsSpent!==void 0&&(e.secondsSpent=t.secondsSpent);let s=await b$1(q,{input:e});k$1(`Progress recorded: ${s.buiRecordLessonProgress.status}`),i(t,s.buiRecordLessonProgress);}catch(e){h$1(e);}});}function ot(a){let i$1=a.command("cohorts").description("Buildmyiq cohorts");i$1.command("list").description("List cohorts").option("--course <id>","Filter by course ID").option("--status <s>","SCHEDULED|ENROLLING|ACTIVE|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(G,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0});i(t,e.buiListCohorts.items,{headers:["ID","Name","Status","Capacity","Start","End"],rows:e.buiListCohorts.items.map(s=>[r(s.id,12),s.name,s.status,String(s.capacity),q$1(s.startDate),q$1(s.endDate)])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a cohort").requiredOption("--course <id>","Course ID").requiredOption("--name <name>","Cohort name").option("--capacity <n>","Capacity",c).option("--facilitator <id>","Facilitator user ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,name:t.name};t.capacity!==void 0&&(e.capacity=t.capacity),t.facilitator&&(e.facilitatorId=t.facilitator),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate);let s=await b$1(H,{input:e});k$1(`Cohort created: ${s.buiCreateCohort.name}`),i(t,s.buiCreateCohort);}catch(e){h$1(e);}});}function at(a){let i$1=a.command("certificates").description("Buildmyiq certificates");i$1.command("list").description("List certificates").option("--course <id>","Filter by course ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(F,{courseId:t.course}),s=t.learner?e.buiListCertificates.items.filter(d=>d.learnerId===t.learner):e.buiListCertificates.items;i(t,s,{headers:["ID","Serial","Learner","Status","Score","Issued"],rows:s.map(d=>[r(d.id,12),d.serial,r(d.learnerId,12),d.status,d.finalScore!=null?String(d.finalScore):"-",q$1(d.issuedAt)])});}catch(e){h$1(e);}}),i$1.command("issue").description("Issue a certificate").requiredOption("--course <id>","Course ID").requiredOption("--learner <id>","Learner ID").requiredOption("--serial <s>","Certificate serial").option("--enrollment <id>","Enrollment ID").option("--final-score <n>","Final score",C).option("--file <id>","Rendered certificate PDF File ID").option("--expires-at <iso>","Expiry (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,learnerId:t.learner,serial:t.serial};t.enrollment&&(e.enrollmentId=t.enrollment),t.finalScore!==void 0&&(e.finalScore=t.finalScore),t.file&&(e.fileId=t.file),t.expiresAt&&(e.expiresAt=t.expiresAt);let s=await b$1(V,{input:e});k$1(`Certificate issued: ${s.buiIssueCertificate.serial}`),i(t,s.buiIssueCertificate);}catch(e){h$1(e);}}),i$1.command("revoke").description("Revoke a certificate").argument("<id>","Certificate ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(Q,{id:t});k$1(`Certificate revoked: ${s.buiRevokeCertificate.serial}`),i(e,s.buiRevokeCertificate);}catch(s){h$1(s);}});}function ut(a){let i$1=a.command("assessments").description("Buildmyiq assessments & questions");i$1.command("list").description("List assessments for a course").requiredOption("--course <id>","Course ID").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(K,{courseId:t.course,status:t.status?t.status.toUpperCase():void 0});i(t,e.buiListAssessments.items,{headers:["ID","Title","Type","Status","Pass","Attempts","Graded"],rows:e.buiListAssessments.items.map(s=>[r(s.id,12),s.title,s.type,s.status,s.passingScore!=null?String(s.passingScore):"-",s.maxAttempts!=null?String(s.maxAttempts):"-",s.isGraded?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get an assessment by id").argument("<id>","Assessment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(W,{id:t});if(!s.buiAssessment)throw new j$1(`Assessment ${t} not found`);i(e,s.buiAssessment);}catch(s){h$1(s);}}),i$1.command("create").description("Create an assessment").requiredOption("--course <id>","Course ID").requiredOption("--title <title>","Assessment title").option("--type <t>","QUIZ|EXAM|ASSIGNMENT|SURVEY|PRACTICAL","QUIZ").option("--description <s>","Description").option("--passing-score <n>","Passing score",C).option("--max-attempts <n>","Max attempts",c).option("--time-limit-min <n>","Time limit (minutes)",c).option("--graded","Mark assessment as graded").option("-f, --format <format>","Output format").action(async t=>{try{let e={courseId:t.course,title:t.title,type:(t.type??"QUIZ").toUpperCase()};t.description&&(e.description=t.description),t.passingScore!==void 0&&(e.passingScore=t.passingScore),t.maxAttempts!==void 0&&(e.maxAttempts=t.maxAttempts),t.timeLimitMin!==void 0&&(e.timeLimitMin=t.timeLimitMin),t.graded&&(e.isGraded=!0);let s=await b$1(j,{input:e});k$1(`Assessment created: ${s.buiCreateAssessment.title}`),i(t,s.buiCreateAssessment);}catch(e){h$1(e);}}),i$1.command("publish").description("Publish an assessment").argument("<id>","Assessment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s=await b$1(J,{id:t});k$1(`Assessment published: ${s.buiPublishAssessment.title}`),i(e,s.buiPublishAssessment);}catch(s){h$1(s);}}),i$1.command("add-question").description("Add a question to an assessment").requiredOption("--assessment <id>","Assessment ID").requiredOption("--prompt <p>","Question prompt").option("--type <t>","SINGLE_CHOICE|MULTIPLE_CHOICE|TRUE_FALSE|SHORT_ANSWER|ESSAY|CODE","SINGLE_CHOICE").option("--points <n>","Points",C).option("--position <n>","Ordering position",c).option("--explanation <s>","Explanation").option("--options <json>","Options JSON").option("--answer-key <json>","Answer key JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={assessmentId:t.assessment,prompt:t.prompt,type:(t.type??"SINGLE_CHOICE").toUpperCase()};t.points!==void 0&&(e.points=t.points),t.position!==void 0&&(e.position=t.position),t.explanation&&(e.explanation=t.explanation),t.options&&(e.options=E("options",t.options)),t.answerKey&&(e.answerKey=E("answer-key",t.answerKey));let s=await b$1(X,{input:e});k$1(`Question added: ${r(s.buiCreateQuestion.prompt,40)}`),i(t,s.buiCreateQuestion);}catch(e){h$1(e);}});}function dt(a){let i$1=a.command("submissions").description("Buildmyiq assessment submissions");i$1.command("list").description("List submissions").option("--assessment <id>","Filter by assessment ID").option("--learner <id>","Only this learner's rows (filtered client-side)").option("--status <s>","IN_PROGRESS|SUBMITTED|GRADING|GRADED|RETURNED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("--cursor <c>","Pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.limit!==void 0&&(e.limit=t.limit),t.offset!==void 0&&(e.offset=t.offset),t.cursor&&(e.cursor=t.cursor);let s=await b$1(Z,{assessmentId:t.assessment,status:t.status?t.status.toUpperCase():void 0,pagination:Object.keys(e).length?e:void 0}),d=t.learner?s.buiListSubmissions.items.filter(p=>p.learnerId===t.learner):s.buiListSubmissions.items;i(t,d,{headers:["ID","Assessment","Learner","Attempt","Status","Score","Passed"],rows:d.map(p=>[r(p.id,12),r(p.assessmentId,12),r(p.learnerId,12),String(p.attempt),p.status,p.score!=null?String(p.score):"-",p.passed==null?"-":p.passed?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("submit").description("Submit an assessment attempt").requiredOption("--assessment <id>","Assessment ID").option("--enrollment <id>","Enrollment ID").option("--attempt <n>","Attempt number",c).option("--answers <json>","Answers JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={assessmentId:t.assessment};t.enrollment&&(e.enrollmentId=t.enrollment),t.attempt!==void 0&&(e.attempt=t.attempt),t.answers&&(e.answers=E("answers",t.answers));let s=await b$1(z,{input:e});k$1(`Submission created: ${s.buiSubmitAssessment.id}`),i(t,s.buiSubmitAssessment);}catch(e){h$1(e);}}),i$1.command("grade").description("Grade a submission").argument("<id>","Submission ID").requiredOption("--score <n>","Score",C).option("--passed <bool>","true|false",b).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let s={score:e.score};e.passed!==void 0&&(s.passed=e.passed),e.feedback&&(s.feedback=e.feedback);let d=await b$1(Y,{id:t,input:s});k$1(`Submission graded: ${d.buiGradeSubmission.status}`),i(e,d.buiGradeSubmission);}catch(s){h$1(s);}});}function mt(a){a.command("health").description("Buildmyiq subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(tt);k$1(t.buiHealth),i(i$1,{health:t.buiHealth});}catch(t){h$1(t);}});}var ct={id:"buildmyiq",version:"1.0.0",displayName:"Buildmyiq",dependsOn:["auth","workspaces"],register(a$1,i){a(i);let t=a$1.command("buildmyiq").description("Buildmyiq education, learning & development platform");et(t),st(t),it(t),rt(t),nt(t),ot(t),at(t),ut(t),dt(t),mt(t);}},re=ct;export{re as default};
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var s=class extends Error{exitCode;hint;constructor(o,a){super(o),this.name="CliUserError",this.exitCode=a?.exitCode??1,this.hint=a?.hint;}},g=class extends s{constructor(o,a){super(o,{exitCode:2,hint:a?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},p=class extends Error{cause;constructor(o,a){super(o),this.name="CliInternalError",this.cause=a;}};function y(n){if(n instanceof g||n instanceof s)return n;let o=w(n)&&w(n.response)?n.response:void 0,a=o?.errors,m=Array.isArray(a)?a[0]:void 0,t=(w(m)&&w(m.extensions)?m.extensions:void 0)?.code,r=o?.status;return t==="UNAUTHENTICATED"||r===401?new g("Authentication required."):t==="FORBIDDEN"||r===403?new s("Permission denied."):t==="BAD_USER_INPUT"||t==="GRAPHQL_VALIDATION_FAILED"||r===400?new s("Invalid request. Check the command arguments."):t==="NOT_FOUND"||r===404?new s("Requested resource was not found."):t==="RATE_LIMITED"||t==="TOO_MANY_REQUESTS"||r===429?new s("Request limit reached. Try again later."):new p("The request could not be completed. Try again later.")}var C=class extends Error{response;constructor(o,a){super(o),this.name="GqlRequestError",this.response=a;}};function w(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}var k=null;function A(n){k=n;}function f(){if(!k)throw new p("vibecontrols module helpers used before setHelpersContext was called");return k}async function u(n,o){return f().gql.global.request(n,o)}function l(n){throw n instanceof g||n instanceof s||n instanceof p?n:n instanceof C||n!==null&&typeof n=="object"&&"response"in n?y(n):new p("The command could not be completed. Try again later.")}function d(n,o,a){f().output.formatAndOutput(n,o,a);}function h(n){f().output.printSuccess(n);}function x(n){f().output.printWarning(n);}function E(n){return f().output.formatStatus(n)}function v(n){return f().output.formatDate(n)}function T(n,o){return f().output.truncate(n,o)}function O(){return f()}var S=`
|
|
2
2
|
query GetChannels($filter: ChannelFilterInput, $pagination: ChannelPaginationInput) {
|
|
3
3
|
getChannels(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id name platform adapterType status connectionHealth priority createdAt }
|
|
5
5
|
total hasMore
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,R=`
|
|
9
9
|
query GetChannel($id: ID!) {
|
|
10
10
|
getChannel(id: $id) {
|
|
11
11
|
id name platform adapterType status channelType
|
|
12
12
|
connection { id authType isActive isHealthy }
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`,N=`
|
|
16
16
|
mutation CreateChannel($input: CreateChannelInput!) {
|
|
17
17
|
createChannel(input: $input) {
|
|
18
18
|
id name platform adapterType status
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,q=`
|
|
22
22
|
mutation DeleteChannel($id: ID!) {
|
|
23
23
|
deleteChannel(id: $id)
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,D=`
|
|
26
26
|
mutation SendChannelMessage($input: SendMessageInput!) {
|
|
27
27
|
sendMessage(input: $input) {
|
|
28
28
|
success messageId attemptId willRetry nextRetryAt error
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
`,$=`
|
|
32
32
|
query GetChannelDeliveryAttempts($channelId: ID!, $cursor: String, $limit: Int) {
|
|
33
33
|
getChannelDeliveryAttempts(channelId: $channelId, cursor: $cursor, limit: $limit) {
|
|
34
34
|
items { id channelId status sentAt retryCount errorMessage }
|
|
35
35
|
total hasMore
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
`,L=`
|
|
39
39
|
query ListChannelUsers($channelId: ID!, $pagination: ChannelPaginationInput) {
|
|
40
40
|
listUserPlatformConnectionsByChannel(channelId: $channelId, pagination: $pagination) {
|
|
41
41
|
items { id externalUserId externalDisplayName platform dmAllowed presenceStatus }
|
|
42
42
|
total hasMore
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,_=`
|
|
46
46
|
query GetChannelWebhookEvents($channelId: ID!, $cursor: String, $limit: Int) {
|
|
47
47
|
getChannelWebhookEvents(channelId: $channelId, cursor: $cursor, limit: $limit) {
|
|
48
48
|
items { id eventType status createdAt }
|
|
49
49
|
total hasMore
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,P=`
|
|
53
53
|
query GetConnectionsByOrg($organizationId: ID!, $pagination: ChannelPaginationInput) {
|
|
54
54
|
getConnectionsByOrganization(organizationId: $organizationId, pagination: $pagination) {
|
|
55
55
|
items { id channelId authType tokenExpiresAt isActive isHealthy }
|
|
56
56
|
total hasMore
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,G=`
|
|
60
60
|
mutation CreateChannelConnection($input: CreateConnectionInput!) {
|
|
61
61
|
createConnection(input: $input) {
|
|
62
62
|
id channelId authType isActive
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,W=`
|
|
66
66
|
mutation DeleteChannelConnection($id: ID!) {
|
|
67
67
|
deleteConnection(id: $id)
|
|
68
68
|
}
|
|
69
|
-
`;function
|
|
69
|
+
`;function M(n){let o=n.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");o.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.platform&&(t.platform=e.platform.toUpperCase()),e.status&&(t.status=e.status.toUpperCase());let r=await u(S,{filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});d(e,r.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:r.getChannels.items.map(i=>[T(i.id,12),i.name,i.platform,E(i.status),String(i.priority??"-")])});}catch(t){l(t);}}),o.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await u(R,{id:e});if(!r.getChannel)throw new s(`Channel ${e} not found`);d(t,r.getChannel);}catch(r){l(r);}}),o.command("create").description("Create a channel").requiredOption("--name <s>").requiredOption("--platform <p>","EMAIL|SMS|SLACK|TEAMS|DISCORD|WHATSAPP|WEBHOOK").option("--organization <id>","Organization id (defaults to current actor org)").option("--adapter <t>").option("-f, --format <format>").action(async e=>{try{let t=e.organization??O().auth.read()?.organizationId;if(!t)throw new s("No organization context. Pass --organization <id> or set auth.organizationId.");let r={name:e.name,platform:e.platform.toUpperCase(),organizationId:t,adapterType:e.adapter?e.adapter.toUpperCase():void 0},i=await u(N,{input:r});h("Channel created"),d(e,i.createChannel);}catch(t){l(t);}}),o.command("delete").description("Delete a channel").argument("<id>").action(async e=>{try{await u(q,{id:e}),h("Channel deleted");}catch(t){l(t);}}),o.command("send").description("Send a message via a channel").argument("<channelId>").requiredOption("--content <s>").option("--recipient <id>","External recipient id (e.g. email)").option("--subject <s>").option("-f, --format <format>").action(async(e,t)=>{try{let r={channelId:e,content:t.content,recipientId:t.recipient,subject:t.subject},i=await u(D,{input:r});i.sendMessage.success?h(`Sent: ${i.sendMessage.messageId??"(no id)"}`):i.sendMessage.willRetry?x(`Delivery failed, will retry: ${i.sendMessage.error??"unknown error"}`):x(`Delivery failed: ${i.sendMessage.error??"unknown error"}`),d(t,i.sendMessage);}catch(r){l(r);}}),o.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let r=await u($,{channelId:e,limit:t.limit});d(t,r.getChannelDeliveryAttempts.items);}catch(r){l(r);}}),o.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let r=await u(L,{channelId:e,pagination:{limit:t.limit,offset:0}});d(t,r.listUserPlatformConnectionsByChannel.items);}catch(r){l(r);}}),o.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let r=await u(_,{channelId:e,limit:t.limit});d(t,r.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:r.getChannelWebhookEvents.items.map(i=>[T(i.id,12),i.eventType,E(i.status),v(i.createdAt)])});}catch(r){l(r);}});let m=o.command("connections").description("Channel connections (OAuth/API keys)");m.command("list").description("List connections for an organization").requiredOption("--organization <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await u(P,{organizationId:e.organization,pagination:{limit:e.limit,offset:0}});d(e,t.getConnectionsByOrganization.items);}catch(t){l(t);}}),m.command("create").description("Create a channel connection").requiredOption("--channel <id>").requiredOption("--auth-type <t>","OAUTH|API_KEY|WEBHOOK").option("-f, --format <format>").action(async e=>{try{let t={channelId:e.channel,authType:e.authType.toUpperCase()},r=await u(G,{input:t});h("Connection created"),d(e,r.createConnection);}catch(t){l(t);}}),m.command("delete").description("Delete a connection").argument("<id>").action(async e=>{try{await u(W,{id:e}),h("Connection deleted");}catch(t){l(t);}});}var Z={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(n,o){A(o),M(n);}},pt=Z;module.exports=pt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,i,r,p,h,u,k,n,q
|
|
1
|
+
import {a,c,i,r,p,h,u,k,n,q}from'../../chunk-BGNPGKJM.js';import {j}from'../../chunk-N7EXKGE2.js';var I=`
|
|
2
2
|
query GetChannels($filter: ChannelFilterInput, $pagination: ChannelPaginationInput) {
|
|
3
3
|
getChannels(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id name platform adapterType status connectionHealth priority createdAt }
|
|
@@ -66,4 +66,4 @@ import {a,c,i,r,p,h,u,k,n,q as q$1}from'../../chunk-3ZVMC2AF.js';import {q}from'
|
|
|
66
66
|
mutation DeleteChannelConnection($id: ID!) {
|
|
67
67
|
deleteConnection(id: $id)
|
|
68
68
|
}
|
|
69
|
-
`;function H(l){let r$1=l.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");r$1.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let n={};t.platform&&(n.platform=t.platform.toUpperCase()),t.status&&(n.status=t.status.toUpperCase());let e=await c(I,{filter:Object.keys(n).length?n:void 0,pagination:{limit:t.limit,offset:0}});i(t,e.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:e.getChannels.items.map(a=>[r(a.id,12),a.name,a.platform,p(a.status),String(a.priority??"-")])});}catch(n){h(n);}}),r$1.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(N,{id:t});if(!e.getChannel)throw new
|
|
69
|
+
`;function H(l){let r$1=l.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");r$1.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let n={};t.platform&&(n.platform=t.platform.toUpperCase()),t.status&&(n.status=t.status.toUpperCase());let e=await c(I,{filter:Object.keys(n).length?n:void 0,pagination:{limit:t.limit,offset:0}});i(t,e.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:e.getChannels.items.map(a=>[r(a.id,12),a.name,a.platform,p(a.status),String(a.priority??"-")])});}catch(n){h(n);}}),r$1.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(N,{id:t});if(!e.getChannel)throw new j(`Channel ${t} not found`);i(n,e.getChannel);}catch(e){h(e);}}),r$1.command("create").description("Create a channel").requiredOption("--name <s>").requiredOption("--platform <p>","EMAIL|SMS|SLACK|TEAMS|DISCORD|WHATSAPP|WEBHOOK").option("--organization <id>","Organization id (defaults to current actor org)").option("--adapter <t>").option("-f, --format <format>").action(async t=>{try{let n=t.organization??u().auth.read()?.organizationId;if(!n)throw new j("No organization context. Pass --organization <id> or set auth.organizationId.");let e={name:t.name,platform:t.platform.toUpperCase(),organizationId:n,adapterType:t.adapter?t.adapter.toUpperCase():void 0},a=await c(A,{input:e});k("Channel created"),i(t,a.createChannel);}catch(n){h(n);}}),r$1.command("delete").description("Delete a channel").argument("<id>").action(async t=>{try{await c(T,{id:t}),k("Channel deleted");}catch(n){h(n);}}),r$1.command("send").description("Send a message via a channel").argument("<channelId>").requiredOption("--content <s>").option("--recipient <id>","External recipient id (e.g. email)").option("--subject <s>").option("-f, --format <format>").action(async(t,n$1)=>{try{let e={channelId:t,content:n$1.content,recipientId:n$1.recipient,subject:n$1.subject},a=await c(_,{input:e});a.sendMessage.success?k(`Sent: ${a.sendMessage.messageId??"(no id)"}`):a.sendMessage.willRetry?n(`Delivery failed, will retry: ${a.sendMessage.error??"unknown error"}`):n(`Delivery failed: ${a.sendMessage.error??"unknown error"}`),i(n$1,a.sendMessage);}catch(e){h(e);}}),r$1.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(S,{channelId:t,limit:n.limit});i(n,e.getChannelDeliveryAttempts.items);}catch(e){h(e);}}),r$1.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c($,{channelId:t,pagination:{limit:n.limit,offset:0}});i(n,e.listUserPlatformConnectionsByChannel.items);}catch(e){h(e);}}),r$1.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(O,{channelId:t,limit:n.limit});i(n,e.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:e.getChannelWebhookEvents.items.map(a=>[r(a.id,12),a.eventType,p(a.status),q(a.createdAt)])});}catch(e){h(e);}});let m=r$1.command("connections").description("Channel connections (OAuth/API keys)");m.command("list").description("List connections for an organization").requiredOption("--organization <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n=await c(w,{organizationId:t.organization,pagination:{limit:t.limit,offset:0}});i(t,n.getConnectionsByOrganization.items);}catch(n){h(n);}}),m.command("create").description("Create a channel connection").requiredOption("--channel <id>").requiredOption("--auth-type <t>","OAUTH|API_KEY|WEBHOOK").option("-f, --format <format>").action(async t=>{try{let n={channelId:t.channel,authType:t.authType.toUpperCase()},e=await c(L,{input:n});k("Connection created"),i(t,e.createConnection);}catch(n){h(n);}}),m.command("delete").description("Delete a connection").argument("<id>").action(async t=>{try{await c(D,{id:t}),k("Connection deleted");}catch(n){h(n);}});}var M={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(l,r){a(r),H(l);}},U=M;export{U as default};
|