Add experimental Swift-native Sure Insights app (#3134)

* Add Swift-native Sure app

* Fix push subscriptions schema for CI

* Address native app review feedback

* Address remaining native app review feedback

* Use Flutter app logo for native icon

* Honor insight notification preferences and locale

---------

Co-authored-by: Juan Jose Mata <2v8shcb6pz@privaterelay.appleid.com>
Co-authored-by: sure-admin <sure-admin@splashblot.com>
This commit is contained in:
Juan José Mata
2026-08-25 04:16:24 +02:00
committed by GitHub
co-authored by Juan Jose Mata sure-admin
parent 311f06e404
commit 0aa43de10a
51 changed files with 2633 additions and 4 deletions
+145
View File
@@ -301,6 +301,72 @@ components:
"$ref": "#/components/schemas/ChatSummary"
pagination:
"$ref": "#/components/schemas/Pagination"
Insight:
type: object
required:
- id
- type
- title
- body
- priority
- status
properties:
id:
type: string
format: uuid
type:
type: string
title:
type: string
body:
type: string
priority:
type: string
enum:
- high
- medium
- low
status:
type: string
enum:
- active
- read
generated_at:
type: string
format: date-time
nullable: true
InsightCollection:
type: object
required:
- insights
properties:
insights:
type: array
items:
"$ref": "#/components/schemas/Insight"
PushSubscription:
type: object
required:
- id
- environment
- platform
- last_registered_at
properties:
id:
type: string
format: uuid
environment:
type: string
enum:
- sandbox
- production
platform:
type: string
enum:
- ios
last_registered_at:
type: string
format: date-time
RetryResponse:
type: object
required:
@@ -4515,6 +4581,85 @@ paths:
application/json:
schema:
"$ref": "#/components/schemas/ErrorResponse"
"/api/v1/insights":
get:
summary: List proactive insights
tags:
- Insights
security:
- apiKeyAuth: []
responses:
'200':
description: insights listed
content:
application/json:
schema:
"$ref": "#/components/schemas/InsightCollection"
'403':
description: preview features disabled
content:
application/json:
schema:
"$ref": "#/components/schemas/ErrorResponse"
"/api/v1/push_subscriptions":
post:
summary: Register an APNs device token
tags:
- Push Subscriptions
security:
- apiKeyAuth: []
parameters: []
responses:
'201':
description: token registered
content:
application/json:
schema:
"$ref": "#/components/schemas/PushSubscription"
'422':
description: invalid or conflicting subscription
content:
application/json:
schema:
"$ref": "#/components/schemas/ErrorResponse"
requestBody:
content:
application/json:
schema:
type: object
required:
- token
- environment
- platform
properties:
token:
type: string
environment:
type: string
enum:
- sandbox
- production
platform:
type: string
enum:
- ios
required: true
"/api/v1/push_subscriptions/{id}":
parameters:
- name: id
in: path
required: true
schema:
type: string
delete:
summary: Unregister an APNs device token
tags:
- Push Subscriptions
security:
- apiKeyAuth: []
responses:
'204':
description: token unregistered
"/api/v1/family_exports":
get:
summary: Lists family exports