@aiquants/daily-report 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +38 -38
  2. package/dist/client.d.mts +11 -5
  3. package/dist/client.d.ts +11 -5
  4. package/dist/client.js +4 -4
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +4 -4
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/index.d.mts +2 -2
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.mjs +1 -1
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/server.d.mts +35 -5
  15. package/dist/server.d.ts +35 -5
  16. package/dist/server.js +6 -6
  17. package/dist/server.js.map +1 -1
  18. package/dist/server.mjs +6 -6
  19. package/dist/server.mjs.map +1 -1
  20. package/dist/sse-schema-eXcMG-Ej.d.ts +2025 -0
  21. package/dist/sse-schema-rbG114od.d.mts +2025 -0
  22. package/dist/{types-BNhYC2j9.d.mts → types-D1PKubyo.d.mts} +26 -26
  23. package/dist/{types-BNhYC2j9.d.ts → types-D1PKubyo.d.ts} +26 -26
  24. package/package.json +4 -4
  25. package/src/client/components/daily-report-detail-list.tsx +29 -7
  26. package/src/client/components/daily-report-list.tsx +26 -5
  27. package/src/client/components/daily-report-resolved-content.tsx +28 -4
  28. package/src/client/config-context.tsx +2 -0
  29. package/src/client/contexts/daily-report-action-context.tsx +6 -2
  30. package/src/client/hooks/use-daily-report-sse-connection.ts +1 -1
  31. package/src/client/hooks/use-daily-report.ts +2 -2
  32. package/src/client/route-helpers.ts +8 -2
  33. package/src/server/authz.spec.ts +57 -0
  34. package/src/server/authz.ts +99 -0
  35. package/src/server/handlers.ts +5 -4
  36. package/src/server/service.ts +31 -13
  37. package/src/server.ts +1 -0
  38. package/src/shared/comment-adapter.ts +3 -3
  39. package/src/shared/sse-schema.ts +27 -26
  40. package/src/shared/types.ts +26 -26
  41. package/dist/sse-schema-ChCypDPj.d.ts +0 -2019
  42. package/dist/sse-schema-Cs1oC2DP.d.mts +0 -2019
package/README.md CHANGED
@@ -62,7 +62,7 @@ The standalone build bundles every JSX utility (and maps the shadcn tokens), but
62
62
 
63
63
  ## Required database schema
64
64
 
65
- Six tables: `DailyReportHub` (中核・出所横断), `DailyReportInternal` (アプリ内作成本文), `DailyReportComment`, `DailyReportLabel`, `DailyReportHub_Label`, `DailyReportUserStatus` (既読・スター)
65
+ Six tables: `DailyReportHub` (core/cross-source), `DailyReportInternal` (in-app content), `DailyReportComment`, `DailyReportLabel`, `DailyReportHub_Label`, `DailyReportUserStatus` (read status & stars).
66
66
 
67
67
  Existing apps can inject their own drizzle models (structural typing — see `DailyReportTables`). Greenfield projects can generate definitions:
68
68
 
@@ -83,18 +83,18 @@ export const dailyReportServer = createDailyReportServer({
83
83
  db: db as unknown as DailyReportDb, // drizzle mssql handle
84
84
  tables: { hub, internal, comment, label, hubLabel, userStatus },
85
85
  userTable: Users, // { id, displayName }
86
- resolveUserId: async (externalId) => {/* 外部 ID (Google sub) 内部数値 ID */},
87
- encodeUserId: (id) => encodeId(id), // 内部 ID の難読化 (例: sqids)
86
+ resolveUserId: async (externalId) => {/* External ID (e.g., OAuth sub) -> internal numeric ID */},
87
+ encodeUserId: (id) => encodeId(id), // Internal ID obfuscation (e.g. sqids)
88
88
  authenticate: authenticateInLoader, // (request, { failureRedirect }) => { user?, cookie? }
89
- redis: redisProvider as unknown as DailyReportRedisProvider, // 省略可 (SSE/epoch 無効化)
90
- externalSources: [ // 省略可: 別システムのレガシー日報テーブルの取り込み
89
+ redis: redisProvider as unknown as DailyReportRedisProvider, // Optional (disables SSE/epoch)
90
+ externalSources: [ // Optional: ingest legacy daily report tables from external systems
91
91
  { sourceType: "legacy", table: LegacyReport, idColumn: LegacyReport.reportId, mapRow: mapLegacyRow },
92
92
  ],
93
- draftLabelName: "draft", // 必須: DB のドラフトラベル名 (パッケージは既定値を持たない)
93
+ draftLabelNames: ["Draft", "Work in Progress"], // Draft label names (can specify a single string or array of candidates)
94
94
  })
95
95
  ```
96
96
 
97
- Route mounts (React Router v7, file convention は自由):
97
+ Route mounts (React Router v7, flexible file convention):
98
98
 
99
99
  ```ts
100
100
  // daily_report._index/loader.server.ts
@@ -111,13 +111,13 @@ export const loader = (args) => dailyReportServer.sse.loader(args)
111
111
 
112
112
  ### DI ports
113
113
 
114
- - `authenticate(request, { failureRedirect })` — セッション検証。`failureRedirect: string` のとき未認証は redirect throw する実装にする。
115
- - `resolveUserId(externalId)` — 外部 ID → 内部数値 ID (`null` = 未登録)。プロセス内キャッシュは `disableUserIdCache` で無効化可 (テスト用)
116
- - `encodeUserId(id)` — クライアントへ出す ID の難読化。既存 ID 空間を維持するためアプリ側実装を注入する。
117
- - `redis` — `getClient()` (get/incr/xAdd/xRange/xRevRange) + `createClient()` (blocking xRead)。`node-redis` v5 クライアントが構造的に適合する。省略時: SSE publish はスキップ (warn)epoch 無効。
118
- - `externalSources[]` — `Hub.source_type` 一致時に `Hub.source_id_num = idColumn` LEFT JOIN `mapRow` で表示フィールドへ変換。
119
- - `draftLabelName` — **必須**。ドラフト状態を表す自 DB のラベル名。サーバー側のクロスユーザー可視性フィルタ (他ユーザーの下書きを隠す) に使うため、パッケージはサイレントな既定値を持たない。
120
- - 主要チューニング: `idsTtlMs` (180s) / `businessDateTtlMs` (300s) / `streamKey` / `streamMaxLen` / `loginRedirectPath`。
114
+ - `authenticate(request, { failureRedirect })` — Session verification. When `failureRedirect: string` is set, throw a redirect on unauthenticated requests.
115
+ - `resolveUserId(externalId)` — External ID → internal numeric ID (`null` = unregistered). In-process caching can be disabled with `disableUserIdCache` (useful for testing).
116
+ - `encodeUserId(id)` — Obfuscates IDs sent to the client. Inject app-level implementation to preserve existing ID namespaces.
117
+ - `redis` — `getClient()` (get/incr/xAdd/xRange/xRevRange) + `createClient()` (blocking xRead). Structurally matches a `node-redis` v5 client. If omitted, SSE publishing is skipped (with a warning) and epoch is disabled.
118
+ - `externalSources[]` — When `Hub.source_type` matches, performs a `LEFT JOIN` on `Hub.source_id_num = idColumn` and converts fields via `mapRow`.
119
+ - `draftLabelName` / `draftLabelNames` Database label names representing draft states (single string or array of candidates like `["Draft", "Work in Progress"]`). Used for server-side cross-user visibility filtering (hiding drafts from other users) and `isDraft` evaluation.
120
+ - Primary tuning parameters: `idsTtlMs` (180s) / `businessDateTtlMs` (300s) / `streamKey` / `streamMaxLen` / `loginRedirectPath`.
121
121
 
122
122
  ## Client wiring
123
123
 
@@ -126,7 +126,7 @@ export const loader = (args) => dailyReportServer.sse.loader(args)
126
126
  import { createDailyReportClientLoader, DailyReportPage, dailyReportShouldRevalidate } from "@aiquants/daily-report/client"
127
127
 
128
128
  export const shouldRevalidate = dailyReportShouldRevalidate
129
- export const clientLoader = createDailyReportClientLoader() // /daily_report/api/ids を defer 取得
129
+ export const clientLoader = createDailyReportClientLoader() // Deferred fetching of /daily_report/api/ids
130
130
 
131
131
  export default function Route() {
132
132
  const { user, userId, dailyReportIds } = useLoaderData<typeof clientLoader>()
@@ -138,10 +138,10 @@ export default function Route() {
138
138
  dailyReportIds={dailyReportIds}
139
139
  config={{
140
140
  renderHeader: ({ title, annotation }) => <YourHeader title={title} annotation={annotation} />,
141
- showDevControls: import.meta.env.DEV, // SSE 購読トグル等
142
- draftLabelName: "draft", // ドラフト状態のラベル名 ( DB に合わせる)
143
- fieldLabels: { // 詳細/一覧カードの見出しラベル (下記参照。部分上書き可)
144
- businessDate: "日付", content: "本文", comments: "コメント", /* ... 各キーを自アプリの言語・表記へ */
141
+ showDevControls: import.meta.env.DEV, // Toggle SSE subscriptions, etc.
142
+ draftLabelName: "Draft", // Label name for draft states (matches target DB)
143
+ fieldLabels: { // Card/detail header labels (customizable per key)
144
+ businessDate: "Date", content: "Body", comments: "Comments", /* ... override to match app locale */
145
145
  },
146
146
  // apiBasePath: "/daily_report/api", ssePath: "/sse/daily_report/updates"
147
147
  }}
@@ -151,28 +151,28 @@ export default function Route() {
151
151
  }
152
152
  ```
153
153
 
154
- `DailyReportPage` はレイアウト非依存 (ヘッダーは `renderHeader` スロット、エラー境界・フッター制御はアプリ側)。細粒度に使う場合は `DailyReportActionProvider` / `DailyReportResolvedContent` / `useDailyReportDetail` 等を個別 import できる。
154
+ `DailyReportPage` is layout-agnostic (header rendering via `renderHeader` slot, error boundaries/footer control managed by the app). For fine-grained usage, `DailyReportActionProvider`, `DailyReportResolvedContent`, `useDailyReportDetail`, etc. can be imported individually.
155
155
 
156
- ### フィールドラベル (`fieldLabels`)
156
+ ### Field Labels (`fieldLabels`)
157
157
 
158
- 詳細/一覧カードの見出し (`id` / `businessDate` / `author` / `visitTime` / `createdAt` / `updatedAt` / `updatedBy` / `category` / `categoryInfo` / `creationCategory` / `customer` / `subject` / `content` / `interviewers` / `comments` / `tabArticle` / `tabRelations` / `relationsEmpty`) はすべて DI。**パッケージは中立な英語 (`Business date` / `Customer` / `Content` ) のみを既定で同梱**し、各見出しの言語・表記は消費アプリが `fieldLabels` で上書きする。これによりパッケージ本体は業務ドメイン固有の表記を持たない。部分指定した分だけ既定へ上書きされる (`DailyReportConfigProvider` 1 段深くマージ)
158
+ Card and detail headings (`id` / `businessDate` / `author` / `visitTime` / `createdAt` / `updatedAt` / `updatedBy` / `category` / `categoryInfo` / `creationCategory` / `customer` / `subject` / `content` / `interviewers` / `comments` / `tabArticle` / `tabRelations` / `relationsEmpty`) are fully dependency-injected. **The package includes neutral English defaults** (`Business date` / `Customer` / `Content`, etc.), and consuming applications override headings via `fieldLabels`. This ensures the package itself carries no domain-specific wording. Partial overrides merge deeply over defaults (`DailyReportConfigProvider` performs a 1-level deep merge).
159
159
 
160
- ### 外部ソースバッジ設定 (`sourceTypeConfigs`)
160
+ ### External Source Badge Configuration (`sourceTypeConfigs`)
161
161
 
162
- 外部ソースから取り込まれた日報の表示 (ラベル名やバッジの CSS クラス) `sourceTypeConfigs` で上書き設定できます。これにより、パッケージ自身は特定の外部サービス ( NI 日報や Kintone など) の名前やデザインに依存せず、ホストアプリケーションから柔軟に表示をカスタマイズできます。
162
+ Display parameters (label names and badge CSS classes) for reports ingested from external sources can be overridden using `sourceTypeConfigs`. This prevents the package from hardcoding specific third-party service names or designs, leaving display customization to the host application.
163
163
 
164
164
  ```tsx
165
165
  sourceTypeConfigs: {
166
166
  Internal: {
167
- label: "オリジナル",
167
+ label: "Native",
168
168
  badgeClassName: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
169
169
  },
170
- NI: {
171
- label: "NI 日報",
170
+ ExternalCRM: {
171
+ label: "External CRM",
172
172
  badgeClassName: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",
173
173
  },
174
- Kintone: {
175
- label: "Kintone",
174
+ LegacyPortal: {
175
+ label: "Legacy Portal",
176
176
  badgeClassName: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
177
177
  },
178
178
  }
@@ -216,17 +216,17 @@ export default defineConfig({
216
216
  })
217
217
  ```
218
218
 
219
- ## Realtime architecture
219
+ ## Realtime Architecture
220
220
 
221
- 1. 変更系サービスは `invalidate → epoch increment → SSE publish` の順で Redis Stream (`daily-report:sse-stream`) へ発行。
222
- 2. `DailyReportSseReader` が単一の blocking `xRead` ループで全 SSE 接続へ fan-out (接続ごとの Redis TCP を排除)
223
- 3. `sse.loader` `Last-Event-ID` / `lastEventId` による catch-up (`xRange`) 5 秒 keep-alive を実装。`recipientRawUserId` はサーバー側でフィルタ後に除去される (内部 ID 漏洩防止)。
224
- 4. クライアントは `useDailyReportSseConnection` が指数バックオフ再接続し、アクションコンテキストが楽観的更新と SSE エコーを `clientTempId` で照合する。
221
+ 1. Mutation services publish to Redis Stream (`daily-report:sse-stream`) in sequence: `invalidate -> epoch increment -> SSE publish`.
222
+ 2. `DailyReportSseReader` uses a single blocking `xRead` loop to fan-out events to all SSE connections (eliminating per-connection Redis TCP connections).
223
+ 3. `sse.loader` implements catch-up (`xRange`) using `Last-Event-ID` / `lastEventId` and 5-second keep-alive pings. `recipientRawUserId` is filtered server-side and removed before transmission to prevent internal ID leaks.
224
+ 4. On the client, `useDailyReportSseConnection` handles exponential backoff reconnects, and the action context correlates optimistic updates with SSE echoes using `clientTempId`.
225
225
 
226
- ## API surface (抜粋)
226
+ ## API Surface (Summary)
227
227
 
228
- - server: `createDailyReportServer` / `createDailyReportService` / `createDailyReportHandlers` / `defineDailyReportSchema` / `DailyReportSseReader` / `SqlResultCache` / `transformJsonArray` / `jsonResponseWithETag` / `generateETag` / `isStreamIdLte`
229
- - client: `DailyReportPage` / `DailyReportResolvedContent` / `DailyReportList` / `DailyReportDetailList` / `DailyReportActionProvider` / `useDailyReportActionContext` / `useDailyReportDetail` / `useDailyReportPrefetch` / `useDailyReportComments` / `useDailyReportSseConnection` / `DailyReportConfigProvider` / `createDailyReportClientLoader` / `dailyReportShouldRevalidate`
230
- - shared: `DailyReportItem` / `DailyReportDetail` / `DailyReportUser` / `dailyReportSseMessageSchema` (8 discriminated union) / `normalizeBusinessDateKey` / `mergeComments`
228
+ - **server**: `createDailyReportServer` / `createDailyReportService` / `createDailyReportHandlers` / `defineDailyReportSchema` / `DailyReportSseReader` / `SqlResultCache` / `transformJsonArray` / `jsonResponseWithETag` / `generateETag` / `isStreamIdLte`
229
+ - **client**: `DailyReportPage` / `DailyReportResolvedContent` / `DailyReportList` / `DailyReportDetailList` / `DailyReportActionProvider` / `useDailyReportActionContext` / `useDailyReportDetail` / `useDailyReportPrefetch` / `useDailyReportComments` / `useDailyReportSseConnection` / `DailyReportConfigProvider` / `createDailyReportClientLoader` / `dailyReportShouldRevalidate`
230
+ - **shared**: `DailyReportItem` / `DailyReportDetail` / `DailyReportUser` / `dailyReportSseMessageSchema` (8 discriminated union types) / `normalizeBusinessDateKey` / `mergeComments`
231
231
 
232
232
  MIT
package/dist/client.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Context, RefObject } from 'react';
3
3
  import { ScrollBarThumbOverlayRenderProps, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from '@aiquants/virtualscroll';
4
- import { U as UIComment, D as DailyReportSseMessage } from './sse-schema-Cs1oC2DP.mjs';
5
- import { D as DailyReportItem, a as DailyReportDetail, b as DailyReportUser } from './types-BNhYC2j9.mjs';
4
+ import { U as UIComment, D as DailyReportSseMessage } from './sse-schema-rbG114od.mjs';
5
+ import { D as DailyReportItem, a as DailyReportDetail, b as DailyReportUser } from './types-D1PKubyo.mjs';
6
6
  import { ShouldRevalidateFunction } from 'react-router';
7
7
  import 'zod';
8
8
 
@@ -61,12 +61,14 @@ type DailyReportDetailListProps = {
61
61
  userId?: string | null;
62
62
  selectedItemId?: number | null;
63
63
  onSelectItem?: (id: number | null) => void;
64
+ initialScrollOffset?: number;
65
+ onScrollOffsetChange?: (offset: number) => void;
64
66
  };
65
67
  /**
66
68
  * Daily report detail cards rendered with dynamic height virtual scroll.
67
69
  * 動的高さの仮想スクロールで日報詳細カードを描画するコンポーネント。
68
70
  */
69
- declare const DailyReportDetailList: ({ dailyReportItems, userId, selectedItemId, onSelectItem }: DailyReportDetailListProps) => react.JSX.Element;
71
+ declare const DailyReportDetailList: ({ dailyReportItems, userId, selectedItemId, onSelectItem, initialScrollOffset, onScrollOffsetChange }: DailyReportDetailListProps) => react.JSX.Element;
70
72
 
71
73
  type DailyReportEditFormProps = {
72
74
  report: DailyReportDetail;
@@ -83,12 +85,14 @@ type DailyReportListProps = {
83
85
  selectedReportHubId: number | null;
84
86
  onSelectItem: (reportHubId: number | null) => void;
85
87
  userId?: string | null;
88
+ initialScrollOffset?: number;
89
+ onScrollOffsetChange?: (offset: number) => void;
86
90
  };
87
91
  /**
88
92
  * Daily report list cards with key metadata and preview content via virtual scrolling.
89
93
  * 主なメタデータと内容プレビューを仮想スクロール表示する日報リスト。
90
94
  */
91
- declare const DailyReportList: ({ dailyReportItems, initialSelectedBusinessDate, initialSelectedReportHubId, autoMarkRead, selectedReportHubId, onSelectItem, userId }: DailyReportListProps) => react.JSX.Element;
95
+ declare const DailyReportList: ({ dailyReportItems, initialSelectedBusinessDate, initialSelectedReportHubId, autoMarkRead, selectedReportHubId, onSelectItem, userId, initialScrollOffset, onScrollOffsetChange }: DailyReportListProps) => react.JSX.Element;
92
96
 
93
97
  /** ヘッダー描画スロットに渡される引数。 */
94
98
  type DailyReportHeaderProps = {
@@ -126,6 +130,8 @@ type DailyReportFieldLabels = {
126
130
  type SourceTypeConfig = {
127
131
  label: string;
128
132
  badgeClassName?: string;
133
+ /** コメント投稿を許可するかどうか (既定 true)。false の場合、該当ソースの日報でコメント投稿フォームを非表示にする。 */
134
+ allowComment?: boolean;
129
135
  };
130
136
  /** クライアント層の設定一式。 */
131
137
  type DailyReportClientConfig = {
@@ -500,7 +506,7 @@ declare const dailyReportShouldRevalidate: ShouldRevalidateFunction;
500
506
  * Fetches the deferred daily report id list from the API endpoint.
501
507
  * API エンドポイントから日報 ID 一覧を遅延取得する処理。
502
508
  */
503
- declare const fetchDailyReportIds: (apiBasePath?: string) => Promise<DailyReportItem[]>;
509
+ declare const fetchDailyReportIds: (apiBasePath?: string, forceRefresh?: boolean) => Promise<DailyReportItem[]>;
504
510
  /**
505
511
  * Creates a React Router clientLoader that merges server data with deferred report ids.
506
512
  * サーバーデータへ遅延日報 ID を合成する React Router clientLoader を生成する処理。
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Context, RefObject } from 'react';
3
3
  import { ScrollBarThumbOverlayRenderProps, ScrollPaneInertiaOptions, ScrollBarTapCircleOptions } from '@aiquants/virtualscroll';
4
- import { U as UIComment, D as DailyReportSseMessage } from './sse-schema-ChCypDPj.js';
5
- import { D as DailyReportItem, a as DailyReportDetail, b as DailyReportUser } from './types-BNhYC2j9.js';
4
+ import { U as UIComment, D as DailyReportSseMessage } from './sse-schema-eXcMG-Ej.js';
5
+ import { D as DailyReportItem, a as DailyReportDetail, b as DailyReportUser } from './types-D1PKubyo.js';
6
6
  import { ShouldRevalidateFunction } from 'react-router';
7
7
  import 'zod';
8
8
 
@@ -61,12 +61,14 @@ type DailyReportDetailListProps = {
61
61
  userId?: string | null;
62
62
  selectedItemId?: number | null;
63
63
  onSelectItem?: (id: number | null) => void;
64
+ initialScrollOffset?: number;
65
+ onScrollOffsetChange?: (offset: number) => void;
64
66
  };
65
67
  /**
66
68
  * Daily report detail cards rendered with dynamic height virtual scroll.
67
69
  * 動的高さの仮想スクロールで日報詳細カードを描画するコンポーネント。
68
70
  */
69
- declare const DailyReportDetailList: ({ dailyReportItems, userId, selectedItemId, onSelectItem }: DailyReportDetailListProps) => react.JSX.Element;
71
+ declare const DailyReportDetailList: ({ dailyReportItems, userId, selectedItemId, onSelectItem, initialScrollOffset, onScrollOffsetChange }: DailyReportDetailListProps) => react.JSX.Element;
70
72
 
71
73
  type DailyReportEditFormProps = {
72
74
  report: DailyReportDetail;
@@ -83,12 +85,14 @@ type DailyReportListProps = {
83
85
  selectedReportHubId: number | null;
84
86
  onSelectItem: (reportHubId: number | null) => void;
85
87
  userId?: string | null;
88
+ initialScrollOffset?: number;
89
+ onScrollOffsetChange?: (offset: number) => void;
86
90
  };
87
91
  /**
88
92
  * Daily report list cards with key metadata and preview content via virtual scrolling.
89
93
  * 主なメタデータと内容プレビューを仮想スクロール表示する日報リスト。
90
94
  */
91
- declare const DailyReportList: ({ dailyReportItems, initialSelectedBusinessDate, initialSelectedReportHubId, autoMarkRead, selectedReportHubId, onSelectItem, userId }: DailyReportListProps) => react.JSX.Element;
95
+ declare const DailyReportList: ({ dailyReportItems, initialSelectedBusinessDate, initialSelectedReportHubId, autoMarkRead, selectedReportHubId, onSelectItem, userId, initialScrollOffset, onScrollOffsetChange }: DailyReportListProps) => react.JSX.Element;
92
96
 
93
97
  /** ヘッダー描画スロットに渡される引数。 */
94
98
  type DailyReportHeaderProps = {
@@ -126,6 +130,8 @@ type DailyReportFieldLabels = {
126
130
  type SourceTypeConfig = {
127
131
  label: string;
128
132
  badgeClassName?: string;
133
+ /** コメント投稿を許可するかどうか (既定 true)。false の場合、該当ソースの日報でコメント投稿フォームを非表示にする。 */
134
+ allowComment?: boolean;
129
135
  };
130
136
  /** クライアント層の設定一式。 */
131
137
  type DailyReportClientConfig = {
@@ -500,7 +506,7 @@ declare const dailyReportShouldRevalidate: ShouldRevalidateFunction;
500
506
  * Fetches the deferred daily report id list from the API endpoint.
501
507
  * API エンドポイントから日報 ID 一覧を遅延取得する処理。
502
508
  */
503
- declare const fetchDailyReportIds: (apiBasePath?: string) => Promise<DailyReportItem[]>;
509
+ declare const fetchDailyReportIds: (apiBasePath?: string, forceRefresh?: boolean) => Promise<DailyReportItem[]>;
504
510
  /**
505
511
  * Creates a React Router clientLoader that merges server data with deferred report ids.
506
512
  * サーバーデータへ遅延日報 ID を合成する React Router clientLoader を生成する処理。