@lukoweb/apitogo-plugin-dev-portal-billing 0.1.97 → 0.1.99

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/dist/index.d.mts CHANGED
@@ -31,6 +31,7 @@ type DevPortalBillingConfig = {
31
31
  priceAmount?: number;
32
32
  priceCurrency?: string;
33
33
  billingPeriod?: string;
34
+ limits?: Record<string, unknown>;
34
35
  limitsJson?: string | null;
35
36
  includedActionKeys?: string[];
36
37
  features?: string[];
package/dist/index.mjs CHANGED
@@ -32,6 +32,10 @@ function isPlaceholderDevPortalApiUrl(apiBaseUrl) {
32
32
  if (!apiBaseUrl) return true;
33
33
  return apiBaseUrl === DEV_PORTAL_PLACEHOLDER_API_URL || apiBaseUrl.includes("dp-example.azurecontainerapps.io");
34
34
  }
35
+ function resolveLimitsJson(plan) {
36
+ if (plan.limits && typeof plan.limits === "object" && !Array.isArray(plan.limits)) return JSON.stringify(plan.limits);
37
+ return plan.limitsJson ?? null;
38
+ }
35
39
  function mapPreviewPlans(plans) {
36
40
  return plans.map((plan) => ({
37
41
  sku: plan.sku,
@@ -39,7 +43,7 @@ function mapPreviewPlans(plans) {
39
43
  priceAmount: plan.priceAmount,
40
44
  priceCurrency: plan.priceCurrency,
41
45
  billingPeriod: plan.billingPeriod,
42
- limitsJson: plan.limitsJson,
46
+ limitsJson: resolveLimitsJson(plan),
43
47
  includedActionKeys: plan.includedActionKeys,
44
48
  features: plan.features
45
49
  }));
@@ -55,6 +59,7 @@ function parseManifestPlans(configPlans) {
55
59
  priceAmount: plan.priceAmount ?? 0,
56
60
  priceCurrency: plan.priceCurrency ?? "usd",
57
61
  billingPeriod: plan.billingPeriod ?? "monthly",
62
+ limits: plan.limits,
58
63
  limitsJson: plan.limitsJson ?? null,
59
64
  includedActionKeys: plan.includedActionKeys ?? [],
60
65
  features: plan.features
@@ -69,6 +74,7 @@ function parseManifestPlans(configPlans) {
69
74
  priceAmount: plan.priceAmount ?? 0,
70
75
  priceCurrency: plan.priceCurrency ?? "usd",
71
76
  billingPeriod: plan.billingPeriod ?? "monthly",
77
+ limits: plan.limits,
72
78
  limitsJson: plan.limitsJson ?? null,
73
79
  includedActionKeys: plan.includedActionKeys ?? [],
74
80
  features: plan.features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo-plugin-dev-portal-billing",
3
- "version": "0.1.97",
3
+ "version": "0.1.99",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/zuplo/zudoku",
@@ -46,8 +46,8 @@
46
46
  "react": "19.2.4",
47
47
  "react-dom": "19.2.4",
48
48
  "tsdown": "0.20.3",
49
- "@lukoweb/apitogo": "0.1.97",
50
- "@lukoweb/apitogo-module-user-panel": "0.1.97"
49
+ "@lukoweb/apitogo": "0.1.99",
50
+ "@lukoweb/apitogo-module-user-panel": "0.1.99"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=19.2.0",