@alpic-ai/api 0.0.0-staging.g8ef4354 → 0.0.0-staging.g8fe5ee0

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
@@ -30,9 +30,10 @@ declare const createEnvironmentContractV1: import("@orpc/contract").ContractProc
30
30
  urls: z.ZodArray<z.ZodURL>;
31
31
  createdAt: z.ZodCoercedDate<unknown>;
32
32
  projectId: z.ZodString;
33
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
34
- NOT_FOUND: {};
33
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
35
34
  BAD_REQUEST: {};
35
+ }>, {
36
+ NOT_FOUND: {};
36
37
  }>, Record<never, never>>;
37
38
  declare const contract: {
38
39
  teams: {
@@ -42,7 +43,29 @@ declare const contract: {
42
43
  name: z.ZodString;
43
44
  createdAt: z.ZodCoercedDate<unknown>;
44
45
  hasStripeAccount: z.ZodBoolean;
45
- }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
46
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
47
+ BAD_REQUEST: {};
48
+ }>, Record<never, never>>;
49
+ };
50
+ getUsage: {
51
+ v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
52
+ teamId: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ teamId: z.ZodString;
55
+ plan: z.ZodNullable<z.ZodEnum<{
56
+ pro: "pro";
57
+ business: "business";
58
+ enterprise: "enterprise";
59
+ }>>;
60
+ periodStart: z.ZodCoercedDate<unknown>;
61
+ periodEnd: z.ZodCoercedDate<unknown>;
62
+ requestCount: z.ZodNumber;
63
+ includedRequests: z.ZodNullable<z.ZodNumber>;
64
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
65
+ BAD_REQUEST: {};
66
+ }>, {
67
+ NOT_FOUND: {};
68
+ }>, Record<never, never>>;
46
69
  };
47
70
  };
48
71
  analytics: {
@@ -90,9 +113,10 @@ declare const contract: {
90
113
  categories: z.ZodRecord<z.ZodString, z.ZodUnknown>;
91
114
  }, z.core.$strip>>;
92
115
  }, z.core.$strip>;
93
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
94
- NOT_FOUND: {};
116
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
95
117
  BAD_REQUEST: {};
118
+ }>, {
119
+ NOT_FOUND: {};
96
120
  }>, Record<never, never>>;
97
121
  };
98
122
  };
@@ -126,7 +150,9 @@ declare const contract: {
126
150
  environmentName: z.ZodString;
127
151
  isCurrent: z.ZodBoolean;
128
152
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
129
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
153
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
154
+ BAD_REQUEST: {};
155
+ }>, {
130
156
  NOT_FOUND: {};
131
157
  }>, Record<never, never>>;
132
158
  };
@@ -152,7 +178,9 @@ declare const contract: {
152
178
  environmentName: z.ZodString;
153
179
  isCurrent: z.ZodBoolean;
154
180
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
155
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
181
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
182
+ BAD_REQUEST: {};
183
+ }>, {
156
184
  NOT_FOUND: {};
157
185
  }>, Record<never, never>>;
158
186
  };
@@ -163,9 +191,10 @@ declare const contract: {
163
191
  uploadUrl: z.ZodURL;
164
192
  token: z.ZodString;
165
193
  expiresAt: z.ZodCoercedDate<unknown>;
166
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
167
- NOT_FOUND: {};
194
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
168
195
  BAD_REQUEST: {};
196
+ }>, {
197
+ NOT_FOUND: {};
169
198
  }>, Record<never, never>>;
170
199
  };
171
200
  getLogs: {
@@ -177,7 +206,9 @@ declare const contract: {
177
206
  content: z.ZodOptional<z.ZodString>;
178
207
  }, z.core.$strip>>;
179
208
  hasMoreLogs: z.ZodBoolean;
180
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
209
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
210
+ BAD_REQUEST: {};
211
+ }>, {
181
212
  NOT_FOUND: {};
182
213
  }>, Record<never, never>>;
183
214
  };
@@ -200,9 +231,10 @@ declare const contract: {
200
231
  urls: z.ZodArray<z.ZodURL>;
201
232
  createdAt: z.ZodCoercedDate<unknown>;
202
233
  projectId: z.ZodString;
203
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
204
- NOT_FOUND: {};
234
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
205
235
  BAD_REQUEST: {};
236
+ }>, {
237
+ NOT_FOUND: {};
206
238
  }>, Record<never, never>>;
207
239
  };
208
240
  get: {
@@ -216,7 +248,9 @@ declare const contract: {
216
248
  domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
217
249
  createdAt: z.ZodCoercedDate<unknown>;
218
250
  projectId: z.ZodString;
219
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
251
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
252
+ BAD_REQUEST: {};
253
+ }>, {
220
254
  NOT_FOUND: {};
221
255
  }>, Record<never, never>>;
222
256
  };
@@ -254,9 +288,10 @@ declare const contract: {
254
288
  environmentName: z.ZodString;
255
289
  isCurrent: z.ZodBoolean;
256
290
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
257
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
258
- NOT_FOUND: {};
291
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
259
292
  BAD_REQUEST: {};
293
+ }>, {
294
+ NOT_FOUND: {};
260
295
  CONFLICT: {};
261
296
  }>, Record<never, never>>;
262
297
  };
@@ -291,9 +326,10 @@ declare const contract: {
291
326
  durationInMs: z.ZodOptional<z.ZodNumber>;
292
327
  }, z.core.$strip>>;
293
328
  nextToken: z.ZodNullable<z.ZodString>;
294
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
295
- NOT_FOUND: {};
329
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
296
330
  BAD_REQUEST: {};
331
+ }>, {
332
+ NOT_FOUND: {};
297
333
  }>, Record<never, never>>;
298
334
  };
299
335
  getLatestLogs: {
@@ -323,9 +359,10 @@ declare const contract: {
323
359
  method: z.ZodOptional<z.ZodString>;
324
360
  durationInMs: z.ZodOptional<z.ZodNumber>;
325
361
  }, z.core.$strip>>;
326
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
327
- NOT_FOUND: {};
362
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
328
363
  BAD_REQUEST: {};
364
+ }>, {
365
+ NOT_FOUND: {};
329
366
  }>, Record<never, never>>;
330
367
  };
331
368
  };
@@ -339,7 +376,9 @@ declare const contract: {
339
376
  value: z.ZodString;
340
377
  isSecret: z.ZodBoolean;
341
378
  createdAt: z.ZodCoercedDate<unknown>;
342
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
379
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
380
+ BAD_REQUEST: {};
381
+ }>, {
343
382
  NOT_FOUND: {};
344
383
  }>, Record<never, never>>;
345
384
  };
@@ -353,9 +392,10 @@ declare const contract: {
353
392
  }, z.core.$strip>>;
354
393
  }, z.core.$strip>, z.ZodObject<{
355
394
  success: z.ZodLiteral<true>;
356
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
357
- NOT_FOUND: {};
395
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
358
396
  BAD_REQUEST: {};
397
+ }>, {
398
+ NOT_FOUND: {};
359
399
  }>, Record<never, never>>;
360
400
  };
361
401
  update: {
@@ -366,9 +406,10 @@ declare const contract: {
366
406
  isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
367
407
  }, z.core.$strip>, z.ZodObject<{
368
408
  success: z.ZodLiteral<true>;
369
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
370
- NOT_FOUND: {};
409
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
371
410
  BAD_REQUEST: {};
411
+ }>, {
412
+ NOT_FOUND: {};
372
413
  }>, Record<never, never>>;
373
414
  };
374
415
  delete: {
@@ -376,9 +417,10 @@ declare const contract: {
376
417
  environmentVariableId: z.ZodString;
377
418
  }, z.core.$strip>, z.ZodObject<{
378
419
  success: z.ZodLiteral<true>;
379
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
380
- NOT_FOUND: {};
420
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
381
421
  BAD_REQUEST: {};
422
+ }>, {
423
+ NOT_FOUND: {};
382
424
  }>, Record<never, never>>;
383
425
  };
384
426
  };
@@ -456,9 +498,10 @@ declare const contract: {
456
498
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
457
499
  }, z.core.$strip>>;
458
500
  }, z.core.$strip>>;
459
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
460
- NOT_FOUND: {};
501
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
461
502
  BAD_REQUEST: {};
503
+ }>, {
504
+ NOT_FOUND: {};
462
505
  FORBIDDEN: {};
463
506
  }>, Record<never, never>>;
464
507
  };
@@ -533,7 +576,9 @@ declare const contract: {
533
576
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
534
577
  }, z.core.$strip>>;
535
578
  }, z.core.$strip>>;
536
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
579
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
580
+ BAD_REQUEST: {};
581
+ }>, {
537
582
  NOT_FOUND: {};
538
583
  }>, Record<never, never>>;
539
584
  };
@@ -608,9 +653,10 @@ declare const contract: {
608
653
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
609
654
  }, z.core.$strip>>;
610
655
  }, z.core.$strip>>;
611
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
612
- NOT_FOUND: {};
656
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
613
657
  BAD_REQUEST: {};
658
+ }>, {
659
+ NOT_FOUND: {};
614
660
  }>, Record<never, never>>;
615
661
  };
616
662
  create: {
@@ -672,9 +718,10 @@ declare const contract: {
672
718
  installCommand: z.ZodNullable<z.ZodString>;
673
719
  startCommand: z.ZodNullable<z.ZodString>;
674
720
  createdAt: z.ZodCoercedDate<unknown>;
675
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
676
- NOT_FOUND: {};
721
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
677
722
  BAD_REQUEST: {};
723
+ }>, {
724
+ NOT_FOUND: {};
678
725
  FORBIDDEN: {};
679
726
  }>, Record<never, never>>;
680
727
  };
@@ -683,7 +730,9 @@ declare const contract: {
683
730
  projectId: z.ZodString;
684
731
  }, z.core.$strip>, z.ZodObject<{
685
732
  success: z.ZodLiteral<true>;
686
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
733
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
734
+ BAD_REQUEST: {};
735
+ }>, {
687
736
  NOT_FOUND: {};
688
737
  }>, Record<never, never>>;
689
738
  };
@@ -708,7 +757,9 @@ declare const contract: {
708
757
  prompt: z.ZodString;
709
758
  }, z.core.$strip>>;
710
759
  }, z.core.$strip>>;
711
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
760
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
761
+ BAD_REQUEST: {};
762
+ }>, {
712
763
  NOT_FOUND: {};
713
764
  }>, Record<never, never>>;
714
765
  };
@@ -744,9 +795,10 @@ declare const contract: {
744
795
  prompt: z.ZodString;
745
796
  }, z.core.$strip>>;
746
797
  }, z.core.$strip>>;
747
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
748
- NOT_FOUND: {};
798
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
749
799
  BAD_REQUEST: {};
800
+ }>, {
801
+ NOT_FOUND: {};
750
802
  }>, Record<never, never>>;
751
803
  };
752
804
  };
@@ -756,7 +808,9 @@ declare const contract: {
756
808
  subdomain: z.ZodString;
757
809
  ticket: z.ZodString;
758
810
  tunnelHost: z.ZodString;
759
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
811
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
812
+ BAD_REQUEST: {};
813
+ }>, {
760
814
  FORBIDDEN: {};
761
815
  }>, Record<never, never>>;
762
816
  };
@@ -795,9 +849,10 @@ declare const contract: {
795
849
  }, z.core.$strip>>>;
796
850
  }, z.core.$strip>>>;
797
851
  }, z.core.$strip>;
798
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
799
- NOT_FOUND: {};
852
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
800
853
  BAD_REQUEST: {};
854
+ }>, {
855
+ NOT_FOUND: {};
801
856
  }>, Record<never, never>>;
802
857
  };
803
858
  get: {
@@ -828,9 +883,10 @@ declare const contract: {
828
883
  }, z.core.$strip>>>;
829
884
  }, z.core.$strip>>>;
830
885
  }, z.core.$strip>;
831
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
832
- NOT_FOUND: {};
886
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
833
887
  BAD_REQUEST: {};
888
+ }>, {
889
+ NOT_FOUND: {};
834
890
  }>, Record<never, never>>;
835
891
  };
836
892
  };
@@ -849,9 +905,10 @@ declare const contract: {
849
905
  }>>>;
850
906
  }, z.core.$strip>, z.ZodObject<{
851
907
  id: z.ZodString;
852
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
853
- NOT_FOUND: {};
908
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
854
909
  BAD_REQUEST: {};
910
+ }>, {
911
+ NOT_FOUND: {};
855
912
  DNS_RESOLUTION_FAILED: {
856
913
  status: number;
857
914
  };
@@ -942,7 +999,9 @@ declare const contract: {
942
999
  }, z.core.$strip>>;
943
1000
  }, z.core.$strip>;
944
1001
  }, z.core.$strip>>;
945
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1002
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1003
+ BAD_REQUEST: {};
1004
+ }>, {
946
1005
  NOT_FOUND: {};
947
1006
  }>, Record<never, never>>;
948
1007
  };
@@ -979,7 +1038,9 @@ declare const contractForDocs: {
979
1038
  environmentName: z.ZodString;
980
1039
  isCurrent: z.ZodBoolean;
981
1040
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
982
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1041
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1042
+ BAD_REQUEST: {};
1043
+ }>, {
983
1044
  NOT_FOUND: {};
984
1045
  }>, Record<never, never>>;
985
1046
  };
@@ -1005,7 +1066,9 @@ declare const contractForDocs: {
1005
1066
  environmentName: z.ZodString;
1006
1067
  isCurrent: z.ZodBoolean;
1007
1068
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
1008
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1069
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1070
+ BAD_REQUEST: {};
1071
+ }>, {
1009
1072
  NOT_FOUND: {};
1010
1073
  }>, Record<never, never>>;
1011
1074
  };
@@ -1018,7 +1081,9 @@ declare const contractForDocs: {
1018
1081
  content: z.ZodOptional<z.ZodString>;
1019
1082
  }, z.core.$strip>>;
1020
1083
  hasMoreLogs: z.ZodBoolean;
1021
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1084
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1085
+ BAD_REQUEST: {};
1086
+ }>, {
1022
1087
  NOT_FOUND: {};
1023
1088
  }>, Record<never, never>>;
1024
1089
  };
@@ -1030,7 +1095,29 @@ declare const contractForDocs: {
1030
1095
  name: z.ZodString;
1031
1096
  createdAt: z.ZodCoercedDate<unknown>;
1032
1097
  hasStripeAccount: z.ZodBoolean;
1033
- }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
1098
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1099
+ BAD_REQUEST: {};
1100
+ }>, Record<never, never>>;
1101
+ };
1102
+ getUsage: {
1103
+ v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1104
+ teamId: z.ZodString;
1105
+ }, z.core.$strip>, z.ZodObject<{
1106
+ teamId: z.ZodString;
1107
+ plan: z.ZodNullable<z.ZodEnum<{
1108
+ pro: "pro";
1109
+ business: "business";
1110
+ enterprise: "enterprise";
1111
+ }>>;
1112
+ periodStart: z.ZodCoercedDate<unknown>;
1113
+ periodEnd: z.ZodCoercedDate<unknown>;
1114
+ requestCount: z.ZodNumber;
1115
+ includedRequests: z.ZodNullable<z.ZodNumber>;
1116
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1117
+ BAD_REQUEST: {};
1118
+ }>, {
1119
+ NOT_FOUND: {};
1120
+ }>, Record<never, never>>;
1034
1121
  };
1035
1122
  };
1036
1123
  analytics: {
@@ -1078,9 +1165,10 @@ declare const contractForDocs: {
1078
1165
  categories: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1079
1166
  }, z.core.$strip>>;
1080
1167
  }, z.core.$strip>;
1081
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1082
- NOT_FOUND: {};
1168
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1083
1169
  BAD_REQUEST: {};
1170
+ }>, {
1171
+ NOT_FOUND: {};
1084
1172
  }>, Record<never, never>>;
1085
1173
  };
1086
1174
  };
@@ -1102,9 +1190,10 @@ declare const contractForDocs: {
1102
1190
  urls: z.ZodArray<z.ZodURL>;
1103
1191
  createdAt: z.ZodCoercedDate<unknown>;
1104
1192
  projectId: z.ZodString;
1105
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1106
- NOT_FOUND: {};
1193
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1107
1194
  BAD_REQUEST: {};
1195
+ }>, {
1196
+ NOT_FOUND: {};
1108
1197
  }>, Record<never, never>>;
1109
1198
  };
1110
1199
  get: {
@@ -1118,7 +1207,9 @@ declare const contractForDocs: {
1118
1207
  domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
1119
1208
  createdAt: z.ZodCoercedDate<unknown>;
1120
1209
  projectId: z.ZodString;
1121
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1210
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1211
+ BAD_REQUEST: {};
1212
+ }>, {
1122
1213
  NOT_FOUND: {};
1123
1214
  }>, Record<never, never>>;
1124
1215
  };
@@ -1156,9 +1247,10 @@ declare const contractForDocs: {
1156
1247
  environmentName: z.ZodString;
1157
1248
  isCurrent: z.ZodBoolean;
1158
1249
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
1159
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1160
- NOT_FOUND: {};
1250
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1161
1251
  BAD_REQUEST: {};
1252
+ }>, {
1253
+ NOT_FOUND: {};
1162
1254
  CONFLICT: {};
1163
1255
  }>, Record<never, never>>;
1164
1256
  };
@@ -1193,9 +1285,10 @@ declare const contractForDocs: {
1193
1285
  durationInMs: z.ZodOptional<z.ZodNumber>;
1194
1286
  }, z.core.$strip>>;
1195
1287
  nextToken: z.ZodNullable<z.ZodString>;
1196
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1197
- NOT_FOUND: {};
1288
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1198
1289
  BAD_REQUEST: {};
1290
+ }>, {
1291
+ NOT_FOUND: {};
1199
1292
  }>, Record<never, never>>;
1200
1293
  };
1201
1294
  getLatestLogs: {
@@ -1225,9 +1318,10 @@ declare const contractForDocs: {
1225
1318
  method: z.ZodOptional<z.ZodString>;
1226
1319
  durationInMs: z.ZodOptional<z.ZodNumber>;
1227
1320
  }, z.core.$strip>>;
1228
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1229
- NOT_FOUND: {};
1321
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1230
1322
  BAD_REQUEST: {};
1323
+ }>, {
1324
+ NOT_FOUND: {};
1231
1325
  }>, Record<never, never>>;
1232
1326
  };
1233
1327
  };
@@ -1241,7 +1335,9 @@ declare const contractForDocs: {
1241
1335
  value: z.ZodString;
1242
1336
  isSecret: z.ZodBoolean;
1243
1337
  createdAt: z.ZodCoercedDate<unknown>;
1244
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1338
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1339
+ BAD_REQUEST: {};
1340
+ }>, {
1245
1341
  NOT_FOUND: {};
1246
1342
  }>, Record<never, never>>;
1247
1343
  };
@@ -1255,9 +1351,10 @@ declare const contractForDocs: {
1255
1351
  }, z.core.$strip>>;
1256
1352
  }, z.core.$strip>, z.ZodObject<{
1257
1353
  success: z.ZodLiteral<true>;
1258
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1259
- NOT_FOUND: {};
1354
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1260
1355
  BAD_REQUEST: {};
1356
+ }>, {
1357
+ NOT_FOUND: {};
1261
1358
  }>, Record<never, never>>;
1262
1359
  };
1263
1360
  update: {
@@ -1268,9 +1365,10 @@ declare const contractForDocs: {
1268
1365
  isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1269
1366
  }, z.core.$strip>, z.ZodObject<{
1270
1367
  success: z.ZodLiteral<true>;
1271
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1272
- NOT_FOUND: {};
1368
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1273
1369
  BAD_REQUEST: {};
1370
+ }>, {
1371
+ NOT_FOUND: {};
1274
1372
  }>, Record<never, never>>;
1275
1373
  };
1276
1374
  delete: {
@@ -1278,9 +1376,10 @@ declare const contractForDocs: {
1278
1376
  environmentVariableId: z.ZodString;
1279
1377
  }, z.core.$strip>, z.ZodObject<{
1280
1378
  success: z.ZodLiteral<true>;
1281
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1282
- NOT_FOUND: {};
1379
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1283
1380
  BAD_REQUEST: {};
1381
+ }>, {
1382
+ NOT_FOUND: {};
1284
1383
  }>, Record<never, never>>;
1285
1384
  };
1286
1385
  };
@@ -1358,9 +1457,10 @@ declare const contractForDocs: {
1358
1457
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1359
1458
  }, z.core.$strip>>;
1360
1459
  }, z.core.$strip>>;
1361
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1362
- NOT_FOUND: {};
1460
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1363
1461
  BAD_REQUEST: {};
1462
+ }>, {
1463
+ NOT_FOUND: {};
1364
1464
  FORBIDDEN: {};
1365
1465
  }>, Record<never, never>>;
1366
1466
  };
@@ -1435,7 +1535,9 @@ declare const contractForDocs: {
1435
1535
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1436
1536
  }, z.core.$strip>>;
1437
1537
  }, z.core.$strip>>;
1438
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1538
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1539
+ BAD_REQUEST: {};
1540
+ }>, {
1439
1541
  NOT_FOUND: {};
1440
1542
  }>, Record<never, never>>;
1441
1543
  };
@@ -1510,9 +1612,10 @@ declare const contractForDocs: {
1510
1612
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1511
1613
  }, z.core.$strip>>;
1512
1614
  }, z.core.$strip>>;
1513
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1514
- NOT_FOUND: {};
1615
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1515
1616
  BAD_REQUEST: {};
1617
+ }>, {
1618
+ NOT_FOUND: {};
1516
1619
  }>, Record<never, never>>;
1517
1620
  };
1518
1621
  create: {
@@ -1574,9 +1677,10 @@ declare const contractForDocs: {
1574
1677
  installCommand: z.ZodNullable<z.ZodString>;
1575
1678
  startCommand: z.ZodNullable<z.ZodString>;
1576
1679
  createdAt: z.ZodCoercedDate<unknown>;
1577
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1578
- NOT_FOUND: {};
1680
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1579
1681
  BAD_REQUEST: {};
1682
+ }>, {
1683
+ NOT_FOUND: {};
1580
1684
  FORBIDDEN: {};
1581
1685
  }>, Record<never, never>>;
1582
1686
  };
@@ -1585,7 +1689,9 @@ declare const contractForDocs: {
1585
1689
  projectId: z.ZodString;
1586
1690
  }, z.core.$strip>, z.ZodObject<{
1587
1691
  success: z.ZodLiteral<true>;
1588
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1692
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1693
+ BAD_REQUEST: {};
1694
+ }>, {
1589
1695
  NOT_FOUND: {};
1590
1696
  }>, Record<never, never>>;
1591
1697
  };
@@ -1610,7 +1716,9 @@ declare const contractForDocs: {
1610
1716
  prompt: z.ZodString;
1611
1717
  }, z.core.$strip>>;
1612
1718
  }, z.core.$strip>>;
1613
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1719
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1720
+ BAD_REQUEST: {};
1721
+ }>, {
1614
1722
  NOT_FOUND: {};
1615
1723
  }>, Record<never, never>>;
1616
1724
  };
@@ -1646,9 +1754,10 @@ declare const contractForDocs: {
1646
1754
  prompt: z.ZodString;
1647
1755
  }, z.core.$strip>>;
1648
1756
  }, z.core.$strip>>;
1649
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1650
- NOT_FOUND: {};
1757
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1651
1758
  BAD_REQUEST: {};
1759
+ }>, {
1760
+ NOT_FOUND: {};
1652
1761
  }>, Record<never, never>>;
1653
1762
  };
1654
1763
  };
@@ -1658,7 +1767,9 @@ declare const contractForDocs: {
1658
1767
  subdomain: z.ZodString;
1659
1768
  ticket: z.ZodString;
1660
1769
  tunnelHost: z.ZodString;
1661
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1770
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1771
+ BAD_REQUEST: {};
1772
+ }>, {
1662
1773
  FORBIDDEN: {};
1663
1774
  }>, Record<never, never>>;
1664
1775
  };
@@ -1697,9 +1808,10 @@ declare const contractForDocs: {
1697
1808
  }, z.core.$strip>>>;
1698
1809
  }, z.core.$strip>>>;
1699
1810
  }, z.core.$strip>;
1700
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1701
- NOT_FOUND: {};
1811
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1702
1812
  BAD_REQUEST: {};
1813
+ }>, {
1814
+ NOT_FOUND: {};
1703
1815
  }>, Record<never, never>>;
1704
1816
  };
1705
1817
  get: {
@@ -1730,9 +1842,10 @@ declare const contractForDocs: {
1730
1842
  }, z.core.$strip>>>;
1731
1843
  }, z.core.$strip>>>;
1732
1844
  }, z.core.$strip>;
1733
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1734
- NOT_FOUND: {};
1845
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1735
1846
  BAD_REQUEST: {};
1847
+ }>, {
1848
+ NOT_FOUND: {};
1736
1849
  }>, Record<never, never>>;
1737
1850
  };
1738
1851
  };
@@ -1751,9 +1864,10 @@ declare const contractForDocs: {
1751
1864
  }>>>;
1752
1865
  }, z.core.$strip>, z.ZodObject<{
1753
1866
  id: z.ZodString;
1754
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1755
- NOT_FOUND: {};
1867
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1756
1868
  BAD_REQUEST: {};
1869
+ }>, {
1870
+ NOT_FOUND: {};
1757
1871
  DNS_RESOLUTION_FAILED: {
1758
1872
  status: number;
1759
1873
  };
@@ -1844,7 +1958,9 @@ declare const contractForDocs: {
1844
1958
  }, z.core.$strip>>;
1845
1959
  }, z.core.$strip>;
1846
1960
  }, z.core.$strip>>;
1847
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1961
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1962
+ BAD_REQUEST: {};
1963
+ }>, {
1848
1964
  NOT_FOUND: {};
1849
1965
  }>, Record<never, never>>;
1850
1966
  };
package/dist/index.mjs CHANGED
@@ -407,7 +407,8 @@ z.object({
407
407
  createdAt: z.coerce.date(),
408
408
  environmentId: z.string(),
409
409
  content: z.string(),
410
- source: z.enum(["model", "user"])
410
+ source: z.enum(["model", "user"]),
411
+ clientName: z.string().nullable()
411
412
  });
412
413
  z.object({
413
414
  content: z.string(),
@@ -443,6 +444,7 @@ z.object({
443
444
  environmentId: z.string(),
444
445
  toolName: z.string(),
445
446
  message: z.string(),
447
+ clientName: z.string().nullable(),
446
448
  categories: z.array(intentCategorySchema)
447
449
  });
448
450
  const signalCategorySchema = z.object({
@@ -1396,6 +1398,17 @@ const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
1396
1398
  });
1397
1399
  z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
1398
1400
  z.union([claudeSubmissionDraftSchema, chatgptSubmissionDraftSchema]);
1401
+ ({
1402
+ free: 1e4,
1403
+ pro: 2e5,
1404
+ business: 2e6,
1405
+ enterprise: null
1406
+ }).free;
1407
+ z.literal([
1408
+ 100,
1409
+ 75,
1410
+ 50
1411
+ ]);
1399
1412
  const subscriptionPlanSchema = z.enum([
1400
1413
  "pro",
1401
1414
  "business",
@@ -1413,6 +1426,7 @@ const customerUsageSchema = z.object({
1413
1426
  periodEnd: z.number()
1414
1427
  });
1415
1428
  const partnerDiscountSchema = z.object({ endsAt: z.number() });
1429
+ z.object({ balanceInNanoUSD: z.number() });
1416
1430
  z.object({
1417
1431
  customerCredits: customerCreditsSchema.nullable(),
1418
1432
  customerUsage: customerUsageSchema.nullable(),
@@ -1548,17 +1562,15 @@ const isValidLogTimeInput = (value) => {
1548
1562
  if (ms(value) !== void 0) return true;
1549
1563
  return !Number.isNaN(new Date(value).getTime());
1550
1564
  };
1551
- const createEnvironmentContractV1 = oc.route({
1565
+ const base = oc.errors({ BAD_REQUEST: {} });
1566
+ const createEnvironmentContractV1 = base.route({
1552
1567
  path: "/v1/environments",
1553
1568
  method: "POST",
1554
1569
  summary: "Create an environment",
1555
1570
  description: "Create an environment for a project",
1556
1571
  tags: ["environments"],
1557
1572
  successDescription: "The environment has been created successfully"
1558
- }).errors({
1559
- NOT_FOUND: {},
1560
- BAD_REQUEST: {}
1561
- }).input(z.object({
1573
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1562
1574
  projectId: z.string().describe("The ID of the project to create the environment for"),
1563
1575
  name: z.string().min(1).describe("The name of the environment"),
1564
1576
  sourceBranch: z.string().min(1).describe("The branch used to build the environment"),
@@ -1571,7 +1583,7 @@ const createEnvironmentContractV1 = oc.route({
1571
1583
  createdAt: z.coerce.date(),
1572
1584
  projectId: z.string().describe("The ID of the project the environment belongs to")
1573
1585
  }));
1574
- const getEnvironmentContractV1 = oc.route({
1586
+ const getEnvironmentContractV1 = base.route({
1575
1587
  path: "/v1/environments/{environmentId}",
1576
1588
  method: "GET",
1577
1589
  summary: "Get an environment",
@@ -1628,7 +1640,7 @@ const projectOutputSchema = z.object({
1628
1640
  productionEnvironment: productionEnvironmentSchema.nullable(),
1629
1641
  environments: z.array(environmentSchema)
1630
1642
  });
1631
- const getProjectContractV1 = oc.route({
1643
+ const getProjectContractV1 = base.route({
1632
1644
  path: "/v1/projects/{projectId}",
1633
1645
  method: "GET",
1634
1646
  summary: "Get a project",
@@ -1636,18 +1648,15 @@ const getProjectContractV1 = oc.route({
1636
1648
  tags: ["projects"],
1637
1649
  successDescription: "The project details"
1638
1650
  }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(projectOutputSchema);
1639
- const listProjectsContractV1 = oc.route({
1651
+ const listProjectsContractV1 = base.route({
1640
1652
  path: "/v1/projects",
1641
1653
  method: "GET",
1642
1654
  summary: "List projects",
1643
1655
  description: "List all projects for a team",
1644
1656
  tags: ["projects"],
1645
1657
  successDescription: "The list of projects"
1646
- }).errors({
1647
- NOT_FOUND: {},
1648
- BAD_REQUEST: {}
1649
- }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
1650
- const createProjectContractV1 = oc.route({
1658
+ }).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
1659
+ const createProjectContractV1 = base.route({
1651
1660
  path: "/v1/projects",
1652
1661
  method: "POST",
1653
1662
  summary: "Create a project",
@@ -1656,7 +1665,6 @@ const createProjectContractV1 = oc.route({
1656
1665
  successDescription: "The project has been created successfully"
1657
1666
  }).errors({
1658
1667
  NOT_FOUND: {},
1659
- BAD_REQUEST: {},
1660
1668
  FORBIDDEN: {}
1661
1669
  }).input(z.object({
1662
1670
  teamId: z.string().optional(),
@@ -1697,7 +1705,7 @@ const environmentVariableOutputSchema = z.object({
1697
1705
  isSecret: z.boolean(),
1698
1706
  createdAt: z.coerce.date()
1699
1707
  });
1700
- const listEnvironmentVariablesContractV1 = oc.route({
1708
+ const listEnvironmentVariablesContractV1 = base.route({
1701
1709
  path: "/v1/environments/{environmentId}/environment-variables",
1702
1710
  method: "GET",
1703
1711
  summary: "List environment variables",
@@ -1705,48 +1713,39 @@ const listEnvironmentVariablesContractV1 = oc.route({
1705
1713
  tags: ["environments"],
1706
1714
  successDescription: "The list of environment variables"
1707
1715
  }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(z.array(environmentVariableOutputSchema));
1708
- const createEnvironmentVariablesContractV1 = oc.route({
1716
+ const createEnvironmentVariablesContractV1 = base.route({
1709
1717
  path: "/v1/environments/{environmentId}/environment-variables",
1710
1718
  method: "POST",
1711
1719
  summary: "Add environment variables",
1712
1720
  description: "Add one or more environment variables to an environment",
1713
1721
  tags: ["environments"],
1714
1722
  successDescription: "The environment variables have been added successfully"
1715
- }).errors({
1716
- NOT_FOUND: {},
1717
- BAD_REQUEST: {}
1718
- }).input(z.object({
1723
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1719
1724
  environmentId: z.string().describe("The ID of the environment"),
1720
1725
  environmentVariables: environmentVariablesSchema
1721
1726
  })).output(z.object({ success: z.literal(true) }));
1722
- const updateEnvironmentVariableContractV1 = oc.route({
1727
+ const updateEnvironmentVariableContractV1 = base.route({
1723
1728
  path: "/v1/environment-variables/{environmentVariableId}",
1724
1729
  method: "PATCH",
1725
1730
  summary: "Update an environment variable",
1726
1731
  description: "Update an environment variable by ID",
1727
1732
  tags: ["environments"],
1728
1733
  successDescription: "The environment variable has been updated successfully"
1729
- }).errors({
1730
- NOT_FOUND: {},
1731
- BAD_REQUEST: {}
1732
- }).input(z.object({
1734
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1733
1735
  environmentVariableId: z.string().describe("The ID of the environment variable"),
1734
1736
  key: environmentVariableSchema.shape.key,
1735
1737
  value: environmentVariableSchema.shape.value.optional(),
1736
1738
  isSecret: environmentVariableSchema.shape.isSecret.optional()
1737
1739
  })).output(z.object({ success: z.literal(true) }));
1738
- const deleteEnvironmentVariableContractV1 = oc.route({
1740
+ const deleteEnvironmentVariableContractV1 = base.route({
1739
1741
  path: "/v1/environment-variables/{environmentVariableId}",
1740
1742
  method: "DELETE",
1741
1743
  summary: "Delete an environment variable",
1742
1744
  description: "Delete an environment variable by ID",
1743
1745
  tags: ["environments"],
1744
1746
  successDescription: "The environment variable has been deleted successfully"
1745
- }).errors({
1746
- NOT_FOUND: {},
1747
- BAD_REQUEST: {}
1748
- }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1749
- const deleteProjectContractV1 = oc.route({
1747
+ }).errors({ NOT_FOUND: {} }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1748
+ const deleteProjectContractV1 = base.route({
1750
1749
  path: "/v1/projects/{projectId}",
1751
1750
  method: "DELETE",
1752
1751
  summary: "Delete a project",
@@ -1754,7 +1753,7 @@ const deleteProjectContractV1 = oc.route({
1754
1753
  tags: ["projects"],
1755
1754
  successDescription: "The project has been deleted successfully"
1756
1755
  }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(z.object({ success: z.literal(true) }));
1757
- const updateProjectContractV1 = oc.route({
1756
+ const updateProjectContractV1 = base.route({
1758
1757
  path: "/v1/projects/{projectId}",
1759
1758
  method: "PATCH",
1760
1759
  summary: "Update a project",
@@ -1763,14 +1762,13 @@ const updateProjectContractV1 = oc.route({
1763
1762
  successDescription: "The project has been updated successfully"
1764
1763
  }).errors({
1765
1764
  NOT_FOUND: {},
1766
- BAD_REQUEST: {},
1767
1765
  FORBIDDEN: {}
1768
1766
  }).input(z.object({
1769
1767
  projectId: z.string().describe("The ID of the project"),
1770
1768
  name: z.string().min(1).max(100).optional().describe("The new name for the project"),
1771
1769
  sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
1772
1770
  })).output(projectOutputSchema);
1773
- const deployEnvironmentContractV1 = oc.route({
1771
+ const deployEnvironmentContractV1 = base.route({
1774
1772
  path: "/v1/environments/{environmentId}/deploy",
1775
1773
  method: "POST",
1776
1774
  summary: "Deploy an environment",
@@ -1779,29 +1777,25 @@ const deployEnvironmentContractV1 = oc.route({
1779
1777
  successDescription: "The environment has been deployed successfully"
1780
1778
  }).errors({
1781
1779
  NOT_FOUND: {},
1782
- BAD_REQUEST: {},
1783
1780
  CONFLICT: {}
1784
1781
  }).input(z.object({
1785
1782
  environmentId: z.string().describe("The ID of the environment to deploy"),
1786
1783
  token: z.string().describe("The token to identify the source archive").optional(),
1787
1784
  settings: buildSettingsSchema.extend({ transport: transportSchema }).optional().describe("Project settings detected by the client from the source. When provided, the server skips downloading and extracting the source archive to detect them.")
1788
1785
  })).output(deploymentSchema);
1789
- const uploadDeploymentArtifactContractV1 = oc.route({
1786
+ const uploadDeploymentArtifactContractV1 = base.route({
1790
1787
  path: "/v1/deployments/upload",
1791
1788
  method: "POST",
1792
1789
  summary: "Upload deployment artifacts",
1793
1790
  description: "Return a presigned S3 URL to upload a deployment artifact",
1794
1791
  tags: ["deployments"],
1795
1792
  successDescription: "The presigned upload URL has been generated successfully"
1796
- }).errors({
1797
- NOT_FOUND: {},
1798
- BAD_REQUEST: {}
1799
- }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
1793
+ }).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
1800
1794
  uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
1801
1795
  token: z.string().describe("Token to identify the source archive"),
1802
1796
  expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
1803
1797
  }));
1804
- const listDeploymentsContractV1 = oc.route({
1798
+ const listDeploymentsContractV1 = base.route({
1805
1799
  path: "/v1/projects/{projectId}/deployments",
1806
1800
  method: "GET",
1807
1801
  summary: "List project deployments",
@@ -1813,7 +1807,7 @@ const listDeploymentsContractV1 = oc.route({
1813
1807
  status: z.array(deploymentStatusSchema).optional().describe("Filter by one or more statuses"),
1814
1808
  environmentId: z.string().optional().describe("Filter by environment ID")
1815
1809
  })).output(z.array(deploymentSchema));
1816
- const getDeploymentContractV1 = oc.route({
1810
+ const getDeploymentContractV1 = base.route({
1817
1811
  path: "/v1/deployments/{deploymentId}",
1818
1812
  method: "GET",
1819
1813
  summary: "Get a deployment",
@@ -1836,17 +1830,14 @@ const logEntrySchema = z.object({
1836
1830
  method: z.string().optional(),
1837
1831
  durationInMs: z.number().optional()
1838
1832
  });
1839
- const getLogsContractV1 = oc.route({
1833
+ const getLogsContractV1 = base.route({
1840
1834
  path: "/v1/environments/{environmentId}/logs",
1841
1835
  method: "GET",
1842
1836
  summary: "Get logs",
1843
1837
  description: "Get logs for an environment",
1844
1838
  tags: ["environments"],
1845
1839
  successDescription: "The logs"
1846
- }).errors({
1847
- NOT_FOUND: {},
1848
- BAD_REQUEST: {}
1849
- }).input(z.object({
1840
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1850
1841
  environmentId: z.string().describe("The ID of the environment"),
1851
1842
  since: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("Start time — ISO 8601 (2024-01-01T00:00:00Z) or relative (1h, 30m, 2d)"),
1852
1843
  until: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("End time — ISO 8601 or relative"),
@@ -1863,17 +1854,14 @@ const getLogsContractV1 = oc.route({
1863
1854
  logs: z.array(logEntrySchema),
1864
1855
  nextToken: z.string().nullable()
1865
1856
  }));
1866
- const getLatestLogsContractV1 = oc.route({
1857
+ const getLatestLogsContractV1 = base.route({
1867
1858
  path: "/v1/environments/{environmentId}/latest-logs",
1868
1859
  method: "GET",
1869
1860
  summary: "Get latest logs",
1870
1861
  description: "Get the N most recent logs for an environment",
1871
1862
  tags: ["environments"],
1872
1863
  successDescription: "The latest logs"
1873
- }).errors({
1874
- NOT_FOUND: {},
1875
- BAD_REQUEST: {}
1876
- }).input(z.object({
1864
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1877
1865
  environmentId: z.string().describe("The ID of the environment"),
1878
1866
  limit: z.coerce.number().int().min(1).max(1e3).default(100).describe("Number of most recent log entries to return"),
1879
1867
  level: z.array(z.enum([
@@ -1884,7 +1872,7 @@ const getLatestLogsContractV1 = oc.route({
1884
1872
  ])).optional().describe("Filter by log level"),
1885
1873
  search: z.string().optional().describe("Filter pattern to search for in log content")
1886
1874
  })).output(z.object({ logs: z.array(logEntrySchema) }));
1887
- const getDeploymentLogsContractV1 = oc.route({
1875
+ const getDeploymentLogsContractV1 = base.route({
1888
1876
  path: "/v1/deployments/{deploymentId}/logs",
1889
1877
  method: "GET",
1890
1878
  summary: "Get deployment logs",
@@ -1911,17 +1899,14 @@ const analyticsTimeSeriesSchema = z.object({
1911
1899
  output_token_mean: z.array(analyticsDataPointSchema),
1912
1900
  task_count: z.array(analyticsDataPointSchema)
1913
1901
  });
1914
- const getProjectAnalyticsContractV1 = oc.route({
1902
+ const getProjectAnalyticsContractV1 = base.route({
1915
1903
  path: "/v1/analytics/{projectId}",
1916
1904
  method: "GET",
1917
1905
  summary: "Get project analytics",
1918
1906
  description: "Get analytics data for a project over a time range",
1919
1907
  tags: ["analytics"],
1920
1908
  successDescription: "The project analytics data"
1921
- }).errors({
1922
- NOT_FOUND: {},
1923
- BAD_REQUEST: {}
1924
- }).input(z.object({
1909
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1925
1910
  projectId: z.string().describe("The ID of the project"),
1926
1911
  startTimestamp: z.coerce.number().describe("Start timestamp in milliseconds"),
1927
1912
  endTimestamp: z.coerce.number().describe("End timestamp in milliseconds"),
@@ -1936,7 +1921,7 @@ const getProjectAnalyticsContractV1 = oc.route({
1936
1921
  }),
1937
1922
  timeSeries: analyticsTimeSeriesSchema
1938
1923
  }));
1939
- const listTeamsContractV1 = oc.route({
1924
+ const listTeamsContractV1 = base.route({
1940
1925
  path: "/v1/teams",
1941
1926
  method: "GET",
1942
1927
  summary: "List teams",
@@ -1949,7 +1934,22 @@ const listTeamsContractV1 = oc.route({
1949
1934
  createdAt: z.coerce.date(),
1950
1935
  hasStripeAccount: z.boolean()
1951
1936
  })));
1952
- const getTunnelTicketContractV1 = oc.route({
1937
+ const getTeamUsageContractV1 = base.route({
1938
+ path: "/v1/teams/{teamId}/usage",
1939
+ method: "GET",
1940
+ summary: "Get team usage",
1941
+ description: "Get the MCP request usage of a team for its current billing window. A team that has made no request in the window reports zero.",
1942
+ tags: ["teams"],
1943
+ successDescription: "The current billing window usage"
1944
+ }).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().describe("The ID of the team") })).output(z.object({
1945
+ teamId: z.string(),
1946
+ plan: subscriptionPlanSchema.nullable().describe("The plan in force for the window, null on the Free plan"),
1947
+ periodStart: z.coerce.date().describe("Start of the current billing window"),
1948
+ periodEnd: z.coerce.date().describe("End of the current billing window"),
1949
+ requestCount: z.number().int().describe("MCP requests settled during the current billing window"),
1950
+ includedRequests: z.number().int().nullable().describe("Requests included in the plan for one window, null when the allowance is contract-specific")
1951
+ }));
1952
+ const getTunnelTicketContractV1 = base.route({
1953
1953
  path: "/v1/tunnels/ticket",
1954
1954
  method: "GET",
1955
1955
  summary: "Get a tunnel ticket",
@@ -1961,16 +1961,13 @@ const getTunnelTicketContractV1 = oc.route({
1961
1961
  ticket: z.string().describe("The signed tunnel ticket"),
1962
1962
  tunnelHost: z.string().describe("The tunnel host to connect to")
1963
1963
  }));
1964
- const publishServerContractV1 = oc.route({
1964
+ const publishServerContractV1 = base.route({
1965
1965
  path: "/v1/distribution/publish",
1966
1966
  method: "POST",
1967
1967
  summary: "Publish a server to the MCP registry",
1968
1968
  tags: ["distribution"],
1969
1969
  successDescription: "The server has been published successfully"
1970
- }).errors({
1971
- NOT_FOUND: {},
1972
- BAD_REQUEST: {}
1973
- }).input(z.object({
1970
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1974
1971
  projectId: z.string(),
1975
1972
  domain: z.string(),
1976
1973
  title: z.string().min(1).max(100),
@@ -1979,17 +1976,14 @@ const publishServerContractV1 = oc.route({
1979
1976
  iconSrc: z.url().max(255).optional(),
1980
1977
  dryRun: z.boolean().optional()
1981
1978
  })).output(z.object({ serverFields: serverFieldsSchema }));
1982
- const getServerInfoContractV1 = oc.route({
1979
+ const getServerInfoContractV1 = base.route({
1983
1980
  path: "/v1/distribution/get",
1984
1981
  method: "GET",
1985
1982
  summary: "Get server info",
1986
1983
  description: "Get info about a server",
1987
1984
  tags: ["distribution"],
1988
1985
  successDescription: "The server info"
1989
- }).errors({
1990
- NOT_FOUND: {},
1991
- BAD_REQUEST: {}
1992
- }).input(z.object({
1986
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1993
1987
  projectId: z.string(),
1994
1988
  domain: z.string()
1995
1989
  })).output(z.object({ serverFields: serverFieldsSchema }));
@@ -2008,7 +2002,7 @@ const playgroundOutputSchema = z.object({
2008
2002
  isPlaygroundEnabled: z.boolean(),
2009
2003
  serverMetadata: playgroundServerMetadataOutputSchema.nullable()
2010
2004
  });
2011
- const getPlaygroundContractV1 = oc.route({
2005
+ const getPlaygroundContractV1 = base.route({
2012
2006
  path: "/v1/environments/{environmentId}/playground",
2013
2007
  method: "GET",
2014
2008
  summary: "Get playground configuration",
@@ -2016,17 +2010,14 @@ const getPlaygroundContractV1 = oc.route({
2016
2010
  tags: ["environments"],
2017
2011
  successDescription: "The playground configuration"
2018
2012
  }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(playgroundOutputSchema);
2019
- const upsertPlaygroundContractV1 = oc.route({
2013
+ const upsertPlaygroundContractV1 = base.route({
2020
2014
  path: "/v1/environments/{environmentId}/playground",
2021
2015
  method: "PUT",
2022
2016
  summary: "Update playground configuration",
2023
2017
  description: "Update the playground configuration for an environment. All fields are optional — only provided fields are updated.",
2024
2018
  tags: ["environments"],
2025
2019
  successDescription: "The updated playground configuration"
2026
- }).errors({
2027
- NOT_FOUND: {},
2028
- BAD_REQUEST: {}
2029
- }).input(z.object({
2020
+ }).errors({ NOT_FOUND: {} }).input(z.object({
2030
2021
  environmentId: z.string().describe("The ID of the environment"),
2031
2022
  isPlaygroundEnabled: z.boolean().optional(),
2032
2023
  name: z.string().min(1).max(100).optional(),
@@ -2034,7 +2025,7 @@ const upsertPlaygroundContractV1 = oc.route({
2034
2025
  headers: z.array(playgroundHeaderSchema).optional(),
2035
2026
  examplePrompts: z.array(playgroundExamplePromptSchema).max(5).optional()
2036
2027
  })).output(playgroundOutputSchema);
2037
- const createBeaconContractV1 = oc.route({
2028
+ const createBeaconContractV1 = base.route({
2038
2029
  path: "/v1/beacon/audits",
2039
2030
  method: "POST",
2040
2031
  summary: "Create a beacon audit",
@@ -2043,7 +2034,6 @@ const createBeaconContractV1 = oc.route({
2043
2034
  successDescription: "The audit has been created"
2044
2035
  }).errors({
2045
2036
  NOT_FOUND: {},
2046
- BAD_REQUEST: {},
2047
2037
  DNS_RESOLUTION_FAILED: { status: 400 }
2048
2038
  }).input(z.object({
2049
2039
  targetUrl: z.url().describe("The HTTPS URL of the MCP server to audit"),
@@ -2051,7 +2041,7 @@ const createBeaconContractV1 = oc.route({
2051
2041
  projectId: z.string().optional().describe("The project ID to associate the audit with"),
2052
2042
  excludeCategories: z.array(checkCategorySchema).optional().describe("Check categories to exclude from the audit")
2053
2043
  })).output(z.object({ id: z.string() }));
2054
- const getBeaconContractV1 = oc.route({
2044
+ const getBeaconContractV1 = base.route({
2055
2045
  path: "/v1/beacon/audits/{auditId}",
2056
2046
  method: "GET",
2057
2047
  summary: "Get a beacon audit",
@@ -2067,7 +2057,10 @@ const getBeaconContractV1 = oc.route({
2067
2057
  report: auditReportWithScreenshotsSchema.nullable()
2068
2058
  }));
2069
2059
  const contract = {
2070
- teams: { list: { v1: listTeamsContractV1 } },
2060
+ teams: {
2061
+ list: { v1: listTeamsContractV1 },
2062
+ getUsage: { v1: getTeamUsageContractV1 }
2063
+ },
2071
2064
  analytics: { get: { v1: getProjectAnalyticsContractV1 } },
2072
2065
  deployments: {
2073
2066
  list: { v1: listDeploymentsContractV1 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.g8ef4354",
3
+ "version": "0.0.0-staging.g8fe5ee0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -33,13 +33,13 @@
33
33
  "author": "Alpic",
34
34
  "license": "ISC",
35
35
  "dependencies": {
36
- "@orpc/contract": "^1.14.13",
36
+ "@orpc/contract": "^1.15.0",
37
37
  "ms": "^2.1.3",
38
38
  "zod": "^4.4.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@orpc/openapi": "^1.14.13",
42
- "@orpc/zod": "^1.14.13",
41
+ "@orpc/openapi": "^1.15.0",
42
+ "@orpc/zod": "^1.15.0",
43
43
  "@total-typescript/tsconfig": "^1.0.4",
44
44
  "@types/ms": "^2.1.0",
45
45
  "shx": "^0.4.0",