From 3eecae2c89c0f16d21e4cabcfba8bf33959a7a56 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 12 Jan 2024 14:51:14 -0800 Subject: [PATCH] feat: Update OpenSDKs dependencies --- connectors/connector-apollo/index.ts | 1 + connectors/connector-apollo/package.json | 4 +- connectors/connector-apollo/server.ts | 18 +---- connectors/connector-outreach/package.json | 4 +- connectors/connector-outreach/server.ts | 17 +---- connectors/connector-plaid/package.json | 2 +- connectors/connector-qbo/package.json | 2 +- connectors/connector-salesloft/package.json | 4 +- connectors/connector-salesloft/server.ts | 17 +---- docs/package.json | 2 +- docs/samples/sales-engagement-test.ts | 4 +- kits/cdk/package.json | 2 +- packages/engine-backend/package.json | 2 +- pnpm-lock.yaml | 74 +++++++++---------- .../adapters/apollo-adapter.ts | 4 +- 15 files changed, 63 insertions(+), 94 deletions(-) diff --git a/connectors/connector-apollo/index.ts b/connectors/connector-apollo/index.ts index 81f31bd7..89457d94 100644 --- a/connectors/connector-apollo/index.ts +++ b/connectors/connector-apollo/index.ts @@ -2,3 +2,4 @@ export * from './def' export * from './server' // codegen:end +export * from '@opensdks/sdk-apollo' diff --git a/connectors/connector-apollo/package.json b/connectors/connector-apollo/package.json index 06215824..3a80290c 100644 --- a/connectors/connector-apollo/package.json +++ b/connectors/connector-apollo/package.json @@ -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:*" }, diff --git a/connectors/connector-apollo/server.ts b/connectors/connector-apollo/server.ts index 5f3382c2..cf8f6cab 100644 --- a/connectors/connector-apollo/server.ts +++ b/connectors/connector-apollo/server.ts @@ -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 - export const apolloServer = { newInstance: (opts) => - initApolloSdk({ + initApolloSDK({ api_key: opts.settings.api_key, links: (defaultLinks) => [...opts.fetchLinks, ...defaultLinks], }), @@ -51,6 +41,6 @@ export const apolloServer = { Rx.mergeMap((ops) => rxjs.from([...ops, apolloHelpers._op('commit')])), ) }, -} satisfies ConnectorServer +} satisfies ConnectorServer export default apolloServer diff --git a/connectors/connector-outreach/package.json b/connectors/connector-outreach/package.json index eaf7c5a7..99ecef26 100644 --- a/connectors/connector-outreach/package.json +++ b/connectors/connector-outreach/package.json @@ -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:*" }, diff --git a/connectors/connector-outreach/server.ts b/connectors/connector-outreach/server.ts index 41ac293d..a2859d3b 100644 --- a/connectors/connector-outreach/server.ts +++ b/connectors/connector-outreach/server.ts @@ -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 - export const outreachServer = { newInstance: ({settings, fetchLinks}) => { const qbo = initOutreachSDK({ @@ -41,9 +33,6 @@ export const outreachServer = { params: {query: input.query}, body: JSON.stringify(input.body), }), -} satisfies ConnectorServer< - typeof outreachSchemas, - ReturnType -> +} satisfies ConnectorServer export default outreachServer diff --git a/connectors/connector-plaid/package.json b/connectors/connector-plaid/package.json index 29f62570..b88fcb34 100644 --- a/connectors/connector-plaid/package.json +++ b/connectors/connector-plaid/package.json @@ -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:*", diff --git a/connectors/connector-qbo/package.json b/connectors/connector-qbo/package.json index 2cb8582f..7c56c860 100644 --- a/connectors/connector-qbo/package.json +++ b/connectors/connector-qbo/package.json @@ -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:*" diff --git a/connectors/connector-salesloft/package.json b/connectors/connector-salesloft/package.json index 6a651042..f3f7af2d 100644 --- a/connectors/connector-salesloft/package.json +++ b/connectors/connector-salesloft/package.json @@ -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:*" }, diff --git a/connectors/connector-salesloft/server.ts b/connectors/connector-salesloft/server.ts index 5482c216..5ef5a21f 100644 --- a/connectors/connector-salesloft/server.ts +++ b/connectors/connector-salesloft/server.ts @@ -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 - export const salesloftServer = { newInstance: ({settings, fetchLinks}) => { const qbo = initSalesloftSDK({ @@ -41,9 +33,6 @@ export const salesloftServer = { params: {query: input.query}, body: JSON.stringify(input.body), }), -} satisfies ConnectorServer< - typeof salesloftSchemas, - ReturnType -> +} satisfies ConnectorServer export default salesloftServer diff --git a/docs/package.json b/docs/package.json index 629fb080..514f2f27 100644 --- a/docs/package.json +++ b/docs/package.json @@ -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", diff --git a/docs/samples/sales-engagement-test.ts b/docs/samples/sales-engagement-test.ts index f8b7b0b2..ad061e39 100644 --- a/docs/samples/sales-engagement-test.ts +++ b/docs/samples/sales-engagement-test.ts @@ -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) => { diff --git a/kits/cdk/package.json b/kits/cdk/package.json index 48c3d50c..dae5d703 100644 --- a/kits/cdk/package.json +++ b/kits/cdk/package.json @@ -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:*", diff --git a/packages/engine-backend/package.json b/packages/engine-backend/package.json index d04ebea2..5bcc307e 100644 --- a/packages/engine-backend/package.json +++ b/packages/engine-backend/package.json @@ -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" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aba3db6c..f0f1b446 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -692,11 +692,11 @@ importers: connectors/connector-apollo: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-apollo': - specifier: ^0.0.17 - version: 0.0.17 + specifier: ^0.0.18 + version: 0.0.18 '@usevenice/cdk': specifier: workspace:* version: link:../../kits/cdk @@ -925,11 +925,11 @@ importers: connectors/connector-outreach: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-outreach': - specifier: 0.0.14 - version: 0.0.14 + specifier: 0.0.15 + version: 0.0.15 '@usevenice/cdk': specifier: workspace:* version: link:../../kits/cdk @@ -940,8 +940,8 @@ importers: connectors/connector-plaid: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-plaid': specifier: ^0.0.14 version: 0.0.14 @@ -1011,8 +1011,8 @@ importers: connectors/connector-qbo: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-qbo': specifier: ^0.0.14 version: 0.0.14 @@ -1035,11 +1035,11 @@ importers: connectors/connector-salesloft: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-salesloft': - specifier: 0.0.15 - version: 0.0.15 + specifier: 0.0.16 + version: 0.0.16 '@usevenice/cdk': specifier: workspace:* version: link:../../kits/cdk @@ -1189,8 +1189,8 @@ importers: specifier: ^3.0.64 version: 3.0.64(openapi-types@12.1.0)(typescript@5.0.4) '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@opensdks/sdk-discord': specifier: ^0.0.14 version: 0.0.14 @@ -1202,7 +1202,7 @@ importers: version: 0.0.14 '@opensdks/sdk-venice': specifier: ^0.0.14 - version: 0.0.14(@opensdks/runtime@0.0.14) + version: 0.0.14(@opensdks/runtime@0.0.16) '@usevenice/sdk': specifier: workspace:* version: link:../kits/sdk @@ -1213,8 +1213,8 @@ importers: kits/cdk: dependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@trpc/server': specifier: 10.40.0 version: 10.40.0 @@ -1325,8 +1325,8 @@ importers: version: 2.11.0(zod@3.21.4) devDependencies: '@opensdks/runtime': - specifier: ^0.0.14 - version: 0.0.14 + specifier: ^0.0.16 + version: 0.0.16 '@usevenice/trpc-openapi': specifier: 1.3.8 version: 1.3.8(@trpc/server@10.40.0)(zod@3.21.4) @@ -4665,23 +4665,23 @@ packages: '@octokit/openapi-types': 18.1.1 dev: true - /@opensdks/fetch-links@0.0.14: - resolution: {integrity: sha512-WxrUtSLvdH60x1ZyTv4UUHbIcBH8Wkfge30rEX4HQtjX4rRNnc+U3kU5/PSvrQgwKiIM16N29zM7z2Bz0Sb1LA==} - /@opensdks/fetch-links@0.0.16: resolution: {integrity: sha512-q+wmJWdQ/gn0DehhQBG3Vipt0PuqEitEeEfR/oK0CsdWaGZnYLI70GAdmSRfUQhXJtqfC+gFC1F1egOmPBByhA==} dev: false - /@opensdks/runtime@0.0.14: - resolution: {integrity: sha512-uvX9JbsO+RbR2/OZvIFrh+lI8PfZQqIOYPWd46JJQcTo0aUCK7DUu/YZC5dFfIRPXq2TGsrfF8q2RbUYDIfnSg==} + /@opensdks/fetch-links@0.0.17: + resolution: {integrity: sha512-BUomrnpFtlu085W1wOY0k52Kf6qkJwBDifQxFoSHkfjyjS81AkpOTPsBTYS5HffAXS8rgoBBJF+7fu2NSYipFw==} + + /@opensdks/runtime@0.0.16: + resolution: {integrity: sha512-aCRhxlWr2e+hB38quP2tLkaPGZNPMV9rBE+IoTwDoHS4mql2dyn7HvxRYisoU3XmdaMCLvbf8+H/7Nrj02tMpg==} dependencies: - '@opensdks/fetch-links': 0.0.14 + '@opensdks/fetch-links': 0.0.17 openapi-fetch: 0.8.1 openapi-typescript-helpers: 0.0.4 openapi3-ts: 4.1.2 - /@opensdks/sdk-apollo@0.0.17: - resolution: {integrity: sha512-S1PAAPZd5Z6gH781+OZmkw48gKEajg9UlYEOvaHSXRlfuZi/w5kl7Sg5yFDHZr8NLEl3l1c0EkpF4YsiVBD8HA==} + /@opensdks/sdk-apollo@0.0.18: + resolution: {integrity: sha512-i2rps56eTt22cM1pwbVyTVlZtpjP65T3jMJhX2rKO2CiHd7+QoI3+hT+ko6dCIsi6STPnoM+IIJhmyQZjJIktA==} dev: false /@opensdks/sdk-discord@0.0.14: @@ -4691,8 +4691,8 @@ packages: resolution: {integrity: sha512-QqLiT2LAZnHZc5pyGNRyhBsk87QfDYUwAi3zE3VhGQSLnT88KiZ+TOpIJIyM1zqcQIlXPIy98H/DSWSWufDDQA==} dev: true - /@opensdks/sdk-outreach@0.0.14: - resolution: {integrity: sha512-UmHptoaIYmVGAfKmZOvb++A3/iOchFVS1fK/mviupOUMvm52sc0yqOTgutnAzU9iq6odP7Igm67CCV7cLfJvzQ==} + /@opensdks/sdk-outreach@0.0.15: + resolution: {integrity: sha512-X3HsfDHFs3VFi6xn3EZ75b6WoKL0geVIj+00MuypAgilbbecfrtNlslfMHD/KHQgfZPo+n92ipECJfO5XbtYsg==} dev: false /@opensdks/sdk-plaid@0.0.14: @@ -4707,20 +4707,20 @@ packages: resolution: {integrity: sha512-zmOzVWcitonWc8uGyST4zFDjg93KZnB5vk8aPggizcB9+1xeNZ3bc7AqUqFA3uJRip8MT5SklIl5L5f8AG7PYA==} dev: false - /@opensdks/sdk-salesloft@0.0.15: - resolution: {integrity: sha512-/G26fC6TVkvCli3x/NdEjUcMufY6cgBYFX9it5lujNNfhEmA99cHLHDpPyZGhlA+W6zVZRQgqQ/Y7nIk5EdQ7w==} + /@opensdks/sdk-salesloft@0.0.16: + resolution: {integrity: sha512-G59x1L+XdFyw4SNJP2hQFYd6Iw6lSHskCl3ZPpFmTzCahFS48a3HwNpOsl3lk+c29Cr7ZXVEiq8pmpLzHR7CHQ==} dev: false /@opensdks/sdk-slack@0.0.14: resolution: {integrity: sha512-//w9OelCjMc+wwCU12JD26cHxDp4RAwIcD246Lf+r0kRY9uMPiczgEnsdwN+5sy/4TP+JRRKyc14L3591Qr4fA==} dev: true - /@opensdks/sdk-venice@0.0.14(@opensdks/runtime@0.0.14): + /@opensdks/sdk-venice@0.0.14(@opensdks/runtime@0.0.16): resolution: {integrity: sha512-mGbUqCrqsh5kGxI2gpjCCeqPCbYF0KMyB5Cc8xmcwursZIMFOxMZTYerlYYS0Ht5tRa/WltOuQJTgqUPYmimxg==} peerDependencies: '@opensdks/runtime': 0.0.14 dependencies: - '@opensdks/runtime': 0.0.14 + '@opensdks/runtime': 0.0.16 dev: true /@panva/asn1.js@1.0.0: diff --git a/verticals/vertical-sales-engagement/adapters/apollo-adapter.ts b/verticals/vertical-sales-engagement/adapters/apollo-adapter.ts index 5314e68e..92705c1d 100644 --- a/verticals/vertical-sales-engagement/adapters/apollo-adapter.ts +++ b/verticals/vertical-sales-engagement/adapters/apollo-adapter.ts @@ -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' @@ -26,4 +26,4 @@ export const apolloAdapter = { items: res.data.contacts.map(mappers.contact), } }, -} satisfies VerticalSalesEngagement<{instance: ApolloSdk}> +} satisfies VerticalSalesEngagement<{instance: ApolloSDK}>