@immorterm/tier-config 0.1.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/config.json +14 -0
- package/package.json +23 -0
- package/src/index.ts +30 -0
package/config.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@immorterm/tier-config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pricing tier configuration for ImmorTerm",
|
|
5
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ImmorTerm/immorterm.git",
|
|
9
|
+
"directory": "libs/tier-config"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./src/index.ts",
|
|
13
|
+
"types": "./src/index.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./src/index.ts",
|
|
16
|
+
"./config.json": "./config.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"src",
|
|
20
|
+
"config.json"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false
|
|
23
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @immorterm/tier-config — Single source of truth for tier limits.
|
|
3
|
+
*
|
|
4
|
+
* This JSON file is consumed by:
|
|
5
|
+
* - TypeScript services (import from this package)
|
|
6
|
+
* - Rust memory service (include_str! at compile time)
|
|
7
|
+
* - API tier-config endpoint (serves these values)
|
|
8
|
+
*
|
|
9
|
+
* To change free tier limits, edit ../config.json.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import config from "../config.json";
|
|
13
|
+
|
|
14
|
+
export interface TierLimits {
|
|
15
|
+
memorySearchResults: number | null;
|
|
16
|
+
memoryRetentionHours: number | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TierConfig {
|
|
20
|
+
free: TierLimits;
|
|
21
|
+
pro: TierLimits;
|
|
22
|
+
/** Memory-only SKU — memory caps identical to pro; everything else stays free-tier. */
|
|
23
|
+
"memory-pro": TierLimits;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const TIER_CONFIG: TierConfig = config;
|
|
27
|
+
|
|
28
|
+
export const FREE_LIMITS = config.free;
|
|
29
|
+
export const PRO_LIMITS = config.pro;
|
|
30
|
+
export const MEMORY_PRO_LIMITS = config["memory-pro"];
|