musora-content-services 2.174.0 → 2.176.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/decisions/2026-08-13-behltp-306-add-plan-rank-and-tier-key.md +24 -0
- package/.idea/codeStyles/Project.xml +61 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/dataSources/6549dc28-6466-4ea3-a66b-7750cfeae4e7/storage_v2/_src_/schema/information_schema.FNRwLQ.meta +2 -0
- package/.idea/dataSources/6549dc28-6466-4ea3-a66b-7750cfeae4e7/storage_v2/_src_/schema/mysql.osA4Bg.meta +2 -0
- package/.idea/dataSources/6549dc28-6466-4ea3-a66b-7750cfeae4e7/storage_v2/_src_/schema/performance_schema.kIw0nw.meta +2 -0
- package/.idea/dataSources/6549dc28-6466-4ea3-a66b-7750cfeae4e7/storage_v2/_src_/schema/sys.zb4BAA.meta +2 -0
- package/.idea/dataSources/6549dc28-6466-4ea3-a66b-7750cfeae4e7.xml +25767 -0
- package/.idea/dataSources/data_sources_history.xml +23 -0
- package/.idea/dataSources.local.xml +19 -0
- package/.idea/dataSources.xml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/musora-content-services.iml +8 -0
- package/.idea/php.xml +19 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/workspace.xml +343 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/src/index.d.ts +10 -0
- package/src/index.js +10 -0
- package/src/services/offline/practices.ts +48 -5
- package/src/services/user/account.ts +8 -3
- package/src/services/user/memberships.ts +2 -0
- package/src/services/user/streakCalculator.ts +23 -2
- package/src/services/userActivity.js +146 -40
- package/src/version-info.js +1 -1
- package/.claude/settings.local.json +0 -60
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-08-13
|
|
3
|
+
branch: feat/BEHLTP-306-add-plan-rank-and-tier-key
|
|
4
|
+
pr: https://github.com/railroadmedia/musora-content-services/pull/1030
|
|
5
|
+
status: open
|
|
6
|
+
tags: [[feature]]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Add tier_key and rank to MCS's UpgradeProduct type
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
BEHLTP-306 (musora-platform-backend PR #1463, already merged) added `tier_key` and `rank` fields to the backend's `upgrade_options` response, so MusoraApp can fetch canonical plan rank from the API instead of hardcoding its own copy. While working on an unrelated ticket (TP-1307), David noted MCS's TypeScript structure hadn't been updated to match, and asked to prepare a fix on its own branch.
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
Add `tier_key: string` and `rank: number | null` to MCS's `UpgradeProduct` interface (`src/services/user/memberships.ts`), matching the backend's response shape exactly. Since MCS doesn't transform/strip this data at runtime (the interface is purely a type declaration), the actual field values were already flowing through — this change only restores type safety for consumers referencing `product.tier_key`/`product.rank`.
|
|
16
|
+
|
|
17
|
+
## Alternatives Considered
|
|
18
|
+
No alternatives considered — this is a straightforward type-sync fix with one correct shape to match.
|
|
19
|
+
|
|
20
|
+
## Process Notes
|
|
21
|
+
Verified with `npx tsc --noEmit` (via the manager container, sourcing nvm explicitly since a plain `bash -lc` login shell didn't pick it up) rather than assuming a dedicated typecheck script existed — none did.
|
|
22
|
+
|
|
23
|
+
## Consequences
|
|
24
|
+
Consumers of `UpgradeProduct` (e.g. MusoraApp) can now reference `tier_key`/`rank` without a TypeScript error.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<HTMLCodeStyleSettings>
|
|
4
|
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
+
</HTMLCodeStyleSettings>
|
|
6
|
+
<JSCodeStyleSettings version="0">
|
|
7
|
+
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
|
8
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
11
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
12
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
13
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
14
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
15
|
+
</JSCodeStyleSettings>
|
|
16
|
+
<TypeScriptCodeStyleSettings version="0">
|
|
17
|
+
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
|
18
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
19
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
20
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
21
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
22
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
23
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
24
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
25
|
+
</TypeScriptCodeStyleSettings>
|
|
26
|
+
<VueCodeStyleSettings>
|
|
27
|
+
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
28
|
+
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
29
|
+
</VueCodeStyleSettings>
|
|
30
|
+
<codeStyleSettings language="HTML">
|
|
31
|
+
<option name="SOFT_MARGINS" value="100" />
|
|
32
|
+
<indentOptions>
|
|
33
|
+
<option name="INDENT_SIZE" value="2" />
|
|
34
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
35
|
+
<option name="TAB_SIZE" value="2" />
|
|
36
|
+
</indentOptions>
|
|
37
|
+
</codeStyleSettings>
|
|
38
|
+
<codeStyleSettings language="JavaScript">
|
|
39
|
+
<option name="SOFT_MARGINS" value="100" />
|
|
40
|
+
<indentOptions>
|
|
41
|
+
<option name="INDENT_SIZE" value="2" />
|
|
42
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
43
|
+
<option name="TAB_SIZE" value="2" />
|
|
44
|
+
</indentOptions>
|
|
45
|
+
</codeStyleSettings>
|
|
46
|
+
<codeStyleSettings language="TypeScript">
|
|
47
|
+
<option name="SOFT_MARGINS" value="100" />
|
|
48
|
+
<indentOptions>
|
|
49
|
+
<option name="INDENT_SIZE" value="2" />
|
|
50
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
51
|
+
<option name="TAB_SIZE" value="2" />
|
|
52
|
+
</indentOptions>
|
|
53
|
+
</codeStyleSettings>
|
|
54
|
+
<codeStyleSettings language="Vue">
|
|
55
|
+
<option name="SOFT_MARGINS" value="100" />
|
|
56
|
+
<indentOptions>
|
|
57
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
58
|
+
</indentOptions>
|
|
59
|
+
</codeStyleSettings>
|
|
60
|
+
</code_scheme>
|
|
61
|
+
</component>
|