Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

565 B
Raw Blame
'use client'

import type { ImSyncResultItem } from '@dify/contracts/api/console/workspaces/types.gen'
import { parseAsString, parseAsStringEnum, useQueryState } from 'nuqs'

type SyncResult = ImSyncResultItem['result']['type']
export const useContactImSyncRunUrlState = () => useQueryState('sync_run_id', parseAsString)

export const useContactImSyncResultUrlState = () =>
  useQueryState(
    'sync_result',
    parseAsStringEnum<SyncResult>([
      'added',
      'not_matched',
      'failed',
      'removed',
      'skipped',
    ]).withDefault('added'),
  )