@burdenoff/cli-sdk 2026.626.1 → 2026.627.2

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.
Files changed (41) hide show
  1. package/dist/modules/assethandler/index.cjs +255 -0
  2. package/dist/modules/assethandler/index.d.cts +7 -0
  3. package/dist/modules/assethandler/index.d.ts +7 -0
  4. package/dist/modules/assethandler/index.js +255 -0
  5. package/dist/modules/crewfoundry/index.cjs +196 -0
  6. package/dist/modules/crewfoundry/index.d.cts +7 -0
  7. package/dist/modules/crewfoundry/index.d.ts +7 -0
  8. package/dist/modules/crewfoundry/index.js +196 -0
  9. package/dist/modules/eventfullymanaged/index.cjs +247 -0
  10. package/dist/modules/eventfullymanaged/index.d.cts +7 -0
  11. package/dist/modules/eventfullymanaged/index.d.ts +7 -0
  12. package/dist/modules/eventfullymanaged/index.js +247 -0
  13. package/dist/modules/ggnomad/index.cjs +140 -0
  14. package/dist/modules/ggnomad/index.d.cts +7 -0
  15. package/dist/modules/ggnomad/index.d.ts +7 -0
  16. package/dist/modules/ggnomad/index.js +140 -0
  17. package/dist/modules/headshotmarketing/index.cjs +1083 -0
  18. package/dist/modules/headshotmarketing/index.d.cts +7 -0
  19. package/dist/modules/headshotmarketing/index.d.ts +7 -0
  20. package/dist/modules/headshotmarketing/index.js +1083 -0
  21. package/dist/modules/housingvista/index.cjs +137 -0
  22. package/dist/modules/housingvista/index.d.cts +7 -0
  23. package/dist/modules/housingvista/index.d.ts +7 -0
  24. package/dist/modules/housingvista/index.js +137 -0
  25. package/dist/modules/movethewheels/index.cjs +565 -0
  26. package/dist/modules/movethewheels/index.d.cts +7 -0
  27. package/dist/modules/movethewheels/index.d.ts +7 -0
  28. package/dist/modules/movethewheels/index.js +565 -0
  29. package/dist/modules/planmagnet/index.cjs +795 -0
  30. package/dist/modules/planmagnet/index.d.cts +7 -0
  31. package/dist/modules/planmagnet/index.d.ts +7 -0
  32. package/dist/modules/planmagnet/index.js +795 -0
  33. package/dist/modules/proserviceworld/index.cjs +193 -0
  34. package/dist/modules/proserviceworld/index.d.cts +7 -0
  35. package/dist/modules/proserviceworld/index.d.ts +7 -0
  36. package/dist/modules/proserviceworld/index.js +193 -0
  37. package/dist/modules/timecampus/index.cjs +444 -0
  38. package/dist/modules/timecampus/index.d.cts +7 -0
  39. package/dist/modules/timecampus/index.d.ts +7 -0
  40. package/dist/modules/timecampus/index.js +444 -0
  41. package/package.json +1 -1
@@ -0,0 +1,196 @@
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(o,n){super(o),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},h=class extends u{constructor(o,n){super(o,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},E=class extends Error{cause;constructor(o,n){super(o),this.name="CliInternalError",this.cause=n;}};var x=null;function F(s){x=s;}function I(){if(!x)throw new E("vibecontrols module helpers used before setHelpersContext was called");return x}function Ge(){let s=I();if(!s.auth.isAuthenticated())throw new h(`Authentication required. Run \`${s.productName} auth login\`.`)}async function c(s,o){return Ge(),I().gql.workspace.request(s,o)}async function O(s,o){return I().gql.workspaceAuthOnly.request(s,o)}function a(s){let o=s instanceof Error?s.message:String(s);throw new u(o)}function p(s,o,n){I().output.formatAndOutput(s,o,n);}function l(s){I().output.printSuccess(s);}function d(s,o){return I().output.truncate(s,o)}var v=`
2
+ id firstName lastName email phone position department location type status
3
+ salary performanceScore managerId avatar startDate workspaceId
4
+ `,T=`
5
+ id firstName lastName email phone position experience currentCompany skills
6
+ source status rating resumeUrl notes appliedDate workspaceId
7
+ `,S=`
8
+ id title department description type experienceLevel location requirements
9
+ benefits salaryMin salaryMax applicants status postedDate deadline workspaceId
10
+ `,b=`
11
+ id employeeId employeeName department type reason startDate endDate days
12
+ status approverName workspaceId
13
+ `,R=`
14
+ id title content author authorRole category priority isPinned tags viewCount
15
+ createdAt workspaceId
16
+ `,U=`
17
+ id title message type category read actionUrl createdAt workspaceId
18
+ `,W=`
19
+ id name contactPerson email phone industry status projects revenue since workspaceId
20
+ `,B=`
21
+ id title description category level instructor duration modules enrolled
22
+ completed rating skills status thumbnail workspaceId
23
+ `,j=`
24
+ id name headId headName employeeCount budget location status workspaceId
25
+ `,G=`
26
+ id candidateId candidateName position type interviewerName date time status
27
+ rating feedback workspaceId
28
+ `,J=`
29
+ id number clientName amount status issueDate dueDate items workspaceId
30
+ `,V=`
31
+ id title description level duration courses enrolled completionRate workspaceId
32
+ `,H=`
33
+ id title description category provider price priceType deliveryTime rating
34
+ reviews skills status workspaceId
35
+ `,Y=`
36
+ id employeeId employeeName department period grossPay deductions netPay
37
+ status paymentMethod payDate workspaceId
38
+ `,K=`
39
+ id name description status priority progress budget spent startDate endDate
40
+ managerId managerName teamId teamName tasks completedTasks workspaceId
41
+ `,z=`
42
+ id name description department leadId leadName memberCount members
43
+ projectCount status createdAt workspaceId
44
+ `,Q=`
45
+ id employeeId employeeName date clockIn clockOut totalHours overtime project
46
+ status workspaceId
47
+ `,X=`
48
+ id name category contactPerson email phone contractValue rating status workspaceId
49
+ `,A=`
50
+ query CrewfoundryBootstrap {
51
+ crewfoundryBootstrap {
52
+ employees { ${v} }
53
+ candidates { ${T} }
54
+ jobPostings { ${S} }
55
+ leaveRequests { ${b} }
56
+ announcements { ${R} }
57
+ notifications { ${U} }
58
+ clients { ${W} }
59
+ courses { ${B} }
60
+ departments { ${j} }
61
+ interviews { ${G} }
62
+ invoices { ${J} }
63
+ learningPaths { ${V} }
64
+ marketplaceServices { ${H} }
65
+ payrollRecords { ${Y} }
66
+ projects { ${K} }
67
+ teams { ${z} }
68
+ timeEntries { ${Q} }
69
+ vendors { ${X} }
70
+ }
71
+ }
72
+ `,L=`
73
+ query CrewfoundryListEmployees {
74
+ crewfoundryBootstrap { employees { ${v} } }
75
+ }
76
+ `,N=`
77
+ query CrewfoundryListCandidates {
78
+ crewfoundryBootstrap { candidates { ${T} } }
79
+ }
80
+ `,D=`
81
+ query CrewfoundryListJobPostings {
82
+ crewfoundryBootstrap { jobPostings { ${S} } }
83
+ }
84
+ `,_=`
85
+ query CrewfoundryListLeaveRequests {
86
+ crewfoundryBootstrap { leaveRequests { ${b} } }
87
+ }
88
+ `,P=`
89
+ query CrewfoundryListAnnouncements {
90
+ crewfoundryBootstrap { announcements { ${R} } }
91
+ }
92
+ `,Z=`
93
+ query CrewfoundryListNotifications {
94
+ crewfoundryBootstrap { notifications { ${U} } }
95
+ }
96
+ `,ee=`
97
+ query CrewfoundryListClients {
98
+ crewfoundryBootstrap { clients { ${W} } }
99
+ }
100
+ `,te=`
101
+ query CrewfoundryListCourses {
102
+ crewfoundryBootstrap { courses { ${B} } }
103
+ }
104
+ `,ne=`
105
+ query CrewfoundryListDepartments {
106
+ crewfoundryBootstrap { departments { ${j} } }
107
+ }
108
+ `,re=`
109
+ query CrewfoundryListInterviews {
110
+ crewfoundryBootstrap { interviews { ${G} } }
111
+ }
112
+ `,oe=`
113
+ query CrewfoundryListInvoices {
114
+ crewfoundryBootstrap { invoices { ${J} } }
115
+ }
116
+ `,ie=`
117
+ query CrewfoundryListLearningPaths {
118
+ crewfoundryBootstrap { learningPaths { ${V} } }
119
+ }
120
+ `,se=`
121
+ query CrewfoundryListMarketplaceServices {
122
+ crewfoundryBootstrap { marketplaceServices { ${H} } }
123
+ }
124
+ `,ae=`
125
+ query CrewfoundryListPayrollRecords {
126
+ crewfoundryBootstrap { payrollRecords { ${Y} } }
127
+ }
128
+ `,pe=`
129
+ query CrewfoundryListProjects {
130
+ crewfoundryBootstrap { projects { ${K} } }
131
+ }
132
+ `,ce=`
133
+ query CrewfoundryListTeams {
134
+ crewfoundryBootstrap { teams { ${z} } }
135
+ }
136
+ `,ue=`
137
+ query CrewfoundryListTimeEntries {
138
+ crewfoundryBootstrap { timeEntries { ${Q} } }
139
+ }
140
+ `,de=`
141
+ query CrewfoundryListVendors {
142
+ crewfoundryBootstrap { vendors { ${X} } }
143
+ }
144
+ `,me=`
145
+ mutation CrewfoundryCreateEmployee($input: CreateCrewEmployeeInput!) {
146
+ createCrewEmployee(input: $input) { ${v} }
147
+ }
148
+ `,le=`
149
+ mutation CrewfoundryUpdateEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) {
150
+ updateCrewEmployee(id: $id, input: $input) { ${v} }
151
+ }
152
+ `,fe=`
153
+ mutation CrewfoundryRemoveEmployee($id: ID!) {
154
+ removeCrewEmployee(id: $id)
155
+ }
156
+ `,ge=`
157
+ mutation CrewfoundryCreateCandidate($input: CreateCrewCandidateInput!) {
158
+ createCrewCandidate(input: $input) { ${T} }
159
+ }
160
+ `,ye=`
161
+ mutation CrewfoundryUpdateCandidate($id: ID!, $input: UpdateCrewCandidateInput!) {
162
+ updateCrewCandidate(id: $id, input: $input) { ${T} }
163
+ }
164
+ `,we=`
165
+ mutation CrewfoundryCreateJobPosting($input: CreateCrewJobPostingInput!) {
166
+ createCrewJobPosting(input: $input) { ${S} }
167
+ }
168
+ `,Ce=`
169
+ mutation CrewfoundryUpdateJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) {
170
+ updateCrewJobPosting(id: $id, input: $input) { ${S} }
171
+ }
172
+ `,Ee=`
173
+ mutation CrewfoundryCreateLeaveRequest($input: CreateCrewLeaveRequestInput!) {
174
+ createCrewLeaveRequest(input: $input) { ${b} }
175
+ }
176
+ `,he=`
177
+ mutation CrewfoundryUpdateLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) {
178
+ updateCrewLeaveRequest(id: $id, input: $input) { ${b} }
179
+ }
180
+ `,Ie=`
181
+ mutation CrewfoundryCreateAnnouncement($input: CreateCrewAnnouncementInput!) {
182
+ createCrewAnnouncement(input: $input) { ${R} }
183
+ }
184
+ `,ke=`
185
+ mutation CrewfoundryMarkNotificationRead($id: ID!) {
186
+ markCrewNotificationRead(id: $id)
187
+ }
188
+ `,ve=`
189
+ mutation CrewfoundryMarkAllNotificationsRead {
190
+ markAllCrewNotificationsRead
191
+ }
192
+ `,Te=`
193
+ query CrewfoundryHealth {
194
+ _empty
195
+ }
196
+ `;function y(s){let o=Number.parseInt(s,10);if(Number.isNaN(o))throw new u(`Expected an integer but got "${s}"`);return o}function g(s){let o=Number.parseFloat(s);if(Number.isNaN(o))throw new u(`Expected a number but got "${s}"`);return o}function w(s){return s.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function Se(s){let o=s.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 e=(await c(L)).crewfoundryBootstrap.employees;n.department&&(e=e.filter(r=>r.department===n.department)),n.status&&(e=e.filter(r=>r.status===n.status)),p(n,e,{headers:["ID","Name","Email","Department","Position","Status"],rows:e.map(r=>[d(r.id,12),`${r.firstName} ${r.lastName}`,r.email,r.department,r.position,r.status])});}catch(t){a(t);}}),o.command("get").description("Get an employee by id").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let r=(await c(L)).crewfoundryBootstrap.employees.find(f=>f.id===n);if(!r)throw new u(`Employee ${n} not found`);p(t,r);}catch(e){a(e);}}),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",g).option("--type <s>","Employment type (e.g. full-time)","full-time").option("--status <s>","Status","active").option("--performance-score <n>","Performance score",g,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 t={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&&(t.managerId=n.managerId),n.avatar&&(t.avatar=n.avatar);let e=await c(me,{input:t});l(`Employee created: ${e.createCrewEmployee.firstName} ${e.createCrewEmployee.lastName}`),p(n,e.createCrewEmployee);}catch(t){a(t);}}),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",g).option("--type <s>","Employment type").option("--status <s>","Status").option("--performance-score <n>","Performance score",g).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,t)=>{try{let e={};if(t.firstName&&(e.firstName=t.firstName),t.lastName&&(e.lastName=t.lastName),t.email&&(e.email=t.email),t.phone&&(e.phone=t.phone),t.position&&(e.position=t.position),t.department&&(e.department=t.department),t.location&&(e.location=t.location),t.salary!==void 0&&(e.salary=t.salary),t.type&&(e.type=t.type),t.status&&(e.status=t.status),t.performanceScore!==void 0&&(e.performanceScore=t.performanceScore),t.managerId&&(e.managerId=t.managerId),t.avatar&&(e.avatar=t.avatar),t.startDate&&(e.startDate=t.startDate),!Object.keys(e).length)throw new u("No updates specified");let r=await c(le,{id:n,input:e});l("Employee updated"),p(t,r.updateCrewEmployee);}catch(e){a(e);}}),o.command("remove").description("Remove an employee").argument("<id>","Employee ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await c(fe,{id:n});if(!e.removeCrewEmployee)throw new u(`Employee ${n} could not be removed`);l(`Employee ${n} removed`),p(t,{removed:e.removeCrewEmployee});}catch(e){a(e);}});}function be(s){let o=s.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 e=(await c(N)).crewfoundryBootstrap.candidates;n.status&&(e=e.filter(r=>r.status===n.status)),n.position&&(e=e.filter(r=>r.position===n.position)),p(n,e,{headers:["ID","Name","Position","Source","Status","Rating"],rows:e.map(r=>[d(r.id,12),`${r.firstName} ${r.lastName}`,r.position,r.source,r.status,String(r.rating)])});}catch(t){a(t);}}),o.command("get").description("Get a candidate by id").argument("<id>","Candidate ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let r=(await c(N)).crewfoundryBootstrap.candidates.find(f=>f.id===n);if(!r)throw new u(`Candidate ${n} not found`);p(t,r);}catch(e){a(e);}}),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",g,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 t={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?w(n.skills):[],appliedDate:n.appliedDate??new Date().toISOString()};n.currentCompany&&(t.currentCompany=n.currentCompany),n.resumeUrl&&(t.resumeUrl=n.resumeUrl),n.notes&&(t.notes=n.notes);let e=await c(ge,{input:t});l(`Candidate created: ${e.createCrewCandidate.firstName} ${e.createCrewCandidate.lastName}`),p(n,e.createCrewCandidate);}catch(t){a(t);}}),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",g).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,t)=>{try{let e={};if(t.firstName&&(e.firstName=t.firstName),t.lastName&&(e.lastName=t.lastName),t.email&&(e.email=t.email),t.phone&&(e.phone=t.phone),t.position&&(e.position=t.position),t.source&&(e.source=t.source),t.experience!==void 0&&(e.experience=t.experience),t.rating!==void 0&&(e.rating=t.rating),t.status&&(e.status=t.status),t.currentCompany&&(e.currentCompany=t.currentCompany),t.skills&&(e.skills=w(t.skills)),t.resumeUrl&&(e.resumeUrl=t.resumeUrl),t.notes&&(e.notes=t.notes),t.appliedDate&&(e.appliedDate=t.appliedDate),!Object.keys(e).length)throw new u("No updates specified");let r=await c(ye,{id:n,input:e});l("Candidate updated"),p(t,r.updateCrewCandidate);}catch(e){a(e);}});}function xe(s){let o=s.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 e=(await c(D)).crewfoundryBootstrap.jobPostings;n.department&&(e=e.filter(r=>r.department===n.department)),n.status&&(e=e.filter(r=>r.status===n.status)),p(n,e,{headers:["ID","Title","Department","Type","Applicants","Status"],rows:e.map(r=>[d(r.id,12),r.title,r.department,r.type,String(r.applicants),r.status])});}catch(t){a(t);}}),o.command("get").description("Get a job posting by id").argument("<id>","Job posting ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let r=(await c(D)).crewfoundryBootstrap.jobPostings.find(f=>f.id===n);if(!r)throw new u(`Job posting ${n} not found`);p(t,r);}catch(e){a(e);}}),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",g,0).option("--salary-max <n>","Maximum salary",g,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 t={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?w(n.requirements):[],benefits:n.benefits?w(n.benefits):[],postedDate:n.postedDate??new Date().toISOString()};n.deadline&&(t.deadline=n.deadline);let e=await c(we,{input:t});l(`Job posting created: ${e.createCrewJobPosting.title}`),p(n,e.createCrewJobPosting);}catch(t){a(t);}}),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",g).option("--salary-max <n>","Maximum salary",g).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,t)=>{try{let e={};if(t.title&&(e.title=t.title),t.department&&(e.department=t.department),t.description&&(e.description=t.description),t.experienceLevel&&(e.experienceLevel=t.experienceLevel),t.location&&(e.location=t.location),t.type&&(e.type=t.type),t.applicants!==void 0&&(e.applicants=t.applicants),t.salaryMin!==void 0&&(e.salaryMin=t.salaryMin),t.salaryMax!==void 0&&(e.salaryMax=t.salaryMax),t.status&&(e.status=t.status),t.requirements&&(e.requirements=w(t.requirements)),t.benefits&&(e.benefits=w(t.benefits)),t.postedDate&&(e.postedDate=t.postedDate),t.deadline&&(e.deadline=t.deadline),!Object.keys(e).length)throw new u("No updates specified");let r=await c(Ce,{id:n,input:e});l("Job posting updated"),p(t,r.updateCrewJobPosting);}catch(e){a(e);}});}function Oe(s){let o=s.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 e=(await c(_)).crewfoundryBootstrap.leaveRequests;n.employee&&(e=e.filter(r=>r.employeeId===n.employee)),n.status&&(e=e.filter(r=>r.status===n.status)),p(n,e,{headers:["ID","Employee","Type","Days","Status"],rows:e.map(r=>[d(r.id,12),r.employeeName,r.type,String(r.days),r.status])});}catch(t){a(t);}}),o.command("get").description("Get a leave request by id").argument("<id>","Leave request ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let r=(await c(_)).crewfoundryBootstrap.leaveRequests.find(f=>f.id===n);if(!r)throw new u(`Leave request ${n} not found`);p(t,r);}catch(e){a(e);}}),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 t={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&&(t.approverName=n.approverName);let e=await c(Ee,{input:t});l(`Leave request created for ${e.createCrewLeaveRequest.employeeName}`),p(n,e.createCrewLeaveRequest);}catch(t){a(t);}}),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,t)=>{try{let e={};if(t.employeeId&&(e.employeeId=t.employeeId),t.employeeName&&(e.employeeName=t.employeeName),t.department&&(e.department=t.department),t.type&&(e.type=t.type),t.reason&&(e.reason=t.reason),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.days!==void 0&&(e.days=t.days),t.status&&(e.status=t.status),t.approverName&&(e.approverName=t.approverName),!Object.keys(e).length)throw new u("No updates specified");let r=await c(he,{id:n,input:e});l("Leave request updated"),p(t,r.updateCrewLeaveRequest);}catch(e){a(e);}});}function Re(s){let o=s.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 e=(await c(P)).crewfoundryBootstrap.announcements;n.category&&(e=e.filter(r=>r.category===n.category)),n.pinnedOnly&&(e=e.filter(r=>r.isPinned)),p(n,e,{headers:["ID","Title","Author","Category","Priority","Pinned"],rows:e.map(r=>[d(r.id,12),r.title,r.author,r.category,r.priority,r.isPinned?"yes":"no"])});}catch(t){a(t);}}),o.command("get").description("Get an announcement by id").argument("<id>","Announcement ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let r=(await c(P)).crewfoundryBootstrap.announcements.find(f=>f.id===n);if(!r)throw new u(`Announcement ${n} not found`);p(t,r);}catch(e){a(e);}}),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 t={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?w(n.tags):[],createdAt:n.createdAt??new Date().toISOString()},e=await c(Ie,{input:t});l(`Announcement created: ${e.createCrewAnnouncement.title}`),p(n,e.createCrewAnnouncement);}catch(t){a(t);}});}function Ae(s){let o=s.command("notifications").description("Crewfoundry notifications");o.command("list").description("List notifications").option("--category <c>","Filter by category").option("--unread-only","Only unread notifications").option("-f, --format <format>","Output format").action(async n=>{try{let e=(await c(Z)).crewfoundryBootstrap.notifications;n.category&&(e=e.filter(r=>r.category===n.category)),n.unreadOnly&&(e=e.filter(r=>!r.read)),p(n,e,{headers:["ID","Title","Type","Category","Read"],rows:e.map(r=>[d(r.id,12),r.title,r.type,r.category,r.read?"yes":"no"])});}catch(t){a(t);}}),o.command("mark-read").description("Mark a notification as read").argument("<id>","Notification ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await c(ke,{id:n});if(!e.markCrewNotificationRead)throw new u(`Notification ${n} could not be marked read`);l(`Notification ${n} marked read`),p(t,{read:e.markCrewNotificationRead});}catch(e){a(e);}}),o.command("mark-all-read").description("Mark all notifications as read").option("-f, --format <format>","Output format").action(async n=>{try{let t=await c(ve);l("All notifications marked read"),p(n,{read:t.markAllCrewNotificationsRead});}catch(t){a(t);}});}function i(s){return s==null?"-":String(s)}function Le(s){let o=s.command("directory").description("Crewfoundry read-only collections (clients, projects, teams, finance, learning)"),n=async(t,e,r,f)=>{try{let q=(await c(t)).crewfoundryBootstrap[e];p(r,q,{headers:f.headers,rows:q.map(f.row)});}catch(k){a(k);}};o.command("clients").description("List clients").option("-f, --format <format>","Output format").action(t=>n(ee,"clients",t,{headers:["ID","Name","Industry","Status","Projects","Revenue"],row:e=>[d(e.id,12),i(e.name),i(e.industry),i(e.status),i(e.projects),i(e.revenue)]})),o.command("courses").description("List training courses").option("-f, --format <format>","Output format").action(t=>n(te,"courses",t,{headers:["ID","Title","Category","Level","Enrolled","Status"],row:e=>[d(e.id,12),i(e.title),i(e.category),i(e.level),i(e.enrolled),i(e.status)]})),o.command("departments").description("List departments").option("-f, --format <format>","Output format").action(t=>n(ne,"departments",t,{headers:["ID","Name","Head","Employees","Budget","Status"],row:e=>[d(e.id,12),i(e.name),i(e.headName),i(e.employeeCount),i(e.budget),i(e.status)]})),o.command("interviews").description("List interviews").option("-f, --format <format>","Output format").action(t=>n(re,"interviews",t,{headers:["ID","Candidate","Position","Type","Status","Interviewer"],row:e=>[d(e.id,12),i(e.candidateName),i(e.position),i(e.type),i(e.status),i(e.interviewerName)]})),o.command("invoices").description("List invoices").option("-f, --format <format>","Output format").action(t=>n(oe,"invoices",t,{headers:["ID","Number","Client","Amount","Status"],row:e=>[d(e.id,12),i(e.number),i(e.clientName),i(e.amount),i(e.status)]})),o.command("learning-paths").description("List learning paths").option("-f, --format <format>","Output format").action(t=>n(ie,"learningPaths",t,{headers:["ID","Title","Level","Enrolled","Completion %"],row:e=>[d(e.id,12),i(e.title),i(e.level),i(e.enrolled),i(e.completionRate)]})),o.command("marketplace-services").description("List marketplace services").option("-f, --format <format>","Output format").action(t=>n(se,"marketplaceServices",t,{headers:["ID","Title","Category","Provider","Price","Rating"],row:e=>[d(e.id,12),i(e.title),i(e.category),i(e.provider),i(e.price),i(e.rating)]})),o.command("payroll").description("List payroll records").option("-f, --format <format>","Output format").action(t=>n(ae,"payrollRecords",t,{headers:["ID","Employee","Period","Gross","Net","Status"],row:e=>[d(e.id,12),i(e.employeeName),i(e.period),i(e.grossPay),i(e.netPay),i(e.status)]})),o.command("projects").description("List projects").option("-f, --format <format>","Output format").action(t=>n(pe,"projects",t,{headers:["ID","Name","Status","Priority","Progress","Budget"],row:e=>[d(e.id,12),i(e.name),i(e.status),i(e.priority),i(e.progress),i(e.budget)]})),o.command("teams").description("List teams").option("-f, --format <format>","Output format").action(t=>n(ce,"teams",t,{headers:["ID","Name","Department","Lead","Members","Status"],row:e=>[d(e.id,12),i(e.name),i(e.department),i(e.leadName),i(e.memberCount),i(e.status)]})),o.command("time-entries").description("List time entries").option("-f, --format <format>","Output format").action(t=>n(ue,"timeEntries",t,{headers:["ID","Employee","Date","Hours","Overtime","Status"],row:e=>[d(e.id,12),i(e.employeeName),i(e.date),i(e.totalHours),i(e.overtime),i(e.status)]})),o.command("vendors").description("List vendors").option("-f, --format <format>","Output format").action(t=>n(de,"vendors",t,{headers:["ID","Name","Category","Contract Value","Rating","Status"],row:e=>[d(e.id,12),i(e.name),i(e.category),i(e.contractValue),i(e.rating),i(e.status)]}));}function Ne(s){let o=s.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 t=await c(A);p(n,t.crewfoundryBootstrap);}catch(t){a(t);}}),o.command("summary").description("Per-collection counts derived from the bootstrap snapshot").option("-f, --format <format>","Output format").action(async n=>{try{let e=(await c(A)).crewfoundryBootstrap,r={employees:e.employees.length,candidates:e.candidates.length,jobPostings:e.jobPostings.length,leaveRequests:e.leaveRequests.length,announcements:e.announcements.length,notifications:e.notifications.length,clients:e.clients.length,courses:e.courses.length,departments:e.departments.length,interviews:e.interviews.length,invoices:e.invoices.length,learningPaths:e.learningPaths.length,marketplaceServices:e.marketplaceServices.length,payrollRecords:e.payrollRecords.length,projects:e.projects.length,teams:e.teams.length,timeEntries:e.timeEntries.length,vendors:e.vendors.length};p(n,r,{headers:["Collection","Count"],rows:Object.entries(r).map(([f,k])=>[f,String(k)])});}catch(t){a(t);}}),s.command("health").description("Crewfoundry service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let e=(await O(Te))._empty??"ok";l(`crewfoundry: ${e}`),p(n,{health:e});}catch(t){a(t);}});}var Je={id:"crewfoundry",version:"1.0.0",displayName:"Crewfoundry",dependsOn:["auth","workspaces"],register(s,o){F(o);let n=s.command("crewfoundry").description("Crewfoundry workforce & HR operations");Se(n),be(n),xe(n),Oe(n),Re(n),Ae(n),Le(n),Ne(n);}},Pn=Je;module.exports=Pn;
@@ -0,0 +1,7 @@
1
+ import { C as CliModule } from '../../module-DxCuik6L.cjs';
2
+ import 'commander';
3
+ import 'graphql-request';
4
+
5
+ declare const crewfoundryModule: CliModule;
6
+
7
+ export { crewfoundryModule as default };
@@ -0,0 +1,7 @@
1
+ import { C as CliModule } from '../../module-DxCuik6L.js';
2
+ import 'commander';
3
+ import 'graphql-request';
4
+
5
+ declare const crewfoundryModule: CliModule;
6
+
7
+ export { crewfoundryModule as default };
@@ -0,0 +1,196 @@
1
+ import {a,b as b$1,h as h$1,p,g,i,d}from'../../chunk-WXDQ3S5J.js';import {o as o$1}from'../../chunk-TCBALVP4.js';var S=`
2
+ id firstName lastName email phone position department location type status
3
+ salary performanceScore managerId avatar startDate workspaceId
4
+ `,R=`
5
+ id firstName lastName email phone position experience currentCompany skills
6
+ source status rating resumeUrl notes appliedDate workspaceId
7
+ `,N=`
8
+ id title department description type experienceLevel location requirements
9
+ benefits salaryMin salaryMax applicants status postedDate deadline workspaceId
10
+ `,L=`
11
+ id employeeId employeeName department type reason startDate endDate days
12
+ status approverName workspaceId
13
+ `,v=`
14
+ id title content author authorRole category priority isPinned tags viewCount
15
+ createdAt workspaceId
16
+ `,q=`
17
+ id title message type category read actionUrl createdAt workspaceId
18
+ `,$=`
19
+ id name contactPerson email phone industry status projects revenue since workspaceId
20
+ `,x=`
21
+ id title description category level instructor duration modules enrolled
22
+ completed rating skills status thumbnail workspaceId
23
+ `,M=`
24
+ id name headId headName employeeCount budget location status workspaceId
25
+ `,B=`
26
+ id candidateId candidateName position type interviewerName date time status
27
+ rating feedback workspaceId
28
+ `,U=`
29
+ id number clientName amount status issueDate dueDate items workspaceId
30
+ `,F=`
31
+ id title description level duration courses enrolled completionRate workspaceId
32
+ `,W=`
33
+ id title description category provider price priceType deliveryTime rating
34
+ reviews skills status workspaceId
35
+ `,j=`
36
+ id employeeId employeeName department period grossPay deductions netPay
37
+ status paymentMethod payDate workspaceId
38
+ `,J=`
39
+ id name description status priority progress budget spent startDate endDate
40
+ managerId managerName teamId teamName tasks completedTasks workspaceId
41
+ `,V=`
42
+ id name description department leadId leadName memberCount members
43
+ projectCount status createdAt workspaceId
44
+ `,G=`
45
+ id employeeId employeeName date clockIn clockOut totalHours overtime project
46
+ status workspaceId
47
+ `,Y=`
48
+ id name category contactPerson email phone contractValue rating status workspaceId
49
+ `,h=`
50
+ query CrewfoundryBootstrap {
51
+ crewfoundryBootstrap {
52
+ employees { ${S} }
53
+ candidates { ${R} }
54
+ jobPostings { ${N} }
55
+ leaveRequests { ${L} }
56
+ announcements { ${v} }
57
+ notifications { ${q} }
58
+ clients { ${$} }
59
+ courses { ${x} }
60
+ departments { ${M} }
61
+ interviews { ${B} }
62
+ invoices { ${U} }
63
+ learningPaths { ${F} }
64
+ marketplaceServices { ${W} }
65
+ payrollRecords { ${j} }
66
+ projects { ${J} }
67
+ teams { ${V} }
68
+ timeEntries { ${G} }
69
+ vendors { ${Y} }
70
+ }
71
+ }
72
+ `,D=`
73
+ query CrewfoundryListEmployees {
74
+ crewfoundryBootstrap { employees { ${S} } }
75
+ }
76
+ `,T=`
77
+ query CrewfoundryListCandidates {
78
+ crewfoundryBootstrap { candidates { ${R} } }
79
+ }
80
+ `,_=`
81
+ query CrewfoundryListJobPostings {
82
+ crewfoundryBootstrap { jobPostings { ${N} } }
83
+ }
84
+ `,A=`
85
+ query CrewfoundryListLeaveRequests {
86
+ crewfoundryBootstrap { leaveRequests { ${L} } }
87
+ }
88
+ `,b=`
89
+ query CrewfoundryListAnnouncements {
90
+ crewfoundryBootstrap { announcements { ${v} } }
91
+ }
92
+ `,H=`
93
+ query CrewfoundryListNotifications {
94
+ crewfoundryBootstrap { notifications { ${q} } }
95
+ }
96
+ `,K=`
97
+ query CrewfoundryListClients {
98
+ crewfoundryBootstrap { clients { ${$} } }
99
+ }
100
+ `,Q=`
101
+ query CrewfoundryListCourses {
102
+ crewfoundryBootstrap { courses { ${x} } }
103
+ }
104
+ `,z=`
105
+ query CrewfoundryListDepartments {
106
+ crewfoundryBootstrap { departments { ${M} } }
107
+ }
108
+ `,X=`
109
+ query CrewfoundryListInterviews {
110
+ crewfoundryBootstrap { interviews { ${B} } }
111
+ }
112
+ `,Z=`
113
+ query CrewfoundryListInvoices {
114
+ crewfoundryBootstrap { invoices { ${U} } }
115
+ }
116
+ `,tt=`
117
+ query CrewfoundryListLearningPaths {
118
+ crewfoundryBootstrap { learningPaths { ${F} } }
119
+ }
120
+ `,et=`
121
+ query CrewfoundryListMarketplaceServices {
122
+ crewfoundryBootstrap { marketplaceServices { ${W} } }
123
+ }
124
+ `,nt=`
125
+ query CrewfoundryListPayrollRecords {
126
+ crewfoundryBootstrap { payrollRecords { ${j} } }
127
+ }
128
+ `,rt=`
129
+ query CrewfoundryListProjects {
130
+ crewfoundryBootstrap { projects { ${J} } }
131
+ }
132
+ `,ot=`
133
+ query CrewfoundryListTeams {
134
+ crewfoundryBootstrap { teams { ${V} } }
135
+ }
136
+ `,at=`
137
+ query CrewfoundryListTimeEntries {
138
+ crewfoundryBootstrap { timeEntries { ${G} } }
139
+ }
140
+ `,it=`
141
+ query CrewfoundryListVendors {
142
+ crewfoundryBootstrap { vendors { ${Y} } }
143
+ }
144
+ `,st=`
145
+ mutation CrewfoundryCreateEmployee($input: CreateCrewEmployeeInput!) {
146
+ createCrewEmployee(input: $input) { ${S} }
147
+ }
148
+ `,pt=`
149
+ mutation CrewfoundryUpdateEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) {
150
+ updateCrewEmployee(id: $id, input: $input) { ${S} }
151
+ }
152
+ `,mt=`
153
+ mutation CrewfoundryRemoveEmployee($id: ID!) {
154
+ removeCrewEmployee(id: $id)
155
+ }
156
+ `,dt=`
157
+ mutation CrewfoundryCreateCandidate($input: CreateCrewCandidateInput!) {
158
+ createCrewCandidate(input: $input) { ${R} }
159
+ }
160
+ `,ct=`
161
+ mutation CrewfoundryUpdateCandidate($id: ID!, $input: UpdateCrewCandidateInput!) {
162
+ updateCrewCandidate(id: $id, input: $input) { ${R} }
163
+ }
164
+ `,ut=`
165
+ mutation CrewfoundryCreateJobPosting($input: CreateCrewJobPostingInput!) {
166
+ createCrewJobPosting(input: $input) { ${N} }
167
+ }
168
+ `,lt=`
169
+ mutation CrewfoundryUpdateJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) {
170
+ updateCrewJobPosting(id: $id, input: $input) { ${N} }
171
+ }
172
+ `,ft=`
173
+ mutation CrewfoundryCreateLeaveRequest($input: CreateCrewLeaveRequestInput!) {
174
+ createCrewLeaveRequest(input: $input) { ${L} }
175
+ }
176
+ `,yt=`
177
+ mutation CrewfoundryUpdateLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) {
178
+ updateCrewLeaveRequest(id: $id, input: $input) { ${L} }
179
+ }
180
+ `,gt=`
181
+ mutation CrewfoundryCreateAnnouncement($input: CreateCrewAnnouncementInput!) {
182
+ createCrewAnnouncement(input: $input) { ${v} }
183
+ }
184
+ `,wt=`
185
+ mutation CrewfoundryMarkNotificationRead($id: ID!) {
186
+ markCrewNotificationRead(id: $id)
187
+ }
188
+ `,Ct=`
189
+ mutation CrewfoundryMarkAllNotificationsRead {
190
+ markAllCrewNotificationsRead
191
+ }
192
+ `,Et=`
193
+ query CrewfoundryHealth {
194
+ _empty
195
+ }
196
+ `;function y(m){let a=Number.parseInt(m,10);if(Number.isNaN(a))throw new o$1(`Expected an integer but got "${m}"`);return a}function f(m){let a=Number.parseFloat(m);if(Number.isNaN(a))throw new o$1(`Expected a number but got "${m}"`);return a}function C(m){return m.split(",").map(a=>a.trim()).filter(a=>a.length>0)}function It(m){let a=m.command("employees").description("Crewfoundry employees");a.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(D)).crewfoundryBootstrap.employees;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),h$1(n,t,{headers:["ID","Name","Email","Department","Position","Status"],rows:t.map(r=>[p(r.id,12),`${r.firstName} ${r.lastName}`,r.email,r.department,r.position,r.status])});}catch(e){g(e);}}),a.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(D)).crewfoundryBootstrap.employees.find(l=>l.id===n);if(!r)throw new o$1(`Employee ${n} not found`);h$1(e,r);}catch(t){g(t);}}),a.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(st,{input:e});i(`Employee created: ${t.createCrewEmployee.firstName} ${t.createCrewEmployee.lastName}`),h$1(n,t.createCrewEmployee);}catch(e){g(e);}}),a.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 o$1("No updates specified");let r=await b$1(pt,{id:n,input:t});i("Employee updated"),h$1(e,r.updateCrewEmployee);}catch(t){g(t);}}),a.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(mt,{id:n});if(!t.removeCrewEmployee)throw new o$1(`Employee ${n} could not be removed`);i(`Employee ${n} removed`),h$1(e,{removed:t.removeCrewEmployee});}catch(t){g(t);}});}function St(m){let a=m.command("candidates").description("Crewfoundry recruiting candidates");a.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(T)).crewfoundryBootstrap.candidates;n.status&&(t=t.filter(r=>r.status===n.status)),n.position&&(t=t.filter(r=>r.position===n.position)),h$1(n,t,{headers:["ID","Name","Position","Source","Status","Rating"],rows:t.map(r=>[p(r.id,12),`${r.firstName} ${r.lastName}`,r.position,r.source,r.status,String(r.rating)])});}catch(e){g(e);}}),a.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(T)).crewfoundryBootstrap.candidates.find(l=>l.id===n);if(!r)throw new o$1(`Candidate ${n} not found`);h$1(e,r);}catch(t){g(t);}}),a.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?C(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(dt,{input:e});i(`Candidate created: ${t.createCrewCandidate.firstName} ${t.createCrewCandidate.lastName}`),h$1(n,t.createCrewCandidate);}catch(e){g(e);}}),a.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=C(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 o$1("No updates specified");let r=await b$1(ct,{id:n,input:t});i("Candidate updated"),h$1(e,r.updateCrewCandidate);}catch(t){g(t);}});}function Rt(m){let a=m.command("job-postings").description("Crewfoundry job postings");a.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(_)).crewfoundryBootstrap.jobPostings;n.department&&(t=t.filter(r=>r.department===n.department)),n.status&&(t=t.filter(r=>r.status===n.status)),h$1(n,t,{headers:["ID","Title","Department","Type","Applicants","Status"],rows:t.map(r=>[p(r.id,12),r.title,r.department,r.type,String(r.applicants),r.status])});}catch(e){g(e);}}),a.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(_)).crewfoundryBootstrap.jobPostings.find(l=>l.id===n);if(!r)throw new o$1(`Job posting ${n} not found`);h$1(e,r);}catch(t){g(t);}}),a.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?C(n.requirements):[],benefits:n.benefits?C(n.benefits):[],postedDate:n.postedDate??new Date().toISOString()};n.deadline&&(e.deadline=n.deadline);let t=await b$1(ut,{input:e});i(`Job posting created: ${t.createCrewJobPosting.title}`),h$1(n,t.createCrewJobPosting);}catch(e){g(e);}}),a.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=C(e.requirements)),e.benefits&&(t.benefits=C(e.benefits)),e.postedDate&&(t.postedDate=e.postedDate),e.deadline&&(t.deadline=e.deadline),!Object.keys(t).length)throw new o$1("No updates specified");let r=await b$1(lt,{id:n,input:t});i("Job posting updated"),h$1(e,r.updateCrewJobPosting);}catch(t){g(t);}});}function Nt(m){let a=m.command("leave-requests").description("Crewfoundry leave requests");a.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(A)).crewfoundryBootstrap.leaveRequests;n.employee&&(t=t.filter(r=>r.employeeId===n.employee)),n.status&&(t=t.filter(r=>r.status===n.status)),h$1(n,t,{headers:["ID","Employee","Type","Days","Status"],rows:t.map(r=>[p(r.id,12),r.employeeName,r.type,String(r.days),r.status])});}catch(e){g(e);}}),a.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(A)).crewfoundryBootstrap.leaveRequests.find(l=>l.id===n);if(!r)throw new o$1(`Leave request ${n} not found`);h$1(e,r);}catch(t){g(t);}}),a.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(ft,{input:e});i(`Leave request created for ${t.createCrewLeaveRequest.employeeName}`),h$1(n,t.createCrewLeaveRequest);}catch(e){g(e);}}),a.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 o$1("No updates specified");let r=await b$1(yt,{id:n,input:t});i("Leave request updated"),h$1(e,r.updateCrewLeaveRequest);}catch(t){g(t);}});}function Lt(m){let a=m.command("announcements").description("Crewfoundry announcements");a.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(b)).crewfoundryBootstrap.announcements;n.category&&(t=t.filter(r=>r.category===n.category)),n.pinnedOnly&&(t=t.filter(r=>r.isPinned)),h$1(n,t,{headers:["ID","Title","Author","Category","Priority","Pinned"],rows:t.map(r=>[p(r.id,12),r.title,r.author,r.category,r.priority,r.isPinned?"yes":"no"])});}catch(e){g(e);}}),a.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(b)).crewfoundryBootstrap.announcements.find(l=>l.id===n);if(!r)throw new o$1(`Announcement ${n} not found`);h$1(e,r);}catch(t){g(t);}}),a.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?C(n.tags):[],createdAt:n.createdAt??new Date().toISOString()},t=await b$1(gt,{input:e});i(`Announcement created: ${t.createCrewAnnouncement.title}`),h$1(n,t.createCrewAnnouncement);}catch(e){g(e);}});}function Ot(m){let a=m.command("notifications").description("Crewfoundry notifications");a.command("list").description("List notifications").option("--category <c>","Filter by category").option("--unread-only","Only unread notifications").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await b$1(H)).crewfoundryBootstrap.notifications;n.category&&(t=t.filter(r=>r.category===n.category)),n.unreadOnly&&(t=t.filter(r=>!r.read)),h$1(n,t,{headers:["ID","Title","Type","Category","Read"],rows:t.map(r=>[p(r.id,12),r.title,r.type,r.category,r.read?"yes":"no"])});}catch(e){g(e);}}),a.command("mark-read").description("Mark a notification as read").argument("<id>","Notification ID").option("-f, --format <format>","Output format").action(async(n,e)=>{try{let t=await b$1(wt,{id:n});if(!t.markCrewNotificationRead)throw new o$1(`Notification ${n} could not be marked read`);i(`Notification ${n} marked read`),h$1(e,{read:t.markCrewNotificationRead});}catch(t){g(t);}}),a.command("mark-all-read").description("Mark all notifications as read").option("-f, --format <format>","Output format").action(async n=>{try{let e=await b$1(Ct);i("All notifications marked read"),h$1(n,{read:e.markAllCrewNotificationsRead});}catch(e){g(e);}});}function o(m){return m==null?"-":String(m)}function vt(m){let a=m.command("directory").description("Crewfoundry read-only collections (clients, projects, teams, finance, learning)"),n=async(e,t,r,l)=>{try{let k=(await b$1(e)).crewfoundryBootstrap[t];h$1(r,k,{headers:l.headers,rows:k.map(l.row)});}catch(I){g(I);}};a.command("clients").description("List clients").option("-f, --format <format>","Output format").action(e=>n(K,"clients",e,{headers:["ID","Name","Industry","Status","Projects","Revenue"],row:t=>[p(t.id,12),o(t.name),o(t.industry),o(t.status),o(t.projects),o(t.revenue)]})),a.command("courses").description("List training courses").option("-f, --format <format>","Output format").action(e=>n(Q,"courses",e,{headers:["ID","Title","Category","Level","Enrolled","Status"],row:t=>[p(t.id,12),o(t.title),o(t.category),o(t.level),o(t.enrolled),o(t.status)]})),a.command("departments").description("List departments").option("-f, --format <format>","Output format").action(e=>n(z,"departments",e,{headers:["ID","Name","Head","Employees","Budget","Status"],row:t=>[p(t.id,12),o(t.name),o(t.headName),o(t.employeeCount),o(t.budget),o(t.status)]})),a.command("interviews").description("List interviews").option("-f, --format <format>","Output format").action(e=>n(X,"interviews",e,{headers:["ID","Candidate","Position","Type","Status","Interviewer"],row:t=>[p(t.id,12),o(t.candidateName),o(t.position),o(t.type),o(t.status),o(t.interviewerName)]})),a.command("invoices").description("List invoices").option("-f, --format <format>","Output format").action(e=>n(Z,"invoices",e,{headers:["ID","Number","Client","Amount","Status"],row:t=>[p(t.id,12),o(t.number),o(t.clientName),o(t.amount),o(t.status)]})),a.command("learning-paths").description("List learning paths").option("-f, --format <format>","Output format").action(e=>n(tt,"learningPaths",e,{headers:["ID","Title","Level","Enrolled","Completion %"],row:t=>[p(t.id,12),o(t.title),o(t.level),o(t.enrolled),o(t.completionRate)]})),a.command("marketplace-services").description("List marketplace services").option("-f, --format <format>","Output format").action(e=>n(et,"marketplaceServices",e,{headers:["ID","Title","Category","Provider","Price","Rating"],row:t=>[p(t.id,12),o(t.title),o(t.category),o(t.provider),o(t.price),o(t.rating)]})),a.command("payroll").description("List payroll records").option("-f, --format <format>","Output format").action(e=>n(nt,"payrollRecords",e,{headers:["ID","Employee","Period","Gross","Net","Status"],row:t=>[p(t.id,12),o(t.employeeName),o(t.period),o(t.grossPay),o(t.netPay),o(t.status)]})),a.command("projects").description("List projects").option("-f, --format <format>","Output format").action(e=>n(rt,"projects",e,{headers:["ID","Name","Status","Priority","Progress","Budget"],row:t=>[p(t.id,12),o(t.name),o(t.status),o(t.priority),o(t.progress),o(t.budget)]})),a.command("teams").description("List teams").option("-f, --format <format>","Output format").action(e=>n(ot,"teams",e,{headers:["ID","Name","Department","Lead","Members","Status"],row:t=>[p(t.id,12),o(t.name),o(t.department),o(t.leadName),o(t.memberCount),o(t.status)]})),a.command("time-entries").description("List time entries").option("-f, --format <format>","Output format").action(e=>n(at,"timeEntries",e,{headers:["ID","Employee","Date","Hours","Overtime","Status"],row:t=>[p(t.id,12),o(t.employeeName),o(t.date),o(t.totalHours),o(t.overtime),o(t.status)]})),a.command("vendors").description("List vendors").option("-f, --format <format>","Output format").action(e=>n(it,"vendors",e,{headers:["ID","Name","Category","Contract Value","Rating","Status"],row:t=>[p(t.id,12),o(t.name),o(t.category),o(t.contractValue),o(t.rating),o(t.status)]}));}function ht(m){let a=m.command("analytics").description("Crewfoundry analytics & bootstrap");a.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(h);h$1(n,e.crewfoundryBootstrap);}catch(e){g(e);}}),a.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(h)).crewfoundryBootstrap,r={employees:t.employees.length,candidates:t.candidates.length,jobPostings:t.jobPostings.length,leaveRequests:t.leaveRequests.length,announcements:t.announcements.length,notifications:t.notifications.length,clients:t.clients.length,courses:t.courses.length,departments:t.departments.length,interviews:t.interviews.length,invoices:t.invoices.length,learningPaths:t.learningPaths.length,marketplaceServices:t.marketplaceServices.length,payrollRecords:t.payrollRecords.length,projects:t.projects.length,teams:t.teams.length,timeEntries:t.timeEntries.length,vendors:t.vendors.length};h$1(n,r,{headers:["Collection","Count"],rows:Object.entries(r).map(([l,I])=>[l,String(I)])});}catch(e){g(e);}}),m.command("health").description("Crewfoundry service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=(await d(Et))._empty??"ok";i(`crewfoundry: ${t}`),h$1(n,{health:t});}catch(e){g(e);}});}var Dt={id:"crewfoundry",version:"1.0.0",displayName:"Crewfoundry",dependsOn:["auth","workspaces"],register(m,a$1){a(a$1);let n=m.command("crewfoundry").description("Crewfoundry workforce & HR operations");It(n),St(n),Rt(n),Nt(n),Lt(n),Ot(n),vt(n),ht(n);}},fe=Dt;export{fe as default};