Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
chore: rename @supaglue/schemas to @supaglue/sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Dec 6, 2023
1 parent 4494cc0 commit 7d71dfd
Show file tree
Hide file tree
Showing 94 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions apps/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions apps/api/integration-test-environment.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/actions/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/account.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
ListAccountsSuccessfulResponse,
UpdateAccountSuccessfulResponse,
UpsertAccountSuccessfulResponse,
} from '@supaglue/schemas/v2/crm';
} from '@supaglue/sdk/v2/crm';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/associations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/contact.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
UpdateContactSuccessfulResponse,
UpsertContactRequest,
UpsertContactSuccessfulResponse,
} from '@supaglue/schemas/v2/crm';
} from '@supaglue/sdk/v2/crm';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
GetCustomObjectRecordSuccessfulResponse,
ListCustomObjectRecordsSuccessfulResponse,
UpdateCustomObjectRecordSuccessfulResponse,
} from '@supaglue/schemas/v2/crm';
} from '@supaglue/sdk/v2/crm';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/custom_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/lead.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
UpdateLeadSuccessfulResponse,
UpsertLeadRequest,
UpsertLeadSuccessfulResponse,
} from '@supaglue/schemas/v2/crm';
} from '@supaglue/sdk/v2/crm';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/lead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
ListListsQueryParams,
ListListsRequest,
ListListsResponse,
} from '@supaglue/schemas/v2/crm';
} from '@supaglue/sdk/v2/crm';
import type {
SnakecasedKeysCrmAccount,
SnakecasedKeysCrmContact,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/metadata/associations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/metadata/custom_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/metadata/properties/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/metadata/standard_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/opportunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/standard_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/crm/v2/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/data/v2/hubspot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/data/v2/salesforce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/account.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/contact.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
ListContactsSuccessfulResponse,
SearchContactsSuccessfulResponse,
UpdateContactSuccessfulResponse,
} from '@supaglue/schemas/v2/engagement';
} from '@supaglue/sdk/v2/engagement';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/mailbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/sequence.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type {
ListSequencesSuccessfulResponse,
SearchSequenceStatesRequest,
SearchSequenceStatesSuccessfulResponse,
} from '@supaglue/schemas/v2/engagement';
} from '@supaglue/sdk/v2/engagement';

jest.retryTimes(3);

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/sequence_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/engagement/v2/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/enrichment/v2/person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/internal/customer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/internal/destination/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/internal/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/marketing-automation/v2/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/metadata/v2/object/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/metadata/v2/property/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/mgmt/v2/connection_sync_config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
GetConnectionsFailureResponse,
GetConnectionsSuccessfulResponse,
GetConnectionSuccessfulResponse,
} from '@supaglue/schemas/v2/mgmt';
} from '@supaglue/sdk/v2/mgmt';

const { CUSTOMER_ID } = process.env;

Expand Down
2 changes: 1 addition & 1 deletion apps/api/routes/mgmt/v2/customer/connection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Loading

0 comments on commit 7d71dfd

Please sign in to comment.