Skip to content

Commit

Permalink
🐛 fix missing relates to in contact validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfrhafe committed Oct 2, 2024
1 parent 962d2c8 commit e3a3a91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 41 deletions.
31 changes: 0 additions & 31 deletions src/schemas/calendar-events.ts

This file was deleted.

9 changes: 9 additions & 0 deletions src/schemas/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ import { IntegrationEntityType } from '../models/integration-entity.model';
// },
// };

const integrationEntitySchema = z.object({
id: z.string(),
type: z.nativeEnum(IntegrationEntityType),
source: z.string(),
label: z.string().optional(),
logId: z.string().optional(),
});

export const contactSchema = z.object({
id: z.string(),
name: z.string().nullable(),
Expand All @@ -83,6 +91,7 @@ export const contactSchema = z.object({
}),
),
type: z.nativeEnum(IntegrationEntityType).optional(),
relatesTo: z.array(integrationEntitySchema).optional(),
});

export const contactsGetSchema = z.array(contactSchema);
Expand Down
1 change: 0 additions & 1 deletion src/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './calendar-events';
export * from './contacts';
9 changes: 0 additions & 9 deletions src/schemas/schema.model.ts

This file was deleted.

0 comments on commit e3a3a91

Please sign in to comment.