@camox/api-contract 0.38.0 → 0.40.0

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.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import { ModelMessage, UIMessage } from '@tanstack/ai';
4
-
5
3
  declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Database<{
6
4
  projects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
7
5
  name: "projects";
@@ -3253,6 +3251,28 @@ declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Dat
3253
3251
  }, {}, {
3254
3252
  length: undefined;
3255
3253
  }>;
3254
+ teamId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3255
+ name: "teamId";
3256
+ tableName: "invitation";
3257
+ dataType: "string";
3258
+ columnType: "SQLiteText";
3259
+ data: string;
3260
+ driverParam: string;
3261
+ notNull: false;
3262
+ hasDefault: false;
3263
+ isPrimaryKey: false;
3264
+ isAutoincrement: false;
3265
+ hasRuntimeDefault: false;
3266
+ enumValues: [
3267
+ string,
3268
+ ...string[]
3269
+ ];
3270
+ baseColumn: never;
3271
+ identity: undefined;
3272
+ generated: undefined;
3273
+ }, {}, {
3274
+ length: undefined;
3275
+ }>;
3256
3276
  expiresAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3257
3277
  name: "expiresAt";
3258
3278
  tableName: "invitation";
@@ -3270,6 +3290,23 @@ declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Dat
3270
3290
  identity: undefined;
3271
3291
  generated: undefined;
3272
3292
  }, {}, {}>;
3293
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3294
+ name: "createdAt";
3295
+ tableName: "invitation";
3296
+ dataType: "date";
3297
+ columnType: "SQLiteTimestamp";
3298
+ data: Date;
3299
+ driverParam: number;
3300
+ notNull: true;
3301
+ hasDefault: false;
3302
+ isPrimaryKey: false;
3303
+ isAutoincrement: false;
3304
+ hasRuntimeDefault: false;
3305
+ enumValues: undefined;
3306
+ baseColumn: never;
3307
+ identity: undefined;
3308
+ generated: undefined;
3309
+ }, {}, {}>;
3273
3310
  inviterId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3274
3311
  name: "inviterId";
3275
3312
  tableName: "invitation";
@@ -3307,18 +3344,35 @@ export type Bindings = {
3307
3344
  GOOGLE_CLIENT_ID: string;
3308
3345
  GOOGLE_CLIENT_SECRET: string;
3309
3346
  DASHBOARD_URL: string;
3347
+ EMAIL: SendEmail;
3310
3348
  OPEN_ROUTER_API_KEY: string;
3311
3349
  AI_JOB_SCHEDULER: DurableObjectNamespace;
3312
3350
  ProjectRoom: DurableObjectNamespace;
3313
3351
  FILES_BUCKET: R2Bucket;
3314
3352
  };
3315
- declare function createAuth(db: Database, env: Bindings, baseURL: string): import("better-auth").Auth<{
3353
+ declare function createAuth(db: Database, env: Bindings, baseURL: string, waitUntil?: (promise: Promise<unknown>) => void): import("better-auth").Auth<{
3316
3354
  database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
3317
3355
  baseURL: string;
3318
3356
  secret: string;
3357
+ emailVerification: {
3358
+ sendOnSignUp: true;
3359
+ sendOnSignIn: true;
3360
+ autoSignInAfterVerification: true;
3361
+ sendVerificationEmail: ({ user, url }: {
3362
+ user: import("better-auth").User;
3363
+ url: string;
3364
+ token: string;
3365
+ }) => Promise<void>;
3366
+ };
3319
3367
  emailAndPassword: {
3320
3368
  enabled: true;
3321
- requireEmailVerification: false;
3369
+ requireEmailVerification: true;
3370
+ revokeSessionsOnPasswordReset: true;
3371
+ sendResetPassword: ({ user, url }: {
3372
+ user: import("better-auth").User;
3373
+ url: string;
3374
+ token: string;
3375
+ }) => Promise<void>;
3322
3376
  };
3323
3377
  socialProviders: {
3324
3378
  github: {
@@ -3343,192 +3397,23 @@ declare function createAuth(db: Database, env: Bindings, baseURL: string): impor
3343
3397
  enabled: false;
3344
3398
  domain?: undefined;
3345
3399
  };
3400
+ backgroundTasks?: {
3401
+ handler: (promise: Promise<unknown>) => void;
3402
+ } | undefined;
3346
3403
  };
3347
3404
  plugins: [
3348
- {
3349
- id: "organization";
3350
- version: string;
3351
- endpoints: import("better-auth/plugins").OrganizationEndpoints<import("better-auth/plugins").OrganizationOptions & {
3352
- teams: {
3353
- enabled: true;
3354
- };
3355
- dynamicAccessControl?: {
3356
- enabled?: false | undefined;
3357
- } | undefined;
3358
- }> & import("better-auth/plugins").TeamEndpoints<import("better-auth/plugins").OrganizationOptions & {
3359
- teams: {
3360
- enabled: true;
3361
- };
3362
- dynamicAccessControl?: {
3363
- enabled?: false | undefined;
3364
- } | undefined;
3365
- }>;
3366
- schema: import("better-auth/plugins").OrganizationSchema<import("better-auth/plugins").OrganizationOptions & {
3367
- teams: {
3368
- enabled: true;
3369
- };
3370
- dynamicAccessControl?: {
3371
- enabled?: false | undefined;
3372
- } | undefined;
3373
- }>;
3374
- $Infer: {
3375
- Organization: {
3376
- id: string;
3377
- name: string;
3378
- slug: string;
3379
- createdAt: Date;
3380
- logo?: string | null | undefined;
3381
- metadata?: any;
3382
- };
3383
- Invitation: {
3384
- id: string;
3385
- organizationId: string;
3386
- email: string;
3387
- role: "member" | "admin" | "owner";
3388
- status: import("better-auth/plugins").InvitationStatus;
3389
- inviterId: string;
3390
- expiresAt: Date;
3391
- createdAt: Date;
3392
- teamId?: string | undefined | undefined;
3393
- };
3394
- Member: {
3395
- id: string;
3396
- organizationId: string;
3397
- role: "member" | "admin" | "owner";
3398
- createdAt: Date;
3399
- userId: string;
3400
- teamId?: string | undefined | undefined;
3401
- user: {
3402
- id: string;
3403
- email: string;
3404
- name: string;
3405
- image?: string | undefined;
3406
- };
3407
- };
3408
- Team: {
3409
- id: string;
3410
- name: string;
3411
- organizationId: string;
3412
- createdAt: Date;
3413
- updatedAt?: Date | undefined;
3414
- };
3415
- TeamMember: {
3416
- id: string;
3417
- teamId: string;
3418
- userId: string;
3419
- createdAt: Date;
3420
- };
3421
- ActiveOrganization: {
3422
- members: {
3423
- id: string;
3424
- organizationId: string;
3425
- role: "member" | "admin" | "owner";
3426
- createdAt: Date;
3427
- userId: string;
3428
- teamId?: string | undefined | undefined;
3429
- user: {
3430
- id: string;
3431
- email: string;
3432
- name: string;
3433
- image?: string | undefined;
3434
- };
3435
- }[];
3436
- invitations: {
3437
- id: string;
3438
- organizationId: string;
3439
- email: string;
3440
- role: "member" | "admin" | "owner";
3441
- status: import("better-auth/plugins").InvitationStatus;
3442
- inviterId: string;
3443
- expiresAt: Date;
3444
- createdAt: Date;
3445
- teamId?: string | undefined | undefined;
3446
- }[];
3447
- teams: {
3448
- id: string;
3449
- name: string;
3450
- organizationId: string;
3451
- createdAt: Date;
3452
- updatedAt?: Date | undefined;
3453
- }[];
3454
- } & {
3455
- id: string;
3456
- name: string;
3457
- slug: string;
3458
- createdAt: Date;
3459
- logo?: string | null | undefined;
3460
- metadata?: any;
3461
- };
3462
- };
3463
- $ERROR_CODES: {
3464
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
3465
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
3466
- ORGANIZATION_ALREADY_EXISTS: import("better-auth").RawError<"ORGANIZATION_ALREADY_EXISTS">;
3467
- ORGANIZATION_SLUG_ALREADY_TAKEN: import("better-auth").RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
3468
- ORGANIZATION_NOT_FOUND: import("better-auth").RawError<"ORGANIZATION_NOT_FOUND">;
3469
- USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
3470
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
3471
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
3472
- NO_ACTIVE_ORGANIZATION: import("better-auth").RawError<"NO_ACTIVE_ORGANIZATION">;
3473
- USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
3474
- MEMBER_NOT_FOUND: import("better-auth").RawError<"MEMBER_NOT_FOUND">;
3475
- ROLE_NOT_FOUND: import("better-auth").RawError<"ROLE_NOT_FOUND">;
3476
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
3477
- TEAM_ALREADY_EXISTS: import("better-auth").RawError<"TEAM_ALREADY_EXISTS">;
3478
- TEAM_NOT_FOUND: import("better-auth").RawError<"TEAM_NOT_FOUND">;
3479
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
3480
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
3481
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
3482
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
3483
- USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
3484
- INVITATION_NOT_FOUND: import("better-auth").RawError<"INVITATION_NOT_FOUND">;
3485
- YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
3486
- EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: import("better-auth").RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
3487
- EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION: import("better-auth").RawError<"EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION">;
3488
- YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
3489
- INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
3490
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
3491
- FAILED_TO_RETRIEVE_INVITATION: import("better-auth").RawError<"FAILED_TO_RETRIEVE_INVITATION">;
3492
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
3493
- UNABLE_TO_REMOVE_LAST_TEAM: import("better-auth").RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
3494
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
3495
- ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: import("better-auth").RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
3496
- YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
3497
- YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
3498
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
3499
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
3500
- INVITATION_LIMIT_REACHED: import("better-auth").RawError<"INVITATION_LIMIT_REACHED">;
3501
- TEAM_MEMBER_LIMIT_REACHED: import("better-auth").RawError<"TEAM_MEMBER_LIMIT_REACHED">;
3502
- USER_IS_NOT_A_MEMBER_OF_THE_TEAM: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
3503
- YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: import("better-auth").RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
3504
- YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: import("better-auth").RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
3505
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
3506
- YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
3507
- YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
3508
- YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
3509
- MISSING_AC_INSTANCE: import("better-auth").RawError<"MISSING_AC_INSTANCE">;
3510
- YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
3511
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
3512
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
3513
- YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
3514
- YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
3515
- YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
3516
- YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
3517
- TOO_MANY_ROLES: import("better-auth").RawError<"TOO_MANY_ROLES">;
3518
- INVALID_RESOURCE: import("better-auth").RawError<"INVALID_RESOURCE">;
3519
- ROLE_NAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
3520
- CANNOT_DELETE_A_PRE_DEFINED_ROLE: import("better-auth").RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
3521
- ROLE_IS_ASSIGNED_TO_MEMBERS: import("better-auth").RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
3522
- };
3523
- options: NoInfer<import("better-auth/plugins").OrganizationOptions & {
3524
- teams: {
3525
- enabled: true;
3405
+ import("better-auth/plugins").DefaultOrganizationPlugin<{
3406
+ sendInvitationEmail: ({ email, id, inviter, organization }: {
3407
+ id: string;
3408
+ role: string;
3409
+ email: string;
3410
+ organization: import("better-auth/plugins").Organization;
3411
+ invitation: import("better-auth/plugins").Invitation;
3412
+ inviter: import("better-auth/plugins").Member & {
3413
+ user: import("better-auth").User;
3526
3414
  };
3527
- dynamicAccessControl?: {
3528
- enabled?: false | undefined;
3529
- } | undefined;
3530
- }>;
3531
- },
3415
+ }) => Promise<void>;
3416
+ }>,
3532
3417
  {
3533
3418
  id: "cross-domain";
3534
3419
  init(): {
@@ -3869,7 +3754,6 @@ declare const router: {
3869
3754
  ipAddress?: string | null | undefined;
3870
3755
  userAgent?: string | null | undefined;
3871
3756
  activeOrganizationId?: string | null | undefined;
3872
- activeTeamId?: string | null | undefined;
3873
3757
  };
3874
3758
  env: Bindings;
3875
3759
  headers: Headers;
@@ -3917,7 +3801,6 @@ declare const router: {
3917
3801
  ipAddress?: string | null | undefined;
3918
3802
  userAgent?: string | null | undefined;
3919
3803
  activeOrganizationId?: string | null | undefined;
3920
- activeTeamId?: string | null | undefined;
3921
3804
  };
3922
3805
  env: Bindings;
3923
3806
  headers: Headers;
@@ -3965,7 +3848,6 @@ declare const router: {
3965
3848
  ipAddress?: string | null | undefined;
3966
3849
  userAgent?: string | null | undefined;
3967
3850
  activeOrganizationId?: string | null | undefined;
3968
- activeTeamId?: string | null | undefined;
3969
3851
  };
3970
3852
  env: Bindings;
3971
3853
  headers: Headers;
@@ -4015,7 +3897,6 @@ declare const router: {
4015
3897
  ipAddress?: string | null | undefined;
4016
3898
  userAgent?: string | null | undefined;
4017
3899
  activeOrganizationId?: string | null | undefined;
4018
- activeTeamId?: string | null | undefined;
4019
3900
  };
4020
3901
  env: Bindings;
4021
3902
  headers: Headers;
@@ -4065,7 +3946,6 @@ declare const router: {
4065
3946
  ipAddress?: string | null | undefined;
4066
3947
  userAgent?: string | null | undefined;
4067
3948
  activeOrganizationId?: string | null | undefined;
4068
- activeTeamId?: string | null | undefined;
4069
3949
  };
4070
3950
  env: Bindings;
4071
3951
  headers: Headers;
@@ -4101,7 +3981,6 @@ declare const router: {
4101
3981
  ipAddress?: string | null | undefined;
4102
3982
  userAgent?: string | null | undefined;
4103
3983
  activeOrganizationId?: string | null | undefined;
4104
- activeTeamId?: string | null | undefined;
4105
3984
  };
4106
3985
  env: Bindings;
4107
3986
  headers: Headers;
@@ -4151,7 +4030,6 @@ declare const router: {
4151
4030
  ipAddress?: string | null | undefined;
4152
4031
  userAgent?: string | null | undefined;
4153
4032
  activeOrganizationId?: string | null | undefined;
4154
- activeTeamId?: string | null | undefined;
4155
4033
  };
4156
4034
  env: Bindings;
4157
4035
  headers: Headers;
@@ -4200,7 +4078,6 @@ declare const router: {
4200
4078
  ipAddress?: string | null | undefined;
4201
4079
  userAgent?: string | null | undefined;
4202
4080
  activeOrganizationId?: string | null | undefined;
4203
- activeTeamId?: string | null | undefined;
4204
4081
  };
4205
4082
  env: Bindings;
4206
4083
  headers: Headers;
@@ -4702,7 +4579,6 @@ declare const router: {
4702
4579
  ipAddress?: string | null | undefined;
4703
4580
  userAgent?: string | null | undefined;
4704
4581
  activeOrganizationId?: string | null | undefined;
4705
- activeTeamId?: string | null | undefined;
4706
4582
  };
4707
4583
  env: Bindings;
4708
4584
  headers: Headers;
@@ -4782,7 +4658,6 @@ declare const router: {
4782
4658
  ipAddress?: string | null | undefined;
4783
4659
  userAgent?: string | null | undefined;
4784
4660
  activeOrganizationId?: string | null | undefined;
4785
- activeTeamId?: string | null | undefined;
4786
4661
  };
4787
4662
  env: Bindings;
4788
4663
  headers: Headers;
@@ -4855,7 +4730,6 @@ declare const router: {
4855
4730
  ipAddress?: string | null | undefined;
4856
4731
  userAgent?: string | null | undefined;
4857
4732
  activeOrganizationId?: string | null | undefined;
4858
- activeTeamId?: string | null | undefined;
4859
4733
  };
4860
4734
  env: Bindings;
4861
4735
  headers: Headers;
@@ -4925,7 +4799,6 @@ declare const router: {
4925
4799
  ipAddress?: string | null | undefined;
4926
4800
  userAgent?: string | null | undefined;
4927
4801
  activeOrganizationId?: string | null | undefined;
4928
- activeTeamId?: string | null | undefined;
4929
4802
  };
4930
4803
  env: Bindings;
4931
4804
  headers: Headers;
@@ -4996,7 +4869,6 @@ declare const router: {
4996
4869
  ipAddress?: string | null | undefined;
4997
4870
  userAgent?: string | null | undefined;
4998
4871
  activeOrganizationId?: string | null | undefined;
4999
- activeTeamId?: string | null | undefined;
5000
4872
  };
5001
4873
  env: Bindings;
5002
4874
  headers: Headers;
@@ -5067,7 +4939,6 @@ declare const router: {
5067
4939
  ipAddress?: string | null | undefined;
5068
4940
  userAgent?: string | null | undefined;
5069
4941
  activeOrganizationId?: string | null | undefined;
5070
- activeTeamId?: string | null | undefined;
5071
4942
  };
5072
4943
  env: Bindings;
5073
4944
  headers: Headers;
@@ -5138,7 +5009,6 @@ declare const router: {
5138
5009
  ipAddress?: string | null | undefined;
5139
5010
  userAgent?: string | null | undefined;
5140
5011
  activeOrganizationId?: string | null | undefined;
5141
- activeTeamId?: string | null | undefined;
5142
5012
  };
5143
5013
  env: Bindings;
5144
5014
  headers: Headers;
@@ -5209,7 +5079,6 @@ declare const router: {
5209
5079
  ipAddress?: string | null | undefined;
5210
5080
  userAgent?: string | null | undefined;
5211
5081
  activeOrganizationId?: string | null | undefined;
5212
- activeTeamId?: string | null | undefined;
5213
5082
  };
5214
5083
  env: Bindings;
5215
5084
  headers: Headers;
@@ -5279,7 +5148,6 @@ declare const router: {
5279
5148
  ipAddress?: string | null | undefined;
5280
5149
  userAgent?: string | null | undefined;
5281
5150
  activeOrganizationId?: string | null | undefined;
5282
- activeTeamId?: string | null | undefined;
5283
5151
  };
5284
5152
  env: Bindings;
5285
5153
  headers: Headers;
@@ -5350,7 +5218,6 @@ declare const router: {
5350
5218
  ipAddress?: string | null | undefined;
5351
5219
  userAgent?: string | null | undefined;
5352
5220
  activeOrganizationId?: string | null | undefined;
5353
- activeTeamId?: string | null | undefined;
5354
5221
  };
5355
5222
  env: Bindings;
5356
5223
  headers: Headers;
@@ -5420,7 +5287,6 @@ declare const router: {
5420
5287
  ipAddress?: string | null | undefined;
5421
5288
  userAgent?: string | null | undefined;
5422
5289
  activeOrganizationId?: string | null | undefined;
5423
- activeTeamId?: string | null | undefined;
5424
5290
  };
5425
5291
  env: Bindings;
5426
5292
  headers: Headers;
@@ -5621,7 +5487,6 @@ declare const router: {
5621
5487
  ipAddress?: string | null | undefined;
5622
5488
  userAgent?: string | null | undefined;
5623
5489
  activeOrganizationId?: string | null | undefined;
5624
- activeTeamId?: string | null | undefined;
5625
5490
  };
5626
5491
  env: Bindings;
5627
5492
  headers: Headers;
@@ -5689,7 +5554,6 @@ declare const router: {
5689
5554
  ipAddress?: string | null | undefined;
5690
5555
  userAgent?: string | null | undefined;
5691
5556
  activeOrganizationId?: string | null | undefined;
5692
- activeTeamId?: string | null | undefined;
5693
5557
  };
5694
5558
  env: Bindings;
5695
5559
  headers: Headers;
@@ -5746,7 +5610,6 @@ declare const router: {
5746
5610
  ipAddress?: string | null | undefined;
5747
5611
  userAgent?: string | null | undefined;
5748
5612
  activeOrganizationId?: string | null | undefined;
5749
- activeTeamId?: string | null | undefined;
5750
5613
  };
5751
5614
  env: Bindings;
5752
5615
  headers: Headers;
@@ -5803,7 +5666,6 @@ declare const router: {
5803
5666
  ipAddress?: string | null | undefined;
5804
5667
  userAgent?: string | null | undefined;
5805
5668
  activeOrganizationId?: string | null | undefined;
5806
- activeTeamId?: string | null | undefined;
5807
5669
  };
5808
5670
  env: Bindings;
5809
5671
  headers: Headers;
@@ -5861,7 +5723,6 @@ declare const router: {
5861
5723
  ipAddress?: string | null | undefined;
5862
5724
  userAgent?: string | null | undefined;
5863
5725
  activeOrganizationId?: string | null | undefined;
5864
- activeTeamId?: string | null | undefined;
5865
5726
  };
5866
5727
  env: Bindings;
5867
5728
  headers: Headers;
@@ -5917,7 +5778,6 @@ declare const router: {
5917
5778
  ipAddress?: string | null | undefined;
5918
5779
  userAgent?: string | null | undefined;
5919
5780
  activeOrganizationId?: string | null | undefined;
5920
- activeTeamId?: string | null | undefined;
5921
5781
  };
5922
5782
  env: Bindings;
5923
5783
  headers: Headers;
@@ -5973,7 +5833,6 @@ declare const router: {
5973
5833
  ipAddress?: string | null | undefined;
5974
5834
  userAgent?: string | null | undefined;
5975
5835
  activeOrganizationId?: string | null | undefined;
5976
- activeTeamId?: string | null | undefined;
5977
5836
  };
5978
5837
  env: Bindings;
5979
5838
  headers: Headers;
@@ -6029,7 +5888,6 @@ declare const router: {
6029
5888
  ipAddress?: string | null | undefined;
6030
5889
  userAgent?: string | null | undefined;
6031
5890
  activeOrganizationId?: string | null | undefined;
6032
- activeTeamId?: string | null | undefined;
6033
5891
  };
6034
5892
  env: Bindings;
6035
5893
  headers: Headers;
@@ -6187,7 +6045,6 @@ declare const router: {
6187
6045
  ipAddress?: string | null | undefined;
6188
6046
  userAgent?: string | null | undefined;
6189
6047
  activeOrganizationId?: string | null | undefined;
6190
- activeTeamId?: string | null | undefined;
6191
6048
  };
6192
6049
  env: Bindings;
6193
6050
  headers: Headers;
@@ -6239,7 +6096,6 @@ declare const router: {
6239
6096
  ipAddress?: string | null | undefined;
6240
6097
  userAgent?: string | null | undefined;
6241
6098
  activeOrganizationId?: string | null | undefined;
6242
- activeTeamId?: string | null | undefined;
6243
6099
  };
6244
6100
  env: Bindings;
6245
6101
  headers: Headers;
@@ -6362,7 +6218,6 @@ declare const router: {
6362
6218
  ipAddress?: string | null | undefined;
6363
6219
  userAgent?: string | null | undefined;
6364
6220
  activeOrganizationId?: string | null | undefined;
6365
- activeTeamId?: string | null | undefined;
6366
6221
  };
6367
6222
  env: Bindings;
6368
6223
  headers: Headers;
@@ -6423,7 +6278,6 @@ declare const router: {
6423
6278
  ipAddress?: string | null | undefined;
6424
6279
  userAgent?: string | null | undefined;
6425
6280
  activeOrganizationId?: string | null | undefined;
6426
- activeTeamId?: string | null | undefined;
6427
6281
  };
6428
6282
  env: Bindings;
6429
6283
  headers: Headers;
@@ -6484,7 +6338,6 @@ declare const router: {
6484
6338
  ipAddress?: string | null | undefined;
6485
6339
  userAgent?: string | null | undefined;
6486
6340
  activeOrganizationId?: string | null | undefined;
6487
- activeTeamId?: string | null | undefined;
6488
6341
  };
6489
6342
  env: Bindings;
6490
6343
  headers: Headers;
@@ -6544,7 +6397,6 @@ declare const router: {
6544
6397
  ipAddress?: string | null | undefined;
6545
6398
  userAgent?: string | null | undefined;
6546
6399
  activeOrganizationId?: string | null | undefined;
6547
- activeTeamId?: string | null | undefined;
6548
6400
  };
6549
6401
  env: Bindings;
6550
6402
  headers: Headers;
@@ -6576,7 +6428,6 @@ declare const router: {
6576
6428
  ipAddress?: string | null | undefined;
6577
6429
  userAgent?: string | null | undefined;
6578
6430
  activeOrganizationId?: string | null | undefined;
6579
- activeTeamId?: string | null | undefined;
6580
6431
  };
6581
6432
  env: Bindings;
6582
6433
  headers: Headers;
@@ -6613,7 +6464,6 @@ declare const router: {
6613
6464
  ipAddress?: string | null | undefined;
6614
6465
  userAgent?: string | null | undefined;
6615
6466
  activeOrganizationId?: string | null | undefined;
6616
- activeTeamId?: string | null | undefined;
6617
6467
  };
6618
6468
  env: Bindings;
6619
6469
  headers: Headers;
@@ -6674,7 +6524,6 @@ declare const router: {
6674
6524
  ipAddress?: string | null | undefined;
6675
6525
  userAgent?: string | null | undefined;
6676
6526
  activeOrganizationId?: string | null | undefined;
6677
- activeTeamId?: string | null | undefined;
6678
6527
  };
6679
6528
  env: Bindings;
6680
6529
  headers: Headers;
@@ -6795,7 +6644,6 @@ declare const router: {
6795
6644
  ipAddress?: string | null | undefined;
6796
6645
  userAgent?: string | null | undefined;
6797
6646
  activeOrganizationId?: string | null | undefined;
6798
- activeTeamId?: string | null | undefined;
6799
6647
  };
6800
6648
  env: Bindings;
6801
6649
  headers: Headers;
@@ -6862,7 +6710,6 @@ declare const router: {
6862
6710
  ipAddress?: string | null | undefined;
6863
6711
  userAgent?: string | null | undefined;
6864
6712
  activeOrganizationId?: string | null | undefined;
6865
- activeTeamId?: string | null | undefined;
6866
6713
  };
6867
6714
  env: Bindings;
6868
6715
  headers: Headers;
@@ -6917,7 +6764,6 @@ declare const router: {
6917
6764
  ipAddress?: string | null | undefined;
6918
6765
  userAgent?: string | null | undefined;
6919
6766
  activeOrganizationId?: string | null | undefined;
6920
- activeTeamId?: string | null | undefined;
6921
6767
  };
6922
6768
  env: Bindings;
6923
6769
  headers: Headers;
@@ -6972,7 +6818,6 @@ declare const router: {
6972
6818
  ipAddress?: string | null | undefined;
6973
6819
  userAgent?: string | null | undefined;
6974
6820
  activeOrganizationId?: string | null | undefined;
6975
- activeTeamId?: string | null | undefined;
6976
6821
  };
6977
6822
  env: Bindings;
6978
6823
  headers: Headers;
@@ -7028,7 +6873,6 @@ declare const router: {
7028
6873
  ipAddress?: string | null | undefined;
7029
6874
  userAgent?: string | null | undefined;
7030
6875
  activeOrganizationId?: string | null | undefined;
7031
- activeTeamId?: string | null | undefined;
7032
6876
  };
7033
6877
  env: Bindings;
7034
6878
  headers: Headers;
@@ -7082,7 +6926,6 @@ declare const router: {
7082
6926
  ipAddress?: string | null | undefined;
7083
6927
  userAgent?: string | null | undefined;
7084
6928
  activeOrganizationId?: string | null | undefined;
7085
- activeTeamId?: string | null | undefined;
7086
6929
  };
7087
6930
  env: Bindings;
7088
6931
  headers: Headers;
@@ -7136,7 +6979,6 @@ declare const router: {
7136
6979
  ipAddress?: string | null | undefined;
7137
6980
  userAgent?: string | null | undefined;
7138
6981
  activeOrganizationId?: string | null | undefined;
7139
- activeTeamId?: string | null | undefined;
7140
6982
  };
7141
6983
  env: Bindings;
7142
6984
  headers: Headers;
@@ -7367,7 +7209,6 @@ declare const router: {
7367
7209
  ipAddress?: string | null | undefined;
7368
7210
  userAgent?: string | null | undefined;
7369
7211
  activeOrganizationId?: string | null | undefined;
7370
- activeTeamId?: string | null | undefined;
7371
7212
  };
7372
7213
  env: Bindings;
7373
7214
  headers: Headers;
@@ -7407,7 +7248,6 @@ declare const router: {
7407
7248
  ipAddress?: string | null | undefined;
7408
7249
  userAgent?: string | null | undefined;
7409
7250
  activeOrganizationId?: string | null | undefined;
7410
- activeTeamId?: string | null | undefined;
7411
7251
  };
7412
7252
  env: Bindings;
7413
7253
  headers: Headers;
@@ -7483,7 +7323,6 @@ declare const router: {
7483
7323
  ipAddress?: string | null | undefined;
7484
7324
  userAgent?: string | null | undefined;
7485
7325
  activeOrganizationId?: string | null | undefined;
7486
- activeTeamId?: string | null | undefined;
7487
7326
  };
7488
7327
  env: Bindings;
7489
7328
  headers: Headers;
@@ -7517,7 +7356,6 @@ declare const router: {
7517
7356
  ipAddress?: string | null | undefined;
7518
7357
  userAgent?: string | null | undefined;
7519
7358
  activeOrganizationId?: string | null | undefined;
7520
- activeTeamId?: string | null | undefined;
7521
7359
  };
7522
7360
  env: Bindings;
7523
7361
  headers: Headers;
@@ -7532,16 +7370,6 @@ declare const router: {
7532
7370
  };
7533
7371
  };
7534
7372
  export type Router = typeof router;
7535
- export type AgentChatSource = "draft" | "live";
7536
- export type AgentChatRequestContext = {
7537
- projectId: number;
7538
- currentPath: string;
7539
- source: AgentChatSource;
7540
- };
7541
- export type AgentChatMessage = ModelMessage | UIMessage;
7542
- export type AgentChatRequest = AgentChatRequestContext & {
7543
- messages: AgentChatMessage[];
7544
- };
7545
7373
  /**
7546
7374
  * Public PostHog project key. Safe to ship in client bundles — write-only and
7547
7375
  * scoped to ingest. Lives here (rather than per-package) so the SDK studio,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/api-contract",
3
- "version": "0.38.0",
3
+ "version": "0.40.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "src",
@@ -17,9 +17,6 @@
17
17
  "default": "./dist/query-keys.js"
18
18
  }
19
19
  },
20
- "dependencies": {
21
- "@tanstack/ai": "0.21.3"
22
- },
23
20
  "devDependencies": {
24
21
  "dts-bundle-generator": "^9.5.1",
25
22
  "esbuild": "^0.25.12"
package/src/index.ts CHANGED
@@ -1,21 +1,5 @@
1
- import type { ModelMessage, UIMessage } from "@tanstack/ai";
2
-
3
1
  export type { Router } from "../../../apps/api/src/router";
4
2
 
5
- export type AgentChatSource = "draft" | "live";
6
-
7
- export type AgentChatRequestContext = {
8
- projectId: number;
9
- currentPath: string;
10
- source: AgentChatSource;
11
- };
12
-
13
- export type AgentChatMessage = ModelMessage | UIMessage;
14
-
15
- export type AgentChatRequest = AgentChatRequestContext & {
16
- messages: AgentChatMessage[];
17
- };
18
-
19
3
  /**
20
4
  * Public PostHog project key. Safe to ship in client bundles — write-only and
21
5
  * scoped to ingest. Lives here (rather than per-package) so the SDK studio,