mirror of
https://github.com/we-promise/sure.git
synced 2026-09-07 07:34:14 +00:00
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:
co-authored by
Juan Jose Mata
sure-admin
parent
311f06e404
commit
0aa43de10a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user