@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 as a$1,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-
|
|
1
|
+
import {a as a$1,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-BGNPGKJM.js';import {j as j$1}from'../../chunk-N7EXKGE2.js';var S=`
|
|
2
2
|
id firstName lastName email phone position department location type status
|
|
3
3
|
salary performanceScore managerId avatar startDate workspaceId
|
|
4
4
|
`,N=`
|
|
@@ -140,4 +140,4 @@ import {a as a$1,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-3ZVMC2AF.js';
|
|
|
140
140
|
query CrewfoundryHealth {
|
|
141
141
|
_empty
|
|
142
142
|
}
|
|
143
|
-
`;function y(m){let o=Number.parseInt(m,10);if(Number.isNaN(o))throw new q(`Expected an integer but got "${m}"`);return o}function f(m){let o=Number.parseFloat(m);if(Number.isNaN(o))throw new q(`Expected a number but got "${m}"`);return o}function g(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function st(m){let o=m.command("employees").description("Crewfoundry employees");o.command("list").description("List employees").option("--department <d>","Filter by department").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(h)).crewfoundryBootstrap.employees;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Name","Email","Department","Position","Status"],rows:t.map(r$1=>[r(r$1.id,12),`${r$1.firstName} ${r$1.lastName}`,r$1.email,r$1.department,r$1.position,r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get an employee by id").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(h)).crewfoundryBootstrap.employees.find(l=>l.id===n);if(!r)throw new q(`Employee ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create an employee").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").requiredOption("--email <s>","Email").requiredOption("--phone <s>","Phone").requiredOption("--position <s>","Position").requiredOption("--department <s>","Department").requiredOption("--location <s>","Location").requiredOption("--salary <n>","Salary",f).option("--type <s>","Employment type (e.g. full-time)","full-time").option("--status <s>","Status","active").option("--performance-score <n>","Performance score",f,0).option("--manager-id <id>","Manager ID").option("--avatar <url>","Avatar URL").option("--start-date <iso>","Start date (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone,position:n.position,department:n.department,location:n.location,salary:n.salary,type:n.type??"full-time",status:n.status??"active",performanceScore:n.performanceScore??0,startDate:n.startDate??new Date().toISOString()};n.managerId&&(e.managerId=n.managerId),n.avatar&&(e.avatar=n.avatar);let t=await b$1(Q,{input:e});k$1(`Employee created: ${t.createCrewEmployee.firstName} ${t.createCrewEmployee.lastName}`),i(n,t.createCrewEmployee);}catch(e){h$1(e);}}),o.command("update").description("Update an employee").argument("<id>","Employee ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <s>","Email").option("--phone <s>","Phone").option("--position <s>","Position").option("--department <s>","Department").option("--location <s>","Location").option("--salary <n>","Salary",f).option("--type <s>","Employment type").option("--status <s>","Status").option("--performance-score <n>","Performance score",f).option("--manager-id <id>","Manager ID").option("--avatar <url>","Avatar URL").option("--start-date <iso>","Start date (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.firstName&&(t.firstName=e.firstName),e.lastName&&(t.lastName=e.lastName),e.email&&(t.email=e.email),e.phone&&(t.phone=e.phone),e.position&&(t.position=e.position),e.department&&(t.department=e.department),e.location&&(t.location=e.location),e.salary!==void 0&&(t.salary=e.salary),e.type&&(t.type=e.type),e.status&&(t.status=e.status),e.performanceScore!==void 0&&(t.performanceScore=e.performanceScore),e.managerId&&(t.managerId=e.managerId),e.avatar&&(t.avatar=e.avatar),e.startDate&&(t.startDate=e.startDate),!Object.keys(t).length)throw new q("No updates specified");let r=await b$1(K,{id:n,input:t});k$1("Employee updated"),i(e,r.updateCrewEmployee);}catch(t){h$1(t);}}),o.command("remove").description("Remove an employee").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t=await b$1(z,{id:n});if(!t.removeCrewEmployee)throw new q(`Employee ${n} could not be removed`);k$1(`Employee ${n} removed`),i(e,{removed:t.removeCrewEmployee});}catch(t){h$1(t);}});}function it(m){let o=m.command("candidates").description("Crewfoundry recruiting candidates");o.command("list").description("List candidates").option("--status <s>","Filter by status").option("--position <p>","Filter by position").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(b)).crewfoundryBootstrap.candidates;n.status&&(t=t.filter(r=>r.status===n.status)),n.position&&(t=t.filter(r=>r.position===n.position)),i(n,t,{headers:["ID","Name","Position","Source","Status","Rating"],rows:t.map(r$1=>[r(r$1.id,12),`${r$1.firstName} ${r$1.lastName}`,r$1.position,r$1.source,r$1.status,String(r$1.rating)])});}catch(e){h$1(e);}}),o.command("get").description("Get a candidate by id").argument("<id>","Candidate ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(b)).crewfoundryBootstrap.candidates.find(l=>l.id===n);if(!r)throw new q(`Candidate ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a candidate").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").requiredOption("--email <s>","Email").requiredOption("--phone <s>","Phone").requiredOption("--position <s>","Position").requiredOption("--source <s>","Source").option("--experience <n>","Years of experience",y,0).option("--rating <n>","Rating",f,0).option("--status <s>","Status","new").option("--current-company <s>","Current company").option("--skills <csv>","Comma-separated skills").option("--resume-url <url>","Resume URL").option("--notes <s>","Notes").option("--applied-date <iso>","Applied date (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone,position:n.position,source:n.source,experience:n.experience??0,rating:n.rating??0,status:n.status??"new",skills:n.skills?g(n.skills):[],appliedDate:n.appliedDate??new Date().toISOString()};n.currentCompany&&(e.currentCompany=n.currentCompany),n.resumeUrl&&(e.resumeUrl=n.resumeUrl),n.notes&&(e.notes=n.notes);let t=await b$1(X,{input:e});k$1(`Candidate created: ${t.createCrewCandidate.firstName} ${t.createCrewCandidate.lastName}`),i(n,t.createCrewCandidate);}catch(e){h$1(e);}}),o.command("update").description("Update a candidate").argument("<id>","Candidate ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <s>","Email").option("--phone <s>","Phone").option("--position <s>","Position").option("--source <s>","Source").option("--experience <n>","Years of experience",y).option("--rating <n>","Rating",f).option("--status <s>","Status").option("--current-company <s>","Current company").option("--skills <csv>","Comma-separated skills").option("--resume-url <url>","Resume URL").option("--notes <s>","Notes").option("--applied-date <iso>","Applied date (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.firstName&&(t.firstName=e.firstName),e.lastName&&(t.lastName=e.lastName),e.email&&(t.email=e.email),e.phone&&(t.phone=e.phone),e.position&&(t.position=e.position),e.source&&(t.source=e.source),e.experience!==void 0&&(t.experience=e.experience),e.rating!==void 0&&(t.rating=e.rating),e.status&&(t.status=e.status),e.currentCompany&&(t.currentCompany=e.currentCompany),e.skills&&(t.skills=g(e.skills)),e.resumeUrl&&(t.resumeUrl=e.resumeUrl),e.notes&&(t.notes=e.notes),e.appliedDate&&(t.appliedDate=e.appliedDate),!Object.keys(t).length)throw new q("No updates specified");let r=await b$1(Z,{id:n,input:t});k$1("Candidate updated"),i(e,r.updateCrewCandidate);}catch(t){h$1(t);}});}function pt(m){let o=m.command("job-postings").description("Crewfoundry job postings");o.command("list").description("List job postings").option("--department <d>","Filter by department").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(T)).crewfoundryBootstrap.jobPostings;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Title","Department","Type","Applicants","Status"],rows:t.map(r$1=>[r(r$1.id,12),r$1.title,r$1.department,r$1.type,String(r$1.applicants),r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get a job posting by id").argument("<id>","Job posting ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(T)).crewfoundryBootstrap.jobPostings.find(l=>l.id===n);if(!r)throw new q(`Job posting ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a job posting").requiredOption("--title <s>","Title").requiredOption("--department <s>","Department").requiredOption("--description <s>","Description").requiredOption("--experience-level <s>","Experience level").requiredOption("--location <s>","Location").requiredOption("--type <s>","Employment type (e.g. full-time)").option("--applicants <n>","Applicant count",y,0).option("--salary-min <n>","Minimum salary",f,0).option("--salary-max <n>","Maximum salary",f,0).option("--status <s>","Status","open").option("--requirements <csv>","Comma-separated requirements").option("--benefits <csv>","Comma-separated benefits").option("--posted-date <iso>","Posted date (ISO)").option("--deadline <iso>","Deadline (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={title:n.title,department:n.department,description:n.description,experienceLevel:n.experienceLevel,location:n.location,type:n.type,applicants:n.applicants??0,salaryMin:n.salaryMin??0,salaryMax:n.salaryMax??0,status:n.status??"open",requirements:n.requirements?g(n.requirements):[],benefits:n.benefits?g(n.benefits):[],postedDate:n.postedDate??new Date().toISOString()};n.deadline&&(e.deadline=n.deadline);let t=await b$1(tt,{input:e});k$1(`Job posting created: ${t.createCrewJobPosting.title}`),i(n,t.createCrewJobPosting);}catch(e){h$1(e);}}),o.command("update").description("Update a job posting").argument("<id>","Job posting ID").option("--title <s>","Title").option("--department <s>","Department").option("--description <s>","Description").option("--experience-level <s>","Experience level").option("--location <s>","Location").option("--type <s>","Employment type").option("--applicants <n>","Applicant count",y).option("--salary-min <n>","Minimum salary",f).option("--salary-max <n>","Maximum salary",f).option("--status <s>","Status").option("--requirements <csv>","Comma-separated requirements").option("--benefits <csv>","Comma-separated benefits").option("--posted-date <iso>","Posted date (ISO)").option("--deadline <iso>","Deadline (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.title&&(t.title=e.title),e.department&&(t.department=e.department),e.description&&(t.description=e.description),e.experienceLevel&&(t.experienceLevel=e.experienceLevel),e.location&&(t.location=e.location),e.type&&(t.type=e.type),e.applicants!==void 0&&(t.applicants=e.applicants),e.salaryMin!==void 0&&(t.salaryMin=e.salaryMin),e.salaryMax!==void 0&&(t.salaryMax=e.salaryMax),e.status&&(t.status=e.status),e.requirements&&(t.requirements=g(e.requirements)),e.benefits&&(t.benefits=g(e.benefits)),e.postedDate&&(t.postedDate=e.postedDate),e.deadline&&(t.deadline=e.deadline),!Object.keys(t).length)throw new q("No updates specified");let r=await b$1(et,{id:n,input:t});k$1("Job posting updated"),i(e,r.updateCrewJobPosting);}catch(t){h$1(t);}});}function mt(m){let o=m.command("leave-requests").description("Crewfoundry leave requests");o.command("list").description("List leave requests").option("--employee <id>","Filter by employee ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(_)).crewfoundryBootstrap.leaveRequests;n.employee&&(t=t.filter(r=>r.employeeId===n.employee)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Employee","Type","Days","Status"],rows:t.map(r$1=>[r(r$1.id,12),r$1.employeeName,r$1.type,String(r$1.days),r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get a leave request by id").argument("<id>","Leave request ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(_)).crewfoundryBootstrap.leaveRequests.find(l=>l.id===n);if(!r)throw new q(`Leave request ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a leave request").requiredOption("--employee-id <id>","Employee ID").requiredOption("--employee-name <s>","Employee name").requiredOption("--department <s>","Department").requiredOption("--type <s>","Leave type").requiredOption("--reason <s>","Reason").requiredOption("--start-date <iso>","Start date (ISO)").requiredOption("--end-date <iso>","End date (ISO)").option("--days <n>","Number of days",y,1).option("--status <s>","Status","pending").option("--approver-name <s>","Approver name").option("-f, --format <format>","Output format").action(async n=>{try{let e={employeeId:n.employeeId,employeeName:n.employeeName,department:n.department,type:n.type,reason:n.reason,startDate:n.startDate,endDate:n.endDate,days:n.days??1,status:n.status??"pending"};n.approverName&&(e.approverName=n.approverName);let t=await b$1(nt,{input:e});k$1(`Leave request created for ${t.createCrewLeaveRequest.employeeName}`),i(n,t.createCrewLeaveRequest);}catch(e){h$1(e);}}),o.command("update").description("Update a leave request").argument("<id>","Leave request ID").option("--employee-id <id>","Employee ID").option("--employee-name <s>","Employee name").option("--department <s>","Department").option("--type <s>","Leave type").option("--reason <s>","Reason").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--days <n>","Number of days",y).option("--status <s>","Status").option("--approver-name <s>","Approver name").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.employeeId&&(t.employeeId=e.employeeId),e.employeeName&&(t.employeeName=e.employeeName),e.department&&(t.department=e.department),e.type&&(t.type=e.type),e.reason&&(t.reason=e.reason),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.days!==void 0&&(t.days=e.days),e.status&&(t.status=e.status),e.approverName&&(t.approverName=e.approverName),!Object.keys(t).length)throw new q("No updates specified");let r=await b$1(rt,{id:n,input:t});k$1("Leave request updated"),i(e,r.updateCrewLeaveRequest);}catch(t){h$1(t);}});}function dt(m){let o=m.command("announcements").description("Crewfoundry announcements");o.command("list").description("List announcements").option("--category <c>","Filter by category").option("--pinned-only","Only pinned announcements").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(A)).crewfoundryBootstrap.announcements;n.category&&(t=t.filter(r=>r.category===n.category)),n.pinnedOnly&&(t=t.filter(r=>r.isPinned)),i(n,t,{headers:["ID","Title","Author","Category","Priority","Pinned"],rows:t.map(r$1=>[r(r$1.id,12),r$1.title,r$1.author,r$1.category,r$1.priority,r$1.isPinned?"yes":"no"])});}catch(e){h$1(e);}}),o.command("get").description("Get an announcement by id").argument("<id>","Announcement ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(A)).crewfoundryBootstrap.announcements.find(l=>l.id===n);if(!r)throw new q(`Announcement ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create an announcement").requiredOption("--title <s>","Title").requiredOption("--content <s>","Content").requiredOption("--author <s>","Author").requiredOption("--author-role <s>","Author role").requiredOption("--category <s>","Category").requiredOption("--priority <s>","Priority").option("--pinned","Pin the announcement").option("--view-count <n>","Initial view count",y,0).option("--tags <csv>","Comma-separated tags").option("--created-at <iso>","Created at (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={title:n.title,content:n.content,author:n.author,authorRole:n.authorRole,category:n.category,priority:n.priority,isPinned:n.pinned??!1,viewCount:n.viewCount??0,tags:n.tags?g(n.tags):[],createdAt:n.createdAt??new Date().toISOString()},t=await b$1(ot,{input:e});k$1(`Announcement created: ${t.createCrewAnnouncement.title}`),i(n,t.createCrewAnnouncement);}catch(e){h$1(e);}});}function a(m){return m==null?"-":String(m)}function ct(m){let o=m.command("directory").description("Crewfoundry read-only collections (clients, projects, teams, finance, learning)"),n=async(e,t,r,l)=>{try{let q=(await b$1(e)).crewfoundryBootstrap[t];i(r,q,{headers:l.headers,rows:q.map(l.row)});}catch(I){h$1(I);}};o.command("clients").description("List clients").option("-f, --format <format>","Output format").action(e=>n(J,"clients",e,{headers:["ID","Name","Industry","Status","Projects","Revenue"],row:t=>[r(t.id,12),a(t.name),a(t.industry),a(t.status),a(t.projects),a(t.revenue)]})),o.command("departments").description("List departments").option("-f, --format <format>","Output format").action(e=>n(W,"departments",e,{headers:["ID","Name","Head","Employees","Budget","Status"],row:t=>[r(t.id,12),a(t.name),a(t.headName),a(t.employeeCount),a(t.budget),a(t.status)]})),o.command("interviews").description("List interviews").option("-f, --format <format>","Output format").action(e=>n(F,"interviews",e,{headers:["ID","Candidate","Position","Type","Status","Interviewer"],row:t=>[r(t.id,12),a(t.candidateName),a(t.position),a(t.type),a(t.status),a(t.interviewerName)]})),o.command("projects").description("List projects").option("-f, --format <format>","Output format").action(e=>n(V,"projects",e,{headers:["ID","Name","Status","Priority","Progress","Budget"],row:t=>[r(t.id,12),a(t.name),a(t.status),a(t.priority),a(t.progress),a(t.budget)]})),o.command("teams").description("List teams").option("-f, --format <format>","Output format").action(e=>n(G,"teams",e,{headers:["ID","Name","Department","Lead","Members","Status"],row:t=>[r(t.id,12),a(t.name),a(t.department),a(t.leadName),a(t.memberCount),a(t.status)]})),o.command("time-entries").description("List time entries").option("-f, --format <format>","Output format").action(e=>n(Y,"timeEntries",e,{headers:["ID","Employee","Date","Hours","Overtime","Status"],row:t=>[r(t.id,12),a(t.employeeName),a(t.date),a(t.totalHours),a(t.overtime),a(t.status)]})),o.command("vendors").description("List vendors").option("-f, --format <format>","Output format").action(e=>n(H,"vendors",e,{headers:["ID","Name","Category","Contract Value","Rating","Status"],row:t=>[r(t.id,12),a(t.name),a(t.category),a(t.contractValue),a(t.rating),a(t.status)]}));}function ut(m){let o=m.command("analytics").description("Crewfoundry analytics & bootstrap");o.command("bootstrap").description("Fetch the full Crewfoundry workspace snapshot (all collections)").option("-f, --format <format>","Output format").action(async n=>{try{let e=await b$1(L);i(n,e.crewfoundryBootstrap);}catch(e){h$1(e);}}),o.command("summary").description("Per-collection counts derived from the bootstrap snapshot").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(L)).crewfoundryBootstrap,r={employees:t.employees.length,candidates:t.candidates.length,jobPostings:t.jobPostings.length,leaveRequests:t.leaveRequests.length,announcements:t.announcements.length,clients:t.clients.length,departments:t.departments.length,interviews:t.interviews.length,projects:t.projects.length,teams:t.teams.length,timeEntries:t.timeEntries.length,vendors:t.vendors.length};i(n,r,{headers:["Collection","Count"],rows:Object.entries(r).map(([l,I])=>[l,String(I)])});}catch(e){h$1(e);}}),m.command("health").description("Crewfoundry service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await d(at))._empty??"ok";k$1(`crewfoundry: ${t}`),i(n,{health:t});}catch(e){h$1(e);}});}var lt={id:"crewfoundry",version:"1.0.0",displayName:"Crewfoundry",dependsOn:["auth","workspaces"],register(m,o){a$1(o);let n=m.command("crewfoundry").description("Crewfoundry workforce & HR operations");st(n),it(n),pt(n),mt(n),dt(n),ct(n),ut(n);}},Qt=lt;export{Qt as default};
|
|
143
|
+
`;function y(m){let o=Number.parseInt(m,10);if(Number.isNaN(o))throw new j$1(`Expected an integer but got "${m}"`);return o}function f(m){let o=Number.parseFloat(m);if(Number.isNaN(o))throw new j$1(`Expected a number but got "${m}"`);return o}function g(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function st(m){let o=m.command("employees").description("Crewfoundry employees");o.command("list").description("List employees").option("--department <d>","Filter by department").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(h)).crewfoundryBootstrap.employees;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Name","Email","Department","Position","Status"],rows:t.map(r$1=>[r(r$1.id,12),`${r$1.firstName} ${r$1.lastName}`,r$1.email,r$1.department,r$1.position,r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get an employee by id").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(h)).crewfoundryBootstrap.employees.find(l=>l.id===n);if(!r)throw new j$1(`Employee ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create an employee").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").requiredOption("--email <s>","Email").requiredOption("--phone <s>","Phone").requiredOption("--position <s>","Position").requiredOption("--department <s>","Department").requiredOption("--location <s>","Location").requiredOption("--salary <n>","Salary",f).option("--type <s>","Employment type (e.g. full-time)","full-time").option("--status <s>","Status","active").option("--performance-score <n>","Performance score",f,0).option("--manager-id <id>","Manager ID").option("--avatar <url>","Avatar URL").option("--start-date <iso>","Start date (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone,position:n.position,department:n.department,location:n.location,salary:n.salary,type:n.type??"full-time",status:n.status??"active",performanceScore:n.performanceScore??0,startDate:n.startDate??new Date().toISOString()};n.managerId&&(e.managerId=n.managerId),n.avatar&&(e.avatar=n.avatar);let t=await b$1(Q,{input:e});k$1(`Employee created: ${t.createCrewEmployee.firstName} ${t.createCrewEmployee.lastName}`),i(n,t.createCrewEmployee);}catch(e){h$1(e);}}),o.command("update").description("Update an employee").argument("<id>","Employee ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <s>","Email").option("--phone <s>","Phone").option("--position <s>","Position").option("--department <s>","Department").option("--location <s>","Location").option("--salary <n>","Salary",f).option("--type <s>","Employment type").option("--status <s>","Status").option("--performance-score <n>","Performance score",f).option("--manager-id <id>","Manager ID").option("--avatar <url>","Avatar URL").option("--start-date <iso>","Start date (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.firstName&&(t.firstName=e.firstName),e.lastName&&(t.lastName=e.lastName),e.email&&(t.email=e.email),e.phone&&(t.phone=e.phone),e.position&&(t.position=e.position),e.department&&(t.department=e.department),e.location&&(t.location=e.location),e.salary!==void 0&&(t.salary=e.salary),e.type&&(t.type=e.type),e.status&&(t.status=e.status),e.performanceScore!==void 0&&(t.performanceScore=e.performanceScore),e.managerId&&(t.managerId=e.managerId),e.avatar&&(t.avatar=e.avatar),e.startDate&&(t.startDate=e.startDate),!Object.keys(t).length)throw new j$1("No updates specified");let r=await b$1(K,{id:n,input:t});k$1("Employee updated"),i(e,r.updateCrewEmployee);}catch(t){h$1(t);}}),o.command("remove").description("Remove an employee").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t=await b$1(z,{id:n});if(!t.removeCrewEmployee)throw new j$1(`Employee ${n} could not be removed`);k$1(`Employee ${n} removed`),i(e,{removed:t.removeCrewEmployee});}catch(t){h$1(t);}});}function it(m){let o=m.command("candidates").description("Crewfoundry recruiting candidates");o.command("list").description("List candidates").option("--status <s>","Filter by status").option("--position <p>","Filter by position").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(b)).crewfoundryBootstrap.candidates;n.status&&(t=t.filter(r=>r.status===n.status)),n.position&&(t=t.filter(r=>r.position===n.position)),i(n,t,{headers:["ID","Name","Position","Source","Status","Rating"],rows:t.map(r$1=>[r(r$1.id,12),`${r$1.firstName} ${r$1.lastName}`,r$1.position,r$1.source,r$1.status,String(r$1.rating)])});}catch(e){h$1(e);}}),o.command("get").description("Get a candidate by id").argument("<id>","Candidate ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(b)).crewfoundryBootstrap.candidates.find(l=>l.id===n);if(!r)throw new j$1(`Candidate ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a candidate").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").requiredOption("--email <s>","Email").requiredOption("--phone <s>","Phone").requiredOption("--position <s>","Position").requiredOption("--source <s>","Source").option("--experience <n>","Years of experience",y,0).option("--rating <n>","Rating",f,0).option("--status <s>","Status","new").option("--current-company <s>","Current company").option("--skills <csv>","Comma-separated skills").option("--resume-url <url>","Resume URL").option("--notes <s>","Notes").option("--applied-date <iso>","Applied date (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={firstName:n.firstName,lastName:n.lastName,email:n.email,phone:n.phone,position:n.position,source:n.source,experience:n.experience??0,rating:n.rating??0,status:n.status??"new",skills:n.skills?g(n.skills):[],appliedDate:n.appliedDate??new Date().toISOString()};n.currentCompany&&(e.currentCompany=n.currentCompany),n.resumeUrl&&(e.resumeUrl=n.resumeUrl),n.notes&&(e.notes=n.notes);let t=await b$1(X,{input:e});k$1(`Candidate created: ${t.createCrewCandidate.firstName} ${t.createCrewCandidate.lastName}`),i(n,t.createCrewCandidate);}catch(e){h$1(e);}}),o.command("update").description("Update a candidate").argument("<id>","Candidate ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <s>","Email").option("--phone <s>","Phone").option("--position <s>","Position").option("--source <s>","Source").option("--experience <n>","Years of experience",y).option("--rating <n>","Rating",f).option("--status <s>","Status").option("--current-company <s>","Current company").option("--skills <csv>","Comma-separated skills").option("--resume-url <url>","Resume URL").option("--notes <s>","Notes").option("--applied-date <iso>","Applied date (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.firstName&&(t.firstName=e.firstName),e.lastName&&(t.lastName=e.lastName),e.email&&(t.email=e.email),e.phone&&(t.phone=e.phone),e.position&&(t.position=e.position),e.source&&(t.source=e.source),e.experience!==void 0&&(t.experience=e.experience),e.rating!==void 0&&(t.rating=e.rating),e.status&&(t.status=e.status),e.currentCompany&&(t.currentCompany=e.currentCompany),e.skills&&(t.skills=g(e.skills)),e.resumeUrl&&(t.resumeUrl=e.resumeUrl),e.notes&&(t.notes=e.notes),e.appliedDate&&(t.appliedDate=e.appliedDate),!Object.keys(t).length)throw new j$1("No updates specified");let r=await b$1(Z,{id:n,input:t});k$1("Candidate updated"),i(e,r.updateCrewCandidate);}catch(t){h$1(t);}});}function pt(m){let o=m.command("job-postings").description("Crewfoundry job postings");o.command("list").description("List job postings").option("--department <d>","Filter by department").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(T)).crewfoundryBootstrap.jobPostings;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Title","Department","Type","Applicants","Status"],rows:t.map(r$1=>[r(r$1.id,12),r$1.title,r$1.department,r$1.type,String(r$1.applicants),r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get a job posting by id").argument("<id>","Job posting ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(T)).crewfoundryBootstrap.jobPostings.find(l=>l.id===n);if(!r)throw new j$1(`Job posting ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a job posting").requiredOption("--title <s>","Title").requiredOption("--department <s>","Department").requiredOption("--description <s>","Description").requiredOption("--experience-level <s>","Experience level").requiredOption("--location <s>","Location").requiredOption("--type <s>","Employment type (e.g. full-time)").option("--applicants <n>","Applicant count",y,0).option("--salary-min <n>","Minimum salary",f,0).option("--salary-max <n>","Maximum salary",f,0).option("--status <s>","Status","open").option("--requirements <csv>","Comma-separated requirements").option("--benefits <csv>","Comma-separated benefits").option("--posted-date <iso>","Posted date (ISO)").option("--deadline <iso>","Deadline (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={title:n.title,department:n.department,description:n.description,experienceLevel:n.experienceLevel,location:n.location,type:n.type,applicants:n.applicants??0,salaryMin:n.salaryMin??0,salaryMax:n.salaryMax??0,status:n.status??"open",requirements:n.requirements?g(n.requirements):[],benefits:n.benefits?g(n.benefits):[],postedDate:n.postedDate??new Date().toISOString()};n.deadline&&(e.deadline=n.deadline);let t=await b$1(tt,{input:e});k$1(`Job posting created: ${t.createCrewJobPosting.title}`),i(n,t.createCrewJobPosting);}catch(e){h$1(e);}}),o.command("update").description("Update a job posting").argument("<id>","Job posting ID").option("--title <s>","Title").option("--department <s>","Department").option("--description <s>","Description").option("--experience-level <s>","Experience level").option("--location <s>","Location").option("--type <s>","Employment type").option("--applicants <n>","Applicant count",y).option("--salary-min <n>","Minimum salary",f).option("--salary-max <n>","Maximum salary",f).option("--status <s>","Status").option("--requirements <csv>","Comma-separated requirements").option("--benefits <csv>","Comma-separated benefits").option("--posted-date <iso>","Posted date (ISO)").option("--deadline <iso>","Deadline (ISO)").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.title&&(t.title=e.title),e.department&&(t.department=e.department),e.description&&(t.description=e.description),e.experienceLevel&&(t.experienceLevel=e.experienceLevel),e.location&&(t.location=e.location),e.type&&(t.type=e.type),e.applicants!==void 0&&(t.applicants=e.applicants),e.salaryMin!==void 0&&(t.salaryMin=e.salaryMin),e.salaryMax!==void 0&&(t.salaryMax=e.salaryMax),e.status&&(t.status=e.status),e.requirements&&(t.requirements=g(e.requirements)),e.benefits&&(t.benefits=g(e.benefits)),e.postedDate&&(t.postedDate=e.postedDate),e.deadline&&(t.deadline=e.deadline),!Object.keys(t).length)throw new j$1("No updates specified");let r=await b$1(et,{id:n,input:t});k$1("Job posting updated"),i(e,r.updateCrewJobPosting);}catch(t){h$1(t);}});}function mt(m){let o=m.command("leave-requests").description("Crewfoundry leave requests");o.command("list").description("List leave requests").option("--employee <id>","Filter by employee ID").option("--status <s>","Filter by status").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(_)).crewfoundryBootstrap.leaveRequests;n.employee&&(t=t.filter(r=>r.employeeId===n.employee)),n.status&&(t=t.filter(r=>r.status===n.status)),i(n,t,{headers:["ID","Employee","Type","Days","Status"],rows:t.map(r$1=>[r(r$1.id,12),r$1.employeeName,r$1.type,String(r$1.days),r$1.status])});}catch(e){h$1(e);}}),o.command("get").description("Get a leave request by id").argument("<id>","Leave request ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(_)).crewfoundryBootstrap.leaveRequests.find(l=>l.id===n);if(!r)throw new j$1(`Leave request ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create a leave request").requiredOption("--employee-id <id>","Employee ID").requiredOption("--employee-name <s>","Employee name").requiredOption("--department <s>","Department").requiredOption("--type <s>","Leave type").requiredOption("--reason <s>","Reason").requiredOption("--start-date <iso>","Start date (ISO)").requiredOption("--end-date <iso>","End date (ISO)").option("--days <n>","Number of days",y,1).option("--status <s>","Status","pending").option("--approver-name <s>","Approver name").option("-f, --format <format>","Output format").action(async n=>{try{let e={employeeId:n.employeeId,employeeName:n.employeeName,department:n.department,type:n.type,reason:n.reason,startDate:n.startDate,endDate:n.endDate,days:n.days??1,status:n.status??"pending"};n.approverName&&(e.approverName=n.approverName);let t=await b$1(nt,{input:e});k$1(`Leave request created for ${t.createCrewLeaveRequest.employeeName}`),i(n,t.createCrewLeaveRequest);}catch(e){h$1(e);}}),o.command("update").description("Update a leave request").argument("<id>","Leave request ID").option("--employee-id <id>","Employee ID").option("--employee-name <s>","Employee name").option("--department <s>","Department").option("--type <s>","Leave type").option("--reason <s>","Reason").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--days <n>","Number of days",y).option("--status <s>","Status").option("--approver-name <s>","Approver name").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t={};if(e.employeeId&&(t.employeeId=e.employeeId),e.employeeName&&(t.employeeName=e.employeeName),e.department&&(t.department=e.department),e.type&&(t.type=e.type),e.reason&&(t.reason=e.reason),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.days!==void 0&&(t.days=e.days),e.status&&(t.status=e.status),e.approverName&&(t.approverName=e.approverName),!Object.keys(t).length)throw new j$1("No updates specified");let r=await b$1(rt,{id:n,input:t});k$1("Leave request updated"),i(e,r.updateCrewLeaveRequest);}catch(t){h$1(t);}});}function dt(m){let o=m.command("announcements").description("Crewfoundry announcements");o.command("list").description("List announcements").option("--category <c>","Filter by category").option("--pinned-only","Only pinned announcements").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(A)).crewfoundryBootstrap.announcements;n.category&&(t=t.filter(r=>r.category===n.category)),n.pinnedOnly&&(t=t.filter(r=>r.isPinned)),i(n,t,{headers:["ID","Title","Author","Category","Priority","Pinned"],rows:t.map(r$1=>[r(r$1.id,12),r$1.title,r$1.author,r$1.category,r$1.priority,r$1.isPinned?"yes":"no"])});}catch(e){h$1(e);}}),o.command("get").description("Get an announcement by id").argument("<id>","Announcement ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let r=(await b$1(A)).crewfoundryBootstrap.announcements.find(l=>l.id===n);if(!r)throw new j$1(`Announcement ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o.command("create").description("Create an announcement").requiredOption("--title <s>","Title").requiredOption("--content <s>","Content").requiredOption("--author <s>","Author").requiredOption("--author-role <s>","Author role").requiredOption("--category <s>","Category").requiredOption("--priority <s>","Priority").option("--pinned","Pin the announcement").option("--view-count <n>","Initial view count",y,0).option("--tags <csv>","Comma-separated tags").option("--created-at <iso>","Created at (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let e={title:n.title,content:n.content,author:n.author,authorRole:n.authorRole,category:n.category,priority:n.priority,isPinned:n.pinned??!1,viewCount:n.viewCount??0,tags:n.tags?g(n.tags):[],createdAt:n.createdAt??new Date().toISOString()},t=await b$1(ot,{input:e});k$1(`Announcement created: ${t.createCrewAnnouncement.title}`),i(n,t.createCrewAnnouncement);}catch(e){h$1(e);}});}function a(m){return m==null?"-":String(m)}function ct(m){let o=m.command("directory").description("Crewfoundry read-only collections (clients, projects, teams, finance, learning)"),n=async(e,t,r,l)=>{try{let q=(await b$1(e)).crewfoundryBootstrap[t];i(r,q,{headers:l.headers,rows:q.map(l.row)});}catch(I){h$1(I);}};o.command("clients").description("List clients").option("-f, --format <format>","Output format").action(e=>n(J,"clients",e,{headers:["ID","Name","Industry","Status","Projects","Revenue"],row:t=>[r(t.id,12),a(t.name),a(t.industry),a(t.status),a(t.projects),a(t.revenue)]})),o.command("departments").description("List departments").option("-f, --format <format>","Output format").action(e=>n(W,"departments",e,{headers:["ID","Name","Head","Employees","Budget","Status"],row:t=>[r(t.id,12),a(t.name),a(t.headName),a(t.employeeCount),a(t.budget),a(t.status)]})),o.command("interviews").description("List interviews").option("-f, --format <format>","Output format").action(e=>n(F,"interviews",e,{headers:["ID","Candidate","Position","Type","Status","Interviewer"],row:t=>[r(t.id,12),a(t.candidateName),a(t.position),a(t.type),a(t.status),a(t.interviewerName)]})),o.command("projects").description("List projects").option("-f, --format <format>","Output format").action(e=>n(V,"projects",e,{headers:["ID","Name","Status","Priority","Progress","Budget"],row:t=>[r(t.id,12),a(t.name),a(t.status),a(t.priority),a(t.progress),a(t.budget)]})),o.command("teams").description("List teams").option("-f, --format <format>","Output format").action(e=>n(G,"teams",e,{headers:["ID","Name","Department","Lead","Members","Status"],row:t=>[r(t.id,12),a(t.name),a(t.department),a(t.leadName),a(t.memberCount),a(t.status)]})),o.command("time-entries").description("List time entries").option("-f, --format <format>","Output format").action(e=>n(Y,"timeEntries",e,{headers:["ID","Employee","Date","Hours","Overtime","Status"],row:t=>[r(t.id,12),a(t.employeeName),a(t.date),a(t.totalHours),a(t.overtime),a(t.status)]})),o.command("vendors").description("List vendors").option("-f, --format <format>","Output format").action(e=>n(H,"vendors",e,{headers:["ID","Name","Category","Contract Value","Rating","Status"],row:t=>[r(t.id,12),a(t.name),a(t.category),a(t.contractValue),a(t.rating),a(t.status)]}));}function ut(m){let o=m.command("analytics").description("Crewfoundry analytics & bootstrap");o.command("bootstrap").description("Fetch the full Crewfoundry workspace snapshot (all collections)").option("-f, --format <format>","Output format").action(async n=>{try{let e=await b$1(L);i(n,e.crewfoundryBootstrap);}catch(e){h$1(e);}}),o.command("summary").description("Per-collection counts derived from the bootstrap snapshot").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(L)).crewfoundryBootstrap,r={employees:t.employees.length,candidates:t.candidates.length,jobPostings:t.jobPostings.length,leaveRequests:t.leaveRequests.length,announcements:t.announcements.length,clients:t.clients.length,departments:t.departments.length,interviews:t.interviews.length,projects:t.projects.length,teams:t.teams.length,timeEntries:t.timeEntries.length,vendors:t.vendors.length};i(n,r,{headers:["Collection","Count"],rows:Object.entries(r).map(([l,I])=>[l,String(I)])});}catch(e){h$1(e);}}),m.command("health").description("Crewfoundry service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await d(at))._empty??"ok";k$1(`crewfoundry: ${t}`),i(n,{health:t});}catch(e){h$1(e);}});}var lt={id:"crewfoundry",version:"1.0.0",displayName:"Crewfoundry",dependsOn:["auth","workspaces"],register(m,o){a$1(o);let n=m.command("crewfoundry").description("Crewfoundry workforce & HR operations");st(n),it(n),pt(n),mt(n),dt(n),ct(n),ut(n);}},Qt=lt;export{Qt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(i,c){super(i),this.name="CliUserError",this.exitCode=c?.exitCode??1,this.hint=c?.hint;}},w=class extends p{constructor(i,c){super(i,{exitCode:2,hint:c?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},m=class extends Error{cause;constructor(i,c){super(i),this.name="CliInternalError",this.cause=c;}};function E(o){if(o instanceof w||o instanceof p)return o;let i=y(o)&&y(o.response)?o.response:void 0,c=i?.errors,d=Array.isArray(c)?c[0]:void 0,f=(y(d)&&y(d.extensions)?d.extensions:void 0)?.code,h=i?.status;return f==="UNAUTHENTICATED"||h===401?new w("Authentication required."):f==="FORBIDDEN"||h===403?new p("Permission denied."):f==="BAD_USER_INPUT"||f==="GRAPHQL_VALIDATION_FAILED"||h===400?new p("Invalid request. Check the command arguments."):f==="NOT_FOUND"||h===404?new p("Requested resource was not found."):f==="RATE_LIMITED"||f==="TOO_MANY_REQUESTS"||h===429?new p("Request limit reached. Try again later."):new m("The request could not be completed. Try again later.")}var C=class extends Error{response;constructor(i,c){super(i),this.name="GqlRequestError",this.response=c;}};function y(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}var b=null;function S(o){b=o;}function k(){if(!b)throw new m("vibecontrols module helpers used before setHelpersContext was called");return b}async function s(o,i){return k().gql.global.request(o,i)}function a(o){throw o instanceof w||o instanceof p||o instanceof m?o:o instanceof C||o!==null&&typeof o=="object"&&"response"in o?E(o):new m("The command could not be completed. Try again later.")}function u(o,i,c){k().output.formatAndOutput(o,i,c);}function g(o){k().output.printSuccess(o);}function v(o){return k().output.formatStatus(o)}function I(o,i){return k().output.truncate(o,i)}var D=`
|
|
2
2
|
query ListDeveloperOrganizations($limit: Int, $offset: Int) {
|
|
3
3
|
developerOrganizations(limit: $limit, offset: $offset) {
|
|
4
4
|
edges { node { id name slug tier isVerified totalApps publishedApps } }
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
pageInfo { hasNextPage endCursor }
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,P=`
|
|
10
10
|
query GetDeveloperOrganization($id: ID!) {
|
|
11
11
|
developerOrganization(id: $id) {
|
|
12
12
|
id name slug description tier isVerified isCertified
|
|
@@ -14,64 +14,64 @@
|
|
|
14
14
|
createdAt updatedAt
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
`,$=`
|
|
18
18
|
mutation CreateDeveloperOrganization($input: CreateDeveloperOrganizationInput!) {
|
|
19
19
|
createDeveloperOrganization(input: $input) {
|
|
20
20
|
id name slug description tier
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,N=`
|
|
24
24
|
mutation UpdateDeveloperOrganization($id: ID!, $input: UpdateDeveloperOrganizationInput!) {
|
|
25
25
|
updateDeveloperOrganization(id: $id, input: $input) {
|
|
26
26
|
id name description updatedAt
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,L=`
|
|
30
30
|
mutation DeleteDeveloperOrganization($id: ID!) {
|
|
31
31
|
deleteDeveloperOrganization(id: $id)
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,_=`
|
|
34
34
|
query ListApplications($organizationId: ID, $status: AppStatus, $limit: Int) {
|
|
35
35
|
applications(organizationId: $organizationId, status: $status, limit: $limit) {
|
|
36
36
|
edges { node { id name status installCount averageRating } }
|
|
37
37
|
totalCount
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
`,q=`
|
|
41
41
|
query GetApplication($id: ID!) {
|
|
42
42
|
application(id: $id) {
|
|
43
43
|
id name status reviewStatus publishedAt installCount
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`,G=`
|
|
47
47
|
mutation CreateApplication($input: CreateApplicationInput!) {
|
|
48
48
|
createApplication(input: $input) {
|
|
49
49
|
id name status appId
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,U=`
|
|
53
53
|
mutation UpdateApplication($id: ID!, $input: UpdateApplicationInput!) {
|
|
54
54
|
updateApplication(id: $id, input: $input) {
|
|
55
55
|
id description updatedAt
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,W=`
|
|
59
59
|
mutation SubmitApplicationForReview($id: ID!, $notes: String) {
|
|
60
60
|
submitApplicationForReview(id: $id, notes: $notes) {
|
|
61
61
|
id status reviewStatus submittedAt
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
`,
|
|
64
|
+
`,z=`
|
|
65
65
|
mutation PublishApplication($id: ID!) {
|
|
66
66
|
publishApplication(id: $id) {
|
|
67
67
|
id status publishedAt
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`,
|
|
70
|
+
`,V=`
|
|
71
71
|
mutation DeleteApplication($id: ID!) {
|
|
72
72
|
deleteApplication(id: $id)
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,F=`
|
|
75
75
|
query ApplicationVersions($applicationId: ID!) {
|
|
76
76
|
application(id: $applicationId) {
|
|
77
77
|
id
|
|
@@ -81,59 +81,59 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,j=`
|
|
85
85
|
mutation CreateApplicationVersion($applicationId: ID!, $input: CreateApplicationVersionInput!) {
|
|
86
86
|
createApplicationVersion(applicationId: $applicationId, input: $input) {
|
|
87
87
|
id version status publishedAt
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
`,
|
|
90
|
+
`,M=`
|
|
91
91
|
query ListDevportalWebhooks($applicationId: ID!) {
|
|
92
92
|
webhooks(applicationId: $applicationId) {
|
|
93
93
|
id name url events isActive status failureCount
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
`,
|
|
96
|
+
`,B=`
|
|
97
97
|
mutation CreateDevportalWebhook($applicationId: ID!, $input: CreateWebhookInput!) {
|
|
98
98
|
createWebhook(applicationId: $applicationId, input: $input) {
|
|
99
99
|
secret
|
|
100
100
|
webhook { id name url events isActive status }
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
`,
|
|
103
|
+
`,H=`
|
|
104
104
|
mutation DeleteDevportalWebhook($id: ID!) {
|
|
105
105
|
deleteWebhook(id: $id)
|
|
106
106
|
}
|
|
107
|
-
`,
|
|
107
|
+
`,Y=`
|
|
108
108
|
query ApplicationAnalytics($applicationId: ID!, $period: String!, $startDate: DateTime, $endDate: DateTime) {
|
|
109
109
|
applicationAnalytics(applicationId: $applicationId, period: $period, startDate: $startDate, endDate: $endDate) {
|
|
110
110
|
date period activeUsers apiCalls avgResponseTime sessions
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
`,
|
|
113
|
+
`,K=`
|
|
114
114
|
query OrganizationRevenue($organizationId: ID!, $period: String!) {
|
|
115
115
|
developerOrgRevenueSummary(organizationId: $organizationId, period: $period) {
|
|
116
116
|
period currency totalGrossRevenue totalNetRevenue totalPlatformFees totalRefunds
|
|
117
117
|
totalSales pendingBalance nextPayoutAmount nextPayoutDate
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,J=`
|
|
121
121
|
query AdminReviews($status: AppStatus, $limit: Int, $offset: Int) {
|
|
122
122
|
applications(status: $status, limit: $limit, offset: $offset) {
|
|
123
123
|
edges { node { id name slug status reviewStatus reviewNotes submittedAt lastReviewedAt } }
|
|
124
124
|
totalCount
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
`,
|
|
127
|
+
`,Z=`
|
|
128
128
|
mutation ApproveApplication($id: ID!, $notes: String) {
|
|
129
129
|
approveApplication(id: $id, notes: $notes) {
|
|
130
130
|
id status reviewStatus publishedAt
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
`,
|
|
133
|
+
`,Q=`
|
|
134
134
|
mutation RejectApplication($id: ID!, $notes: String!) {
|
|
135
135
|
rejectApplication(id: $id, notes: $notes) {
|
|
136
136
|
id status reviewStatus reviewNotes
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
`;function
|
|
139
|
+
`;function X(o){let i=o.command("devportal").description("Developer portal: orgs, apps, webhooks, revenue"),c=i.command("orgs").description("Publisher organizations");c.command("list").description("List devportal organizations").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let n=(await s(D,{limit:e.limit,offset:0})).developerOrganizations.edges.map(r=>r.node);u(e,n,{headers:["ID","Name","Slug","Tier","Verified","Apps"],rows:n.map(r=>[I(r.id,12),r.name,r.slug??"-",r.tier??"-",String(!!r.isVerified),String(r.totalApps??0)])});}catch(t){a(t);}}),c.command("get").description("Get an organization").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await s(P,{id:e});if(!n.developerOrganization)throw new p(`Organization ${e} not found`);u(t,n.developerOrganization);}catch(n){a(n);}}),c.command("create").description("Create a publisher organization").requiredOption("--name <s>").option("--slug <s>","Unique slug (derived from the name when omitted)").option("--description <s>").option("--contact-email <email>").option("--website <url>").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,slug:e.slug,description:e.description,contactEmail:e.contactEmail,websiteUrl:e.website},n=await s($,{input:t});g(`Organization created: ${n.createDeveloperOrganization.name}`),u(e,n.createDeveloperOrganization);}catch(t){a(t);}}),c.command("update").description("Update an organization").argument("<id>").option("--name <s>").option("--description <s>").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),!Object.keys(n).length)throw new p("No updates specified");let r=await s(N,{id:e,input:n});g("Organization updated"),u(t,r.updateDeveloperOrganization);}catch(n){a(n);}}),c.command("delete").description("Delete an organization").argument("<id>").action(async e=>{try{await s(L,{id:e}),g("Organization deleted");}catch(t){a(t);}});let d=i.command("apps").description("Applications");d.command("list").description("List applications").option("--organization <id>").option("--status <s>","DRAFT|SUBMITTED|IN_REVIEW|APPROVED|PUBLISHED|REJECTED|SUSPENDED").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let n=(await s(_,{organizationId:e.organization,status:e.status?.toUpperCase(),limit:e.limit})).applications.edges.map(r=>r.node);u(e,n,{headers:["ID","Name","Status","Installs","Rating"],rows:n.map(r=>[I(r.id,12),r.name,v(r.status),String(r.installCount??0),String(r.averageRating??"-")])});}catch(t){a(t);}}),d.command("get").description("Get an application").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await s(q,{id:e});if(!n.application)throw new p(`Application ${e} not found`);u(t,n.application);}catch(n){a(n);}}),d.command("create").description("Create an application").requiredOption("--name <s>").requiredOption("--organization <id>").option("--type <t>","API_INTEGRATION|WEB_APP|MOBILE_APP","API_INTEGRATION").option("--description <s>").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,developerOrganizationId:e.organization,appType:(e.type??"API_INTEGRATION").toUpperCase(),description:e.description},n=await s(G,{input:t});g(`Application created: ${n.createApplication.name}`),u(e,n.createApplication);}catch(t){a(t);}}),d.command("update").description("Update an application").argument("<id>").option("--description <s>").option("--pricing <p>","FREE|PAID_ONETIME|SUBSCRIPTION").option("--docs-url <url>").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.description!==void 0&&(n.description=t.description),t.pricing&&(n.pricingType=t.pricing.toUpperCase()),t.docsUrl&&(n.documentationUrl=t.docsUrl),!Object.keys(n).length)throw new p("No updates specified");let r=await s(U,{id:e,input:n});g("Application updated"),u(t,r.updateApplication);}catch(n){a(n);}}),d.command("submit-review").description("Submit an application for review").argument("<id>").option("--notes <s>").action(async(e,t)=>{try{await s(W,{id:e,notes:t.notes}),g("Submitted for review");}catch(n){a(n);}}),d.command("publish").description("Publish an application").argument("<id>").action(async e=>{try{await s(z,{id:e}),g("Application published");}catch(t){a(t);}}),d.command("delete").description("Delete an application").argument("<id>").action(async e=>{try{await s(V,{id:e}),g("Application deleted");}catch(t){a(t);}});let T=d.command("versions").description("Application versions");T.command("list").description("List versions for an application").argument("<applicationId>").option("-f, --format <format>").action(async(e,t)=>{try{let r=(await s(F,{applicationId:e})).application?.versions.edges.map(A=>A.node)??[];u(t,r,{headers:["ID","Version","Status","Latest","Stable"],rows:r.map(A=>[I(A.id,12),A.version,v(A.status),String(!!A.isLatest),String(!!A.isStable)])});}catch(n){a(n);}}),T.command("create").description("Create an application version").requiredOption("--application <id>").requiredOption("--version <v>").option("--notes <s>").option("--package <url>","Package URL").option("-f, --format <format>").action(async e=>{try{let t={version:e.version,releaseNotes:e.notes,packageUrl:e.package},n=await s(j,{applicationId:e.application,input:t});g(`Version created: ${n.createApplicationVersion.version}`),u(e,n.createApplicationVersion);}catch(t){a(t);}});let f=d.command("webhooks").description("Application webhooks");f.command("list").description("List webhooks for an application").argument("<applicationId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await s(M,{applicationId:e});u(t,n.webhooks,{headers:["ID","Name","URL","Active","Failures"],rows:n.webhooks.map(r=>[I(r.id,12),r.name,I(r.url,40),String(!!r.isActive),String(r.failureCount??0)])});}catch(n){a(n);}}),f.command("add").description("Add a webhook to an application").requiredOption("--application <id>").requiredOption("--name <s>").requiredOption("--url <url>").requiredOption("--events <s>","Comma-separated event names").option("--max-retries <n>","",e=>parseInt(e,10),5).option("-f, --format <format>").action(async e=>{try{let t={name:e.name,url:e.url,events:e.events.split(",").map(r=>r.trim()).filter(Boolean),retryEnabled:!0,maxRetries:e.maxRetries},n=await s(B,{applicationId:e.application,input:t});g("Webhook created. Store the signing secret now: it is shown only once."),u(e,n.createWebhook);}catch(t){a(t);}}),f.command("remove").description("Remove a webhook").argument("<id>").action(async e=>{try{await s(H,{id:e}),g("Webhook removed");}catch(t){a(t);}}),d.command("analytics").description("Application analytics for a period").requiredOption("--application <id>").option("--period <p>","LAST_7_DAYS|LAST_30_DAYS|CUSTOM","LAST_30_DAYS").option("--from <iso>").option("--to <iso>").option("-f, --format <format>").action(async e=>{try{let t=await s(Y,{applicationId:e.application,period:(e.period??"LAST_30_DAYS").toUpperCase(),startDate:e.from,endDate:e.to});u(e,t.applicationAnalytics);}catch(t){a(t);}}),i.command("revenue").description("Revenue for an organization").requiredOption("--organization <id>").option("--period <p>","LAST_7_DAYS|LAST_30_DAYS|YTD","LAST_30_DAYS").option("-f, --format <format>").action(async e=>{try{let t=await s(K,{organizationId:e.organization,period:(e.period??"LAST_30_DAYS").toUpperCase()});u(e,t.developerOrgRevenueSummary);}catch(t){a(t);}});let x=i.command("admin").description("Admin operations").command("reviews").description("Application review queue");x.command("list").description("List applications pending review").option("--status <s>","SUBMITTED|IN_REVIEW","SUBMITTED").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t=await s(J,{status:(e.status??"SUBMITTED").toUpperCase(),limit:e.limit});u(e,t.applications.edges.map(n=>n.node));}catch(t){a(t);}}),x.command("approve").description("Approve an application").argument("<applicationId>").option("--notes <s>").action(async(e,t)=>{try{await s(Z,{id:e,notes:t.notes}),g("Application approved");}catch(n){a(n);}}),x.command("reject").description("Reject an application").argument("<applicationId>").requiredOption("--notes <s>","Reason for rejection").action(async(e,t)=>{try{await s(Q,{id:e,notes:t.notes}),g("Application rejected");}catch(n){a(n);}});}var le={id:"devportal",version:"1.0.0",displayName:"Developer Portal",dependsOn:["auth"],register(o,i){S(i),X(o);}},Et=le;module.exports=Et;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,i,r,h as h$1,k as k$1,p}from'../../chunk-
|
|
1
|
+
import {a,c,i,r,h as h$1,k as k$1,p}from'../../chunk-BGNPGKJM.js';import {j}from'../../chunk-N7EXKGE2.js';var R=`
|
|
2
2
|
query ListDeveloperOrganizations($limit: Int, $offset: Int) {
|
|
3
3
|
developerOrganizations(limit: $limit, offset: $offset) {
|
|
4
4
|
edges { node { id name slug tier isVerified totalApps publishedApps } }
|
|
@@ -136,4 +136,4 @@ import {a,c,i,r,h as h$1,k as k$1,p}from'../../chunk-3ZVMC2AF.js';import {q as q
|
|
|
136
136
|
id status reviewStatus reviewNotes
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
`;function M(g){let d=g.command("devportal").description("Developer portal: orgs, apps, webhooks, revenue"),m=d.command("orgs").description("Publisher organizations");m.command("list").description("List devportal organizations").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=(await c(R,{limit:t.limit,offset:0})).developerOrganizations.edges.map(n=>n.node);i(t,e,{headers:["ID","Name","Slug","Tier","Verified","Apps"],rows:e.map(n=>[r(n.id,12),n.name,n.slug??"-",n.tier??"-",String(!!n.isVerified),String(n.totalApps??0)])});}catch(i){h$1(i);}}),m.command("get").description("Get an organization").argument("<id>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e=await c(w,{id:t});if(!e.developerOrganization)throw new
|
|
139
|
+
`;function M(g){let d=g.command("devportal").description("Developer portal: orgs, apps, webhooks, revenue"),m=d.command("orgs").description("Publisher organizations");m.command("list").description("List devportal organizations").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=(await c(R,{limit:t.limit,offset:0})).developerOrganizations.edges.map(n=>n.node);i(t,e,{headers:["ID","Name","Slug","Tier","Verified","Apps"],rows:e.map(n=>[r(n.id,12),n.name,n.slug??"-",n.tier??"-",String(!!n.isVerified),String(n.totalApps??0)])});}catch(i){h$1(i);}}),m.command("get").description("Get an organization").argument("<id>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e=await c(w,{id:t});if(!e.developerOrganization)throw new j(`Organization ${t} not found`);i(i$1,e.developerOrganization);}catch(e){h$1(e);}}),m.command("create").description("Create a publisher organization").requiredOption("--name <s>").option("--slug <s>","Unique slug (derived from the name when omitted)").option("--description <s>").option("--contact-email <email>").option("--website <url>").option("-f, --format <format>").action(async t=>{try{let i$1={name:t.name,slug:t.slug,description:t.description,contactEmail:t.contactEmail,websiteUrl:t.website},e=await c(D,{input:i$1});k$1(`Organization created: ${e.createDeveloperOrganization.name}`),i(t,e.createDeveloperOrganization);}catch(i){h$1(i);}}),m.command("update").description("Update an organization").argument("<id>").option("--name <s>").option("--description <s>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e={};if(i$1.name&&(e.name=i$1.name),i$1.description!==void 0&&(e.description=i$1.description),!Object.keys(e).length)throw new j("No updates specified");let n=await c(S,{id:t,input:e});k$1("Organization updated"),i(i$1,n.updateDeveloperOrganization);}catch(e){h$1(e);}}),m.command("delete").description("Delete an organization").argument("<id>").action(async t=>{try{await c(C,{id:t}),k$1("Organization deleted");}catch(i){h$1(i);}});let p$1=d.command("apps").description("Applications");p$1.command("list").description("List applications").option("--organization <id>").option("--status <s>","DRAFT|SUBMITTED|IN_REVIEW|APPROVED|PUBLISHED|REJECTED|SUSPENDED").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=(await c(y,{organizationId:t.organization,status:t.status?.toUpperCase(),limit:t.limit})).applications.edges.map(n=>n.node);i(t,e,{headers:["ID","Name","Status","Installs","Rating"],rows:e.map(n=>[r(n.id,12),n.name,p(n.status),String(n.installCount??0),String(n.averageRating??"-")])});}catch(i){h$1(i);}}),p$1.command("get").description("Get an application").argument("<id>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e=await c(P,{id:t});if(!e.application)throw new j(`Application ${t} not found`);i(i$1,e.application);}catch(e){h$1(e);}}),p$1.command("create").description("Create an application").requiredOption("--name <s>").requiredOption("--organization <id>").option("--type <t>","API_INTEGRATION|WEB_APP|MOBILE_APP","API_INTEGRATION").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let i$1={name:t.name,developerOrganizationId:t.organization,appType:(t.type??"API_INTEGRATION").toUpperCase(),description:t.description},e=await c(h,{input:i$1});k$1(`Application created: ${e.createApplication.name}`),i(t,e.createApplication);}catch(i){h$1(i);}}),p$1.command("update").description("Update an application").argument("<id>").option("--description <s>").option("--pricing <p>","FREE|PAID_ONETIME|SUBSCRIPTION").option("--docs-url <url>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e={};if(i$1.description!==void 0&&(e.description=i$1.description),i$1.pricing&&(e.pricingType=i$1.pricing.toUpperCase()),i$1.docsUrl&&(e.documentationUrl=i$1.docsUrl),!Object.keys(e).length)throw new j("No updates specified");let n=await c(N,{id:t,input:e});k$1("Application updated"),i(i$1,n.updateApplication);}catch(e){h$1(e);}}),p$1.command("submit-review").description("Submit an application for review").argument("<id>").option("--notes <s>").action(async(t,i)=>{try{await c($,{id:t,notes:i.notes}),k$1("Submitted for review");}catch(e){h$1(e);}}),p$1.command("publish").description("Publish an application").argument("<id>").action(async t=>{try{await c(b,{id:t}),k$1("Application published");}catch(i){h$1(i);}}),p$1.command("delete").description("Delete an application").argument("<id>").action(async t=>{try{await c(_,{id:t}),k$1("Application deleted");}catch(i){h$1(i);}});let O=p$1.command("versions").description("Application versions");O.command("list").description("List versions for an application").argument("<applicationId>").option("-f, --format <format>").action(async(t,i$1)=>{try{let n=(await c(L,{applicationId:t})).application?.versions.edges.map(c=>c.node)??[];i(i$1,n,{headers:["ID","Version","Status","Latest","Stable"],rows:n.map(c=>[r(c.id,12),c.version,p(c.status),String(!!c.isLatest),String(!!c.isStable)])});}catch(e){h$1(e);}}),O.command("create").description("Create an application version").requiredOption("--application <id>").requiredOption("--version <v>").option("--notes <s>").option("--package <url>","Package URL").option("-f, --format <format>").action(async t=>{try{let i$1={version:t.version,releaseNotes:t.notes,packageUrl:t.package},e=await c(z,{applicationId:t.application,input:i$1});k$1(`Version created: ${e.createApplicationVersion.version}`),i(t,e.createApplicationVersion);}catch(i){h$1(i);}});let A=p$1.command("webhooks").description("Application webhooks");A.command("list").description("List webhooks for an application").argument("<applicationId>").option("-f, --format <format>").action(async(t,i$1)=>{try{let e=await c(k,{applicationId:t});i(i$1,e.webhooks,{headers:["ID","Name","URL","Active","Failures"],rows:e.webhooks.map(n=>[r(n.id,12),n.name,r(n.url,40),String(!!n.isActive),String(n.failureCount??0)])});}catch(e){h$1(e);}}),A.command("add").description("Add a webhook to an application").requiredOption("--application <id>").requiredOption("--name <s>").requiredOption("--url <url>").requiredOption("--events <s>","Comma-separated event names").option("--max-retries <n>","",t=>parseInt(t,10),5).option("-f, --format <format>").action(async t=>{try{let i$1={name:t.name,url:t.url,events:t.events.split(",").map(n=>n.trim()).filter(Boolean),retryEnabled:!0,maxRetries:t.maxRetries},e=await c(U,{applicationId:t.application,input:i$1});k$1("Webhook created. Store the signing secret now: it is shown only once."),i(t,e.createWebhook);}catch(i){h$1(i);}}),A.command("remove").description("Remove a webhook").argument("<id>").action(async t=>{try{await c(x,{id:t}),k$1("Webhook removed");}catch(i){h$1(i);}}),p$1.command("analytics").description("Application analytics for a period").requiredOption("--application <id>").option("--period <p>","LAST_7_DAYS|LAST_30_DAYS|CUSTOM","LAST_30_DAYS").option("--from <iso>").option("--to <iso>").option("-f, --format <format>").action(async t=>{try{let i$1=await c(V,{applicationId:t.application,period:(t.period??"LAST_30_DAYS").toUpperCase(),startDate:t.from,endDate:t.to});i(t,i$1.applicationAnalytics);}catch(i){h$1(i);}}),d.command("revenue").description("Revenue for an organization").requiredOption("--organization <id>").option("--period <p>","LAST_7_DAYS|LAST_30_DAYS|YTD","LAST_30_DAYS").option("-f, --format <format>").action(async t=>{try{let i$1=await c(W,{organizationId:t.organization,period:(t.period??"LAST_30_DAYS").toUpperCase()});i(t,i$1.developerOrgRevenueSummary);}catch(i){h$1(i);}});let I=d.command("admin").description("Admin operations").command("reviews").description("Application review queue");I.command("list").description("List applications pending review").option("--status <s>","SUBMITTED|IN_REVIEW","SUBMITTED").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let i$1=await c(G,{status:(t.status??"SUBMITTED").toUpperCase(),limit:t.limit});i(t,i$1.applications.edges.map(e=>e.node));}catch(i){h$1(i);}}),I.command("approve").description("Approve an application").argument("<applicationId>").option("--notes <s>").action(async(t,i)=>{try{await c(B,{id:t,notes:i.notes}),k$1("Application approved");}catch(e){h$1(e);}}),I.command("reject").description("Reject an application").argument("<applicationId>").requiredOption("--notes <s>","Reason for rejection").action(async(t,i)=>{try{await c(q,{id:t,notes:i.notes}),k$1("Application rejected");}catch(e){h$1(e);}});}var Y={id:"devportal",version:"1.0.0",displayName:"Developer Portal",dependsOn:["auth"],register(g,d){a(d),M(g);}},it=Y;export{it as default};
|