@repome/api 0.1.8 → 0.1.9

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
@@ -392,6 +392,9 @@ declare const meViewSchema: z.ZodObject<{
392
392
  }, z.core.$strip>;
393
393
  type MeView = z.infer<typeof meViewSchema>;
394
394
  //#endregion
395
+ //#region src/pagination.d.ts
396
+ declare const cursorSchema: z.ZodOptional<z.ZodString>;
397
+ //#endregion
395
398
  //#region src/scopes.d.ts
396
399
  declare const scopeSchema: z.ZodEnum<{
397
400
  "repos:read": "repos:read";
@@ -563,13 +566,28 @@ declare const invitationViewSchema: z.ZodObject<{
563
566
  inviterId: z.ZodString;
564
567
  expiresAt: z.ZodNumber;
565
568
  }, z.core.$strip>;
569
+ declare const invitationListItemSchema: z.ZodObject<{
570
+ id: z.ZodString;
571
+ organizationId: z.ZodString;
572
+ email: z.ZodString;
573
+ role: z.ZodUnion<[z.ZodEnum<{
574
+ admin: "admin";
575
+ member: "member";
576
+ }>, z.ZodLiteral<"owner">]>;
577
+ status: z.ZodString;
578
+ inviterId: z.ZodString;
579
+ expiresAt: z.ZodNumber;
580
+ createdAt: z.ZodNumber;
581
+ }, z.core.$strip>;
566
582
  type MemberRole = z.output<typeof memberRoleSchema>;
567
583
  type MemberView = z.output<typeof memberViewSchema>;
568
584
  type InvitationView = z.output<typeof invitationViewSchema>;
585
+ type InvitationListItem = z.output<typeof invitationListItemSchema>;
569
586
  //#endregion
570
587
  //#region src/orgs.d.ts
571
588
  declare const orgSlugHint = "Lowercase, alphanumeric, - only.";
572
589
  declare const orgSlugSchema: z.ZodString;
590
+ declare const PERSONAL_ORG_SLUG = "~";
573
591
  declare const orgCreateInputSchema: z.ZodObject<{
574
592
  slug: z.ZodString;
575
593
  name: z.ZodString;
@@ -598,35 +616,36 @@ type OrgListOutput = z.output<typeof orgListOutputSchema>;
598
616
  //#endregion
599
617
  //#region src/repos.d.ts
600
618
  declare const repoNameHint = "Lowercase, alphanumeric, ._- only.";
619
+ declare const CLONE_TOKEN_SCOPE: "read";
601
620
  declare const repoNameSchema: z.ZodString;
602
621
  declare function parseRepoName(value: unknown): string;
603
622
  declare const repoCreateInputSchema: z.ZodObject<{
604
- orgSlug: z.ZodOptional<z.ZodString>;
623
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
605
624
  name: z.ZodString;
606
625
  description: z.ZodOptional<z.ZodString>;
607
626
  defaultBranch: z.ZodDefault<z.ZodString>;
608
627
  }, z.core.$strip>;
609
628
  declare const repoEnsureInputSchema: z.ZodObject<{
610
- orgSlug: z.ZodOptional<z.ZodString>;
629
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
611
630
  name: z.ZodString;
612
631
  description: z.ZodOptional<z.ZodString>;
613
632
  defaultBranch: z.ZodDefault<z.ZodString>;
614
633
  }, z.core.$strip>;
615
634
  declare const repoImportInputSchema: z.ZodObject<{
616
- orgSlug: z.ZodOptional<z.ZodString>;
635
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
617
636
  name: z.ZodString;
618
637
  description: z.ZodOptional<z.ZodString>;
619
638
  defaultBranch: z.ZodDefault<z.ZodString>;
620
639
  remote: z.ZodURL;
621
640
  }, z.core.$strip>;
622
641
  declare const repoUpdateInputSchema: z.ZodObject<{
623
- orgSlug: z.ZodOptional<z.ZodString>;
642
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
624
643
  name: z.ZodString;
625
644
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
626
645
  defaultBranch: z.ZodOptional<z.ZodString>;
627
646
  }, z.core.$strip>;
628
647
  declare const repoListInputSchema: z.ZodObject<{
629
- orgSlug: z.ZodOptional<z.ZodString>;
648
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
630
649
  cursor: z.ZodOptional<z.ZodString>;
631
650
  limit: z.ZodDefault<z.ZodNumber>;
632
651
  }, z.core.$strip>;
@@ -660,6 +679,7 @@ declare const repoCreateOutputSchema: z.ZodObject<{
660
679
  createdAt: z.ZodNumber;
661
680
  updatedAt: z.ZodNumber;
662
681
  token: z.ZodString;
682
+ tokenScope: z.ZodLiteral<"read">;
663
683
  tokenExpiresAt: z.ZodString;
664
684
  }, z.core.$strip>;
665
685
  declare const repoListOutputSchema: z.ZodObject<{
@@ -718,7 +738,7 @@ declare const tokenScopeSchema: z.ZodEnum<{
718
738
  write: "write";
719
739
  }>;
720
740
  declare const tokenMintInputSchema: z.ZodObject<{
721
- orgSlug: z.ZodOptional<z.ZodString>;
741
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
722
742
  name: z.ZodString;
723
743
  scope: z.ZodEnum<{
724
744
  read: "read";
@@ -728,7 +748,7 @@ declare const tokenMintInputSchema: z.ZodObject<{
728
748
  op: z.ZodOptional<z.ZodString>;
729
749
  }, z.core.$strip>;
730
750
  declare const tokenIdentInputSchema: z.ZodObject<{
731
- orgSlug: z.ZodOptional<z.ZodString>;
751
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
732
752
  name: z.ZodString;
733
753
  id: z.ZodString;
734
754
  }, z.core.$strip>;
@@ -774,7 +794,7 @@ declare const tokenMintOutputSchema: z.ZodObject<{
774
794
  token: z.ZodString;
775
795
  }, z.core.$strip>;
776
796
  declare const tokenListInputSchema: z.ZodObject<{
777
- orgSlug: z.ZodOptional<z.ZodString>;
797
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
778
798
  name: z.ZodString;
779
799
  }, z.core.$strip>;
780
800
  declare const tokenListOutputSchema: z.ZodObject<{
@@ -2897,7 +2917,7 @@ declare const contract: {
2897
2917
  git: {
2898
2918
  refs: {
2899
2919
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2900
- orgSlug: z.ZodOptional<z.ZodString>;
2920
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
2901
2921
  name: z.ZodString;
2902
2922
  cursor: z.ZodOptional<z.ZodString>;
2903
2923
  limit: z.ZodDefault<z.ZodNumber>;
@@ -3068,7 +3088,7 @@ declare const contract: {
3068
3088
  };
3069
3089
  }>, Record<never, never>>;
3070
3090
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3071
- orgSlug: z.ZodOptional<z.ZodString>;
3091
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3072
3092
  name: z.ZodString;
3073
3093
  ref: z.ZodString;
3074
3094
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -3236,7 +3256,7 @@ declare const contract: {
3236
3256
  };
3237
3257
  branches: {
3238
3258
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3239
- orgSlug: z.ZodOptional<z.ZodString>;
3259
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3240
3260
  name: z.ZodString;
3241
3261
  cursor: z.ZodOptional<z.ZodString>;
3242
3262
  limit: z.ZodDefault<z.ZodNumber>;
@@ -3407,7 +3427,7 @@ declare const contract: {
3407
3427
  };
3408
3428
  }>, Record<never, never>>;
3409
3429
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3410
- orgSlug: z.ZodOptional<z.ZodString>;
3430
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3411
3431
  name: z.ZodString;
3412
3432
  ref: z.ZodString;
3413
3433
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -3573,7 +3593,7 @@ declare const contract: {
3573
3593
  };
3574
3594
  }>, Record<never, never>>;
3575
3595
  create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3576
- orgSlug: z.ZodOptional<z.ZodString>;
3596
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3577
3597
  name: z.ZodString;
3578
3598
  branch: z.ZodString;
3579
3599
  fromRef: z.ZodString;
@@ -3740,7 +3760,7 @@ declare const contract: {
3740
3760
  };
3741
3761
  }>, Record<never, never>>;
3742
3762
  update: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3743
- orgSlug: z.ZodOptional<z.ZodString>;
3763
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3744
3764
  name: z.ZodString;
3745
3765
  ref: z.ZodString;
3746
3766
  oid: z.ZodString;
@@ -3910,7 +3930,7 @@ declare const contract: {
3910
3930
  };
3911
3931
  }>, Record<never, never>>;
3912
3932
  delete: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3913
- orgSlug: z.ZodOptional<z.ZodString>;
3933
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
3914
3934
  name: z.ZodString;
3915
3935
  ref: z.ZodString;
3916
3936
  expectedOid: z.ZodOptional<z.ZodString>;
@@ -4073,7 +4093,7 @@ declare const contract: {
4073
4093
  };
4074
4094
  tags: {
4075
4095
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4076
- orgSlug: z.ZodOptional<z.ZodString>;
4096
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4077
4097
  name: z.ZodString;
4078
4098
  cursor: z.ZodOptional<z.ZodString>;
4079
4099
  limit: z.ZodDefault<z.ZodNumber>;
@@ -4244,7 +4264,7 @@ declare const contract: {
4244
4264
  };
4245
4265
  }>, Record<never, never>>;
4246
4266
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4247
- orgSlug: z.ZodOptional<z.ZodString>;
4267
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4248
4268
  name: z.ZodString;
4249
4269
  ref: z.ZodString;
4250
4270
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -4410,7 +4430,7 @@ declare const contract: {
4410
4430
  };
4411
4431
  }>, Record<never, never>>;
4412
4432
  create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4413
- orgSlug: z.ZodOptional<z.ZodString>;
4433
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4414
4434
  name: z.ZodString;
4415
4435
  tag: z.ZodString;
4416
4436
  oid: z.ZodString;
@@ -4584,7 +4604,7 @@ declare const contract: {
4584
4604
  };
4585
4605
  }>, Record<never, never>>;
4586
4606
  delete: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4587
- orgSlug: z.ZodOptional<z.ZodString>;
4607
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4588
4608
  name: z.ZodString;
4589
4609
  ref: z.ZodString;
4590
4610
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -4746,7 +4766,7 @@ declare const contract: {
4746
4766
  };
4747
4767
  commits: {
4748
4768
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4749
- orgSlug: z.ZodOptional<z.ZodString>;
4769
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4750
4770
  name: z.ZodString;
4751
4771
  cursor: z.ZodOptional<z.ZodString>;
4752
4772
  limit: z.ZodDefault<z.ZodNumber>;
@@ -4916,7 +4936,7 @@ declare const contract: {
4916
4936
  };
4917
4937
  }>, Record<never, never>>;
4918
4938
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4919
- orgSlug: z.ZodOptional<z.ZodString>;
4939
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
4920
4940
  name: z.ZodString;
4921
4941
  oid: z.ZodString;
4922
4942
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -5080,7 +5100,7 @@ declare const contract: {
5080
5100
  };
5081
5101
  }>, Record<never, never>>;
5082
5102
  create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5083
- orgSlug: z.ZodOptional<z.ZodString>;
5103
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
5084
5104
  name: z.ZodString;
5085
5105
  ref: z.ZodString;
5086
5106
  message: z.ZodString;
@@ -5273,7 +5293,7 @@ declare const contract: {
5273
5293
  };
5274
5294
  tree: {
5275
5295
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5276
- orgSlug: z.ZodOptional<z.ZodString>;
5296
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
5277
5297
  name: z.ZodString;
5278
5298
  ref: z.ZodDefault<z.ZodString>;
5279
5299
  path: z.ZodOptional<z.ZodString>;
@@ -5449,7 +5469,7 @@ declare const contract: {
5449
5469
  };
5450
5470
  blob: {
5451
5471
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5452
- orgSlug: z.ZodOptional<z.ZodString>;
5472
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
5453
5473
  name: z.ZodString;
5454
5474
  oid: z.ZodString;
5455
5475
  }, _$zod_v4_core0.$strip>, z.ZodUnion<readonly [z.ZodObject<{
@@ -5618,7 +5638,7 @@ declare const contract: {
5618
5638
  };
5619
5639
  workspace: {
5620
5640
  commit: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5621
- orgSlug: z.ZodOptional<z.ZodString>;
5641
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
5622
5642
  name: z.ZodString;
5623
5643
  ref: z.ZodDefault<z.ZodString>;
5624
5644
  message: z.ZodString;
@@ -5814,7 +5834,7 @@ declare const contract: {
5814
5834
  }>, Record<never, never>>;
5815
5835
  };
5816
5836
  compare: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
5817
- orgSlug: z.ZodOptional<z.ZodString>;
5837
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
5818
5838
  name: z.ZodString;
5819
5839
  base: z.ZodString;
5820
5840
  head: z.ZodString;
@@ -6000,7 +6020,7 @@ declare const contract: {
6000
6020
  };
6001
6021
  }>, Record<never, never>>;
6002
6022
  diff: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
6003
- orgSlug: z.ZodOptional<z.ZodString>;
6023
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
6004
6024
  name: z.ZodString;
6005
6025
  base: z.ZodString;
6006
6026
  head: z.ZodString;
@@ -7734,6 +7754,176 @@ declare const contract: {
7734
7754
  }, _$zod_v4_core0.$strip>;
7735
7755
  };
7736
7756
  }>, Record<never, never>>;
7757
+ listInvitations: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
7758
+ orgSlug: z.ZodString;
7759
+ }, _$zod_v4_core0.$strip>, z.ZodObject<{
7760
+ items: z.ZodArray<z.ZodObject<{
7761
+ id: z.ZodString;
7762
+ organizationId: z.ZodString;
7763
+ email: z.ZodString;
7764
+ role: z.ZodUnion<[z.ZodEnum<{
7765
+ admin: "admin";
7766
+ member: "member";
7767
+ }>, z.ZodLiteral<"owner">]>;
7768
+ status: z.ZodString;
7769
+ inviterId: z.ZodString;
7770
+ expiresAt: z.ZodNumber;
7771
+ createdAt: z.ZodNumber;
7772
+ }, _$zod_v4_core0.$strip>>;
7773
+ }, _$zod_v4_core0.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
7774
+ readonly BAD_REQUEST: {
7775
+ readonly status: 400;
7776
+ readonly message: "Bad request";
7777
+ readonly data: z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>;
7778
+ };
7779
+ readonly UNAUTHENTICATED: {
7780
+ readonly status: 401;
7781
+ readonly message: "Sign in required";
7782
+ readonly data: z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>;
7783
+ };
7784
+ readonly TOO_MANY_REQUESTS: {
7785
+ readonly status: 429;
7786
+ readonly message: "Too many requests";
7787
+ readonly data: z.ZodOptional<z.ZodObject<{
7788
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
7789
+ }, _$zod_v4_core0.$strip>>;
7790
+ };
7791
+ readonly FORBIDDEN: {
7792
+ readonly status: 403;
7793
+ readonly message: "You do not have access to this resource";
7794
+ readonly data: z.ZodOptional<z.ZodObject<{
7795
+ reason: z.ZodOptional<z.ZodEnum<{
7796
+ not_a_member: "not_a_member";
7797
+ insufficient_role: "insufficient_role";
7798
+ scope_missing: "scope_missing";
7799
+ }>>;
7800
+ }, _$zod_v4_core0.$strip>>;
7801
+ };
7802
+ readonly INVITATION_NOT_FOUND: {
7803
+ readonly status: 404;
7804
+ readonly message: "Invitation not found";
7805
+ readonly data: z.ZodObject<{
7806
+ invitationId: z.ZodString;
7807
+ }, _$zod_v4_core0.$strip>;
7808
+ };
7809
+ readonly KEY_NOT_FOUND: {
7810
+ readonly status: 404;
7811
+ readonly message: "API key not found";
7812
+ readonly data: z.ZodObject<{
7813
+ id: z.ZodString;
7814
+ }, _$zod_v4_core0.$strip>;
7815
+ };
7816
+ readonly REPO_NOT_FOUND: {
7817
+ readonly status: 404;
7818
+ readonly message: "Repo not found";
7819
+ readonly data: z.ZodObject<{
7820
+ name: z.ZodString;
7821
+ }, _$zod_v4_core0.$strip>;
7822
+ };
7823
+ readonly GIT_OBJECT_NOT_FOUND: {
7824
+ readonly status: 404;
7825
+ readonly message: "Git object not found";
7826
+ readonly data: z.ZodObject<{
7827
+ name: z.ZodString;
7828
+ object: z.ZodString;
7829
+ }, _$zod_v4_core0.$strip>;
7830
+ };
7831
+ readonly REF_ALREADY_EXISTS: {
7832
+ readonly status: 409;
7833
+ readonly message: "Git ref already exists";
7834
+ readonly data: z.ZodObject<{
7835
+ name: z.ZodString;
7836
+ ref: z.ZodString;
7837
+ }, _$zod_v4_core0.$strip>;
7838
+ };
7839
+ readonly STALE_REF: {
7840
+ readonly status: 409;
7841
+ readonly message: "Git ref is stale";
7842
+ readonly data: z.ZodObject<{
7843
+ name: z.ZodString;
7844
+ ref: z.ZodString;
7845
+ }, _$zod_v4_core0.$strip>;
7846
+ };
7847
+ readonly NON_FAST_FORWARD: {
7848
+ readonly status: 422;
7849
+ readonly message: "Git ref update is not a fast-forward";
7850
+ readonly data: z.ZodObject<{
7851
+ name: z.ZodString;
7852
+ ref: z.ZodString;
7853
+ }, _$zod_v4_core0.$strip>;
7854
+ };
7855
+ readonly INVALID_TREE: {
7856
+ readonly status: 422;
7857
+ readonly message: "Invalid git tree";
7858
+ readonly data: z.ZodObject<{
7859
+ name: z.ZodString;
7860
+ object: z.ZodString;
7861
+ }, _$zod_v4_core0.$strip>;
7862
+ };
7863
+ readonly INVALID_PARENT: {
7864
+ readonly status: 422;
7865
+ readonly message: "Invalid git parent";
7866
+ readonly data: z.ZodObject<{
7867
+ name: z.ZodString;
7868
+ object: z.ZodString;
7869
+ }, _$zod_v4_core0.$strip>;
7870
+ };
7871
+ readonly INVARIANT_WORKSPACE_REQUIRED: {
7872
+ readonly status: 503;
7873
+ readonly message: "Repo workspace is required for this git operation";
7874
+ readonly data: z.ZodObject<{
7875
+ name: z.ZodString;
7876
+ }, _$zod_v4_core0.$strip>;
7877
+ };
7878
+ readonly GIT_REMOTE_WRITE_FAILED: {
7879
+ readonly status: 502;
7880
+ readonly message: "Git remote write failed";
7881
+ readonly data: z.ZodObject<{
7882
+ name: z.ZodString;
7883
+ ref: z.ZodString;
7884
+ }, _$zod_v4_core0.$strip>;
7885
+ };
7886
+ readonly REPO_ALREADY_EXISTS: {
7887
+ readonly status: 409;
7888
+ readonly message: "Repo already exists";
7889
+ readonly data: z.ZodObject<{
7890
+ name: z.ZodString;
7891
+ }, _$zod_v4_core0.$strip>;
7892
+ };
7893
+ readonly QUOTA_EXCEEDED: {
7894
+ readonly status: 429;
7895
+ readonly message: "Quota exceeded";
7896
+ readonly data: z.ZodObject<{
7897
+ scope: z.ZodEnum<{
7898
+ anon: "anon";
7899
+ org: "org";
7900
+ size: "size";
7901
+ }>;
7902
+ limit: z.ZodNumber;
7903
+ observed: z.ZodOptional<z.ZodNumber>;
7904
+ projected: z.ZodOptional<z.ZodNumber>;
7905
+ }, _$zod_v4_core0.$strip>;
7906
+ };
7907
+ readonly PAYLOAD_TOO_LARGE: {
7908
+ readonly status: 413;
7909
+ readonly message: "Request payload exceeds the supported limit";
7910
+ readonly data: z.ZodObject<{
7911
+ scope: z.ZodEnum<{
7912
+ workspace_commit: "workspace_commit";
7913
+ git_workspace_memory: "git_workspace_memory";
7914
+ }>;
7915
+ limit: z.ZodNumber;
7916
+ observed: z.ZodOptional<z.ZodNumber>;
7917
+ }, _$zod_v4_core0.$strip>;
7918
+ };
7919
+ readonly IMPORT_FAILED: {
7920
+ readonly status: 502;
7921
+ readonly message: "Repo import failed";
7922
+ readonly data: z.ZodObject<{
7923
+ name: z.ZodString;
7924
+ }, _$zod_v4_core0.$strip>;
7925
+ };
7926
+ }>, Record<never, never>>;
7737
7927
  invite: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
7738
7928
  orgSlug: z.ZodString;
7739
7929
  email: z.ZodEmail;
@@ -8716,7 +8906,7 @@ declare const contract: {
8716
8906
  };
8717
8907
  repos: {
8718
8908
  create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
8719
- orgSlug: z.ZodOptional<z.ZodString>;
8909
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
8720
8910
  name: z.ZodString;
8721
8911
  description: z.ZodOptional<z.ZodString>;
8722
8912
  defaultBranch: z.ZodDefault<z.ZodString>;
@@ -8735,6 +8925,7 @@ declare const contract: {
8735
8925
  createdAt: z.ZodNumber;
8736
8926
  updatedAt: z.ZodNumber;
8737
8927
  token: z.ZodString;
8928
+ tokenScope: z.ZodLiteral<"read">;
8738
8929
  tokenExpiresAt: z.ZodString;
8739
8930
  }, _$zod_v4_core0.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
8740
8931
  readonly BAD_REQUEST: {
@@ -8891,7 +9082,7 @@ declare const contract: {
8891
9082
  };
8892
9083
  }>, Record<never, never>>;
8893
9084
  importFromGitHub: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
8894
- orgSlug: z.ZodOptional<z.ZodString>;
9085
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
8895
9086
  name: z.ZodString;
8896
9087
  description: z.ZodOptional<z.ZodString>;
8897
9088
  defaultBranch: z.ZodDefault<z.ZodString>;
@@ -8911,6 +9102,7 @@ declare const contract: {
8911
9102
  createdAt: z.ZodNumber;
8912
9103
  updatedAt: z.ZodNumber;
8913
9104
  token: z.ZodString;
9105
+ tokenScope: z.ZodLiteral<"read">;
8914
9106
  tokenExpiresAt: z.ZodString;
8915
9107
  }, _$zod_v4_core0.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
8916
9108
  readonly BAD_REQUEST: {
@@ -9067,7 +9259,7 @@ declare const contract: {
9067
9259
  };
9068
9260
  }>, Record<never, never>>;
9069
9261
  ensure: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9070
- orgSlug: z.ZodOptional<z.ZodString>;
9262
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9071
9263
  name: z.ZodString;
9072
9264
  description: z.ZodOptional<z.ZodString>;
9073
9265
  defaultBranch: z.ZodDefault<z.ZodString>;
@@ -9243,7 +9435,7 @@ declare const contract: {
9243
9435
  };
9244
9436
  }>, Record<never, never>>;
9245
9437
  get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9246
- orgSlug: z.ZodOptional<z.ZodString>;
9438
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9247
9439
  name: z.ZodString;
9248
9440
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
9249
9441
  orgId: z.ZodString;
@@ -9414,7 +9606,7 @@ declare const contract: {
9414
9606
  };
9415
9607
  }>, Record<never, never>>;
9416
9608
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9417
- orgSlug: z.ZodOptional<z.ZodString>;
9609
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9418
9610
  cursor: z.ZodOptional<z.ZodString>;
9419
9611
  limit: z.ZodDefault<z.ZodNumber>;
9420
9612
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -9589,7 +9781,7 @@ declare const contract: {
9589
9781
  };
9590
9782
  }>, Record<never, never>>;
9591
9783
  update: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9592
- orgSlug: z.ZodOptional<z.ZodString>;
9784
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9593
9785
  name: z.ZodString;
9594
9786
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9595
9787
  defaultBranch: z.ZodOptional<z.ZodString>;
@@ -9762,7 +9954,7 @@ declare const contract: {
9762
9954
  };
9763
9955
  }>, Record<never, never>>;
9764
9956
  delete: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9765
- orgSlug: z.ZodOptional<z.ZodString>;
9957
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9766
9958
  name: z.ZodString;
9767
9959
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
9768
9960
  deleted: z.ZodLiteral<true>;
@@ -9923,7 +10115,7 @@ declare const contract: {
9923
10115
  };
9924
10116
  tokens: {
9925
10117
  mint: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9926
- orgSlug: z.ZodOptional<z.ZodString>;
10118
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
9927
10119
  name: z.ZodString;
9928
10120
  scope: z.ZodEnum<{
9929
10121
  read: "read";
@@ -10276,7 +10468,7 @@ declare const contract: {
10276
10468
  };
10277
10469
  }>, Record<never, never>>;
10278
10470
  list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
10279
- orgSlug: z.ZodOptional<z.ZodString>;
10471
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
10280
10472
  name: z.ZodString;
10281
10473
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
10282
10474
  items: z.ZodArray<z.ZodObject<{
@@ -10449,7 +10641,7 @@ declare const contract: {
10449
10641
  };
10450
10642
  }>, Record<never, never>>;
10451
10643
  revoke: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
10452
- orgSlug: z.ZodOptional<z.ZodString>;
10644
+ orgSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"~">]>>;
10453
10645
  name: z.ZodString;
10454
10646
  id: z.ZodString;
10455
10647
  }, _$zod_v4_core0.$strip>, z.ZodObject<{
@@ -10780,4 +10972,4 @@ declare const contract: {
10780
10972
  };
10781
10973
  type Contract = typeof contract;
10782
10974
  //#endregion
10783
- export { ANON_ID_STORE_VERSION, type AnonIdRecord, type AnonRepoCreateInput, type AnonRepoCreateOutput, type AnonRepoListInput, type AnonRepoListOutput, type AnonRepoView, type AnonTokenMintForGitRemoteInput, type ApiKeyCreateInput, type ApiKeyCreateOutput, type ApiKeyDeleteInput, type ApiKeyDeleteOutput, type ApiKeyListOutput, type ApiKeyView, type CommonErrorMap, type CompareView, Contract, type DiffFile, type DiffView, type GitBlob, type GitCommit, type GitRef, type GitTreeEntry, type InvitationView, type MeView, type MemberRole, type MemberView, type OrgCreateInput, type OrgListOutput, type OrgView, type RepoCreateInput, type RepoCreateOutput, type RepoDeleteOutput, type RepoEnsureInput, type RepoEnsureOutput, type RepoImportInput, type RepoListInput, type RepoListOutput, type RepoUpdateInput, type RepoView, type Scope, type Signature, type TokenListInput, type TokenListOutput, type TokenMintForGitRemoteInput, type TokenMintInput, type TokenMintOutput, type TokenRevokeInput, type TokenRevokeOutput, type TokenValidateInput, type TokenValidateOutput, type TokenView, anonRepoSchema, apiKeyViewSchema, commonErrors, compareViewSchema, contract, diffFileSchema, diffViewSchema, gitBlobSchema, gitCommitSchema, gitRefSchema, gitTreeEntrySchema, invitationViewSchema, meViewSchema, memberRoleSchema, memberViewSchema, mutableMemberRoleSchema, orgSlugHint, orgSlugSchema, orgViewSchema, parseAnonIdFile, parseRepoName, repoNameHint, repoNameSchema, repoSchema, scopeSchema, serializeAnonIdRecord, tokenScopeSchema, tokenViewSchema };
10975
+ export { ANON_ID_STORE_VERSION, type AnonIdRecord, type AnonRepoCreateInput, type AnonRepoCreateOutput, type AnonRepoListInput, type AnonRepoListOutput, type AnonRepoView, type AnonTokenMintForGitRemoteInput, type ApiKeyCreateInput, type ApiKeyCreateOutput, type ApiKeyDeleteInput, type ApiKeyDeleteOutput, type ApiKeyListOutput, type ApiKeyView, CLONE_TOKEN_SCOPE, type CommonErrorMap, type CompareView, Contract, type DiffFile, type DiffView, type GitBlob, type GitCommit, type GitRef, type GitTreeEntry, type InvitationListItem, type InvitationView, type MeView, type MemberRole, type MemberView, type OrgCreateInput, type OrgListOutput, type OrgView, PERSONAL_ORG_SLUG, type RepoCreateInput, type RepoCreateOutput, type RepoDeleteOutput, type RepoEnsureInput, type RepoEnsureOutput, type RepoImportInput, type RepoListInput, type RepoListOutput, type RepoUpdateInput, type RepoView, type Scope, type Signature, type TokenListInput, type TokenListOutput, type TokenMintForGitRemoteInput, type TokenMintInput, type TokenMintOutput, type TokenRevokeInput, type TokenRevokeOutput, type TokenValidateInput, type TokenValidateOutput, type TokenView, anonRepoSchema, apiKeyViewSchema, commonErrors, compareViewSchema, contract, cursorSchema, diffFileSchema, diffViewSchema, gitBlobSchema, gitCommitSchema, gitRefSchema, gitTreeEntrySchema, invitationListItemSchema, invitationViewSchema, meViewSchema, memberRoleSchema, memberViewSchema, mutableMemberRoleSchema, orgSlugHint, orgSlugSchema, orgViewSchema, parseAnonIdFile, parseRepoName, repoNameHint, repoNameSchema, repoSchema, scopeSchema, serializeAnonIdRecord, tokenScopeSchema, tokenViewSchema };
package/dist/index.mjs CHANGED
@@ -141,7 +141,8 @@ const ocBase = oc.errors(commonErrors);
141
141
  //#region src/orgs.ts
142
142
  const orgSlugHint = "Lowercase, alphanumeric, - only.";
143
143
  const orgSlugSchema = z.string().min(1).max(64).regex(/^[a-z0-9][a-z0-9-]*$/, orgSlugHint);
144
- const repoScopeSchema = z.object({ orgSlug: orgSlugSchema.optional() });
144
+ const PERSONAL_ORG_SLUG = "~";
145
+ const repoScopeSchema = z.object({ orgSlug: z.union([orgSlugSchema, z.literal("~")]).optional() });
145
146
  const orgIdOrSlugSchema = z.object({ idOrSlug: z.string().min(1) });
146
147
  const orgCreateInputSchema = z.object({
147
148
  slug: orgSlugSchema,
@@ -163,8 +164,12 @@ const orgs = {
163
164
  delete: ocBase.input(orgIdOrSlugSchema).output(z.object({ deleted: z.literal(true) }))
164
165
  };
165
166
  //#endregion
167
+ //#region src/pagination.ts
168
+ const cursorSchema = z.string().optional().describe("Opaque pagination cursor from a previous page. Lenient: an undecodable cursor restarts from the first page; a stale cursor (pointing at a removed item) yields an empty page on git listings and continues past the cursor position on catalog listings. Never an error.");
169
+ //#endregion
166
170
  //#region src/repos.ts
167
171
  const repoNameHint = "Lowercase, alphanumeric, ._- only.";
172
+ const CLONE_TOKEN_SCOPE = "read";
168
173
  const repoNameSchema = z.string().min(1).max(64).regex(/^[a-z0-9][a-z0-9._-]*$/, repoNameHint);
169
174
  function parseRepoName(value) {
170
175
  return repoNameSchema.parse(value);
@@ -181,7 +186,7 @@ const repoUpdateInputSchema = repoIdentSchema.extend({
181
186
  defaultBranch: z.string().min(1).max(128).optional()
182
187
  });
183
188
  const repoListInputSchema = repoScopeSchema.extend({
184
- cursor: z.string().optional(),
189
+ cursor: cursorSchema,
185
190
  limit: z.number().int().min(1).max(100).default(50)
186
191
  });
187
192
  const repoSchema = z.object({
@@ -200,7 +205,8 @@ const repoSchema = z.object({
200
205
  updatedAt: z.number()
201
206
  });
202
207
  const repoCreateOutputSchema = repoSchema.extend({
203
- token: z.string(),
208
+ token: z.string().describe("Convenience token bundled with the new repo. Read/clone-scoped: it cannot push. Mint a write token (tokens.mint, scope \"write\") or use the repome git credential helper for the first push."),
209
+ tokenScope: z.literal(CLONE_TOKEN_SCOPE),
204
210
  tokenExpiresAt: z.string()
205
211
  });
206
212
  const repoListOutputSchema = z.object({
@@ -225,7 +231,7 @@ const repos = {
225
231
  //#region src/git.ts
226
232
  const pageInputSchema = repoScopeSchema.extend({
227
233
  name: repoNameSchema,
228
- cursor: z.string().optional(),
234
+ cursor: cursorSchema,
229
235
  limit: z.number().int().min(1).max(100).default(50)
230
236
  });
231
237
  const refInputSchema = repoScopeSchema.extend({
@@ -241,7 +247,7 @@ const treeInputSchema = repoScopeSchema.extend({
241
247
  ref: z.string().min(1).default("HEAD"),
242
248
  path: z.string().optional(),
243
249
  recursive: z.boolean().default(true),
244
- cursor: z.string().optional(),
250
+ cursor: cursorSchema,
245
251
  limit: z.number().int().min(1).max(100).default(50)
246
252
  });
247
253
  const blobInputSchema = repoScopeSchema.extend({
@@ -315,7 +321,7 @@ const compareInputSchema = repoScopeSchema.extend({
315
321
  name: repoNameSchema,
316
322
  base: z.string().min(1),
317
323
  head: z.string().min(1),
318
- cursor: z.string().optional(),
324
+ cursor: cursorSchema,
319
325
  limit: z.number().int().min(1).max(250).default(250)
320
326
  });
321
327
  const diffInputSchema = repoScopeSchema.extend({
@@ -324,7 +330,7 @@ const diffInputSchema = repoScopeSchema.extend({
324
330
  head: z.string().min(1),
325
331
  path: z.string().optional(),
326
332
  includePatch: z.boolean().default(false),
327
- cursor: z.string().optional(),
333
+ cursor: cursorSchema,
328
334
  limit: z.number().int().min(1).max(250).default(50)
329
335
  });
330
336
  const gitRefSchema = z.object({
@@ -500,7 +506,7 @@ const tokens = {
500
506
  //#region src/anon.ts
501
507
  const anonRepoIdentSchema = z.object({ name: repoNameSchema });
502
508
  const anonPageInputSchema = anonRepoIdentSchema.extend({
503
- cursor: z.string().optional(),
509
+ cursor: cursorSchema,
504
510
  limit: z.number().int().min(1).max(100).default(50)
505
511
  });
506
512
  const anonRefInputSchema = anonRepoIdentSchema.extend({ ref: z.string().min(1) });
@@ -508,7 +514,7 @@ const anonTreeInputSchema = anonRepoIdentSchema.extend({
508
514
  ref: z.string().min(1).default("HEAD"),
509
515
  path: z.string().optional(),
510
516
  recursive: z.boolean().default(true),
511
- cursor: z.string().optional(),
517
+ cursor: cursorSchema,
512
518
  limit: z.number().int().min(1).max(100).default(50)
513
519
  });
514
520
  const anonBlobInputSchema = anonRepoIdentSchema.extend({ oid: z.string().min(1) });
@@ -516,7 +522,7 @@ const anonRepoCreateInputSchema = z.object({
516
522
  name: repoNameSchema.optional(),
517
523
  description: z.string().max(512).optional(),
518
524
  defaultBranch: z.string().min(1).max(128).default("main"),
519
- ttlSeconds: z.number().int().min(60).max(86400 * 30).optional()
525
+ ttlSeconds: z.number().int().min(60).max(3600 * 72).optional()
520
526
  });
521
527
  const anonRepoSchema = repoSchema.extend({
522
528
  expiresAt: z.string(),
@@ -524,7 +530,7 @@ const anonRepoSchema = repoSchema.extend({
524
530
  });
525
531
  const anonRepoCreateOutputSchema = anonRepoSchema.extend({ anonId: z.string() });
526
532
  const anonRepoListInputSchema = z.object({
527
- cursor: z.string().optional(),
533
+ cursor: cursorSchema,
528
534
  limit: z.number().int().min(1).max(100).default(50)
529
535
  });
530
536
  const anonRepoListOutputSchema = z.object({
@@ -667,10 +673,13 @@ const invitationViewSchema = z.object({
667
673
  inviterId: z.string(),
668
674
  expiresAt: z.number()
669
675
  });
676
+ const invitationListItemSchema = invitationViewSchema.extend({ createdAt: z.number() });
670
677
  const orgInputSchema = z.object({ orgSlug: orgSlugSchema });
671
678
  const memberListOutputSchema = z.object({ items: z.array(memberViewSchema) });
679
+ const invitationListOutputSchema = z.object({ items: z.array(invitationListItemSchema) });
672
680
  const members = {
673
681
  list: ocBase.input(orgInputSchema).output(memberListOutputSchema),
682
+ listInvitations: ocBase.input(orgInputSchema).output(invitationListOutputSchema),
674
683
  invite: ocBase.input(orgInputSchema.extend({
675
684
  email: z.email(),
676
685
  role: mutableMemberRoleSchema
@@ -742,4 +751,4 @@ const contract = {
742
751
  tokens
743
752
  };
744
753
  //#endregion
745
- export { ANON_ID_STORE_VERSION, anonRepoSchema, apiKeyViewSchema, commonErrors, compareViewSchema, contract, diffFileSchema, diffViewSchema, gitBlobSchema, gitCommitSchema, gitRefSchema, gitTreeEntrySchema, invitationViewSchema, meViewSchema, memberRoleSchema, memberViewSchema, mutableMemberRoleSchema, orgSlugHint, orgSlugSchema, orgViewSchema, parseAnonIdFile, parseRepoName, repoNameHint, repoNameSchema, repoSchema, scopeSchema, serializeAnonIdRecord, tokenScopeSchema, tokenViewSchema };
754
+ export { ANON_ID_STORE_VERSION, CLONE_TOKEN_SCOPE, PERSONAL_ORG_SLUG, anonRepoSchema, apiKeyViewSchema, commonErrors, compareViewSchema, contract, cursorSchema, diffFileSchema, diffViewSchema, gitBlobSchema, gitCommitSchema, gitRefSchema, gitTreeEntrySchema, invitationListItemSchema, invitationViewSchema, meViewSchema, memberRoleSchema, memberViewSchema, mutableMemberRoleSchema, orgSlugHint, orgSlugSchema, orgViewSchema, parseAnonIdFile, parseRepoName, repoNameHint, repoNameSchema, repoSchema, scopeSchema, serializeAnonIdRecord, tokenScopeSchema, tokenViewSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repome/api",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Agent-native, GitHub-shaped forge — shared oRPC contract (zod schemas + procedure shapes).",
5
5
  "keywords": [
6
6
  "agent",