From 852ceec96ff18c63030e222bfbc5adae905a0d69 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung Date: Fri, 27 Dec 2024 12:27:16 -0500 Subject: [PATCH] Use new package types --- packages/app-store/salesforce/lib/CrmService.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/app-store/salesforce/lib/CrmService.ts b/packages/app-store/salesforce/lib/CrmService.ts index a1e50ca44c8a2f..f31cbe7d383cb8 100644 --- a/packages/app-store/salesforce/lib/CrmService.ts +++ b/packages/app-store/salesforce/lib/CrmService.ts @@ -1,4 +1,4 @@ -import type { TokenResponse } from "@jsforce/jsforce-node"; +import type { TokenResponse, Connection, QueryResult, Field } from "@jsforce/jsforce-node"; import jsforce from "@jsforce/jsforce-node"; import { RRule } from "rrule"; import { z } from "zod"; @@ -64,7 +64,7 @@ const salesforceTokenSchema = z.object({ export default class SalesforceCRMService implements CRM { private integrationName = ""; - private conn!: Promise; + private conn!: Promise; private log: typeof logger; private calWarnings: string[] = []; private appOptions: any; @@ -463,7 +463,7 @@ export default class SalesforceCRMService implements CRM { ); // Filter out any undefined results and ensure records exist - const validOwnersQuery = ownersQuery.filter((query): query is jsforce.QueryResult => { + const validOwnersQuery = ownersQuery.filter((query): query is QueryResult => { const firstRecord = query?.records?.[0]; if (!firstRecord) return false; @@ -838,7 +838,7 @@ export default class SalesforceCRMService implements CRM { const conn = await this.conn; const fieldSet = new Set(fieldsToTest); - const foundFields: jsforce.Field[] = []; + const foundFields: Field[] = []; try { const salesforceEntity = await conn.describe(sobject); @@ -979,7 +979,7 @@ export default class SalesforceCRMService implements CRM { organizerEmail, calEventResponses, }: { - existingFields: jsforce.Field[]; + existingFields: Field[]; personRecord: Record; onBookingWriteToRecordFields: Record; startTime: string; @@ -1136,7 +1136,7 @@ export default class SalesforceCRMService implements CRM { private async fetchPersonRecord( contactId: string, - existingFields: jsforce.Field[], + existingFields: Field[], personRecordType: SalesforceRecordEnum ): Promise | null> { const conn = await this.conn;