Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 103 additions & 10 deletions generated/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/handler/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
105 changes: 100 additions & 5 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,77 @@ components:
required:
- id
- title
- message
- body
- notifyAfter
- notifyBefore
- isNotified
- targetUserIds
properties:
id:
type: string
description: 通知ID
title:
type: string
message:
description: 通知タイトル
body:
type: string
description: 通知本文
imageUrl:
type: string
description: 通知に表示する画像のURL
analyticsLabel:
type: string
description: |-
Comment thread
kantacky marked this conversation as resolved.
Firebase Analytics に記録する分析ラベル

通知の開封率計測などに利用
apnsBadge:
type: integer
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
description: |-
Android の通知TTL(秒)

FCM がメッセージを保持する最大時間。期限切れで破棄される
webpushLink:
type: string
description: Web Push 通知をクリックした際に開くURL
url:
type: string
description: |-
通知をタップした時に開くURL
アプリを開くのみの場合はnull
アプリを開くのみの場合は未指定
notifyAfter:
type: string
format: date-time
Expand All @@ -440,27 +494,68 @@ 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
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
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:
Expand Down
Loading