Skip to content

Commit

Permalink
feat: Update OpenSDKs dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Jan 12, 2024
1 parent 015ffc1 commit 3eecae2
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 94 deletions.
1 change: 1 addition & 0 deletions connectors/connector-apollo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
export * from './def'
export * from './server'
// codegen:end
export * from '@opensdks/sdk-apollo'
4 changes: 2 additions & 2 deletions connectors/connector-apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"module": "./index.ts",
"scripts": {},
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/sdk-apollo": "^0.0.17",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-apollo": "^0.0.18",
"@usevenice/cdk": "workspace:*",
"@usevenice/util": "workspace:*"
},
Expand Down
18 changes: 4 additions & 14 deletions connectors/connector-apollo/server.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import {initSDK} from '@opensdks/runtime'
import type {ApolloSDKTypes} from '@opensdks/sdk-apollo'
import {apolloSdkDef} from '@opensdks/sdk-apollo'
import type {ApolloSDK} from '@opensdks/sdk-apollo'
import {initApolloSDK} from '@opensdks/sdk-apollo'
import type {ConnectorServer} from '@usevenice/cdk'
import {Rx, rxjs} from '@usevenice/util'
import type {apolloSchemas} from './def'
import {APOLLO_ENTITY_NAME, apolloHelpers} from './def'

export {ApolloSDKTypes}

function initApolloSdk(options: ApolloSDKTypes['options']) {
const sdk = initSDK(apolloSdkDef, options)
return {...sdk, options}
}

export type ApolloSdk = ReturnType<typeof initApolloSdk>

export const apolloServer = {
newInstance: (opts) =>
initApolloSdk({
initApolloSDK({
api_key: opts.settings.api_key,
links: (defaultLinks) => [...opts.fetchLinks, ...defaultLinks],
}),
Expand Down Expand Up @@ -51,6 +41,6 @@ export const apolloServer = {
Rx.mergeMap((ops) => rxjs.from([...ops, apolloHelpers._op('commit')])),
)
},
} satisfies ConnectorServer<typeof apolloSchemas, ApolloSdk>
} satisfies ConnectorServer<typeof apolloSchemas, ApolloSDK>

export default apolloServer
4 changes: 2 additions & 2 deletions connectors/connector-outreach/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/sdk-outreach": "0.0.14",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-outreach": "0.0.15",
"@usevenice/cdk": "workspace:*",
"@usevenice/util": "workspace:*"
},
Expand Down
17 changes: 3 additions & 14 deletions connectors/connector-outreach/server.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import {initSDK} from '@opensdks/runtime'
import type {OutreachSDKTypes} from '@opensdks/sdk-outreach'
import {outreachSdkDef} from '@opensdks/sdk-outreach'
import type {OutreachSDK} from '@opensdks/sdk-outreach'
import {initOutreachSDK} from '@opensdks/sdk-outreach'
import type {ConnectorServer} from '@usevenice/cdk'
import {nangoProxyLink} from '@usevenice/cdk'
import type {outreachSchemas} from './def'

function initOutreachSDK(options: OutreachSDKTypes['options']) {
const sdk = initSDK(outreachSdkDef, options)
return {...sdk, options}
}

export type OutreachSDK = ReturnType<typeof initOutreachSDK>

export const outreachServer = {
newInstance: ({settings, fetchLinks}) => {
const qbo = initOutreachSDK({
Expand Down Expand Up @@ -41,9 +33,6 @@ export const outreachServer = {
params: {query: input.query},
body: JSON.stringify(input.body),
}),
} satisfies ConnectorServer<
typeof outreachSchemas,
ReturnType<typeof initOutreachSDK>
>
} satisfies ConnectorServer<typeof outreachSchemas, OutreachSDK>

export default outreachServer
2 changes: 1 addition & 1 deletion connectors/connector-plaid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-plaid": "^0.0.14",
"@t3-oss/env-core": "0.7.1",
"@usevenice/cdk": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion connectors/connector-qbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-qbo": "^0.0.14",
"@usevenice/cdk": "workspace:*",
"@usevenice/util": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions connectors/connector-salesloft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/sdk-salesloft": "0.0.15",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-salesloft": "0.0.16",
"@usevenice/cdk": "workspace:*",
"@usevenice/util": "workspace:*"
},
Expand Down
17 changes: 3 additions & 14 deletions connectors/connector-salesloft/server.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import {initSDK} from '@opensdks/runtime'
import type {SalesloftSDKTypes} from '@opensdks/sdk-salesloft'
import {salesloftSdkDef} from '@opensdks/sdk-salesloft'
import type {SalesloftSDK} from '@opensdks/sdk-salesloft'
import {initSalesloftSDK} from '@opensdks/sdk-salesloft'
import type {ConnectorServer} from '@usevenice/cdk'
import {nangoProxyLink} from '@usevenice/cdk'
import type {salesloftSchemas} from './def'

function initSalesloftSDK(options: SalesloftSDKTypes['options']) {
const sdk = initSDK(salesloftSdkDef, options)
return {...sdk, options}
}

export type SalesloftSDK = ReturnType<typeof initSalesloftSDK>

export const salesloftServer = {
newInstance: ({settings, fetchLinks}) => {
const qbo = initSalesloftSDK({
Expand Down Expand Up @@ -41,9 +33,6 @@ export const salesloftServer = {
params: {query: input.query},
body: JSON.stringify(input.body),
}),
} satisfies ConnectorServer<
typeof salesloftSchemas,
ReturnType<typeof initSalesloftSDK>
>
} satisfies ConnectorServer<typeof salesloftSchemas, SalesloftSDK>

export default salesloftServer
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"devDependencies": {
"@mintlify/scraping": "^3.0.64",
"@opensdks/runtime": "^0.0.14",
"@opensdks/runtime": "^0.0.16",
"@opensdks/sdk-discord": "^0.0.14",
"@opensdks/sdk-openai": "^0.0.14",
"@opensdks/sdk-slack": "^0.0.14",
Expand Down
4 changes: 2 additions & 2 deletions docs/samples/sales-engagement-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {createVeniceClient} from '@usevenice/sdk'
const venice = createVeniceClient({
apiKey: process.env['_VENICE_API_KEY'],
apiHost: process.env['_VENICE_API_HOST'],
// resourceId: process.env['_APOLLO_RESOURCE_ID'],
resourceId: process.env['_APOLLO_RESOURCE_ID'],
// resourceId: process.env['_OUTREACH_RESOURCE_ID'],
resourceId: process.env['_SALESLOFT_RESOURCE_ID'],
// resourceId: process.env['_SALESLOFT_RESOURCE_ID'],
})

void venice.GET('/verticals/sales-engagement/contacts').then((r) => {
Expand Down
2 changes: 1 addition & 1 deletion kits/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sideEffects": false,
"module": "./index.ts",
"dependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/runtime": "^0.0.16",
"@trpc/server": "10.40.0",
"@usevenice/util": "workspace:*",
"@usevenice/zod": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"zod-openapi": "2.11.0"
},
"devDependencies": {
"@opensdks/runtime": "^0.0.14",
"@opensdks/runtime": "^0.0.16",
"@usevenice/trpc-openapi": "1.3.8"
}
}
74 changes: 37 additions & 37 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {ApolloSdk, ApolloSDKTypes} from '@usevenice/connector-apollo'
import type {ApolloSDK, ApolloSDKTypes} from '@usevenice/connector-apollo'
import type {StrictObj} from '@usevenice/vdk'
import {mapper, zCast} from '@usevenice/vdk'
import type {VerticalSalesEngagement} from '../sales-engagement'
Expand Down Expand Up @@ -26,4 +26,4 @@ export const apolloAdapter = {
items: res.data.contacts.map(mappers.contact),
}
},
} satisfies VerticalSalesEngagement<{instance: ApolloSdk}>
} satisfies VerticalSalesEngagement<{instance: ApolloSDK}>

0 comments on commit 3eecae2

Please sign in to comment.