Skip to content

Commit

Permalink
feat: Allow more params for resource create and update
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Dec 19, 2023
1 parent 2668268 commit 575bda4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/engine-backend/router/resourceRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,17 @@ export const resourceRouter = trpc.router({
}),
createResource: protectedProcedure
.meta({openapi: {method: 'POST', path: '/core/resource', tags}})
.input(zRaw.resource.pick({connectorConfigId: true, settings: true}))
.input(
zRaw.resource.pick({
connectorConfigId: true,
settings: true,
displayName: true,
endUserId: true,
disabled: true,
metadata: true,
integrationId: true,
}),
)
// Questionable why `zConnectContextInput` should be there. Examine whether this is actually
// needed
// How do we verify that the userId here is the same as the userId from preConnectOption?
Expand Down Expand Up @@ -123,6 +133,10 @@ export const resourceRouter = trpc.router({
settings: true,
displayName: true,
metadata: true,
disabled: true,
// Not sure if we should allow these two?
endUserId: true,
integrationId: true,
}),
)
.output(zRaw.resource)
Expand Down

1 comment on commit 575bda4

@vercel
Copy link

@vercel vercel bot commented on 575bda4 Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

venice – ./

usevenice.vercel.app
venice-git-production-venice.vercel.app
venice-venice.vercel.app
app.venice.is

Please sign in to comment.