Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b9e7188
feat(db): add device sync fields to Device, Organization, and Dynamic…
Marfuen May 8, 2026
31975ff
feat(integration-platform): add device_sync capability and SyncDevice…
Marfuen May 8, 2026
4602f99
feat(api): add GenericDeviceSyncService with tests
Marfuen May 8, 2026
8a87d91
fix(api): address code review issues in GenericDeviceSyncService
Marfuen May 8, 2026
7adc931
feat(api): add device sync discovery, provider selection, and trigger…
Marfuen May 8, 2026
6c44c18
feat(api): validate deviceSyncDefinition on dynamic integration upsert
Marfuen May 8, 2026
6b1456f
feat(app): add device sync provider selector to Devices tab
Marfuen May 8, 2026
59c57df
feat(trigger): add scheduled device sync to daily integration checks
Marfuen May 8, 2026
7e1b680
fix(trigger): remove duplicate success field in device sync task
Marfuen May 8, 2026
601f70a
fix(device-sync): address Cubic review feedback on device sync
Marfuen May 8, 2026
f4148b7
Merge branch 'main' into feat/device-import-from-integrations
Marfuen May 8, 2026
a632419
Merge branch 'main' into feat/device-import-from-integrations
Marfuen May 8, 2026
d45f2da
Merge branch 'main' into feat/device-import-from-integrations
Marfuen May 13, 2026
7608188
Merge branch 'main' into feat/device-import-from-integrations
tofikwest Jun 3, 2026
4593250
Merge branch 'main' into feat/device-import-from-integrations
tofikwest Jun 3, 2026
68f8012
fix(integration-platform): make dynamic device sync functional and safe
tofikwest Jun 3, 2026
7559906
fix(integration-platform): address device-sync review round 2
tofikwest Jun 3, 2026
40a8b25
fix(integration-platform): address device-sync review round 3
tofikwest Jun 3, 2026
5c4d7af
fix(integration-platform): reject malformed device-sync provider with…
tofikwest Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export class DynamicIntegrationsController {
? SyncDefinitionSchema.parse(rawSyncDef)
: undefined;

const rawDeviceSyncDef = body.deviceSyncDefinition;
const validatedDeviceSyncDef = rawDeviceSyncDef
? SyncDefinitionSchema.parse(rawDeviceSyncDef)
Comment thread
Marfuen marked this conversation as resolved.
: undefined;

// Upsert the integration
const integration = await this.dynamicIntegrationRepo.upsertBySlug({
slug: def.slug,
Expand All @@ -83,6 +88,11 @@ export class DynamicIntegrationsController {
JSON.stringify(validatedSyncDef),
) as Prisma.InputJsonValue)
: null,
deviceSyncDefinition: validatedDeviceSyncDef
? (JSON.parse(
JSON.stringify(validatedDeviceSyncDef),
) as Prisma.InputJsonValue)
: null,
services: (def.services as unknown as Prisma.InputJsonValue) ?? undefined,
});

Expand Down Expand Up @@ -167,6 +177,12 @@ export class DynamicIntegrationsController {
const validatedSyncDefCreate = rawSyncDefCreate
? SyncDefinitionSchema.parse(rawSyncDefCreate)
: undefined;

const rawDeviceSyncDefCreate = body.deviceSyncDefinition;
const validatedDeviceSyncDefCreate = rawDeviceSyncDefCreate
? SyncDefinitionSchema.parse(rawDeviceSyncDefCreate)
Comment thread
Marfuen marked this conversation as resolved.
: undefined;

const integration = await this.dynamicIntegrationRepo.create({
slug: def.slug,
name: def.name,
Expand All @@ -184,6 +200,11 @@ export class DynamicIntegrationsController {
JSON.stringify(validatedSyncDefCreate),
) as Prisma.InputJsonValue)
: undefined,
deviceSyncDefinition: validatedDeviceSyncDefCreate
? (JSON.parse(
JSON.stringify(validatedDeviceSyncDefCreate),
) as Prisma.InputJsonValue)
: undefined,
});

for (const [index, check] of def.checks.entries()) {
Expand Down
Loading
Loading