@underdogai/mesh-event-schemas 0.3.0 → 0.6.0
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.
- package/dist/apppacks.d.ts +834 -225
- package/dist/apppacks.d.ts.map +1 -1
- package/dist/apppacks.js +1 -1
- package/dist/blocks.d.ts +207 -38
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +78 -11
- package/dist/blocks.js.map +1 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +2 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/events.d.ts +342 -57
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +109 -1
- package/dist/events.js.map +1 -1
- package/dist/geo.d.ts +52 -0
- package/dist/geo.d.ts.map +1 -0
- package/dist/geo.js +65 -0
- package/dist/geo.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/namespace.d.ts +2 -0
- package/dist/namespace.d.ts.map +1 -1
- package/dist/namespace.js +2 -0
- package/dist/namespace.js.map +1 -1
- package/dist/registry.d.ts +3 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +25 -3
- package/dist/registry.js.map +1 -1
- package/dist/surfaces.d.ts +3970 -1160
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +8 -1
- package/dist/surfaces.js.map +1 -1
- package/package.json +1 -1
- package/src/apppacks.ts +1 -1
- package/src/blocks.ts +80 -11
- package/src/capabilities.ts +2 -1
- package/src/events.ts +119 -4
- package/src/geo.ts +75 -0
- package/src/index.ts +1 -0
- package/src/namespace.ts +2 -0
- package/src/registry.ts +26 -2
- package/src/surfaces.ts +8 -0
package/dist/blocks.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 설계 원칙 (docs/custom-event-ui.md 참조):
|
|
5
5
|
* - 닫힌(화이트리스트) 컴포넌트 집합. 임의 HTML/코드 실행 없음.
|
|
6
|
-
* - 순수 데이터(JSON). 렌더는 @chatops/
|
|
6
|
+
* - 순수 데이터(JSON). 렌더는 @chatops/spec-renderer(React)가 담당.
|
|
7
7
|
* - 알 수 없는 블록 타입은 클라이언트가 안전한 fallback으로 렌더.
|
|
8
8
|
* - 권한은 절대 클라이언트가 아니라 appservice(서버측)가 재검증한다. 여기 disabled/confirm은 UX일 뿐.
|
|
9
9
|
*
|
|
@@ -36,7 +36,16 @@ export type Confirm = z.infer<typeof ConfirmSchema>;
|
|
|
36
36
|
export declare const TextBlockSchema: z.ZodObject<{
|
|
37
37
|
type: z.ZodLiteral<"text">;
|
|
38
38
|
text: z.ZodString;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지).
|
|
41
|
+
*
|
|
42
|
+
* 인라인: `**굵게**` `*기울임*` `` `코드` `` `[텍스트](http…)`.
|
|
43
|
+
* 블록: 문단(빈 줄) · 목록(`-` `*` `+` / `1.`, 중첩 가능) · 제목(`#`~`###`) · 인용(`>`) ·
|
|
44
|
+
* 구분선(`---`) · 펜스 코드(``` ```` ```).
|
|
45
|
+
* 표는 지원하지 않는다 — 표는 `table` 블록이 따로 있다.
|
|
46
|
+
*
|
|
47
|
+
* 플래그를 안 주면 평문이다(줄바꿈만 살아난다). 긴 글에는 켜는 쪽이 읽힌다 — #581.
|
|
48
|
+
*/
|
|
40
49
|
markdown: z.ZodOptional<z.ZodBoolean>;
|
|
41
50
|
}, "strip", z.ZodTypeAny, {
|
|
42
51
|
type: "text";
|
|
@@ -311,7 +320,12 @@ export declare const SliderBlockSchema: z.ZodObject<{
|
|
|
311
320
|
unit?: string | undefined;
|
|
312
321
|
}>;
|
|
313
322
|
export type SliderBlock = z.infer<typeof SliderBlockSchema>;
|
|
314
|
-
/** 단일 선택 라디오 그룹. select 와 달리 옵션이 펼쳐져 보인다.
|
|
323
|
+
/** 단일 선택 라디오 그룹. select 와 달리 옵션이 펼쳐져 보인다.
|
|
324
|
+
* 옵션 `hint` = 라벨 아래 한 줄 보조 설명(선택) — "버그 — 뭔가 잘못 동작해요" 처럼 라벨에 설명을
|
|
325
|
+
* 욱여넣던 것을 두 줄로 가른다(가독성). 옛 클라는 zod 가 벗겨내므로 라벨만 보인다(하위호환).
|
|
326
|
+
* `style` = 표현 힌트(선택): "cards" 는 옵션을 전체폭 카드 행으로, "segmented" 는 한 줄 세그먼트로
|
|
327
|
+
* (짧은 라벨 전용 — 렌더러가 hint 를 숨긴다). 값 의미는 동일하고 옛 클라는 평 라디오로 그린다.
|
|
328
|
+
* ⚠️ 위치 선택자(:first-child)로 특정 폼만 다르게 칠하지 말 것 — 표현은 이 필드로 선언한다. */
|
|
315
329
|
export declare const RadioBlockSchema: z.ZodObject<{
|
|
316
330
|
type: z.ZodLiteral<"radio">;
|
|
317
331
|
name: z.ZodString;
|
|
@@ -319,32 +333,40 @@ export declare const RadioBlockSchema: z.ZodObject<{
|
|
|
319
333
|
options: z.ZodArray<z.ZodObject<{
|
|
320
334
|
value: z.ZodString;
|
|
321
335
|
label: z.ZodString;
|
|
336
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
322
337
|
}, "strip", z.ZodTypeAny, {
|
|
323
338
|
value: string;
|
|
324
339
|
label: string;
|
|
340
|
+
hint?: string | undefined;
|
|
325
341
|
}, {
|
|
326
342
|
value: string;
|
|
327
343
|
label: string;
|
|
344
|
+
hint?: string | undefined;
|
|
328
345
|
}>, "many">;
|
|
329
346
|
value: z.ZodOptional<z.ZodString>;
|
|
347
|
+
style: z.ZodOptional<z.ZodEnum<["cards", "segmented"]>>;
|
|
330
348
|
}, "strip", z.ZodTypeAny, {
|
|
331
349
|
options: {
|
|
332
350
|
value: string;
|
|
333
351
|
label: string;
|
|
352
|
+
hint?: string | undefined;
|
|
334
353
|
}[];
|
|
335
354
|
type: "radio";
|
|
336
355
|
name: string;
|
|
337
356
|
value?: string | undefined;
|
|
338
357
|
label?: string | undefined;
|
|
358
|
+
style?: "cards" | "segmented" | undefined;
|
|
339
359
|
}, {
|
|
340
360
|
options: {
|
|
341
361
|
value: string;
|
|
342
362
|
label: string;
|
|
363
|
+
hint?: string | undefined;
|
|
343
364
|
}[];
|
|
344
365
|
type: "radio";
|
|
345
366
|
name: string;
|
|
346
367
|
value?: string | undefined;
|
|
347
368
|
label?: string | undefined;
|
|
369
|
+
style?: "cards" | "segmented" | undefined;
|
|
348
370
|
}>;
|
|
349
371
|
export declare const SelectBlockSchema: z.ZodObject<{
|
|
350
372
|
type: z.ZodLiteral<"select">;
|
|
@@ -402,6 +424,51 @@ export declare const CheckboxBlockSchema: z.ZodObject<{
|
|
|
402
424
|
name: string;
|
|
403
425
|
checked?: boolean | undefined;
|
|
404
426
|
}>;
|
|
427
|
+
/**
|
|
428
|
+
* 위치 입력 — "지금 내 위치" 한 번을 **사용자 제스처로** 받아 폼 값으로 수집한다.
|
|
429
|
+
*
|
|
430
|
+
* 왜 입력 블록인가: 위치는 앱이 가져가는 게 아니라 **사람이 주는 것**이다. 그래서 다른 입력과 같은
|
|
431
|
+
* 자리에 서고(name 으로 수집 → 제출 버튼의 values 에 실림), 카드/모달 어느 쪽에도 놓을 수 있다.
|
|
432
|
+
* 버튼을 누르는 순간 OS 권한창이 뜨므로 "위치 권한 수락"과 "현재 위치 가져오기"가 한 동작이다 —
|
|
433
|
+
* 웹에는 애초에 "권한만 요청" 하는 API 가 없고, 네이티브도 쓰지 않을 권한을 미리 묻는 앱은 심사에서
|
|
434
|
+
* 이유를 설명해야 한다. 그래서 **쓸 때 묻는다**.
|
|
435
|
+
*
|
|
436
|
+
* 값의 모양은 `LocationValue`(geo.ts) — 좌표는 문자열 geo URI 다(canonical JSON 소수 금지).
|
|
437
|
+
* 수집 전에는 `""`. 못 쓰는 클라(구 셸·위치 없는 브라우저)에서는 렌더러가 **버튼을 비활성 + 이유**로
|
|
438
|
+
* degrade 한다 → 누른 뒤에 실패를 알게 되지 않는다.
|
|
439
|
+
*/
|
|
440
|
+
export declare const LocationBlockSchema: z.ZodObject<{
|
|
441
|
+
type: z.ZodLiteral<"location">;
|
|
442
|
+
name: z.ZodString;
|
|
443
|
+
label: z.ZodOptional<z.ZodString>;
|
|
444
|
+
/**
|
|
445
|
+
* 왜 필요한지 한 줄 — **OS 권한창보다 먼저** 보인다. 시스템 문구(Info.plist·Android 권한창)는
|
|
446
|
+
* 앱 전체에 하나뿐이라 이 카드가 왜 묻는지는 여기서만 말할 수 있다(그리고 그게 심사가 보는 것이다).
|
|
447
|
+
*/
|
|
448
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
449
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
+
/** GPS 급 정확도로 받을지(느리고 배터리를 더 쓴다). 기본 false = 네트워크/대략 위치. */
|
|
451
|
+
precise: z.ZodOptional<z.ZodBoolean>;
|
|
452
|
+
/** 버튼 문구(작성자 소유 문장). 미지정이면 렌더러 크롬 문구를 쓴다. */
|
|
453
|
+
buttonText: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
type: "location";
|
|
456
|
+
name: string;
|
|
457
|
+
label?: string | undefined;
|
|
458
|
+
required?: boolean | undefined;
|
|
459
|
+
purpose?: string | undefined;
|
|
460
|
+
precise?: boolean | undefined;
|
|
461
|
+
buttonText?: string | undefined;
|
|
462
|
+
}, {
|
|
463
|
+
type: "location";
|
|
464
|
+
name: string;
|
|
465
|
+
label?: string | undefined;
|
|
466
|
+
required?: boolean | undefined;
|
|
467
|
+
purpose?: string | undefined;
|
|
468
|
+
precise?: boolean | undefined;
|
|
469
|
+
buttonText?: string | undefined;
|
|
470
|
+
}>;
|
|
471
|
+
export type LocationBlock = z.infer<typeof LocationBlockSchema>;
|
|
405
472
|
export declare const ButtonBlockSchema: z.ZodObject<{
|
|
406
473
|
type: z.ZodLiteral<"button">;
|
|
407
474
|
/** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
|
|
@@ -427,6 +494,19 @@ export declare const ButtonBlockSchema: z.ZodObject<{
|
|
|
427
494
|
cancel?: string | undefined;
|
|
428
495
|
}>>;
|
|
429
496
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
497
|
+
/**
|
|
498
|
+
* 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
|
|
499
|
+
*
|
|
500
|
+
* 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
|
|
501
|
+
* Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
|
|
502
|
+
* 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
|
|
503
|
+
* 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
|
|
504
|
+
*
|
|
505
|
+
* 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
|
|
506
|
+
* 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
|
|
507
|
+
* 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
|
|
508
|
+
*/
|
|
509
|
+
hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
430
510
|
}, "strip", z.ZodTypeAny, {
|
|
431
511
|
type: "button";
|
|
432
512
|
text: string;
|
|
@@ -440,6 +520,7 @@ export declare const ButtonBlockSchema: z.ZodObject<{
|
|
|
440
520
|
cancel?: string | undefined;
|
|
441
521
|
} | undefined;
|
|
442
522
|
disabled?: boolean | undefined;
|
|
523
|
+
hidden_for?: string[] | undefined;
|
|
443
524
|
}, {
|
|
444
525
|
type: "button";
|
|
445
526
|
text: string;
|
|
@@ -453,6 +534,7 @@ export declare const ButtonBlockSchema: z.ZodObject<{
|
|
|
453
534
|
cancel?: string | undefined;
|
|
454
535
|
} | undefined;
|
|
455
536
|
disabled?: boolean | undefined;
|
|
537
|
+
hidden_for?: string[] | undefined;
|
|
456
538
|
}>;
|
|
457
539
|
export type ButtonBlock = z.infer<typeof ButtonBlockSchema>;
|
|
458
540
|
/**
|
|
@@ -509,6 +591,19 @@ export declare const ActionsBlockSchema: z.ZodObject<{
|
|
|
509
591
|
cancel?: string | undefined;
|
|
510
592
|
}>>;
|
|
511
593
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
594
|
+
/**
|
|
595
|
+
* 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
|
|
596
|
+
*
|
|
597
|
+
* 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
|
|
598
|
+
* Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
|
|
599
|
+
* 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
|
|
600
|
+
* 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
|
|
601
|
+
*
|
|
602
|
+
* 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
|
|
603
|
+
* 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
|
|
604
|
+
* 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
|
|
605
|
+
*/
|
|
606
|
+
hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
512
607
|
}, "strip", z.ZodTypeAny, {
|
|
513
608
|
type: "button";
|
|
514
609
|
text: string;
|
|
@@ -522,6 +617,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
|
|
|
522
617
|
cancel?: string | undefined;
|
|
523
618
|
} | undefined;
|
|
524
619
|
disabled?: boolean | undefined;
|
|
620
|
+
hidden_for?: string[] | undefined;
|
|
525
621
|
}, {
|
|
526
622
|
type: "button";
|
|
527
623
|
text: string;
|
|
@@ -535,6 +631,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
|
|
|
535
631
|
cancel?: string | undefined;
|
|
536
632
|
} | undefined;
|
|
537
633
|
disabled?: boolean | undefined;
|
|
634
|
+
hidden_for?: string[] | undefined;
|
|
538
635
|
}>, z.ZodObject<{
|
|
539
636
|
type: z.ZodLiteral<"linkButton">;
|
|
540
637
|
text: z.ZodString;
|
|
@@ -571,6 +668,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
|
|
|
571
668
|
cancel?: string | undefined;
|
|
572
669
|
} | undefined;
|
|
573
670
|
disabled?: boolean | undefined;
|
|
671
|
+
hidden_for?: string[] | undefined;
|
|
574
672
|
} | {
|
|
575
673
|
type: "linkButton";
|
|
576
674
|
text: string;
|
|
@@ -593,6 +691,7 @@ export declare const ActionsBlockSchema: z.ZodObject<{
|
|
|
593
691
|
cancel?: string | undefined;
|
|
594
692
|
} | undefined;
|
|
595
693
|
disabled?: boolean | undefined;
|
|
694
|
+
hidden_for?: string[] | undefined;
|
|
596
695
|
} | {
|
|
597
696
|
type: "linkButton";
|
|
598
697
|
text: string;
|
|
@@ -692,23 +791,27 @@ export declare const OverflowBlockSchema: z.ZodObject<{
|
|
|
692
791
|
label?: string | undefined;
|
|
693
792
|
}>;
|
|
694
793
|
export type OverflowBlock = z.infer<typeof OverflowBlockSchema>;
|
|
695
|
-
/**
|
|
794
|
+
/**
|
|
795
|
+
* 진행률 바 (0~100). 에이전트가 m.replace 편집으로 갱신해 "스트리밍" 진행 표시 가능.
|
|
796
|
+
*
|
|
797
|
+
* 🔴 **톤 축이 없다** — 배지·콜아웃·메트릭과 갈리는 자리다. 이 블록의 렌더러는 shadcn `Progress`
|
|
798
|
+
* 이고 채움 색이 `bg-primary` 하나뿐이라(라이브러리에 그 축이 없다) 톤을 받아 봐야 그릴 곳이 없다.
|
|
799
|
+
* 색을 넣고 싶으면 스키마가 아니라 **렌더러부터** 물을 것(`docs/cob-to-shadcn-map.md` 의 `progress` 행).
|
|
800
|
+
* 진행 바 옆에서 성패를 말해야 하면 `label` 이나 형제 `badge`·`callout` 블록이 그 자리다.
|
|
801
|
+
*/
|
|
696
802
|
export declare const ProgressBlockSchema: z.ZodObject<{
|
|
697
803
|
type: z.ZodLiteral<"progress">;
|
|
698
804
|
/** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
|
|
699
805
|
value: z.ZodOptional<z.ZodNumber>;
|
|
700
806
|
label: z.ZodOptional<z.ZodString>;
|
|
701
|
-
tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
|
|
702
807
|
}, "strip", z.ZodTypeAny, {
|
|
703
808
|
type: "progress";
|
|
704
809
|
value?: number | undefined;
|
|
705
810
|
label?: string | undefined;
|
|
706
|
-
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
707
811
|
}, {
|
|
708
812
|
type: "progress";
|
|
709
813
|
value?: number | undefined;
|
|
710
814
|
label?: string | undefined;
|
|
711
|
-
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
712
815
|
}>;
|
|
713
816
|
/** 멀티스텝 진행 상태 표시(타임라인). 폼 마법사와 별개로, 작업 단계 시각화에 쓴다. */
|
|
714
817
|
export declare const StepsBlockSchema: z.ZodObject<{
|
|
@@ -901,21 +1004,26 @@ export declare const ChartBlockSchema: z.ZodObject<{
|
|
|
901
1004
|
caption?: string | undefined;
|
|
902
1005
|
}>;
|
|
903
1006
|
export type ChartBlock = z.infer<typeof ChartBlockSchema>;
|
|
904
|
-
/**
|
|
1007
|
+
/**
|
|
1008
|
+
* 단일 아바타 — 얼굴 동그라미(이미지/이니셜) + 이름·보조텍스트 + 상태점. 담당자 표시.
|
|
1009
|
+
*
|
|
1010
|
+
* 🔴 **`color` 는 뺐다**(0.6.0). 이니셜 면은 shadcn `AvatarFallback` 의 `bg-muted` 한 벌이고
|
|
1011
|
+
* 렌더러엔 그 색을 받을 자리가 없다 — 계약에 두면 작성자가 보내고 아무 일도 안 일어난다
|
|
1012
|
+
* (`progress.tone` 을 뺀 것과 같은 이유). 누구인지는 이니셜·이름·프로필 사진이 나른다.
|
|
1013
|
+
*/
|
|
905
1014
|
export declare const AvatarBlockSchema: z.ZodObject<{
|
|
906
1015
|
type: z.ZodLiteral<"avatar">;
|
|
907
1016
|
name: z.ZodString;
|
|
908
1017
|
initials: z.ZodOptional<z.ZodString>;
|
|
909
|
-
color: z.ZodOptional<z.ZodString>;
|
|
910
1018
|
src: z.ZodOptional<z.ZodString>;
|
|
911
1019
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
1020
|
+
/** 우하단 상태점 — 네 상태가 각자 색을 갖는다(`--cob-color-presence-*`). 색만으로 안 나르도록 `aria-label` 이 상태를 병기한다. */
|
|
912
1021
|
status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
|
|
913
1022
|
}, "strip", z.ZodTypeAny, {
|
|
914
1023
|
type: "avatar";
|
|
915
1024
|
name: string;
|
|
916
1025
|
status?: "online" | "away" | "busy" | "offline" | undefined;
|
|
917
1026
|
initials?: string | undefined;
|
|
918
|
-
color?: string | undefined;
|
|
919
1027
|
src?: string | undefined;
|
|
920
1028
|
subtitle?: string | undefined;
|
|
921
1029
|
}, {
|
|
@@ -923,7 +1031,6 @@ export declare const AvatarBlockSchema: z.ZodObject<{
|
|
|
923
1031
|
name: string;
|
|
924
1032
|
status?: "online" | "away" | "busy" | "offline" | undefined;
|
|
925
1033
|
initials?: string | undefined;
|
|
926
|
-
color?: string | undefined;
|
|
927
1034
|
src?: string | undefined;
|
|
928
1035
|
subtitle?: string | undefined;
|
|
929
1036
|
}>;
|
|
@@ -935,19 +1042,15 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
|
|
|
935
1042
|
name: z.ZodString;
|
|
936
1043
|
/** 이니셜(미지정 시 name 에서 자동 생성). */
|
|
937
1044
|
initials: z.ZodOptional<z.ZodString>;
|
|
938
|
-
/** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
|
|
939
|
-
color: z.ZodOptional<z.ZodString>;
|
|
940
1045
|
/** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
|
|
941
1046
|
src: z.ZodOptional<z.ZodString>;
|
|
942
1047
|
}, "strip", z.ZodTypeAny, {
|
|
943
1048
|
name: string;
|
|
944
1049
|
initials?: string | undefined;
|
|
945
|
-
color?: string | undefined;
|
|
946
1050
|
src?: string | undefined;
|
|
947
1051
|
}, {
|
|
948
1052
|
name: string;
|
|
949
1053
|
initials?: string | undefined;
|
|
950
|
-
color?: string | undefined;
|
|
951
1054
|
src?: string | undefined;
|
|
952
1055
|
}>, "many">;
|
|
953
1056
|
/** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
|
|
@@ -958,7 +1061,6 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
|
|
|
958
1061
|
people: {
|
|
959
1062
|
name: string;
|
|
960
1063
|
initials?: string | undefined;
|
|
961
|
-
color?: string | undefined;
|
|
962
1064
|
src?: string | undefined;
|
|
963
1065
|
}[];
|
|
964
1066
|
label?: string | undefined;
|
|
@@ -968,7 +1070,6 @@ export declare const AvatarGroupBlockSchema: z.ZodObject<{
|
|
|
968
1070
|
people: {
|
|
969
1071
|
name: string;
|
|
970
1072
|
initials?: string | undefined;
|
|
971
|
-
color?: string | undefined;
|
|
972
1073
|
src?: string | undefined;
|
|
973
1074
|
}[];
|
|
974
1075
|
label?: string | undefined;
|
|
@@ -1121,7 +1222,6 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1121
1222
|
}>, "many">;
|
|
1122
1223
|
}, "strip", z.ZodTypeAny, {
|
|
1123
1224
|
title: string;
|
|
1124
|
-
id: string;
|
|
1125
1225
|
cards: {
|
|
1126
1226
|
title: string;
|
|
1127
1227
|
id: string;
|
|
@@ -1132,10 +1232,10 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1132
1232
|
} | undefined;
|
|
1133
1233
|
meta?: string[] | undefined;
|
|
1134
1234
|
}[];
|
|
1235
|
+
id: string;
|
|
1135
1236
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1136
1237
|
}, {
|
|
1137
1238
|
title: string;
|
|
1138
|
-
id: string;
|
|
1139
1239
|
cards: {
|
|
1140
1240
|
title: string;
|
|
1141
1241
|
id: string;
|
|
@@ -1146,6 +1246,7 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1146
1246
|
} | undefined;
|
|
1147
1247
|
meta?: string[] | undefined;
|
|
1148
1248
|
}[];
|
|
1249
|
+
id: string;
|
|
1149
1250
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1150
1251
|
}>, "many">;
|
|
1151
1252
|
caption: z.ZodOptional<z.ZodString>;
|
|
@@ -1153,7 +1254,6 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1153
1254
|
type: "kanban";
|
|
1154
1255
|
columns: {
|
|
1155
1256
|
title: string;
|
|
1156
|
-
id: string;
|
|
1157
1257
|
cards: {
|
|
1158
1258
|
title: string;
|
|
1159
1259
|
id: string;
|
|
@@ -1164,6 +1264,7 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1164
1264
|
} | undefined;
|
|
1165
1265
|
meta?: string[] | undefined;
|
|
1166
1266
|
}[];
|
|
1267
|
+
id: string;
|
|
1167
1268
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1168
1269
|
}[];
|
|
1169
1270
|
caption?: string | undefined;
|
|
@@ -1171,7 +1272,6 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1171
1272
|
type: "kanban";
|
|
1172
1273
|
columns: {
|
|
1173
1274
|
title: string;
|
|
1174
|
-
id: string;
|
|
1175
1275
|
cards: {
|
|
1176
1276
|
title: string;
|
|
1177
1277
|
id: string;
|
|
@@ -1182,6 +1282,7 @@ export declare const KanbanBlockSchema: z.ZodObject<{
|
|
|
1182
1282
|
} | undefined;
|
|
1183
1283
|
meta?: string[] | undefined;
|
|
1184
1284
|
}[];
|
|
1285
|
+
id: string;
|
|
1185
1286
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1186
1287
|
}[];
|
|
1187
1288
|
caption?: string | undefined;
|
|
@@ -1286,7 +1387,16 @@ export declare const WidgetBlockSchema: z.ZodObject<{
|
|
|
1286
1387
|
export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1287
1388
|
type: z.ZodLiteral<"text">;
|
|
1288
1389
|
text: z.ZodString;
|
|
1289
|
-
/**
|
|
1390
|
+
/**
|
|
1391
|
+
* true면 안전 화이트리스트 마크다운으로 렌더 (raw HTML 금지).
|
|
1392
|
+
*
|
|
1393
|
+
* 인라인: `**굵게**` `*기울임*` `` `코드` `` `[텍스트](http…)`.
|
|
1394
|
+
* 블록: 문단(빈 줄) · 목록(`-` `*` `+` / `1.`, 중첩 가능) · 제목(`#`~`###`) · 인용(`>`) ·
|
|
1395
|
+
* 구분선(`---`) · 펜스 코드(``` ```` ```).
|
|
1396
|
+
* 표는 지원하지 않는다 — 표는 `table` 블록이 따로 있다.
|
|
1397
|
+
*
|
|
1398
|
+
* 플래그를 안 주면 평문이다(줄바꿈만 살아난다). 긴 글에는 켜는 쪽이 읽힌다 — #581.
|
|
1399
|
+
*/
|
|
1290
1400
|
markdown: z.ZodOptional<z.ZodBoolean>;
|
|
1291
1401
|
}, "strip", z.ZodTypeAny, {
|
|
1292
1402
|
type: "text";
|
|
@@ -1453,17 +1563,14 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1453
1563
|
/** 0~100 백분율(정수). 생략하면 indeterminate(불확정) 표시. 와이어 canonical JSON 은 소수 금지 → int 강제. */
|
|
1454
1564
|
value: z.ZodOptional<z.ZodNumber>;
|
|
1455
1565
|
label: z.ZodOptional<z.ZodString>;
|
|
1456
|
-
tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
|
|
1457
1566
|
}, "strip", z.ZodTypeAny, {
|
|
1458
1567
|
type: "progress";
|
|
1459
1568
|
value?: number | undefined;
|
|
1460
1569
|
label?: string | undefined;
|
|
1461
|
-
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1462
1570
|
}, {
|
|
1463
1571
|
type: "progress";
|
|
1464
1572
|
value?: number | undefined;
|
|
1465
1573
|
label?: string | undefined;
|
|
1466
|
-
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1467
1574
|
}>, z.ZodObject<{
|
|
1468
1575
|
type: z.ZodLiteral<"steps">;
|
|
1469
1576
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -1565,16 +1672,15 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1565
1672
|
type: z.ZodLiteral<"avatar">;
|
|
1566
1673
|
name: z.ZodString;
|
|
1567
1674
|
initials: z.ZodOptional<z.ZodString>;
|
|
1568
|
-
color: z.ZodOptional<z.ZodString>;
|
|
1569
1675
|
src: z.ZodOptional<z.ZodString>;
|
|
1570
1676
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
1677
|
+
/** 우하단 상태점 — 네 상태가 각자 색을 갖는다(`--cob-color-presence-*`). 색만으로 안 나르도록 `aria-label` 이 상태를 병기한다. */
|
|
1571
1678
|
status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
|
|
1572
1679
|
}, "strip", z.ZodTypeAny, {
|
|
1573
1680
|
type: "avatar";
|
|
1574
1681
|
name: string;
|
|
1575
1682
|
status?: "online" | "away" | "busy" | "offline" | undefined;
|
|
1576
1683
|
initials?: string | undefined;
|
|
1577
|
-
color?: string | undefined;
|
|
1578
1684
|
src?: string | undefined;
|
|
1579
1685
|
subtitle?: string | undefined;
|
|
1580
1686
|
}, {
|
|
@@ -1582,7 +1688,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1582
1688
|
name: string;
|
|
1583
1689
|
status?: "online" | "away" | "busy" | "offline" | undefined;
|
|
1584
1690
|
initials?: string | undefined;
|
|
1585
|
-
color?: string | undefined;
|
|
1586
1691
|
src?: string | undefined;
|
|
1587
1692
|
subtitle?: string | undefined;
|
|
1588
1693
|
}>, z.ZodObject<{
|
|
@@ -1591,19 +1696,15 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1591
1696
|
name: z.ZodString;
|
|
1592
1697
|
/** 이니셜(미지정 시 name 에서 자동 생성). */
|
|
1593
1698
|
initials: z.ZodOptional<z.ZodString>;
|
|
1594
|
-
/** 배경색(CSS 색/토큰). 미지정 시 name 해시로 팔레트에서 고름. */
|
|
1595
|
-
color: z.ZodOptional<z.ZodString>;
|
|
1596
1699
|
/** 이미지 URL(https). 있으면 이미지, 없으면 이니셜. */
|
|
1597
1700
|
src: z.ZodOptional<z.ZodString>;
|
|
1598
1701
|
}, "strip", z.ZodTypeAny, {
|
|
1599
1702
|
name: string;
|
|
1600
1703
|
initials?: string | undefined;
|
|
1601
|
-
color?: string | undefined;
|
|
1602
1704
|
src?: string | undefined;
|
|
1603
1705
|
}, {
|
|
1604
1706
|
name: string;
|
|
1605
1707
|
initials?: string | undefined;
|
|
1606
|
-
color?: string | undefined;
|
|
1607
1708
|
src?: string | undefined;
|
|
1608
1709
|
}>, "many">;
|
|
1609
1710
|
/** 앞에서 몇 명까지 보일지(기본 5). 나머지는 +N. */
|
|
@@ -1614,7 +1715,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1614
1715
|
people: {
|
|
1615
1716
|
name: string;
|
|
1616
1717
|
initials?: string | undefined;
|
|
1617
|
-
color?: string | undefined;
|
|
1618
1718
|
src?: string | undefined;
|
|
1619
1719
|
}[];
|
|
1620
1720
|
label?: string | undefined;
|
|
@@ -1624,7 +1724,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1624
1724
|
people: {
|
|
1625
1725
|
name: string;
|
|
1626
1726
|
initials?: string | undefined;
|
|
1627
|
-
color?: string | undefined;
|
|
1628
1727
|
src?: string | undefined;
|
|
1629
1728
|
}[];
|
|
1630
1729
|
label?: string | undefined;
|
|
@@ -1758,7 +1857,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1758
1857
|
}>, "many">;
|
|
1759
1858
|
}, "strip", z.ZodTypeAny, {
|
|
1760
1859
|
title: string;
|
|
1761
|
-
id: string;
|
|
1762
1860
|
cards: {
|
|
1763
1861
|
title: string;
|
|
1764
1862
|
id: string;
|
|
@@ -1769,10 +1867,10 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1769
1867
|
} | undefined;
|
|
1770
1868
|
meta?: string[] | undefined;
|
|
1771
1869
|
}[];
|
|
1870
|
+
id: string;
|
|
1772
1871
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1773
1872
|
}, {
|
|
1774
1873
|
title: string;
|
|
1775
|
-
id: string;
|
|
1776
1874
|
cards: {
|
|
1777
1875
|
title: string;
|
|
1778
1876
|
id: string;
|
|
@@ -1783,6 +1881,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1783
1881
|
} | undefined;
|
|
1784
1882
|
meta?: string[] | undefined;
|
|
1785
1883
|
}[];
|
|
1884
|
+
id: string;
|
|
1786
1885
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1787
1886
|
}>, "many">;
|
|
1788
1887
|
caption: z.ZodOptional<z.ZodString>;
|
|
@@ -1790,7 +1889,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1790
1889
|
type: "kanban";
|
|
1791
1890
|
columns: {
|
|
1792
1891
|
title: string;
|
|
1793
|
-
id: string;
|
|
1794
1892
|
cards: {
|
|
1795
1893
|
title: string;
|
|
1796
1894
|
id: string;
|
|
@@ -1801,6 +1899,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1801
1899
|
} | undefined;
|
|
1802
1900
|
meta?: string[] | undefined;
|
|
1803
1901
|
}[];
|
|
1902
|
+
id: string;
|
|
1804
1903
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1805
1904
|
}[];
|
|
1806
1905
|
caption?: string | undefined;
|
|
@@ -1808,7 +1907,6 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1808
1907
|
type: "kanban";
|
|
1809
1908
|
columns: {
|
|
1810
1909
|
title: string;
|
|
1811
|
-
id: string;
|
|
1812
1910
|
cards: {
|
|
1813
1911
|
title: string;
|
|
1814
1912
|
id: string;
|
|
@@ -1819,6 +1917,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1819
1917
|
} | undefined;
|
|
1820
1918
|
meta?: string[] | undefined;
|
|
1821
1919
|
}[];
|
|
1920
|
+
id: string;
|
|
1822
1921
|
tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
|
|
1823
1922
|
}[];
|
|
1824
1923
|
caption?: string | undefined;
|
|
@@ -2056,32 +2155,40 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2056
2155
|
options: z.ZodArray<z.ZodObject<{
|
|
2057
2156
|
value: z.ZodString;
|
|
2058
2157
|
label: z.ZodString;
|
|
2158
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
2059
2159
|
}, "strip", z.ZodTypeAny, {
|
|
2060
2160
|
value: string;
|
|
2061
2161
|
label: string;
|
|
2162
|
+
hint?: string | undefined;
|
|
2062
2163
|
}, {
|
|
2063
2164
|
value: string;
|
|
2064
2165
|
label: string;
|
|
2166
|
+
hint?: string | undefined;
|
|
2065
2167
|
}>, "many">;
|
|
2066
2168
|
value: z.ZodOptional<z.ZodString>;
|
|
2169
|
+
style: z.ZodOptional<z.ZodEnum<["cards", "segmented"]>>;
|
|
2067
2170
|
}, "strip", z.ZodTypeAny, {
|
|
2068
2171
|
options: {
|
|
2069
2172
|
value: string;
|
|
2070
2173
|
label: string;
|
|
2174
|
+
hint?: string | undefined;
|
|
2071
2175
|
}[];
|
|
2072
2176
|
type: "radio";
|
|
2073
2177
|
name: string;
|
|
2074
2178
|
value?: string | undefined;
|
|
2075
2179
|
label?: string | undefined;
|
|
2180
|
+
style?: "cards" | "segmented" | undefined;
|
|
2076
2181
|
}, {
|
|
2077
2182
|
options: {
|
|
2078
2183
|
value: string;
|
|
2079
2184
|
label: string;
|
|
2185
|
+
hint?: string | undefined;
|
|
2080
2186
|
}[];
|
|
2081
2187
|
type: "radio";
|
|
2082
2188
|
name: string;
|
|
2083
2189
|
value?: string | undefined;
|
|
2084
2190
|
label?: string | undefined;
|
|
2191
|
+
style?: "cards" | "segmented" | undefined;
|
|
2085
2192
|
}>, z.ZodObject<{
|
|
2086
2193
|
type: z.ZodLiteral<"select">;
|
|
2087
2194
|
name: z.ZodString;
|
|
@@ -2136,6 +2243,36 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2136
2243
|
label: string;
|
|
2137
2244
|
name: string;
|
|
2138
2245
|
checked?: boolean | undefined;
|
|
2246
|
+
}>, z.ZodObject<{
|
|
2247
|
+
type: z.ZodLiteral<"location">;
|
|
2248
|
+
name: z.ZodString;
|
|
2249
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2250
|
+
/**
|
|
2251
|
+
* 왜 필요한지 한 줄 — **OS 권한창보다 먼저** 보인다. 시스템 문구(Info.plist·Android 권한창)는
|
|
2252
|
+
* 앱 전체에 하나뿐이라 이 카드가 왜 묻는지는 여기서만 말할 수 있다(그리고 그게 심사가 보는 것이다).
|
|
2253
|
+
*/
|
|
2254
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
2255
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
2256
|
+
/** GPS 급 정확도로 받을지(느리고 배터리를 더 쓴다). 기본 false = 네트워크/대략 위치. */
|
|
2257
|
+
precise: z.ZodOptional<z.ZodBoolean>;
|
|
2258
|
+
/** 버튼 문구(작성자 소유 문장). 미지정이면 렌더러 크롬 문구를 쓴다. */
|
|
2259
|
+
buttonText: z.ZodOptional<z.ZodString>;
|
|
2260
|
+
}, "strip", z.ZodTypeAny, {
|
|
2261
|
+
type: "location";
|
|
2262
|
+
name: string;
|
|
2263
|
+
label?: string | undefined;
|
|
2264
|
+
required?: boolean | undefined;
|
|
2265
|
+
purpose?: string | undefined;
|
|
2266
|
+
precise?: boolean | undefined;
|
|
2267
|
+
buttonText?: string | undefined;
|
|
2268
|
+
}, {
|
|
2269
|
+
type: "location";
|
|
2270
|
+
name: string;
|
|
2271
|
+
label?: string | undefined;
|
|
2272
|
+
required?: boolean | undefined;
|
|
2273
|
+
purpose?: string | undefined;
|
|
2274
|
+
precise?: boolean | undefined;
|
|
2275
|
+
buttonText?: string | undefined;
|
|
2139
2276
|
}>, z.ZodObject<{
|
|
2140
2277
|
type: z.ZodLiteral<"button">;
|
|
2141
2278
|
/** 어떤 액션인지 식별. 클릭 시 org.corp.ui.action.action_id 로 회신됨. */
|
|
@@ -2161,6 +2298,19 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2161
2298
|
cancel?: string | undefined;
|
|
2162
2299
|
}>>;
|
|
2163
2300
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2301
|
+
/**
|
|
2302
|
+
* 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
|
|
2303
|
+
*
|
|
2304
|
+
* 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
|
|
2305
|
+
* Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
|
|
2306
|
+
* 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
|
|
2307
|
+
* 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
|
|
2308
|
+
*
|
|
2309
|
+
* 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
|
|
2310
|
+
* 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
|
|
2311
|
+
* 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
|
|
2312
|
+
*/
|
|
2313
|
+
hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2164
2314
|
}, "strip", z.ZodTypeAny, {
|
|
2165
2315
|
type: "button";
|
|
2166
2316
|
text: string;
|
|
@@ -2174,6 +2324,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2174
2324
|
cancel?: string | undefined;
|
|
2175
2325
|
} | undefined;
|
|
2176
2326
|
disabled?: boolean | undefined;
|
|
2327
|
+
hidden_for?: string[] | undefined;
|
|
2177
2328
|
}, {
|
|
2178
2329
|
type: "button";
|
|
2179
2330
|
text: string;
|
|
@@ -2187,6 +2338,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2187
2338
|
cancel?: string | undefined;
|
|
2188
2339
|
} | undefined;
|
|
2189
2340
|
disabled?: boolean | undefined;
|
|
2341
|
+
hidden_for?: string[] | undefined;
|
|
2190
2342
|
}>, z.ZodObject<{
|
|
2191
2343
|
type: z.ZodLiteral<"linkButton">;
|
|
2192
2344
|
text: z.ZodString;
|
|
@@ -2234,6 +2386,19 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2234
2386
|
cancel?: string | undefined;
|
|
2235
2387
|
}>>;
|
|
2236
2388
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2389
|
+
/**
|
|
2390
|
+
* 이 MXID 들에게는 버튼을 **감춘다**(뷰어별 어포던스).
|
|
2391
|
+
*
|
|
2392
|
+
* 왜 필요한가: 카드 한 장은 방 전체가 같이 본다. 그런데 "이 사람만 절대 못 누르는 버튼"이 있다 —
|
|
2393
|
+
* Forgejo 는 **자기 PR 자기 승인**을 422 로 거절한다(`approve your own pull is not allowed`).
|
|
2394
|
+
* 그래서 작성자에게 Approve 를 보여 주면 눌러도 실패 카드만 쌓인다. 카드 전체에서 버튼을 빼면
|
|
2395
|
+
* 남들이 승인을 못 하므로, 판정은 **보는 사람별**이어야 한다.
|
|
2396
|
+
*
|
|
2397
|
+
* 🔴 **권한이 아니다.** 진짜 게이트는 언제나 서버다(disabled/confirm 과 같은 자세) — 이건 없는
|
|
2398
|
+
* 어포던스를 안 보여 주기 위한 것뿐이다. 그래서 이 키를 모르는 옛 클라이언트가 버튼을 그대로
|
|
2399
|
+
* 보여 줘도 안전하다(누르면 서버가 사람이 읽을 이유와 함께 거절한다).
|
|
2400
|
+
*/
|
|
2401
|
+
hidden_for: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2237
2402
|
}, "strip", z.ZodTypeAny, {
|
|
2238
2403
|
type: "button";
|
|
2239
2404
|
text: string;
|
|
@@ -2247,6 +2412,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2247
2412
|
cancel?: string | undefined;
|
|
2248
2413
|
} | undefined;
|
|
2249
2414
|
disabled?: boolean | undefined;
|
|
2415
|
+
hidden_for?: string[] | undefined;
|
|
2250
2416
|
}, {
|
|
2251
2417
|
type: "button";
|
|
2252
2418
|
text: string;
|
|
@@ -2260,6 +2426,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2260
2426
|
cancel?: string | undefined;
|
|
2261
2427
|
} | undefined;
|
|
2262
2428
|
disabled?: boolean | undefined;
|
|
2429
|
+
hidden_for?: string[] | undefined;
|
|
2263
2430
|
}>, z.ZodObject<{
|
|
2264
2431
|
type: z.ZodLiteral<"linkButton">;
|
|
2265
2432
|
text: z.ZodString;
|
|
@@ -2296,6 +2463,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2296
2463
|
cancel?: string | undefined;
|
|
2297
2464
|
} | undefined;
|
|
2298
2465
|
disabled?: boolean | undefined;
|
|
2466
|
+
hidden_for?: string[] | undefined;
|
|
2299
2467
|
} | {
|
|
2300
2468
|
type: "linkButton";
|
|
2301
2469
|
text: string;
|
|
@@ -2318,6 +2486,7 @@ export declare const BlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
2318
2486
|
cancel?: string | undefined;
|
|
2319
2487
|
} | undefined;
|
|
2320
2488
|
disabled?: boolean | undefined;
|
|
2489
|
+
hidden_for?: string[] | undefined;
|
|
2321
2490
|
} | {
|
|
2322
2491
|
type: "linkButton";
|
|
2323
2492
|
text: string;
|