Update store.md. Couldn't find app
and user
in the raw store data
This commit is contained in:
parent
da44465d7a
commit
2209659491
1 changed files with 472 additions and 22 deletions
494
docs/store.md
494
docs/store.md
|
@ -11,8 +11,43 @@ Due to the large size of the Redux store in soapbox-fe, it's worth documenting t
|
|||
If it's not documented, it's because I inherited it from Mastodon and I don't know what it does yet.
|
||||
|
||||
- `dropdown_menu`
|
||||
|
||||
Sample:
|
||||
```
|
||||
dropdown_menu: {
|
||||
openId: null,
|
||||
placement: null,
|
||||
keyboard: false
|
||||
}
|
||||
```
|
||||
|
||||
- `timelines`
|
||||
|
||||
Sample:
|
||||
```
|
||||
timelines: {
|
||||
home: {
|
||||
items: [
|
||||
'9uiMtlRMLHBnRg8tMG',
|
||||
'9uiLe5Q6Bsb8p8VslU',
|
||||
'9uiLMqdbtfE03Tc4uW',
|
||||
'9uiLEal13YvYUB8lN2',
|
||||
'9uiKwwSPdc0iZg1SUK',
|
||||
'9uiKq5TRiRJGVoEmau',
|
||||
'9uiKbTN4aHsmHgHtsO',
|
||||
'9ugVkEfNKtvGSpJGLI'
|
||||
],
|
||||
totalQueuedItemsCount: 0,
|
||||
queuedItems: [],
|
||||
hasMore: true,
|
||||
unread: 0,
|
||||
isLoading: false,
|
||||
online: true,
|
||||
top: true,
|
||||
isPartial: false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `meta` - User-specific data that is _not_ a frontend setting (see: `settings`).
|
||||
|
||||
|
@ -57,17 +92,36 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
is_admin: true,
|
||||
skip_thread_containment: false
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `pleroma` - Pleroma specific metadata about the user pulled from `/api/v1/accounts/verify_credentials` (excluding the pleroma_settings_store)
|
||||
|
||||
- `alerts`
|
||||
|
||||
Sample:
|
||||
```
|
||||
alerts: []
|
||||
```
|
||||
|
||||
- `loadingBar` - Managed by [react-redux-loading-bar](https://github.com/mironov/react-redux-loading-bar)
|
||||
|
||||
- `modal`
|
||||
Sample:
|
||||
```
|
||||
loadingBar: {
|
||||
'default': 0
|
||||
}
|
||||
```
|
||||
|
||||
- `modal`
|
||||
|
||||
Sample:
|
||||
```
|
||||
modal: {
|
||||
modalType: null,
|
||||
modalProps: {}
|
||||
}
|
||||
```
|
||||
- `user_lists`
|
||||
|
||||
Sample:
|
||||
|
@ -82,13 +136,40 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
followers: {},
|
||||
mutes: {},
|
||||
favourited_by: {}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `domain_lists`
|
||||
|
||||
Sample:
|
||||
```
|
||||
domain_lists: {
|
||||
blocks: {
|
||||
items: []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `status_lists`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
status_lists: {
|
||||
favourites: {
|
||||
next: null,
|
||||
loaded: false,
|
||||
items: [
|
||||
'9uh7FiM4hViVp59hSa',
|
||||
'9uhsxmGKEMBkWoykng'
|
||||
]
|
||||
},
|
||||
pins: {
|
||||
next: null,
|
||||
loaded: false,
|
||||
items: []
|
||||
}
|
||||
}
|
||||
```
|
||||
- `accounts` - Data for all accounts you've viewed since launching the page, so they don't have to be downloaded twice.
|
||||
|
||||
Sample:
|
||||
|
@ -163,10 +244,31 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
id: '9to1NPyS98J8cdicRE',
|
||||
note_emojified: ''
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `accounts_counters`
|
||||
|
||||
Sample:
|
||||
```
|
||||
accounts_counters: {
|
||||
'9tyANut1gDEkHqrvo8': {
|
||||
followers_count: 0,
|
||||
following_count: 0,
|
||||
statuses_count: 11
|
||||
},
|
||||
'9toQ7nsnbhnTcNVBxI': {
|
||||
followers_count: 342,
|
||||
following_count: 800,
|
||||
statuses_count: 721
|
||||
},
|
||||
'9tqzs9mEQIBxYPBk0G': {
|
||||
followers_count: 0,
|
||||
following_count: 0,
|
||||
statuses_count: 48
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `statuses` - Data for all statuses you've viewed since launching the page, so they don't have to be downloaded twice.
|
||||
|
||||
|
@ -245,10 +347,15 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
search_index: 'jpg test @curtis',
|
||||
poll: null
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `relationships`
|
||||
|
||||
Sample:
|
||||
```
|
||||
relationships: {}
|
||||
```
|
||||
|
||||
- `settings` - Any frontend configuration values that should be persisted to the backend database. This includes user preferences as well as metadata such as emoji usage counters. It uses [`pleroma_settings_store`](https://docs-develop.pleroma.social/backend/API/differences_in_mastoapi_responses/#accounts) to do it if it's available. If there's some other endpoint that handles your value, it doesn't belong here.
|
||||
|
||||
|
@ -352,23 +459,160 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
reply: true
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `push_notifications`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
push_notifications: {
|
||||
subscription: null,
|
||||
alerts: {
|
||||
follow: false,
|
||||
favourite: false,
|
||||
reblog: false,
|
||||
mention: false,
|
||||
poll: false
|
||||
},
|
||||
isSubscribed: false,
|
||||
browserSupport: false
|
||||
}
|
||||
```
|
||||
- `mutes`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
mutes: {
|
||||
'new': {
|
||||
isSubmitting: false,
|
||||
account: null,
|
||||
notifications: true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `reports`
|
||||
|
||||
Sample:
|
||||
```
|
||||
reports: {
|
||||
'new': {
|
||||
isSubmitting: false,
|
||||
account_id: null,
|
||||
status_ids: [],
|
||||
comment: '',
|
||||
forward: false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `contexts`
|
||||
|
||||
Sample:
|
||||
```
|
||||
contexts: {
|
||||
inReplyTos: {
|
||||
'9uhsxm9adOniBvpNIm': '9uh7FiM4hViVp59hSa',
|
||||
'9uiMtlRMLHBnRg8tMG': '9uiIk2f13yfg8mdfhg',
|
||||
'9uiLe5Q6Bsb8p8VslU': '9uiIk2f13yfg8mdfhg',
|
||||
'9uhBdzVeyImLnGTDZQ': '9uhB399i946ozmdRGC',
|
||||
'9uiKLrbohWVWp5k0Su': '9uiJzdGZLWjBy9Ca24',
|
||||
'9ui47WONBnvPhQalgu': '9ui47WHdaqXNMXROC0',
|
||||
'9ui5t93pL19HC0FppI': '9ui5qe5DXbA8XQiFyS',
|
||||
},
|
||||
replies: {
|
||||
'9uhsxm9adOniBvpNIm': [
|
||||
'9uhsxmGKEMBkWoykng'
|
||||
],
|
||||
'9ui8gFu0tBewVfD38y': [
|
||||
'9ui8gG1SRVc8skgzkO'
|
||||
],
|
||||
'9uiIk2f13yfg8mdfhg': [
|
||||
'9uiJxjFm7BylxVvHPc',
|
||||
'9uiJzdGZLWjBy9Ca24',
|
||||
'9uiLe5Q6Bsb8p8VslU',
|
||||
'9uiMtlRMLHBnRg8tMG'
|
||||
],
|
||||
'9uiKLrbohWVWp5k0Su': [
|
||||
'9uiKbTN4aHsmHgHtsO'
|
||||
],
|
||||
'9ui68mCA7SZwuSbfqi': [
|
||||
'9ui6Fz6cW4kGyiS3lo'
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
- `compose`
|
||||
|
||||
Sample:
|
||||
```
|
||||
compose: {
|
||||
spoiler: false,
|
||||
focusDate: null,
|
||||
privacy: 'private',
|
||||
spoiler_text: '',
|
||||
in_reply_to: null,
|
||||
default_privacy: 'private',
|
||||
is_uploading: false,
|
||||
caretPosition: null,
|
||||
text: '',
|
||||
preselectDate: null,
|
||||
progress: 0,
|
||||
idempotencyKey: '046ddfb7-ce76-4dbd-ae43-e6e8417947fd',
|
||||
suggestions: [],
|
||||
resetFileKey: 53748,
|
||||
media_attachments: [],
|
||||
sensitive: false,
|
||||
default_sensitive: false,
|
||||
mounted: 0,
|
||||
is_composing: false,
|
||||
tagHistory: [],
|
||||
id: null,
|
||||
is_submitting: false,
|
||||
is_changing_upload: false,
|
||||
suggestion_token: null,
|
||||
poll: null
|
||||
}
|
||||
```
|
||||
|
||||
- `search`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
search: {
|
||||
value: '',
|
||||
submitted: false,
|
||||
hidden: false,
|
||||
results: {}
|
||||
}
|
||||
```
|
||||
- `media_attachments`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
media_attachments: {
|
||||
accept_content_types: [
|
||||
'.jpg',
|
||||
'.jpeg',
|
||||
'.png',
|
||||
'.gif',
|
||||
'.webp',
|
||||
'.webm',
|
||||
'.mp4',
|
||||
'.m4v',
|
||||
'.mov',
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/gif',
|
||||
'image/webp',
|
||||
'video/webm',
|
||||
'video/mp4',
|
||||
'video/quicktime'
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- `notifications`
|
||||
|
||||
Sample:
|
||||
|
@ -404,7 +648,7 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
queuedNotifications: [],
|
||||
totalQueuedNotificationsCount: 0,
|
||||
lastRead: -1
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `height_cache`
|
||||
|
@ -419,40 +663,177 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
'9uXX4IfAXO0yBNhmQy': 166.171875,
|
||||
'9uXXThi8XzE56gCtE0': 145.140625
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `custom_emojis`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
custom_emojis: [
|
||||
{
|
||||
category: 'Fun',
|
||||
shortcode: 'blank',
|
||||
static_url: 'https://dev.teci.world/emoji/blank.png',
|
||||
tags: [
|
||||
'Fun'
|
||||
],
|
||||
url: 'https://dev.teci.world/emoji/blank.png',
|
||||
visible_in_picker: true
|
||||
},
|
||||
{
|
||||
category: 'Gif,Fun',
|
||||
shortcode: 'firefox',
|
||||
static_url: 'https://dev.teci.world/emoji/Firefox.gif',
|
||||
tags: [
|
||||
'Gif',
|
||||
'Fun'
|
||||
],
|
||||
url: 'https://dev.teci.world/emoji/Firefox.gif',
|
||||
visible_in_picker: true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
- `identity_proofs`
|
||||
|
||||
- `lists`
|
||||
|
||||
Sample:
|
||||
```
|
||||
lists: {},
|
||||
```
|
||||
|
||||
- `listEditor`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
listEditor: {
|
||||
listId: null,
|
||||
isSubmitting: false,
|
||||
isChanged: false,
|
||||
title: '',
|
||||
accounts: {
|
||||
items: [],
|
||||
loaded: false,
|
||||
isLoading: false
|
||||
},
|
||||
suggestions: {
|
||||
value: '',
|
||||
items: []
|
||||
}
|
||||
}
|
||||
```
|
||||
- `listAdder`
|
||||
|
||||
Sample:
|
||||
```
|
||||
listAdder: {
|
||||
accountId: null,
|
||||
lists: {
|
||||
items: [],
|
||||
loaded: false,
|
||||
isLoading: false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `filters`
|
||||
|
||||
Sample:
|
||||
```
|
||||
filters: [],
|
||||
```
|
||||
|
||||
- `conversations`
|
||||
|
||||
Sample:
|
||||
```
|
||||
conversations: {
|
||||
items: [],
|
||||
isLoading: false,
|
||||
hasMore: true,
|
||||
mounted: false
|
||||
}
|
||||
```
|
||||
|
||||
- `suggestions`
|
||||
|
||||
Sample:
|
||||
```
|
||||
suggestions: {
|
||||
items: [],
|
||||
isLoading: false
|
||||
},
|
||||
```
|
||||
|
||||
- `polls`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
polls: {}
|
||||
```
|
||||
- `trends`
|
||||
|
||||
Sample:
|
||||
```
|
||||
trends: {
|
||||
items: [],
|
||||
isLoading: false
|
||||
}
|
||||
```
|
||||
|
||||
- `groups`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
groups: {}
|
||||
```
|
||||
- `group_relationships`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
group_relationships: {}
|
||||
```
|
||||
|
||||
- `group_lists`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
group_lists: {
|
||||
featured: [],
|
||||
member: [],
|
||||
admin: []
|
||||
}
|
||||
```
|
||||
|
||||
- `group_editor`
|
||||
|
||||
Sample:
|
||||
```
|
||||
group_editor: {
|
||||
groupId: null,
|
||||
isSubmitting: false,
|
||||
isChanged: false,
|
||||
title: '',
|
||||
description: '',
|
||||
coverImage: null
|
||||
}
|
||||
```
|
||||
|
||||
- `sidebar`
|
||||
|
||||
Sample:
|
||||
```
|
||||
sidebar: {}
|
||||
```
|
||||
|
||||
- `patron` - Data related to [soapbox-patron](https://gitlab.com/soapbox-pub/soapbox-patron)
|
||||
|
||||
Sample:
|
||||
```
|
||||
patron: {}
|
||||
```
|
||||
|
||||
- `soapbox` - Soapbox specific configuration pulled from `/instance/soapbox.json`. The configuration file isn't required and this map can be empty.
|
||||
|
||||
|
@ -472,15 +853,84 @@ If it's not documented, it's because I inherited it from Mastodon and I don't kn
|
|||
extensions: {
|
||||
patron: false
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- `instance` - Instance data pulled from `/api/v1/instance`
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
instance: {
|
||||
avatar_upload_limit: 2000000,
|
||||
urls: {
|
||||
streaming_api: 'wss://dev.teci.world'
|
||||
},
|
||||
thumbnail: 'https://dev.teci.world/instance/thumbnail.jpeg',
|
||||
uri: 'https://dev.teci.world',
|
||||
background_upload_limit: 4000000,
|
||||
banner_upload_limit: 4000000,
|
||||
poll_limits: {
|
||||
max_expiration: 31536000,
|
||||
max_option_chars: 200,
|
||||
max_options: 20,
|
||||
min_expiration: 0
|
||||
},
|
||||
version: '2.7.2 (compatible; Pleroma 2.0.1)',
|
||||
title: 'TECI Dev',
|
||||
max_toot_chars: 5000,
|
||||
registrations: true,
|
||||
languages: [
|
||||
'en'
|
||||
],
|
||||
email: 'curtis.rock@gmail.com',
|
||||
description: 'A Pleroma instance, an alternative fediverse server',
|
||||
upload_limit: 16000000,
|
||||
stats: {
|
||||
domain_count: 161,
|
||||
status_count: 1,
|
||||
user_count: 5
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `me` - The account ID of the currently logged in user, 'null' if loading, and 'false' if no user is logged in.
|
||||
|
||||
Sample:
|
||||
```
|
||||
me: '9to1NPyS98J8cdicRE'
|
||||
```
|
||||
|
||||
- `auth` - Data used for authentication
|
||||
|
||||
|
||||
Sample:
|
||||
```
|
||||
auth: {
|
||||
app: {
|
||||
vapid_key: 'BEm4LT3n_cxFsGIqI-iG-Uea0OXgnjTtQAa4sPhkguP2rCbFfqL6xHOzo-cS3j9G7kG9eQ3deIQdkXbvTwgcLAk',
|
||||
token_type: 'Bearer',
|
||||
client_secret: 'ZuCeHoYy43MGifOnZyjWn82Kuq1YkeVAlwlxqvnGR6Q',
|
||||
redirect_uri: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
created_at: 1587504650,
|
||||
name: 'SoapboxFE_2020-04-21T21:30:45.889Z',
|
||||
client_id: 'OyjobYI1RQcx3G6RIJ7brm2RmIy6M2hbme2oEwByjvI',
|
||||
expires_in: 600,
|
||||
scope: 'read write follow push admin',
|
||||
refresh_token: 'TNFBq7Dp6ryLkUoHHbnUp3y5c-U6ya_c7DcSnfM86wo',
|
||||
website: null,
|
||||
id: '23',
|
||||
access_token: 'aN65U4SXw2JjOeOyko1-w7KIxaJnOqtU-Z3izpdKqcg'
|
||||
},
|
||||
user: {
|
||||
access_token: 'UeWx_MgQckL993--BetNsJHcwxq1BVmtxc4qJtb-DM8',
|
||||
created_at: 1588607387,
|
||||
expires_in: 600,
|
||||
me: 'https://dev.teci.world/users/curtis',
|
||||
refresh_token: '2mbb3ZqZ9w8eeSiLRDC2SsQ86-UmVDrScmFXPx4opvw',
|
||||
scope: 'read write follow push admin',
|
||||
token_type: 'Bearer'
|
||||
}
|
||||
}
|
||||
```
|
||||
- `app` - Map containing the app used to make app requests such as register/login and its access token.
|
||||
|
||||
- `user` - Map containing the access token of the logged in user.
|
||||
|
|
Loading…
Reference in a new issue