@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,226 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(n,e){super(n),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},I=class extends c{constructor(n,e){super(n,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},k=class extends Error{cause;constructor(n,e){super(n),this.name="CliInternalError",this.cause=e;}};var O=null;function b(i){O=i;}function y(){if(!O)throw new k("vibecontrols module helpers used before setHelpersContext was called");return O}function ke(){let i=y();if(!i.auth.isAuthenticated())throw new I(`Authentication required. Run \`${i.productName} auth login\`.`)}async function a(i,n){return ke(),y().gql.workspace.request(i,n)}async function h(i,n){return y().gql.workspaceAuthOnly.request(i,n)}function o(i){let n=i instanceof Error?i.message:String(i);throw new c(n)}function s(i,n,e){y().output.formatAndOutput(i,n,e);}function m(i){y().output.printSuccess(i);}function C(i){return y().output.formatDate(i)}function p(i,n){return y().output.truncate(i,n)}var x=`
|
|
2
|
+
query KadaikodiGetServiceProvider($id: ID!) {
|
|
3
|
+
getServiceProvider(id: $id) {
|
|
4
|
+
id ownerId name slug description category status location
|
|
5
|
+
serviceTypes offeringType businessHours rating totalRatings
|
|
6
|
+
averageOrderValue analyticsSnapshot createdAt updatedAt workspaceId
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,R=`
|
|
10
|
+
query KadaikodiListServiceProviders(
|
|
11
|
+
$filter: KadaikodiProviderFilterInput
|
|
12
|
+
$limit: Int
|
|
13
|
+
$offset: Int
|
|
14
|
+
) {
|
|
15
|
+
listServiceProviders(filter: $filter, limit: $limit, offset: $offset) {
|
|
16
|
+
id name slug category status rating totalRatings averageOrderValue
|
|
17
|
+
offeringType ownerId createdAt
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,S=`
|
|
21
|
+
mutation KadaikodiCreateServiceProvider($input: KadaikodiCreateServiceProviderInput!) {
|
|
22
|
+
kadaikodiCreateServiceProvider(input: $input) {
|
|
23
|
+
id ownerId name slug description category status location
|
|
24
|
+
serviceTypes offeringType rating totalRatings createdAt
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`,A=`
|
|
28
|
+
mutation KadaikodiUpdateServiceProvider(
|
|
29
|
+
$id: ID!
|
|
30
|
+
$input: KadaikodiUpdateServiceProviderInput!
|
|
31
|
+
) {
|
|
32
|
+
kadaikodiUpdateServiceProvider(id: $id, input: $input) {
|
|
33
|
+
id name slug description category status location serviceTypes
|
|
34
|
+
offeringType rating totalRatings updatedAt
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`,P=`
|
|
38
|
+
query KadaikodiListProviderWorkers($providerId: String!, $limit: Int, $offset: Int) {
|
|
39
|
+
listProviderWorkers(providerId: $providerId, limit: $limit, offset: $offset) {
|
|
40
|
+
id providerId workerId name role status metadata workspaceId
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`,D=`
|
|
44
|
+
query KadaikodiListWorkerTasks(
|
|
45
|
+
$workerRefId: String!
|
|
46
|
+
$status: String
|
|
47
|
+
$limit: Int
|
|
48
|
+
$offset: Int
|
|
49
|
+
) {
|
|
50
|
+
listWorkerTasks(
|
|
51
|
+
workerRefId: $workerRefId
|
|
52
|
+
status: $status
|
|
53
|
+
limit: $limit
|
|
54
|
+
offset: $offset
|
|
55
|
+
) {
|
|
56
|
+
id workerRefId title description type status priority orderId
|
|
57
|
+
location dueAt completedAt workspaceId
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`,$=`
|
|
61
|
+
query KadaikodiGetOffering($id: ID!) {
|
|
62
|
+
getOffering(id: $id) {
|
|
63
|
+
id providerId name slug description category kind serviceType
|
|
64
|
+
price originalPrice stock durationMinutes isAvailable tags
|
|
65
|
+
media metadata createdAt updatedAt workspaceId
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`,L=`
|
|
69
|
+
query KadaikodiListOfferings(
|
|
70
|
+
$kind: KadaikodiOfferingKind
|
|
71
|
+
$providerId: String
|
|
72
|
+
$limit: Int
|
|
73
|
+
$offset: Int
|
|
74
|
+
) {
|
|
75
|
+
listOfferings(kind: $kind, providerId: $providerId, limit: $limit, offset: $offset) {
|
|
76
|
+
id providerId name slug category kind serviceType price originalPrice
|
|
77
|
+
stock isAvailable createdAt
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,N=`
|
|
81
|
+
mutation KadaikodiCreateOffering($input: KadaikodiCreateOfferingInput!) {
|
|
82
|
+
createOffering(input: $input) {
|
|
83
|
+
id providerId name slug description category kind serviceType
|
|
84
|
+
price originalPrice stock durationMinutes isAvailable tags createdAt
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,q=`
|
|
88
|
+
mutation KadaikodiUpdateOffering($id: ID!, $input: KadaikodiUpdateOfferingInput!) {
|
|
89
|
+
updateOffering(id: $id, input: $input) {
|
|
90
|
+
id providerId name slug description category kind serviceType
|
|
91
|
+
price originalPrice stock durationMinutes isAvailable tags updatedAt
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`,_=`
|
|
95
|
+
query KadaikodiGetOrder($id: ID!) {
|
|
96
|
+
getOrder(id: $id) {
|
|
97
|
+
id orderNumber customerId providerId status paymentStatus paymentMethod
|
|
98
|
+
fulfillmentType assignedWorkerId subtotal tax deliveryFee discount total
|
|
99
|
+
deliveryAddress notes timeline createdAt updatedAt workspaceId
|
|
100
|
+
items {
|
|
101
|
+
id orderId offeringId name quantity unitPrice totalPrice
|
|
102
|
+
customizations workspaceId
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`,M=`
|
|
107
|
+
query KadaikodiListOrders(
|
|
108
|
+
$customerId: String
|
|
109
|
+
$providerId: String
|
|
110
|
+
$status: KadaikodiOrderStatus
|
|
111
|
+
$limit: Int
|
|
112
|
+
$offset: Int
|
|
113
|
+
) {
|
|
114
|
+
listOrders(
|
|
115
|
+
customerId: $customerId
|
|
116
|
+
providerId: $providerId
|
|
117
|
+
status: $status
|
|
118
|
+
limit: $limit
|
|
119
|
+
offset: $offset
|
|
120
|
+
) {
|
|
121
|
+
id orderNumber customerId providerId status paymentStatus
|
|
122
|
+
fulfillmentType total createdAt
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`,F=`
|
|
126
|
+
mutation KadaikodiPlaceOrder($input: KadaikodiPlaceOrderInput!) {
|
|
127
|
+
placeOrder(input: $input) {
|
|
128
|
+
id orderNumber customerId providerId status paymentStatus
|
|
129
|
+
fulfillmentType subtotal tax deliveryFee discount total createdAt
|
|
130
|
+
items { id name quantity unitPrice totalPrice }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`,W=`
|
|
134
|
+
mutation KadaikodiUpdateOrderStatus($id: ID!, $status: KadaikodiOrderStatus!) {
|
|
135
|
+
updateOrderStatus(id: $id, status: $status) {
|
|
136
|
+
id orderNumber status paymentStatus total updatedAt
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`,U=`
|
|
140
|
+
query KadaikodiListReviews($providerId: String!, $limit: Int, $offset: Int) {
|
|
141
|
+
listReviews(providerId: $providerId, limit: $limit, offset: $offset) {
|
|
142
|
+
id providerId customerId orderId rating review response
|
|
143
|
+
createdAt updatedAt workspaceId
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`,K=`
|
|
147
|
+
mutation KadaikodiCreateReview($input: KadaikodiCreateReviewInput!) {
|
|
148
|
+
createReview(input: $input) {
|
|
149
|
+
id providerId customerId orderId rating review response createdAt
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
`,V=`
|
|
153
|
+
mutation KadaikodiRespondToReview($id: ID!, $response: String!) {
|
|
154
|
+
respondToReview(id: $id, response: $response) {
|
|
155
|
+
id providerId customerId rating review response updatedAt
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`,G=`
|
|
159
|
+
query KadaikodiGetInvestmentOpportunity($id: ID!) {
|
|
160
|
+
getInvestmentOpportunity(id: $id) {
|
|
161
|
+
id providerId title description riskLevel status targetAmount
|
|
162
|
+
raisedAmount minimumInvestment expectedReturnsPct lockInMonths
|
|
163
|
+
businessMetrics terms expiresAt createdAt updatedAt workspaceId
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
`,j=`
|
|
167
|
+
query KadaikodiListInvestmentOpportunities(
|
|
168
|
+
$riskLevel: KadaikodiRiskLevel
|
|
169
|
+
$status: KadaikodiInvestmentStatus
|
|
170
|
+
$limit: Int
|
|
171
|
+
$offset: Int
|
|
172
|
+
) {
|
|
173
|
+
listInvestmentOpportunities(
|
|
174
|
+
riskLevel: $riskLevel
|
|
175
|
+
status: $status
|
|
176
|
+
limit: $limit
|
|
177
|
+
offset: $offset
|
|
178
|
+
) {
|
|
179
|
+
id providerId title riskLevel status targetAmount raisedAmount
|
|
180
|
+
minimumInvestment expectedReturnsPct lockInMonths expiresAt createdAt
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
`,H=`
|
|
184
|
+
query KadaikodiListInvestments($investorId: String!, $limit: Int, $offset: Int) {
|
|
185
|
+
listInvestments(investorId: $investorId, limit: $limit, offset: $offset) {
|
|
186
|
+
id investorId opportunityId amount currentValue realizedReturns
|
|
187
|
+
expectedReturnsPct status investedAt maturedAt workspaceId
|
|
188
|
+
transactions { id investmentId type amount notes createdAt }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
`,J=`
|
|
192
|
+
mutation KadaikodiCreateInvestmentOpportunity(
|
|
193
|
+
$input: KadaikodiCreateInvestmentOpportunityInput!
|
|
194
|
+
) {
|
|
195
|
+
createInvestmentOpportunity(input: $input) {
|
|
196
|
+
id providerId title description riskLevel status targetAmount
|
|
197
|
+
raisedAmount minimumInvestment expectedReturnsPct lockInMonths
|
|
198
|
+
expiresAt createdAt
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`,z=`
|
|
202
|
+
mutation KadaikodiInvest($input: KadaikodiInvestInput!) {
|
|
203
|
+
invest(input: $input) {
|
|
204
|
+
id investorId opportunityId amount currentValue realizedReturns
|
|
205
|
+
expectedReturnsPct status investedAt
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
`,B=`
|
|
209
|
+
query KadaikodiAdminAnalytics {
|
|
210
|
+
kadaikodiAdminAnalytics {
|
|
211
|
+
categoryDistribution customerGrowth orderTrends
|
|
212
|
+
revenueByCategory topProviders
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`,Y=`
|
|
216
|
+
query KadaikodiDashboardStats {
|
|
217
|
+
kadaikodiDashboardStats {
|
|
218
|
+
totalOrders pendingOrders totalRevenue activeProviders
|
|
219
|
+
activeCustomers avgRating
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
`,Q=`
|
|
223
|
+
query KadaikodiHealth {
|
|
224
|
+
kadaikodiHealth
|
|
225
|
+
}
|
|
226
|
+
`;function f(i,n){try{return JSON.parse(n)}catch{throw new c(`--${i} must be valid JSON`)}}function d(i){let n=Number.parseInt(i,10);if(Number.isNaN(n))throw new c(`Expected an integer but got "${i}"`);return n}function g(i){let n=Number.parseFloat(i);if(Number.isNaN(n))throw new c(`Expected a number but got "${i}"`);return n}function X(i){let n=i.command("providers").description("Kadaikodi service providers");n.command("list").description("List service providers").option("--category <c>","Filter by service category").option("--status <s>","Filter by provider status").option("--query <q>","Free-text search").option("--open-only","Only providers currently open").option("--limit <n>","Page size",d,50).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.category&&(t.category=e.category.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.query&&(t.query=e.query),e.openOnly&&(t.openOnly=!0);let r=await a(R,{filter:Object.keys(t).length?t:void 0,limit:e.limit,offset:e.offset});s(e,r.listServiceProviders,{headers:["ID","Name","Category","Status","Rating"],rows:r.listServiceProviders.map(l=>[p(l.id,12),l.name,l.category,l.status,`${l.rating??0} (${l.totalRatings??0})`])});}catch(t){o(t);}}),n.command("get").description("Get a service provider by id").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a(x,{id:e});if(!r.getServiceProvider)throw new c(`Provider ${e} not found`);s(t,r.getServiceProvider);}catch(r){o(r);}}),n.command("create").description("Create a service provider").requiredOption("--owner <id>","Owner user ID").requiredOption("--name <name>","Provider name").requiredOption("--slug <slug>","URL slug").requiredOption("--category <c>","Service category").requiredOption("--location <json>","Location JSON (address/latitude/longitude)").option("--description <s>","Description").option("--offering-type <t>","product|service|both","both").option("--service-types <csv>","Comma-separated service types").option("--business-hours <json>","Business hours JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={ownerId:e.owner,name:e.name,slug:e.slug,category:e.category.toUpperCase(),location:f("location",e.location),offeringType:e.offeringType??"both"};e.description&&(t.description=e.description),e.serviceTypes&&(t.serviceTypes=e.serviceTypes.split(",").map(l=>l.trim())),e.businessHours&&(t.businessHours=f("business-hours",e.businessHours));let r=await a(S,{input:t});m(`Provider created: ${r.kadaikodiCreateServiceProvider.name}`),s(e,r.kadaikodiCreateServiceProvider);}catch(t){o(t);}}),n.command("update").description("Update a service provider").argument("<id>","Provider ID").option("--name <name>","Provider name").option("--description <s>","Description").option("--status <s>","Provider status").option("--location <json>","Location JSON").option("--service-types <csv>","Comma-separated service types").option("--business-hours <json>","Business hours JSON").option("--analytics-snapshot <json>","Analytics snapshot JSON").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.status&&(r.status=t.status.toUpperCase()),t.location&&(r.location=f("location",t.location)),t.serviceTypes&&(r.serviceTypes=t.serviceTypes.split(",").map(w=>w.trim())),t.businessHours&&(r.businessHours=f("business-hours",t.businessHours)),t.analyticsSnapshot&&(r.analyticsSnapshot=f("analytics-snapshot",t.analyticsSnapshot)),!Object.keys(r).length)throw new c("No updates specified");let l=await a(A,{id:e,input:r});m("Provider updated"),s(t,l.kadaikodiUpdateServiceProvider);}catch(r){o(r);}});}function Z(i){i.command("workers").description("Kadaikodi provider workers").command("list").description("List workers for a provider").requiredOption("--provider <id>","Provider ID").option("--limit <n>","Page size",d,50).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(P,{providerId:e.provider,limit:e.limit,offset:e.offset});s(e,t.listProviderWorkers,{headers:["ID","Name","Role","Status","Worker"],rows:t.listProviderWorkers.map(r=>[p(r.id,12),r.name,r.role,r.status,p(r.workerId,12)])});}catch(t){o(t);}});}function ee(i){i.command("tasks").description("Kadaikodi worker tasks").command("list").description("List tasks for a worker").requiredOption("--worker <id>","Worker ref ID").option("--status <s>","Filter by status").option("--limit <n>","Page size",d,50).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(D,{workerRefId:e.worker,status:e.status,limit:e.limit,offset:e.offset});s(e,t.listWorkerTasks,{headers:["ID","Title","Type","Status","Priority","Due"],rows:t.listWorkerTasks.map(r=>[p(r.id,12),r.title,r.type,r.status,r.priority,C(r.dueAt)])});}catch(t){o(t);}});}function te(i){let n=i.command("offerings").description("Kadaikodi offerings (products & services)");n.command("list").description("List offerings").option("--kind <k>","PRODUCT|SERVICE").option("--provider <id>","Filter by provider ID").option("--limit <n>","Page size",d,100).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(L,{kind:e.kind?e.kind.toUpperCase():void 0,providerId:e.provider,limit:e.limit,offset:e.offset});s(e,t.listOfferings,{headers:["ID","Name","Kind","Category","Price","Stock"],rows:t.listOfferings.map(r=>[p(r.id,12),r.name,r.kind,r.category,String(r.price),r.stock!=null?String(r.stock):"-"])});}catch(t){o(t);}}),n.command("get").description("Get an offering by id").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a($,{id:e});if(!r.getOffering)throw new c(`Offering ${e} not found`);s(t,r.getOffering);}catch(r){o(r);}}),n.command("create").description("Create an offering").requiredOption("--provider <id>","Provider ID").requiredOption("--name <name>","Offering name").requiredOption("--slug <slug>","URL slug").requiredOption("--kind <k>","PRODUCT|SERVICE").requiredOption("--category <c>","Service category").requiredOption("--price <n>","Price",g).option("--description <s>","Description").option("--original-price <n>","Original price",g).option("--service-type <s>","Service type").option("--duration-minutes <n>","Duration (minutes)",d).option("--stock <n>","Stock",d).option("--tags <csv>","Comma-separated tags").option("--media <json>","Media JSON").option("--metadata <json>","Metadata JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={providerId:e.provider,name:e.name,slug:e.slug,kind:e.kind.toUpperCase(),category:e.category.toUpperCase(),price:e.price};e.description&&(t.description=e.description),e.originalPrice!==void 0&&(t.originalPrice=e.originalPrice),e.serviceType&&(t.serviceType=e.serviceType),e.durationMinutes!==void 0&&(t.durationMinutes=e.durationMinutes),e.stock!==void 0&&(t.stock=e.stock),e.tags&&(t.tags=e.tags.split(",").map(l=>l.trim())),e.media&&(t.media=f("media",e.media)),e.metadata&&(t.metadata=f("metadata",e.metadata));let r=await a(N,{input:t});m(`Offering created: ${r.createOffering.name}`),s(e,r.createOffering);}catch(t){o(t);}}),n.command("update").description("Update an offering").argument("<id>","Offering ID").option("--name <name>","Offering name").option("--description <s>","Description").option("--price <n>","Price",g).option("--original-price <n>","Original price",g).option("--service-type <s>","Service type").option("--duration-minutes <n>","Duration (minutes)",d).option("--stock <n>","Stock",d).option("--available <bool>","true|false",e=>e==="true").option("--tags <csv>","Comma-separated tags").option("--media <json>","Media JSON").option("--metadata <json>","Metadata JSON").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.price!==void 0&&(r.price=t.price),t.originalPrice!==void 0&&(r.originalPrice=t.originalPrice),t.serviceType&&(r.serviceType=t.serviceType),t.durationMinutes!==void 0&&(r.durationMinutes=t.durationMinutes),t.stock!==void 0&&(r.stock=t.stock),t.available!==void 0&&(r.isAvailable=t.available),t.tags&&(r.tags=t.tags.split(",").map(w=>w.trim())),t.media&&(r.media=f("media",t.media)),t.metadata&&(r.metadata=f("metadata",t.metadata)),!Object.keys(r).length)throw new c("No updates specified");let l=await a(q,{id:e,input:r});m("Offering updated"),s(t,l.updateOffering);}catch(r){o(r);}});}function re(i){let n=i.command("orders").description("Kadaikodi orders");n.command("list").description("List orders").option("--customer <id>","Filter by customer ID").option("--provider <id>","Filter by provider ID").option("--status <s>","Filter by order status").option("--limit <n>","Page size",d,100).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(M,{customerId:e.customer,providerId:e.provider,status:e.status?e.status.toUpperCase():void 0,limit:e.limit,offset:e.offset});s(e,t.listOrders,{headers:["ID","Order #","Status","Payment","Fulfillment","Total"],rows:t.listOrders.map(r=>[p(r.id,12),r.orderNumber,r.status,r.paymentStatus,r.fulfillmentType,String(r.total)])});}catch(t){o(t);}}),n.command("get").description("Get an order by id").argument("<id>","Order ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a(_,{id:e});if(!r.getOrder)throw new c(`Order ${e} not found`);s(t,r.getOrder);}catch(r){o(r);}}),n.command("place").description("Place an order").requiredOption("--customer <id>","Customer ID").requiredOption("--provider <id>","Provider ID").requiredOption("--fulfillment-type <t>","Fulfillment type (e.g. delivery, pickup)").requiredOption("--items <json>","Order items JSON array: [{ name, quantity, unitPrice, offeringId?, customizations? }]").option("--tax <n>","Tax",g).option("--delivery-fee <n>","Delivery fee",g).option("--discount <n>","Discount",g).option("--payment-method <m>","Payment method").option("--delivery-address <json>","Delivery address JSON").option("--notes <s>","Order notes").option("-f, --format <format>","Output format").action(async e=>{try{let t=f("items",e.items);if(!Array.isArray(t)||t.length===0)throw new c("--items must be a non-empty JSON array");let r={customerId:e.customer,providerId:e.provider,fulfillmentType:e.fulfillmentType,items:t};e.tax!==void 0&&(r.tax=e.tax),e.deliveryFee!==void 0&&(r.deliveryFee=e.deliveryFee),e.discount!==void 0&&(r.discount=e.discount),e.paymentMethod&&(r.paymentMethod=e.paymentMethod),e.deliveryAddress&&(r.deliveryAddress=f("delivery-address",e.deliveryAddress)),e.notes&&(r.notes=e.notes);let l=await a(F,{input:r});m(`Order placed: ${l.placeOrder.orderNumber}`),s(e,l.placeOrder);}catch(t){o(t);}}),n.command("set-status").description("Update an order status").argument("<id>","Order ID").requiredOption("--status <s>","PLACED|PENDING|CONFIRMED|PREPARING|READY|OUT_FOR_DELIVERY|DELIVERED|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a(W,{id:e,status:t.status.toUpperCase()});m(`Order status set to ${r.updateOrderStatus.status}`),s(t,r.updateOrderStatus);}catch(r){o(r);}});}function ne(i){let n=i.command("reviews").description("Kadaikodi reviews");n.command("list").description("List reviews for a provider").requiredOption("--provider <id>","Provider ID").option("--limit <n>","Page size",d,100).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(U,{providerId:e.provider,limit:e.limit,offset:e.offset});s(e,t.listReviews,{headers:["ID","Customer","Rating","Review","Responded"],rows:t.listReviews.map(r=>[p(r.id,12),p(r.customerId,12),String(r.rating),p(r.review??"-",30),r.response?"yes":"no"])});}catch(t){o(t);}}),n.command("create").description("Create a review").requiredOption("--provider <id>","Provider ID").requiredOption("--customer <id>","Customer ID").requiredOption("--rating <n>","Rating (1-5)",d).option("--order <id>","Order ID").option("--review <text>","Review text").option("-f, --format <format>","Output format").action(async e=>{try{let t={providerId:e.provider,customerId:e.customer,rating:e.rating};e.order&&(t.orderId=e.order),e.review&&(t.review=e.review);let r=await a(K,{input:t});m("Review created"),s(e,r.createReview);}catch(t){o(t);}}),n.command("respond").description("Respond to a review").argument("<id>","Review ID").requiredOption("--response <text>","Response text").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a(V,{id:e,response:t.response});m("Response saved"),s(t,r.respondToReview);}catch(r){o(r);}});}function ie(i){let n=i.command("investments").description("Kadaikodi investment opportunities & investments");n.command("list-opportunities").description("List investment opportunities").option("--risk-level <r>","LOW|MEDIUM|HIGH").option("--status <s>","DRAFT|ACTIVE|FUNDED|CLOSED").option("--limit <n>","Page size",d,100).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(j,{riskLevel:e.riskLevel?e.riskLevel.toUpperCase():void 0,status:e.status?e.status.toUpperCase():void 0,limit:e.limit,offset:e.offset});s(e,t.listInvestmentOpportunities,{headers:["ID","Title","Risk","Status","Target","Raised","Returns %"],rows:t.listInvestmentOpportunities.map(r=>[p(r.id,12),r.title,r.riskLevel,r.status,String(r.targetAmount),String(r.raisedAmount),String(r.expectedReturnsPct)])});}catch(t){o(t);}}),n.command("get-opportunity").description("Get an investment opportunity by id").argument("<id>","Opportunity ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await a(G,{id:e});if(!r.getInvestmentOpportunity)throw new c(`Investment opportunity ${e} not found`);s(t,r.getInvestmentOpportunity);}catch(r){o(r);}}),n.command("create-opportunity").description("Create an investment opportunity").requiredOption("--provider <id>","Provider ID").requiredOption("--title <t>","Title").requiredOption("--target-amount <n>","Target amount",g).requiredOption("--minimum-investment <n>","Minimum investment",g).requiredOption("--expected-returns-pct <n>","Expected returns %",g).requiredOption("--lock-in-months <n>","Lock-in months",d).option("--risk-level <r>","LOW|MEDIUM|HIGH","MEDIUM").option("--description <s>","Description").option("--expires-at <iso>","Expiry (ISO date)").option("--business-metrics <json>","Business metrics JSON").option("--terms <json>","Terms JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={providerId:e.provider,title:e.title,targetAmount:e.targetAmount,minimumInvestment:e.minimumInvestment,expectedReturnsPct:e.expectedReturnsPct,lockInMonths:e.lockInMonths,riskLevel:(e.riskLevel??"MEDIUM").toUpperCase()};e.description&&(t.description=e.description),e.expiresAt&&(t.expiresAt=e.expiresAt),e.businessMetrics&&(t.businessMetrics=f("business-metrics",e.businessMetrics)),e.terms&&(t.terms=f("terms",e.terms));let r=await a(J,{input:t});m(`Opportunity created: ${r.createInvestmentOpportunity.title}`),s(e,r.createInvestmentOpportunity);}catch(t){o(t);}}),n.command("list").description("List investments for an investor").requiredOption("--investor <id>","Investor ID").option("--limit <n>","Page size",d,100).option("--offset <n>","Offset",d,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(H,{investorId:e.investor,limit:e.limit,offset:e.offset});s(e,t.listInvestments,{headers:["ID","Opportunity","Amount","Current","Returns","Status"],rows:t.listInvestments.map(r=>[p(r.id,12),p(r.opportunityId,12),String(r.amount),String(r.currentValue),String(r.realizedReturns),r.status])});}catch(t){o(t);}}),n.command("invest").description("Invest in an opportunity").requiredOption("--investor <id>","Investor ID").requiredOption("--opportunity <id>","Opportunity ID").requiredOption("--amount <n>","Amount",g).option("-f, --format <format>","Output format").action(async e=>{try{let t={investorId:e.investor,opportunityId:e.opportunity,amount:e.amount},r=await a(z,{input:t});m(`Invested ${r.invest.amount} in ${r.invest.opportunityId}`),s(e,r.invest);}catch(t){o(t);}});}function oe(i){let n=i.command("analytics").description("Kadaikodi analytics & dashboard");n.command("admin").description("Admin analytics (category distribution, growth, revenue, top providers)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(B);s(e,t.kadaikodiAdminAnalytics);}catch(t){o(t);}}),n.command("dashboard").description("Dashboard stats (orders, revenue, providers, customers, rating)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(Y);s(e,t.kadaikodiDashboardStats);}catch(t){o(t);}}),i.command("health").description("Kadaikodi service health check (public)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await h(Q);m(t.kadaikodiHealth),s(e,{health:t.kadaikodiHealth});}catch(t){o(t);}});}var ye={id:"kadaikodi",version:"1.0.0",displayName:"Kadaikodi",dependsOn:["auth","workspaces"],register(i,n){b(n);let e=i.command("kadaikodi").description("Kadaikodi local-services marketplace");X(e),Z(e),ee(e),te(e),re(e),ne(e),ie(e),oe(e);}},sr=ye;module.exports=sr;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import {a as a$1,b as b$1,h as h$1,p,g as g$1,i,o as o$1,d}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var w=`
|
|
2
|
+
query KadaikodiGetServiceProvider($id: ID!) {
|
|
3
|
+
getServiceProvider(id: $id) {
|
|
4
|
+
id ownerId name slug description category status location
|
|
5
|
+
serviceTypes offeringType businessHours rating totalRatings
|
|
6
|
+
averageOrderValue analyticsSnapshot createdAt updatedAt workspaceId
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,S=`
|
|
10
|
+
query KadaikodiListServiceProviders(
|
|
11
|
+
$filter: KadaikodiProviderFilterInput
|
|
12
|
+
$limit: Int
|
|
13
|
+
$offset: Int
|
|
14
|
+
) {
|
|
15
|
+
listServiceProviders(filter: $filter, limit: $limit, offset: $offset) {
|
|
16
|
+
id name slug category status rating totalRatings averageOrderValue
|
|
17
|
+
offeringType ownerId createdAt
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,E=`
|
|
21
|
+
mutation KadaikodiCreateServiceProvider($input: KadaikodiCreateServiceProviderInput!) {
|
|
22
|
+
kadaikodiCreateServiceProvider(input: $input) {
|
|
23
|
+
id ownerId name slug description category status location
|
|
24
|
+
serviceTypes offeringType rating totalRatings createdAt
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`,T=`
|
|
28
|
+
mutation KadaikodiUpdateServiceProvider(
|
|
29
|
+
$id: ID!
|
|
30
|
+
$input: KadaikodiUpdateServiceProviderInput!
|
|
31
|
+
) {
|
|
32
|
+
kadaikodiUpdateServiceProvider(id: $id, input: $input) {
|
|
33
|
+
id name slug description category status location serviceTypes
|
|
34
|
+
offeringType rating totalRatings updatedAt
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`,P=`
|
|
38
|
+
query KadaikodiListProviderWorkers($providerId: String!, $limit: Int, $offset: Int) {
|
|
39
|
+
listProviderWorkers(providerId: $providerId, limit: $limit, offset: $offset) {
|
|
40
|
+
id providerId workerId name role status metadata workspaceId
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`,b=`
|
|
44
|
+
query KadaikodiListWorkerTasks(
|
|
45
|
+
$workerRefId: String!
|
|
46
|
+
$status: String
|
|
47
|
+
$limit: Int
|
|
48
|
+
$offset: Int
|
|
49
|
+
) {
|
|
50
|
+
listWorkerTasks(
|
|
51
|
+
workerRefId: $workerRefId
|
|
52
|
+
status: $status
|
|
53
|
+
limit: $limit
|
|
54
|
+
offset: $offset
|
|
55
|
+
) {
|
|
56
|
+
id workerRefId title description type status priority orderId
|
|
57
|
+
location dueAt completedAt workspaceId
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`,A=`
|
|
61
|
+
query KadaikodiGetOffering($id: ID!) {
|
|
62
|
+
getOffering(id: $id) {
|
|
63
|
+
id providerId name slug description category kind serviceType
|
|
64
|
+
price originalPrice stock durationMinutes isAvailable tags
|
|
65
|
+
media metadata createdAt updatedAt workspaceId
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`,C=`
|
|
69
|
+
query KadaikodiListOfferings(
|
|
70
|
+
$kind: KadaikodiOfferingKind
|
|
71
|
+
$providerId: String
|
|
72
|
+
$limit: Int
|
|
73
|
+
$offset: Int
|
|
74
|
+
) {
|
|
75
|
+
listOfferings(kind: $kind, providerId: $providerId, limit: $limit, offset: $offset) {
|
|
76
|
+
id providerId name slug category kind serviceType price originalPrice
|
|
77
|
+
stock isAvailable createdAt
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,h=`
|
|
81
|
+
mutation KadaikodiCreateOffering($input: KadaikodiCreateOfferingInput!) {
|
|
82
|
+
createOffering(input: $input) {
|
|
83
|
+
id providerId name slug description category kind serviceType
|
|
84
|
+
price originalPrice stock durationMinutes isAvailable tags createdAt
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,D=`
|
|
88
|
+
mutation KadaikodiUpdateOffering($id: ID!, $input: KadaikodiUpdateOfferingInput!) {
|
|
89
|
+
updateOffering(id: $id, input: $input) {
|
|
90
|
+
id providerId name slug description category kind serviceType
|
|
91
|
+
price originalPrice stock durationMinutes isAvailable tags updatedAt
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`,$=`
|
|
95
|
+
query KadaikodiGetOrder($id: ID!) {
|
|
96
|
+
getOrder(id: $id) {
|
|
97
|
+
id orderNumber customerId providerId status paymentStatus paymentMethod
|
|
98
|
+
fulfillmentType assignedWorkerId subtotal tax deliveryFee discount total
|
|
99
|
+
deliveryAddress notes timeline createdAt updatedAt workspaceId
|
|
100
|
+
items {
|
|
101
|
+
id orderId offeringId name quantity unitPrice totalPrice
|
|
102
|
+
customizations workspaceId
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`,N=`
|
|
107
|
+
query KadaikodiListOrders(
|
|
108
|
+
$customerId: String
|
|
109
|
+
$providerId: String
|
|
110
|
+
$status: KadaikodiOrderStatus
|
|
111
|
+
$limit: Int
|
|
112
|
+
$offset: Int
|
|
113
|
+
) {
|
|
114
|
+
listOrders(
|
|
115
|
+
customerId: $customerId
|
|
116
|
+
providerId: $providerId
|
|
117
|
+
status: $status
|
|
118
|
+
limit: $limit
|
|
119
|
+
offset: $offset
|
|
120
|
+
) {
|
|
121
|
+
id orderNumber customerId providerId status paymentStatus
|
|
122
|
+
fulfillmentType total createdAt
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`,L=`
|
|
126
|
+
mutation KadaikodiPlaceOrder($input: KadaikodiPlaceOrderInput!) {
|
|
127
|
+
placeOrder(input: $input) {
|
|
128
|
+
id orderNumber customerId providerId status paymentStatus
|
|
129
|
+
fulfillmentType subtotal tax deliveryFee discount total createdAt
|
|
130
|
+
items { id name quantity unitPrice totalPrice }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`,_=`
|
|
134
|
+
mutation KadaikodiUpdateOrderStatus($id: ID!, $status: KadaikodiOrderStatus!) {
|
|
135
|
+
updateOrderStatus(id: $id, status: $status) {
|
|
136
|
+
id orderNumber status paymentStatus total updatedAt
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`,x=`
|
|
140
|
+
query KadaikodiListReviews($providerId: String!, $limit: Int, $offset: Int) {
|
|
141
|
+
listReviews(providerId: $providerId, limit: $limit, offset: $offset) {
|
|
142
|
+
id providerId customerId orderId rating review response
|
|
143
|
+
createdAt updatedAt workspaceId
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`,K=`
|
|
147
|
+
mutation KadaikodiCreateReview($input: KadaikodiCreateReviewInput!) {
|
|
148
|
+
createReview(input: $input) {
|
|
149
|
+
id providerId customerId orderId rating review response createdAt
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
`,q=`
|
|
153
|
+
mutation KadaikodiRespondToReview($id: ID!, $response: String!) {
|
|
154
|
+
respondToReview(id: $id, response: $response) {
|
|
155
|
+
id providerId customerId rating review response updatedAt
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`,M=`
|
|
159
|
+
query KadaikodiGetInvestmentOpportunity($id: ID!) {
|
|
160
|
+
getInvestmentOpportunity(id: $id) {
|
|
161
|
+
id providerId title description riskLevel status targetAmount
|
|
162
|
+
raisedAmount minimumInvestment expectedReturnsPct lockInMonths
|
|
163
|
+
businessMetrics terms expiresAt createdAt updatedAt workspaceId
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
`,U=`
|
|
167
|
+
query KadaikodiListInvestmentOpportunities(
|
|
168
|
+
$riskLevel: KadaikodiRiskLevel
|
|
169
|
+
$status: KadaikodiInvestmentStatus
|
|
170
|
+
$limit: Int
|
|
171
|
+
$offset: Int
|
|
172
|
+
) {
|
|
173
|
+
listInvestmentOpportunities(
|
|
174
|
+
riskLevel: $riskLevel
|
|
175
|
+
status: $status
|
|
176
|
+
limit: $limit
|
|
177
|
+
offset: $offset
|
|
178
|
+
) {
|
|
179
|
+
id providerId title riskLevel status targetAmount raisedAmount
|
|
180
|
+
minimumInvestment expectedReturnsPct lockInMonths expiresAt createdAt
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
`,V=`
|
|
184
|
+
query KadaikodiListInvestments($investorId: String!, $limit: Int, $offset: Int) {
|
|
185
|
+
listInvestments(investorId: $investorId, limit: $limit, offset: $offset) {
|
|
186
|
+
id investorId opportunityId amount currentValue realizedReturns
|
|
187
|
+
expectedReturnsPct status investedAt maturedAt workspaceId
|
|
188
|
+
transactions { id investmentId type amount notes createdAt }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
`,F=`
|
|
192
|
+
mutation KadaikodiCreateInvestmentOpportunity(
|
|
193
|
+
$input: KadaikodiCreateInvestmentOpportunityInput!
|
|
194
|
+
) {
|
|
195
|
+
createInvestmentOpportunity(input: $input) {
|
|
196
|
+
id providerId title description riskLevel status targetAmount
|
|
197
|
+
raisedAmount minimumInvestment expectedReturnsPct lockInMonths
|
|
198
|
+
expiresAt createdAt
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`,W=`
|
|
202
|
+
mutation KadaikodiInvest($input: KadaikodiInvestInput!) {
|
|
203
|
+
invest(input: $input) {
|
|
204
|
+
id investorId opportunityId amount currentValue realizedReturns
|
|
205
|
+
expectedReturnsPct status investedAt
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
`,G=`
|
|
209
|
+
query KadaikodiAdminAnalytics {
|
|
210
|
+
kadaikodiAdminAnalytics {
|
|
211
|
+
categoryDistribution customerGrowth orderTrends
|
|
212
|
+
revenueByCategory topProviders
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`,H=`
|
|
216
|
+
query KadaikodiDashboardStats {
|
|
217
|
+
kadaikodiDashboardStats {
|
|
218
|
+
totalOrders pendingOrders totalRevenue activeProviders
|
|
219
|
+
activeCustomers avgRating
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
`,J=`
|
|
223
|
+
query KadaikodiHealth {
|
|
224
|
+
kadaikodiHealth
|
|
225
|
+
}
|
|
226
|
+
`;function c(d,r){try{return JSON.parse(r)}catch{throw new o(`--${d} must be valid JSON`)}}function a(d){let r=Number.parseInt(d,10);if(Number.isNaN(r))throw new o(`Expected an integer but got "${d}"`);return r}function g(d){let r=Number.parseFloat(d);if(Number.isNaN(r))throw new o(`Expected a number but got "${d}"`);return r}function j(d){let r=d.command("providers").description("Kadaikodi service providers");r.command("list").description("List service providers").option("--category <c>","Filter by service category").option("--status <s>","Filter by provider status").option("--query <q>","Free-text search").option("--open-only","Only providers currently open").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.category&&(e.category=t.category.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.query&&(e.query=t.query),t.openOnly&&(e.openOnly=!0);let i=await b$1(S,{filter:Object.keys(e).length?e:void 0,limit:t.limit,offset:t.offset});h$1(t,i.listServiceProviders,{headers:["ID","Name","Category","Status","Rating"],rows:i.listServiceProviders.map(u=>[p(u.id,12),u.name,u.category,u.status,`${u.rating??0} (${u.totalRatings??0})`])});}catch(e){g$1(e);}}),r.command("get").description("Get a service provider by id").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i=await b$1(w,{id:t});if(!i.getServiceProvider)throw new o(`Provider ${t} not found`);h$1(e,i.getServiceProvider);}catch(i){g$1(i);}}),r.command("create").description("Create a service provider").requiredOption("--owner <id>","Owner user ID").requiredOption("--name <name>","Provider name").requiredOption("--slug <slug>","URL slug").requiredOption("--category <c>","Service category").requiredOption("--location <json>","Location JSON (address/latitude/longitude)").option("--description <s>","Description").option("--offering-type <t>","product|service|both","both").option("--service-types <csv>","Comma-separated service types").option("--business-hours <json>","Business hours JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={ownerId:t.owner,name:t.name,slug:t.slug,category:t.category.toUpperCase(),location:c("location",t.location),offeringType:t.offeringType??"both"};t.description&&(e.description=t.description),t.serviceTypes&&(e.serviceTypes=t.serviceTypes.split(",").map(u=>u.trim())),t.businessHours&&(e.businessHours=c("business-hours",t.businessHours));let i$1=await b$1(E,{input:e});i(`Provider created: ${i$1.kadaikodiCreateServiceProvider.name}`),h$1(t,i$1.kadaikodiCreateServiceProvider);}catch(e){g$1(e);}}),r.command("update").description("Update a service provider").argument("<id>","Provider ID").option("--name <name>","Provider name").option("--description <s>","Description").option("--status <s>","Provider status").option("--location <json>","Location JSON").option("--service-types <csv>","Comma-separated service types").option("--business-hours <json>","Business hours JSON").option("--analytics-snapshot <json>","Analytics snapshot JSON").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.name&&(i$1.name=e.name),e.description!==void 0&&(i$1.description=e.description),e.status&&(i$1.status=e.status.toUpperCase()),e.location&&(i$1.location=c("location",e.location)),e.serviceTypes&&(i$1.serviceTypes=e.serviceTypes.split(",").map(y=>y.trim())),e.businessHours&&(i$1.businessHours=c("business-hours",e.businessHours)),e.analyticsSnapshot&&(i$1.analyticsSnapshot=c("analytics-snapshot",e.analyticsSnapshot)),!Object.keys(i$1).length)throw new o("No updates specified");let u=await b$1(T,{id:t,input:i$1});i("Provider updated"),h$1(e,u.kadaikodiUpdateServiceProvider);}catch(i){g$1(i);}});}function z(d){d.command("workers").description("Kadaikodi provider workers").command("list").description("List workers for a provider").requiredOption("--provider <id>","Provider ID").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(P,{providerId:t.provider,limit:t.limit,offset:t.offset});h$1(t,e.listProviderWorkers,{headers:["ID","Name","Role","Status","Worker"],rows:e.listProviderWorkers.map(i=>[p(i.id,12),i.name,i.role,i.status,p(i.workerId,12)])});}catch(e){g$1(e);}});}function Y(d){d.command("tasks").description("Kadaikodi worker tasks").command("list").description("List tasks for a worker").requiredOption("--worker <id>","Worker ref ID").option("--status <s>","Filter by status").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(b,{workerRefId:t.worker,status:t.status,limit:t.limit,offset:t.offset});h$1(t,e.listWorkerTasks,{headers:["ID","Title","Type","Status","Priority","Due"],rows:e.listWorkerTasks.map(i=>[p(i.id,12),i.title,i.type,i.status,i.priority,o$1(i.dueAt)])});}catch(e){g$1(e);}});}function B(d){let r=d.command("offerings").description("Kadaikodi offerings (products & services)");r.command("list").description("List offerings").option("--kind <k>","PRODUCT|SERVICE").option("--provider <id>","Filter by provider ID").option("--limit <n>","Page size",a,100).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(C,{kind:t.kind?t.kind.toUpperCase():void 0,providerId:t.provider,limit:t.limit,offset:t.offset});h$1(t,e.listOfferings,{headers:["ID","Name","Kind","Category","Price","Stock"],rows:e.listOfferings.map(i=>[p(i.id,12),i.name,i.kind,i.category,String(i.price),i.stock!=null?String(i.stock):"-"])});}catch(e){g$1(e);}}),r.command("get").description("Get an offering by id").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i=await b$1(A,{id:t});if(!i.getOffering)throw new o(`Offering ${t} not found`);h$1(e,i.getOffering);}catch(i){g$1(i);}}),r.command("create").description("Create an offering").requiredOption("--provider <id>","Provider ID").requiredOption("--name <name>","Offering name").requiredOption("--slug <slug>","URL slug").requiredOption("--kind <k>","PRODUCT|SERVICE").requiredOption("--category <c>","Service category").requiredOption("--price <n>","Price",g).option("--description <s>","Description").option("--original-price <n>","Original price",g).option("--service-type <s>","Service type").option("--duration-minutes <n>","Duration (minutes)",a).option("--stock <n>","Stock",a).option("--tags <csv>","Comma-separated tags").option("--media <json>","Media JSON").option("--metadata <json>","Metadata JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={providerId:t.provider,name:t.name,slug:t.slug,kind:t.kind.toUpperCase(),category:t.category.toUpperCase(),price:t.price};t.description&&(e.description=t.description),t.originalPrice!==void 0&&(e.originalPrice=t.originalPrice),t.serviceType&&(e.serviceType=t.serviceType),t.durationMinutes!==void 0&&(e.durationMinutes=t.durationMinutes),t.stock!==void 0&&(e.stock=t.stock),t.tags&&(e.tags=t.tags.split(",").map(u=>u.trim())),t.media&&(e.media=c("media",t.media)),t.metadata&&(e.metadata=c("metadata",t.metadata));let i$1=await b$1(h,{input:e});i(`Offering created: ${i$1.createOffering.name}`),h$1(t,i$1.createOffering);}catch(e){g$1(e);}}),r.command("update").description("Update an offering").argument("<id>","Offering ID").option("--name <name>","Offering name").option("--description <s>","Description").option("--price <n>","Price",g).option("--original-price <n>","Original price",g).option("--service-type <s>","Service type").option("--duration-minutes <n>","Duration (minutes)",a).option("--stock <n>","Stock",a).option("--available <bool>","true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("--media <json>","Media JSON").option("--metadata <json>","Metadata JSON").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.name&&(i$1.name=e.name),e.description!==void 0&&(i$1.description=e.description),e.price!==void 0&&(i$1.price=e.price),e.originalPrice!==void 0&&(i$1.originalPrice=e.originalPrice),e.serviceType&&(i$1.serviceType=e.serviceType),e.durationMinutes!==void 0&&(i$1.durationMinutes=e.durationMinutes),e.stock!==void 0&&(i$1.stock=e.stock),e.available!==void 0&&(i$1.isAvailable=e.available),e.tags&&(i$1.tags=e.tags.split(",").map(y=>y.trim())),e.media&&(i$1.media=c("media",e.media)),e.metadata&&(i$1.metadata=c("metadata",e.metadata)),!Object.keys(i$1).length)throw new o("No updates specified");let u=await b$1(D,{id:t,input:i$1});i("Offering updated"),h$1(e,u.updateOffering);}catch(i){g$1(i);}});}function Q(d){let r=d.command("orders").description("Kadaikodi orders");r.command("list").description("List orders").option("--customer <id>","Filter by customer ID").option("--provider <id>","Filter by provider ID").option("--status <s>","Filter by order status").option("--limit <n>","Page size",a,100).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(N,{customerId:t.customer,providerId:t.provider,status:t.status?t.status.toUpperCase():void 0,limit:t.limit,offset:t.offset});h$1(t,e.listOrders,{headers:["ID","Order #","Status","Payment","Fulfillment","Total"],rows:e.listOrders.map(i=>[p(i.id,12),i.orderNumber,i.status,i.paymentStatus,i.fulfillmentType,String(i.total)])});}catch(e){g$1(e);}}),r.command("get").description("Get an order by id").argument("<id>","Order ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i=await b$1($,{id:t});if(!i.getOrder)throw new o(`Order ${t} not found`);h$1(e,i.getOrder);}catch(i){g$1(i);}}),r.command("place").description("Place an order").requiredOption("--customer <id>","Customer ID").requiredOption("--provider <id>","Provider ID").requiredOption("--fulfillment-type <t>","Fulfillment type (e.g. delivery, pickup)").requiredOption("--items <json>","Order items JSON array: [{ name, quantity, unitPrice, offeringId?, customizations? }]").option("--tax <n>","Tax",g).option("--delivery-fee <n>","Delivery fee",g).option("--discount <n>","Discount",g).option("--payment-method <m>","Payment method").option("--delivery-address <json>","Delivery address JSON").option("--notes <s>","Order notes").option("-f, --format <format>","Output format").action(async t=>{try{let e=c("items",t.items);if(!Array.isArray(e)||e.length===0)throw new o("--items must be a non-empty JSON array");let i$1={customerId:t.customer,providerId:t.provider,fulfillmentType:t.fulfillmentType,items:e};t.tax!==void 0&&(i$1.tax=t.tax),t.deliveryFee!==void 0&&(i$1.deliveryFee=t.deliveryFee),t.discount!==void 0&&(i$1.discount=t.discount),t.paymentMethod&&(i$1.paymentMethod=t.paymentMethod),t.deliveryAddress&&(i$1.deliveryAddress=c("delivery-address",t.deliveryAddress)),t.notes&&(i$1.notes=t.notes);let u=await b$1(L,{input:i$1});i(`Order placed: ${u.placeOrder.orderNumber}`),h$1(t,u.placeOrder);}catch(e){g$1(e);}}),r.command("set-status").description("Update an order status").argument("<id>","Order ID").requiredOption("--status <s>","PLACED|PENDING|CONFIRMED|PREPARING|READY|OUT_FOR_DELIVERY|DELIVERED|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(_,{id:t,status:e.status.toUpperCase()});i(`Order status set to ${i$1.updateOrderStatus.status}`),h$1(e,i$1.updateOrderStatus);}catch(i){g$1(i);}});}function X(d){let r=d.command("reviews").description("Kadaikodi reviews");r.command("list").description("List reviews for a provider").requiredOption("--provider <id>","Provider ID").option("--limit <n>","Page size",a,100).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(x,{providerId:t.provider,limit:t.limit,offset:t.offset});h$1(t,e.listReviews,{headers:["ID","Customer","Rating","Review","Responded"],rows:e.listReviews.map(i=>[p(i.id,12),p(i.customerId,12),String(i.rating),p(i.review??"-",30),i.response?"yes":"no"])});}catch(e){g$1(e);}}),r.command("create").description("Create a review").requiredOption("--provider <id>","Provider ID").requiredOption("--customer <id>","Customer ID").requiredOption("--rating <n>","Rating (1-5)",a).option("--order <id>","Order ID").option("--review <text>","Review text").option("-f, --format <format>","Output format").action(async t=>{try{let e={providerId:t.provider,customerId:t.customer,rating:t.rating};t.order&&(e.orderId=t.order),t.review&&(e.review=t.review);let i$1=await b$1(K,{input:e});i("Review created"),h$1(t,i$1.createReview);}catch(e){g$1(e);}}),r.command("respond").description("Respond to a review").argument("<id>","Review ID").requiredOption("--response <text>","Response text").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(q,{id:t,response:e.response});i("Response saved"),h$1(e,i$1.respondToReview);}catch(i){g$1(i);}});}function Z(d){let r=d.command("investments").description("Kadaikodi investment opportunities & investments");r.command("list-opportunities").description("List investment opportunities").option("--risk-level <r>","LOW|MEDIUM|HIGH").option("--status <s>","DRAFT|ACTIVE|FUNDED|CLOSED").option("--limit <n>","Page size",a,100).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(U,{riskLevel:t.riskLevel?t.riskLevel.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,limit:t.limit,offset:t.offset});h$1(t,e.listInvestmentOpportunities,{headers:["ID","Title","Risk","Status","Target","Raised","Returns %"],rows:e.listInvestmentOpportunities.map(i=>[p(i.id,12),i.title,i.riskLevel,i.status,String(i.targetAmount),String(i.raisedAmount),String(i.expectedReturnsPct)])});}catch(e){g$1(e);}}),r.command("get-opportunity").description("Get an investment opportunity by id").argument("<id>","Opportunity ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i=await b$1(M,{id:t});if(!i.getInvestmentOpportunity)throw new o(`Investment opportunity ${t} not found`);h$1(e,i.getInvestmentOpportunity);}catch(i){g$1(i);}}),r.command("create-opportunity").description("Create an investment opportunity").requiredOption("--provider <id>","Provider ID").requiredOption("--title <t>","Title").requiredOption("--target-amount <n>","Target amount",g).requiredOption("--minimum-investment <n>","Minimum investment",g).requiredOption("--expected-returns-pct <n>","Expected returns %",g).requiredOption("--lock-in-months <n>","Lock-in months",a).option("--risk-level <r>","LOW|MEDIUM|HIGH","MEDIUM").option("--description <s>","Description").option("--expires-at <iso>","Expiry (ISO date)").option("--business-metrics <json>","Business metrics JSON").option("--terms <json>","Terms JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={providerId:t.provider,title:t.title,targetAmount:t.targetAmount,minimumInvestment:t.minimumInvestment,expectedReturnsPct:t.expectedReturnsPct,lockInMonths:t.lockInMonths,riskLevel:(t.riskLevel??"MEDIUM").toUpperCase()};t.description&&(e.description=t.description),t.expiresAt&&(e.expiresAt=t.expiresAt),t.businessMetrics&&(e.businessMetrics=c("business-metrics",t.businessMetrics)),t.terms&&(e.terms=c("terms",t.terms));let i$1=await b$1(F,{input:e});i(`Opportunity created: ${i$1.createInvestmentOpportunity.title}`),h$1(t,i$1.createInvestmentOpportunity);}catch(e){g$1(e);}}),r.command("list").description("List investments for an investor").requiredOption("--investor <id>","Investor ID").option("--limit <n>","Page size",a,100).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(V,{investorId:t.investor,limit:t.limit,offset:t.offset});h$1(t,e.listInvestments,{headers:["ID","Opportunity","Amount","Current","Returns","Status"],rows:e.listInvestments.map(i=>[p(i.id,12),p(i.opportunityId,12),String(i.amount),String(i.currentValue),String(i.realizedReturns),i.status])});}catch(e){g$1(e);}}),r.command("invest").description("Invest in an opportunity").requiredOption("--investor <id>","Investor ID").requiredOption("--opportunity <id>","Opportunity ID").requiredOption("--amount <n>","Amount",g).option("-f, --format <format>","Output format").action(async t=>{try{let e={investorId:t.investor,opportunityId:t.opportunity,amount:t.amount},i$1=await b$1(W,{input:e});i(`Invested ${i$1.invest.amount} in ${i$1.invest.opportunityId}`),h$1(t,i$1.invest);}catch(e){g$1(e);}});}function tt(d$1){let r=d$1.command("analytics").description("Kadaikodi analytics & dashboard");r.command("admin").description("Admin analytics (category distribution, growth, revenue, top providers)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(G);h$1(t,e.kadaikodiAdminAnalytics);}catch(e){g$1(e);}}),r.command("dashboard").description("Dashboard stats (orders, revenue, providers, customers, rating)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(H);h$1(t,e.kadaikodiDashboardStats);}catch(e){g$1(e);}}),d$1.command("health").description("Kadaikodi service health check (public)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await d(J);i(e.kadaikodiHealth),h$1(t,{health:e.kadaikodiHealth});}catch(e){g$1(e);}});}var et={id:"kadaikodi",version:"1.0.0",displayName:"Kadaikodi",dependsOn:["auth","workspaces"],register(d,r){a$1(r);let t=d.command("kadaikodi").description("Kadaikodi local-services marketplace");j(t),z(t),Y(t),B(t),Q(t),X(t),Z(t),tt(t);}},Ut=et;export{Ut as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,
|
|
1
|
+
import {a,c,h as h$1,p,n,o,g,i,s}from'../../chunk-WXDQ3S5J.js';import'../../chunk-TCBALVP4.js';var h=`
|
|
2
2
|
query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
notifications(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id title message channel status isRead createdAt }
|
|
@@ -23,4 +23,4 @@ import {a,c,g,o,m,n,f,h as h$1,r}from'../../chunk-LZQBJDKZ.js';import'../../chun
|
|
|
23
23
|
id channel enabled frequency
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`;function y(f
|
|
26
|
+
`;function y(f){let n$1=f.command("notifications").description("Notification inbox & preferences");n$1.command("list").description("List the current user's notifications").option("--unread","Only unread").option("--channel <c>","Filter by channel").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.unread&&(t.isRead=!1),e.channel&&(t.channel=e.channel.toUpperCase());let o$1=await c(h,{filter:Object.keys(t).length?t:void 0,limit:e.limit,offset:0});h$1(e,o$1.notifications.items,{headers:["ID","Title","Channel","Status","Read","When"],rows:o$1.notifications.items.map(i=>[p(i.id,12),p(i.title??"-",40),i.channel??"-",n(i.status),String(!!i.isRead),o(i.createdAt)])});}catch(t){g(t);}}),n$1.command("read").description("Mark a notification as read").argument("<id>").action(async e=>{try{await c(O,{id:e}),i("Notification marked read");}catch(t){g(t);}});let p$1=n$1.command("preferences").description("Notification preferences");p$1.command("get").description("Show current user's notification preferences").option("--user <id>","Override user id").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=s().auth.read(),o=e.user??t?.workspaceId??"",i=o?{userId:o}:{},u=await c(R,{filter:Object.keys(i).length?i:void 0,limit:e.limit});h$1(e,u.notificationPreferences.items,{headers:["ID","Channel","Enabled","Frequency","Scope"],rows:u.notificationPreferences.items.map(r=>[p(r.id,12),r.channel,String(r.enabled),r.frequency??"-",r.scope??"-"])});}catch(t){g(t);}}),p$1.command("set").description("Set a notification preference").requiredOption("--channel <c>","EMAIL|SMS|IN_APP|PUSH|WEBHOOK").requiredOption("--enabled <bool>","true or false").option("--frequency <f>","IMMEDIATE|HOURLY|DAILY|WEEKLY","IMMEDIATE").option("--scope <s>","GLOBAL|WORKSPACE|VIBE","GLOBAL").option("--topic <id>").option("--user <id>").action(async e=>{try{let t={channel:e.channel.toUpperCase(),enabled:e.enabled==="true",frequency:(e.frequency??"IMMEDIATE").toUpperCase(),scope:(e.scope??"GLOBAL").toUpperCase(),topicId:e.topic,userId:e.user??s().auth.read()?.workspaceId};await c(A,{input:t}),i("Preference saved");}catch(t){g(t);}});}var P={id:"notifications",version:"1.0.0",displayName:"Notifications",dependsOn:["auth"],register(f,n){a(n),y(f);}},x=P;export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,
|
|
1
|
+
import {a,c,h,p,n,o,g,i}from'../../chunk-WXDQ3S5J.js';import'../../chunk-TCBALVP4.js';var f=`
|
|
2
2
|
query MyOrganizations($limit: Int, $offset: Int) {
|
|
3
3
|
myOrganizations(limit: $limit, offset: $offset) {
|
|
4
4
|
items {
|
|
@@ -50,4 +50,4 @@ import {a,c,g,o,m,n,f as f$1,h}from'../../chunk-LZQBJDKZ.js';import'../../chunk-
|
|
|
50
50
|
respondedAt
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
`;function y(r){let s=r.command("organizations").description("Organization membership & invites");s.command("list").description("List organizations the current user is a member of").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>","Output format").action(async t=>{try{let i=await c(f,{limit:t.limit,offset:0});
|
|
53
|
+
`;function y(r){let s=r.command("organizations").description("Organization membership & invites");s.command("list").description("List organizations the current user is a member of").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>","Output format").action(async t=>{try{let i=await c(f,{limit:t.limit,offset:0});h(t,i.myOrganizations.items,{headers:["ID","Name","Slug","TenantID","Status","Created"],rows:i.myOrganizations.items.map(n$1=>[p(n$1.id,12),n$1.name,n$1.slug,p(n$1.tenantId,12),n(n$1.status),o(n$1.createdAt)])});}catch(i){g(i);}});let m=s.command("invites").description("Manage org invites");m.command("list").description("List pending org invites for the current user").option("--status <s>","Filter by invite status","PENDING").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>","Output format").action(async t=>{try{let i=await c(O,{status:t.status?.toUpperCase(),limit:t.limit,offset:0});h(t,i.myOrganizationInvites.items,{headers:["InviteID","OrgID","Email","Role","Status","Expires"],rows:i.myOrganizationInvites.items.map(n$1=>[p(n$1.id,12),p(n$1.organizationId,12),n$1.email,n$1.role,n(n$1.status),o(n$1.expiresAt)])});}catch(i){g(i);}}),m.command("accept").description("Accept an organization invite").argument("<inviteId>").action(async t=>{try{await c(z,{inviteId:t}),i("Invite accepted");}catch(i){g(i);}}),m.command("decline").description("Decline an organization invite").argument("<inviteId>").action(async t=>{try{await c(v,{inviteId:t}),i("Invite declined");}catch(i){g(i);}});}var C={id:"organizations",version:"1.0.0",displayName:"Organizations",dependsOn:["auth"],register(r,s){a(s),y(r);}},_=C;export{_ as default};
|