@middlewr/contracts 0.0.12 → 0.0.14
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 +25 -0
- package/dist/cjs/billing.schema.d.ts.map +1 -0
- package/dist/cjs/index.d.ts +101 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +276 -231
- package/dist/cjs/workspaces.schema.d.ts +11 -0
- package/dist/cjs/workspaces.schema.d.ts.map +1 -1
- package/dist/esm/billing.schema.d.ts +25 -0
- package/dist/esm/billing.schema.d.ts.map +1 -0
- package/dist/esm/index.d.ts +101 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +271 -231
- package/dist/esm/workspaces.schema.d.ts +11 -0
- package/dist/esm/workspaces.schema.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/billing.schema.ts +25 -0
- package/src/index.ts +21 -0
- package/src/workspaces.schema.ts +6 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BillingStatusSchema: z.ZodObject<{
|
|
3
|
+
billing_plan: z.ZodString;
|
|
4
|
+
billing_status: z.ZodString;
|
|
5
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
6
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
7
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
8
|
+
billing_customer_id: z.ZodNullable<z.ZodString>;
|
|
9
|
+
billing_subscription_id: z.ZodNullable<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const CreateCheckoutInputSchema: z.ZodObject<{
|
|
12
|
+
plan: z.ZodEnum<{
|
|
13
|
+
pro: "pro";
|
|
14
|
+
business: "business";
|
|
15
|
+
}>;
|
|
16
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
billing_email: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const CheckoutSessionSchema: z.ZodObject<{
|
|
20
|
+
url: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const CustomerPortalSchema: z.ZodObject<{
|
|
23
|
+
url: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
//# sourceMappingURL=billing.schema.d.ts.map
|
|
@@ -0,0 +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;;;;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;iBAEhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ContractRouterClient } from '@orpc/contract';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export * from './analytics.schema';
|
|
4
4
|
export * from './api-keys.schema';
|
|
5
|
+
export * from './billing.schema';
|
|
5
6
|
export * from './common.schema';
|
|
6
7
|
export * from './domains.schema';
|
|
7
8
|
export * from './links.schema';
|
|
@@ -88,12 +89,22 @@ export declare const workspacesContract: {
|
|
|
88
89
|
}, z.core.$strip>, z.ZodObject<{
|
|
89
90
|
id: z.ZodString;
|
|
90
91
|
name: z.ZodString;
|
|
92
|
+
billing_plan: z.ZodString;
|
|
93
|
+
billing_status: z.ZodString;
|
|
94
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
95
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
96
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
91
97
|
created_at: z.ZodCoercedDate<unknown>;
|
|
92
98
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
93
99
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
94
100
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
95
101
|
id: z.ZodString;
|
|
96
102
|
name: z.ZodString;
|
|
103
|
+
billing_plan: z.ZodString;
|
|
104
|
+
billing_status: z.ZodString;
|
|
105
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
106
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
107
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
97
108
|
created_at: z.ZodCoercedDate<unknown>;
|
|
98
109
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
99
110
|
member_count: z.ZodNumber;
|
|
@@ -103,6 +114,11 @@ export declare const workspacesContract: {
|
|
|
103
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
104
115
|
id: z.ZodString;
|
|
105
116
|
name: z.ZodString;
|
|
117
|
+
billing_plan: z.ZodString;
|
|
118
|
+
billing_status: z.ZodString;
|
|
119
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
120
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
121
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
106
122
|
created_at: z.ZodCoercedDate<unknown>;
|
|
107
123
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
108
124
|
member_count: z.ZodNumber;
|
|
@@ -110,9 +126,15 @@ export declare const workspacesContract: {
|
|
|
110
126
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
111
127
|
workspace_id: z.ZodString;
|
|
112
128
|
name: z.ZodOptional<z.ZodString>;
|
|
129
|
+
billing_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
130
|
}, z.core.$strip>, z.ZodObject<{
|
|
114
131
|
id: z.ZodString;
|
|
115
132
|
name: z.ZodString;
|
|
133
|
+
billing_plan: z.ZodString;
|
|
134
|
+
billing_status: z.ZodString;
|
|
135
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
136
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
137
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
116
138
|
created_at: z.ZodCoercedDate<unknown>;
|
|
117
139
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
118
140
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -592,6 +614,35 @@ export declare const domainsContract: {
|
|
|
592
614
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
593
615
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
594
616
|
};
|
|
617
|
+
export declare const billingContract: {
|
|
618
|
+
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
619
|
+
workspace_id: z.ZodString;
|
|
620
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
621
|
+
billing_plan: z.ZodString;
|
|
622
|
+
billing_status: z.ZodString;
|
|
623
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
624
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
625
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
626
|
+
billing_customer_id: z.ZodNullable<z.ZodString>;
|
|
627
|
+
billing_subscription_id: z.ZodNullable<z.ZodString>;
|
|
628
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
629
|
+
checkout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
630
|
+
workspace_id: z.ZodString;
|
|
631
|
+
plan: z.ZodEnum<{
|
|
632
|
+
pro: "pro";
|
|
633
|
+
business: "business";
|
|
634
|
+
}>;
|
|
635
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
636
|
+
billing_email: z.ZodOptional<z.ZodString>;
|
|
637
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
638
|
+
url: z.ZodString;
|
|
639
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
640
|
+
portal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
641
|
+
workspace_id: z.ZodString;
|
|
642
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
643
|
+
url: z.ZodString;
|
|
644
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
645
|
+
};
|
|
595
646
|
export declare const contract: {
|
|
596
647
|
users: {
|
|
597
648
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
@@ -673,12 +724,22 @@ export declare const contract: {
|
|
|
673
724
|
}, z.core.$strip>, z.ZodObject<{
|
|
674
725
|
id: z.ZodString;
|
|
675
726
|
name: z.ZodString;
|
|
727
|
+
billing_plan: z.ZodString;
|
|
728
|
+
billing_status: z.ZodString;
|
|
729
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
730
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
731
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
676
732
|
created_at: z.ZodCoercedDate<unknown>;
|
|
677
733
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
678
734
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
679
735
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
680
736
|
id: z.ZodString;
|
|
681
737
|
name: z.ZodString;
|
|
738
|
+
billing_plan: z.ZodString;
|
|
739
|
+
billing_status: z.ZodString;
|
|
740
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
741
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
742
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
682
743
|
created_at: z.ZodCoercedDate<unknown>;
|
|
683
744
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
684
745
|
member_count: z.ZodNumber;
|
|
@@ -688,6 +749,11 @@ export declare const contract: {
|
|
|
688
749
|
}, z.core.$strip>, z.ZodObject<{
|
|
689
750
|
id: z.ZodString;
|
|
690
751
|
name: z.ZodString;
|
|
752
|
+
billing_plan: z.ZodString;
|
|
753
|
+
billing_status: z.ZodString;
|
|
754
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
755
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
756
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
691
757
|
created_at: z.ZodCoercedDate<unknown>;
|
|
692
758
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
693
759
|
member_count: z.ZodNumber;
|
|
@@ -695,9 +761,15 @@ export declare const contract: {
|
|
|
695
761
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
696
762
|
workspace_id: z.ZodString;
|
|
697
763
|
name: z.ZodOptional<z.ZodString>;
|
|
764
|
+
billing_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
698
765
|
}, z.core.$strip>, z.ZodObject<{
|
|
699
766
|
id: z.ZodString;
|
|
700
767
|
name: z.ZodString;
|
|
768
|
+
billing_plan: z.ZodString;
|
|
769
|
+
billing_status: z.ZodString;
|
|
770
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
771
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
772
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
701
773
|
created_at: z.ZodCoercedDate<unknown>;
|
|
702
774
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
703
775
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -1177,6 +1249,35 @@ export declare const contract: {
|
|
|
1177
1249
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
1178
1250
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1179
1251
|
};
|
|
1252
|
+
billing: {
|
|
1253
|
+
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1254
|
+
workspace_id: z.ZodString;
|
|
1255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1256
|
+
billing_plan: z.ZodString;
|
|
1257
|
+
billing_status: z.ZodString;
|
|
1258
|
+
billing_email: z.ZodNullable<z.ZodString>;
|
|
1259
|
+
billing_current_period_end: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
1260
|
+
billing_cancel_at_period_end: z.ZodBoolean;
|
|
1261
|
+
billing_customer_id: z.ZodNullable<z.ZodString>;
|
|
1262
|
+
billing_subscription_id: z.ZodNullable<z.ZodString>;
|
|
1263
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1264
|
+
checkout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1265
|
+
workspace_id: z.ZodString;
|
|
1266
|
+
plan: z.ZodEnum<{
|
|
1267
|
+
pro: "pro";
|
|
1268
|
+
business: "business";
|
|
1269
|
+
}>;
|
|
1270
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
billing_email: z.ZodOptional<z.ZodString>;
|
|
1272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1273
|
+
url: z.ZodString;
|
|
1274
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1275
|
+
portal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1276
|
+
workspace_id: z.ZodString;
|
|
1277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1278
|
+
url: z.ZodString;
|
|
1279
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1280
|
+
};
|
|
1180
1281
|
};
|
|
1181
1282
|
export type Contract = typeof contract;
|
|
1182
1283
|
export type Client = ContractRouterClient<Contract>;
|
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,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,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,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD9B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;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