@middlewr/contracts 0.0.33 → 0.0.34
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/cjs/billing.schema.d.ts +76 -0
- package/dist/cjs/billing.schema.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +80 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +42 -0
- package/dist/esm/billing.schema.d.ts +76 -0
- package/dist/esm/billing.schema.d.ts.map +1 -1
- package/dist/esm/index.d.ts +80 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +40 -0
- package/package.json +1 -1
- package/src/billing.schema.ts +42 -0
- package/src/index.ts +12 -1
|
@@ -8,6 +8,82 @@ export declare const BillingStatusSchema: z.ZodObject<{
|
|
|
8
8
|
billing_customer_id: z.ZodNullable<z.ZodString>;
|
|
9
9
|
billing_subscription_id: z.ZodNullable<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
+
export declare const PlanSchema: z.ZodObject<{
|
|
12
|
+
name: z.ZodEnum<{
|
|
13
|
+
free: "free";
|
|
14
|
+
developer: "developer";
|
|
15
|
+
pro: "pro";
|
|
16
|
+
business: "business";
|
|
17
|
+
}>;
|
|
18
|
+
limits: z.ZodObject<{
|
|
19
|
+
tracked_links: z.ZodNumber;
|
|
20
|
+
analytics_retention_days: z.ZodNumber;
|
|
21
|
+
links_created: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
prices: z.ZodObject<{
|
|
24
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
features: z.ZodObject<{
|
|
28
|
+
custom_domains: z.ZodBoolean;
|
|
29
|
+
custom_slugs: z.ZodBoolean;
|
|
30
|
+
qr_codes: z.ZodBoolean;
|
|
31
|
+
utm_builder: z.ZodBoolean;
|
|
32
|
+
link_scheduling: z.ZodBoolean;
|
|
33
|
+
password_protection: z.ZodBoolean;
|
|
34
|
+
smart_redirects: z.ZodBoolean;
|
|
35
|
+
realtime_analytics: z.ZodBoolean;
|
|
36
|
+
device_breakdown: z.ZodBoolean;
|
|
37
|
+
geo_analytics: z.ZodBoolean;
|
|
38
|
+
export_reports: z.ZodBoolean;
|
|
39
|
+
team_members: z.ZodBoolean;
|
|
40
|
+
role_based_access: z.ZodBoolean;
|
|
41
|
+
shared_workspaces: z.ZodBoolean;
|
|
42
|
+
api_access: z.ZodBoolean;
|
|
43
|
+
webhooks: z.ZodBoolean;
|
|
44
|
+
priority_support: z.ZodBoolean;
|
|
45
|
+
slack_connect: z.ZodBoolean;
|
|
46
|
+
account_manager: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const PlansOutputSchema: z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodEnum<{
|
|
51
|
+
free: "free";
|
|
52
|
+
developer: "developer";
|
|
53
|
+
pro: "pro";
|
|
54
|
+
business: "business";
|
|
55
|
+
}>;
|
|
56
|
+
limits: z.ZodObject<{
|
|
57
|
+
tracked_links: z.ZodNumber;
|
|
58
|
+
analytics_retention_days: z.ZodNumber;
|
|
59
|
+
links_created: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
prices: z.ZodObject<{
|
|
62
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
features: z.ZodObject<{
|
|
66
|
+
custom_domains: z.ZodBoolean;
|
|
67
|
+
custom_slugs: z.ZodBoolean;
|
|
68
|
+
qr_codes: z.ZodBoolean;
|
|
69
|
+
utm_builder: z.ZodBoolean;
|
|
70
|
+
link_scheduling: z.ZodBoolean;
|
|
71
|
+
password_protection: z.ZodBoolean;
|
|
72
|
+
smart_redirects: z.ZodBoolean;
|
|
73
|
+
realtime_analytics: z.ZodBoolean;
|
|
74
|
+
device_breakdown: z.ZodBoolean;
|
|
75
|
+
geo_analytics: z.ZodBoolean;
|
|
76
|
+
export_reports: z.ZodBoolean;
|
|
77
|
+
team_members: z.ZodBoolean;
|
|
78
|
+
role_based_access: z.ZodBoolean;
|
|
79
|
+
shared_workspaces: z.ZodBoolean;
|
|
80
|
+
api_access: z.ZodBoolean;
|
|
81
|
+
webhooks: z.ZodBoolean;
|
|
82
|
+
priority_support: z.ZodBoolean;
|
|
83
|
+
slack_connect: z.ZodBoolean;
|
|
84
|
+
account_manager: z.ZodBoolean;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
11
87
|
export declare const CreateCheckoutInputSchema: z.ZodObject<{
|
|
12
88
|
plan: z.ZodEnum<{
|
|
13
89
|
developer: "developer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAmCH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAsB,CAAC;AAErD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1467,6 +1467,46 @@ export declare const domainsContract: {
|
|
|
1467
1467
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1468
1468
|
};
|
|
1469
1469
|
export declare const billingContract: {
|
|
1470
|
+
plans: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1471
|
+
workspace_id: z.ZodString;
|
|
1472
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
1473
|
+
name: z.ZodEnum<{
|
|
1474
|
+
free: "free";
|
|
1475
|
+
developer: "developer";
|
|
1476
|
+
pro: "pro";
|
|
1477
|
+
business: "business";
|
|
1478
|
+
}>;
|
|
1479
|
+
limits: z.ZodObject<{
|
|
1480
|
+
tracked_links: z.ZodNumber;
|
|
1481
|
+
analytics_retention_days: z.ZodNumber;
|
|
1482
|
+
links_created: z.ZodNumber;
|
|
1483
|
+
}, z.core.$strip>;
|
|
1484
|
+
prices: z.ZodObject<{
|
|
1485
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
1486
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
1487
|
+
}, z.core.$strip>;
|
|
1488
|
+
features: z.ZodObject<{
|
|
1489
|
+
custom_domains: z.ZodBoolean;
|
|
1490
|
+
custom_slugs: z.ZodBoolean;
|
|
1491
|
+
qr_codes: z.ZodBoolean;
|
|
1492
|
+
utm_builder: z.ZodBoolean;
|
|
1493
|
+
link_scheduling: z.ZodBoolean;
|
|
1494
|
+
password_protection: z.ZodBoolean;
|
|
1495
|
+
smart_redirects: z.ZodBoolean;
|
|
1496
|
+
realtime_analytics: z.ZodBoolean;
|
|
1497
|
+
device_breakdown: z.ZodBoolean;
|
|
1498
|
+
geo_analytics: z.ZodBoolean;
|
|
1499
|
+
export_reports: z.ZodBoolean;
|
|
1500
|
+
team_members: z.ZodBoolean;
|
|
1501
|
+
role_based_access: z.ZodBoolean;
|
|
1502
|
+
shared_workspaces: z.ZodBoolean;
|
|
1503
|
+
api_access: z.ZodBoolean;
|
|
1504
|
+
webhooks: z.ZodBoolean;
|
|
1505
|
+
priority_support: z.ZodBoolean;
|
|
1506
|
+
slack_connect: z.ZodBoolean;
|
|
1507
|
+
account_manager: z.ZodBoolean;
|
|
1508
|
+
}, z.core.$strip>;
|
|
1509
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
1470
1510
|
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1471
1511
|
workspace_id: z.ZodString;
|
|
1472
1512
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2959,6 +2999,46 @@ export declare const contract: {
|
|
|
2959
2999
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
2960
3000
|
};
|
|
2961
3001
|
billing: {
|
|
3002
|
+
plans: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3003
|
+
workspace_id: z.ZodString;
|
|
3004
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
3005
|
+
name: z.ZodEnum<{
|
|
3006
|
+
free: "free";
|
|
3007
|
+
developer: "developer";
|
|
3008
|
+
pro: "pro";
|
|
3009
|
+
business: "business";
|
|
3010
|
+
}>;
|
|
3011
|
+
limits: z.ZodObject<{
|
|
3012
|
+
tracked_links: z.ZodNumber;
|
|
3013
|
+
analytics_retention_days: z.ZodNumber;
|
|
3014
|
+
links_created: z.ZodNumber;
|
|
3015
|
+
}, z.core.$strip>;
|
|
3016
|
+
prices: z.ZodObject<{
|
|
3017
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
3018
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
3019
|
+
}, z.core.$strip>;
|
|
3020
|
+
features: z.ZodObject<{
|
|
3021
|
+
custom_domains: z.ZodBoolean;
|
|
3022
|
+
custom_slugs: z.ZodBoolean;
|
|
3023
|
+
qr_codes: z.ZodBoolean;
|
|
3024
|
+
utm_builder: z.ZodBoolean;
|
|
3025
|
+
link_scheduling: z.ZodBoolean;
|
|
3026
|
+
password_protection: z.ZodBoolean;
|
|
3027
|
+
smart_redirects: z.ZodBoolean;
|
|
3028
|
+
realtime_analytics: z.ZodBoolean;
|
|
3029
|
+
device_breakdown: z.ZodBoolean;
|
|
3030
|
+
geo_analytics: z.ZodBoolean;
|
|
3031
|
+
export_reports: z.ZodBoolean;
|
|
3032
|
+
team_members: z.ZodBoolean;
|
|
3033
|
+
role_based_access: z.ZodBoolean;
|
|
3034
|
+
shared_workspaces: z.ZodBoolean;
|
|
3035
|
+
api_access: z.ZodBoolean;
|
|
3036
|
+
webhooks: z.ZodBoolean;
|
|
3037
|
+
priority_support: z.ZodBoolean;
|
|
3038
|
+
slack_connect: z.ZodBoolean;
|
|
3039
|
+
account_manager: z.ZodBoolean;
|
|
3040
|
+
}, z.core.$strip>;
|
|
3041
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
2962
3042
|
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2963
3043
|
workspace_id: z.ZodString;
|
|
2964
3044
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -51,6 +51,8 @@ __export(index_exports, {
|
|
|
51
51
|
LinkSchema: () => LinkSchema,
|
|
52
52
|
MemberIdParamSchema: () => MemberIdParamSchema,
|
|
53
53
|
PaginatedLinksSchema: () => PaginatedLinksSchema,
|
|
54
|
+
PlanSchema: () => PlanSchema,
|
|
55
|
+
PlansOutputSchema: () => PlansOutputSchema,
|
|
54
56
|
QrCodeSettingsSchema: () => QrCodeSettingsSchema,
|
|
55
57
|
RuleGraphNodeSchema: () => RuleGraphNodeSchema,
|
|
56
58
|
RuleGraphSchema: () => RuleGraphSchema,
|
|
@@ -164,6 +166,43 @@ var BillingStatusSchema = import_zod3.z.object({
|
|
|
164
166
|
billing_customer_id: import_zod3.z.string().nullable(),
|
|
165
167
|
billing_subscription_id: import_zod3.z.string().nullable()
|
|
166
168
|
});
|
|
169
|
+
var PlanLimitsSchema = import_zod3.z.object({
|
|
170
|
+
tracked_links: import_zod3.z.number(),
|
|
171
|
+
analytics_retention_days: import_zod3.z.number(),
|
|
172
|
+
links_created: import_zod3.z.number()
|
|
173
|
+
});
|
|
174
|
+
var PlanPricesSchema = import_zod3.z.object({
|
|
175
|
+
monthly: import_zod3.z.number().nullable(),
|
|
176
|
+
yearly: import_zod3.z.number().nullable()
|
|
177
|
+
});
|
|
178
|
+
var PlanFeaturesSchema = import_zod3.z.object({
|
|
179
|
+
custom_domains: import_zod3.z.boolean(),
|
|
180
|
+
custom_slugs: import_zod3.z.boolean(),
|
|
181
|
+
qr_codes: import_zod3.z.boolean(),
|
|
182
|
+
utm_builder: import_zod3.z.boolean(),
|
|
183
|
+
link_scheduling: import_zod3.z.boolean(),
|
|
184
|
+
password_protection: import_zod3.z.boolean(),
|
|
185
|
+
smart_redirects: import_zod3.z.boolean(),
|
|
186
|
+
realtime_analytics: import_zod3.z.boolean(),
|
|
187
|
+
device_breakdown: import_zod3.z.boolean(),
|
|
188
|
+
geo_analytics: import_zod3.z.boolean(),
|
|
189
|
+
export_reports: import_zod3.z.boolean(),
|
|
190
|
+
team_members: import_zod3.z.boolean(),
|
|
191
|
+
role_based_access: import_zod3.z.boolean(),
|
|
192
|
+
shared_workspaces: import_zod3.z.boolean(),
|
|
193
|
+
api_access: import_zod3.z.boolean(),
|
|
194
|
+
webhooks: import_zod3.z.boolean(),
|
|
195
|
+
priority_support: import_zod3.z.boolean(),
|
|
196
|
+
slack_connect: import_zod3.z.boolean(),
|
|
197
|
+
account_manager: import_zod3.z.boolean()
|
|
198
|
+
});
|
|
199
|
+
var PlanSchema = import_zod3.z.object({
|
|
200
|
+
name: import_zod3.z.enum(["free", "developer", "pro", "business"]),
|
|
201
|
+
limits: PlanLimitsSchema,
|
|
202
|
+
prices: PlanPricesSchema,
|
|
203
|
+
features: PlanFeaturesSchema
|
|
204
|
+
});
|
|
205
|
+
var PlansOutputSchema = import_zod3.z.array(PlanSchema);
|
|
167
206
|
var CreateCheckoutInputSchema = import_zod3.z.object({
|
|
168
207
|
plan: import_zod3.z.enum(["developer", "pro", "business"]),
|
|
169
208
|
interval: import_zod3.z.enum(["monthly", "yearly"]).default("monthly"),
|
|
@@ -640,6 +679,7 @@ var domainsContract = {
|
|
|
640
679
|
verify: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/domains/{domain_id}/verify" }).input(DomainIdParamSchema).output(DomainSchema)
|
|
641
680
|
};
|
|
642
681
|
var billingContract = {
|
|
682
|
+
plans: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/billing/plans" }).input(WorkspaceIdParamSchema).output(PlansOutputSchema),
|
|
643
683
|
status: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/billing" }).input(WorkspaceIdParamSchema).output(BillingStatusSchema),
|
|
644
684
|
checkout: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/billing/checkout" }).input(WorkspaceIdParamSchema.merge(CreateCheckoutInputSchema)).output(CheckoutSessionSchema),
|
|
645
685
|
portal: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/billing/portal" }).input(WorkspaceIdParamSchema).output(CustomerPortalSchema)
|
|
@@ -689,6 +729,8 @@ var contract = {
|
|
|
689
729
|
LinkSchema,
|
|
690
730
|
MemberIdParamSchema,
|
|
691
731
|
PaginatedLinksSchema,
|
|
732
|
+
PlanSchema,
|
|
733
|
+
PlansOutputSchema,
|
|
692
734
|
QrCodeSettingsSchema,
|
|
693
735
|
RuleGraphNodeSchema,
|
|
694
736
|
RuleGraphSchema,
|
|
@@ -8,6 +8,82 @@ export declare const BillingStatusSchema: z.ZodObject<{
|
|
|
8
8
|
billing_customer_id: z.ZodNullable<z.ZodString>;
|
|
9
9
|
billing_subscription_id: z.ZodNullable<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
+
export declare const PlanSchema: z.ZodObject<{
|
|
12
|
+
name: z.ZodEnum<{
|
|
13
|
+
free: "free";
|
|
14
|
+
developer: "developer";
|
|
15
|
+
pro: "pro";
|
|
16
|
+
business: "business";
|
|
17
|
+
}>;
|
|
18
|
+
limits: z.ZodObject<{
|
|
19
|
+
tracked_links: z.ZodNumber;
|
|
20
|
+
analytics_retention_days: z.ZodNumber;
|
|
21
|
+
links_created: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
prices: z.ZodObject<{
|
|
24
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
features: z.ZodObject<{
|
|
28
|
+
custom_domains: z.ZodBoolean;
|
|
29
|
+
custom_slugs: z.ZodBoolean;
|
|
30
|
+
qr_codes: z.ZodBoolean;
|
|
31
|
+
utm_builder: z.ZodBoolean;
|
|
32
|
+
link_scheduling: z.ZodBoolean;
|
|
33
|
+
password_protection: z.ZodBoolean;
|
|
34
|
+
smart_redirects: z.ZodBoolean;
|
|
35
|
+
realtime_analytics: z.ZodBoolean;
|
|
36
|
+
device_breakdown: z.ZodBoolean;
|
|
37
|
+
geo_analytics: z.ZodBoolean;
|
|
38
|
+
export_reports: z.ZodBoolean;
|
|
39
|
+
team_members: z.ZodBoolean;
|
|
40
|
+
role_based_access: z.ZodBoolean;
|
|
41
|
+
shared_workspaces: z.ZodBoolean;
|
|
42
|
+
api_access: z.ZodBoolean;
|
|
43
|
+
webhooks: z.ZodBoolean;
|
|
44
|
+
priority_support: z.ZodBoolean;
|
|
45
|
+
slack_connect: z.ZodBoolean;
|
|
46
|
+
account_manager: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const PlansOutputSchema: z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodEnum<{
|
|
51
|
+
free: "free";
|
|
52
|
+
developer: "developer";
|
|
53
|
+
pro: "pro";
|
|
54
|
+
business: "business";
|
|
55
|
+
}>;
|
|
56
|
+
limits: z.ZodObject<{
|
|
57
|
+
tracked_links: z.ZodNumber;
|
|
58
|
+
analytics_retention_days: z.ZodNumber;
|
|
59
|
+
links_created: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
prices: z.ZodObject<{
|
|
62
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
features: z.ZodObject<{
|
|
66
|
+
custom_domains: z.ZodBoolean;
|
|
67
|
+
custom_slugs: z.ZodBoolean;
|
|
68
|
+
qr_codes: z.ZodBoolean;
|
|
69
|
+
utm_builder: z.ZodBoolean;
|
|
70
|
+
link_scheduling: z.ZodBoolean;
|
|
71
|
+
password_protection: z.ZodBoolean;
|
|
72
|
+
smart_redirects: z.ZodBoolean;
|
|
73
|
+
realtime_analytics: z.ZodBoolean;
|
|
74
|
+
device_breakdown: z.ZodBoolean;
|
|
75
|
+
geo_analytics: z.ZodBoolean;
|
|
76
|
+
export_reports: z.ZodBoolean;
|
|
77
|
+
team_members: z.ZodBoolean;
|
|
78
|
+
role_based_access: z.ZodBoolean;
|
|
79
|
+
shared_workspaces: z.ZodBoolean;
|
|
80
|
+
api_access: z.ZodBoolean;
|
|
81
|
+
webhooks: z.ZodBoolean;
|
|
82
|
+
priority_support: z.ZodBoolean;
|
|
83
|
+
slack_connect: z.ZodBoolean;
|
|
84
|
+
account_manager: z.ZodBoolean;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
11
87
|
export declare const CreateCheckoutInputSchema: z.ZodObject<{
|
|
12
88
|
plan: z.ZodEnum<{
|
|
13
89
|
developer: "developer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAmCH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAsB,CAAC;AAErD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAMpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1467,6 +1467,46 @@ export declare const domainsContract: {
|
|
|
1467
1467
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1468
1468
|
};
|
|
1469
1469
|
export declare const billingContract: {
|
|
1470
|
+
plans: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1471
|
+
workspace_id: z.ZodString;
|
|
1472
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
1473
|
+
name: z.ZodEnum<{
|
|
1474
|
+
free: "free";
|
|
1475
|
+
developer: "developer";
|
|
1476
|
+
pro: "pro";
|
|
1477
|
+
business: "business";
|
|
1478
|
+
}>;
|
|
1479
|
+
limits: z.ZodObject<{
|
|
1480
|
+
tracked_links: z.ZodNumber;
|
|
1481
|
+
analytics_retention_days: z.ZodNumber;
|
|
1482
|
+
links_created: z.ZodNumber;
|
|
1483
|
+
}, z.core.$strip>;
|
|
1484
|
+
prices: z.ZodObject<{
|
|
1485
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
1486
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
1487
|
+
}, z.core.$strip>;
|
|
1488
|
+
features: z.ZodObject<{
|
|
1489
|
+
custom_domains: z.ZodBoolean;
|
|
1490
|
+
custom_slugs: z.ZodBoolean;
|
|
1491
|
+
qr_codes: z.ZodBoolean;
|
|
1492
|
+
utm_builder: z.ZodBoolean;
|
|
1493
|
+
link_scheduling: z.ZodBoolean;
|
|
1494
|
+
password_protection: z.ZodBoolean;
|
|
1495
|
+
smart_redirects: z.ZodBoolean;
|
|
1496
|
+
realtime_analytics: z.ZodBoolean;
|
|
1497
|
+
device_breakdown: z.ZodBoolean;
|
|
1498
|
+
geo_analytics: z.ZodBoolean;
|
|
1499
|
+
export_reports: z.ZodBoolean;
|
|
1500
|
+
team_members: z.ZodBoolean;
|
|
1501
|
+
role_based_access: z.ZodBoolean;
|
|
1502
|
+
shared_workspaces: z.ZodBoolean;
|
|
1503
|
+
api_access: z.ZodBoolean;
|
|
1504
|
+
webhooks: z.ZodBoolean;
|
|
1505
|
+
priority_support: z.ZodBoolean;
|
|
1506
|
+
slack_connect: z.ZodBoolean;
|
|
1507
|
+
account_manager: z.ZodBoolean;
|
|
1508
|
+
}, z.core.$strip>;
|
|
1509
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
1470
1510
|
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1471
1511
|
workspace_id: z.ZodString;
|
|
1472
1512
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2959,6 +2999,46 @@ export declare const contract: {
|
|
|
2959
2999
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
2960
3000
|
};
|
|
2961
3001
|
billing: {
|
|
3002
|
+
plans: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3003
|
+
workspace_id: z.ZodString;
|
|
3004
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
3005
|
+
name: z.ZodEnum<{
|
|
3006
|
+
free: "free";
|
|
3007
|
+
developer: "developer";
|
|
3008
|
+
pro: "pro";
|
|
3009
|
+
business: "business";
|
|
3010
|
+
}>;
|
|
3011
|
+
limits: z.ZodObject<{
|
|
3012
|
+
tracked_links: z.ZodNumber;
|
|
3013
|
+
analytics_retention_days: z.ZodNumber;
|
|
3014
|
+
links_created: z.ZodNumber;
|
|
3015
|
+
}, z.core.$strip>;
|
|
3016
|
+
prices: z.ZodObject<{
|
|
3017
|
+
monthly: z.ZodNullable<z.ZodNumber>;
|
|
3018
|
+
yearly: z.ZodNullable<z.ZodNumber>;
|
|
3019
|
+
}, z.core.$strip>;
|
|
3020
|
+
features: z.ZodObject<{
|
|
3021
|
+
custom_domains: z.ZodBoolean;
|
|
3022
|
+
custom_slugs: z.ZodBoolean;
|
|
3023
|
+
qr_codes: z.ZodBoolean;
|
|
3024
|
+
utm_builder: z.ZodBoolean;
|
|
3025
|
+
link_scheduling: z.ZodBoolean;
|
|
3026
|
+
password_protection: z.ZodBoolean;
|
|
3027
|
+
smart_redirects: z.ZodBoolean;
|
|
3028
|
+
realtime_analytics: z.ZodBoolean;
|
|
3029
|
+
device_breakdown: z.ZodBoolean;
|
|
3030
|
+
geo_analytics: z.ZodBoolean;
|
|
3031
|
+
export_reports: z.ZodBoolean;
|
|
3032
|
+
team_members: z.ZodBoolean;
|
|
3033
|
+
role_based_access: z.ZodBoolean;
|
|
3034
|
+
shared_workspaces: z.ZodBoolean;
|
|
3035
|
+
api_access: z.ZodBoolean;
|
|
3036
|
+
webhooks: z.ZodBoolean;
|
|
3037
|
+
priority_support: z.ZodBoolean;
|
|
3038
|
+
slack_connect: z.ZodBoolean;
|
|
3039
|
+
account_manager: z.ZodBoolean;
|
|
3040
|
+
}, z.core.$strip>;
|
|
3041
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
2962
3042
|
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2963
3043
|
workspace_id: z.ZodString;
|
|
2964
3044
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsDxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU7B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -74,6 +74,43 @@ var BillingStatusSchema = z3.object({
|
|
|
74
74
|
billing_customer_id: z3.string().nullable(),
|
|
75
75
|
billing_subscription_id: z3.string().nullable()
|
|
76
76
|
});
|
|
77
|
+
var PlanLimitsSchema = z3.object({
|
|
78
|
+
tracked_links: z3.number(),
|
|
79
|
+
analytics_retention_days: z3.number(),
|
|
80
|
+
links_created: z3.number()
|
|
81
|
+
});
|
|
82
|
+
var PlanPricesSchema = z3.object({
|
|
83
|
+
monthly: z3.number().nullable(),
|
|
84
|
+
yearly: z3.number().nullable()
|
|
85
|
+
});
|
|
86
|
+
var PlanFeaturesSchema = z3.object({
|
|
87
|
+
custom_domains: z3.boolean(),
|
|
88
|
+
custom_slugs: z3.boolean(),
|
|
89
|
+
qr_codes: z3.boolean(),
|
|
90
|
+
utm_builder: z3.boolean(),
|
|
91
|
+
link_scheduling: z3.boolean(),
|
|
92
|
+
password_protection: z3.boolean(),
|
|
93
|
+
smart_redirects: z3.boolean(),
|
|
94
|
+
realtime_analytics: z3.boolean(),
|
|
95
|
+
device_breakdown: z3.boolean(),
|
|
96
|
+
geo_analytics: z3.boolean(),
|
|
97
|
+
export_reports: z3.boolean(),
|
|
98
|
+
team_members: z3.boolean(),
|
|
99
|
+
role_based_access: z3.boolean(),
|
|
100
|
+
shared_workspaces: z3.boolean(),
|
|
101
|
+
api_access: z3.boolean(),
|
|
102
|
+
webhooks: z3.boolean(),
|
|
103
|
+
priority_support: z3.boolean(),
|
|
104
|
+
slack_connect: z3.boolean(),
|
|
105
|
+
account_manager: z3.boolean()
|
|
106
|
+
});
|
|
107
|
+
var PlanSchema = z3.object({
|
|
108
|
+
name: z3.enum(["free", "developer", "pro", "business"]),
|
|
109
|
+
limits: PlanLimitsSchema,
|
|
110
|
+
prices: PlanPricesSchema,
|
|
111
|
+
features: PlanFeaturesSchema
|
|
112
|
+
});
|
|
113
|
+
var PlansOutputSchema = z3.array(PlanSchema);
|
|
77
114
|
var CreateCheckoutInputSchema = z3.object({
|
|
78
115
|
plan: z3.enum(["developer", "pro", "business"]),
|
|
79
116
|
interval: z3.enum(["monthly", "yearly"]).default("monthly"),
|
|
@@ -550,6 +587,7 @@ var domainsContract = {
|
|
|
550
587
|
verify: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/domains/{domain_id}/verify" }).input(DomainIdParamSchema).output(DomainSchema)
|
|
551
588
|
};
|
|
552
589
|
var billingContract = {
|
|
590
|
+
plans: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/billing/plans" }).input(WorkspaceIdParamSchema).output(PlansOutputSchema),
|
|
553
591
|
status: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/billing" }).input(WorkspaceIdParamSchema).output(BillingStatusSchema),
|
|
554
592
|
checkout: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/billing/checkout" }).input(WorkspaceIdParamSchema.merge(CreateCheckoutInputSchema)).output(CheckoutSessionSchema),
|
|
555
593
|
portal: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/billing/portal" }).input(WorkspaceIdParamSchema).output(CustomerPortalSchema)
|
|
@@ -598,6 +636,8 @@ export {
|
|
|
598
636
|
LinkSchema,
|
|
599
637
|
MemberIdParamSchema,
|
|
600
638
|
PaginatedLinksSchema,
|
|
639
|
+
PlanSchema,
|
|
640
|
+
PlansOutputSchema,
|
|
601
641
|
QrCodeSettingsSchema,
|
|
602
642
|
RuleGraphNodeSchema,
|
|
603
643
|
RuleGraphSchema,
|
package/package.json
CHANGED
package/src/billing.schema.ts
CHANGED
|
@@ -10,6 +10,48 @@ export const BillingStatusSchema = z.object({
|
|
|
10
10
|
billing_subscription_id: z.string().nullable(),
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
+
const PlanLimitsSchema = z.object({
|
|
14
|
+
tracked_links: z.number(),
|
|
15
|
+
analytics_retention_days: z.number(),
|
|
16
|
+
links_created: z.number(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const PlanPricesSchema = z.object({
|
|
20
|
+
monthly: z.number().nullable(),
|
|
21
|
+
yearly: z.number().nullable(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const PlanFeaturesSchema = z.object({
|
|
25
|
+
custom_domains: z.boolean(),
|
|
26
|
+
custom_slugs: z.boolean(),
|
|
27
|
+
qr_codes: z.boolean(),
|
|
28
|
+
utm_builder: z.boolean(),
|
|
29
|
+
link_scheduling: z.boolean(),
|
|
30
|
+
password_protection: z.boolean(),
|
|
31
|
+
smart_redirects: z.boolean(),
|
|
32
|
+
realtime_analytics: z.boolean(),
|
|
33
|
+
device_breakdown: z.boolean(),
|
|
34
|
+
geo_analytics: z.boolean(),
|
|
35
|
+
export_reports: z.boolean(),
|
|
36
|
+
team_members: z.boolean(),
|
|
37
|
+
role_based_access: z.boolean(),
|
|
38
|
+
shared_workspaces: z.boolean(),
|
|
39
|
+
api_access: z.boolean(),
|
|
40
|
+
webhooks: z.boolean(),
|
|
41
|
+
priority_support: z.boolean(),
|
|
42
|
+
slack_connect: z.boolean(),
|
|
43
|
+
account_manager: z.boolean(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const PlanSchema = z.object({
|
|
47
|
+
name: z.enum(['free', 'developer', 'pro', 'business']),
|
|
48
|
+
limits: PlanLimitsSchema,
|
|
49
|
+
prices: PlanPricesSchema,
|
|
50
|
+
features: PlanFeaturesSchema,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const PlansOutputSchema = z.array(PlanSchema);
|
|
54
|
+
|
|
13
55
|
export const CreateCheckoutInputSchema = z.object({
|
|
14
56
|
plan: z.enum(['developer', 'pro', 'business']),
|
|
15
57
|
interval: z.enum(['monthly', 'yearly']).default('monthly'),
|
package/src/index.ts
CHANGED
|
@@ -10,7 +10,13 @@ import {
|
|
|
10
10
|
CreateWorkspaceApiKeyInputSchema,
|
|
11
11
|
CreateWorkspaceApiKeyResponseSchema,
|
|
12
12
|
} from './api-keys.schema';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
BillingStatusSchema,
|
|
15
|
+
CheckoutSessionSchema,
|
|
16
|
+
CreateCheckoutInputSchema,
|
|
17
|
+
CustomerPortalSchema,
|
|
18
|
+
PlansOutputSchema,
|
|
19
|
+
} from './billing.schema';
|
|
14
20
|
import {
|
|
15
21
|
ApiKeyIdParamSchema,
|
|
16
22
|
DomainIdParamSchema,
|
|
@@ -285,6 +291,11 @@ export const domainsContract = {
|
|
|
285
291
|
|
|
286
292
|
// Billing contract
|
|
287
293
|
export const billingContract = {
|
|
294
|
+
plans: oc
|
|
295
|
+
.route({ method: 'GET', path: '/api/workspaces/{workspace_id}/billing/plans' })
|
|
296
|
+
.input(WorkspaceIdParamSchema)
|
|
297
|
+
.output(PlansOutputSchema),
|
|
298
|
+
|
|
288
299
|
status: oc
|
|
289
300
|
.route({ method: 'GET', path: '/api/workspaces/{workspace_id}/billing' })
|
|
290
301
|
.input(WorkspaceIdParamSchema)
|