@prave/shared 1.4.6 → 1.4.8
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/schemas/api-keys.schema.d.ts +2 -2
- package/dist/schemas/billing.schema.d.ts +7 -7
- package/dist/schemas/billing.schema.d.ts.map +1 -1
- package/dist/schemas/billing.schema.js +2 -2
- package/dist/schemas/index.d.ts +0 -9
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -9
- package/dist/schemas/install.schema.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plan-limits.d.ts +26 -73
- package/dist/types/plan-limits.d.ts.map +1 -1
- package/dist/types/plan-limits.js +33 -69
- package/package.json +1 -1
- package/dist/schemas/credits.schema.d.ts +0 -73
- package/dist/schemas/credits.schema.d.ts.map +0 -1
- package/dist/schemas/credits.schema.js +0 -52
- package/dist/schemas/kv.schema.d.ts +0 -56
- package/dist/schemas/kv.schema.d.ts.map +0 -1
- package/dist/schemas/kv.schema.js +0 -39
- package/dist/schemas/run.schema.d.ts +0 -509
- package/dist/schemas/run.schema.d.ts.map +0 -1
- package/dist/schemas/run.schema.js +0 -192
- package/dist/schemas/sdk.schema.d.ts +0 -51
- package/dist/schemas/sdk.schema.d.ts.map +0 -1
- package/dist/schemas/sdk.schema.js +0 -36
- package/dist/schemas/skill-pr.schema.d.ts +0 -544
- package/dist/schemas/skill-pr.schema.d.ts.map +0 -1
- package/dist/schemas/skill-pr.schema.js +0 -87
- package/dist/schemas/skill-test.schema.d.ts +0 -60
- package/dist/schemas/skill-test.schema.d.ts.map +0 -1
- package/dist/schemas/skill-test.schema.js +0 -25
- package/dist/schemas/skill-version.schema.d.ts +0 -69
- package/dist/schemas/skill-version.schema.d.ts.map +0 -1
- package/dist/schemas/skill-version.schema.js +0 -21
- package/dist/schemas/vault.schema.d.ts +0 -54
- package/dist/schemas/vault.schema.d.ts.map +0 -1
- package/dist/schemas/vault.schema.js +0 -39
- package/dist/schemas/webhook-endpoint.schema.d.ts +0 -161
- package/dist/schemas/webhook-endpoint.schema.d.ts.map +0 -1
- package/dist/schemas/webhook-endpoint.schema.js +0 -74
|
@@ -47,12 +47,12 @@ export declare const aiGenerateInputSchema: z.ZodObject<{
|
|
|
47
47
|
/** Existing skill content the user is iterating on. */
|
|
48
48
|
existing_content: z.ZodOptional<z.ZodString>;
|
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
prompt: string;
|
|
51
50
|
provider: "gemini" | "anthropic" | "openai";
|
|
51
|
+
prompt: string;
|
|
52
52
|
existing_content?: string | undefined;
|
|
53
53
|
}, {
|
|
54
|
-
prompt: string;
|
|
55
54
|
provider: "gemini" | "anthropic" | "openai";
|
|
55
|
+
prompt: string;
|
|
56
56
|
existing_content?: string | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
export type AiGenerateInput = z.infer<typeof aiGenerateInputSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const planSchema: z.ZodEnum<["free", "
|
|
2
|
+
export declare const planSchema: z.ZodEnum<["free", "pro", "max"]>;
|
|
3
3
|
export type Plan = z.infer<typeof planSchema>;
|
|
4
4
|
export declare const subscriptionStatusSchema: z.ZodEnum<["active", "trialing", "past_due", "canceled", "incomplete", "incomplete_expired", "unpaid"]>;
|
|
5
5
|
export type SubscriptionStatus = z.infer<typeof subscriptionStatusSchema>;
|
|
@@ -9,7 +9,7 @@ export type SubscriptionStatus = z.infer<typeof subscriptionStatusSchema>;
|
|
|
9
9
|
* to talk to Stripe directly.
|
|
10
10
|
*/
|
|
11
11
|
export declare const billingProfileSchema: z.ZodObject<{
|
|
12
|
-
plan: z.ZodEnum<["free", "
|
|
12
|
+
plan: z.ZodEnum<["free", "pro", "max"]>;
|
|
13
13
|
stripe_customer_id: z.ZodNullable<z.ZodString>;
|
|
14
14
|
stripe_subscription_id: z.ZodNullable<z.ZodString>;
|
|
15
15
|
subscription_status: z.ZodNullable<z.ZodEnum<["active", "trialing", "past_due", "canceled", "incomplete", "incomplete_expired", "unpaid"]>>;
|
|
@@ -19,14 +19,14 @@ export declare const billingProfileSchema: z.ZodObject<{
|
|
|
19
19
|
* "Renews on …" so the cancellation is unambiguously visible. */
|
|
20
20
|
cancel_at_period_end: z.ZodNullable<z.ZodBoolean>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
plan: "free" | "
|
|
22
|
+
plan: "free" | "pro" | "max";
|
|
23
23
|
stripe_customer_id: string | null;
|
|
24
24
|
stripe_subscription_id: string | null;
|
|
25
25
|
subscription_status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | null;
|
|
26
26
|
current_period_end: string | null;
|
|
27
27
|
cancel_at_period_end: boolean | null;
|
|
28
28
|
}, {
|
|
29
|
-
plan: "free" | "
|
|
29
|
+
plan: "free" | "pro" | "max";
|
|
30
30
|
stripe_customer_id: string | null;
|
|
31
31
|
stripe_subscription_id: string | null;
|
|
32
32
|
subscription_status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | null;
|
|
@@ -37,13 +37,13 @@ export type BillingProfile = z.infer<typeof billingProfileSchema>;
|
|
|
37
37
|
export declare const billingCadenceSchema: z.ZodEnum<["monthly", "yearly"]>;
|
|
38
38
|
export type BillingCadence = z.infer<typeof billingCadenceSchema>;
|
|
39
39
|
export declare const billingCheckoutInputSchema: z.ZodObject<{
|
|
40
|
-
plan: z.ZodEnum<["
|
|
40
|
+
plan: z.ZodEnum<["pro", "max"]>;
|
|
41
41
|
cadence: z.ZodDefault<z.ZodEnum<["monthly", "yearly"]>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
plan: "
|
|
43
|
+
plan: "pro" | "max";
|
|
44
44
|
cadence: "monthly" | "yearly";
|
|
45
45
|
}, {
|
|
46
|
-
plan: "
|
|
46
|
+
plan: "pro" | "max";
|
|
47
47
|
cadence?: "monthly" | "yearly" | undefined;
|
|
48
48
|
}>;
|
|
49
49
|
export type BillingCheckoutInput = z.infer<typeof billingCheckoutInputSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,UAAU,mCAAiC,CAAA;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7C,eAAO,MAAM,wBAAwB,yGAQnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;IAM/B;;sEAEkE;;;;;;;;;;;;;;;;EAElE,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB,kCAAgC,CAAA;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,2BAA2B;;;;;;EAEtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export const planSchema = z.enum(['free', '
|
|
2
|
+
export const planSchema = z.enum(['free', 'pro', 'max']);
|
|
3
3
|
export const subscriptionStatusSchema = z.enum([
|
|
4
4
|
'active',
|
|
5
5
|
'trialing',
|
|
@@ -27,7 +27,7 @@ export const billingProfileSchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
export const billingCadenceSchema = z.enum(['monthly', 'yearly']);
|
|
29
29
|
export const billingCheckoutInputSchema = z.object({
|
|
30
|
-
plan: z.enum(['
|
|
30
|
+
plan: z.enum(['pro', 'max']),
|
|
31
31
|
cadence: billingCadenceSchema.default('monthly'),
|
|
32
32
|
});
|
|
33
33
|
export const billingCheckoutResponseSchema = z.object({
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
export * from './api-response.schema.js';
|
|
2
2
|
export * from './skill.schema.js';
|
|
3
|
-
export * from './skill-version.schema.js';
|
|
4
3
|
export * from './cli.schema.js';
|
|
5
4
|
export * from './search.schema.js';
|
|
6
5
|
export * from './ai-description.schema.js';
|
|
7
6
|
export * from './skill-dependency.schema.js';
|
|
8
|
-
export * from './skill-test.schema.js';
|
|
9
7
|
export * from './marketplace.schema.js';
|
|
10
8
|
export * from './billing.schema.js';
|
|
11
|
-
export * from './credits.schema.js';
|
|
12
9
|
export * from './install.schema.js';
|
|
13
|
-
export * from './skill-pr.schema.js';
|
|
14
10
|
export * from './intelligence.schema.js';
|
|
15
11
|
export * from './api-keys.schema.js';
|
|
16
12
|
export * from './skill-report.schema.js';
|
|
17
|
-
export * from './run.schema.js';
|
|
18
|
-
export * from './vault.schema.js';
|
|
19
|
-
export * from './kv.schema.js';
|
|
20
|
-
export * from './webhook-endpoint.schema.js';
|
|
21
|
-
export * from './sdk.schema.js';
|
|
22
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
export * from './api-response.schema.js';
|
|
2
2
|
export * from './skill.schema.js';
|
|
3
|
-
export * from './skill-version.schema.js';
|
|
4
3
|
export * from './cli.schema.js';
|
|
5
4
|
export * from './search.schema.js';
|
|
6
5
|
export * from './ai-description.schema.js';
|
|
7
6
|
export * from './skill-dependency.schema.js';
|
|
8
|
-
export * from './skill-test.schema.js';
|
|
9
7
|
export * from './marketplace.schema.js';
|
|
10
8
|
export * from './billing.schema.js';
|
|
11
|
-
export * from './credits.schema.js';
|
|
12
9
|
export * from './install.schema.js';
|
|
13
|
-
export * from './skill-pr.schema.js';
|
|
14
10
|
export * from './intelligence.schema.js';
|
|
15
11
|
export * from './api-keys.schema.js';
|
|
16
12
|
export * from './skill-report.schema.js';
|
|
17
|
-
export * from './run.schema.js';
|
|
18
|
-
export * from './vault.schema.js';
|
|
19
|
-
export * from './kv.schema.js';
|
|
20
|
-
export * from './webhook-endpoint.schema.js';
|
|
21
|
-
export * from './sdk.schema.js';
|
|
@@ -9,14 +9,14 @@ export declare const installSchema: z.ZodObject<{
|
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
id: string;
|
|
11
11
|
skill_id: string;
|
|
12
|
-
version: number | null;
|
|
13
12
|
user_id: string;
|
|
13
|
+
version: number | null;
|
|
14
14
|
installed_at: string;
|
|
15
15
|
}, {
|
|
16
16
|
id: string;
|
|
17
17
|
skill_id: string;
|
|
18
|
-
version: number | null;
|
|
19
18
|
user_id: string;
|
|
19
|
+
version: number | null;
|
|
20
20
|
installed_at: string;
|
|
21
21
|
}>;
|
|
22
22
|
export type Install = z.infer<typeof installSchema>;
|
|
@@ -147,8 +147,8 @@ export declare const installRowSchema: z.ZodObject<{
|
|
|
147
147
|
}, "strip", z.ZodTypeAny, {
|
|
148
148
|
id: string;
|
|
149
149
|
skill_id: string;
|
|
150
|
-
version: number | null;
|
|
151
150
|
user_id: string;
|
|
151
|
+
version: number | null;
|
|
152
152
|
installed_at: string;
|
|
153
153
|
skill: {
|
|
154
154
|
id: string;
|
|
@@ -163,8 +163,8 @@ export declare const installRowSchema: z.ZodObject<{
|
|
|
163
163
|
}, {
|
|
164
164
|
id: string;
|
|
165
165
|
skill_id: string;
|
|
166
|
-
version: number | null;
|
|
167
166
|
user_id: string;
|
|
167
|
+
version: number | null;
|
|
168
168
|
installed_at: string;
|
|
169
169
|
skill: {
|
|
170
170
|
id: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './categories.js';
|
|
|
2
2
|
export * from './plan-limits.js';
|
|
3
3
|
export * from './intelligence.js';
|
|
4
4
|
export * from './referrals.js';
|
|
5
|
-
export type UserPlan = 'free' | '
|
|
5
|
+
export type UserPlan = 'free' | 'pro' | 'max';
|
|
6
6
|
export type UserRole = 'user' | 'admin';
|
|
7
7
|
export interface Profile {
|
|
8
8
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAE9B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAE9B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;AAC7C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEvC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,aAAa,CAAA;IACtB,MAAM,EAAE,OAAO,4BAA4B,EAAE,KAAK,EAAE,CAAA;IACpD,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Plan } from '../schemas/billing.schema.js';
|
|
2
|
+
import { type AgentType } from './intelligence.js';
|
|
2
3
|
/**
|
|
3
4
|
* PLAN_LIMITS — single source of truth for every gate, quota and copy
|
|
4
5
|
* choice across the platform.
|
|
5
6
|
*
|
|
6
7
|
* Tier identity:
|
|
7
8
|
* - `free` → public **Free** tier. Unlimited discovery + installs.
|
|
8
|
-
* - `
|
|
9
|
-
* - `
|
|
9
|
+
* - `pro` → marketed as **Pro** ($7/mo · $59/yr). Daily-driver toolkit.
|
|
10
|
+
* - `max` → marketed as **Max** ($12/mo · $108/yr). Bulk-developer tier.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* those map cleanly to Free / Pro / Max.
|
|
12
|
+
* Internal IDs match the marketing labels 1:1 (migration 052 renamed
|
|
13
|
+
* the legacy `explorer`/`creator` enum values). PLAN_LIMITS is still the
|
|
14
|
+
* single source of truth for what each ID unlocks; the `label` field
|
|
15
|
+
* provides the rendered display string ("Free" / "Pro" / "Max").
|
|
16
16
|
*/
|
|
17
17
|
export interface PlanLimits {
|
|
18
18
|
/** Display label used in pricing cards / Settings ("Free" / "Pro" / "Max"). */
|
|
@@ -46,8 +46,6 @@ export interface PlanLimits {
|
|
|
46
46
|
* Free: 5/mo, Pro+ unlimited. Counter resets on calendar month rollover.
|
|
47
47
|
*/
|
|
48
48
|
install_monthly_limit: number | null;
|
|
49
|
-
/** Allowed deploy targets. Empty list = no Multi-Agent feature. */
|
|
50
|
-
multi_agent_targets: ReadonlyArray<'claude' | 'codex' | 'cursor' | 'gemini' | 'cline' | 'amp'>;
|
|
51
49
|
/** `prave sync` enabled. */
|
|
52
50
|
can_cli_sync: boolean;
|
|
53
51
|
/** `prave update` (and the dashboard Update Banner). */
|
|
@@ -62,27 +60,8 @@ export interface PlanLimits {
|
|
|
62
60
|
* Total authored-skill ceiling (public + private). `null` = unlimited.
|
|
63
61
|
*/
|
|
64
62
|
authoring_max_skills: number | null;
|
|
65
|
-
/** History tab + revert. */
|
|
66
|
-
can_versioning: boolean;
|
|
67
63
|
/** AI-Description generate-button in the editor. */
|
|
68
64
|
can_ai_description: boolean;
|
|
69
|
-
/** Pull-request workflow on others' skills. */
|
|
70
|
-
can_pull_requests: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Monthly Skill-Tester credits. 0 = blocked entirely.
|
|
73
|
-
* 1 run costs `tester_cost_per_run` credits.
|
|
74
|
-
* Free: 0 · Pro: 100 · Max: 300
|
|
75
|
-
*/
|
|
76
|
-
tester_credits_monthly: number;
|
|
77
|
-
/** Cost (in credits) of a single tester run. */
|
|
78
|
-
tester_cost_per_run: number;
|
|
79
|
-
/**
|
|
80
|
-
* Anti-spam cooldown between tester runs in seconds. 0 = no cooldown
|
|
81
|
-
* (Max-tier privilege). Pro = 180s (3 min).
|
|
82
|
-
*/
|
|
83
|
-
tester_cooldown_seconds: number;
|
|
84
|
-
/** BYO-Anthropic-key tester mode (uses user's own key, no Prave credits). */
|
|
85
|
-
can_byo_tester_key: boolean;
|
|
86
65
|
/** Access the Intelligence dashboard at all. */
|
|
87
66
|
can_intelligence: boolean;
|
|
88
67
|
/**
|
|
@@ -93,12 +72,22 @@ export interface PlanLimits {
|
|
|
93
72
|
*/
|
|
94
73
|
intelligence_indexed_max: number | null;
|
|
95
74
|
/**
|
|
96
|
-
*
|
|
97
|
-
* Anthropic-API-backed). `null` = unlimited.
|
|
98
|
-
*
|
|
99
|
-
* `
|
|
75
|
+
* Cap on Auto-Skill-from-Repo generations (server-side
|
|
76
|
+
* Anthropic-API-backed). `null` = unlimited.
|
|
77
|
+
*
|
|
78
|
+
* The cap is *monthly* when `auto_skill_resets_monthly` is true and
|
|
79
|
+
* *lifetime* otherwise. Pro/Max reset monthly; Free is a one-shot
|
|
80
|
+
* lifetime allowance (3 total, ever) so the upgrade gate fires the
|
|
81
|
+
* moment a user has tasted the feature.
|
|
100
82
|
*/
|
|
101
83
|
auto_skill_monthly_limit: number | null;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the Auto-Skill counter resets at the calendar-month
|
|
86
|
+
* boundary. Free = false (hard lifetime cap drives conversion);
|
|
87
|
+
* Pro = true (30/month rolling); Max = true but the cap is null so
|
|
88
|
+
* the reset is a no-op.
|
|
89
|
+
*/
|
|
90
|
+
auto_skill_resets_monthly: boolean;
|
|
102
91
|
/** "Apply all suggestions" batch run on the editor. */
|
|
103
92
|
can_apply_all: boolean;
|
|
104
93
|
/** Hook + scanner usage tracking. */
|
|
@@ -126,48 +115,12 @@ export interface PlanLimits {
|
|
|
126
115
|
/** Early access to in-development features. */
|
|
127
116
|
has_early_access: boolean;
|
|
128
117
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
|
|
133
|
-
runs_max_active: number;
|
|
134
|
-
/**
|
|
135
|
-
* Smallest schedule interval the user can pick. Strings map to the
|
|
136
|
-
* wizard's preset list:
|
|
137
|
-
* 'none' — Runs feature disabled entirely
|
|
138
|
-
* 'daily' — daily / weekly / monthly only
|
|
139
|
-
* 'hourly' — adds the hourly preset (Max-tier)
|
|
140
|
-
* 'custom' — adds the custom-cron field (Max-tier)
|
|
141
|
-
* The UI uses this to hide presets the plan doesn't allow.
|
|
142
|
-
*/
|
|
143
|
-
runs_min_frequency: 'none' | 'daily' | 'hourly' | 'custom';
|
|
144
|
-
/** Hard timeout cap (seconds) per single execution. */
|
|
145
|
-
runs_max_timeout_seconds: number;
|
|
146
|
-
/** Max stdout/stderr captured per execution (bytes). */
|
|
147
|
-
runs_max_log_bytes: number;
|
|
148
|
-
/**
|
|
149
|
-
* Vault keys per run. Each key holds a single user-supplied secret
|
|
150
|
-
* (API key, OAuth client_secret, etc.) readable from the skill via
|
|
151
|
-
* `prave.vault.get('KEY')`. `null` = unlimited.
|
|
152
|
-
*/
|
|
153
|
-
vault_keys_max: number | null;
|
|
154
|
-
/**
|
|
155
|
-
* Per-run KV bytes budget — the total encrypted-value size summed
|
|
156
|
-
* across all `run_kv` rows for the run. Hits 413 on PUT once
|
|
157
|
-
* exceeded. `null` = unlimited.
|
|
158
|
-
*/
|
|
159
|
-
kv_bytes_max: number | null;
|
|
160
|
-
/**
|
|
161
|
-
* Webhook endpoints per run. Each endpoint mints one stable URL on
|
|
162
|
-
* `in.prave.app/w/<token>/<endpoint_id>`. `null` = unlimited.
|
|
163
|
-
*/
|
|
164
|
-
webhooks_max: number | null;
|
|
165
|
-
/**
|
|
166
|
-
* Inbound webhook events per day across all endpoints on the run.
|
|
167
|
-
* Over-cap requests are dropped with 429 (event NOT buffered).
|
|
168
|
-
* `null` = unlimited.
|
|
118
|
+
* Which target agents `prave install` may fan out to in a single
|
|
119
|
+
* invocation. Free is locked to Claude Code; Pro+ unlocks the full
|
|
120
|
+
* set so a Skill can be dropped into Claude / Codex / Gemini /
|
|
121
|
+
* Cursor / Cline / Amp at once.
|
|
169
122
|
*/
|
|
170
|
-
|
|
123
|
+
multi_agent_targets: readonly AgentType[];
|
|
171
124
|
}
|
|
172
125
|
export declare const PLAN_LIMITS: Record<Plan, PlanLimits>;
|
|
173
126
|
export declare const PLAN_RANK: Record<Plan, number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../../src/types/plan-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../../src/types/plan-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE/D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAA;IACxB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAA;IAGlB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,YAAY,EAAE,OAAO,CAAA;IACrB;;;;;;;;OAQG;IACH,mBAAmB,EAAE,OAAO,CAAA;IAG5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,4BAA4B;IAC5B,YAAY,EAAE,OAAO,CAAA;IACrB,wDAAwD;IACxD,cAAc,EAAE,OAAO,CAAA;IACvB,yCAAyC;IACzC,sBAAsB,EAAE,OAAO,CAAA;IAG/B,0CAA0C;IAC1C,oBAAoB,EAAE,OAAO,CAAA;IAC7B,0CAA0C;IAC1C,qBAAqB,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,oDAAoD;IACpD,kBAAkB,EAAE,OAAO,CAAA;IAG3B,gDAAgD;IAChD,gBAAgB,EAAE,OAAO,CAAA;IACzB;;;;;OAKG;IACH,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC;;;;;;;;OAQG;IACH,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC;;;;;OAKG;IACH,yBAAyB,EAAE,OAAO,CAAA;IAClC,uDAAuD;IACvD,aAAa,EAAE,OAAO,CAAA;IACtB,qCAAqC;IACrC,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,mCAAmC;IACnC,gBAAgB,EAAE,OAAO,CAAA;IAGzB,8CAA8C;IAC9C,kBAAkB,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAA;IAC7B,oDAAoD;IACpD,kBAAkB,EAAE,OAAO,CAAA;IAC3B,mEAAmE;IACnE,kBAAkB,EAAE,OAAO,CAAA;IAG3B,6CAA6C;IAC7C,oBAAoB,EAAE,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,gBAAgB,EAAE,OAAO,CAAA;IAGzB;;;;;OAKG;IACH,mBAAmB,EAAE,SAAS,SAAS,EAAE,CAAA;CAC1C;AAKD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,CAyJhD,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI1C,CAAA;AAED,8DAA8D;AAC9D,eAAO,MAAM,SAAS,GAAI,QAAQ,IAAI,EAAE,UAAU,IAAI,KAAG,OACf,CAAA;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,UAAU,KAAG,IAAI,GAAG,IAU7D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,MAAiC,CAAA;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,eAAe,MAAM,KAAG,MAAM,GAAG,IAI9E,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { AGENT_TYPES } from './intelligence.js';
|
|
2
|
+
/** Convenience constant — every agent that `prave install` knows about. */
|
|
3
|
+
const ALL_AGENTS = AGENT_TYPES;
|
|
2
4
|
export const PLAN_LIMITS = {
|
|
3
5
|
// ── Free ──────────────────────────────────────────────────────────
|
|
4
6
|
free: {
|
|
@@ -16,7 +18,6 @@ export const PLAN_LIMITS = {
|
|
|
16
18
|
// harm onboarding. The real value-add lives in Sync, Skill Intelligence
|
|
17
19
|
// (token cost + conflicts), and semantic search — all gated above.
|
|
18
20
|
install_monthly_limit: null,
|
|
19
|
-
multi_agent_targets: ['claude'],
|
|
20
21
|
can_cli_sync: false,
|
|
21
22
|
can_cli_update: false,
|
|
22
23
|
can_cross_machine_sync: false,
|
|
@@ -27,19 +28,11 @@ export const PLAN_LIMITS = {
|
|
|
27
28
|
can_authoring_public: false,
|
|
28
29
|
can_authoring_private: true,
|
|
29
30
|
authoring_max_skills: 1,
|
|
30
|
-
can_versioning: false,
|
|
31
31
|
can_ai_description: false,
|
|
32
|
-
can_pull_requests: false,
|
|
33
|
-
// Free gets a single Tester run / month — one taste of the agent
|
|
34
|
-
// sandbox so the upgrade prompt isn't an abstract "you've never
|
|
35
|
-
// seen this" wall. 1 run = 5 credits = ~$0.02 LLM cost to us.
|
|
36
|
-
tester_credits_monthly: 5,
|
|
37
|
-
tester_cost_per_run: 5,
|
|
38
|
-
tester_cooldown_seconds: 600,
|
|
39
|
-
can_byo_tester_key: false,
|
|
40
32
|
can_intelligence: false,
|
|
41
33
|
intelligence_indexed_max: 0,
|
|
42
34
|
auto_skill_monthly_limit: 3,
|
|
35
|
+
auto_skill_resets_monthly: false,
|
|
43
36
|
can_apply_all: false,
|
|
44
37
|
can_usage_tracking: false,
|
|
45
38
|
usage_history_days: 0,
|
|
@@ -50,25 +43,17 @@ export const PLAN_LIMITS = {
|
|
|
50
43
|
has_priority_badge: false,
|
|
51
44
|
has_priority_support: false,
|
|
52
45
|
has_early_access: false,
|
|
53
|
-
|
|
54
|
-
runs_min_frequency: 'none',
|
|
55
|
-
runs_max_timeout_seconds: 0,
|
|
56
|
-
runs_max_log_bytes: 0,
|
|
57
|
-
vault_keys_max: 0,
|
|
58
|
-
kv_bytes_max: 0,
|
|
59
|
-
webhooks_max: 0,
|
|
60
|
-
webhook_events_per_day: 0,
|
|
46
|
+
multi_agent_targets: ['claude'],
|
|
61
47
|
},
|
|
62
|
-
// ── Pro
|
|
63
|
-
|
|
48
|
+
// ── Pro ────────────────────────────────────────────────────────────
|
|
49
|
+
pro: {
|
|
64
50
|
label: 'Pro',
|
|
65
|
-
tagline: 'See your library
|
|
66
|
-
// Coffee-price tier
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
// 5K-user model: 25% conversion → $8.75K MRR from Pro alone.
|
|
51
|
+
tagline: 'See what your library costs. Find Skills semantically. Audit + author the way you work.',
|
|
52
|
+
// Coffee-price tier. Pro is the "everyday driver" — semantic search,
|
|
53
|
+
// 25-Skill intelligence indexing, full editor + AI description, MCP
|
|
54
|
+
// server, cross-machine sync. The 50-Skill authoring cap and the
|
|
55
|
+
// 30/mo Auto-Skill quota create deliberate upgrade pressure to Max
|
|
56
|
+
// for power users without crippling typical workflows.
|
|
72
57
|
price_usd_monthly: 7,
|
|
73
58
|
price_usd_yearly: 59,
|
|
74
59
|
rank: 1,
|
|
@@ -77,23 +62,20 @@ export const PLAN_LIMITS = {
|
|
|
77
62
|
can_bookmark: true,
|
|
78
63
|
can_semantic_search: true,
|
|
79
64
|
install_monthly_limit: null,
|
|
80
|
-
multi_agent_targets: ALL_AGENTS,
|
|
81
65
|
can_cli_sync: true,
|
|
82
66
|
can_cli_update: true,
|
|
83
67
|
can_cross_machine_sync: true,
|
|
84
68
|
can_authoring_public: true,
|
|
85
69
|
can_authoring_private: true,
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
// Pro caps total authored Skills at 50 — that covers ~90% of solo
|
|
71
|
+
// developer libraries by our usage data and leaves a clean upgrade
|
|
72
|
+
// story for bulk authors who hit the wall.
|
|
73
|
+
authoring_max_skills: 50,
|
|
88
74
|
can_ai_description: true,
|
|
89
|
-
can_pull_requests: true,
|
|
90
|
-
tester_credits_monthly: 100,
|
|
91
|
-
tester_cost_per_run: 5,
|
|
92
|
-
tester_cooldown_seconds: 180,
|
|
93
|
-
can_byo_tester_key: false,
|
|
94
75
|
can_intelligence: true,
|
|
95
76
|
intelligence_indexed_max: 25,
|
|
96
77
|
auto_skill_monthly_limit: 30,
|
|
78
|
+
auto_skill_resets_monthly: true,
|
|
97
79
|
can_apply_all: false,
|
|
98
80
|
can_usage_tracking: true,
|
|
99
81
|
usage_history_days: 30,
|
|
@@ -104,23 +86,18 @@ export const PLAN_LIMITS = {
|
|
|
104
86
|
has_priority_badge: false,
|
|
105
87
|
has_priority_support: false,
|
|
106
88
|
has_early_access: false,
|
|
107
|
-
|
|
108
|
-
runs_min_frequency: 'daily',
|
|
109
|
-
runs_max_timeout_seconds: 60,
|
|
110
|
-
runs_max_log_bytes: 65_536,
|
|
111
|
-
vault_keys_max: 25,
|
|
112
|
-
kv_bytes_max: 1_048_576,
|
|
113
|
-
webhooks_max: 5,
|
|
114
|
-
webhook_events_per_day: 5_000,
|
|
89
|
+
multi_agent_targets: ALL_AGENTS,
|
|
115
90
|
},
|
|
116
|
-
// ── Max
|
|
117
|
-
|
|
91
|
+
// ── Max ────────────────────────────────────────────────────────────
|
|
92
|
+
max: {
|
|
118
93
|
label: 'Max',
|
|
119
|
-
tagline: 'Unlimited audit,
|
|
120
|
-
// Power-user
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
94
|
+
tagline: 'Unlimited library audit, Apply-All batch fixes, magic-link sharing, priority MCP.',
|
|
95
|
+
// Power-user / bulk-developer tier. Removes the Pro caps:
|
|
96
|
+
// - Authoring 50 → unlimited
|
|
97
|
+
// - Intelligence 25 → unlimited (+ Apply-All)
|
|
98
|
+
// - Auto-Skill 30/mo → unlimited
|
|
99
|
+
// - Usage history 30 days → unlimited + CSV export
|
|
100
|
+
// - Adds magic-link sharing, priority MCP routing, priority support.
|
|
124
101
|
price_usd_monthly: 12,
|
|
125
102
|
price_usd_yearly: 108,
|
|
126
103
|
rank: 2,
|
|
@@ -129,23 +106,17 @@ export const PLAN_LIMITS = {
|
|
|
129
106
|
can_bookmark: true,
|
|
130
107
|
can_semantic_search: true,
|
|
131
108
|
install_monthly_limit: null,
|
|
132
|
-
multi_agent_targets: ALL_AGENTS,
|
|
133
109
|
can_cli_sync: true,
|
|
134
110
|
can_cli_update: true,
|
|
135
111
|
can_cross_machine_sync: true,
|
|
136
112
|
can_authoring_public: true,
|
|
137
113
|
can_authoring_private: true,
|
|
138
114
|
authoring_max_skills: null,
|
|
139
|
-
can_versioning: true,
|
|
140
115
|
can_ai_description: true,
|
|
141
|
-
can_pull_requests: true,
|
|
142
|
-
tester_credits_monthly: 300,
|
|
143
|
-
tester_cost_per_run: 5,
|
|
144
|
-
tester_cooldown_seconds: 0,
|
|
145
|
-
can_byo_tester_key: true,
|
|
146
116
|
can_intelligence: true,
|
|
147
117
|
intelligence_indexed_max: null,
|
|
148
118
|
auto_skill_monthly_limit: null,
|
|
119
|
+
auto_skill_resets_monthly: true,
|
|
149
120
|
can_apply_all: true,
|
|
150
121
|
can_usage_tracking: true,
|
|
151
122
|
usage_history_days: null,
|
|
@@ -156,20 +127,13 @@ export const PLAN_LIMITS = {
|
|
|
156
127
|
has_priority_badge: true,
|
|
157
128
|
has_priority_support: true,
|
|
158
129
|
has_early_access: true,
|
|
159
|
-
|
|
160
|
-
runs_min_frequency: 'custom',
|
|
161
|
-
runs_max_timeout_seconds: 300,
|
|
162
|
-
runs_max_log_bytes: 262_144,
|
|
163
|
-
vault_keys_max: null,
|
|
164
|
-
kv_bytes_max: 16_777_216,
|
|
165
|
-
webhooks_max: null,
|
|
166
|
-
webhook_events_per_day: 50_000,
|
|
130
|
+
multi_agent_targets: ALL_AGENTS,
|
|
167
131
|
},
|
|
168
132
|
};
|
|
169
133
|
export const PLAN_RANK = {
|
|
170
134
|
free: PLAN_LIMITS.free.rank,
|
|
171
|
-
|
|
172
|
-
|
|
135
|
+
pro: PLAN_LIMITS.pro.rank,
|
|
136
|
+
max: PLAN_LIMITS.max.rank,
|
|
173
137
|
};
|
|
174
138
|
/** True when `actual` includes everything `required` does. */
|
|
175
139
|
export const planMeets = (actual, required) => PLAN_RANK[actual] >= PLAN_RANK[required];
|
|
@@ -181,7 +145,7 @@ export const planMeets = (actual, required) => PLAN_RANK[actual] >= PLAN_RANK[re
|
|
|
181
145
|
* boolean features pass when `true`.
|
|
182
146
|
*/
|
|
183
147
|
export const minPlanFor = (feature) => {
|
|
184
|
-
const order = ['free', '
|
|
148
|
+
const order = ['free', 'pro', 'max'];
|
|
185
149
|
for (const plan of order) {
|
|
186
150
|
const v = PLAN_LIMITS[plan][feature];
|
|
187
151
|
if (typeof v === 'boolean' && v)
|
package/package.json
CHANGED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Credit-pack catalog. One-time purchases that top up
|
|
4
|
-
* `profiles.tester_credits_balance`. Prices are denominated in USD now
|
|
5
|
-
* (the `price_eur` field name kept for column-rename safety — Stripe
|
|
6
|
-
* still treats it as the gross USD amount, see stripe-seed.ts).
|
|
7
|
-
*
|
|
8
|
-
* Margin: Haiku 4.5 worst-case = ~$0.013 per Tester run = ~$0.0026 per
|
|
9
|
-
* credit. We charge $0.10–$0.12 per credit on top-ups, ~40-45× markup,
|
|
10
|
-
* which keeps the per-credit price *higher* than any subscription
|
|
11
|
-
* average so power-users always come out ahead by upgrading.
|
|
12
|
-
*/
|
|
13
|
-
export declare const CREDIT_PACK_IDS: readonly ["pack_25", "pack_100"];
|
|
14
|
-
export declare const creditPackIdSchema: z.ZodEnum<["pack_25", "pack_100"]>;
|
|
15
|
-
export type CreditPackId = z.infer<typeof creditPackIdSchema>;
|
|
16
|
-
export interface CreditPack {
|
|
17
|
-
id: CreditPackId;
|
|
18
|
-
credits: number;
|
|
19
|
-
/**
|
|
20
|
-
* Gross price in **USD** (VAT-inclusive — Stripe Tax computes the net
|
|
21
|
-
* split). The field name `price_eur` is preserved for column-rename
|
|
22
|
-
* safety; the Stripe seed and the UI both treat it as USD.
|
|
23
|
-
*/
|
|
24
|
-
price_eur: number;
|
|
25
|
-
/** Best-for hint shown on the pack card. */
|
|
26
|
-
blurb: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Two top-up tiers — entry and refill. Per-credit price stays *higher*
|
|
30
|
-
* than the subscription effective rates so a heavy user always saves
|
|
31
|
-
* by upgrading instead of hoarding top-ups.
|
|
32
|
-
*
|
|
33
|
-
* Margin (per pack, full burn):
|
|
34
|
-
* pack_25 ($3): ~$0.07 API + ~$0.39 Stripe = $0.46 cost. Net ~$2.54 (85%).
|
|
35
|
-
* pack_100 ($10): ~$0.26 API + ~$0.59 Stripe = $0.85 cost. Net ~$9.15 (92%).
|
|
36
|
-
* Both safely positive even on worst-case burn.
|
|
37
|
-
*/
|
|
38
|
-
export declare const CREDIT_PACKS: Record<CreditPackId, CreditPack>;
|
|
39
|
-
export declare const creditCheckoutInputSchema: z.ZodObject<{
|
|
40
|
-
pack: z.ZodEnum<["pack_25", "pack_100"]>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
pack: "pack_25" | "pack_100";
|
|
43
|
-
}, {
|
|
44
|
-
pack: "pack_25" | "pack_100";
|
|
45
|
-
}>;
|
|
46
|
-
export type CreditCheckoutInput = z.infer<typeof creditCheckoutInputSchema>;
|
|
47
|
-
export declare const creditBalanceSchema: z.ZodObject<{
|
|
48
|
-
monthly_quota: z.ZodNumber;
|
|
49
|
-
monthly_used: z.ZodNumber;
|
|
50
|
-
monthly_remaining: z.ZodNumber;
|
|
51
|
-
/** Purchased top-up balance (never expires). */
|
|
52
|
-
balance: z.ZodNumber;
|
|
53
|
-
/** Total credits available right now (monthly_remaining + balance). */
|
|
54
|
-
total_available: z.ZodNumber;
|
|
55
|
-
/** ISO timestamp when the monthly window resets. */
|
|
56
|
-
resets_at: z.ZodString;
|
|
57
|
-
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
monthly_quota: number;
|
|
59
|
-
monthly_used: number;
|
|
60
|
-
monthly_remaining: number;
|
|
61
|
-
balance: number;
|
|
62
|
-
total_available: number;
|
|
63
|
-
resets_at: string;
|
|
64
|
-
}, {
|
|
65
|
-
monthly_quota: number;
|
|
66
|
-
monthly_used: number;
|
|
67
|
-
monthly_remaining: number;
|
|
68
|
-
balance: number;
|
|
69
|
-
total_available: number;
|
|
70
|
-
resets_at: string;
|
|
71
|
-
}>;
|
|
72
|
-
export type CreditBalance = z.infer<typeof creditBalanceSchema>;
|
|
73
|
-
//# sourceMappingURL=credits.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credits.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/credits.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,kCAAmC,CAAA;AAC/D,eAAO,MAAM,kBAAkB,oCAA0B,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAazD,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,mBAAmB;;;;IAI9B,gDAAgD;;IAEhD,uEAAuE;;IAEvE,oDAAoD;;;;;;;;;;;;;;;;EAEpD,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|