Skip to content

Commit

Permalink
chore: update api paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Nov 26, 2023
1 parent 7ab9379 commit 9991dd2
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 55 deletions.
8 changes: 4 additions & 4 deletions kits/sdk/venice.oas.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 28 additions & 28 deletions kits/sdk/venice.oas.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/engine-backend/router/connectorConfigRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {adminProcedure, protectedProcedure, trpc} from './_base'

export {type inferProcedureInput} from '@trpc/server'

const tags = ['Connector Configs']
const tags = ['Core']

export const connectorConfigRouter = trpc.router({
adminListConnectorConfigs: adminProcedure
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-backend/router/connectorRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const connectorRouter = trpc.router({
method: 'GET',
path: '/connector',
tags,
summary: 'Get catalog of all available connectors',
description: 'Get catalog of all available connectors',
},
})
.input(z.object({includeOas: z.boolean().optional()}).optional())
Expand Down
4 changes: 2 additions & 2 deletions packages/engine-backend/router/endUserRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const tags = ['Connect']
/** TODO: Modify this so that admin user can execute it... not just endUser */
export const endUserRouter = trpc.router({
createConnectToken: protectedProcedure
.meta({openapi: {method: 'POST', path: '/core/connect-token', tags}})
.meta({openapi: {method: 'POST', path: '/connect/token', tags}})
.input(endUserRouterSchema.createConnectToken.input)
.output(z.object({token: z.string()}))
.mutation(({input: {validityInSeconds, ...input}, ctx}) => ({
Expand All @@ -121,7 +121,7 @@ export const endUserRouter = trpc.router({
}),
})),
createMagicLink: protectedProcedure
.meta({openapi: {method: 'POST', path: '/core/magic-link', tags}})
.meta({openapi: {method: 'POST', path: '/connect/magic-link', tags}})
.input(endUserRouterSchema.createMagicLink.input)
.output(z.object({url: z.string()}))
.mutation(({input: {endUserId, validityInSeconds, ...params}, ctx}) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-backend/router/pipelineRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {zListParams} from './_schemas'

export {type inferProcedureInput} from '@trpc/server'

const tags = ['Pipeline']
const tags = ['Core']

export const pipelineRouter = trpc.router({
listPipelines: protectedProcedure
Expand Down
6 changes: 4 additions & 2 deletions packages/engine-backend/router/resourceRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ import {zListParams} from './_schemas'

export {type inferProcedureInput} from '@trpc/server'

const tags = ['Resource']
const tags = ['Core']

export const resourceRouter = trpc.router({
// TODO: maybe we should allow resourceId to be part of the path rather than only in the headers

// Should this really be part of the resource router? or left elsewhere?
passthrough: remoteProcedure
.meta({openapi: {method: 'POST', path: '/core/passthrough', tags}}) // Where do we put this?
.meta({openapi: {method: 'POST', path: '/passthrough', tags: ['Internal']}}) // Where do we put this?
.input(zPassthroughInput)
.output(z.any())
.mutation(async ({input, ctx}) => {
Expand Down
14 changes: 7 additions & 7 deletions verticals/vertical-accounting/accounting.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type {MaybePromise} from '@usevenice/util'
import {objectEntries, R, startCase} from '@usevenice/util'
import {objectEntries, R} from '@usevenice/util'
import type {
PaginatedOutput,
Pagination,
VerticalRouterOpts,
} from '@usevenice/vdk'
import {
paginatedOutput,
proxyListRemoteRedux,
z,
zPaginationParams,
} from '@usevenice/vdk'
import type {
PaginatedOutput,
Pagination,
VerticalRouterOpts,
} from '@usevenice/vdk'
import type {
ConnectorSchemas,
ConnHelpers,
Expand Down Expand Up @@ -80,7 +80,7 @@ export function createAccountingRouter(opts: VerticalRouterOpts) {
openapi: {
method: 'GET',
path: `/verticals/${vertical}/${entityName}`,
tags: [`Verticals/${startCase(vertical)}`],
tags: ['Verticals'],
},
})
.input(zPaginationParams.nullish())
Expand Down
Loading

0 comments on commit 9991dd2

Please sign in to comment.