@burdenoff/cli-sdk 2026.529.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/chunk-WXDQ3S5J.js +1 -0
- package/dist/modules/auth/index.js +4 -4
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/conversations/index.js +2 -2
- 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/devportal/index.js +2 -2
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.js +4 -4
- 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/groups/index.js +2 -2
- 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/dist/modules/integrations/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +226 -0
- package/dist/modules/kadaikodi/index.d.cts +7 -0
- package/dist/modules/kadaikodi/index.d.ts +7 -0
- package/dist/modules/kadaikodi/index.js +226 -0
- package/dist/modules/notifications/index.js +2 -2
- package/dist/modules/organizations/index.js +2 -2
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.js +4 -4
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-LZQBJDKZ.js +0 -1
|
@@ -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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b,
|
|
1
|
+
import {a,b,h as h$1,p,n,g,i,o as o$1}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var l=`
|
|
2
2
|
query ListGroups($filter: GroupFilter, $first: Int, $after: String, $sort: GroupSort) {
|
|
3
3
|
groups(filter: $filter, first: $first, after: $after, sort: $sort) {
|
|
4
4
|
edges { node { id name groupType visibility status memberCount createdAt } }
|
|
@@ -64,4 +64,4 @@ import {a,b,g,o,m,f,h as h$1,n}from'../../chunk-LZQBJDKZ.js';import {o as o$1}fr
|
|
|
64
64
|
edges { node { id name groupType visibility memberCount } }
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
`;function P(u){let n$1=u.command("groups").description("Group management");n$1.command("list").description("List groups").option("--type <t>","Filter by groupType").option("--status <s>","Filter by status").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.type&&(e.groupType=t.type.toUpperCase()),t.status&&(e.status=t.status.toUpperCase());let p=(await b(l,{filter:Object.keys(e).length?e:void 0,first:t.limit})).groups.edges.map(i=>i.node);
|
|
67
|
+
`;function P(u){let n$1=u.command("groups").description("Group management");n$1.command("list").description("List groups").option("--type <t>","Filter by groupType").option("--status <s>","Filter by status").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.type&&(e.groupType=t.type.toUpperCase()),t.status&&(e.status=t.status.toUpperCase());let p$1=(await b(l,{filter:Object.keys(e).length?e:void 0,first:t.limit})).groups.edges.map(i=>i.node);h$1(t,p$1,{headers:["ID","Name","Type","Visibility","Status","Members"],rows:p$1.map(i=>[p(i.id,12),i.name,i.groupType??"-",i.visibility??"-",n(i.status),String(i.memberCount??0)])});}catch(e){g(e);}}),n$1.command("get").description("Get a group by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let r=await b(E,{id:t});if(!r.group)throw new o(`Group ${t} not found`);h$1(e,r.group);}catch(r){g(r);}}),n$1.command("create").description("Create a group").requiredOption("--name <name>").option("--description <s>").option("--type <t>","AUDIENCE|BETA_PROGRAM|CHANNEL_GROUP|CUSTOM|DYNAMIC_AUDIENCE|FEATURE_FLAG_GROUP|PROJECT_GROUP|RESOURCE_COLLECTION|SECURITY_GROUP|TEAM","TEAM").option("--visibility <v>","PUBLIC|PRIVATE|HIDDEN","PRIVATE").option("--scope <s>","WORKSPACE|ORGANIZATION","WORKSPACE").option("--membership <m>","STATIC|DYNAMIC|HYBRID","STATIC").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,description:t.description,groupType:(t.type??"TEAM").toUpperCase(),visibility:(t.visibility??"PRIVATE").toUpperCase(),scope:(t.scope??"WORKSPACE").toUpperCase(),membershipType:(t.membership??"STATIC").toUpperCase()},r=await b(R,{input:e});i(`Group created: ${r.createGroup.name}`),h$1(t,r.createGroup);}catch(e){g(e);}}),n$1.command("update").description("Update a group").argument("<id>").option("--name <s>").option("--description <s>").option("--visibility <v>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let r={};if(e.name&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.visibility&&(r.visibility=e.visibility.toUpperCase()),e.status&&(r.status=e.status.toUpperCase()),!Object.keys(r).length)throw new o("No updates specified");let p=await b(T,{id:t,input:r});i("Group updated"),h$1(e,p.updateGroup);}catch(r){g(r);}}),n$1.command("delete").description("Delete a group (use --archive for soft delete)").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(t,e)=>{try{e.archive?(await b(U,{id:t}),i("Group archived")):(await b(A,{id:t}),i("Group deleted"));}catch(r){g(r);}});let c=n$1.command("members").description("Group membership");c.command("list").description("List members of a group").argument("<groupId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let p$1=(await b(C,{groupId:t,first:e.limit})).groupMembers.edges.map(i=>i.node);h$1(e,p$1,{headers:["MembershipID","Entity","Type","Role","Status","Joined"],rows:p$1.map(i=>[p(i.id,12),p(i.entityId,12),i.entityType??"-",i.role??"-",n(i.invitationStatus),o$1(i.joinedAt)])});}catch(r){g(r);}}),c.command("add").description("Add a member to a group").requiredOption("--group <id>").requiredOption("--entity <id>").option("--entity-type <t>","USER|GROUP|BOT|INTEGRATION","USER").option("--role <r>","MEMBER|OWNER|ADMIN","MEMBER").option("-f, --format <format>").action(async t=>{try{let e={entityId:t.entity,entityType:(t.entityType??"USER").toUpperCase(),role:(t.role??"MEMBER").toUpperCase()},r=await b(h,{groupId:t.group,members:[e]});i(`Added ${r.addGroupMembers.added} member(s)`),h$1(t,r.addGroupMembers.memberships);}catch(e){g(e);}}),c.command("remove").description("Remove members by membership id").requiredOption("--group <id>").requiredOption("--membership <ids>","Comma-separated membership ids").action(async t=>{try{let e=t.membership.split(",").filter(Boolean);await b(O,{groupId:t.group,membershipIds:e}),i(`Removed ${e.length} membership(s)`);}catch(e){g(e);}}),n$1.command("hierarchy").description("Show entity-group hierarchy for a user/entity").argument("<entityId>").option("--type <t>","USER|GROUP","USER").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let r=await b(M,{entityId:t,entityType:(e.type??"USER").toUpperCase(),first:e.limit});h$1(e,r.entityGroups.edges.map(p=>p.node));}catch(r){g(r);}}),n$1.command("activity").description("Audit log for a group").argument("<groupId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let r=await b($,{groupId:t,first:e.limit});h$1(e,r.groupAuditLogs);}catch(r){g(r);}});}var v={id:"groups",version:"1.0.0",displayName:"Groups",dependsOn:["auth","workspaces"],register(u,n){a(n),P(u);}},B=v;export{B 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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,
|
|
1
|
+
import {a,b as b$1,h,p,g,n,i,o as o$1}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var E=`
|
|
2
2
|
query GetProviders($filter: ProviderFilterInput, $pagination: IntegrationsPaginationInput) {
|
|
3
3
|
getProviders(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id key name category authType isEnabled }
|
|
@@ -125,4 +125,4 @@ import {a,b as b$1,g,o,f,m,h,n}from'../../chunk-LZQBJDKZ.js';import {o as o$1}fr
|
|
|
125
125
|
query GetConnectionTags($input: GetConnectionTagsInput!) {
|
|
126
126
|
getConnectionTags(input: $input) { id entityId tagId source assignedAt }
|
|
127
127
|
}
|
|
128
|
-
`;function Y(I){let p=I.command("integrations").description("Integration providers, connections, and logs"),d=p.command("providers").description("Available providers");d.command("list").description("List integration providers").option("--category <c>").option("--enabled").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n={};t.category&&(n.category=t.category.toUpperCase()),t.enabled!==void 0&&(n.isEnabled=t.enabled);let e=await b$1(E,{filter:Object.keys(n).length?n:void 0,pagination:{limit:t.limit,offset:0}});
|
|
128
|
+
`;function Y(I){let p$1=I.command("integrations").description("Integration providers, connections, and logs"),d=p$1.command("providers").description("Available providers");d.command("list").description("List integration providers").option("--category <c>").option("--enabled").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n={};t.category&&(n.category=t.category.toUpperCase()),t.enabled!==void 0&&(n.isEnabled=t.enabled);let e=await b$1(E,{filter:Object.keys(n).length?n:void 0,pagination:{limit:t.limit,offset:0}});h(t,e.getProviders.items,{headers:["ID","Key","Name","Category","Auth","Enabled"],rows:e.getProviders.items.map(r=>[p(r.id,12),r.key,r.name,r.category??"-",r.authType??"-",String(!!r.isEnabled)])});}catch(n){g(n);}}),d.command("get").description("Get a provider").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(O,{id:t});if(!e.getProvider)throw new o(`Provider ${t} not found`);h(n,e.getProvider);}catch(e){g(e);}});let s=p$1.command("connections").description("Provider connections (OAuth + credential)");s.command("list").description("List connections").option("--provider <id>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n$1={};t.provider&&(n$1.providerId=t.provider),t.status&&(n$1.status=t.status.toUpperCase());let e=await b$1(N,{filter:Object.keys(n$1).length?n$1:void 0,pagination:{limit:t.limit,offset:0}});h(t,e.getConnections.items,{headers:["ID","Name","Provider","Status"],rows:e.getConnections.items.map(r=>[p(r.id,12),r.name,p(r.providerId,12),n(r.status)])});}catch(n){g(n);}}),s.command("get").description("Get a connection").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(A,{id:t});if(!e.getConnection)throw new o(`Connection ${t} not found`);h(n,e.getConnection);}catch(e){g(e);}}),s.command("add").description("Create a connection (provider id required; credentials stored in vault)").requiredOption("--name <name>").requiredOption("--provider <id>").option("--scopes <s>","Comma-separated scopes").option("-f, --format <format>").action(async t=>{try{let n={name:t.name,providerId:t.provider,grantedScopes:t.scopes?t.scopes.split(","):void 0},e=await b$1(v,{input:n});i("Connection created"),h(t,e.createConnection);}catch(n){g(n);}}),s.command("delete").description("Delete a connection").argument("<id>").option("--keep-secret","Keep vault secret",false).action(async(t,n)=>{try{await b$1(R,{id:t,deleteVaultSecret:!n.keepSecret}),i("Connection deleted");}catch(e){g(e);}}),s.command("update").description("Update a connection (name / description / config JSON)").argument("<id>").option("--name <name>").option("--description <desc>").option("--config <json>","Config JSON string").option("-f, --format <format>").action(async(t,n)=>{try{let e={};if(n.name!==void 0&&(e.name=n.name),n.description!==void 0&&(e.description=n.description),n.config!==void 0&&(e.config=JSON.parse(n.config)),Object.keys(e).length===0)throw new o("Provide at least one of --name, --description, --config");let r=await b$1(_,{id:t,input:e});i("Connection updated"),h(n,r.updateConnection);}catch(e){g(e);}}),s.command("revoke").description("Revoke a connection (soft delete; tokens invalidated)").argument("<connectionId>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(P,{connectionId:t});i("Connection revoked"),h(n,e.revokeConnection);}catch(e){g(e);}}),s.command("test").description("Test a connection (health/auth probe)").argument("<connectionId>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1($,{connectionId:t});h(n,e.testConnection);}catch(e){g(e);}}),s.command("link").description("Link a connection to a channel for DM/notification routing").requiredOption("--channel <channelId>").requiredOption("--connection <id>").requiredOption("--organization <id>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(k,{channelId:t.channel,connectionId:t.connection,organizationId:t.organization});i("Linked"),h(t,n.linkIntegrationToChannel);}catch(n){g(n);}}),s.command("refresh-token").description("Force a connection token refresh (OAuth refresh_grant)").argument("<connectionId>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(b,{connectionId:t});i("Token refreshed"),h(n,e.refreshConnectionToken);}catch(e){g(e);}});let g$1=p$1.command("auth").description("Per-connection auth flows");g$1.command("api-key").description("Authenticate a connection with an API key").requiredOption("--connection <id>").requiredOption("--api-key <key>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(G,{input:{connectionId:t.connection,apiKey:t.apiKey}});i("Authenticated"),h(t,n.authenticateWithApiKey);}catch(n){g(n);}}),g$1.command("basic").description("Authenticate a connection with Basic Auth").requiredOption("--connection <id>").requiredOption("--username <u>").requiredOption("--password <p>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(S,{input:{connectionId:t.connection,username:t.username,password:t.password}});i("Authenticated"),h(t,n.authenticateWithBasicAuth);}catch(n){g(n);}}),g$1.command("bearer").description("Authenticate a connection with a Bearer token").requiredOption("--connection <id>").requiredOption("--token <t>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(D,{input:{connectionId:t.connection,token:t.token}});i("Authenticated"),h(t,n.authenticateWithBearerToken);}catch(n){g(n);}}),g$1.command("oauth-start").description("Initiate an OAuth flow; prints redirect URL + state").requiredOption("--connection <id>").requiredOption("--redirect-uri <uri>").option("--scopes <s>","Comma-separated scopes").option("-f, --format <format>").action(async t=>{try{let n={connectionId:t.connection,redirectUri:t.redirectUri};t.scopes&&(n.scopes=t.scopes.split(","));let e=await b$1(B,{input:n});h(t,e.initiateOAuth);}catch(n){g(n);}}),g$1.command("oauth-complete").description("Complete an OAuth flow with the authorization code + state").requiredOption("--connection <id>").requiredOption("--code <c>").requiredOption("--redirect-uri <uri>").requiredOption("--state <s>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(q,{input:{connectionId:t.connection,code:t.code,redirectUri:t.redirectUri,state:t.state}});i("OAuth complete"),h(t,n.completeOAuth);}catch(n){g(n);}});let l=s.command("tags").description("Connection tag assignments");l.command("add").description("Tag a connection").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").option("-f, --format <format>").action(async t=>{try{let n={entityId:t.entity,tagId:t.tag};t.source&&(n.source=t.source);let e=await b$1(H,{input:n});i("Tagged"),h(t,e.tagConnection);}catch(n){g(n);}}),l.command("remove").description("Remove a tag from a connection").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async t=>{try{await b$1(W,{input:{entityId:t.entity,tagId:t.tag}}),i("Tag removed");}catch(n){g(n);}}),l.command("replace").description("Replace all tags on a connection").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async t=>{try{let n=await b$1(z,{input:{entityId:t.entity,tagIds:t.tags.split(",")}});i("Tags replaced"),h(t,n.replaceConnectionTags);}catch(n){g(n);}}),l.command("list").description("List tags on a connection").requiredOption("--entity <id>").option("-f, --format <format>").action(async t=>{try{let n=await b$1(M,{input:{entityId:t.entity}});h(t,n.getConnectionTags);}catch(n){g(n);}}),d.command("get-by-key").description("Get a provider by key (e.g. github, slack)").argument("<key>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(x,{key:t});if(!e.getProviderByKey)throw new o(`Provider ${t} not found`);h(n,e.getProviderByKey);}catch(e){g(e);}}),d.command("catalog").description("Browseable provider catalog").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n=await b$1(L,{pagination:{limit:t.limit,offset:0}});h(t,n.getProviderCatalog.items,{headers:["ID","Key","Name","Category","Auth","Enabled"],rows:n.getProviderCatalog.items.map(e=>[p(e.id,12),e.key,e.name,e.category??"-",e.authType??"-",String(!!e.isEnabled)])});}catch(n){g(n);}}),d.command("connections").description("Connections for a given provider").argument("<providerId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await b$1(U,{providerId:t,pagination:{limit:n.limit,offset:0}});h(n,e.getConnectionsByProvider.items);}catch(e){g(e);}}),d.command("enable").description("Enable a provider").argument("<id>").action(async t=>{try{await b$1(K,{id:t}),i("Provider enabled");}catch(n){g(n);}}),d.command("disable").description("Disable a provider").argument("<id>").action(async t=>{try{await b$1(V,{id:t}),i("Provider disabled");}catch(n){g(n);}}),p$1.command("logs").description("Integration audit logs").option("--connection <id>").option("--level <l>","INFO|WARN|ERROR").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n={};t.connection&&(n.connectionId=t.connection),t.level&&(n.level=t.level.toUpperCase());let e=await b$1(w,{filter:Object.keys(n).length?n:void 0,pagination:{limit:t.limit,offset:0}});h(t,e.getIntegrationLogs.items,{headers:["When","Action","Level","Message"],rows:e.getIntegrationLogs.items.map(r=>[o$1(r.createdAt),r.action,r.level,r.message])});}catch(n){g(n);}});}var F={id:"integrations",version:"1.0.0",displayName:"Integrations",dependsOn:["auth","workspaces"],register(I,p){a(p),Y(I);}},et=F;export{et as default};
|