2020-01-30 14:28:14 +01:00
|
|
|
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
|
2020-02-01 00:08:23 +01:00
|
|
|
package models
|
2020-01-30 14:28:14 +01:00
|
|
|
|
2020-02-02 00:29:42 +01:00
|
|
|
import (
|
2020-02-09 15:26:59 +01:00
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"strconv"
|
2021-02-04 19:02:51 +01:00
|
|
|
"time"
|
2020-02-02 00:29:42 +01:00
|
|
|
)
|
|
|
|
|
2020-01-30 14:28:14 +01:00
|
|
|
type AuthorizeResult struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
Success bool `json:"success"`
|
|
|
|
// A textual status message describing the result, can be used to show an error message when `success` is false
|
|
|
|
Status string `json:"status"`
|
|
|
|
// An access token used to authenticate new API requests as the newly authorized user. Is present when success is true
|
|
|
|
Token *string `json:"token"`
|
2020-01-30 14:28:14 +01:00
|
|
|
}
|
2020-02-01 14:52:27 +01:00
|
|
|
|
2021-10-03 15:36:10 +02:00
|
|
|
type Coordinates struct {
|
|
|
|
// GPS latitude in degrees
|
|
|
|
Latitude float64 `json:"latitude"`
|
|
|
|
// GPS longitude in degrees
|
|
|
|
Longitude float64 `json:"longitude"`
|
|
|
|
}
|
|
|
|
|
2020-07-10 14:26:19 +02:00
|
|
|
type MediaDownload struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// A description of the role of the media file
|
2020-08-11 22:34:42 +02:00
|
|
|
Title string `json:"title"`
|
|
|
|
MediaURL *MediaURL `json:"mediaUrl"`
|
2020-07-10 14:26:19 +02:00
|
|
|
}
|
|
|
|
|
2020-02-21 16:50:50 +01:00
|
|
|
type Notification struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// A key used to identify the notification, new notification updates with the same key, should replace the old notifications
|
|
|
|
Key string `json:"key"`
|
|
|
|
Type NotificationType `json:"type"`
|
|
|
|
// The text for the title of the notification
|
|
|
|
Header string `json:"header"`
|
|
|
|
// The text for the body of the notification
|
|
|
|
Content string `json:"content"`
|
|
|
|
// A value between 0 and 1 when the notification type is `Progress`
|
|
|
|
Progress *float64 `json:"progress"`
|
|
|
|
// Whether or not the message of the notification is positive, the UI might reflect this with a green color
|
|
|
|
Positive bool `json:"positive"`
|
|
|
|
// Whether or not the message of the notification is negative, the UI might reflect this with a red color
|
|
|
|
Negative bool `json:"negative"`
|
|
|
|
// Time in milliseconds before the notification should close
|
2020-02-26 19:44:47 +01:00
|
|
|
Timeout *int `json:"timeout"`
|
2020-02-21 16:50:50 +01:00
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// Used to specify how to sort items
|
2021-02-13 15:08:05 +01:00
|
|
|
type Ordering struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// A column in the database to order by
|
2021-02-13 15:08:05 +01:00
|
|
|
OrderBy *string `json:"order_by"`
|
|
|
|
OrderDirection *OrderDirection `json:"order_direction"`
|
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// Used to specify pagination on a list of items
|
2021-02-13 15:08:05 +01:00
|
|
|
type Pagination struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// How many items to maximally fetch
|
|
|
|
Limit *int `json:"limit"`
|
|
|
|
// How many items to skip from the beginning of the query, specified by the `Ordering`
|
2021-02-13 15:08:05 +01:00
|
|
|
Offset *int `json:"offset"`
|
|
|
|
}
|
|
|
|
|
2020-02-01 17:58:45 +01:00
|
|
|
type ScannerResult struct {
|
|
|
|
Finished bool `json:"finished"`
|
|
|
|
Success bool `json:"success"`
|
|
|
|
Progress *float64 `json:"progress"`
|
|
|
|
Message *string `json:"message"`
|
|
|
|
}
|
2020-02-05 16:49:51 +01:00
|
|
|
|
2020-03-05 11:53:42 +01:00
|
|
|
type SearchResult struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// The string that was searched for
|
|
|
|
Query string `json:"query"`
|
|
|
|
// A list of albums that matched the query
|
2020-03-05 11:53:42 +01:00
|
|
|
Albums []*Album `json:"albums"`
|
2022-02-05 01:21:00 +01:00
|
|
|
// A list of media that matched the query
|
|
|
|
Media []*Media `json:"media"`
|
2020-03-05 11:53:42 +01:00
|
|
|
}
|
|
|
|
|
2021-03-03 15:55:55 +01:00
|
|
|
// Credentials used to identify and authenticate a share token
|
|
|
|
type ShareTokenCredentials struct {
|
|
|
|
Token string `json:"token"`
|
|
|
|
Password *string `json:"password"`
|
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// A group of media from the same album and the same day, that is grouped together in a timeline view
|
2021-02-04 19:02:51 +01:00
|
|
|
type TimelineGroup struct {
|
2022-02-05 01:21:00 +01:00
|
|
|
// The full album containing the media in this timeline group
|
|
|
|
Album *Album `json:"album"`
|
|
|
|
// The media contained in this timeline group
|
|
|
|
Media []*Media `json:"media"`
|
|
|
|
// The total amount of media in this timeline group
|
|
|
|
MediaTotal int `json:"mediaTotal"`
|
|
|
|
// The day shared for all media in this timeline group
|
|
|
|
Date time.Time `json:"date"`
|
2021-02-04 19:02:51 +01:00
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// Supported language translations of the user interface
|
2021-04-11 22:31:42 +02:00
|
|
|
type LanguageTranslation string
|
|
|
|
|
|
|
|
const (
|
2021-07-25 15:39:05 +02:00
|
|
|
LanguageTranslationEnglish LanguageTranslation = "English"
|
|
|
|
LanguageTranslationFrench LanguageTranslation = "French"
|
|
|
|
LanguageTranslationItalian LanguageTranslation = "Italian"
|
|
|
|
LanguageTranslationSwedish LanguageTranslation = "Swedish"
|
|
|
|
LanguageTranslationDanish LanguageTranslation = "Danish"
|
|
|
|
LanguageTranslationSpanish LanguageTranslation = "Spanish"
|
|
|
|
LanguageTranslationPolish LanguageTranslation = "Polish"
|
2024-03-24 22:42:44 +01:00
|
|
|
LanguageTranslationUkrainian LanguageTranslation = "Ukrainian"
|
2021-07-25 15:39:05 +02:00
|
|
|
LanguageTranslationGerman LanguageTranslation = "German"
|
|
|
|
LanguageTranslationRussian LanguageTranslation = "Russian"
|
|
|
|
LanguageTranslationTraditionalChinese LanguageTranslation = "TraditionalChinese"
|
2021-08-30 12:17:39 +02:00
|
|
|
LanguageTranslationSimplifiedChinese LanguageTranslation = "SimplifiedChinese"
|
2021-08-10 01:33:09 +02:00
|
|
|
LanguageTranslationPortuguese LanguageTranslation = "Portuguese"
|
2022-07-05 15:11:49 +02:00
|
|
|
LanguageTranslationBasque LanguageTranslation = "Basque"
|
2022-12-02 13:32:49 +01:00
|
|
|
LanguageTranslationTurkish LanguageTranslation = "Turkish"
|
2021-04-11 22:31:42 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var AllLanguageTranslation = []LanguageTranslation{
|
2021-04-12 00:14:27 +02:00
|
|
|
LanguageTranslationEnglish,
|
2021-04-14 12:36:16 +02:00
|
|
|
LanguageTranslationFrench,
|
2021-04-17 12:23:02 +02:00
|
|
|
LanguageTranslationItalian,
|
2021-04-15 11:59:49 +02:00
|
|
|
LanguageTranslationSwedish,
|
2021-04-12 00:14:27 +02:00
|
|
|
LanguageTranslationDanish,
|
2021-04-19 13:23:21 +02:00
|
|
|
LanguageTranslationSpanish,
|
2021-04-19 19:09:40 +02:00
|
|
|
LanguageTranslationPolish,
|
2024-03-24 22:42:44 +01:00
|
|
|
LanguageTranslationUkrainian,
|
2021-04-20 01:16:39 +02:00
|
|
|
LanguageTranslationGerman,
|
2021-07-22 13:56:29 +02:00
|
|
|
LanguageTranslationRussian,
|
2021-07-25 15:39:05 +02:00
|
|
|
LanguageTranslationTraditionalChinese,
|
2021-08-30 12:17:39 +02:00
|
|
|
LanguageTranslationSimplifiedChinese,
|
2021-08-10 01:33:09 +02:00
|
|
|
LanguageTranslationPortuguese,
|
2022-07-05 15:11:49 +02:00
|
|
|
LanguageTranslationBasque,
|
2022-12-02 13:32:49 +01:00
|
|
|
LanguageTranslationTurkish,
|
2021-04-11 22:31:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e LanguageTranslation) IsValid() bool {
|
|
|
|
switch e {
|
2024-03-24 22:42:44 +01:00
|
|
|
case LanguageTranslationEnglish, LanguageTranslationFrench, LanguageTranslationItalian, LanguageTranslationSwedish, LanguageTranslationDanish, LanguageTranslationSpanish, LanguageTranslationPolish, LanguageTranslationUkrainian, LanguageTranslationGerman, LanguageTranslationRussian, LanguageTranslationTraditionalChinese, LanguageTranslationSimplifiedChinese, LanguageTranslationPortuguese, LanguageTranslationBasque, LanguageTranslationTurkish:
|
2021-04-11 22:31:42 +02:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e LanguageTranslation) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *LanguageTranslation) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = LanguageTranslation(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid LanguageTranslation", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e LanguageTranslation) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// Specified the type a particular notification is of
|
2020-02-21 16:50:50 +01:00
|
|
|
type NotificationType string
|
|
|
|
|
|
|
|
const (
|
2022-02-05 01:21:00 +01:00
|
|
|
// A regular message with no special additions
|
|
|
|
NotificationTypeMessage NotificationType = "Message"
|
|
|
|
// A notification with an attached progress indicator
|
2020-02-21 16:50:50 +01:00
|
|
|
NotificationTypeProgress NotificationType = "Progress"
|
2020-02-26 19:44:47 +01:00
|
|
|
// Close a notification with a given key
|
|
|
|
NotificationTypeClose NotificationType = "Close"
|
2020-02-21 16:50:50 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var AllNotificationType = []NotificationType{
|
|
|
|
NotificationTypeMessage,
|
|
|
|
NotificationTypeProgress,
|
2020-02-26 19:44:47 +01:00
|
|
|
NotificationTypeClose,
|
2020-02-21 16:50:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e NotificationType) IsValid() bool {
|
|
|
|
switch e {
|
2020-02-26 19:44:47 +01:00
|
|
|
case NotificationTypeMessage, NotificationTypeProgress, NotificationTypeClose:
|
2020-02-21 16:50:50 +01:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e NotificationType) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *NotificationType) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = NotificationType(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid NotificationType", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e NotificationType) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
|
|
|
|
2022-02-05 01:21:00 +01:00
|
|
|
// Used to specify which order to sort items in
|
2020-02-09 15:26:59 +01:00
|
|
|
type OrderDirection string
|
|
|
|
|
|
|
|
const (
|
2022-02-05 01:21:00 +01:00
|
|
|
// Sort accending A-Z
|
|
|
|
OrderDirectionAsc OrderDirection = "ASC"
|
|
|
|
// Sort decending Z-A
|
2020-02-09 15:26:59 +01:00
|
|
|
OrderDirectionDesc OrderDirection = "DESC"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllOrderDirection = []OrderDirection{
|
|
|
|
OrderDirectionAsc,
|
|
|
|
OrderDirectionDesc,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e OrderDirection) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case OrderDirectionAsc, OrderDirectionDesc:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e OrderDirection) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *OrderDirection) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = OrderDirection(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid OrderDirection", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e OrderDirection) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|
2022-08-09 07:09:55 +02:00
|
|
|
|
|
|
|
// Supported downsampling filters for thumbnail generation
|
|
|
|
type ThumbnailFilter string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ThumbnailFilterNearestNeighbor ThumbnailFilter = "NearestNeighbor"
|
|
|
|
ThumbnailFilterBox ThumbnailFilter = "Box"
|
|
|
|
ThumbnailFilterLinear ThumbnailFilter = "Linear"
|
|
|
|
ThumbnailFilterMitchellNetravali ThumbnailFilter = "MitchellNetravali"
|
|
|
|
ThumbnailFilterCatmullRom ThumbnailFilter = "CatmullRom"
|
|
|
|
ThumbnailFilterLanczos ThumbnailFilter = "Lanczos"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AllThumbnailFilter = []ThumbnailFilter{
|
|
|
|
ThumbnailFilterNearestNeighbor,
|
|
|
|
ThumbnailFilterBox,
|
|
|
|
ThumbnailFilterLinear,
|
|
|
|
ThumbnailFilterMitchellNetravali,
|
|
|
|
ThumbnailFilterCatmullRom,
|
|
|
|
ThumbnailFilterLanczos,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ThumbnailFilter) IsValid() bool {
|
|
|
|
switch e {
|
|
|
|
case ThumbnailFilterNearestNeighbor, ThumbnailFilterBox, ThumbnailFilterLinear, ThumbnailFilterMitchellNetravali, ThumbnailFilterCatmullRom, ThumbnailFilterLanczos:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ThumbnailFilter) String() string {
|
|
|
|
return string(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ThumbnailFilter) UnmarshalGQL(v interface{}) error {
|
|
|
|
str, ok := v.(string)
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("enums must be strings")
|
|
|
|
}
|
|
|
|
|
|
|
|
*e = ThumbnailFilter(str)
|
|
|
|
if !e.IsValid() {
|
|
|
|
return fmt.Errorf("%s is not a valid ThumbnailFilter", str)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e ThumbnailFilter) MarshalGQL(w io.Writer) {
|
|
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
|
|
}
|