contracts.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import type {
  2. MockCustomerHistory,
  3. MockStylistProfileTemplate,
  4. MockStylistReviewCard,
  5. MockTemplateUsageResult,
  6. MockWorkbench,
  7. } from '../../mocks/db'
  8. export type CustomerEntity = {
  9. id: string
  10. name: string
  11. kana?: string
  12. summary?: string
  13. lastVisit?: string
  14. nextVisit?: string
  15. hairLength?: string
  16. contact?: string
  17. phone: string
  18. email?: string
  19. concern?: string
  20. tags?: string[]
  21. image?: string
  22. birthday?: string
  23. visitCycle?: string
  24. hairCondition?: string
  25. hairType?: string
  26. formulaNote?: string
  27. privateNote?: string
  28. desiredImage?: string
  29. allergyNote?: string
  30. lineStatus?: string
  31. followStatus?: string
  32. followTiming?: string
  33. followMessage?: string
  34. }
  35. export type TemplateEntity = {
  36. id: string
  37. name: string
  38. category: string
  39. purpose?: string
  40. status: string
  41. description: string
  42. tags: string[]
  43. image?: string
  44. generationJobId?: number
  45. templateUrl?: string
  46. generationStatus?: string
  47. generationProgressMessage?: string
  48. generationErrorMessage?: string
  49. referenceImage?: string
  50. modelImageUrl?: string
  51. outfitImageUrl?: string
  52. backgroundImageUrl?: string
  53. usedCount: number
  54. }
  55. export type WorkbenchEntity = MockWorkbench
  56. export type SimulationResultEntity = {
  57. id: string
  58. title: string
  59. note: string | null
  60. image: string | null
  61. resultType: string
  62. status: string
  63. templateId: string | null
  64. }
  65. export type AftercareOptionEntity = {
  66. id: string
  67. title: string
  68. image: string
  69. }
  70. export type SimulationTemplateEntity = {
  71. id: string
  72. name: string
  73. image: string
  74. category: string
  75. }
  76. export type StylistProfileTemplateEntity = MockStylistProfileTemplate
  77. export type StylistReviewCardEntity = MockStylistReviewCard
  78. export type CustomerHistoryEntity = MockCustomerHistory
  79. export type TemplateUsageResultEntity = MockTemplateUsageResult
  80. export type CustomerDashboardSummary = {
  81. total: number
  82. today: number
  83. followUp: number
  84. simulated: number
  85. weeklyRecords?: number
  86. }
  87. export type TemplateDashboardSummary = {
  88. total: number
  89. published: number
  90. weeklyUsed: number
  91. draft: number
  92. }
  93. export type TemplateDetailStats = {
  94. customerCount: number
  95. saveRate: number
  96. monthlyGeneratedCount: number
  97. }
  98. export type GetCustomerByIdParams = {
  99. customerId?: string
  100. }
  101. export type GetTemplateByIdParams = {
  102. templateId?: string
  103. }
  104. export type ListResponse<T> = {
  105. items: T[]
  106. total: number
  107. }
  108. export type PaginatedCustomerList = {
  109. items: CustomerEntity[]
  110. total: number
  111. page: number
  112. pageSize: number
  113. }