@burdenoff/cli-sdk 2026.626.1 → 2026.627.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/crewfoundry/index.cjs +196 -0
- package/dist/modules/crewfoundry/index.d.cts +7 -0
- package/dist/modules/crewfoundry/index.d.ts +7 -0
- package/dist/modules/crewfoundry/index.js +196 -0
- package/dist/modules/ggnomad/index.cjs +140 -0
- package/dist/modules/ggnomad/index.d.cts +7 -0
- package/dist/modules/ggnomad/index.d.ts +7 -0
- package/dist/modules/ggnomad/index.js +140 -0
- package/dist/modules/housingvista/index.cjs +137 -0
- package/dist/modules/housingvista/index.d.cts +7 -0
- package/dist/modules/housingvista/index.d.ts +7 -0
- package/dist/modules/housingvista/index.js +137 -0
- 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,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};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(r,t){super(r),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},f=class extends p{constructor(r,t){super(r,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},l=class extends Error{cause;constructor(r,t){super(r),this.name="CliInternalError",this.cause=t;}};var C=null;function x(o){C=o;}function y(){if(!C)throw new l("vibecontrols module helpers used before setHelpersContext was called");return C}function dt(){let o=y();if(!o.auth.isAuthenticated())throw new f(`Authentication required. Run \`${o.productName} auth login\`.`)}async function i(o,r){return dt(),y().gql.workspace.request(o,r)}function s(o){let r=o instanceof Error?o.message:String(o);throw new p(r)}function a(o,r,t){y().output.formatAndOutput(o,r,t);}function m(o){y().output.printSuccess(o);}function h(o){return y().output.formatDate(o)}function d(o,r){return y().output.truncate(o,r)}var I=`
|
|
2
|
+
query GgnomadGetProvider($id: ID!) {
|
|
3
|
+
ggnomadProvider(id: $id) {
|
|
4
|
+
id name type description status website contactEmail contactPhone
|
|
5
|
+
listingCount rating reviewCount totalRevenue createdAt updatedAt workspaceId
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`,b=`
|
|
9
|
+
query GgnomadListProviders($pagination: GgnomadPaginationInput) {
|
|
10
|
+
ggnomadProviders(pagination: $pagination) {
|
|
11
|
+
id name type status rating reviewCount listingCount totalRevenue createdAt
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,E=`
|
|
15
|
+
mutation GgnomadCreateProvider($input: CreateGgnomadProviderInput!) {
|
|
16
|
+
createGgnomadProvider(input: $input) {
|
|
17
|
+
id name type description status website contactEmail contactPhone
|
|
18
|
+
listingCount rating reviewCount totalRevenue createdAt workspaceId
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`,A=`
|
|
22
|
+
query GgnomadGetProperty($id: ID!) {
|
|
23
|
+
ggnomadProperty(id: $id) {
|
|
24
|
+
id name type description status address amenities bathrooms bedrooms
|
|
25
|
+
checkInTime checkOutTime currency images maxGuests pricePerNight
|
|
26
|
+
providerId rating reviewCount createdAt updatedAt workspaceId
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`,O=`
|
|
30
|
+
query GgnomadListProperties($pagination: GgnomadPaginationInput) {
|
|
31
|
+
ggnomadProperties(pagination: $pagination) {
|
|
32
|
+
id name type status currency pricePerNight maxGuests bedrooms bathrooms
|
|
33
|
+
rating reviewCount providerId createdAt
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`,P=`
|
|
37
|
+
mutation GgnomadCreateProperty($input: CreateGgnomadPropertyInput!) {
|
|
38
|
+
createGgnomadProperty(input: $input) {
|
|
39
|
+
id name type description status address amenities bathrooms bedrooms
|
|
40
|
+
checkInTime checkOutTime currency images maxGuests pricePerNight
|
|
41
|
+
providerId rating reviewCount createdAt workspaceId
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`,S=`
|
|
45
|
+
query GgnomadGetActivity($id: ID!) {
|
|
46
|
+
ggnomadActivity(id: $id) {
|
|
47
|
+
id name category description difficulty duration currency price
|
|
48
|
+
images includes location maxParticipants requirements safetyInfo
|
|
49
|
+
providerId rating reviewCount status createdAt updatedAt workspaceId
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`,R=`
|
|
53
|
+
query GgnomadListActivities($pagination: GgnomadPaginationInput) {
|
|
54
|
+
ggnomadActivities(pagination: $pagination) {
|
|
55
|
+
id name category difficulty duration currency price maxParticipants
|
|
56
|
+
rating reviewCount status providerId createdAt
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,G=`
|
|
60
|
+
query GgnomadGetEvent($id: ID!) {
|
|
61
|
+
ggnomadEvent(id: $id) {
|
|
62
|
+
id name category description currency price images performers venue
|
|
63
|
+
startsAt endsAt providerId rating reviewCount status createdAt
|
|
64
|
+
updatedAt workspaceId
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`,$=`
|
|
68
|
+
query GgnomadListEvents($pagination: GgnomadPaginationInput) {
|
|
69
|
+
ggnomadEvents(pagination: $pagination) {
|
|
70
|
+
id name category currency price startsAt endsAt rating reviewCount
|
|
71
|
+
status providerId createdAt
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`,D=`
|
|
75
|
+
query GgnomadGetTour($id: ID!) {
|
|
76
|
+
ggnomadTour(id: $id) {
|
|
77
|
+
id name type description difficulty duration currency price images
|
|
78
|
+
highlights languages location guideName maxGroupSize providerId
|
|
79
|
+
rating reviewCount status createdAt updatedAt workspaceId
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`,N=`
|
|
83
|
+
query GgnomadListTours($pagination: GgnomadPaginationInput) {
|
|
84
|
+
ggnomadTours(pagination: $pagination) {
|
|
85
|
+
id name type difficulty duration currency price maxGroupSize rating
|
|
86
|
+
reviewCount status providerId createdAt
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`,q=`
|
|
90
|
+
query GgnomadListTrips($pagination: GgnomadPaginationInput) {
|
|
91
|
+
ggnomadTrips(pagination: $pagination) {
|
|
92
|
+
id name transportMode class carrier currency price passengers
|
|
93
|
+
origin destination departureAt arrivalAt isRoundTrip ecoFriendly
|
|
94
|
+
returnDepartureAt returnArrivalAt status createdAt updatedAt workspaceId
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`,L=`
|
|
98
|
+
query GgnomadListBookings($pagination: GgnomadPaginationInput) {
|
|
99
|
+
ggnomadBookings(pagination: $pagination) {
|
|
100
|
+
id referenceCode bookingType itemId itemName guestName guests
|
|
101
|
+
totalPrice currency status paymentStatus checkIn checkOut eventDate
|
|
102
|
+
createdAt
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`,_=`
|
|
106
|
+
mutation GgnomadCreateBooking($input: CreateGgnomadBookingInput!) {
|
|
107
|
+
createGgnomadBooking(input: $input) {
|
|
108
|
+
id referenceCode bookingType itemId itemName guestName guestEmail
|
|
109
|
+
guestPhone guests totalPrice currency status paymentStatus paymentMethod
|
|
110
|
+
checkIn checkOut eventDate specialRequests createdAt workspaceId
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`,F=`
|
|
114
|
+
mutation GgnomadCancelBooking($id: ID!, $reason: String) {
|
|
115
|
+
cancelGgnomadBooking(id: $id, reason: $reason) {
|
|
116
|
+
id referenceCode bookingType status paymentStatus totalPrice updatedAt
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`,W=`
|
|
120
|
+
query GgnomadListFavorites($pagination: GgnomadFavoritesPaginationInput) {
|
|
121
|
+
ggnomadFavorites(pagination: $pagination)
|
|
122
|
+
}
|
|
123
|
+
`,B=`
|
|
124
|
+
mutation GgnomadToggleFavorite($input: ToggleGgnomadFavoriteInput!) {
|
|
125
|
+
toggleGgnomadFavorite(input: $input)
|
|
126
|
+
}
|
|
127
|
+
`,V=`
|
|
128
|
+
query GgnomadAnalytics {
|
|
129
|
+
ggnomadAnalytics {
|
|
130
|
+
totalUsers totalBookings totalRevenue conversionRate
|
|
131
|
+
revenueByCategory topDestinations monthlyTrends
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`,M=`
|
|
135
|
+
query GgnomadOverviewStats {
|
|
136
|
+
ggnomadOverviewStats {
|
|
137
|
+
users listings bookings monthlyRevenue
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`;function U(o,r){try{return JSON.parse(r)}catch{throw new p(`--${o} must be valid JSON`)}}function c(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new p(`Expected an integer but got "${o}"`);return r}function k(o){let r=Number.parseFloat(o);if(Number.isNaN(r))throw new p(`Expected a number but got "${o}"`);return r}function j(o){let r=o.command("providers").description("GGNomad providers");r.command("list").description("List providers").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(b,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadProviders,{headers:["ID","Name","Type","Status","Rating","Listings"],rows:n.ggnomadProviders.map(e=>[d(e.id,12),e.name,e.type,e.status,`${e.rating??0} (${e.reviewCount??0})`,String(e.listingCount??0)])});}catch(n){s(n);}}),r.command("get").description("Get a provider by id").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(I,{id:t});if(!e.ggnomadProvider)throw new p(`Provider ${t} not found`);a(n,e.ggnomadProvider);}catch(e){s(e);}}),r.command("create").description("Create a provider").requiredOption("--name <name>","Provider name").requiredOption("--type <t>","Provider type").option("--description <s>","Description").option("--website <url>","Website URL").option("--contact-email <email>","Contact email").option("--contact-phone <phone>","Contact phone").option("-f, --format <format>","Output format").action(async t=>{try{let n={name:t.name,type:t.type};t.description&&(n.description=t.description),t.website&&(n.website=t.website),t.contactEmail&&(n.contactEmail=t.contactEmail),t.contactPhone&&(n.contactPhone=t.contactPhone);let e=await i(E,{input:n});m(`Provider created: ${e.createGgnomadProvider.name}`),a(t,e.createGgnomadProvider);}catch(n){s(n);}});}function z(o){let r=o.command("properties").description("GGNomad stay properties");r.command("list").description("List properties").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(O,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadProperties,{headers:["ID","Name","Type","Status","Price/Night","Guests","Rating"],rows:n.ggnomadProperties.map(e=>[d(e.id,12),e.name,e.type,e.status,`${e.pricePerNight??0} ${e.currency??""}`.trim(),String(e.maxGuests??0),`${e.rating??0} (${e.reviewCount??0})`])});}catch(n){s(n);}}),r.command("get").description("Get a property by id").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(A,{id:t});if(!e.ggnomadProperty)throw new p(`Property ${t} not found`);a(n,e.ggnomadProperty);}catch(e){s(e);}}),r.command("create").description("Create a property").requiredOption("--name <name>","Property name").requiredOption("--type <t>","Property type").requiredOption("--address <json>","Address JSON").requiredOption("--max-guests <n>","Maximum guests",c).requiredOption("--price-per-night <n>","Price per night",k).requiredOption("--amenities <csv>","Comma-separated amenities").requiredOption("--images <csv>","Comma-separated image URLs").option("--provider <id>","Provider ID").option("--description <s>","Description").option("--bedrooms <n>","Bedrooms",c).option("--bathrooms <n>","Bathrooms",c).option("--check-in-time <s>","Check-in time").option("--check-out-time <s>","Check-out time").option("--currency <c>","Currency code").option("-f, --format <format>","Output format").action(async t=>{try{let n={name:t.name,type:t.type,address:U("address",t.address),maxGuests:t.maxGuests,pricePerNight:t.pricePerNight,amenities:t.amenities.split(",").map(w=>w.trim()),images:t.images.split(",").map(w=>w.trim())};t.provider&&(n.providerId=t.provider),t.description&&(n.description=t.description),t.bedrooms!==void 0&&(n.bedrooms=t.bedrooms),t.bathrooms!==void 0&&(n.bathrooms=t.bathrooms),t.checkInTime&&(n.checkInTime=t.checkInTime),t.checkOutTime&&(n.checkOutTime=t.checkOutTime),t.currency&&(n.currency=t.currency);let e=await i(P,{input:n});m(`Property created: ${e.createGgnomadProperty.name}`),a(t,e.createGgnomadProperty);}catch(n){s(n);}});}function Y(o){let r=o.command("activities").description("GGNomad activities");r.command("list").description("List activities").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(R,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadActivities,{headers:["ID","Name","Category","Difficulty","Duration","Price","Status"],rows:n.ggnomadActivities.map(e=>[d(e.id,12),e.name,e.category,e.difficulty??"-",e.duration??"-",`${e.price??0} ${e.currency??""}`.trim(),e.status])});}catch(n){s(n);}}),r.command("get").description("Get an activity by id").argument("<id>","Activity ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(S,{id:t});if(!e.ggnomadActivity)throw new p(`Activity ${t} not found`);a(n,e.ggnomadActivity);}catch(e){s(e);}});}function H(o){let r=o.command("events").description("GGNomad events");r.command("list").description("List events").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i($,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadEvents,{headers:["ID","Name","Category","Price","Starts","Status"],rows:n.ggnomadEvents.map(e=>[d(e.id,12),e.name,e.category,`${e.price??0} ${e.currency??""}`.trim(),h(e.startsAt),e.status])});}catch(n){s(n);}}),r.command("get").description("Get an event by id").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(G,{id:t});if(!e.ggnomadEvent)throw new p(`Event ${t} not found`);a(n,e.ggnomadEvent);}catch(e){s(e);}});}function K(o){let r=o.command("tours").description("GGNomad tours");r.command("list").description("List tours").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(N,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadTours,{headers:["ID","Name","Type","Difficulty","Duration","Price","Status"],rows:n.ggnomadTours.map(e=>[d(e.id,12),e.name,e.type,e.difficulty??"-",e.duration??"-",`${e.price??0} ${e.currency??""}`.trim(),e.status])});}catch(n){s(n);}}),r.command("get").description("Get a tour by id").argument("<id>","Tour ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(D,{id:t});if(!e.ggnomadTour)throw new p(`Tour ${t} not found`);a(n,e.ggnomadTour);}catch(e){s(e);}});}function J(o){o.command("trips").description("GGNomad transport trips").command("list").description("List trips").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(q,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadTrips,{headers:["ID","Name","Mode","Price","Departs","Eco","Status"],rows:n.ggnomadTrips.map(e=>[d(e.id,12),e.name,e.transportMode,`${e.price??0} ${e.currency??""}`.trim(),h(e.departureAt),e.ecoFriendly?"yes":"no",e.status])});}catch(n){s(n);}});}function Q(o){let r=o.command("bookings").description("GGNomad bookings");r.command("list").description("List bookings").option("--limit <n>","Page size",c,20).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(L,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadBookings,{headers:["ID","Ref","Type","Item","Guest","Total","Status","Payment"],rows:n.ggnomadBookings.map(e=>[d(e.id,12),e.referenceCode,e.bookingType,d(e.itemName,20),d(e.guestName,16),`${e.totalPrice} ${e.currency??""}`.trim(),e.status,e.paymentStatus])});}catch(n){s(n);}}),r.command("create").description("Create a booking").requiredOption("--type <t>","Booking type: ACTIVITY|EVENT|PROPERTY|TOUR|TRIP").requiredOption("--item-id <id>","Item ID being booked").requiredOption("--item-name <name>","Item name").requiredOption("--guest-name <name>","Guest name").requiredOption("--guests <n>","Number of guests",c).requiredOption("--total-price <n>","Total price",k).option("--guest-email <email>","Guest email").option("--guest-phone <phone>","Guest phone").option("--currency <c>","Currency code").option("--check-in <iso>","Check-in (ISO date)").option("--check-out <iso>","Check-out (ISO date)").option("--event-date <iso>","Event date (ISO date)").option("--payment-method <m>","Payment method").option("--special-requests <s>","Special requests").option("-f, --format <format>","Output format").action(async t=>{try{let n={bookingType:t.type.toUpperCase(),itemId:t.itemId,itemName:t.itemName,guestName:t.guestName,guests:t.guests,totalPrice:t.totalPrice};t.guestEmail&&(n.guestEmail=t.guestEmail),t.guestPhone&&(n.guestPhone=t.guestPhone),t.currency&&(n.currency=t.currency),t.checkIn&&(n.checkIn=t.checkIn),t.checkOut&&(n.checkOut=t.checkOut),t.eventDate&&(n.eventDate=t.eventDate),t.paymentMethod&&(n.paymentMethod=t.paymentMethod),t.specialRequests&&(n.specialRequests=t.specialRequests);let e=await i(_,{input:n});m(`Booking created: ${e.createGgnomadBooking.referenceCode}`),a(t,e.createGgnomadBooking);}catch(n){s(n);}}),r.command("cancel").description("Cancel a booking").argument("<id>","Booking ID").option("--reason <s>","Cancellation reason").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let e=await i(F,{id:t,reason:n.reason});m(`Booking cancelled: ${e.cancelGgnomadBooking.referenceCode}`),a(n,e.cancelGgnomadBooking);}catch(e){s(e);}});}function X(o){let r=o.command("favorites").description("GGNomad favorites");r.command("list").description("List favorites").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(W,{pagination:{first:t.limit,skip:t.offset}});a(t,n.ggnomadFavorites);}catch(n){s(n);}}),r.command("toggle").description("Toggle a favorite on a target").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","Target type: ACTIVITY|EVENT|PROPERTY|TOUR|TRIP").option("-f, --format <format>","Output format").action(async t=>{try{let n={targetId:t.targetId,targetType:t.targetType.toUpperCase()},e=await i(B,{input:n});m(e.toggleGgnomadFavorite?"Added to favorites":"Removed from favorites"),a(t,{favorited:e.toggleGgnomadFavorite});}catch(n){s(n);}});}function Z(o){let r=o.command("analytics").description("GGNomad analytics & overview");r.command("summary").description("Platform analytics (users, bookings, revenue, conversion, trends)").option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(V);a(t,n.ggnomadAnalytics);}catch(n){s(n);}}),r.command("overview").description("Overview stats (users, listings, bookings, monthly revenue)").option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(M);a(t,n.ggnomadOverviewStats);}catch(n){s(n);}});}var mt={id:"ggnomad",version:"1.0.0",displayName:"GGNomad",dependsOn:["auth","workspaces"],register(o,r){x(r);let t=o.command("ggnomad").description("GGNomad travel & experiences marketplace");j(t),z(t),Y(t),H(t),K(t),J(t),Q(t),X(t),Z(t);}},sn=mt;module.exports=sn;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {a,b as b$1,h as h$1,p,g,i,o as o$1}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var T=`
|
|
2
|
+
query GgnomadGetProvider($id: ID!) {
|
|
3
|
+
ggnomadProvider(id: $id) {
|
|
4
|
+
id name type description status website contactEmail contactPhone
|
|
5
|
+
listingCount rating reviewCount totalRevenue createdAt updatedAt workspaceId
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`,C=`
|
|
9
|
+
query GgnomadListProviders($pagination: GgnomadPaginationInput) {
|
|
10
|
+
ggnomadProviders(pagination: $pagination) {
|
|
11
|
+
id name type status rating reviewCount listingCount totalRevenue createdAt
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,P=`
|
|
15
|
+
mutation GgnomadCreateProvider($input: CreateGgnomadProviderInput!) {
|
|
16
|
+
createGgnomadProvider(input: $input) {
|
|
17
|
+
id name type description status website contactEmail contactPhone
|
|
18
|
+
listingCount rating reviewCount totalRevenue createdAt workspaceId
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`,h=`
|
|
22
|
+
query GgnomadGetProperty($id: ID!) {
|
|
23
|
+
ggnomadProperty(id: $id) {
|
|
24
|
+
id name type description status address amenities bathrooms bedrooms
|
|
25
|
+
checkInTime checkOutTime currency images maxGuests pricePerNight
|
|
26
|
+
providerId rating reviewCount createdAt updatedAt workspaceId
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`,k=`
|
|
30
|
+
query GgnomadListProperties($pagination: GgnomadPaginationInput) {
|
|
31
|
+
ggnomadProperties(pagination: $pagination) {
|
|
32
|
+
id name type status currency pricePerNight maxGuests bedrooms bathrooms
|
|
33
|
+
rating reviewCount providerId createdAt
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`,w=`
|
|
37
|
+
mutation GgnomadCreateProperty($input: CreateGgnomadPropertyInput!) {
|
|
38
|
+
createGgnomadProperty(input: $input) {
|
|
39
|
+
id name type description status address amenities bathrooms bedrooms
|
|
40
|
+
checkInTime checkOutTime currency images maxGuests pricePerNight
|
|
41
|
+
providerId rating reviewCount createdAt workspaceId
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`,O=`
|
|
45
|
+
query GgnomadGetActivity($id: ID!) {
|
|
46
|
+
ggnomadActivity(id: $id) {
|
|
47
|
+
id name category description difficulty duration currency price
|
|
48
|
+
images includes location maxParticipants requirements safetyInfo
|
|
49
|
+
providerId rating reviewCount status createdAt updatedAt workspaceId
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`,G=`
|
|
53
|
+
query GgnomadListActivities($pagination: GgnomadPaginationInput) {
|
|
54
|
+
ggnomadActivities(pagination: $pagination) {
|
|
55
|
+
id name category difficulty duration currency price maxParticipants
|
|
56
|
+
rating reviewCount status providerId createdAt
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,E=`
|
|
60
|
+
query GgnomadGetEvent($id: ID!) {
|
|
61
|
+
ggnomadEvent(id: $id) {
|
|
62
|
+
id name category description currency price images performers venue
|
|
63
|
+
startsAt endsAt providerId rating reviewCount status createdAt
|
|
64
|
+
updatedAt workspaceId
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`,A=`
|
|
68
|
+
query GgnomadListEvents($pagination: GgnomadPaginationInput) {
|
|
69
|
+
ggnomadEvents(pagination: $pagination) {
|
|
70
|
+
id name category currency price startsAt endsAt rating reviewCount
|
|
71
|
+
status providerId createdAt
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`,R=`
|
|
75
|
+
query GgnomadGetTour($id: ID!) {
|
|
76
|
+
ggnomadTour(id: $id) {
|
|
77
|
+
id name type description difficulty duration currency price images
|
|
78
|
+
highlights languages location guideName maxGroupSize providerId
|
|
79
|
+
rating reviewCount status createdAt updatedAt workspaceId
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`,b=`
|
|
83
|
+
query GgnomadListTours($pagination: GgnomadPaginationInput) {
|
|
84
|
+
ggnomadTours(pagination: $pagination) {
|
|
85
|
+
id name type difficulty duration currency price maxGroupSize rating
|
|
86
|
+
reviewCount status providerId createdAt
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`,S=`
|
|
90
|
+
query GgnomadListTrips($pagination: GgnomadPaginationInput) {
|
|
91
|
+
ggnomadTrips(pagination: $pagination) {
|
|
92
|
+
id name transportMode class carrier currency price passengers
|
|
93
|
+
origin destination departureAt arrivalAt isRoundTrip ecoFriendly
|
|
94
|
+
returnDepartureAt returnArrivalAt status createdAt updatedAt workspaceId
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`,N=`
|
|
98
|
+
query GgnomadListBookings($pagination: GgnomadPaginationInput) {
|
|
99
|
+
ggnomadBookings(pagination: $pagination) {
|
|
100
|
+
id referenceCode bookingType itemId itemName guestName guests
|
|
101
|
+
totalPrice currency status paymentStatus checkIn checkOut eventDate
|
|
102
|
+
createdAt
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`,x=`
|
|
106
|
+
mutation GgnomadCreateBooking($input: CreateGgnomadBookingInput!) {
|
|
107
|
+
createGgnomadBooking(input: $input) {
|
|
108
|
+
id referenceCode bookingType itemId itemName guestName guestEmail
|
|
109
|
+
guestPhone guests totalPrice currency status paymentStatus paymentMethod
|
|
110
|
+
checkIn checkOut eventDate specialRequests createdAt workspaceId
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`,$=`
|
|
114
|
+
mutation GgnomadCancelBooking($id: ID!, $reason: String) {
|
|
115
|
+
cancelGgnomadBooking(id: $id, reason: $reason) {
|
|
116
|
+
id referenceCode bookingType status paymentStatus totalPrice updatedAt
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`,D=`
|
|
120
|
+
query GgnomadListFavorites($pagination: GgnomadFavoritesPaginationInput) {
|
|
121
|
+
ggnomadFavorites(pagination: $pagination)
|
|
122
|
+
}
|
|
123
|
+
`,L=`
|
|
124
|
+
mutation GgnomadToggleFavorite($input: ToggleGgnomadFavoriteInput!) {
|
|
125
|
+
toggleGgnomadFavorite(input: $input)
|
|
126
|
+
}
|
|
127
|
+
`,q=`
|
|
128
|
+
query GgnomadAnalytics {
|
|
129
|
+
ggnomadAnalytics {
|
|
130
|
+
totalUsers totalBookings totalRevenue conversionRate
|
|
131
|
+
revenueByCategory topDestinations monthlyTrends
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`,_=`
|
|
135
|
+
query GgnomadOverviewStats {
|
|
136
|
+
ggnomadOverviewStats {
|
|
137
|
+
users listings bookings monthlyRevenue
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`;function B(m,o$1){try{return JSON.parse(o$1)}catch{throw new o(`--${m} must be valid JSON`)}}function s(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 l(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 V(m){let o$1=m.command("providers").description("GGNomad providers");o$1.command("list").description("List providers").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(C,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadProviders,{headers:["ID","Name","Type","Status","Rating","Listings"],rows:r.ggnomadProviders.map(e=>[p(e.id,12),e.name,e.type,e.status,`${e.rating??0} (${e.reviewCount??0})`,String(e.listingCount??0)])});}catch(r){g(r);}}),o$1.command("get").description("Get a provider by id").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1(T,{id:t});if(!e.ggnomadProvider)throw new o(`Provider ${t} not found`);h$1(r,e.ggnomadProvider);}catch(e){g(e);}}),o$1.command("create").description("Create a provider").requiredOption("--name <name>","Provider name").requiredOption("--type <t>","Provider type").option("--description <s>","Description").option("--website <url>","Website URL").option("--contact-email <email>","Contact email").option("--contact-phone <phone>","Contact phone").option("-f, --format <format>","Output format").action(async t=>{try{let r={name:t.name,type:t.type};t.description&&(r.description=t.description),t.website&&(r.website=t.website),t.contactEmail&&(r.contactEmail=t.contactEmail),t.contactPhone&&(r.contactPhone=t.contactPhone);let e=await b$1(P,{input:r});i(`Provider created: ${e.createGgnomadProvider.name}`),h$1(t,e.createGgnomadProvider);}catch(r){g(r);}});}function F(m){let o$1=m.command("properties").description("GGNomad stay properties");o$1.command("list").description("List properties").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(k,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadProperties,{headers:["ID","Name","Type","Status","Price/Night","Guests","Rating"],rows:r.ggnomadProperties.map(e=>[p(e.id,12),e.name,e.type,e.status,`${e.pricePerNight??0} ${e.currency??""}`.trim(),String(e.maxGuests??0),`${e.rating??0} (${e.reviewCount??0})`])});}catch(r){g(r);}}),o$1.command("get").description("Get a property by id").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1(h,{id:t});if(!e.ggnomadProperty)throw new o(`Property ${t} not found`);h$1(r,e.ggnomadProperty);}catch(e){g(e);}}),o$1.command("create").description("Create a property").requiredOption("--name <name>","Property name").requiredOption("--type <t>","Property type").requiredOption("--address <json>","Address JSON").requiredOption("--max-guests <n>","Maximum guests",s).requiredOption("--price-per-night <n>","Price per night",l).requiredOption("--amenities <csv>","Comma-separated amenities").requiredOption("--images <csv>","Comma-separated image URLs").option("--provider <id>","Provider ID").option("--description <s>","Description").option("--bedrooms <n>","Bedrooms",s).option("--bathrooms <n>","Bathrooms",s).option("--check-in-time <s>","Check-in time").option("--check-out-time <s>","Check-out time").option("--currency <c>","Currency code").option("-f, --format <format>","Output format").action(async t=>{try{let r={name:t.name,type:t.type,address:B("address",t.address),maxGuests:t.maxGuests,pricePerNight:t.pricePerNight,amenities:t.amenities.split(",").map(v=>v.trim()),images:t.images.split(",").map(v=>v.trim())};t.provider&&(r.providerId=t.provider),t.description&&(r.description=t.description),t.bedrooms!==void 0&&(r.bedrooms=t.bedrooms),t.bathrooms!==void 0&&(r.bathrooms=t.bathrooms),t.checkInTime&&(r.checkInTime=t.checkInTime),t.checkOutTime&&(r.checkOutTime=t.checkOutTime),t.currency&&(r.currency=t.currency);let e=await b$1(w,{input:r});i(`Property created: ${e.createGgnomadProperty.name}`),h$1(t,e.createGgnomadProperty);}catch(r){g(r);}});}function U(m){let o$1=m.command("activities").description("GGNomad activities");o$1.command("list").description("List activities").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(G,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadActivities,{headers:["ID","Name","Category","Difficulty","Duration","Price","Status"],rows:r.ggnomadActivities.map(e=>[p(e.id,12),e.name,e.category,e.difficulty??"-",e.duration??"-",`${e.price??0} ${e.currency??""}`.trim(),e.status])});}catch(r){g(r);}}),o$1.command("get").description("Get an activity by id").argument("<id>","Activity ID").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1(O,{id:t});if(!e.ggnomadActivity)throw new o(`Activity ${t} not found`);h$1(r,e.ggnomadActivity);}catch(e){g(e);}});}function W(m){let o$2=m.command("events").description("GGNomad events");o$2.command("list").description("List events").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(A,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadEvents,{headers:["ID","Name","Category","Price","Starts","Status"],rows:r.ggnomadEvents.map(e=>[p(e.id,12),e.name,e.category,`${e.price??0} ${e.currency??""}`.trim(),o$1(e.startsAt),e.status])});}catch(r){g(r);}}),o$2.command("get").description("Get an event by id").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1(E,{id:t});if(!e.ggnomadEvent)throw new o(`Event ${t} not found`);h$1(r,e.ggnomadEvent);}catch(e){g(e);}});}function M(m){let o$1=m.command("tours").description("GGNomad tours");o$1.command("list").description("List tours").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(b,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadTours,{headers:["ID","Name","Type","Difficulty","Duration","Price","Status"],rows:r.ggnomadTours.map(e=>[p(e.id,12),e.name,e.type,e.difficulty??"-",e.duration??"-",`${e.price??0} ${e.currency??""}`.trim(),e.status])});}catch(r){g(r);}}),o$1.command("get").description("Get a tour by id").argument("<id>","Tour ID").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1(R,{id:t});if(!e.ggnomadTour)throw new o(`Tour ${t} not found`);h$1(r,e.ggnomadTour);}catch(e){g(e);}});}function Y(m){m.command("trips").description("GGNomad transport trips").command("list").description("List trips").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(S,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadTrips,{headers:["ID","Name","Mode","Price","Departs","Eco","Status"],rows:r.ggnomadTrips.map(e=>[p(e.id,12),e.name,e.transportMode,`${e.price??0} ${e.currency??""}`.trim(),o$1(e.departureAt),e.ecoFriendly?"yes":"no",e.status])});}catch(r){g(r);}});}function z(m){let o=m.command("bookings").description("GGNomad bookings");o.command("list").description("List bookings").option("--limit <n>","Page size",s,20).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(N,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadBookings,{headers:["ID","Ref","Type","Item","Guest","Total","Status","Payment"],rows:r.ggnomadBookings.map(e=>[p(e.id,12),e.referenceCode,e.bookingType,p(e.itemName,20),p(e.guestName,16),`${e.totalPrice} ${e.currency??""}`.trim(),e.status,e.paymentStatus])});}catch(r){g(r);}}),o.command("create").description("Create a booking").requiredOption("--type <t>","Booking type: ACTIVITY|EVENT|PROPERTY|TOUR|TRIP").requiredOption("--item-id <id>","Item ID being booked").requiredOption("--item-name <name>","Item name").requiredOption("--guest-name <name>","Guest name").requiredOption("--guests <n>","Number of guests",s).requiredOption("--total-price <n>","Total price",l).option("--guest-email <email>","Guest email").option("--guest-phone <phone>","Guest phone").option("--currency <c>","Currency code").option("--check-in <iso>","Check-in (ISO date)").option("--check-out <iso>","Check-out (ISO date)").option("--event-date <iso>","Event date (ISO date)").option("--payment-method <m>","Payment method").option("--special-requests <s>","Special requests").option("-f, --format <format>","Output format").action(async t=>{try{let r={bookingType:t.type.toUpperCase(),itemId:t.itemId,itemName:t.itemName,guestName:t.guestName,guests:t.guests,totalPrice:t.totalPrice};t.guestEmail&&(r.guestEmail=t.guestEmail),t.guestPhone&&(r.guestPhone=t.guestPhone),t.currency&&(r.currency=t.currency),t.checkIn&&(r.checkIn=t.checkIn),t.checkOut&&(r.checkOut=t.checkOut),t.eventDate&&(r.eventDate=t.eventDate),t.paymentMethod&&(r.paymentMethod=t.paymentMethod),t.specialRequests&&(r.specialRequests=t.specialRequests);let e=await b$1(x,{input:r});i(`Booking created: ${e.createGgnomadBooking.referenceCode}`),h$1(t,e.createGgnomadBooking);}catch(r){g(r);}}),o.command("cancel").description("Cancel a booking").argument("<id>","Booking ID").option("--reason <s>","Cancellation reason").option("-f, --format <format>","Output format").action(async(t,r)=>{try{let e=await b$1($,{id:t,reason:r.reason});i(`Booking cancelled: ${e.cancelGgnomadBooking.referenceCode}`),h$1(r,e.cancelGgnomadBooking);}catch(e){g(e);}});}function K(m){let o=m.command("favorites").description("GGNomad favorites");o.command("list").description("List favorites").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(D,{pagination:{first:t.limit,skip:t.offset}});h$1(t,r.ggnomadFavorites);}catch(r){g(r);}}),o.command("toggle").description("Toggle a favorite on a target").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","Target type: ACTIVITY|EVENT|PROPERTY|TOUR|TRIP").option("-f, --format <format>","Output format").action(async t=>{try{let r={targetId:t.targetId,targetType:t.targetType.toUpperCase()},e=await b$1(L,{input:r});i(e.toggleGgnomadFavorite?"Added to favorites":"Removed from favorites"),h$1(t,{favorited:e.toggleGgnomadFavorite});}catch(r){g(r);}});}function J(m){let o=m.command("analytics").description("GGNomad analytics & overview");o.command("summary").description("Platform analytics (users, bookings, revenue, conversion, trends)").option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(q);h$1(t,r.ggnomadAnalytics);}catch(r){g(r);}}),o.command("overview").description("Overview stats (users, listings, bookings, monthly revenue)").option("-f, --format <format>","Output format").action(async t=>{try{let r=await b$1(_);h$1(t,r.ggnomadOverviewStats);}catch(r){g(r);}});}var j={id:"ggnomad",version:"1.0.0",displayName:"GGNomad",dependsOn:["auth","workspaces"],register(m,o){a(o);let t=m.command("ggnomad").description("GGNomad travel & experiences marketplace");V(t),F(t),U(t),W(t),M(t),Y(t),z(t),K(t),J(t);}},Bt=j;export{Bt as default};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var g=class extends Error{exitCode;hint;constructor(o,e){super(o),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},y=class extends g{constructor(o,e){super(o,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(o,e){super(o),this.name="CliInternalError",this.cause=e;}};var C=null;function b(r){C=r;}function h(){if(!C)throw new f("vibecontrols module helpers used before setHelpersContext was called");return C}function gt(){let r=h();if(!r.auth.isAuthenticated())throw new y(`Authentication required. Run \`${r.productName} auth login\`.`)}async function s(r,o){return gt(),h().gql.workspace.request(r,o)}function a(r){let o=r instanceof Error?r.message:String(r);throw new g(o)}function c(r,o,e){h().output.formatAndOutput(r,o,e);}function v(r){h().output.printSuccess(r);}function u(r,o){return h().output.truncate(r,o)}var k=`
|
|
2
|
+
id title description type category status price city state
|
|
3
|
+
bedrooms bathrooms totalArea imageUrl context createdAt updatedAt workspaceId
|
|
4
|
+
`,A=`
|
|
5
|
+
query HousingvistaProperties(
|
|
6
|
+
$filter: HousingVistaPropertyFilterInput
|
|
7
|
+
$pagination: HousingVistaPaginationInput
|
|
8
|
+
) {
|
|
9
|
+
housingvistaProperties(filter: $filter, pagination: $pagination) {
|
|
10
|
+
id title type category status price city state bedrooms bathrooms
|
|
11
|
+
totalArea imageUrl createdAt
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,S=`
|
|
15
|
+
query HousingvistaProperty($id: ID!) {
|
|
16
|
+
housingvistaProperty(id: $id) {
|
|
17
|
+
${k}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,E=`
|
|
21
|
+
mutation CreateHousingvistaProperty($input: CreatePropertyInput!) {
|
|
22
|
+
createHousingvistaProperty(input: $input) {
|
|
23
|
+
${k}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`,P=`
|
|
27
|
+
mutation UpdateHousingvistaProperty($id: ID!, $input: UpdatePropertyInput!) {
|
|
28
|
+
updateHousingvistaProperty(id: $id, input: $input) {
|
|
29
|
+
${k}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`,R=`
|
|
33
|
+
mutation DeleteHousingvistaProperty($id: ID!) {
|
|
34
|
+
deleteHousingvistaProperty(id: $id)
|
|
35
|
+
}
|
|
36
|
+
`,O=`
|
|
37
|
+
query HousingvistaTransactions($pagination: HousingVistaPaginationInput) {
|
|
38
|
+
housingvistaTransactions(pagination: $pagination) {
|
|
39
|
+
id title type status amount currency propertyId createdAt updatedAt
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`,L=`
|
|
43
|
+
query HousingvistaTransaction($id: ID!) {
|
|
44
|
+
housingvistaTransaction(id: $id) {
|
|
45
|
+
id title type status amount currency propertyId
|
|
46
|
+
documents escrow milestones parties createdAt updatedAt workspaceId
|
|
47
|
+
property { id title city state status price }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`,D=`
|
|
51
|
+
query HousingvistaInvestments($pagination: HousingVistaPaginationInput) {
|
|
52
|
+
housingvistaInvestments(pagination: $pagination) {
|
|
53
|
+
id title investmentType riskLevel status totalValue propertyId
|
|
54
|
+
createdAt updatedAt
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`,_=`
|
|
58
|
+
query HousingvistaInvestment($id: ID!) {
|
|
59
|
+
housingvistaInvestment(id: $id) {
|
|
60
|
+
id title investmentType riskLevel status totalValue propertyId
|
|
61
|
+
investors returns createdAt updatedAt workspaceId
|
|
62
|
+
property { id title city state status price }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`,$=`
|
|
66
|
+
query HousingvistaRentalUnits($pagination: HousingVistaPaginationInput) {
|
|
67
|
+
housingvistaRentalUnits(pagination: $pagination) {
|
|
68
|
+
id unitNumber propertyId propertyTitle tenantName tenantEmail tenantPhone
|
|
69
|
+
monthlyRent securityDeposit status paymentStatus leaseStart leaseEnd
|
|
70
|
+
lastPaymentAt
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`,N=`
|
|
74
|
+
query HousingvistaAssets($pagination: HousingVistaPaginationInput) {
|
|
75
|
+
housingvistaAssets(pagination: $pagination) {
|
|
76
|
+
id title type category status location purchasePrice currentValue
|
|
77
|
+
appreciationPercent rentalYield imageUrl
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,q=`
|
|
81
|
+
query HousingvistaVerificationItems($pagination: HousingVistaPaginationInput) {
|
|
82
|
+
housingvistaVerificationItems(pagination: $pagination) {
|
|
83
|
+
id entityType entityLabel status priority notes submittedAt
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`,H=`
|
|
87
|
+
query HousingvistaMarketplaceServices($pagination: HousingVistaPaginationInput) {
|
|
88
|
+
housingvistaMarketplaceServices(pagination: $pagination) {
|
|
89
|
+
id name category providerName description priceRange rating reviewCount
|
|
90
|
+
responseTime availableAreas featured verified imageUrl
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`,V=`
|
|
94
|
+
query HousingvistaLegalServices($pagination: HousingVistaPaginationInput) {
|
|
95
|
+
housingvistaLegalServices(pagination: $pagination) {
|
|
96
|
+
id title category description providerName providerRating priceRange
|
|
97
|
+
consultationFee estimatedDuration documentsRequired features status
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`,M=`
|
|
101
|
+
query HousingvistaAmcContracts($pagination: HousingVistaPaginationInput) {
|
|
102
|
+
housingvistaAmcContracts(pagination: $pagination) {
|
|
103
|
+
id packageName propertyTitle providerName monthlyCost status
|
|
104
|
+
servicesIncluded startDate endDate nextServiceDate
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`,U=`
|
|
108
|
+
query HousingvistaHomeLoanOffers($pagination: HousingVistaPaginationInput) {
|
|
109
|
+
housingvistaHomeLoanOffers(pagination: $pagination) {
|
|
110
|
+
id bankName interestRate maxAmount maxTenure processingFee emiPerLakh
|
|
111
|
+
prepaymentCharges specialOffer rating features
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`,F=`
|
|
115
|
+
query HousingvistaAreaInsights($pagination: HousingVistaPaginationInput) {
|
|
116
|
+
housingvistaAreaInsights(pagination: $pagination) {
|
|
117
|
+
id areaName city avgPropertyPrice avgRentalYield appreciationRate
|
|
118
|
+
safetyScore connectivityScore amenitiesScore greenCoverPercent
|
|
119
|
+
schoolsNearby hospitalsNearby upcomingProjects population
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`,W=`
|
|
123
|
+
query HousingvistaMarketTrends($pagination: HousingVistaPaginationInput) {
|
|
124
|
+
housingvistaMarketTrends(pagination: $pagination) {
|
|
125
|
+
id monthLabel avgPrice avgRent priceChangePercent demandIndex supplyIndex
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`,G=`
|
|
129
|
+
query HousingvistaDashboardStats {
|
|
130
|
+
housingvistaDashboardStats {
|
|
131
|
+
totalProperties totalValue totalPortfolioValue totalInvestments
|
|
132
|
+
investmentReturns totalTenants occupancyRate monthlyRevenue
|
|
133
|
+
activeTransactions pendingVerifications maintenanceRequests
|
|
134
|
+
upcomingViewings unreadMessages
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
`;function T(r,o){try{return JSON.parse(o)}catch{throw new g(`--${r} must be valid JSON`)}}function i(r){let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new g(`Expected an integer but got "${r}"`);return o}function w(r){let o=Number.parseFloat(r);if(Number.isNaN(o))throw new g(`Expected a number but got "${r}"`);return o}function m(r,o){let e={};return r!==void 0&&(e.limit=r),o!==void 0&&(e.offset=o),Object.keys(e).length?e:void 0}function j(r){let o=r.command("properties").description("HousingVista properties");o.command("list").description("List properties").option("--type <t>","residential|commercial|industrial|agricultural|mixed_use").option("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").option("--city <c>","Filter by city").option("--search <q>","Free-text search").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n={};e.type&&(n.type=e.type.toLowerCase()),e.status&&(n.status=e.status.toLowerCase()),e.city&&(n.city=e.city),e.search&&(n.search=e.search);let t=await s(A,{filter:Object.keys(n).length?n:void 0,pagination:m(e.limit,e.offset)});c(e,t.housingvistaProperties,{headers:["ID","Title","Type","Status","City","Price"],rows:t.housingvistaProperties.map(l=>[u(l.id,12),l.title,l.type,l.status,l.city,String(l.price)])});}catch(n){a(n);}}),o.command("get").description("Get a property by id").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let t=await s(S,{id:e});if(!t.housingvistaProperty)throw new g(`Property ${e} not found`);c(n,t.housingvistaProperty);}catch(t){a(t);}}),o.command("create").description("Create a property").requiredOption("--title <t>","Title").requiredOption("--type <t>","residential|commercial|industrial|agricultural|mixed_use").requiredOption("--category <c>","Category").requiredOption("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").requiredOption("--price <n>","Price",w).requiredOption("--city <c>","City").requiredOption("--state <s>","State").requiredOption("--bedrooms <n>","Bedrooms",i).requiredOption("--bathrooms <n>","Bathrooms",i).requiredOption("--total-area <n>","Total area",w).option("--description <s>","Description").option("--image-url <url>","Image URL").option("--context <json>","Context JSON").option("-f, --format <format>","Output format").action(async e=>{try{let n={title:e.title,type:e.type.toLowerCase(),category:e.category,status:e.status.toLowerCase(),price:e.price,city:e.city,state:e.state,bedrooms:e.bedrooms,bathrooms:e.bathrooms,totalArea:e.totalArea};e.description&&(n.description=e.description),e.imageUrl&&(n.imageUrl=e.imageUrl),e.context&&(n.context=T("context",e.context));let t=await s(E,{input:n});v(`Property created: ${t.createHousingvistaProperty.title}`),c(e,t.createHousingvistaProperty);}catch(n){a(n);}}),o.command("update").description("Update a property").argument("<id>","Property ID").option("--title <t>","Title").option("--type <t>","residential|commercial|industrial|agricultural|mixed_use").option("--category <c>","Category").option("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").option("--price <n>","Price",w).option("--city <c>","City").option("--state <s>","State").option("--bedrooms <n>","Bedrooms",i).option("--bathrooms <n>","Bathrooms",i).option("--total-area <n>","Total area",w).option("--description <s>","Description").option("--image-url <url>","Image URL").option("--context <json>","Context JSON").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let t={};if(n.title&&(t.title=n.title),n.type&&(t.type=n.type.toLowerCase()),n.category&&(t.category=n.category),n.status&&(t.status=n.status.toLowerCase()),n.price!==void 0&&(t.price=n.price),n.city&&(t.city=n.city),n.state&&(t.state=n.state),n.bedrooms!==void 0&&(t.bedrooms=n.bedrooms),n.bathrooms!==void 0&&(t.bathrooms=n.bathrooms),n.totalArea!==void 0&&(t.totalArea=n.totalArea),n.description!==void 0&&(t.description=n.description),n.imageUrl!==void 0&&(t.imageUrl=n.imageUrl),n.context&&(t.context=T("context",n.context)),!Object.keys(t).length)throw new g("No updates specified");let l=await s(P,{id:e,input:t});v("Property updated"),c(n,l.updateHousingvistaProperty);}catch(t){a(t);}}),o.command("delete").description("Delete a property").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let t=await s(R,{id:e});if(!t.deleteHousingvistaProperty)throw new g(`Property ${e} not deleted`);v(`Property ${e} deleted`),c(n,{deleted:t.deleteHousingvistaProperty});}catch(t){a(t);}});}function z(r){let o=r.command("transactions").description("HousingVista property transactions");o.command("list").description("List transactions").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(O,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaTransactions,{headers:["ID","Title","Type","Status","Amount","Currency"],rows:n.housingvistaTransactions.map(t=>[u(t.id,12),t.title,t.type,t.status,String(t.amount),t.currency])});}catch(n){a(n);}}),o.command("get").description("Get a transaction by id").argument("<id>","Transaction ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let t=await s(L,{id:e});if(!t.housingvistaTransaction)throw new g(`Transaction ${e} not found`);c(n,t.housingvistaTransaction);}catch(t){a(t);}});}function Y(r){let o=r.command("investments").description("HousingVista real-estate investments");o.command("list").description("List investments").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(D,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaInvestments,{headers:["ID","Title","Type","Risk","Status","Value"],rows:n.housingvistaInvestments.map(t=>[u(t.id,12),t.title,t.investmentType,t.riskLevel,t.status,String(t.totalValue)])});}catch(n){a(n);}}),o.command("get").description("Get an investment by id").argument("<id>","Investment ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let t=await s(_,{id:e});if(!t.housingvistaInvestment)throw new g(`Investment ${e} not found`);c(n,t.housingvistaInvestment);}catch(t){a(t);}});}function B(r){r.command("rentals").description("HousingVista rental units").command("list").description("List rental units").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s($,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaRentalUnits,{headers:["ID","Unit","Property","Tenant","Rent","Payment"],rows:n.housingvistaRentalUnits.map(t=>[u(t.id,12),t.unitNumber,u(t.propertyTitle,24),t.tenantName,String(t.monthlyRent),t.paymentStatus])});}catch(n){a(n);}});}function J(r){r.command("assets").description("HousingVista portfolio assets").command("list").description("List assets").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(N,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaAssets,{headers:["ID","Title","Type","Status","Location","Value"],rows:n.housingvistaAssets.map(t=>[u(t.id,12),t.title,t.type,t.status,u(t.location,20),String(t.currentValue)])});}catch(n){a(n);}});}function K(r){r.command("verifications").description("HousingVista verification queue").command("list").description("List verification items").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(q,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaVerificationItems,{headers:["ID","Type","Label","Status","Priority"],rows:n.housingvistaVerificationItems.map(t=>[u(t.id,12),t.entityType,u(t.entityLabel,24),t.status,t.priority])});}catch(n){a(n);}});}function Q(r){let o=r.command("marketplace").description("HousingVista services marketplace (services, legal, AMC, home loans)");o.command("services").description("List marketplace services").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(H,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaMarketplaceServices,{headers:["ID","Name","Category","Provider","Rating","Verified"],rows:n.housingvistaMarketplaceServices.map(t=>[u(t.id,12),t.name,t.category,t.providerName,String(t.rating??"-"),t.verified?"yes":"no"])});}catch(n){a(n);}}),o.command("legal").description("List legal services").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(V,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaLegalServices,{headers:["ID","Title","Category","Provider","Price","Status"],rows:n.housingvistaLegalServices.map(t=>[u(t.id,12),t.title,t.category,t.providerName,t.priceRange??"-",t.status])});}catch(n){a(n);}}),o.command("amc").description("List AMC (annual maintenance) contracts").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(M,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaAmcContracts,{headers:["ID","Package","Property","Provider","Monthly","Status"],rows:n.housingvistaAmcContracts.map(t=>[u(t.id,12),t.packageName,u(t.propertyTitle,20),t.providerName,String(t.monthlyCost),t.status])});}catch(n){a(n);}}),o.command("home-loans").description("List home loan offers").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(U,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaHomeLoanOffers,{headers:["ID","Bank","Rate %","Max Amount","Max Tenure","Rating"],rows:n.housingvistaHomeLoanOffers.map(t=>[u(t.id,12),t.bankName,String(t.interestRate),String(t.maxAmount),String(t.maxTenure),String(t.rating??"-")])});}catch(n){a(n);}});}function X(r){let o=r.command("market").description("HousingVista market intelligence (area insights & trends)");o.command("area-insights").description("List area insights").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(F,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaAreaInsights,{headers:["ID","Area","City","Avg Price","Yield %","Appreciation %"],rows:n.housingvistaAreaInsights.map(t=>[u(t.id,12),t.areaName,t.city,String(t.avgPropertyPrice),String(t.avgRentalYield),String(t.appreciationRate)])});}catch(n){a(n);}}),o.command("trends").description("List market trends").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(W,{pagination:m(e.limit,e.offset)});c(e,n.housingvistaMarketTrends,{headers:["ID","Month","Avg Price","Avg Rent","Change %","Demand"],rows:n.housingvistaMarketTrends.map(t=>[u(t.id,12),t.monthLabel,String(t.avgPrice),String(t.avgRent),String(t.priceChangePercent),String(t.demandIndex)])});}catch(n){a(n);}});}function Z(r){r.command("analytics").description("HousingVista analytics & dashboard").command("dashboard").description("Dashboard stats (properties, portfolio value, investments, occupancy, transactions)").option("-f, --format <format>","Output format").action(async e=>{try{let n=await s(G);c(e,n.housingvistaDashboardStats);}catch(n){a(n);}});}var mt={id:"housingvista",version:"1.0.0",displayName:"HousingVista",dependsOn:["auth","workspaces"],register(r,o){b(o);let e=r.command("housingvista").description("HousingVista real-estate & property management");j(e),z(e),Y(e),B(e),J(e),K(e),Q(e),X(e),Z(e);}},an=mt;module.exports=an;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {a,b as b$1,h as h$1,p,g,i}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var h=`
|
|
2
|
+
id title description type category status price city state
|
|
3
|
+
bedrooms bathrooms totalArea imageUrl context createdAt updatedAt workspaceId
|
|
4
|
+
`,S=`
|
|
5
|
+
query HousingvistaProperties(
|
|
6
|
+
$filter: HousingVistaPropertyFilterInput
|
|
7
|
+
$pagination: HousingVistaPaginationInput
|
|
8
|
+
) {
|
|
9
|
+
housingvistaProperties(filter: $filter, pagination: $pagination) {
|
|
10
|
+
id title type category status price city state bedrooms bathrooms
|
|
11
|
+
totalArea imageUrl createdAt
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,b=`
|
|
15
|
+
query HousingvistaProperty($id: ID!) {
|
|
16
|
+
housingvistaProperty(id: $id) {
|
|
17
|
+
${h}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,P=`
|
|
21
|
+
mutation CreateHousingvistaProperty($input: CreatePropertyInput!) {
|
|
22
|
+
createHousingvistaProperty(input: $input) {
|
|
23
|
+
${h}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`,R=`
|
|
27
|
+
mutation UpdateHousingvistaProperty($id: ID!, $input: UpdatePropertyInput!) {
|
|
28
|
+
updateHousingvistaProperty(id: $id, input: $input) {
|
|
29
|
+
${h}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`,C=`
|
|
33
|
+
mutation DeleteHousingvistaProperty($id: ID!) {
|
|
34
|
+
deleteHousingvistaProperty(id: $id)
|
|
35
|
+
}
|
|
36
|
+
`,A=`
|
|
37
|
+
query HousingvistaTransactions($pagination: HousingVistaPaginationInput) {
|
|
38
|
+
housingvistaTransactions(pagination: $pagination) {
|
|
39
|
+
id title type status amount currency propertyId createdAt updatedAt
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`,w=`
|
|
43
|
+
query HousingvistaTransaction($id: ID!) {
|
|
44
|
+
housingvistaTransaction(id: $id) {
|
|
45
|
+
id title type status amount currency propertyId
|
|
46
|
+
documents escrow milestones parties createdAt updatedAt workspaceId
|
|
47
|
+
property { id title city state status price }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`,O=`
|
|
51
|
+
query HousingvistaInvestments($pagination: HousingVistaPaginationInput) {
|
|
52
|
+
housingvistaInvestments(pagination: $pagination) {
|
|
53
|
+
id title investmentType riskLevel status totalValue propertyId
|
|
54
|
+
createdAt updatedAt
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`,k=`
|
|
58
|
+
query HousingvistaInvestment($id: ID!) {
|
|
59
|
+
housingvistaInvestment(id: $id) {
|
|
60
|
+
id title investmentType riskLevel status totalValue propertyId
|
|
61
|
+
investors returns createdAt updatedAt workspaceId
|
|
62
|
+
property { id title city state status price }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`,E=`
|
|
66
|
+
query HousingvistaRentalUnits($pagination: HousingVistaPaginationInput) {
|
|
67
|
+
housingvistaRentalUnits(pagination: $pagination) {
|
|
68
|
+
id unitNumber propertyId propertyTitle tenantName tenantEmail tenantPhone
|
|
69
|
+
monthlyRent securityDeposit status paymentStatus leaseStart leaseEnd
|
|
70
|
+
lastPaymentAt
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`,L=`
|
|
74
|
+
query HousingvistaAssets($pagination: HousingVistaPaginationInput) {
|
|
75
|
+
housingvistaAssets(pagination: $pagination) {
|
|
76
|
+
id title type category status location purchasePrice currentValue
|
|
77
|
+
appreciationPercent rentalYield imageUrl
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,x=`
|
|
81
|
+
query HousingvistaVerificationItems($pagination: HousingVistaPaginationInput) {
|
|
82
|
+
housingvistaVerificationItems(pagination: $pagination) {
|
|
83
|
+
id entityType entityLabel status priority notes submittedAt
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`,_=`
|
|
87
|
+
query HousingvistaMarketplaceServices($pagination: HousingVistaPaginationInput) {
|
|
88
|
+
housingvistaMarketplaceServices(pagination: $pagination) {
|
|
89
|
+
id name category providerName description priceRange rating reviewCount
|
|
90
|
+
responseTime availableAreas featured verified imageUrl
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`,N=`
|
|
94
|
+
query HousingvistaLegalServices($pagination: HousingVistaPaginationInput) {
|
|
95
|
+
housingvistaLegalServices(pagination: $pagination) {
|
|
96
|
+
id title category description providerName providerRating priceRange
|
|
97
|
+
consultationFee estimatedDuration documentsRequired features status
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`,H=`
|
|
101
|
+
query HousingvistaAmcContracts($pagination: HousingVistaPaginationInput) {
|
|
102
|
+
housingvistaAmcContracts(pagination: $pagination) {
|
|
103
|
+
id packageName propertyTitle providerName monthlyCost status
|
|
104
|
+
servicesIncluded startDate endDate nextServiceDate
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`,V=`
|
|
108
|
+
query HousingvistaHomeLoanOffers($pagination: HousingVistaPaginationInput) {
|
|
109
|
+
housingvistaHomeLoanOffers(pagination: $pagination) {
|
|
110
|
+
id bankName interestRate maxAmount maxTenure processingFee emiPerLakh
|
|
111
|
+
prepaymentCharges specialOffer rating features
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`,$=`
|
|
115
|
+
query HousingvistaAreaInsights($pagination: HousingVistaPaginationInput) {
|
|
116
|
+
housingvistaAreaInsights(pagination: $pagination) {
|
|
117
|
+
id areaName city avgPropertyPrice avgRentalYield appreciationRate
|
|
118
|
+
safetyScore connectivityScore amenitiesScore greenCoverPercent
|
|
119
|
+
schoolsNearby hospitalsNearby upcomingProjects population
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`,D=`
|
|
123
|
+
query HousingvistaMarketTrends($pagination: HousingVistaPaginationInput) {
|
|
124
|
+
housingvistaMarketTrends(pagination: $pagination) {
|
|
125
|
+
id monthLabel avgPrice avgRent priceChangePercent demandIndex supplyIndex
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`,M=`
|
|
129
|
+
query HousingvistaDashboardStats {
|
|
130
|
+
housingvistaDashboardStats {
|
|
131
|
+
totalProperties totalValue totalPortfolioValue totalInvestments
|
|
132
|
+
investmentReturns totalTenants occupancyRate monthlyRevenue
|
|
133
|
+
activeTransactions pendingVerifications maintenanceRequests
|
|
134
|
+
upcomingViewings unreadMessages
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
`;function I(o$1,n){try{return JSON.parse(n)}catch{throw new o(`--${o$1} must be valid JSON`)}}function r(o$1){let n=Number.parseInt(o$1,10);if(Number.isNaN(n))throw new o(`Expected an integer but got "${o$1}"`);return n}function v(o$1){let n=Number.parseFloat(o$1);if(Number.isNaN(n))throw new o(`Expected a number but got "${o$1}"`);return n}function c(o,n){let i={};return o!==void 0&&(i.limit=o),n!==void 0&&(i.offset=n),Object.keys(i).length?i:void 0}function U(o$1){let n=o$1.command("properties").description("HousingVista properties");n.command("list").description("List properties").option("--type <t>","residential|commercial|industrial|agricultural|mixed_use").option("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").option("--city <c>","Filter by city").option("--search <q>","Free-text search").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e={};i.type&&(e.type=i.type.toLowerCase()),i.status&&(e.status=i.status.toLowerCase()),i.city&&(e.city=i.city),i.search&&(e.search=i.search);let t=await b$1(S,{filter:Object.keys(e).length?e:void 0,pagination:c(i.limit,i.offset)});h$1(i,t.housingvistaProperties,{headers:["ID","Title","Type","Status","City","Price"],rows:t.housingvistaProperties.map(l=>[p(l.id,12),l.title,l.type,l.status,l.city,String(l.price)])});}catch(e){g(e);}}),n.command("get").description("Get a property by id").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(i,e)=>{try{let t=await b$1(b,{id:i});if(!t.housingvistaProperty)throw new o(`Property ${i} not found`);h$1(e,t.housingvistaProperty);}catch(t){g(t);}}),n.command("create").description("Create a property").requiredOption("--title <t>","Title").requiredOption("--type <t>","residential|commercial|industrial|agricultural|mixed_use").requiredOption("--category <c>","Category").requiredOption("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").requiredOption("--price <n>","Price",v).requiredOption("--city <c>","City").requiredOption("--state <s>","State").requiredOption("--bedrooms <n>","Bedrooms",r).requiredOption("--bathrooms <n>","Bathrooms",r).requiredOption("--total-area <n>","Total area",v).option("--description <s>","Description").option("--image-url <url>","Image URL").option("--context <json>","Context JSON").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={title:i$1.title,type:i$1.type.toLowerCase(),category:i$1.category,status:i$1.status.toLowerCase(),price:i$1.price,city:i$1.city,state:i$1.state,bedrooms:i$1.bedrooms,bathrooms:i$1.bathrooms,totalArea:i$1.totalArea};i$1.description&&(e.description=i$1.description),i$1.imageUrl&&(e.imageUrl=i$1.imageUrl),i$1.context&&(e.context=I("context",i$1.context));let t=await b$1(P,{input:e});i(`Property created: ${t.createHousingvistaProperty.title}`),h$1(i$1,t.createHousingvistaProperty);}catch(e){g(e);}}),n.command("update").description("Update a property").argument("<id>","Property ID").option("--title <t>","Title").option("--type <t>","residential|commercial|industrial|agricultural|mixed_use").option("--category <c>","Category").option("--status <s>","for_sale|for_rent|sold|rented|under_contract|off_market").option("--price <n>","Price",v).option("--city <c>","City").option("--state <s>","State").option("--bedrooms <n>","Bedrooms",r).option("--bathrooms <n>","Bathrooms",r).option("--total-area <n>","Total area",v).option("--description <s>","Description").option("--image-url <url>","Image URL").option("--context <json>","Context JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.title&&(t.title=e.title),e.type&&(t.type=e.type.toLowerCase()),e.category&&(t.category=e.category),e.status&&(t.status=e.status.toLowerCase()),e.price!==void 0&&(t.price=e.price),e.city&&(t.city=e.city),e.state&&(t.state=e.state),e.bedrooms!==void 0&&(t.bedrooms=e.bedrooms),e.bathrooms!==void 0&&(t.bathrooms=e.bathrooms),e.totalArea!==void 0&&(t.totalArea=e.totalArea),e.description!==void 0&&(t.description=e.description),e.imageUrl!==void 0&&(t.imageUrl=e.imageUrl),e.context&&(t.context=I("context",e.context)),!Object.keys(t).length)throw new o("No updates specified");let l=await b$1(R,{id:i$1,input:t});i("Property updated"),h$1(e,l.updateHousingvistaProperty);}catch(t){g(t);}}),n.command("delete").description("Delete a property").argument("<id>","Property ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(C,{id:i$1});if(!t.deleteHousingvistaProperty)throw new o(`Property ${i$1} not deleted`);i(`Property ${i$1} deleted`),h$1(e,{deleted:t.deleteHousingvistaProperty});}catch(t){g(t);}});}function q(o$1){let n=o$1.command("transactions").description("HousingVista property transactions");n.command("list").description("List transactions").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(A,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaTransactions,{headers:["ID","Title","Type","Status","Amount","Currency"],rows:e.housingvistaTransactions.map(t=>[p(t.id,12),t.title,t.type,t.status,String(t.amount),t.currency])});}catch(e){g(e);}}),n.command("get").description("Get a transaction by id").argument("<id>","Transaction ID").option("-f, --format <format>","Output format").action(async(i,e)=>{try{let t=await b$1(w,{id:i});if(!t.housingvistaTransaction)throw new o(`Transaction ${i} not found`);h$1(e,t.housingvistaTransaction);}catch(t){g(t);}});}function F(o$1){let n=o$1.command("investments").description("HousingVista real-estate investments");n.command("list").description("List investments").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(O,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaInvestments,{headers:["ID","Title","Type","Risk","Status","Value"],rows:e.housingvistaInvestments.map(t=>[p(t.id,12),t.title,t.investmentType,t.riskLevel,t.status,String(t.totalValue)])});}catch(e){g(e);}}),n.command("get").description("Get an investment by id").argument("<id>","Investment ID").option("-f, --format <format>","Output format").action(async(i,e)=>{try{let t=await b$1(k,{id:i});if(!t.housingvistaInvestment)throw new o(`Investment ${i} not found`);h$1(e,t.housingvistaInvestment);}catch(t){g(t);}});}function Y(o){o.command("rentals").description("HousingVista rental units").command("list").description("List rental units").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(E,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaRentalUnits,{headers:["ID","Unit","Property","Tenant","Rent","Payment"],rows:e.housingvistaRentalUnits.map(t=>[p(t.id,12),t.unitNumber,p(t.propertyTitle,24),t.tenantName,String(t.monthlyRent),t.paymentStatus])});}catch(e){g(e);}});}function G(o){o.command("assets").description("HousingVista portfolio assets").command("list").description("List assets").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(L,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaAssets,{headers:["ID","Title","Type","Status","Location","Value"],rows:e.housingvistaAssets.map(t=>[p(t.id,12),t.title,t.type,t.status,p(t.location,20),String(t.currentValue)])});}catch(e){g(e);}});}function z(o){o.command("verifications").description("HousingVista verification queue").command("list").description("List verification items").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(x,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaVerificationItems,{headers:["ID","Type","Label","Status","Priority"],rows:e.housingvistaVerificationItems.map(t=>[p(t.id,12),t.entityType,p(t.entityLabel,24),t.status,t.priority])});}catch(e){g(e);}});}function W(o){let n=o.command("marketplace").description("HousingVista services marketplace (services, legal, AMC, home loans)");n.command("services").description("List marketplace services").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(_,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaMarketplaceServices,{headers:["ID","Name","Category","Provider","Rating","Verified"],rows:e.housingvistaMarketplaceServices.map(t=>[p(t.id,12),t.name,t.category,t.providerName,String(t.rating??"-"),t.verified?"yes":"no"])});}catch(e){g(e);}}),n.command("legal").description("List legal services").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(N,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaLegalServices,{headers:["ID","Title","Category","Provider","Price","Status"],rows:e.housingvistaLegalServices.map(t=>[p(t.id,12),t.title,t.category,t.providerName,t.priceRange??"-",t.status])});}catch(e){g(e);}}),n.command("amc").description("List AMC (annual maintenance) contracts").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(H,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaAmcContracts,{headers:["ID","Package","Property","Provider","Monthly","Status"],rows:e.housingvistaAmcContracts.map(t=>[p(t.id,12),t.packageName,p(t.propertyTitle,20),t.providerName,String(t.monthlyCost),t.status])});}catch(e){g(e);}}),n.command("home-loans").description("List home loan offers").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(V,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaHomeLoanOffers,{headers:["ID","Bank","Rate %","Max Amount","Max Tenure","Rating"],rows:e.housingvistaHomeLoanOffers.map(t=>[p(t.id,12),t.bankName,String(t.interestRate),String(t.maxAmount),String(t.maxTenure),String(t.rating??"-")])});}catch(e){g(e);}});}function j(o){let n=o.command("market").description("HousingVista market intelligence (area insights & trends)");n.command("area-insights").description("List area insights").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1($,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaAreaInsights,{headers:["ID","Area","City","Avg Price","Yield %","Appreciation %"],rows:e.housingvistaAreaInsights.map(t=>[p(t.id,12),t.areaName,t.city,String(t.avgPropertyPrice),String(t.avgRentalYield),String(t.appreciationRate)])});}catch(e){g(e);}}),n.command("trends").description("List market trends").option("--limit <n>","Page size",r,50).option("--offset <n>","Offset",r,0).option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(D,{pagination:c(i.limit,i.offset)});h$1(i,e.housingvistaMarketTrends,{headers:["ID","Month","Avg Price","Avg Rent","Change %","Demand"],rows:e.housingvistaMarketTrends.map(t=>[p(t.id,12),t.monthLabel,String(t.avgPrice),String(t.avgRent),String(t.priceChangePercent),String(t.demandIndex)])});}catch(e){g(e);}});}function B(o){o.command("analytics").description("HousingVista analytics & dashboard").command("dashboard").description("Dashboard stats (properties, portfolio value, investments, occupancy, transactions)").option("-f, --format <format>","Output format").action(async i=>{try{let e=await b$1(M);h$1(i,e.housingvistaDashboardStats);}catch(e){g(e);}});}var J={id:"housingvista",version:"1.0.0",displayName:"HousingVista",dependsOn:["auth","workspaces"],register(o,n){a(n);let i=o.command("housingvista").description("HousingVista real-estate & property management");U(i),q(i),F(i),Y(i),G(i),z(i),W(i),j(i),B(i);}},Ut=J;export{Ut as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/cli-sdk",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.627.1",
|
|
4
4
|
"description": "Modular CLI SDK shared across all Burdenoff product CLIs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, devportal, workspaces). Each module exports CliModule contract; product CLIs become thin shells that pick which modules to mount.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|