@burdenoff/cli-sdk 2026.1102.3 → 2026.1107.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/modules/assethandler/index.cjs +22 -57
- package/dist/modules/assethandler/index.js +27 -62
- package/dist/modules/crewfoundry/index.cjs +63 -116
- package/dist/modules/crewfoundry/index.js +62 -115
- package/dist/modules/headshotmarketing/index.cjs +92 -261
- package/dist/modules/headshotmarketing/index.js +94 -263
- package/dist/modules/hookmovies/index.cjs +17 -6
- package/dist/modules/hookmovies/index.js +20 -9
- package/dist/modules/housingvista/index.cjs +31 -24
- package/dist/modules/housingvista/index.js +26 -19
- package/dist/modules/kadaikodi/index.cjs +56 -90
- package/dist/modules/kadaikodi/index.js +60 -94
- package/dist/modules/movethewheels/index.cjs +103 -231
- package/dist/modules/movethewheels/index.js +103 -231
- package/dist/modules/technospam/index.cjs +82 -64
- package/dist/modules/technospam/index.js +82 -64
- package/dist/modules/timecampus/index.cjs +31 -85
- package/dist/modules/timecampus/index.js +32 -86
- package/package.json +1 -1
|
@@ -1,196 +1,143 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h as h$1,k,d}from'../../chunk-O6UCQ5IT.js';import {o
|
|
1
|
+
import {a as a$1,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.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=`
|
|
5
5
|
id firstName lastName email phone position experience currentCompany skills
|
|
6
6
|
source status rating resumeUrl notes appliedDate workspaceId
|
|
7
|
-
`,
|
|
7
|
+
`,R=`
|
|
8
8
|
id title department description type experienceLevel location requirements
|
|
9
9
|
benefits salaryMin salaryMax applicants status postedDate deadline workspaceId
|
|
10
|
-
`,
|
|
10
|
+
`,O=`
|
|
11
11
|
id employeeId employeeName department type reason startDate endDate days
|
|
12
12
|
status approverName workspaceId
|
|
13
13
|
`,v=`
|
|
14
14
|
id title content author authorRole category priority isPinned tags viewCount
|
|
15
15
|
createdAt workspaceId
|
|
16
|
-
`,
|
|
17
|
-
id title message type category read actionUrl createdAt workspaceId
|
|
18
|
-
`,$=`
|
|
16
|
+
`,k=`
|
|
19
17
|
id name contactPerson email phone industry status projects revenue since workspaceId
|
|
20
|
-
|
|
21
|
-
id title description category level instructor duration modules enrolled
|
|
22
|
-
completed rating skills status thumbnail workspaceId
|
|
23
|
-
`,M=`
|
|
18
|
+
`,$=`
|
|
24
19
|
id name headId headName employeeCount budget location status workspaceId
|
|
25
|
-
`,
|
|
20
|
+
`,x=`
|
|
26
21
|
id candidateId candidateName position type interviewerName date time status
|
|
27
22
|
rating feedback workspaceId
|
|
28
|
-
`,
|
|
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=`
|
|
23
|
+
`,B=`
|
|
39
24
|
id name description status priority progress budget spent startDate endDate
|
|
40
25
|
managerId managerName teamId teamName tasks completedTasks workspaceId
|
|
41
|
-
`,
|
|
26
|
+
`,M=`
|
|
42
27
|
id name description department leadId leadName memberCount members
|
|
43
28
|
projectCount status createdAt workspaceId
|
|
44
|
-
`,
|
|
29
|
+
`,U=`
|
|
45
30
|
id employeeId employeeName date clockIn clockOut totalHours overtime project
|
|
46
31
|
status workspaceId
|
|
47
|
-
`,
|
|
32
|
+
`,j=`
|
|
48
33
|
id name category contactPerson email phone contractValue rating status workspaceId
|
|
49
|
-
`,
|
|
34
|
+
`,L=`
|
|
50
35
|
query CrewfoundryBootstrap {
|
|
51
36
|
crewfoundryBootstrap {
|
|
52
37
|
employees { ${S} }
|
|
53
|
-
candidates { ${
|
|
54
|
-
jobPostings { ${
|
|
55
|
-
leaveRequests { ${
|
|
38
|
+
candidates { ${N} }
|
|
39
|
+
jobPostings { ${R} }
|
|
40
|
+
leaveRequests { ${O} }
|
|
56
41
|
announcements { ${v} }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
marketplaceServices { ${W} }
|
|
65
|
-
payrollRecords { ${j} }
|
|
66
|
-
projects { ${J} }
|
|
67
|
-
teams { ${V} }
|
|
68
|
-
timeEntries { ${G} }
|
|
69
|
-
vendors { ${Y} }
|
|
42
|
+
clients { ${k} }
|
|
43
|
+
departments { ${$} }
|
|
44
|
+
interviews { ${x} }
|
|
45
|
+
projects { ${B} }
|
|
46
|
+
teams { ${M} }
|
|
47
|
+
timeEntries { ${U} }
|
|
48
|
+
vendors { ${j} }
|
|
70
49
|
}
|
|
71
50
|
}
|
|
72
|
-
`,
|
|
51
|
+
`,h=`
|
|
73
52
|
query CrewfoundryListEmployees {
|
|
74
53
|
crewfoundryBootstrap { employees { ${S} } }
|
|
75
54
|
}
|
|
76
|
-
`,
|
|
55
|
+
`,b=`
|
|
77
56
|
query CrewfoundryListCandidates {
|
|
78
|
-
crewfoundryBootstrap { candidates { ${
|
|
57
|
+
crewfoundryBootstrap { candidates { ${N} } }
|
|
79
58
|
}
|
|
80
|
-
`,
|
|
59
|
+
`,T=`
|
|
81
60
|
query CrewfoundryListJobPostings {
|
|
82
|
-
crewfoundryBootstrap { jobPostings { ${
|
|
61
|
+
crewfoundryBootstrap { jobPostings { ${R} } }
|
|
83
62
|
}
|
|
84
|
-
`,
|
|
63
|
+
`,_=`
|
|
85
64
|
query CrewfoundryListLeaveRequests {
|
|
86
|
-
crewfoundryBootstrap { leaveRequests { ${
|
|
65
|
+
crewfoundryBootstrap { leaveRequests { ${O} } }
|
|
87
66
|
}
|
|
88
|
-
`,
|
|
67
|
+
`,A=`
|
|
89
68
|
query CrewfoundryListAnnouncements {
|
|
90
69
|
crewfoundryBootstrap { announcements { ${v} } }
|
|
91
70
|
}
|
|
92
|
-
`,
|
|
93
|
-
query CrewfoundryListNotifications {
|
|
94
|
-
crewfoundryBootstrap { notifications { ${q} } }
|
|
95
|
-
}
|
|
96
|
-
`,K=`
|
|
71
|
+
`,J=`
|
|
97
72
|
query CrewfoundryListClients {
|
|
98
|
-
crewfoundryBootstrap { clients { ${
|
|
73
|
+
crewfoundryBootstrap { clients { ${k} } }
|
|
99
74
|
}
|
|
100
|
-
`,
|
|
101
|
-
query CrewfoundryListCourses {
|
|
102
|
-
crewfoundryBootstrap { courses { ${x} } }
|
|
103
|
-
}
|
|
104
|
-
`,z=`
|
|
75
|
+
`,W=`
|
|
105
76
|
query CrewfoundryListDepartments {
|
|
106
|
-
crewfoundryBootstrap { departments { ${
|
|
77
|
+
crewfoundryBootstrap { departments { ${$} } }
|
|
107
78
|
}
|
|
108
|
-
`,
|
|
79
|
+
`,F=`
|
|
109
80
|
query CrewfoundryListInterviews {
|
|
110
|
-
crewfoundryBootstrap { interviews { ${
|
|
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} } }
|
|
81
|
+
crewfoundryBootstrap { interviews { ${x} } }
|
|
123
82
|
}
|
|
124
|
-
`,
|
|
125
|
-
query CrewfoundryListPayrollRecords {
|
|
126
|
-
crewfoundryBootstrap { payrollRecords { ${j} } }
|
|
127
|
-
}
|
|
128
|
-
`,rt=`
|
|
83
|
+
`,V=`
|
|
129
84
|
query CrewfoundryListProjects {
|
|
130
|
-
crewfoundryBootstrap { projects { ${
|
|
85
|
+
crewfoundryBootstrap { projects { ${B} } }
|
|
131
86
|
}
|
|
132
|
-
`,
|
|
87
|
+
`,G=`
|
|
133
88
|
query CrewfoundryListTeams {
|
|
134
|
-
crewfoundryBootstrap { teams { ${
|
|
89
|
+
crewfoundryBootstrap { teams { ${M} } }
|
|
135
90
|
}
|
|
136
|
-
`,
|
|
91
|
+
`,Y=`
|
|
137
92
|
query CrewfoundryListTimeEntries {
|
|
138
|
-
crewfoundryBootstrap { timeEntries { ${
|
|
93
|
+
crewfoundryBootstrap { timeEntries { ${U} } }
|
|
139
94
|
}
|
|
140
|
-
`,
|
|
95
|
+
`,H=`
|
|
141
96
|
query CrewfoundryListVendors {
|
|
142
|
-
crewfoundryBootstrap { vendors { ${
|
|
97
|
+
crewfoundryBootstrap { vendors { ${j} } }
|
|
143
98
|
}
|
|
144
|
-
`,
|
|
99
|
+
`,Q=`
|
|
145
100
|
mutation CrewfoundryCreateEmployee($input: CreateCrewEmployeeInput!) {
|
|
146
101
|
createCrewEmployee(input: $input) { ${S} }
|
|
147
102
|
}
|
|
148
|
-
`,
|
|
103
|
+
`,K=`
|
|
149
104
|
mutation CrewfoundryUpdateEmployee($id: ID!, $input: UpdateCrewEmployeeInput!) {
|
|
150
105
|
updateCrewEmployee(id: $id, input: $input) { ${S} }
|
|
151
106
|
}
|
|
152
|
-
`,
|
|
107
|
+
`,z=`
|
|
153
108
|
mutation CrewfoundryRemoveEmployee($id: ID!) {
|
|
154
109
|
removeCrewEmployee(id: $id)
|
|
155
110
|
}
|
|
156
|
-
`,
|
|
111
|
+
`,X=`
|
|
157
112
|
mutation CrewfoundryCreateCandidate($input: CreateCrewCandidateInput!) {
|
|
158
|
-
createCrewCandidate(input: $input) { ${
|
|
113
|
+
createCrewCandidate(input: $input) { ${N} }
|
|
159
114
|
}
|
|
160
|
-
`,
|
|
115
|
+
`,Z=`
|
|
161
116
|
mutation CrewfoundryUpdateCandidate($id: ID!, $input: UpdateCrewCandidateInput!) {
|
|
162
|
-
updateCrewCandidate(id: $id, input: $input) { ${
|
|
117
|
+
updateCrewCandidate(id: $id, input: $input) { ${N} }
|
|
163
118
|
}
|
|
164
|
-
`,
|
|
119
|
+
`,tt=`
|
|
165
120
|
mutation CrewfoundryCreateJobPosting($input: CreateCrewJobPostingInput!) {
|
|
166
|
-
createCrewJobPosting(input: $input) { ${
|
|
121
|
+
createCrewJobPosting(input: $input) { ${R} }
|
|
167
122
|
}
|
|
168
|
-
`,
|
|
123
|
+
`,et=`
|
|
169
124
|
mutation CrewfoundryUpdateJobPosting($id: ID!, $input: UpdateCrewJobPostingInput!) {
|
|
170
|
-
updateCrewJobPosting(id: $id, input: $input) { ${
|
|
125
|
+
updateCrewJobPosting(id: $id, input: $input) { ${R} }
|
|
171
126
|
}
|
|
172
|
-
`,
|
|
127
|
+
`,nt=`
|
|
173
128
|
mutation CrewfoundryCreateLeaveRequest($input: CreateCrewLeaveRequestInput!) {
|
|
174
|
-
createCrewLeaveRequest(input: $input) { ${
|
|
129
|
+
createCrewLeaveRequest(input: $input) { ${O} }
|
|
175
130
|
}
|
|
176
|
-
`,
|
|
131
|
+
`,rt=`
|
|
177
132
|
mutation CrewfoundryUpdateLeaveRequest($id: ID!, $input: UpdateCrewLeaveRequestInput!) {
|
|
178
|
-
updateCrewLeaveRequest(id: $id, input: $input) { ${
|
|
133
|
+
updateCrewLeaveRequest(id: $id, input: $input) { ${O} }
|
|
179
134
|
}
|
|
180
|
-
`,
|
|
135
|
+
`,ot=`
|
|
181
136
|
mutation CrewfoundryCreateAnnouncement($input: CreateCrewAnnouncementInput!) {
|
|
182
137
|
createCrewAnnouncement(input: $input) { ${v} }
|
|
183
138
|
}
|
|
184
|
-
`,
|
|
185
|
-
mutation CrewfoundryMarkNotificationRead($id: ID!) {
|
|
186
|
-
markCrewNotificationRead(id: $id)
|
|
187
|
-
}
|
|
188
|
-
`,Ct=`
|
|
189
|
-
mutation CrewfoundryMarkAllNotificationsRead {
|
|
190
|
-
markAllCrewNotificationsRead
|
|
191
|
-
}
|
|
192
|
-
`,Et=`
|
|
139
|
+
`,at=`
|
|
193
140
|
query CrewfoundryHealth {
|
|
194
141
|
_empty
|
|
195
142
|
}
|
|
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)),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);}}),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`);i(e,r);}catch(t){h$1(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});k(`Employee created: ${t.createCrewEmployee.firstName} ${t.createCrewEmployee.lastName}`),i(n,t.createCrewEmployee);}catch(e){h$1(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});k("Employee updated"),i(e,r.updateCrewEmployee);}catch(t){h$1(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`);k(`Employee ${n} removed`),i(e,{removed:t.removeCrewEmployee});}catch(t){h$1(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)),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);}}),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`);i(e,r);}catch(t){h$1(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});k(`Candidate created: ${t.createCrewCandidate.firstName} ${t.createCrewCandidate.lastName}`),i(n,t.createCrewCandidate);}catch(e){h$1(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});k("Candidate updated"),i(e,r.updateCrewCandidate);}catch(t){h$1(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)),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);}}),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`);i(e,r);}catch(t){h$1(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});k(`Job posting created: ${t.createCrewJobPosting.title}`),i(n,t.createCrewJobPosting);}catch(e){h$1(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});k("Job posting updated"),i(e,r.updateCrewJobPosting);}catch(t){h$1(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)),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);}}),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`);i(e,r);}catch(t){h$1(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});k(`Leave request created for ${t.createCrewLeaveRequest.employeeName}`),i(n,t.createCrewLeaveRequest);}catch(e){h$1(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});k("Leave request updated"),i(e,r.updateCrewLeaveRequest);}catch(t){h$1(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)),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);}}),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`);i(e,r);}catch(t){h$1(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});k(`Announcement created: ${t.createCrewAnnouncement.title}`),i(n,t.createCrewAnnouncement);}catch(e){h$1(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)),i(n,t,{headers:["ID","Title","Type","Category","Read"],rows:t.map(r$1=>[r(r$1.id,12),r$1.title,r$1.type,r$1.category,r$1.read?"yes":"no"])});}catch(e){h$1(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`);k(`Notification ${n} marked read`),i(e,{read:t.markCrewNotificationRead});}catch(t){h$1(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);k("All notifications marked read"),i(n,{read:e.markAllCrewNotificationsRead});}catch(e){h$1(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];i(r,k,{headers:l.headers,rows:k.map(l.row)});}catch(I){h$1(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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=>[r(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);i(n,e.crewfoundryBootstrap);}catch(e){h$1(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};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(Et))._empty??"ok";k(`crewfoundry: ${t}`),i(n,{health:t});}catch(e){h$1(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};
|
|
143
|
+
`;function y(m){let o$1=Number.parseInt(m,10);if(Number.isNaN(o$1))throw new o(`Expected an integer but got "${m}"`);return o$1}function f(m){let o$1=Number.parseFloat(m);if(Number.isNaN(o$1))throw new o(`Expected a number but got "${m}"`);return o$1}function g(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function st(m){let o$1=m.command("employees").description("Crewfoundry employees");o$1.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$1.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 o(`Employee ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o$1.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$1.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("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$1.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 o(`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$1=m.command("candidates").description("Crewfoundry recruiting candidates");o$1.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$1.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 o(`Candidate ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o$1.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$1.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 o("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$1=m.command("job-postings").description("Crewfoundry job postings");o$1.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$1.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 o(`Job posting ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o$1.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$1.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 o("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$1=m.command("leave-requests").description("Crewfoundry leave requests");o$1.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$1.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 o(`Leave request ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o$1.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$1.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("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$1=m.command("announcements").description("Crewfoundry announcements");o$1.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$1.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 o(`Announcement ${n} not found`);i(e,r);}catch(t){h$1(t);}}),o$1.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};
|