From ee3e59900a840d43323850506bd5abed66f2662d Mon Sep 17 00:00:00 2001 From: kantacky <51151242+kantacky@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:34:33 +0000 Subject: [PATCH 1/5] Update OpenAPI schema from dotto-typespec --- openapi/openapi.yaml | 109 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 5 deletions(-) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 2dbf91e..96725a9 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -403,7 +403,7 @@ components: required: - id - title - - message + - body - notifyAfter - notifyBefore - isNotified @@ -411,15 +411,71 @@ components: properties: id: type: string + description: 通知ID title: type: string - message: + description: 通知タイトル + body: + type: string + description: 通知本文 + imageUrl: + type: string + description: 通知に表示する画像のURL + analyticsLabel: + type: string + description: |- + Firebase Analytics に記録する分析ラベル + + 通知の開封率計測などに利用 + apnsBadge: + type: integer + format: int32 + description: |- + APNs のバッジ数 + + アプリアイコンに表示される数値。0 でバッジを消去 + apnsSound: + type: string + description: |- + APNs の通知音 + + - "default": OS 標準の通知音 + - "" または省略: 無音 + - 任意のファイル名(例: "alert.caf"): アプリバンドルまたは Library/Sounds/ に同梱されたカスタムサウンド + 対応フォーマットは .caf / .aiff / .wav(Linear PCM, MA4, µ-law, a-law)、最大30秒 + apnsContentAvailable: + type: boolean + description: |- + APNs の content-available フラグ + + true でサイレントプッシュ(バックグラウンド更新)になる + androidChannelId: + type: string + description: |- + Android の通知チャンネルID + + Android 8.0 以降、通知はチャンネル単位で管理される + androidPriority: + type: string + description: |- + Android の通知優先度 + + "normal" または "high"。"high" は即時配信される + androidTtlSeconds: + type: integer + format: int32 + description: |- + Android の通知TTL(秒) + + FCM がメッセージを保持する最大時間。期限切れで破棄される + webpushLink: type: string + description: Web Push 通知をクリックした際に開くURL url: type: string description: |- 通知をタップした時に開くURL - アプリを開くのみの場合はnull + アプリを開くのみの場合は未指定 notifyAfter: type: string format: date-time @@ -440,27 +496,70 @@ components: type: object required: - title - - message + - body - notifyAfter - notifyBefore - targetUserIds properties: title: type: string - message: + description: 通知タイトル + body: + type: string + description: 通知本文 + imageUrl: + type: string + description: 通知に表示する画像のURL + analyticsLabel: + type: string + description: Firebase Analytics に記録する分析ラベル + apnsBadge: + type: integer + format: int32 + description: APNs のバッジ数 + apnsSound: + type: string + description: |- + APNs の通知音 + + - "default": OS 標準の通知音 + - "" または省略: 無音 + - 任意のファイル名(例: "alert.caf"): アプリバンドルまたは Library/Sounds/ に同梱されたカスタムサウンド + 対応フォーマットは .caf / .aiff / .wav(Linear PCM, MA4, µ-law, a-law)、最大30秒 + apnsContentAvailable: + type: boolean + description: APNs の content-available フラグ(true でサイレントプッシュ) + androidChannelId: + type: string + description: Android の通知チャンネルID + androidPriority: type: string + description: Android の通知優先度("normal" または "high") + androidTtlSeconds: + type: integer + format: int32 + description: Android の通知TTL(秒) + webpushLink: + type: string + description: Web Push 通知をクリックした際に開くURL url: type: string + description: |- + 通知をタップした時に開くURL + アプリを開くのみの場合は未指定 notifyAfter: type: string format: date-time + description: 通知送信可能になる日時(この時刻以降に送信対象となる) notifyBefore: type: string format: date-time + description: 通知送信期限日時(この時刻を過ぎた場合は送信しない) targetUserIds: type: array items: type: string + description: 対象ユーザーIDのリスト User: type: object required: From e98e74aa8f62bd5ef02b2cd51d2804c315f333ca Mon Sep 17 00:00:00 2001 From: Kanta Oikawa Date: Fri, 24 Apr 2026 20:40:47 +0900 Subject: [PATCH 2/5] Regenerate API code for Notification schema changes Co-Authored-By: Claude Opus 4.7 (1M context) --- generated/api.gen.go | 113 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 103 insertions(+), 10 deletions(-) diff --git a/generated/api.gen.go b/generated/api.gen.go index 39d53a0..e513db5 100644 --- a/generated/api.gen.go +++ b/generated/api.gen.go @@ -161,11 +161,55 @@ type FCMTokenRequest struct { // Notification defines model for Notification. type Notification struct { + // AnalyticsLabel Firebase Analytics に記録する分析ラベル + // + // 通知の開封率計測などに利用 + AnalyticsLabel *string `json:"analyticsLabel,omitempty"` + + // AndroidChannelId Android の通知チャンネルID + // + // Android 8.0 以降、通知はチャンネル単位で管理される + AndroidChannelId *string `json:"androidChannelId,omitempty"` + + // AndroidPriority Android の通知優先度 + // + // "normal" または "high"。"high" は即時配信される + AndroidPriority *string `json:"androidPriority,omitempty"` + + // AndroidTtlSeconds Android の通知TTL(秒) + // + // FCM がメッセージを保持する最大時間。期限切れで破棄される + AndroidTtlSeconds *int32 `json:"androidTtlSeconds,omitempty"` + + // ApnsBadge APNs のバッジ数 + // + // アプリアイコンに表示される数値。0 でバッジを消去 + ApnsBadge *int32 `json:"apnsBadge,omitempty"` + + // ApnsContentAvailable APNs の content-available フラグ + // + // true でサイレントプッシュ(バックグラウンド更新)になる + ApnsContentAvailable *bool `json:"apnsContentAvailable,omitempty"` + + // ApnsSound APNs の通知音 + // + // - "default": OS 標準の通知音 + // - "" または省略: 無音 + // - 任意のファイル名(例: "alert.caf"): アプリバンドルまたは Library/Sounds/ に同梱されたカスタムサウンド + // 対応フォーマットは .caf / .aiff / .wav(Linear PCM, MA4, µ-law, a-law)、最大30秒 + ApnsSound *string `json:"apnsSound,omitempty"` + + // Body 通知本文 + Body string `json:"body"` + + // Id 通知ID Id string `json:"id"` + // ImageUrl 通知に表示する画像のURL + ImageUrl *string `json:"imageUrl,omitempty"` + // IsNotified 通知が送信されたかどうか - IsNotified bool `json:"isNotified"` - Message string `json:"message"` + IsNotified bool `json:"isNotified"` // NotifyAfter 通知送信可能になる日時(この時刻以降に送信対象となる) NotifyAfter time.Time `json:"notifyAfter"` @@ -175,21 +219,70 @@ type Notification struct { // TargetUserIds 対象ユーザーIDのリスト TargetUserIds []string `json:"targetUserIds"` - Title string `json:"title"` + + // Title 通知タイトル + Title string `json:"title"` // Url 通知をタップした時に開くURL - // アプリを開くのみの場合はnull + // アプリを開くのみの場合は未指定 Url *string `json:"url,omitempty"` + + // WebpushLink Web Push 通知をクリックした際に開くURL + WebpushLink *string `json:"webpushLink,omitempty"` } // NotificationRequest defines model for NotificationRequest. type NotificationRequest struct { - Message string `json:"message"` - NotifyAfter time.Time `json:"notifyAfter"` - NotifyBefore time.Time `json:"notifyBefore"` - TargetUserIds []string `json:"targetUserIds"` - Title string `json:"title"` - Url *string `json:"url,omitempty"` + // AnalyticsLabel Firebase Analytics に記録する分析ラベル + AnalyticsLabel *string `json:"analyticsLabel,omitempty"` + + // AndroidChannelId Android の通知チャンネルID + AndroidChannelId *string `json:"androidChannelId,omitempty"` + + // AndroidPriority Android の通知優先度("normal" または "high") + AndroidPriority *string `json:"androidPriority,omitempty"` + + // AndroidTtlSeconds Android の通知TTL(秒) + AndroidTtlSeconds *int32 `json:"androidTtlSeconds,omitempty"` + + // ApnsBadge APNs のバッジ数 + ApnsBadge *int32 `json:"apnsBadge,omitempty"` + + // ApnsContentAvailable APNs の content-available フラグ(true でサイレントプッシュ) + ApnsContentAvailable *bool `json:"apnsContentAvailable,omitempty"` + + // ApnsSound APNs の通知音 + // + // - "default": OS 標準の通知音 + // - "" または省略: 無音 + // - 任意のファイル名(例: "alert.caf"): アプリバンドルまたは Library/Sounds/ に同梱されたカスタムサウンド + // 対応フォーマットは .caf / .aiff / .wav(Linear PCM, MA4, µ-law, a-law)、最大30秒 + ApnsSound *string `json:"apnsSound,omitempty"` + + // Body 通知本文 + Body string `json:"body"` + + // ImageUrl 通知に表示する画像のURL + ImageUrl *string `json:"imageUrl,omitempty"` + + // NotifyAfter 通知送信可能になる日時(この時刻以降に送信対象となる) + NotifyAfter time.Time `json:"notifyAfter"` + + // NotifyBefore 通知送信期限日時(この時刻を過ぎた場合は送信しない) + NotifyBefore time.Time `json:"notifyBefore"` + + // TargetUserIds 対象ユーザーIDのリスト + TargetUserIds []string `json:"targetUserIds"` + + // Title 通知タイトル + Title string `json:"title"` + + // Url 通知をタップした時に開くURL + // アプリを開くのみの場合は未指定 + Url *string `json:"url,omitempty"` + + // WebpushLink Web Push 通知をクリックした際に開くURL + WebpushLink *string `json:"webpushLink,omitempty"` } // User defines model for User. From b776a571f142d2e5a0773f0f9c1ebda3105a60f3 Mon Sep 17 00:00:00 2001 From: Kanta Oikawa Date: Fri, 24 Apr 2026 20:40:47 +0900 Subject: [PATCH 3/5] Map Notification body field to domain Message Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/handler/converter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/handler/converter.go b/internal/handler/converter.go index 0a16c0d..48077a2 100644 --- a/internal/handler/converter.go +++ b/internal/handler/converter.go @@ -85,7 +85,7 @@ func toAPINotification(n domain.Notification) api.Notification { return api.Notification{ Id: n.ID, Title: n.Title, - Message: n.Message, + Body: n.Message, Url: n.URL, NotifyAfter: n.NotifyAfter, NotifyBefore: n.NotifyBefore, @@ -106,7 +106,7 @@ func toDomainNotification(id string, req api.NotificationRequest) domain.Notific return domain.Notification{ ID: id, Title: req.Title, - Message: req.Message, + Message: req.Body, URL: req.Url, NotifyAfter: req.NotifyAfter, NotifyBefore: req.NotifyBefore, From b2f35ab2036616fb66125550f92f63872dac9b86 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:09:39 +0000 Subject: [PATCH 4/5] Update OpenAPI schema from dotto-typespec --- openapi/openapi.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 96725a9..f35fc9a 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -429,7 +429,6 @@ components: 通知の開封率計測などに利用 apnsBadge: type: integer - format: int32 description: |- APNs のバッジ数 @@ -463,7 +462,6 @@ components: "normal" または "high"。"high" は即時配信される androidTtlSeconds: type: integer - format: int32 description: |- Android の通知TTL(秒) @@ -515,7 +513,6 @@ components: description: Firebase Analytics に記録する分析ラベル apnsBadge: type: integer - format: int32 description: APNs のバッジ数 apnsSound: type: string @@ -537,7 +534,6 @@ components: description: Android の通知優先度("normal" または "high") androidTtlSeconds: type: integer - format: int32 description: Android の通知TTL(秒) webpushLink: type: string From 8d93e9998a20024e51cf9e6806be1f174a08d3c3 Mon Sep 17 00:00:00 2001 From: Kanta Oikawa Date: Fri, 24 Apr 2026 21:12:51 +0900 Subject: [PATCH 5/5] =?UTF-8?q?Notification=E3=82=B9=E3=82=AD=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E3=81=AE=E6=95=B0=E5=80=A4=E5=9E=8B=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E7=94=9F=E6=88=90=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit androidTtlSeconds と apnsBadge の型が int32 から int に変更されたため、生成コードを再生成した。 Co-Authored-By: Claude Opus 4.7 (1M context) --- generated/api.gen.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generated/api.gen.go b/generated/api.gen.go index e513db5..916e0b5 100644 --- a/generated/api.gen.go +++ b/generated/api.gen.go @@ -179,12 +179,12 @@ type Notification struct { // AndroidTtlSeconds Android の通知TTL(秒) // // FCM がメッセージを保持する最大時間。期限切れで破棄される - AndroidTtlSeconds *int32 `json:"androidTtlSeconds,omitempty"` + AndroidTtlSeconds *int `json:"androidTtlSeconds,omitempty"` // ApnsBadge APNs のバッジ数 // // アプリアイコンに表示される数値。0 でバッジを消去 - ApnsBadge *int32 `json:"apnsBadge,omitempty"` + ApnsBadge *int `json:"apnsBadge,omitempty"` // ApnsContentAvailable APNs の content-available フラグ // @@ -243,10 +243,10 @@ type NotificationRequest struct { AndroidPriority *string `json:"androidPriority,omitempty"` // AndroidTtlSeconds Android の通知TTL(秒) - AndroidTtlSeconds *int32 `json:"androidTtlSeconds,omitempty"` + AndroidTtlSeconds *int `json:"androidTtlSeconds,omitempty"` // ApnsBadge APNs のバッジ数 - ApnsBadge *int32 `json:"apnsBadge,omitempty"` + ApnsBadge *int `json:"apnsBadge,omitempty"` // ApnsContentAvailable APNs の content-available フラグ(true でサイレントプッシュ) ApnsContentAvailable *bool `json:"apnsContentAvailable,omitempty"`