From 8fae867e64b155325e4a1794dbc48f80970e82f4 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 19 Apr 2024 08:43:24 -0700 Subject: [PATCH] chore: Remove vdk2 and replace vdk --- {new-pattern/vdk2 => kits/vdk}/deprecated.ts | 0 {new-pattern/vdk2 => kits/vdk}/errors.ts | 0 kits/vdk/index.ts | 53 ++++++++- {new-pattern/vdk2 => kits/vdk}/mapper.spec.ts | 0 {new-pattern/vdk2 => kits/vdk}/mapper.ts | 0 .../vdk2 => kits/vdk}/nangoProxyLink.spec.ts | 0 .../vdk2 => kits/vdk}/nangoProxyLink.ts | 0 kits/vdk/package.json | 18 ++- {new-pattern/vdk2 => kits/vdk}/pagination.ts | 0 {new-pattern/vdk2 => kits/vdk}/provider.ts | 0 .../vdk}/supaglueProxyLink.spec.ts | 0 .../vdk2 => kits/vdk}/supaglueProxyLink.ts | 0 {new-pattern/vdk2 => kits/vdk}/trpc.ts | 0 .../vdk2 => kits/vdk}/type-utils/PathsOf.ts | 0 .../vdk2 => kits/vdk}/type-utils/StrictObj.ts | 0 new-pattern/api/appRouter.ts | 2 +- new-pattern/api/createContext.ts | 2 +- new-pattern/api/index.ts | 4 +- new-pattern/api/package.json | 2 +- new-pattern/db/package.json | 2 +- new-pattern/db/schema.ts | 2 +- new-pattern/mgmt/package.json | 2 +- new-pattern/mgmt/providers/nango-auth.ts | 4 +- .../mgmt/providers/nango-postgres-provider.ts | 6 +- new-pattern/mgmt/router.ts | 4 +- new-pattern/mgmt/unifiedModels.ts | 2 +- new-pattern/vdk2/index.ts | 49 -------- new-pattern/vdk2/package.json | 21 ---- new-pattern/worker/functions.ts | 2 +- pnpm-lock.yaml | 107 +++++++----------- verticals/vertical-crm/package.json | 2 +- .../providers/hubspot-provider/index.ts | 4 +- .../providers/hubspot-provider/mappers.ts | 2 +- .../ms-dynamics-365-sales-provider/index.ts | 2 +- .../providers/pipedrive-provider/index.ts | 4 +- .../providers/pipedrive-provider/mappers.ts | 4 +- .../providers/salesforce-provider/index.ts | 4 +- .../salesforce-provider/jsforce/index.ts | 2 +- .../salesforce-provider/jsforce/mappers.ts | 4 +- .../providers/salesforce-provider/mappers.ts | 2 +- verticals/vertical-crm/router.ts | 4 +- verticals/vertical-crm/unifiedModels.ts | 2 +- .../vertical-sales-engagement2/package.json | 2 +- .../providers/apollo-provider.ts | 2 +- .../providers/outreach-provider.ts | 2 +- .../providers/salesloft-provider.ts | 2 +- .../vertical-sales-engagement2/router.ts | 4 +- .../unifiedModels.ts | 2 +- 48 files changed, 148 insertions(+), 184 deletions(-) rename {new-pattern/vdk2 => kits/vdk}/deprecated.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/errors.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/mapper.spec.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/mapper.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/nangoProxyLink.spec.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/nangoProxyLink.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/pagination.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/provider.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/supaglueProxyLink.spec.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/supaglueProxyLink.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/trpc.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/type-utils/PathsOf.ts (100%) rename {new-pattern/vdk2 => kits/vdk}/type-utils/StrictObj.ts (100%) delete mode 100644 new-pattern/vdk2/index.ts delete mode 100644 new-pattern/vdk2/package.json diff --git a/new-pattern/vdk2/deprecated.ts b/kits/vdk/deprecated.ts similarity index 100% rename from new-pattern/vdk2/deprecated.ts rename to kits/vdk/deprecated.ts diff --git a/new-pattern/vdk2/errors.ts b/kits/vdk/errors.ts similarity index 100% rename from new-pattern/vdk2/errors.ts rename to kits/vdk/errors.ts diff --git a/kits/vdk/index.ts b/kits/vdk/index.ts index fc6034bcb..3db14f5c7 100644 --- a/kits/vdk/index.ts +++ b/kits/vdk/index.ts @@ -1,6 +1,49 @@ -// // codegen:start {preset: barrel, include: "./{*.{ts,tsx},*/index.{ts,tsx}}", exclude: "./**/*.{d,spec,test,fixture,gen,node}.{ts,tsx}"} -// export * from './new-mapper' -// // codegen:end +import type { + HttpMethod, + JSONLike, + PathsWithMethod, + SuccessResponse, +} from 'openapi-typescript-helpers' -// export * from '@openint/zod' -export * from '@openint/vdk2' +export * from './mapper' +export * from './pagination' +export * from './provider' +export * from './trpc' +export * from './type-utils/PathsOf' +export * from './type-utils/StrictObj' + +export * from '@opensdks/fetch-links' +export * from '@opensdks/util-zod' + +export type { + OperationRequestBodyContent, + PathsWithMethod, +} from 'openapi-typescript-helpers' + +export type ResponseFrom< + Paths extends {}, + M extends HttpMethod, + P extends PathsWithMethod, +> = JSONLike< + SuccessResponse< + M extends keyof Paths[P] + ? 'responses' extends keyof Paths[P][M] + ? Paths[P][M]['responses'] + : never + : never + > +> + +export * from './errors' + +// re-exporting utiltities + +export {mapKeys, mapValues, pick, uniq, uniqBy} from 'remeda' + +// TODO: Remove me +export { + RouterMap, + VerticalRouterOpts, + proxyCallRemote, + proxyListRemoteRedux, +} from './deprecated' diff --git a/new-pattern/vdk2/mapper.spec.ts b/kits/vdk/mapper.spec.ts similarity index 100% rename from new-pattern/vdk2/mapper.spec.ts rename to kits/vdk/mapper.spec.ts diff --git a/new-pattern/vdk2/mapper.ts b/kits/vdk/mapper.ts similarity index 100% rename from new-pattern/vdk2/mapper.ts rename to kits/vdk/mapper.ts diff --git a/new-pattern/vdk2/nangoProxyLink.spec.ts b/kits/vdk/nangoProxyLink.spec.ts similarity index 100% rename from new-pattern/vdk2/nangoProxyLink.spec.ts rename to kits/vdk/nangoProxyLink.spec.ts diff --git a/new-pattern/vdk2/nangoProxyLink.ts b/kits/vdk/nangoProxyLink.ts similarity index 100% rename from new-pattern/vdk2/nangoProxyLink.ts rename to kits/vdk/nangoProxyLink.ts diff --git a/kits/vdk/package.json b/kits/vdk/package.json index d1c9de5c5..bb9cba8f5 100644 --- a/kits/vdk/package.json +++ b/kits/vdk/package.json @@ -1,11 +1,21 @@ { "name": "@openint/vdk", - "description": "Vertical Development Kit", + "description": "Unified API Vertical Development Kit", "dependencies": { - "@openint/types": "workspace:*", - "@openint/vdk2": "workspace:*", - "@openint/zod": "workspace:*", + "@jsonurl/jsonurl": "^1.1.7", + "@openint/env": "workspace:*", + "@opensdks/fetch-links": "0.0.18", + "@opensdks/sdk-nango": "0.0.4", + "@opensdks/sdk-supaglue": "0.0.3", + "@opensdks/util-zod": "0.0.15", "@trpc/server": "10.40.0", "remeda": "1.6.1" + }, + "devDependencies": { + "@lilyrose2798/trpc-openapi": "1.3.10", + "@opensdks/runtime": "0.0.19", + "@opensdks/sdk-apollo": "0.0.21", + "@opensdks/sdk-outreach": "0.0.16", + "openapi-typescript-helpers": "^0.0.6" } } diff --git a/new-pattern/vdk2/pagination.ts b/kits/vdk/pagination.ts similarity index 100% rename from new-pattern/vdk2/pagination.ts rename to kits/vdk/pagination.ts diff --git a/new-pattern/vdk2/provider.ts b/kits/vdk/provider.ts similarity index 100% rename from new-pattern/vdk2/provider.ts rename to kits/vdk/provider.ts diff --git a/new-pattern/vdk2/supaglueProxyLink.spec.ts b/kits/vdk/supaglueProxyLink.spec.ts similarity index 100% rename from new-pattern/vdk2/supaglueProxyLink.spec.ts rename to kits/vdk/supaglueProxyLink.spec.ts diff --git a/new-pattern/vdk2/supaglueProxyLink.ts b/kits/vdk/supaglueProxyLink.ts similarity index 100% rename from new-pattern/vdk2/supaglueProxyLink.ts rename to kits/vdk/supaglueProxyLink.ts diff --git a/new-pattern/vdk2/trpc.ts b/kits/vdk/trpc.ts similarity index 100% rename from new-pattern/vdk2/trpc.ts rename to kits/vdk/trpc.ts diff --git a/new-pattern/vdk2/type-utils/PathsOf.ts b/kits/vdk/type-utils/PathsOf.ts similarity index 100% rename from new-pattern/vdk2/type-utils/PathsOf.ts rename to kits/vdk/type-utils/PathsOf.ts diff --git a/new-pattern/vdk2/type-utils/StrictObj.ts b/kits/vdk/type-utils/StrictObj.ts similarity index 100% rename from new-pattern/vdk2/type-utils/StrictObj.ts rename to kits/vdk/type-utils/StrictObj.ts diff --git a/new-pattern/api/appRouter.ts b/new-pattern/api/appRouter.ts index 3e0f94dfd..e4ba45f40 100644 --- a/new-pattern/api/appRouter.ts +++ b/new-pattern/api/appRouter.ts @@ -1,6 +1,6 @@ // not sure about directly depending on vdk from api, but anyways import {mgmtRouter} from '@openint/mgmt' -import {trpc} from '@openint/vdk2' +import {trpc} from '@openint/vdk' import {crmRouter} from '@openint/vertical-crm' import {salesEngagementRouter} from '@openint/vertical-sales-engagement2' diff --git a/new-pattern/api/createContext.ts b/new-pattern/api/createContext.ts index 545b6d8d6..9a3260b57 100644 --- a/new-pattern/api/createContext.ts +++ b/new-pattern/api/createContext.ts @@ -1,4 +1,4 @@ -import type {RouterContext} from '@openint/vdk2' +import type {RouterContext} from '@openint/vdk' import { hubspotProvider, msDynamics365SalesProvider, diff --git a/new-pattern/api/index.ts b/new-pattern/api/index.ts index 6a217bec5..79b439cf7 100644 --- a/new-pattern/api/index.ts +++ b/new-pattern/api/index.ts @@ -1,6 +1,6 @@ import {createOpenApiFetchHandler} from '@lilyrose2798/trpc-openapi' import {env} from '@openint/env' -import {isHttpError} from '@openint/vdk2' +import {isHttpError} from '@openint/vdk' import {appRouter} from './appRouter' import {createContext} from './createContext' @@ -58,4 +58,4 @@ export function createAppHandler({ }) } -export {zByosHeaders, type ByosHeaders} from '@openint/vdk2' +export {zByosHeaders, type ByosHeaders} from '@openint/vdk' diff --git a/new-pattern/api/package.json b/new-pattern/api/package.json index 25311e1bf..29ef02f1d 100644 --- a/new-pattern/api/package.json +++ b/new-pattern/api/package.json @@ -15,7 +15,7 @@ "@openint/events": "workspace:*", "@openint/mgmt": "workspace:*", "@openint/env": "workspace:*", - "@openint/vdk2": "workspace:*", + "@openint/vdk": "workspace:*", "@openint/vertical-crm": "workspace:*", "@openint/vertical-sales-engagement2": "workspace:*", "remeda": "1.6.1" diff --git a/new-pattern/db/package.json b/new-pattern/db/package.json index 53c579fb4..9b1ae8c84 100644 --- a/new-pattern/db/package.json +++ b/new-pattern/db/package.json @@ -19,7 +19,7 @@ "zod": "^3.22.4" }, "devDependencies": { - "@openint/vdk2": "workspace:*", + "@openint/vdk": "workspace:*", "drizzle-kit": "^0.20.12", "prettier": "3.1.0", "prettier-plugin-sql": "0.16.0" diff --git a/new-pattern/db/schema.ts b/new-pattern/db/schema.ts index fbbeebae3..99360a06c 100644 --- a/new-pattern/db/schema.ts +++ b/new-pattern/db/schema.ts @@ -1,5 +1,5 @@ import {env} from '@openint/env' -import type {ErrorType} from '@openint/vdk2' +import type {ErrorType} from '@openint/vdk' import {sql} from 'drizzle-orm' import { customType, diff --git a/new-pattern/mgmt/package.json b/new-pattern/mgmt/package.json index 98b6d5ba4..6744fa244 100644 --- a/new-pattern/mgmt/package.json +++ b/new-pattern/mgmt/package.json @@ -11,7 +11,7 @@ "@openint/db": "workspace:*", "@openint/env": "workspace:*", "@openint/events": "workspace:*", - "@openint/vdk2": "workspace:*", + "@openint/vdk": "workspace:*", "cookie": "^0.6.0" }, "devDependencies": { diff --git a/new-pattern/mgmt/providers/nango-auth.ts b/new-pattern/mgmt/providers/nango-auth.ts index 78d012a67..8f14251a5 100644 --- a/new-pattern/mgmt/providers/nango-auth.ts +++ b/new-pattern/mgmt/providers/nango-auth.ts @@ -1,12 +1,12 @@ import {envRequired} from '@openint/env' import {inngest} from '@openint/events' -import {z} from '@openint/vdk2' +import {z} from '@openint/vdk' import { fromNangoConnectionId, fromNangoProviderConfigKey, toNangoConnectionId, toNangoProviderConfigKey, -} from '@openint/vdk2/nangoProxyLink' +} from '@openint/vdk/nangoProxyLink' import cookie from 'cookie' const zOauthInitParams = z.object({ diff --git a/new-pattern/mgmt/providers/nango-postgres-provider.ts b/new-pattern/mgmt/providers/nango-postgres-provider.ts index ab615e0bb..db92e8b1d 100644 --- a/new-pattern/mgmt/providers/nango-postgres-provider.ts +++ b/new-pattern/mgmt/providers/nango-postgres-provider.ts @@ -1,11 +1,11 @@ import {db as _db, dbUpsert, eq, schema, sql} from '@openint/db' -import type {PathsWithMethod, ResponseFrom} from '@openint/vdk2' -import {NotAuthenticatedError, NotFoundError} from '@openint/vdk2' +import type {PathsWithMethod, ResponseFrom} from '@openint/vdk' +import {NotAuthenticatedError, NotFoundError} from '@openint/vdk' import { fromNangoConnectionId, toNangoConnectionId, toNangoProviderConfigKey, -} from '@openint/vdk2/nangoProxyLink' +} from '@openint/vdk/nangoProxyLink' import type {NangoSDK, NangoSDKTypes} from '@opensdks/sdk-nango' import {initNangoSDK} from '@opensdks/sdk-nango' import type {unified} from '../router' diff --git a/new-pattern/mgmt/router.ts b/new-pattern/mgmt/router.ts index 19657c4a2..56360e8f0 100644 --- a/new-pattern/mgmt/router.ts +++ b/new-pattern/mgmt/router.ts @@ -1,6 +1,6 @@ import {and, db, eq, schema} from '@openint/db' -import type {_Provider, ProviderFromRouter} from '@openint/vdk2' -import {NotImplementedError, publicProcedure, trpc, z} from '@openint/vdk2' +import type {_Provider, ProviderFromRouter} from '@openint/vdk' +import {NotImplementedError, publicProcedure, trpc, z} from '@openint/vdk' import {nangoPostgresProvider} from './providers/nango-postgres-provider' import {supaglueProvider} from './providers/supaglue-provider' import * as unified from './unifiedModels' diff --git a/new-pattern/mgmt/unifiedModels.ts b/new-pattern/mgmt/unifiedModels.ts index 9253dc78f..9e8bd50bd 100644 --- a/new-pattern/mgmt/unifiedModels.ts +++ b/new-pattern/mgmt/unifiedModels.ts @@ -1,4 +1,4 @@ -import {z} from '@openint/vdk2' +import {z} from '@openint/vdk' /** workaround the issue that we get back date from db... need to figure out how to just get string */ // const zTimestamp = z diff --git a/new-pattern/vdk2/index.ts b/new-pattern/vdk2/index.ts deleted file mode 100644 index 3db14f5c7..000000000 --- a/new-pattern/vdk2/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { - HttpMethod, - JSONLike, - PathsWithMethod, - SuccessResponse, -} from 'openapi-typescript-helpers' - -export * from './mapper' -export * from './pagination' -export * from './provider' -export * from './trpc' -export * from './type-utils/PathsOf' -export * from './type-utils/StrictObj' - -export * from '@opensdks/fetch-links' -export * from '@opensdks/util-zod' - -export type { - OperationRequestBodyContent, - PathsWithMethod, -} from 'openapi-typescript-helpers' - -export type ResponseFrom< - Paths extends {}, - M extends HttpMethod, - P extends PathsWithMethod, -> = JSONLike< - SuccessResponse< - M extends keyof Paths[P] - ? 'responses' extends keyof Paths[P][M] - ? Paths[P][M]['responses'] - : never - : never - > -> - -export * from './errors' - -// re-exporting utiltities - -export {mapKeys, mapValues, pick, uniq, uniqBy} from 'remeda' - -// TODO: Remove me -export { - RouterMap, - VerticalRouterOpts, - proxyCallRemote, - proxyListRemoteRedux, -} from './deprecated' diff --git a/new-pattern/vdk2/package.json b/new-pattern/vdk2/package.json deleted file mode 100644 index db76c8109..000000000 --- a/new-pattern/vdk2/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@openint/vdk2", - "description": "Unified API Vertical Development Kit", - "dependencies": { - "@jsonurl/jsonurl": "^1.1.7", - "@openint/env": "workspace:*", - "@opensdks/fetch-links": "0.0.18", - "@opensdks/sdk-nango": "0.0.4", - "@opensdks/sdk-supaglue": "0.0.3", - "@opensdks/util-zod": "0.0.15", - "@trpc/server": "10.40.0", - "remeda": "1.6.1" - }, - "devDependencies": { - "@lilyrose2798/trpc-openapi": "1.3.10", - "@opensdks/runtime": "0.0.19", - "@opensdks/sdk-apollo": "0.0.21", - "@opensdks/sdk-outreach": "0.0.16", - "openapi-typescript-helpers": "^0.0.6" - } -} diff --git a/new-pattern/worker/functions.ts b/new-pattern/worker/functions.ts index 084f6dc37..9061a39b8 100644 --- a/new-pattern/worker/functions.ts +++ b/new-pattern/worker/functions.ts @@ -12,7 +12,7 @@ import { import {env} from '@openint/env' import type {Events} from '@openint/events' import {initByosSDK} from '@openint/sdk2' -import {HTTPError, parseErrorInfo} from '../vdk2/errors' +import {HTTPError, parseErrorInfo} from '../../kits/vdk/errors' /** * Unlike functions, routines are designed to run without dependency on Inngest diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd44eecf4..e9b1c457d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1453,21 +1453,46 @@ importers: kits/vdk: dependencies: - '@openint/types': - specifier: workspace:* - version: link:../../utils/types - '@openint/vdk2': - specifier: workspace:* - version: link:../../new-pattern/vdk2 - '@openint/zod': + '@jsonurl/jsonurl': + specifier: ^1.1.7 + version: 1.1.7(patch_hash=wymar43eprx3gdqsv4laq3u2ei) + '@openint/env': specifier: workspace:* - version: link:../../utils/zod + version: link:../../new-pattern/env + '@opensdks/fetch-links': + specifier: 0.0.18 + version: 0.0.18 + '@opensdks/sdk-nango': + specifier: 0.0.4 + version: 0.0.4 + '@opensdks/sdk-supaglue': + specifier: 0.0.3 + version: 0.0.3 + '@opensdks/util-zod': + specifier: 0.0.15 + version: 0.0.15 '@trpc/server': specifier: 10.40.0 version: 10.40.0 remeda: specifier: 1.6.1 version: 1.6.1 + devDependencies: + '@lilyrose2798/trpc-openapi': + specifier: 1.3.10 + version: 1.3.10(patch_hash=hesfnkphzbtlqjldce4x4rhy6e)(@trpc/server@10.40.0)(zod@3.22.4) + '@opensdks/runtime': + specifier: 0.0.19 + version: 0.0.19 + '@opensdks/sdk-apollo': + specifier: 0.0.21 + version: 0.0.21 + '@opensdks/sdk-outreach': + specifier: 0.0.16 + version: 0.0.16 + openapi-typescript-helpers: + specifier: ^0.0.6 + version: 0.0.6 new-pattern/api: dependencies: @@ -1483,9 +1508,9 @@ importers: '@openint/mgmt': specifier: workspace:* version: link:../mgmt - '@openint/vdk2': + '@openint/vdk': specifier: workspace:* - version: link:../vdk2 + version: link:../../kits/vdk '@openint/vertical-crm': specifier: workspace:* version: link:../../verticals/vertical-crm @@ -1514,9 +1539,9 @@ importers: specifier: ^3.22.4 version: 3.22.4 devDependencies: - '@openint/vdk2': + '@openint/vdk': specifier: workspace:* - version: link:../vdk2 + version: link:../../kits/vdk drizzle-kit: specifier: ^0.20.12 version: 0.20.14 @@ -1556,9 +1581,9 @@ importers: '@openint/events': specifier: workspace:* version: link:../events - '@openint/vdk2': + '@openint/vdk': specifier: workspace:* - version: link:../vdk2 + version: link:../../kits/vdk '@opensdks/sdk-nango': specifier: 0.0.4 version: 0.0.4 @@ -1583,49 +1608,6 @@ importers: specifier: workspace:* version: link:../api - new-pattern/vdk2: - dependencies: - '@jsonurl/jsonurl': - specifier: ^1.1.7 - version: 1.1.7(patch_hash=wymar43eprx3gdqsv4laq3u2ei) - '@openint/env': - specifier: workspace:* - version: link:../env - '@opensdks/fetch-links': - specifier: 0.0.18 - version: 0.0.18 - '@opensdks/sdk-nango': - specifier: 0.0.4 - version: 0.0.4 - '@opensdks/sdk-supaglue': - specifier: 0.0.3 - version: 0.0.3 - '@opensdks/util-zod': - specifier: 0.0.15 - version: 0.0.15 - '@trpc/server': - specifier: 10.40.0 - version: 10.40.0 - remeda: - specifier: 1.6.1 - version: 1.6.1 - devDependencies: - '@lilyrose2798/trpc-openapi': - specifier: 1.3.10 - version: 1.3.10(patch_hash=hesfnkphzbtlqjldce4x4rhy6e)(@trpc/server@10.40.0)(zod@3.22.4) - '@opensdks/runtime': - specifier: 0.0.19 - version: 0.0.19 - '@opensdks/sdk-apollo': - specifier: 0.0.21 - version: 0.0.21 - '@opensdks/sdk-outreach': - specifier: 0.0.16 - version: 0.0.16 - openapi-typescript-helpers: - specifier: ^0.0.6 - version: 0.0.6 - new-pattern/worker: dependencies: '@openint/api': @@ -2145,9 +2127,9 @@ importers: verticals/vertical-crm: dependencies: - '@openint/vdk2': + '@openint/vdk': specifier: workspace:* - version: link:../../new-pattern/vdk2 + version: link:../../kits/vdk '@opensdks/sdk-hubspot': specifier: 0.0.6 version: 0.0.6 @@ -2205,9 +2187,9 @@ importers: verticals/vertical-sales-engagement2: dependencies: - '@openint/vdk2': + '@openint/vdk': specifier: workspace:* - version: link:../../new-pattern/vdk2 + version: link:../../kits/vdk '@opensdks/sdk-apollo': specifier: 0.0.21 version: 0.0.21 @@ -17704,7 +17686,7 @@ packages: /openapi3-ts@4.1.2: resolution: {integrity: sha512-B7gOkwsYMZO7BZXwJzXCuVagym2xhqsrilVvV0dnq2Di4+iLUXKVX9gOK23ZqaAHZOwABXN0QTdW8QnkUTX6DA==} dependencies: - yaml: 2.3.0 + yaml: 2.3.4 /optionator@0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} @@ -22867,7 +22849,6 @@ packages: /yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} - dev: true /yamljs@0.3.0: resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==} diff --git a/verticals/vertical-crm/package.json b/verticals/vertical-crm/package.json index ae4e2861f..e6cb9b30e 100644 --- a/verticals/vertical-crm/package.json +++ b/verticals/vertical-crm/package.json @@ -1,7 +1,7 @@ { "name": "@openint/vertical-crm", "dependencies": { - "@openint/vdk2": "workspace:*", + "@openint/vdk": "workspace:*", "@opensdks/sdk-hubspot": "0.0.6", "@opensdks/sdk-pipedrive": "0.0.1", "@opensdks/sdk-salesforce": "0.0.2", diff --git a/verticals/vertical-crm/providers/hubspot-provider/index.ts b/verticals/vertical-crm/providers/hubspot-provider/index.ts index 315d95b5b..dc505d18e 100644 --- a/verticals/vertical-crm/providers/hubspot-provider/index.ts +++ b/verticals/vertical-crm/providers/hubspot-provider/index.ts @@ -2,14 +2,14 @@ import type {Oas_crm_schemas} from '@opensdks/sdk-hubspot' import {initHubspotSDK, type HubspotSDK} from '@opensdks/sdk-hubspot' import {LRUCache} from 'lru-cache' import * as RM from 'remeda' -import type {BaseRecord, z} from '@openint/vdk2' +import type {BaseRecord, z} from '@openint/vdk' import { BadRequestError, InternalServerError, LastUpdatedAtNextOffset, NotFoundError, uniqBy, -} from '@openint/vdk2' +} from '@openint/vdk' import type {CRMProvider} from '../../router' import type { HSAssociation, diff --git a/verticals/vertical-crm/providers/hubspot-provider/mappers.ts b/verticals/vertical-crm/providers/hubspot-provider/mappers.ts index 0355f27df..03bd1da9b 100644 --- a/verticals/vertical-crm/providers/hubspot-provider/mappers.ts +++ b/verticals/vertical-crm/providers/hubspot-provider/mappers.ts @@ -1,5 +1,5 @@ import type {Oas_crm_contacts, Oas_crm_owners} from '@opensdks/sdk-hubspot' -import {mapper, z, zBaseRecord, zCast} from '@openint/vdk2' +import {mapper, z, zBaseRecord, zCast} from '@openint/vdk' import type {PipelineStageMapping} from '.' import {unified} from '../../router' diff --git a/verticals/vertical-crm/providers/ms-dynamics-365-sales-provider/index.ts b/verticals/vertical-crm/providers/ms-dynamics-365-sales-provider/index.ts index d5a2adf84..448c28128 100644 --- a/verticals/vertical-crm/providers/ms-dynamics-365-sales-provider/index.ts +++ b/verticals/vertical-crm/providers/ms-dynamics-365-sales-provider/index.ts @@ -1,5 +1,5 @@ import {initPipedriveSDK, type PipedriveSDK} from '@opensdks/sdk-pipedrive' -import {NotImplementedError, PLACEHOLDER_BASE_URL} from '@openint/vdk2' +import {NotImplementedError, PLACEHOLDER_BASE_URL} from '@openint/vdk' import type {CRMProvider} from '../../router' import {MS_DYNAMICS_365_SALES_STANDARD_OBJECTS} from './constants' diff --git a/verticals/vertical-crm/providers/pipedrive-provider/index.ts b/verticals/vertical-crm/providers/pipedrive-provider/index.ts index bbd0dca80..63c88214a 100644 --- a/verticals/vertical-crm/providers/pipedrive-provider/index.ts +++ b/verticals/vertical-crm/providers/pipedrive-provider/index.ts @@ -1,6 +1,6 @@ import {initPipedriveSDK, type PipedriveSDK} from '@opensdks/sdk-pipedrive' -import type {BaseRecord} from '@openint/vdk2' -import {NotAuthorizedError} from '@openint/vdk2' +import type {BaseRecord} from '@openint/vdk' +import {NotAuthorizedError} from '@openint/vdk' import type {CRMProvider} from '../../router' import {mappers, zErrorPayload} from './mappers' diff --git a/verticals/vertical-crm/providers/pipedrive-provider/mappers.ts b/verticals/vertical-crm/providers/pipedrive-provider/mappers.ts index 0a318d463..901d3a448 100644 --- a/verticals/vertical-crm/providers/pipedrive-provider/mappers.ts +++ b/verticals/vertical-crm/providers/pipedrive-provider/mappers.ts @@ -1,6 +1,6 @@ import type {PipedriveSDKTypes} from '@opensdks/sdk-pipedrive' -import type {PathsWithMethod, ResponseFrom} from '@openint/vdk2' -import {mapper, z, zCast} from '@openint/vdk2' +import type {PathsWithMethod, ResponseFrom} from '@openint/vdk' +import {mapper, z, zCast} from '@openint/vdk' import {unified} from '../../router' // Unfortunately pipedrive does not use the schemas field properly... diff --git a/verticals/vertical-crm/providers/salesforce-provider/index.ts b/verticals/vertical-crm/providers/salesforce-provider/index.ts index 777c7d7a5..5f4c73c3e 100644 --- a/verticals/vertical-crm/providers/salesforce-provider/index.ts +++ b/verticals/vertical-crm/providers/salesforce-provider/index.ts @@ -3,13 +3,13 @@ import { type SalesforceSDK as _SalesforceSDK, } from '@opensdks/sdk-salesforce' import * as jsforce from 'jsforce' -import type {BaseRecord} from '@openint/vdk2' +import type {BaseRecord} from '@openint/vdk' import { LastUpdatedAtId, modifyRequest, PLACEHOLDER_BASE_URL, uniqBy, -} from '@openint/vdk2' +} from '@openint/vdk' import type {CRMProvider} from '../../router' import {SALESFORCE_API_VERSION, SALESFORCE_STANDARD_OBJECTS} from './constants' import {salesforceProviderJsForce} from './jsforce' diff --git a/verticals/vertical-crm/providers/salesforce-provider/jsforce/index.ts b/verticals/vertical-crm/providers/salesforce-provider/jsforce/index.ts index 361dc063a..378d44fad 100644 --- a/verticals/vertical-crm/providers/salesforce-provider/jsforce/index.ts +++ b/verticals/vertical-crm/providers/salesforce-provider/jsforce/index.ts @@ -1,5 +1,5 @@ import type * as jsforce from 'jsforce' -import {BadRequestError} from '@openint/vdk2' +import {BadRequestError} from '@openint/vdk' import type {CRMProvider} from '../../../router' import {SALESFORCE_API_VERSION} from '../constants' import { diff --git a/verticals/vertical-crm/providers/salesforce-provider/jsforce/mappers.ts b/verticals/vertical-crm/providers/salesforce-provider/jsforce/mappers.ts index af34f784c..563796284 100644 --- a/verticals/vertical-crm/providers/salesforce-provider/jsforce/mappers.ts +++ b/verticals/vertical-crm/providers/salesforce-provider/jsforce/mappers.ts @@ -1,6 +1,6 @@ import type {CustomField as SalesforceCustomField} from 'jsforce/lib/api/metadata/schema' -import type {z} from '@openint/vdk2' -import {BadRequestError} from '@openint/vdk2' +import type {z} from '@openint/vdk' +import {BadRequestError} from '@openint/vdk' import type {CRMProvider, unified} from '../../../router' type RouteInput, '__init__'>> = diff --git a/verticals/vertical-crm/providers/salesforce-provider/mappers.ts b/verticals/vertical-crm/providers/salesforce-provider/mappers.ts index 795818011..764bc8a3f 100644 --- a/verticals/vertical-crm/providers/salesforce-provider/mappers.ts +++ b/verticals/vertical-crm/providers/salesforce-provider/mappers.ts @@ -1,5 +1,5 @@ import type {SalesforceSDKTypes} from '@opensdks/sdk-salesforce' -import {mapper, z, zBaseRecord, zCast} from '@openint/vdk2' +import {mapper, z, zBaseRecord, zCast} from '@openint/vdk' import {unified} from '../../router' // import {updateFieldPermissions} from './salesforce/updatePermissions' diff --git a/verticals/vertical-crm/router.ts b/verticals/vertical-crm/router.ts index 5063857a7..94ec4b8ff 100644 --- a/verticals/vertical-crm/router.ts +++ b/verticals/vertical-crm/router.ts @@ -1,4 +1,4 @@ -import type {ProviderFromRouter, RouterMeta} from '@openint/vdk2' +import type {ProviderFromRouter, RouterMeta} from '@openint/vdk' import { proxyCallProvider, remoteProcedure, @@ -7,7 +7,7 @@ import { z, zPaginatedResult, zPaginationParams, -} from '@openint/vdk2' +} from '@openint/vdk' import * as unified from './unifiedModels' export {unified} diff --git a/verticals/vertical-crm/unifiedModels.ts b/verticals/vertical-crm/unifiedModels.ts index 193de117c..8c9ef98f1 100644 --- a/verticals/vertical-crm/unifiedModels.ts +++ b/verticals/vertical-crm/unifiedModels.ts @@ -1,4 +1,4 @@ -import {z, zBaseRecord} from '@openint/vdk2' +import {z, zBaseRecord} from '@openint/vdk' export const address_type = z .enum(['primary', 'mailing', 'other', 'billing', 'shipping']) diff --git a/verticals/vertical-sales-engagement2/package.json b/verticals/vertical-sales-engagement2/package.json index 4dfdd9f69..8245c407a 100644 --- a/verticals/vertical-sales-engagement2/package.json +++ b/verticals/vertical-sales-engagement2/package.json @@ -1,7 +1,7 @@ { "name": "@openint/vertical-sales-engagement2", "dependencies": { - "@openint/vdk2": "workspace:*", + "@openint/vdk": "workspace:*", "@opensdks/sdk-apollo": "0.0.21", "@opensdks/sdk-outreach": "0.0.16", "@opensdks/sdk-salesloft": "0.0.17" diff --git a/verticals/vertical-sales-engagement2/providers/apollo-provider.ts b/verticals/vertical-sales-engagement2/providers/apollo-provider.ts index 0e0546fe4..a447e7e63 100644 --- a/verticals/vertical-sales-engagement2/providers/apollo-provider.ts +++ b/verticals/vertical-sales-engagement2/providers/apollo-provider.ts @@ -3,7 +3,7 @@ import { type ApolloSDK, type ApolloSDKTypes, } from '@opensdks/sdk-apollo' -import {mapper, pick, zCast} from '@openint/vdk2' +import {mapper, pick, zCast} from '@openint/vdk' import type {SalesEngagementProvider} from '../router' import {unified} from '../router' import type {EmailAddress} from '../unifiedModels' diff --git a/verticals/vertical-sales-engagement2/providers/outreach-provider.ts b/verticals/vertical-sales-engagement2/providers/outreach-provider.ts index d86d80fa6..ae99a1688 100644 --- a/verticals/vertical-sales-engagement2/providers/outreach-provider.ts +++ b/verticals/vertical-sales-engagement2/providers/outreach-provider.ts @@ -3,7 +3,7 @@ import { type OutreachSDK, type OutreachSDKTypes, } from '@opensdks/sdk-outreach' -import {mapper, z, zCast} from '@openint/vdk2' +import {mapper, z, zCast} from '@openint/vdk' import type {SalesEngagementProvider} from '../router' import {unified} from '../router' import type {EmailAddress, PhoneNumber} from '../unifiedModels' diff --git a/verticals/vertical-sales-engagement2/providers/salesloft-provider.ts b/verticals/vertical-sales-engagement2/providers/salesloft-provider.ts index df179ad46..e55ab4c3e 100644 --- a/verticals/vertical-sales-engagement2/providers/salesloft-provider.ts +++ b/verticals/vertical-sales-engagement2/providers/salesloft-provider.ts @@ -3,7 +3,7 @@ import { type SalesloftSDK, type SalesloftSDKTypes, } from '@opensdks/sdk-salesloft' -import {mapper, z, zCast} from '@openint/vdk2' +import {mapper, z, zCast} from '@openint/vdk' import type {SalesEngagementProvider} from '../router' import {unified} from '../router' import type {EmailAddress, PhoneNumber} from '../unifiedModels' diff --git a/verticals/vertical-sales-engagement2/router.ts b/verticals/vertical-sales-engagement2/router.ts index f4ab99e41..712f65269 100644 --- a/verticals/vertical-sales-engagement2/router.ts +++ b/verticals/vertical-sales-engagement2/router.ts @@ -1,5 +1,5 @@ -import type {ProviderFromRouter, RouterMeta} from '@openint/vdk2' -import {proxyCallProvider, remoteProcedure, trpc, z} from '@openint/vdk2' +import type {ProviderFromRouter, RouterMeta} from '@openint/vdk' +import {proxyCallProvider, remoteProcedure, trpc, z} from '@openint/vdk' import * as unified from './unifiedModels' export {unified} diff --git a/verticals/vertical-sales-engagement2/unifiedModels.ts b/verticals/vertical-sales-engagement2/unifiedModels.ts index 5358296f6..420e65cb9 100644 --- a/verticals/vertical-sales-engagement2/unifiedModels.ts +++ b/verticals/vertical-sales-engagement2/unifiedModels.ts @@ -1,4 +1,4 @@ -import {z} from '@openint/vdk2' +import {z} from '@openint/vdk' export const address = z .object({