diff --git a/.eslintrc.json b/.eslintrc.json index 370ffac7a..100ffcd74 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -30,5 +30,5 @@ "@typescript-eslint/no-misused-promises": ["warn", { "checksVoidReturn": false }], "@typescript-eslint/consistent-type-imports": "error" }, - "ignorePatterns": ["node_modules/", "dist/", "coverage/", "/packages/schemas/gen/", "/packages/core/jest.config.js", "*.openapi.gen.d.ts"] + "ignorePatterns": ["node_modules/", "dist/", "coverage/", "/packages/sdk/gen/", "/packages/core/jest.config.js", "*.openapi.gen.d.ts"] } diff --git a/.gitattributes b/.gitattributes index a8d1071bb..b0b55fd1c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,7 @@ /.yarn/releases/* binary /.yarn/plugins/**/* binary /.pnp.* binary linguist-generated -/packages/schemas/gen/**/* linguist-generated +/packages/sdk/gen/**/* linguist-generated openapi/**/openapi.bundle.json linguist-generated *.example.json linguist-generated /docs/docs/api/**/* linguist-generated diff --git a/.github/workflows/api_build_docker.yml b/.github/workflows/api_build_docker.yml index 971a221df..27c2855b0 100644 --- a/.github/workflows/api_build_docker.yml +++ b/.github/workflows/api_build_docker.yml @@ -7,7 +7,7 @@ on: - apps/api/** - packages/core/** - packages/db/** - - packages/schemas/** + - packages/sdk/** - packages/sync-workflows/** - packages/types/** - packages/utils/** @@ -18,7 +18,7 @@ on: - apps/api/** - packages/core/** - packages/db/** - - packages/schemas/** + - packages/sdk/** - packages/sync-workflows/** - packages/types/** - packages/utils/** diff --git a/.gitignore b/.gitignore index cfe8e3b3a..3ae1c6450 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,3 @@ tsconfig.*.json cli/ *.debug.ts* temp/ - diff --git a/.prettierignore b/.prettierignore index 4ec0c65a9..67f576120 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -/packages/schemas/gen/**/* +/packages/sdk/gen/**/* diff --git a/apps/api/index.ts b/apps/api/index.ts index 0846443fa..64b32c10b 100644 --- a/apps/api/index.ts +++ b/apps/api/index.ts @@ -2,7 +2,7 @@ import initRoutes from '@/routes'; import { createTerminus } from '@godaddy/terminus'; import { SGError } from '@supaglue/core/errors'; import { expressScopeMiddleware, logger } from '@supaglue/core/lib'; -import type { ResponseErrors } from '@supaglue/schemas'; +import type { ResponseErrors } from '@supaglue/sdk'; import cors from 'cors'; import type { NextFunction, Request, Response } from 'express'; import express from 'express'; @@ -18,7 +18,7 @@ const metricsApp = express(); const port = process.env.SUPAGLUE_API_PORT ? parseInt(process.env.SUPAGLUE_API_PORT) : 8080; if (process.env.GLOBAL_AGENT_HTTP_PROXY) { - require('@supaglue/schemas/proxy.bootstrap'); + require('@supaglue/sdk/proxy.bootstrap'); } app.use( diff --git a/apps/api/integration-test-environment.js b/apps/api/integration-test-environment.js index a4ac90bc1..cf9e89900 100644 --- a/apps/api/integration-test-environment.js +++ b/apps/api/integration-test-environment.js @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/no-var-requires */ const axios = require('axios'); const { TestEnvironment } = require('jest-environment-node'); -const { createSupaglueClient } = require('@supaglue/schemas'); +const { createSupaglueClient } = require('@supaglue/sdk'); // For debugging -require('@supaglue/schemas/proxy.bootstrap'); +require('@supaglue/sdk/proxy.bootstrap'); const toHubspotPluralObjectName = { contact: 'contacts', diff --git a/apps/api/package.json b/apps/api/package.json index f219eed82..2cadbd9b0 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -8,7 +8,7 @@ "@godaddy/terminus": "^4.11.2", "@supaglue/core": "workspace:*", "@supaglue/db": "workspace:*", - "@supaglue/schemas": "workspace:*", + "@supaglue/sdk": "workspace:*", "@supaglue/sync-workflows": "workspace:*", "@supaglue/utils": "workspace:*", "@temporalio/activity": "^1.8.6", diff --git a/apps/api/routes/actions/v2/index.ts b/apps/api/routes/actions/v2/index.ts index b5dee2f98..846f19324 100644 --- a/apps/api/routes/actions/v2/index.ts +++ b/apps/api/routes/actions/v2/index.ts @@ -6,7 +6,7 @@ import type { SendPassthroughRequestPathParams, SendPassthroughRequestRequest, SendPassthroughRequestResponse, -} from '@supaglue/schemas/v2/actions'; +} from '@supaglue/sdk/v2/actions'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/account.integration.test.ts b/apps/api/routes/crm/v2/account.integration.test.ts index a8981ba63..9a3bb07d2 100644 --- a/apps/api/routes/crm/v2/account.integration.test.ts +++ b/apps/api/routes/crm/v2/account.integration.test.ts @@ -11,7 +11,7 @@ import type { ListAccountsSuccessfulResponse, UpdateAccountSuccessfulResponse, UpsertAccountSuccessfulResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; jest.retryTimes(3); diff --git a/apps/api/routes/crm/v2/account.ts b/apps/api/routes/crm/v2/account.ts index f852e4e21..d052fe7d9 100644 --- a/apps/api/routes/crm/v2/account.ts +++ b/apps/api/routes/crm/v2/account.ts @@ -20,7 +20,7 @@ import type { UpsertAccountPathParams, UpsertAccountRequest, UpsertAccountResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { FieldMappingConfig } from '@supaglue/types/field_mapping_config'; import { camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/crm/v2/associations/index.ts b/apps/api/routes/crm/v2/associations/index.ts index 0ebdbf070..1b9baf859 100644 --- a/apps/api/routes/crm/v2/associations/index.ts +++ b/apps/api/routes/crm/v2/associations/index.ts @@ -7,7 +7,7 @@ import type { UpsertAssociationPathParams, UpsertAssociationRequest, UpsertAssociationResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/contact.integration.test.ts b/apps/api/routes/crm/v2/contact.integration.test.ts index 3adc0585a..ff3c6b2e2 100644 --- a/apps/api/routes/crm/v2/contact.integration.test.ts +++ b/apps/api/routes/crm/v2/contact.integration.test.ts @@ -15,7 +15,7 @@ import type { UpdateContactSuccessfulResponse, UpsertContactRequest, UpsertContactSuccessfulResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; jest.retryTimes(3); diff --git a/apps/api/routes/crm/v2/contact.ts b/apps/api/routes/crm/v2/contact.ts index c2bbead8b..e536f8121 100644 --- a/apps/api/routes/crm/v2/contact.ts +++ b/apps/api/routes/crm/v2/contact.ts @@ -24,7 +24,7 @@ import type { UpsertContactPathParams, UpsertContactRequest, UpsertContactResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { FieldMappingConfig } from '@supaglue/types/field_mapping_config'; import { camelcaseKeys, camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/crm/v2/custom_objects/custom_object_records.integration.test.ts b/apps/api/routes/crm/v2/custom_objects/custom_object_records.integration.test.ts index b723b596b..f97141b8d 100644 --- a/apps/api/routes/crm/v2/custom_objects/custom_object_records.integration.test.ts +++ b/apps/api/routes/crm/v2/custom_objects/custom_object_records.integration.test.ts @@ -11,7 +11,7 @@ import type { GetCustomObjectRecordSuccessfulResponse, ListCustomObjectRecordsSuccessfulResponse, UpdateCustomObjectRecordSuccessfulResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; jest.retryTimes(3); diff --git a/apps/api/routes/crm/v2/custom_objects/index.ts b/apps/api/routes/crm/v2/custom_objects/index.ts index 46c472080..a603fd25f 100644 --- a/apps/api/routes/crm/v2/custom_objects/index.ts +++ b/apps/api/routes/crm/v2/custom_objects/index.ts @@ -15,7 +15,7 @@ import type { UpdateCustomObjectRecordPathParams, UpdateCustomObjectRecordRequest, UpdateCustomObjectRecordResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/lead.integration.test.ts b/apps/api/routes/crm/v2/lead.integration.test.ts index e7189674b..88bb4b4ec 100644 --- a/apps/api/routes/crm/v2/lead.integration.test.ts +++ b/apps/api/routes/crm/v2/lead.integration.test.ts @@ -15,7 +15,7 @@ import type { UpdateLeadSuccessfulResponse, UpsertLeadRequest, UpsertLeadSuccessfulResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; jest.retryTimes(3); diff --git a/apps/api/routes/crm/v2/lead.ts b/apps/api/routes/crm/v2/lead.ts index 253855b3b..555f22e0e 100644 --- a/apps/api/routes/crm/v2/lead.ts +++ b/apps/api/routes/crm/v2/lead.ts @@ -24,7 +24,7 @@ import type { UpsertLeadPathParams, UpsertLeadRequest, UpsertLeadResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { FieldMappingConfig } from '@supaglue/types/field_mapping_config'; import { camelcaseKeys, camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/crm/v2/list.ts b/apps/api/routes/crm/v2/list.ts index 96f1dd0d3..2ab8c025d 100644 --- a/apps/api/routes/crm/v2/list.ts +++ b/apps/api/routes/crm/v2/list.ts @@ -14,7 +14,7 @@ import type { ListListsQueryParams, ListListsRequest, ListListsResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { SnakecasedKeysCrmAccount, SnakecasedKeysCrmContact, diff --git a/apps/api/routes/crm/v2/metadata/associations/index.ts b/apps/api/routes/crm/v2/metadata/associations/index.ts index a8112c4b8..5841f3332 100644 --- a/apps/api/routes/crm/v2/metadata/associations/index.ts +++ b/apps/api/routes/crm/v2/metadata/associations/index.ts @@ -8,7 +8,7 @@ import type { ListAssociationSchemasQueryParams, ListAssociationSchemasRequest, ListAssociationSchemasResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/metadata/custom_objects/custom_objects.integration.test.ts b/apps/api/routes/crm/v2/metadata/custom_objects/custom_objects.integration.test.ts index 67e6743e5..166ede682 100644 --- a/apps/api/routes/crm/v2/metadata/custom_objects/custom_objects.integration.test.ts +++ b/apps/api/routes/crm/v2/metadata/custom_objects/custom_objects.integration.test.ts @@ -11,7 +11,7 @@ import type { GetCustomObjectSchemaSuccessfulResponse, ListCustomObjectSchemasSuccessfulResponse, UpdateCustomObjectSchemaPathParams, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; describe('custom_objects', () => { let testCustomObject: CreateCustomObjectSchemaRequest['object']; diff --git a/apps/api/routes/crm/v2/metadata/custom_objects/index.ts b/apps/api/routes/crm/v2/metadata/custom_objects/index.ts index 8bc9c4ea0..fe0b9d246 100644 --- a/apps/api/routes/crm/v2/metadata/custom_objects/index.ts +++ b/apps/api/routes/crm/v2/metadata/custom_objects/index.ts @@ -12,7 +12,7 @@ import type { UpdateCustomObjectSchemaPathParams, UpdateCustomObjectSchemaRequest, UpdateCustomObjectSchemaResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/crm/v2/metadata/properties/index.ts b/apps/api/routes/crm/v2/metadata/properties/index.ts index 859b52c20..6ec9d9379 100644 --- a/apps/api/routes/crm/v2/metadata/properties/index.ts +++ b/apps/api/routes/crm/v2/metadata/properties/index.ts @@ -22,7 +22,7 @@ import type { UpdatePropertiesQueryParams, UpdatePropertiesRequest, UpdatePropertiesResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import { camelcaseKeys, snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/metadata/standard_objects/index.ts b/apps/api/routes/crm/v2/metadata/standard_objects/index.ts index e4391033a..1a52f4add 100644 --- a/apps/api/routes/crm/v2/metadata/standard_objects/index.ts +++ b/apps/api/routes/crm/v2/metadata/standard_objects/index.ts @@ -3,7 +3,7 @@ import type { ListStandardObjectSchemasPathParams, ListStandardObjectSchemasRequest, ListStandardObjectSchemasResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/opportunity.ts b/apps/api/routes/crm/v2/opportunity.ts index 1b41df4bc..89e1c4bd3 100644 --- a/apps/api/routes/crm/v2/opportunity.ts +++ b/apps/api/routes/crm/v2/opportunity.ts @@ -18,7 +18,7 @@ import type { UpdateOpportunityPathParams, UpdateOpportunityRequest, UpdateOpportunityResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { FieldMappingConfig } from '@supaglue/types/field_mapping_config'; import { camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/crm/v2/standard_objects/index.ts b/apps/api/routes/crm/v2/standard_objects/index.ts index 26a19d806..9e090feaf 100644 --- a/apps/api/routes/crm/v2/standard_objects/index.ts +++ b/apps/api/routes/crm/v2/standard_objects/index.ts @@ -15,7 +15,7 @@ import type { UpdateStandardObjectRecordPathParams, UpdateStandardObjectRecordRequest, UpdateStandardObjectRecordResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/crm/v2/user.ts b/apps/api/routes/crm/v2/user.ts index 9227f0f07..56bec6737 100644 --- a/apps/api/routes/crm/v2/user.ts +++ b/apps/api/routes/crm/v2/user.ts @@ -11,7 +11,7 @@ import type { ListUsersQueryParams, ListUsersRequest, ListUsersResponse, -} from '@supaglue/schemas/v2/crm'; +} from '@supaglue/sdk/v2/crm'; import type { FieldMappingConfig } from '@supaglue/types/field_mapping_config'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/data/v2/hubspot/index.ts b/apps/api/routes/data/v2/hubspot/index.ts index 9229a542b..0455c59fa 100644 --- a/apps/api/routes/data/v2/hubspot/index.ts +++ b/apps/api/routes/data/v2/hubspot/index.ts @@ -9,7 +9,7 @@ import type { ListHubspotContactsQueryParams, ListHubspotContactsRequest, ListHubspotContactsResponse, -} from '@supaglue/schemas/v2/data'; +} from '@supaglue/sdk/v2/data'; import type { NextFunction, Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/data/v2/salesforce/index.ts b/apps/api/routes/data/v2/salesforce/index.ts index 852ed627e..df0aed60e 100644 --- a/apps/api/routes/data/v2/salesforce/index.ts +++ b/apps/api/routes/data/v2/salesforce/index.ts @@ -9,7 +9,7 @@ import type { ListSalesforceContactsQueryParams, ListSalesforceContactsRequest, ListSalesforceContactsResponse, -} from '@supaglue/schemas/v2/data'; +} from '@supaglue/sdk/v2/data'; import type { NextFunction, Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/account.integration.test.ts b/apps/api/routes/engagement/v2/account.integration.test.ts index c5ead36d4..f71d793b4 100644 --- a/apps/api/routes/engagement/v2/account.integration.test.ts +++ b/apps/api/routes/engagement/v2/account.integration.test.ts @@ -12,7 +12,7 @@ import type { ListAccountsSuccessfulResponse, UpdateAccountSuccessfulResponse, UpsertAccountSuccessfulResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; describe('account', () => { let testAccount: CreateAccountRequest['record']; diff --git a/apps/api/routes/engagement/v2/account.ts b/apps/api/routes/engagement/v2/account.ts index 5e5ae8880..a817d3231 100644 --- a/apps/api/routes/engagement/v2/account.ts +++ b/apps/api/routes/engagement/v2/account.ts @@ -24,7 +24,7 @@ import type { UpsertAccountPathParams, UpsertAccountRequest, UpsertAccountResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import { camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/contact.integration.test.ts b/apps/api/routes/engagement/v2/contact.integration.test.ts index b8b8904d7..5a2626acf 100644 --- a/apps/api/routes/engagement/v2/contact.integration.test.ts +++ b/apps/api/routes/engagement/v2/contact.integration.test.ts @@ -12,7 +12,7 @@ import type { ListContactsSuccessfulResponse, SearchContactsSuccessfulResponse, UpdateContactSuccessfulResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; jest.retryTimes(3); diff --git a/apps/api/routes/engagement/v2/contact.ts b/apps/api/routes/engagement/v2/contact.ts index d25fa584d..73b0e0e60 100644 --- a/apps/api/routes/engagement/v2/contact.ts +++ b/apps/api/routes/engagement/v2/contact.ts @@ -21,7 +21,7 @@ import type { UpdateContactQueryParams, UpdateContactRequest, UpdateContactResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import { camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/mailbox.ts b/apps/api/routes/engagement/v2/mailbox.ts index 332c5a925..d2bd22ca1 100644 --- a/apps/api/routes/engagement/v2/mailbox.ts +++ b/apps/api/routes/engagement/v2/mailbox.ts @@ -10,7 +10,7 @@ import type { ListMailboxesQueryParams, ListMailboxesRequest, ListMailboxesResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/sequence.integration.test.ts b/apps/api/routes/engagement/v2/sequence.integration.test.ts index 6d3691156..dbeffc09a 100644 --- a/apps/api/routes/engagement/v2/sequence.integration.test.ts +++ b/apps/api/routes/engagement/v2/sequence.integration.test.ts @@ -16,7 +16,7 @@ import type { ListSequencesSuccessfulResponse, SearchSequenceStatesRequest, SearchSequenceStatesSuccessfulResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; jest.retryTimes(3); diff --git a/apps/api/routes/engagement/v2/sequence.ts b/apps/api/routes/engagement/v2/sequence.ts index 1039b5122..2b322c741 100644 --- a/apps/api/routes/engagement/v2/sequence.ts +++ b/apps/api/routes/engagement/v2/sequence.ts @@ -16,7 +16,7 @@ import type { ListSequencesQueryParams, ListSequencesRequest, ListSequencesResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import { camelcaseKeysSansCustomFields } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/sequence_state.ts b/apps/api/routes/engagement/v2/sequence_state.ts index 0f4988ace..787622310 100644 --- a/apps/api/routes/engagement/v2/sequence_state.ts +++ b/apps/api/routes/engagement/v2/sequence_state.ts @@ -20,7 +20,7 @@ import type { SearchSequenceStatesQueryParams, SearchSequenceStatesRequest, SearchSequenceStatesResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import { camelcaseKeys, camelcaseKeysSansCustomFields } from '@supaglue/utils/camelcase'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/engagement/v2/user.ts b/apps/api/routes/engagement/v2/user.ts index be2b0abc2..d252545a2 100644 --- a/apps/api/routes/engagement/v2/user.ts +++ b/apps/api/routes/engagement/v2/user.ts @@ -10,7 +10,7 @@ import type { ListUsersQueryParams, ListUsersRequest, ListUsersResponse, -} from '@supaglue/schemas/v2/engagement'; +} from '@supaglue/sdk/v2/engagement'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/enrichment/v2/person.ts b/apps/api/routes/enrichment/v2/person.ts index 4b495b98c..ed8f23526 100644 --- a/apps/api/routes/enrichment/v2/person.ts +++ b/apps/api/routes/enrichment/v2/person.ts @@ -4,7 +4,7 @@ import type { EnrichPersonQueryParams, EnrichPersonRequest, EnrichPersonResponse, -} from '@supaglue/schemas/v2/enrichment'; +} from '@supaglue/sdk/v2/enrichment'; import { snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/internal/customer/index.ts b/apps/api/routes/internal/customer/index.ts index e7090ab54..422cb7c1a 100644 --- a/apps/api/routes/internal/customer/index.ts +++ b/apps/api/routes/internal/customer/index.ts @@ -11,7 +11,7 @@ import type { UpsertCustomerPathParams, UpsertCustomerRequest, UpsertCustomerResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/internal/destination/index.ts b/apps/api/routes/internal/destination/index.ts index 3fa3bb26e..2770c5daf 100644 --- a/apps/api/routes/internal/destination/index.ts +++ b/apps/api/routes/internal/destination/index.ts @@ -12,7 +12,7 @@ import type { UpdateDestinationPathParams, UpdateDestinationRequest, UpdateDestinationResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/internal/provider/index.ts b/apps/api/routes/internal/provider/index.ts index ca2fbf67f..2c4add701 100644 --- a/apps/api/routes/internal/provider/index.ts +++ b/apps/api/routes/internal/provider/index.ts @@ -16,7 +16,7 @@ import type { UpdateProviderPathParams, UpdateProviderRequest, UpdateProviderResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { ProviderCreateParams, ProviderUpdateParams } from '@supaglue/types'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; diff --git a/apps/api/routes/marketing-automation/v2/forms.ts b/apps/api/routes/marketing-automation/v2/forms.ts index d871fb981..d667add71 100644 --- a/apps/api/routes/marketing-automation/v2/forms.ts +++ b/apps/api/routes/marketing-automation/v2/forms.ts @@ -13,7 +13,7 @@ import type { SubmitFormQueryParams, SubmitFormRequest, SubmitFormResponse, -} from '@supaglue/schemas/v2/marketing-automation'; +} from '@supaglue/sdk/v2/marketing-automation'; import { snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/metadata/v2/object/index.ts b/apps/api/routes/metadata/v2/object/index.ts index a0972b64b..cecbfa638 100644 --- a/apps/api/routes/metadata/v2/object/index.ts +++ b/apps/api/routes/metadata/v2/object/index.ts @@ -7,7 +7,7 @@ import type { ListStandardObjectsPathParams, ListStandardObjectsRequest, ListStandardObjectsResponse, -} from '@supaglue/schemas/v2/metadata'; +} from '@supaglue/sdk/v2/metadata'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/metadata/v2/property/index.ts b/apps/api/routes/metadata/v2/property/index.ts index 11aa22e41..e69c89830 100644 --- a/apps/api/routes/metadata/v2/property/index.ts +++ b/apps/api/routes/metadata/v2/property/index.ts @@ -5,7 +5,7 @@ import type { ListPropertiesDeprecatedQueryParams, ListPropertiesDeprecatedRequest, ListPropertiesDeprecatedResponse, -} from '@supaglue/schemas/v2/metadata'; +} from '@supaglue/sdk/v2/metadata'; import { snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/mgmt/v2/connection_sync_config/index.ts b/apps/api/routes/mgmt/v2/connection_sync_config/index.ts index e319a88f1..844fead92 100644 --- a/apps/api/routes/mgmt/v2/connection_sync_config/index.ts +++ b/apps/api/routes/mgmt/v2/connection_sync_config/index.ts @@ -11,7 +11,7 @@ import type { UpsertConnectionSyncConfigPathParams, UpsertConnectionSyncConfigRequest, UpsertConnectionSyncConfigResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys, snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/mgmt/v2/customer/connection/connection.integration.test.ts b/apps/api/routes/mgmt/v2/customer/connection/connection.integration.test.ts index 5d1c5852f..03f9abf83 100644 --- a/apps/api/routes/mgmt/v2/customer/connection/connection.integration.test.ts +++ b/apps/api/routes/mgmt/v2/customer/connection/connection.integration.test.ts @@ -9,7 +9,7 @@ import type { GetConnectionsFailureResponse, GetConnectionsSuccessfulResponse, GetConnectionSuccessfulResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; const { CUSTOMER_ID } = process.env; diff --git a/apps/api/routes/mgmt/v2/customer/connection/index.ts b/apps/api/routes/mgmt/v2/customer/connection/index.ts index 97230c302..ad1333c58 100644 --- a/apps/api/routes/mgmt/v2/customer/connection/index.ts +++ b/apps/api/routes/mgmt/v2/customer/connection/index.ts @@ -21,7 +21,7 @@ import type { GetRateLimitInfoPathParams, GetRateLimitInfoRequest, GetRateLimitInfoResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/customer/customer.integration.test.ts b/apps/api/routes/mgmt/v2/customer/customer.integration.test.ts index 61b221a7f..7ef3d5671 100644 --- a/apps/api/routes/mgmt/v2/customer/customer.integration.test.ts +++ b/apps/api/routes/mgmt/v2/customer/customer.integration.test.ts @@ -5,7 +5,7 @@ * @jest-environment ./integration-test-environment */ -import type { UpsertCustomerRequest, UpsertCustomerSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpsertCustomerRequest, UpsertCustomerSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; describe('customer', () => { it('upsert creates a new customer', async () => { diff --git a/apps/api/routes/mgmt/v2/customer/index.ts b/apps/api/routes/mgmt/v2/customer/index.ts index b0aa82aec..4c2a4a09e 100644 --- a/apps/api/routes/mgmt/v2/customer/index.ts +++ b/apps/api/routes/mgmt/v2/customer/index.ts @@ -12,7 +12,7 @@ import type { UpsertCustomerPathParams, UpsertCustomerRequest, UpsertCustomerResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/entity/index.ts b/apps/api/routes/mgmt/v2/entity/index.ts index ae9dfe47a..8cd72adba 100644 --- a/apps/api/routes/mgmt/v2/entity/index.ts +++ b/apps/api/routes/mgmt/v2/entity/index.ts @@ -15,7 +15,7 @@ import type { UpdateEntityPathParams, UpdateEntityRequest, UpdateEntityResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/entity_mapping/index.ts b/apps/api/routes/mgmt/v2/entity_mapping/index.ts index fb462170a..63f647911 100644 --- a/apps/api/routes/mgmt/v2/entity_mapping/index.ts +++ b/apps/api/routes/mgmt/v2/entity_mapping/index.ts @@ -10,7 +10,7 @@ import type { UpsertEntityMappingPathParams, UpsertEntityMappingRequest, UpsertEntityMappingResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/field_mapping/index.ts b/apps/api/routes/mgmt/v2/field_mapping/index.ts index b603f49ca..ab277d2a4 100644 --- a/apps/api/routes/mgmt/v2/field_mapping/index.ts +++ b/apps/api/routes/mgmt/v2/field_mapping/index.ts @@ -9,7 +9,7 @@ import type { UpdateObjectFieldMappingsPathParams, UpdateObjectFieldMappingsRequest, UpdateObjectFieldMappingsResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { ObjectFieldMappingInfo, ProviderObject, Schema, SchemaMappingsConfigForObject } from '@supaglue/types'; import { camelcaseKeys, snakecaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/magic_link/index.ts b/apps/api/routes/mgmt/v2/magic_link/index.ts index b5ad00c85..17974df02 100644 --- a/apps/api/routes/mgmt/v2/magic_link/index.ts +++ b/apps/api/routes/mgmt/v2/magic_link/index.ts @@ -9,7 +9,7 @@ import type { GetMagicLinksPathParams, GetMagicLinksRequest, GetMagicLinksResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { MagicLink } from '@supaglue/types'; import { camelcaseKeys } from '@supaglue/utils'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/provider/index.ts b/apps/api/routes/mgmt/v2/provider/index.ts index 44cfd1b86..4647143cb 100644 --- a/apps/api/routes/mgmt/v2/provider/index.ts +++ b/apps/api/routes/mgmt/v2/provider/index.ts @@ -7,7 +7,7 @@ import type { GetProvidersPathParams, GetProvidersRequest, GetProvidersResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/mgmt/v2/schema/index.ts b/apps/api/routes/mgmt/v2/schema/index.ts index e24e820b6..1d9cad9f2 100644 --- a/apps/api/routes/mgmt/v2/schema/index.ts +++ b/apps/api/routes/mgmt/v2/schema/index.ts @@ -15,7 +15,7 @@ import type { UpdateSchemaPathParams, UpdateSchemaRequest, UpdateSchemaResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import type { Request, Response } from 'express'; diff --git a/apps/api/routes/mgmt/v2/sync/index.ts b/apps/api/routes/mgmt/v2/sync/index.ts index 5974e4337..4cd4a5d05 100644 --- a/apps/api/routes/mgmt/v2/sync/index.ts +++ b/apps/api/routes/mgmt/v2/sync/index.ts @@ -19,7 +19,7 @@ import type { TriggerSyncQueryParams, TriggerSyncRequest, TriggerSyncResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { ObjectSyncDTO } from '@supaglue/types/sync'; import type { Request, Response } from 'express'; import { Router } from 'express'; diff --git a/apps/api/routes/mgmt/v2/sync_config/index.ts b/apps/api/routes/mgmt/v2/sync_config/index.ts index 76a00d41b..02ca25888 100644 --- a/apps/api/routes/mgmt/v2/sync_config/index.ts +++ b/apps/api/routes/mgmt/v2/sync_config/index.ts @@ -17,7 +17,7 @@ import type { UpdateSyncConfigQueryParams, UpdateSyncConfigRequest, UpdateSyncConfigResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { CommonObjectType } from '@supaglue/types'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; diff --git a/apps/api/routes/mgmt/v2/sync_run/index.ts b/apps/api/routes/mgmt/v2/sync_run/index.ts index 9015303fb..d7bde8cfa 100644 --- a/apps/api/routes/mgmt/v2/sync_run/index.ts +++ b/apps/api/routes/mgmt/v2/sync_run/index.ts @@ -6,7 +6,7 @@ import type { GetSyncRunsQueryParams, GetSyncRunsRequest, GetSyncRunsResponse, -} from '@supaglue/schemas/v2/mgmt'; +} from '@supaglue/sdk/v2/mgmt'; import type { SyncRunStatus, SyncRunTimestampFilter } from '@supaglue/types/sync_run'; import { snakecaseKeys } from '@supaglue/utils/snakecase'; import { Router, type Request, type Response } from 'express'; diff --git a/apps/api/setupTests.ts b/apps/api/setupTests.ts index 6a78cd50e..f99c58a3f 100644 --- a/apps/api/setupTests.ts +++ b/apps/api/setupTests.ts @@ -1,4 +1,4 @@ -import type { SupaglueClient } from '@supaglue/schemas'; +import type { SupaglueClient } from '@supaglue/sdk'; import type { AxiosInstance } from 'axios'; export type AddedObject = { diff --git a/apps/mgmt-ui/package.json b/apps/mgmt-ui/package.json index 4772898b2..c99cf6b86 100644 --- a/apps/mgmt-ui/package.json +++ b/apps/mgmt-ui/package.json @@ -21,7 +21,7 @@ "@mui/x-date-pickers": "^6.0.0", "@mui/x-license-pro": "^6.10.2", "@sentry/nextjs": "^7.77.0", - "@supaglue/schemas": "workspace:^", + "@supaglue/sdk": "workspace:^", "@supaglue/types": "workspace:^", "@supaglue/utils": "workspace:^", "@types/node": "18.14.6", diff --git a/apps/mgmt-ui/src/hooks/useCustomObjects.ts b/apps/mgmt-ui/src/hooks/useCustomObjects.ts index 8b745fb44..b35f6ac07 100644 --- a/apps/mgmt-ui/src/hooks/useCustomObjects.ts +++ b/apps/mgmt-ui/src/hooks/useCustomObjects.ts @@ -1,4 +1,4 @@ -import type { ListCustomObjectsSuccessfulResponse } from '@supaglue/schemas/v2/metadata'; +import type { ListCustomObjectsSuccessfulResponse } from '@supaglue/sdk/v2/metadata'; import { useSWRWithApplication } from './useSWRWithApplication'; export function useCustomObjects(customerId: string, providerName: string) { diff --git a/apps/mgmt-ui/src/hooks/useEntities.ts b/apps/mgmt-ui/src/hooks/useEntities.ts index 93874eb13..989050e8e 100644 --- a/apps/mgmt-ui/src/hooks/useEntities.ts +++ b/apps/mgmt-ui/src/hooks/useEntities.ts @@ -1,4 +1,4 @@ -import type { GetEntitiesSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetEntitiesSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; import type { Entity } from '@supaglue/types/entity'; import { camelcaseKeys, snakecaseKeys } from '@supaglue/utils'; import { useSWRWithApplication } from './useSWRWithApplication'; diff --git a/apps/mgmt-ui/src/hooks/useEntityMappings.ts b/apps/mgmt-ui/src/hooks/useEntityMappings.ts index e91a38b7a..d720dfb69 100644 --- a/apps/mgmt-ui/src/hooks/useEntityMappings.ts +++ b/apps/mgmt-ui/src/hooks/useEntityMappings.ts @@ -1,4 +1,4 @@ -import type { ListEntityMappingsSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { ListEntityMappingsSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; import type { MergedEntityMapping } from '@supaglue/types/entity_mapping'; import { snakecaseKeys } from '@supaglue/utils'; import { camelcaseKeys } from '@supaglue/utils/camelcase'; diff --git a/apps/mgmt-ui/src/hooks/useProperties.ts b/apps/mgmt-ui/src/hooks/useProperties.ts index 94b7e320c..874d2db22 100644 --- a/apps/mgmt-ui/src/hooks/useProperties.ts +++ b/apps/mgmt-ui/src/hooks/useProperties.ts @@ -1,4 +1,4 @@ -import type { ListPropertiesSuccessfulResponse } from '@supaglue/schemas/v2/crm'; +import type { ListPropertiesSuccessfulResponse } from '@supaglue/sdk/v2/crm'; import type { ObjectType } from '@supaglue/types/sync'; import { useSWRWithApplication } from './useSWRWithApplication'; diff --git a/apps/mgmt-ui/src/hooks/useRateLimitInfo.ts b/apps/mgmt-ui/src/hooks/useRateLimitInfo.ts index 16d521309..54bb6f0fc 100644 --- a/apps/mgmt-ui/src/hooks/useRateLimitInfo.ts +++ b/apps/mgmt-ui/src/hooks/useRateLimitInfo.ts @@ -1,4 +1,4 @@ -import type { GetRateLimitInfoResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetRateLimitInfoResponse } from '@supaglue/sdk/v2/mgmt'; import { useSWRWithApplication } from './useSWRWithApplication'; export function useRateLimitInfo(customerId: string, providerName: string) { diff --git a/apps/mgmt-ui/src/hooks/useSchemas.ts b/apps/mgmt-ui/src/hooks/useSchemas.ts index 92671e12e..701f48e51 100644 --- a/apps/mgmt-ui/src/hooks/useSchemas.ts +++ b/apps/mgmt-ui/src/hooks/useSchemas.ts @@ -1,4 +1,4 @@ -import type { GetSchemasSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSchemasSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; import type { Schema } from '@supaglue/types'; import { camelcaseKeys, snakecaseKeys } from '@supaglue/utils'; import { useSWRWithApplication } from './useSWRWithApplication'; diff --git a/apps/mgmt-ui/src/hooks/useStandardObjects.ts b/apps/mgmt-ui/src/hooks/useStandardObjects.ts index ddbf6aacb..4ad08924e 100644 --- a/apps/mgmt-ui/src/hooks/useStandardObjects.ts +++ b/apps/mgmt-ui/src/hooks/useStandardObjects.ts @@ -1,4 +1,4 @@ -import type { ListStandardObjectsSuccessfulResponse } from '@supaglue/schemas/v2/metadata'; +import type { ListStandardObjectsSuccessfulResponse } from '@supaglue/sdk/v2/metadata'; import { useSWRWithApplication } from './useSWRWithApplication'; export function useStandardObjects(customerId: string, providerName: string) { diff --git a/apps/mgmt-ui/src/hooks/useSyncConfig.ts b/apps/mgmt-ui/src/hooks/useSyncConfig.ts index 49ee334c1..1d14d7276 100644 --- a/apps/mgmt-ui/src/hooks/useSyncConfig.ts +++ b/apps/mgmt-ui/src/hooks/useSyncConfig.ts @@ -1,4 +1,4 @@ -import type { GetSyncConfigSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncConfigSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; import type { SyncConfigDTO } from '@supaglue/types'; import type { CommonObjectConfig } from '@supaglue/types/sync_object_config'; import { camelcaseKeys } from '@supaglue/utils'; diff --git a/apps/mgmt-ui/src/hooks/useSyncConfigs.ts b/apps/mgmt-ui/src/hooks/useSyncConfigs.ts index 221db0638..6a04970a5 100644 --- a/apps/mgmt-ui/src/hooks/useSyncConfigs.ts +++ b/apps/mgmt-ui/src/hooks/useSyncConfigs.ts @@ -1,4 +1,4 @@ -import type { GetSyncConfigsSuccessfulResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncConfigsSuccessfulResponse } from '@supaglue/sdk/v2/mgmt'; import type { SyncConfigDTO } from '@supaglue/types'; import { snakecaseKeys } from '@supaglue/utils'; import { useSWRWithApplication } from './useSWRWithApplication'; diff --git a/apps/mgmt-ui/src/pages/api/internal/customers/[...customerId].ts b/apps/mgmt-ui/src/pages/api/internal/customers/[...customerId].ts index 979f52c0d..73d9473f9 100644 --- a/apps/mgmt-ui/src/pages/api/internal/customers/[...customerId].ts +++ b/apps/mgmt-ui/src/pages/api/internal/customers/[...customerId].ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { UpsertCustomerResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpsertCustomerResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/customers/[customerId]/connections/index.ts b/apps/mgmt-ui/src/pages/api/internal/customers/[customerId]/connections/index.ts index c712a62e4..e751e0bb5 100644 --- a/apps/mgmt-ui/src/pages/api/internal/customers/[customerId]/connections/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/customers/[customerId]/connections/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetCustomersResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetCustomersResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../../../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/customers/index.ts b/apps/mgmt-ui/src/pages/api/internal/customers/index.ts index d588b9816..41fa96fe1 100644 --- a/apps/mgmt-ui/src/pages/api/internal/customers/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/customers/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetCustomersResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetCustomersResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/entities/[...entityId].ts b/apps/mgmt-ui/src/pages/api/internal/entities/[...entityId].ts index 4b6c53704..ad1e6ba5b 100644 --- a/apps/mgmt-ui/src/pages/api/internal/entities/[...entityId].ts +++ b/apps/mgmt-ui/src/pages/api/internal/entities/[...entityId].ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetEntitiesResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetEntitiesResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/entities/create.ts b/apps/mgmt-ui/src/pages/api/internal/entities/create.ts index ced0defdd..06f6ea6f4 100644 --- a/apps/mgmt-ui/src/pages/api/internal/entities/create.ts +++ b/apps/mgmt-ui/src/pages/api/internal/entities/create.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { CreateEntityResponse } from '@supaglue/schemas/v2/mgmt'; +import type { CreateEntityResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/entities/index.ts b/apps/mgmt-ui/src/pages/api/internal/entities/index.ts index efce1b8f8..ed9383540 100644 --- a/apps/mgmt-ui/src/pages/api/internal/entities/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/entities/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetEntitiesResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetEntitiesResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/entities/update.ts b/apps/mgmt-ui/src/pages/api/internal/entities/update.ts index 60aa96497..8e84055e7 100644 --- a/apps/mgmt-ui/src/pages/api/internal/entities/update.ts +++ b/apps/mgmt-ui/src/pages/api/internal/entities/update.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { UpdateEntityResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpdateEntityResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/metadata/objects/custom/index.ts b/apps/mgmt-ui/src/pages/api/internal/metadata/objects/custom/index.ts index 41918fa8a..b0632f95a 100644 --- a/apps/mgmt-ui/src/pages/api/internal/metadata/objects/custom/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/metadata/objects/custom/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { ListCustomObjectsResponse } from '@supaglue/schemas/v2/metadata'; +import type { ListCustomObjectsResponse } from '@supaglue/sdk/v2/metadata'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../../../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/metadata/objects/standard/index.ts b/apps/mgmt-ui/src/pages/api/internal/metadata/objects/standard/index.ts index 82a9941d0..9f1700083 100644 --- a/apps/mgmt-ui/src/pages/api/internal/metadata/objects/standard/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/metadata/objects/standard/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { ListStandardObjectsResponse } from '@supaglue/schemas/v2/metadata'; +import type { ListStandardObjectsResponse } from '@supaglue/sdk/v2/metadata'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../../../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/providers/[...providerId].ts b/apps/mgmt-ui/src/pages/api/internal/providers/[...providerId].ts index bcc145421..072768ff3 100644 --- a/apps/mgmt-ui/src/pages/api/internal/providers/[...providerId].ts +++ b/apps/mgmt-ui/src/pages/api/internal/providers/[...providerId].ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { DeleteProviderResponse, GetProvidersResponse } from '@supaglue/schemas/v2/mgmt'; +import type { DeleteProviderResponse, GetProvidersResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/providers/create.ts b/apps/mgmt-ui/src/pages/api/internal/providers/create.ts index a3a42ca5d..f9b329ea6 100644 --- a/apps/mgmt-ui/src/pages/api/internal/providers/create.ts +++ b/apps/mgmt-ui/src/pages/api/internal/providers/create.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { CreateProviderResponse } from '@supaglue/schemas/v2/mgmt'; +import type { CreateProviderResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/providers/index.ts b/apps/mgmt-ui/src/pages/api/internal/providers/index.ts index 8afe4f373..a6491a145 100644 --- a/apps/mgmt-ui/src/pages/api/internal/providers/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/providers/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetProvidersResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetProvidersResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/providers/update.ts b/apps/mgmt-ui/src/pages/api/internal/providers/update.ts index 431f525b2..f45a21f2d 100644 --- a/apps/mgmt-ui/src/pages/api/internal/providers/update.ts +++ b/apps/mgmt-ui/src/pages/api/internal/providers/update.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { UpdateProviderResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpdateProviderResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/schemas/[...schemaId].ts b/apps/mgmt-ui/src/pages/api/internal/schemas/[...schemaId].ts index 6fd5504c2..da09b067d 100644 --- a/apps/mgmt-ui/src/pages/api/internal/schemas/[...schemaId].ts +++ b/apps/mgmt-ui/src/pages/api/internal/schemas/[...schemaId].ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSchemasResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSchemasResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/schemas/create.ts b/apps/mgmt-ui/src/pages/api/internal/schemas/create.ts index d78c40a67..b7ce2e409 100644 --- a/apps/mgmt-ui/src/pages/api/internal/schemas/create.ts +++ b/apps/mgmt-ui/src/pages/api/internal/schemas/create.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { CreateSchemaResponse } from '@supaglue/schemas/v2/mgmt'; +import type { CreateSchemaResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/schemas/index.ts b/apps/mgmt-ui/src/pages/api/internal/schemas/index.ts index 2b752e525..3c6bb8f03 100644 --- a/apps/mgmt-ui/src/pages/api/internal/schemas/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/schemas/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSchemasResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSchemasResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/schemas/update.ts b/apps/mgmt-ui/src/pages/api/internal/schemas/update.ts index 0da63b79c..30a977b49 100644 --- a/apps/mgmt-ui/src/pages/api/internal/schemas/update.ts +++ b/apps/mgmt-ui/src/pages/api/internal/schemas/update.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { UpdateSchemaResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpdateSchemaResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/sync-configs/[...syncConfigId].ts b/apps/mgmt-ui/src/pages/api/internal/sync-configs/[...syncConfigId].ts index 4a437cfd3..055566e9d 100644 --- a/apps/mgmt-ui/src/pages/api/internal/sync-configs/[...syncConfigId].ts +++ b/apps/mgmt-ui/src/pages/api/internal/sync-configs/[...syncConfigId].ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSyncConfigsResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncConfigsResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/sync-configs/create.ts b/apps/mgmt-ui/src/pages/api/internal/sync-configs/create.ts index a501068d5..3d670f812 100644 --- a/apps/mgmt-ui/src/pages/api/internal/sync-configs/create.ts +++ b/apps/mgmt-ui/src/pages/api/internal/sync-configs/create.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { CreateSyncConfigResponse } from '@supaglue/schemas/v2/mgmt'; +import type { CreateSyncConfigResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/sync-configs/index.ts b/apps/mgmt-ui/src/pages/api/internal/sync-configs/index.ts index 0e2c317e7..984216a9c 100644 --- a/apps/mgmt-ui/src/pages/api/internal/sync-configs/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/sync-configs/index.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSyncConfigsResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncConfigsResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/sync-configs/update.ts b/apps/mgmt-ui/src/pages/api/internal/sync-configs/update.ts index a9054bf74..037c1667e 100644 --- a/apps/mgmt-ui/src/pages/api/internal/sync-configs/update.ts +++ b/apps/mgmt-ui/src/pages/api/internal/sync-configs/update.ts @@ -1,5 +1,5 @@ import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { UpdateSyncConfigResponse } from '@supaglue/schemas/v2/mgmt'; +import type { UpdateSyncConfigResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/sync-runs/index.ts b/apps/mgmt-ui/src/pages/api/internal/sync-runs/index.ts index edb4a0032..a350c3c2f 100644 --- a/apps/mgmt-ui/src/pages/api/internal/sync-runs/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/sync-runs/index.ts @@ -1,6 +1,6 @@ import { maybeAddFilter } from '@/utils/filter'; import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSyncRunsResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncRunsResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/apps/mgmt-ui/src/pages/api/internal/syncs/index.ts b/apps/mgmt-ui/src/pages/api/internal/syncs/index.ts index f7f3e6ed2..3d591bf89 100644 --- a/apps/mgmt-ui/src/pages/api/internal/syncs/index.ts +++ b/apps/mgmt-ui/src/pages/api/internal/syncs/index.ts @@ -1,6 +1,6 @@ import { maybeAddFilter } from '@/utils/filter'; import { getApplicationIdScopedHeaders } from '@/utils/headers'; -import type { GetSyncRunsResponse } from '@supaglue/schemas/v2/mgmt'; +import type { GetSyncRunsResponse } from '@supaglue/sdk/v2/mgmt'; import type { NextApiRequest, NextApiResponse } from 'next'; import { API_HOST } from '../..'; diff --git a/package.json b/package.json index bfba7002c..fcb99b030 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "supaglue", "version": "0.24.0", + "description": "Unified API for product integrations", "packageManager": "yarn@3.4.1", "private": true, "workspaces": [ diff --git a/packages/core/package.json b/packages/core/package.json index 442637b08..76ddde3b0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -11,7 +11,7 @@ "@hubspot/api-client": "9.1.0", "@linear/sdk": "^7.0.1", "@supaglue/db": "workspace:*", - "@supaglue/schemas": "workspace:*", + "@supaglue/sdk": "workspace:*", "@supaglue/types": "workspace:^", "@supaglue/utils": "workspace:*", "@temporalio/proto": "^1.8.6", diff --git a/packages/core/services/webhook_service.ts b/packages/core/services/webhook_service.ts index e1bda9199..307f28b68 100644 --- a/packages/core/services/webhook_service.ts +++ b/packages/core/services/webhook_service.ts @@ -1,5 +1,5 @@ import type { PrismaClient } from '@supaglue/db'; -import type { WebhookPayloads, WebhookType } from '@supaglue/schemas/v2/mgmt'; +import type { WebhookPayloads, WebhookType } from '@supaglue/sdk/v2/mgmt'; import { Svix } from 'svix'; import type { ApplicationService } from './application_service'; diff --git a/packages/schemas/README.md b/packages/schemas/README.md deleted file mode 100644 index fbafaceb6..000000000 --- a/packages/schemas/README.md +++ /dev/null @@ -1,2 +0,0 @@ - -# TODO: Maybe rename schemas to SDK so it works diff --git a/packages/sdk/.npmignore b/packages/sdk/.npmignore new file mode 100644 index 000000000..a5fcf3a59 --- /dev/null +++ b/packages/sdk/.npmignore @@ -0,0 +1,3 @@ +scripts/**/* +types/**/* +v2/**/* diff --git a/packages/sdk/README.md b/packages/sdk/README.md new file mode 100644 index 000000000..87541ba1e --- /dev/null +++ b/packages/sdk/README.md @@ -0,0 +1 @@ +# Supaglue SDK diff --git a/packages/schemas/gen/v2/actions.ts b/packages/sdk/gen/v2/actions.ts similarity index 100% rename from packages/schemas/gen/v2/actions.ts rename to packages/sdk/gen/v2/actions.ts diff --git a/packages/schemas/gen/v2/crm.ts b/packages/sdk/gen/v2/crm.ts similarity index 100% rename from packages/schemas/gen/v2/crm.ts rename to packages/sdk/gen/v2/crm.ts diff --git a/packages/schemas/gen/v2/data.ts b/packages/sdk/gen/v2/data.ts similarity index 100% rename from packages/schemas/gen/v2/data.ts rename to packages/sdk/gen/v2/data.ts diff --git a/packages/schemas/gen/v2/engagement.ts b/packages/sdk/gen/v2/engagement.ts similarity index 100% rename from packages/schemas/gen/v2/engagement.ts rename to packages/sdk/gen/v2/engagement.ts diff --git a/packages/schemas/gen/v2/enrichment.ts b/packages/sdk/gen/v2/enrichment.ts similarity index 100% rename from packages/schemas/gen/v2/enrichment.ts rename to packages/sdk/gen/v2/enrichment.ts diff --git a/packages/schemas/gen/v2/marketing-automation.ts b/packages/sdk/gen/v2/marketing-automation.ts similarity index 100% rename from packages/schemas/gen/v2/marketing-automation.ts rename to packages/sdk/gen/v2/marketing-automation.ts diff --git a/packages/schemas/gen/v2/metadata.ts b/packages/sdk/gen/v2/metadata.ts similarity index 100% rename from packages/schemas/gen/v2/metadata.ts rename to packages/sdk/gen/v2/metadata.ts diff --git a/packages/schemas/gen/v2/mgmt.ts b/packages/sdk/gen/v2/mgmt.ts similarity index 100% rename from packages/schemas/gen/v2/mgmt.ts rename to packages/sdk/gen/v2/mgmt.ts diff --git a/packages/schemas/gen/v2/ticketing.ts b/packages/sdk/gen/v2/ticketing.ts similarity index 100% rename from packages/schemas/gen/v2/ticketing.ts rename to packages/sdk/gen/v2/ticketing.ts diff --git a/packages/schemas/index.ts b/packages/sdk/index.ts similarity index 100% rename from packages/schemas/index.ts rename to packages/sdk/index.ts diff --git a/packages/schemas/package.json b/packages/sdk/package.json similarity index 86% rename from packages/schemas/package.json rename to packages/sdk/package.json index c529d88b1..21f25e9b9 100644 --- a/packages/schemas/package.json +++ b/packages/sdk/package.json @@ -1,9 +1,11 @@ { - "name": "@supaglue/schemas", + "name": "@supaglue/sdk", "version": "0.24.0", "scripts": { "generate": "tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/crm/openapi.bundle.json gen/v2/crm.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/mgmt/openapi.bundle.json gen/v2/mgmt.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/engagement/openapi.bundle.json gen/v2/engagement.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/actions/openapi.bundle.json gen/v2/actions.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/metadata/openapi.bundle.json gen/v2/metadata.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/data/openapi.bundle.json gen/v2/data.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/enrichment/openapi.bundle.json gen/v2/enrichment.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/marketing-automation/openapi.bundle.json gen/v2/marketing-automation.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/v2/ticketing/openapi.bundle.json gen/v2/ticketing.ts", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "build": "tsc --project .", + "clean": "rm -rf dist" }, "dependencies": { "openapi-fetch": "0.8.1" @@ -12,6 +14,10 @@ "global-agent": "^3.0.0", "openapi-typescript": "^6.7.0", "tsx": "^3.12.3", + "typescript": "^5.3.2", "undici": "^5.27.2" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/schemas/proxy.bootstrap.ts b/packages/sdk/proxy.bootstrap.ts similarity index 100% rename from packages/schemas/proxy.bootstrap.ts rename to packages/sdk/proxy.bootstrap.ts diff --git a/packages/schemas/scripts/generate_typescript_from_openapi.ts b/packages/sdk/scripts/generate_typescript_from_openapi.ts similarity index 100% rename from packages/schemas/scripts/generate_typescript_from_openapi.ts rename to packages/sdk/scripts/generate_typescript_from_openapi.ts diff --git a/packages/schemas/supaglue-client.ts b/packages/sdk/supaglue-client.ts similarity index 100% rename from packages/schemas/supaglue-client.ts rename to packages/sdk/supaglue-client.ts diff --git a/packages/schemas/tsconfig.json b/packages/sdk/tsconfig.json similarity index 51% rename from packages/schemas/tsconfig.json rename to packages/sdk/tsconfig.json index 6a2f6178d..d03681aba 100644 --- a/packages/schemas/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -3,9 +3,11 @@ "compilerOptions": { "outDir": "dist", "rootDir": ".", - "moduleResolution": "node16", "resolveJsonModule": true, - "sourceMap": true + "sourceMap": true, + "declaration": true, + "declarationMap": true }, - "include": ["./**/*.ts"] + "include": ["./**/*.ts"], + "exclude": ["./scripts", "./types"] } diff --git a/packages/schemas/types/openapi-typescript.d.ts b/packages/sdk/types/openapi-typescript.d.ts similarity index 100% rename from packages/schemas/types/openapi-typescript.d.ts rename to packages/sdk/types/openapi-typescript.d.ts diff --git a/packages/schemas/v2/actions.ts b/packages/sdk/v2/actions.ts similarity index 100% rename from packages/schemas/v2/actions.ts rename to packages/sdk/v2/actions.ts diff --git a/packages/schemas/v2/crm.ts b/packages/sdk/v2/crm.ts similarity index 100% rename from packages/schemas/v2/crm.ts rename to packages/sdk/v2/crm.ts diff --git a/packages/schemas/v2/data.ts b/packages/sdk/v2/data.ts similarity index 100% rename from packages/schemas/v2/data.ts rename to packages/sdk/v2/data.ts diff --git a/packages/schemas/v2/engagement.ts b/packages/sdk/v2/engagement.ts similarity index 100% rename from packages/schemas/v2/engagement.ts rename to packages/sdk/v2/engagement.ts diff --git a/packages/schemas/v2/enrichment.ts b/packages/sdk/v2/enrichment.ts similarity index 100% rename from packages/schemas/v2/enrichment.ts rename to packages/sdk/v2/enrichment.ts diff --git a/packages/schemas/v2/marketing-automation.ts b/packages/sdk/v2/marketing-automation.ts similarity index 100% rename from packages/schemas/v2/marketing-automation.ts rename to packages/sdk/v2/marketing-automation.ts diff --git a/packages/schemas/v2/metadata.ts b/packages/sdk/v2/metadata.ts similarity index 100% rename from packages/schemas/v2/metadata.ts rename to packages/sdk/v2/metadata.ts diff --git a/packages/schemas/v2/mgmt.ts b/packages/sdk/v2/mgmt.ts similarity index 100% rename from packages/schemas/v2/mgmt.ts rename to packages/sdk/v2/mgmt.ts diff --git a/packages/types/engagement/sequence_step.ts b/packages/types/engagement/sequence_step.ts index 1f7a8ea2a..20c277b7d 100644 --- a/packages/types/engagement/sequence_step.ts +++ b/packages/types/engagement/sequence_step.ts @@ -1,4 +1,4 @@ -import type { EngagementV2 } from '@supaglue/schemas/v2/engagement'; +import type { EngagementV2 } from '@supaglue/sdk/v2/engagement'; import type { SnakecasedKeys } from '../snakecased_keys'; import type { BaseEngagementModel, SnakecasedEngagementTenantFields } from './base'; diff --git a/packages/types/package.json b/packages/types/package.json index aba20f3e1..2a98089fe 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -6,7 +6,7 @@ "types": "index.ts", "packageManager": "yarn@3.4.1", "devDependencies": { - "@supaglue/schemas": "workspace:*", + "@supaglue/sdk": "workspace:*", "@tsconfig/node18": "^1.0.1", "typescript": "^4.9.5" }, diff --git a/turbo.json b/turbo.json index 54e3bf795..c04678e25 100644 --- a/turbo.json +++ b/turbo.json @@ -8,8 +8,8 @@ "@supaglue/db#build": { "dependsOn": ["@supaglue/db#generate"] }, - "@supaglue/schemas#build": { - "dependsOn": ["@supaglue/schemas#generate"] + "@supaglue/sdk#build": { + "dependsOn": ["@supaglue/sdk#generate"] }, "docs#generate": { "dependsOn": ["//#bundle-openapi"], @@ -63,7 +63,7 @@ "outputs": ["openapi/**/openapi.bundle.json"], "outputMode": "errors-only" }, - "@supaglue/schemas#generate": { + "@supaglue/sdk#generate": { "dependsOn": ["//#bundle-openapi"], "inputs": ["../../openapi/**/*.yaml"], "outputs": ["gen/**"], diff --git a/yarn.lock b/yarn.lock index aab4984cd..9d30aa7df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6324,7 +6324,7 @@ __metadata: "@hubspot/api-client": 9.1.0 "@linear/sdk": ^7.0.1 "@supaglue/db": "workspace:*" - "@supaglue/schemas": "workspace:*" + "@supaglue/sdk": "workspace:*" "@supaglue/types": "workspace:^" "@supaglue/utils": "workspace:*" "@temporalio/proto": ^1.8.6 @@ -6382,14 +6382,15 @@ __metadata: languageName: unknown linkType: soft -"@supaglue/schemas@workspace:*, @supaglue/schemas@workspace:^, @supaglue/schemas@workspace:packages/schemas": +"@supaglue/sdk@workspace:*, @supaglue/sdk@workspace:^, @supaglue/sdk@workspace:packages/sdk": version: 0.0.0-use.local - resolution: "@supaglue/schemas@workspace:packages/schemas" + resolution: "@supaglue/sdk@workspace:packages/sdk" dependencies: global-agent: ^3.0.0 openapi-fetch: 0.8.1 openapi-typescript: ^6.7.0 tsx: ^3.12.3 + typescript: ^5.3.2 undici: ^5.27.2 languageName: unknown linkType: soft @@ -6416,7 +6417,7 @@ __metadata: version: 0.0.0-use.local resolution: "@supaglue/types@workspace:packages/types" dependencies: - "@supaglue/schemas": "workspace:*" + "@supaglue/sdk": "workspace:*" "@tsconfig/node18": ^1.0.1 typescript: ^4.9.5 languageName: unknown @@ -8503,7 +8504,7 @@ __metadata: "@hapi/boom": ^10.0.1 "@supaglue/core": "workspace:*" "@supaglue/db": "workspace:*" - "@supaglue/schemas": "workspace:*" + "@supaglue/sdk": "workspace:*" "@supaglue/sync-workflows": "workspace:*" "@supaglue/utils": "workspace:*" "@swc/core": ^1.3.96 @@ -17135,7 +17136,7 @@ __metadata: "@mui/x-date-pickers": ^6.0.0 "@mui/x-license-pro": ^6.10.2 "@sentry/nextjs": ^7.77.0 - "@supaglue/schemas": "workspace:^" + "@supaglue/sdk": "workspace:^" "@supaglue/types": "workspace:^" "@supaglue/utils": "workspace:^" "@types/luxon": ^3 @@ -24150,6 +24151,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.3.2": + version: 5.3.2 + resolution: "typescript@npm:5.3.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: d92534dda639eb825db013203404c1fabca8ac630564283c9e7dc9e64fd9c9346c2de95ecebdf3e6e8c1c32941bca1cfe0da37877611feb9daf8feeaea58d230 + languageName: node + linkType: hard + "typescript@patch:typescript@4.9.5#~builtin, typescript@patch:typescript@^4.6.4#~builtin, typescript@patch:typescript@^4.7.4#~builtin, typescript@patch:typescript@^4.9.5#~builtin": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" @@ -24160,6 +24171,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@^5.3.2#~builtin": + version: 5.3.2 + resolution: "typescript@patch:typescript@npm%3A5.3.2#~builtin::version=5.3.2&hash=1f5320" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: c034461079fbfde3cb584ddee52afccb15b6e32a0ce186d0b2719968786f7ca73e1b07f71fac4163088790b16811c6ccf79680de190664ef66ff0ba9c1fe4a23 + languageName: node + linkType: hard + "ua-parser-js@npm:^0.7.30": version: 0.7.33 resolution: "ua-parser-js@npm:0.7.33"