mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
5f3969a830
Let people use any Unicode emoji through a searchable, virtualized picker. Keep reaction counts accurate and requests optimistic and idempotent. Refresh demo content so signed-in visitors can participate. BREAKING CHANGE: Remove the MEMO_RELATED instance setting and memoRelatedSetting configuration value. Remove their declarations and lifecycle references from configuration files; existing reactions are preserved.
8.2 KiB
8.2 KiB
API Changelog
Breaking and deprecated changes to the public API in proto/api/, newest release first. Additive changes are not listed.
Record schema, REST route, and behavior breaks here. API compatibility is checked during review.
Add entries under a ## Unreleased heading. After the release ships, rename it to the release tag.
IdentityProvider, InstanceSetting, and User are also the declarative configuration file format. When a break removes or
renames a field a configuration file can set, say that files setting it are rejected from this release and what to write
instead, and update core/configuration/testdata/compat/ in the same change. After a release ships, copy
testdata/compat/unreleased/ to a directory named for the release tag.
## Unreleased
### Breaking
- `MemoService.ListShortcuts`: removed. Use `UserService.ListMemoViews`.
- `InstanceSetting.StorageSetting.upload_size_limit_mb`: removed. Configuration files that set `uploadSizeLimitMb` are
rejected from this release; set the `UPLOAD_BYTES` usage limit instead.
### Deprecated
- `Memo.unassigned`: use an unset `Memo.space`. Removed in a later release.
Unreleased
Breaking
- Removed
InstanceSetting.MemoRelatedSetting,memo_related_setting, and theMEMO_RELATEDkey. Reactions now use the full Unicode emoji picker. Configuration files declaringinstance/settings/MEMO_RELATEDormemoRelatedSettingare rejected; remove that setting from configuration files. Stored reactions are preserved.
26.10.0
Breaking
UserService.ExportMemosandExportMemosRequestare removed. Export is an instance-administrator download atGET /file/users/{username}/export, authenticated like attachments (Bearer header or session cookie), streaming the archive withContent-Disposition. One export runs at a time per instance; a second request receives429. Members ask an administrator for their archive.ImportMemosis unchanged.- Access tokens are now bound to the user's password hash and become invalid immediately after a password change or an administrator password reset. Pre-upgrade access tokens are also rejected; clients must refresh them or sign in again. The browser session that changes its own password can still refresh; other refresh sessions are revoked.
- Usage limits replace the instance-wide upload size and memo content caps.
StorageSetting.upload_size_limit_mbandMemoRelatedSetting.content_length_limitare removed and old values are not migrated. The limits are theUSAGE_LIMITSinstance setting,instance/settings/USAGE_LIMITS, an ordered list of entries read and replaced whole throughGetInstanceSettingandUpdateInstanceSetting; the first entry naming a user applies, the last entry applies to all users. TheusageLimits/{usage_limit}resource and its five RPCs do not exist.UserUsagereturns the limit set in effect aslimitspluslimit_index. Exceeding a limit returnsRESOURCE_EXHAUSTEDwith reasonQUOTA_EXCEEDEDand metadatametric,limit, andusage. MemoRelatedSetting.enable_double_click_editis removed; double-click editing is now a per-browser preference in the web client and is no longer an instance setting.MemoRelatedSettingkeeps the single fieldreactions = 1.- The deployment configuration files under
/etc/secrets(memos-idp-*.json,memos-instance-setting-*.json) introduced in v0.31.0 are no longer read, and the stored values they overrode take effect again. Identity providers, instance settings, bootstrap users, and their linked identities are declared instead asmemos.api.Configurationdocuments in the configuration directory (--config-dirorMEMOS_CONFIG_DIR, default/etc/memos/config), applied at startup unless--config-apply=off, or throughmemos config planandmemos config apply. Keep an identity provider's UID when moving it so linked accounts keep working. An API write that changes a field a file manages returnsFAILED_PRECONDITIONwithErrorInfo{reason: MANAGED_BY_CONFIGURATION}naming the file and fields;GET /api/instance/configuration(administrators) lists what is managed. CreateIdentityProviderandUpdateIdentityProvidervalidate the provider as it will be stored and returnINVALID_ARGUMENTwhen it has no title, an invalididentifier_filter, noclient_id, a non-absolute or non-HTTP(S)auth_url,token_url, oruser_info_url, an empty scope entry, or nofield_mapping.identifier. A request that omittedconfigorfield_mappingpreviously failed withINTERNAL.UpdateInstanceSettingforSTORAGErequires every new or changed S3 storage to haveendpoint,region,bucket,access_key_id, andaccess_key_secret(an empty secret still keeps the stored one). ForGENERAL,week_start_day_offsetmust be between -1 and 6.BASICcannot be written. Notification validation errors name fields in proto form (smtp_host,use_tls).- The API no longer carries a
v1version marker. Every client must update its paths:- REST routes move from
/api/v1/...to/api/...(for exampleGET /api/memos). Server-sent events move from/api/v1/sseto/api/sse. - The proto package
memos.api.v1is nowmemos.api, so Connect and gRPC procedures move from/memos.api.v1.<Service>/<Method>to/memos.api.<Service>/<Method>. - Resource types move from
memos.api.v1/<Type>tomemos.api/<Type>. - The
domainofgoogle.rpc.ErrorInfodetails is nowmemos.api. - For this release only, requests to
/api/v1/...and/memos.api.v1.*return410 Gonewith anUNIMPLEMENTEDerror that points here. The next release removes these routes.
- REST routes move from
- Field numbers in every message are renumbered from 1 in declaration order, and all
reservedranges are removed. JSON field names are unchanged; clients that use the binary protobuf encoding must regenerate from the new schema. - Enum values are renumbered from 0 in declaration order, including
User.Role(ADMIN = 1,USER = 2) andUserSetting.Key(GENERAL = 1,WEBHOOKS = 2,TAGS = 3). Clients that send numeric enum values must update them. - Names now follow AIP conventions:
MemoService:ListMemoAttachments,ListMemoRelations,ListMemoComments,CreateMemoComment,ListMemoReactions, andUpsertMemoReactiontakeparentinstead ofname(REST path variable{parent=memos/*}).ListMemoCommentsResponse.memosis nowcomments. The nestedMemoRelation.Memotype is nowMemoRelation.MemoRef. TheMemoShareresource singular/plural is nowmemoShare/memoShares.UserService.ListAllUserStatsis nowListUserStats. It requires aparent:users/-for all users (RESTGET /api/users/-/statsinstead ofGET /api/users:stats) orusers/{user}for one user. The response fieldstatsis nowuser_stats.BatchGetUsersRequest.usernamesis nownamesand takes resource names (users/{user}), not bare usernames.PersonalAccessToken.created_at,expires_at, andlast_used_atare nowcreate_time,expire_time, andlast_use_time.LinkedIdentity.idp_nameandextern_uidare nowidentity_providerandexternal_uid;CreateLinkedIdentityRequest.idp_nameis nowidentity_provider.- The
MemoViewandUserNotificationresource singulars are nowmemoViewanduserNotification. UserStats.tag_countis nowtag_counts.MemoImportPlan,MemoImportReport, andMemoImportIssueare nowImportMemosPlan,ImportMemosReport, andImportMemosIssue.ImportMemosPlan.memosandattachmentsare nowmemo_countandattachment_count;ImportMemosIssue.memois nowmemo_uid.UserNotification.SpaceInvitationPayload.Stateis nowInvitationState.UpdateUserSettingRequest.settingandListUserSettingsResponse.settingsare nowuser_settinganduser_settings;UpdateInstanceSettingRequest.settingandBatchGetInstanceSettingsResponse.settingsare nowinstance_settingandinstance_settings.SignInResponse.access_token_expires_atandRefreshTokenResponse.expires_atare both nowaccess_token_expire_time.SignInRequest.SSOCredentialsis nowSsoCredentials, and itsidp_nameis nowidentity_provider.