@fern-api/fdr-sdk 1.2.174-94f3833ee6 → 1.2.174-950bdb766f

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.
Files changed (43) hide show
  1. package/dist/js/client/FdrClient.js +366 -303
  2. package/dist/js/client/FdrClient.js.map +1 -1
  3. package/dist/js/client/FdrClient.mjs +366 -303
  4. package/dist/js/client/FdrClient.mjs.map +1 -1
  5. package/dist/js/index.js +641 -578
  6. package/dist/js/index.js.map +1 -1
  7. package/dist/js/index.mjs +641 -578
  8. package/dist/js/index.mjs.map +1 -1
  9. package/dist/js/orpc-client/dashboard/sdkVersion.js +3 -1
  10. package/dist/js/orpc-client/dashboard/sdkVersion.js.map +1 -1
  11. package/dist/js/orpc-client/dashboard/sdkVersion.mjs +3 -1
  12. package/dist/js/orpc-client/dashboard/sdkVersion.mjs.map +1 -1
  13. package/dist/js/orpc-client.js +743 -634
  14. package/dist/js/orpc-client.js.map +1 -1
  15. package/dist/js/orpc-client.mjs +729 -634
  16. package/dist/js/orpc-client.mjs.map +1 -1
  17. package/dist/orpc-client/dashboard/sdkVersion.d.ts +3 -1
  18. package/dist/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
  19. package/dist/orpc-client/dashboard/sdkVersion.js +6 -2
  20. package/dist/orpc-client/dashboard/sdkVersion.js.map +1 -1
  21. package/dist/orpc-client/dashboard/sdkVersion.test.js +5 -1
  22. package/dist/orpc-client/dashboard/sdkVersion.test.js.map +1 -1
  23. package/dist/orpc-client/mcp-hosting/contract.d.ts +138 -0
  24. package/dist/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
  25. package/dist/orpc-client/mcp-hosting/contract.js +17 -1
  26. package/dist/orpc-client/mcp-hosting/contract.js.map +1 -1
  27. package/dist/orpc-client/mcp-hosting/index.d.ts +1 -0
  28. package/dist/orpc-client/mcp-hosting/index.d.ts.map +1 -1
  29. package/dist/orpc-client/mcp-hosting/index.js +1 -0
  30. package/dist/orpc-client/mcp-hosting/index.js.map +1 -1
  31. package/dist/orpc-client/mcp-hosting/usage.d.ts +194 -0
  32. package/dist/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
  33. package/dist/orpc-client/mcp-hosting/usage.js +116 -0
  34. package/dist/orpc-client/mcp-hosting/usage.js.map +1 -0
  35. package/dist/types/orpc-client/dashboard/sdkVersion.d.ts +3 -1
  36. package/dist/types/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
  37. package/dist/types/orpc-client/mcp-hosting/contract.d.ts +138 -0
  38. package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
  39. package/dist/types/orpc-client/mcp-hosting/index.d.ts +1 -0
  40. package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -1
  41. package/dist/types/orpc-client/mcp-hosting/usage.d.ts +194 -0
  42. package/dist/types/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
  43. package/package.json +1 -1
@@ -6064,7 +6064,7 @@ import { OpenAPILink as OpenAPILink17 } from "@orpc/openapi-client/fetch";
6064
6064
 
6065
6065
  // src/orpc-client/mcp-hosting/contract.ts
6066
6066
  import { oc as oc15 } from "@orpc/contract";
6067
- import * as z28 from "zod";
6067
+ import * as z29 from "zod";
6068
6068
 
6069
6069
  // src/orpc-client/mcp-hosting/analytics.ts
6070
6070
  import * as z25 from "zod";
@@ -6701,46 +6701,97 @@ var McpDeploymentSkippedToolSchema = z27.object({
6701
6701
  path: z27.string().nullable()
6702
6702
  });
6703
6703
 
6704
+ // src/orpc-client/mcp-hosting/usage.ts
6705
+ import * as z28 from "zod";
6706
+ var McpOrgQuotaSchema = z28.object({
6707
+ /** Tool calls per month; null means no limit. */
6708
+ limit: z28.number().int().nonnegative().nullable(),
6709
+ /**
6710
+ * Sales approved the org to go over its limit. The dispatcher keeps
6711
+ * counting but never refuses a call.
6712
+ */
6713
+ approved: z28.boolean()
6714
+ });
6715
+ var UsageMonthSchema = z28.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/, "Expected yyyy-mm");
6716
+ var McpUsageCountsSchema = z28.object({
6717
+ month: UsageMonthSchema,
6718
+ toolCalls: z28.number().int().nonnegative(),
6719
+ /** Calls refused because the allowance was used up. */
6720
+ blockedCalls: z28.number().int().nonnegative(),
6721
+ servers: z28.array(z28.object({ slug: z28.string(), toolCalls: z28.number().int().nonnegative() })),
6722
+ /** Whether this dispatcher refuses calls over the allowance (QUOTA_ENFORCE), or only counts them. */
6723
+ enforced: z28.boolean()
6724
+ });
6725
+ var McpOrgIdSchema = z28.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
6726
+ var GetMcpUsageInputSchema = z28.object({
6727
+ orgId: McpOrgIdSchema,
6728
+ month: UsageMonthSchema.optional()
6729
+ });
6730
+ var SetMcpUsageAllowanceInputSchema = z28.object({
6731
+ orgId: McpOrgIdSchema,
6732
+ /** Tool calls per month; null means no limit. */
6733
+ limit: z28.number().int().nonnegative().max(1e9).nullable(),
6734
+ /** Approved to go over the limit: calls are counted but never refused. */
6735
+ approved: z28.boolean(),
6736
+ note: z28.string().max(500).optional()
6737
+ });
6738
+ var McpOrgUsageSchema = z28.object({
6739
+ month: UsageMonthSchema,
6740
+ resetsAt: z28.string(),
6741
+ toolCalls: z28.number().int().nonnegative(),
6742
+ blockedCalls: z28.number().int().nonnegative(),
6743
+ /** Tool calls per month; null means no limit. */
6744
+ limit: z28.number().int().nonnegative().nullable(),
6745
+ approved: z28.boolean(),
6746
+ /** The org has the free allowance (no allowance set by Fern). */
6747
+ isFreeAllowance: z28.boolean(),
6748
+ blocked: z28.boolean(),
6749
+ /** Whether calls over the allowance are refused in this environment, or only counted. */
6750
+ enforced: z28.boolean(),
6751
+ servers: z28.array(z28.object({ slug: z28.string(), toolCalls: z28.number().int().nonnegative() })),
6752
+ contactUrl: z28.string()
6753
+ });
6754
+
6704
6755
  // src/orpc-client/mcp-hosting/contract.ts
6705
- var McpPathSegmentSchema = z28.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
6706
- var McpDeploymentStatusSchema = z28.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
6707
- var McpModuleSchema = z28.object({
6708
- name: z28.string().regex(/^[A-Za-z0-9._/-]+$/),
6756
+ var McpPathSegmentSchema = z29.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
6757
+ var McpDeploymentStatusSchema = z29.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
6758
+ var McpModuleSchema = z29.object({
6759
+ name: z29.string().regex(/^[A-Za-z0-9._/-]+$/),
6709
6760
  hash: Sha256Schema,
6710
- contentType: z28.string().min(1)
6761
+ contentType: z29.string().min(1)
6711
6762
  }).strict();
6712
- var McpGitInputSchema = z28.object({
6713
- repoUrl: z28.string(),
6763
+ var McpGitInputSchema = z29.object({
6764
+ repoUrl: z29.string(),
6714
6765
  /** Absent on a detached HEAD (a CI checkout of a commit, say). */
6715
- branch: z28.string().optional(),
6716
- commitSha: z28.string().optional()
6766
+ branch: z29.string().optional(),
6767
+ commitSha: z29.string().optional()
6717
6768
  }).strict();
6718
- var McpInputFileSchema = z28.discriminatedUnion("name", [
6719
- z28.object({
6769
+ var McpInputFileSchema = z29.discriminatedUnion("name", [
6770
+ z29.object({
6720
6771
  /** The `sources` part of the build request, verbatim. */
6721
- name: z28.literal("specs.tar.gz"),
6722
- contentType: z28.literal("application/gzip"),
6772
+ name: z29.literal("specs.tar.gz"),
6773
+ contentType: z29.literal("application/gzip"),
6723
6774
  hash: Sha256Schema
6724
6775
  }).strict(),
6725
- z28.object({
6776
+ z29.object({
6726
6777
  /** This target's sdk-config payload. */
6727
- name: z28.literal("sdk-config.json"),
6728
- contentType: z28.literal("application/json"),
6778
+ name: z29.literal("sdk-config.json"),
6779
+ contentType: z29.literal("application/json"),
6729
6780
  hash: Sha256Schema
6730
6781
  }).strict(),
6731
- z28.object({
6782
+ z29.object({
6732
6783
  /** The build request narrowed to this target. */
6733
- name: z28.literal("build-request.json"),
6734
- contentType: z28.literal("application/json"),
6784
+ name: z29.literal("build-request.json"),
6785
+ contentType: z29.literal("application/json"),
6735
6786
  hash: Sha256Schema
6736
6787
  }).strict()
6737
6788
  ]);
6738
- var McpInputFilesSchema = z28.array(McpInputFileSchema).max(3).superRefine((inputs, ctx) => {
6789
+ var McpInputFilesSchema = z29.array(McpInputFileSchema).max(3).superRefine((inputs, ctx) => {
6739
6790
  const names = /* @__PURE__ */ new Set();
6740
6791
  for (const input of inputs) {
6741
6792
  if (names.has(input.name)) {
6742
6793
  ctx.addIssue({
6743
- code: z28.ZodIssueCode.custom,
6794
+ code: z29.ZodIssueCode.custom,
6744
6795
  message: `duplicate input name: ${input.name}`
6745
6796
  });
6746
6797
  }
@@ -6771,7 +6822,7 @@ function deployMetadataChecks(metadata, ctx) {
6771
6822
  for (const [toolset, members] of Object.entries(metadata.toolsets)) {
6772
6823
  if (!TOOLSET_NAME_PATTERN.test(toolset)) {
6773
6824
  ctx.addIssue({
6774
- code: z28.ZodIssueCode.custom,
6825
+ code: z29.ZodIssueCode.custom,
6775
6826
  path: ["toolsets", toolset],
6776
6827
  message: `toolset name "${toolset}" must match ${TOOLSET_NAME_PATTERN}`
6777
6828
  });
@@ -6779,7 +6830,7 @@ function deployMetadataChecks(metadata, ctx) {
6779
6830
  members.forEach((member, index) => {
6780
6831
  if (!TOOL_NAME_PATTERN.test(member)) {
6781
6832
  ctx.addIssue({
6782
- code: z28.ZodIssueCode.custom,
6833
+ code: z29.ZodIssueCode.custom,
6783
6834
  path: ["toolsets", toolset, index],
6784
6835
  message: `tool name "${member}" must match ${TOOL_NAME_PATTERN}`
6785
6836
  });
@@ -6789,28 +6840,28 @@ function deployMetadataChecks(metadata, ctx) {
6789
6840
  (metadata.tools ?? []).forEach((tool, index) => {
6790
6841
  if (!TOOL_NAME_PATTERN.test(tool.name)) {
6791
6842
  ctx.addIssue({
6792
- code: z28.ZodIssueCode.custom,
6843
+ code: z29.ZodIssueCode.custom,
6793
6844
  path: ["tools", index, "name"],
6794
6845
  message: `tool name "${tool.name}" must match ${TOOL_NAME_PATTERN}`
6795
6846
  });
6796
6847
  }
6797
6848
  if (tool.operationId != null && tool.operationId.length > MAX_OPERATION_ID_LENGTH) {
6798
6849
  ctx.addIssue({
6799
- code: z28.ZodIssueCode.custom,
6850
+ code: z29.ZodIssueCode.custom,
6800
6851
  path: ["tools", index, "operationId"],
6801
6852
  message: `operationId must be at most ${MAX_OPERATION_ID_LENGTH} characters`
6802
6853
  });
6803
6854
  }
6804
6855
  if (tool.method.length > MAX_METHOD_LENGTH) {
6805
6856
  ctx.addIssue({
6806
- code: z28.ZodIssueCode.custom,
6857
+ code: z29.ZodIssueCode.custom,
6807
6858
  path: ["tools", index, "method"],
6808
6859
  message: `method must be at most ${MAX_METHOD_LENGTH} characters`
6809
6860
  });
6810
6861
  }
6811
6862
  if (tool.path.length > MAX_PATH_LENGTH) {
6812
6863
  ctx.addIssue({
6813
- code: z28.ZodIssueCode.custom,
6864
+ code: z29.ZodIssueCode.custom,
6814
6865
  path: ["tools", index, "path"],
6815
6866
  message: `path must be at most ${MAX_PATH_LENGTH} characters`
6816
6867
  });
@@ -6819,7 +6870,7 @@ function deployMetadataChecks(metadata, ctx) {
6819
6870
  metadata.auth.schemes.forEach((scheme, index) => {
6820
6871
  if (scheme.type === "apiKey" && !HEADER_TOKEN_PATTERN.test(scheme.paramName)) {
6821
6872
  ctx.addIssue({
6822
- code: z28.ZodIssueCode.custom,
6873
+ code: z29.ZodIssueCode.custom,
6823
6874
  path: ["auth", "schemes", index, "paramName"],
6824
6875
  message: `paramName "${scheme.paramName}" must be an RFC 7230 token of at most 128 characters`
6825
6876
  });
@@ -6827,30 +6878,30 @@ function deployMetadataChecks(metadata, ctx) {
6827
6878
  });
6828
6879
  if (!maxSerializedBytes(MCP_METADATA_MAX_BYTES)(metadata)) {
6829
6880
  ctx.addIssue({
6830
- code: z28.ZodIssueCode.custom,
6881
+ code: z29.ZodIssueCode.custom,
6831
6882
  message: `metadata must be at most ${MCP_METADATA_MAX_BYTES} bytes serialized`
6832
6883
  });
6833
6884
  }
6834
6885
  }
6835
- var DeployMcpServerInputSchema = z28.object({
6886
+ var DeployMcpServerInputSchema = z29.object({
6836
6887
  orgId: McpPathSegmentSchema,
6837
6888
  slug: McpPathSegmentSchema,
6838
- mainModule: z28.string().min(1),
6839
- compatibilityDate: z28.string().regex(/^\d{4}-\d{2}-\d{2}$/),
6840
- compatibilityFlags: z28.array(z28.string()),
6889
+ mainModule: z29.string().min(1),
6890
+ compatibilityDate: z29.string().regex(/^\d{4}-\d{2}-\d{2}$/),
6891
+ compatibilityFlags: z29.array(z29.string()),
6841
6892
  // Bounded so a single deploy request cannot fan out unbounded parallel
6842
6893
  // CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
6843
6894
  // 20 leaves room for wasm/sourcemap/chunk splitting.
6844
- modules: z28.array(McpModuleSchema).min(1).max(20),
6895
+ modules: z29.array(McpModuleSchema).min(1).max(20),
6845
6896
  metadata: McpMetadataSchema.superRefine(deployMetadataChecks),
6846
6897
  // Everything else in this schema is bounded; keep the opaque config
6847
6898
  // blob bounded too so it cannot balloon the JSONB row.
6848
- config: z28.unknown().optional().refine(maxSerializedBytes(MCP_CONFIG_MAX_BYTES), {
6899
+ config: z29.unknown().optional().refine(maxSerializedBytes(MCP_CONFIG_MAX_BYTES), {
6849
6900
  message: `config must be at most ${MCP_CONFIG_MAX_BYTES} bytes serialized`
6850
6901
  }),
6851
- generatorName: z28.string().min(1),
6852
- generatorVersion: z28.string().min(1),
6853
- cliVersion: z28.string().optional(),
6902
+ generatorName: z29.string().min(1),
6903
+ generatorVersion: z29.string().min(1),
6904
+ cliVersion: z29.string().optional(),
6854
6905
  git: McpGitInputSchema.optional(),
6855
6906
  inputs: McpInputFilesSchema.optional()
6856
6907
  }).strict().superRefine((input, ctx) => {
@@ -6858,7 +6909,7 @@ var DeployMcpServerInputSchema = z28.object({
6858
6909
  for (const module of input.modules) {
6859
6910
  if (names.has(module.name)) {
6860
6911
  ctx.addIssue({
6861
- code: z28.ZodIssueCode.custom,
6912
+ code: z29.ZodIssueCode.custom,
6862
6913
  path: ["modules"],
6863
6914
  message: `duplicate module name: ${module.name}`
6864
6915
  });
@@ -6867,18 +6918,18 @@ var DeployMcpServerInputSchema = z28.object({
6867
6918
  }
6868
6919
  if (!names.has(input.mainModule)) {
6869
6920
  ctx.addIssue({
6870
- code: z28.ZodIssueCode.custom,
6921
+ code: z29.ZodIssueCode.custom,
6871
6922
  path: ["mainModule"],
6872
6923
  message: `mainModule ${input.mainModule} is not among the submitted modules`
6873
6924
  });
6874
6925
  }
6875
6926
  });
6876
- var GetMcpServerInputSchema = z28.object({
6927
+ var GetMcpServerInputSchema = z29.object({
6877
6928
  orgId: McpPathSegmentSchema,
6878
6929
  slug: McpPathSegmentSchema
6879
6930
  });
6880
6931
  var GetMcpServerBrandingInputSchema = GetMcpServerInputSchema;
6881
- var GetMcpServerBrandingResponseSchema = z28.object({
6932
+ var GetMcpServerBrandingResponseSchema = z29.object({
6882
6933
  branding: McpServerBrandingSchema,
6883
6934
  inherited: DeploymentThemeSchema.nullable()
6884
6935
  });
@@ -6891,35 +6942,35 @@ var UpdateMcpServerAuthInputSchema = GetMcpServerInputSchema.extend(
6891
6942
  ).superRefine(mcpServerAuthChecks);
6892
6943
  var MCP_EXCHANGE_SECRET_MAX_LENGTH = 4096;
6893
6944
  var SetMcpServerExchangeSecretInputSchema = GetMcpServerInputSchema.extend({
6894
- secret: z28.string().min(1).max(MCP_EXCHANGE_SECRET_MAX_LENGTH).nullable()
6945
+ secret: z29.string().min(1).max(MCP_EXCHANGE_SECRET_MAX_LENGTH).nullable()
6895
6946
  });
6896
6947
  var SetMcpServerIpAllowListInputSchema = GetMcpServerInputSchema.extend({
6897
6948
  ranges: McpIpAllowListSchema
6898
6949
  });
6899
- var ListMcpServersInputSchema = z28.object({
6900
- orgId: z28.string()
6950
+ var ListMcpServersInputSchema = z29.object({
6951
+ orgId: z29.string()
6901
6952
  });
6902
6953
  var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
6903
6954
  var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
6904
6955
  var PauseMcpServerInputSchema = GetMcpServerInputSchema;
6905
6956
  var ResumeMcpServerInputSchema = GetMcpServerInputSchema;
6906
6957
  var RenameMcpServerInputSchema = GetMcpServerInputSchema.extend({ newSlug: McpPathSegmentSchema });
6907
- var GetMcpDeploymentInputSchema = z28.object({
6958
+ var GetMcpDeploymentInputSchema = z29.object({
6908
6959
  orgId: McpPathSegmentSchema,
6909
6960
  slug: McpPathSegmentSchema,
6910
6961
  /** Id of one of the server's attempts (the rows are uuid v7). */
6911
- deploymentId: z28.string().uuid()
6962
+ deploymentId: z29.string().uuid()
6912
6963
  });
6913
- var RollbackMcpServerInputSchema = z28.object({
6964
+ var RollbackMcpServerInputSchema = z29.object({
6914
6965
  orgId: McpPathSegmentSchema,
6915
6966
  slug: McpPathSegmentSchema,
6916
6967
  /** Id of the SUCCEEDED deployment whose payload should serve again. */
6917
- deploymentId: z28.string().min(1).max(64)
6968
+ deploymentId: z29.string().min(1).max(64)
6918
6969
  });
6919
6970
  var GetMcpCustomDomainInputSchema = GetMcpServerInputSchema;
6920
6971
  var RefreshMcpCustomDomainInputSchema = GetMcpServerInputSchema;
6921
6972
  var RemoveMcpCustomDomainInputSchema = GetMcpServerInputSchema;
6922
- var SetMcpCustomDomainInputSchema = z28.object({
6973
+ var SetMcpCustomDomainInputSchema = z29.object({
6923
6974
  orgId: McpPathSegmentSchema,
6924
6975
  slug: McpPathSegmentSchema,
6925
6976
  /**
@@ -6927,52 +6978,52 @@ var SetMcpCustomDomainInputSchema = z28.object({
6927
6978
  * against validateCustomDomain (customDomain.ts) and normalized by FDR;
6928
6979
  * the length cap only bounds what is parsed.
6929
6980
  */
6930
- hostname: z28.string().min(1).max(512)
6981
+ hostname: z29.string().min(1).max(512)
6931
6982
  });
6932
- var GetMcpAnalyticsInputSchema = z28.object({
6983
+ var GetMcpAnalyticsInputSchema = z29.object({
6933
6984
  orgId: McpPathSegmentSchema,
6934
6985
  slug: McpPathSegmentSchema,
6935
6986
  window: McpAnalyticsWindowSchema.default("24h")
6936
6987
  });
6937
- var McpDeploymentGitSchema = z28.object({
6938
- repoUrl: z28.string(),
6939
- branch: z28.string().nullish(),
6940
- commitSha: z28.string().nullish()
6988
+ var McpDeploymentGitSchema = z29.object({
6989
+ repoUrl: z29.string(),
6990
+ branch: z29.string().nullish(),
6991
+ commitSha: z29.string().nullish()
6941
6992
  });
6942
- var McpDeploymentSummarySchema = z28.object({
6943
- id: z28.string(),
6993
+ var McpDeploymentSummarySchema = z29.object({
6994
+ id: z29.string(),
6944
6995
  status: McpDeploymentStatusSchema,
6945
6996
  /** True when this deployment is the one the server currently serves. */
6946
- isActive: z28.boolean(),
6997
+ isActive: z29.boolean(),
6947
6998
  /**
6948
6999
  * Docker image name of the generator that produced this attempt's payload
6949
7000
  * (DeployMcpServerInputSchema.generatorName). Null only on the wire from
6950
7001
  * an FDR that predates the field; the column itself is required.
6951
7002
  */
6952
- generatorName: z28.string().nullish(),
6953
- generatorVersion: z28.string(),
6954
- createdAt: z28.string(),
6955
- createdBy: z28.string().nullish(),
6956
- error: z28.object({ name: z28.string(), message: z28.string() }).nullish(),
7003
+ generatorName: z29.string().nullish(),
7004
+ generatorVersion: z29.string(),
7005
+ createdAt: z29.string(),
7006
+ createdBy: z29.string().nullish(),
7007
+ error: z29.object({ name: z29.string(), message: z29.string() }).nullish(),
6957
7008
  /**
6958
7009
  * Set when this attempt republished an earlier deployment's payload
6959
7010
  * (rollbackServer): the id of that source deployment. Null for attempts
6960
7011
  * that came from a deploy.
6961
7012
  */
6962
- rolledBackFromDeploymentId: z28.string().nullish(),
7013
+ rolledBackFromDeploymentId: z29.string().nullish(),
6963
7014
  /**
6964
7015
  * Headline tool count of this attempt's payload, by the same rule as
6965
7016
  * McpServerCatalogSummarySchema.toolCount. Null when the stored payload
6966
7017
  * predates the current metadata schema.
6967
7018
  */
6968
- toolCount: z28.number().int().nullish(),
7019
+ toolCount: z29.number().int().nullish(),
6969
7020
  /**
6970
7021
  * Version of the Fern CLI that submitted this attempt, when one identified
6971
7022
  * itself (DeployMcpServerInputSchema.cliVersion). Null for attempts that
6972
7023
  * reached the deploy endpoint without it, and for rollbacks, which FDR
6973
7024
  * records on its own behalf.
6974
7025
  */
6975
- cliVersion: z28.string().nullish(),
7026
+ cliVersion: z29.string().nullish(),
6976
7027
  /**
6977
7028
  * The CI run that submitted this attempt, as the CLI described it in the
6978
7029
  * `X-CI-Source` header and FDR sanitized it (the same treatment docs
@@ -6981,7 +7032,7 @@ var McpDeploymentSummarySchema = z28.object({
6981
7032
  * and, like the deployer headers, self-asserted by the caller. Null for
6982
7033
  * local deploys and rollbacks.
6983
7034
  */
6984
- ciSource: z28.record(z28.string(), z28.unknown()).nullish(),
7035
+ ciSource: z29.record(z29.string(), z29.unknown()).nullish(),
6985
7036
  /**
6986
7037
  * The repository this attempt's payload was generated from, as the CLI
6987
7038
  * reported it (DeployMcpServerInputSchema.git). A rollback carries its
@@ -6997,47 +7048,47 @@ var McpDeploymentSummarySchema = z28.object({
6997
7048
  * deployment it restored always do — so it names what a version *is* rather
6998
7049
  * than which row it was. Null when the stored module list does not parse.
6999
7050
  */
7000
- bundleDigest: z28.string().nullish()
7051
+ bundleDigest: z29.string().nullish()
7001
7052
  });
7002
- var McpDeploymentInputFileSchema = z28.object({
7003
- name: z28.string(),
7004
- contentType: z28.string(),
7005
- hash: z28.string(),
7006
- downloadUrl: z28.string()
7053
+ var McpDeploymentInputFileSchema = z29.object({
7054
+ name: z29.string(),
7055
+ contentType: z29.string(),
7056
+ hash: z29.string(),
7057
+ downloadUrl: z29.string()
7007
7058
  });
7008
7059
  var McpDeploymentDetailSchema = McpDeploymentSummarySchema.extend({
7009
7060
  /** Empty when the stored metadata carries no `tools` (generators before provenance). */
7010
- tools: z28.array(McpDeploymentToolSchema),
7011
- skippedTools: z28.array(McpDeploymentSkippedToolSchema),
7061
+ tools: z29.array(McpDeploymentToolSchema),
7062
+ skippedTools: z29.array(McpDeploymentSkippedToolSchema),
7012
7063
  /** The stored toolset membership map, as deployed. */
7013
- toolsets: z28.record(z28.string(), z28.array(z28.string())),
7064
+ toolsets: z29.record(z29.string(), z29.array(z29.string())),
7014
7065
  /** The raw generators.yml `config:` block the CLI sent, or null. Visible to org members. */
7015
- config: z28.unknown().nullable(),
7066
+ config: z29.unknown().nullable(),
7016
7067
  /** Null when the attempt recorded no inputs (older CLIs, rollbacks of such rows). */
7017
- inputs: z28.array(McpDeploymentInputFileSchema).nullable()
7068
+ inputs: z29.array(McpDeploymentInputFileSchema).nullable()
7018
7069
  });
7019
- var McpCustomDomainStatusSchema = z28.enum(["PENDING", "ACTIVE", "FAILED"]);
7020
- var McpCustomDomainRecordSchema = z28.object({
7021
- type: z28.enum(["CNAME", "TXT"]),
7022
- name: z28.string(),
7023
- value: z28.string(),
7070
+ var McpCustomDomainStatusSchema = z29.enum(["PENDING", "ACTIVE", "FAILED"]);
7071
+ var McpCustomDomainRecordSchema = z29.object({
7072
+ type: z29.enum(["CNAME", "TXT"]),
7073
+ name: z29.string(),
7074
+ value: z29.string(),
7024
7075
  /** What the record is for, in a sentence the dashboard can show beside it. */
7025
- purpose: z28.string()
7076
+ purpose: z29.string()
7026
7077
  });
7027
- var McpCustomDomainSchema = z28.object({
7028
- hostname: z28.string(),
7078
+ var McpCustomDomainSchema = z29.object({
7079
+ hostname: z29.string(),
7029
7080
  status: McpCustomDomainStatusSchema,
7030
7081
  /** Records still to add; empty once the domain is ACTIVE. */
7031
- records: z28.array(McpCustomDomainRecordSchema),
7082
+ records: z29.array(McpCustomDomainRecordSchema),
7032
7083
  /** Why Cloudflare could not verify the domain or issue its certificate, when it said. */
7033
- errors: z28.array(z28.string()),
7034
- createdAt: z28.string(),
7035
- updatedAt: z28.string()
7036
- });
7037
- var McpServerSchema = z28.object({
7038
- id: z28.string(),
7039
- orgId: z28.string(),
7040
- slug: z28.string(),
7084
+ errors: z29.array(z29.string()),
7085
+ createdAt: z29.string(),
7086
+ updatedAt: z29.string()
7087
+ });
7088
+ var McpServerSchema = z29.object({
7089
+ id: z29.string(),
7090
+ orgId: z29.string(),
7091
+ slug: z29.string(),
7041
7092
  /** Per-server custom branding; empty when no values are set. */
7042
7093
  branding: McpServerBrandingSchema,
7043
7094
  /**
@@ -7051,9 +7102,9 @@ var McpServerSchema = z28.object({
7051
7102
  * setServerIpAllowList. Empty means open. Kept across deploys and
7052
7103
  * rollbacks. Absent only on the wire from an FDR that predates the field.
7053
7104
  */
7054
- ipAllowList: z28.array(z28.string()).optional(),
7105
+ ipAllowList: z29.array(z29.string()).optional(),
7055
7106
  /** The server is serving iff this is set; it names the serving deployment. */
7056
- activeDeploymentId: z28.string().nullish(),
7107
+ activeDeploymentId: z29.string().nullish(),
7057
7108
  /** Most recent publication attempt — how the last deploy went. */
7058
7109
  latestDeployment: McpDeploymentSummarySchema.nullish(),
7059
7110
  /**
@@ -7062,7 +7113,7 @@ var McpServerSchema = z28.object({
7062
7113
  * (KV_KEY_PREFIX_PAUSED in kv.ts). Independent of activeDeploymentId: a
7063
7114
  * paused server keeps its serving deployment and resumes exactly there.
7064
7115
  */
7065
- pausedAt: z28.string().nullish(),
7116
+ pausedAt: z29.string().nullish(),
7066
7117
  /**
7067
7118
  * What the server offers, derived from the ACTIVE deployment's stored
7068
7119
  * metadata (tools, toolsets, auth, configuration). Null when nothing is
@@ -7076,14 +7127,14 @@ var McpServerSchema = z28.object({
7076
7127
  * a UI shows both. Only an ACTIVE domain serves: read `customDomainStatus`
7077
7128
  * to tell a pending one from a live one.
7078
7129
  */
7079
- customDomain: z28.string().nullish(),
7130
+ customDomain: z29.string().nullish(),
7080
7131
  customDomainStatus: McpCustomDomainStatusSchema.nullish(),
7081
- url: z28.string().url(),
7082
- createdAt: z28.string(),
7083
- updatedAt: z28.string()
7132
+ url: z29.string().url(),
7133
+ createdAt: z29.string(),
7134
+ updatedAt: z29.string()
7084
7135
  });
7085
- var ListMcpServersResponseSchema = z28.object({ servers: z28.array(McpServerSchema) });
7086
- var ListMcpDeploymentsResponseSchema = z28.object({ deployments: z28.array(McpDeploymentSummarySchema) });
7136
+ var ListMcpServersResponseSchema = z29.object({ servers: z29.array(McpServerSchema) });
7137
+ var ListMcpDeploymentsResponseSchema = z29.object({ deployments: z29.array(McpDeploymentSummarySchema) });
7087
7138
  var mcpHostingContract = {
7088
7139
  deploy: oc15.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
7089
7140
  getServer: oc15.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
@@ -7171,7 +7222,19 @@ var mcpHostingContract = {
7171
7222
  * Analytics Engine by FDR (the tenant filter is applied server-side, so no
7172
7223
  * Cloudflare credential reaches the browser). See analytics.ts.
7173
7224
  */
7174
- getAnalytics: oc15.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema)
7225
+ getAnalytics: oc15.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema),
7226
+ /**
7227
+ * The org's exact tool-call count for a month against its allowance
7228
+ * (usage.ts). Any member. NOT_IMPLEMENTED when FDR has no usage read
7229
+ * token for the dispatcher.
7230
+ */
7231
+ getUsage: oc15.route({ method: "GET", path: "/usage" }).input(GetMcpUsageInputSchema).output(McpOrgUsageSchema),
7232
+ /**
7233
+ * Set the org's monthly allowance (sales raising a limit or approving an
7234
+ * org to go over). Fern staff (super-users) only. Applies at the
7235
+ * dispatcher within KV's propagation time plus its one-minute cache.
7236
+ */
7237
+ setUsageAllowance: oc15.route({ method: "PUT", path: "/usage/allowance" }).input(SetMcpUsageAllowanceInputSchema).output(McpOrgUsageSchema)
7175
7238
  };
7176
7239
 
7177
7240
  // src/orpc-client/mcp-hosting/client.ts
@@ -7193,87 +7256,87 @@ import { OpenAPILink as OpenAPILink18 } from "@orpc/openapi-client/fetch";
7193
7256
 
7194
7257
  // src/orpc-client/pdf-export/contract.ts
7195
7258
  import { oc as oc16 } from "@orpc/contract";
7196
- import * as z29 from "zod";
7197
- var PdfExportScopeSchema = z29.object({
7198
- pageSlugs: z29.array(z29.string())
7199
- });
7200
- var PdfExportOptionsV1Schema = z29.object({
7201
- coverTitle: z29.string().nullish(),
7202
- coverSubtitle: z29.string().nullish(),
7203
- hideCoverFooter: z29.boolean().nullish(),
7204
- headerLeftTemplate: z29.string().nullish(),
7205
- headerRightTemplate: z29.string().nullish(),
7206
- footerLeftTemplate: z29.string().nullish(),
7207
- footerRightTemplate: z29.string().nullish(),
7259
+ import * as z30 from "zod";
7260
+ var PdfExportScopeSchema = z30.object({
7261
+ pageSlugs: z30.array(z30.string())
7262
+ });
7263
+ var PdfExportOptionsV1Schema = z30.object({
7264
+ coverTitle: z30.string().nullish(),
7265
+ coverSubtitle: z30.string().nullish(),
7266
+ hideCoverFooter: z30.boolean().nullish(),
7267
+ headerLeftTemplate: z30.string().nullish(),
7268
+ headerRightTemplate: z30.string().nullish(),
7269
+ footerLeftTemplate: z30.string().nullish(),
7270
+ footerRightTemplate: z30.string().nullish(),
7208
7271
  scope: PdfExportScopeSchema.nullish(),
7209
- hideCover: z29.boolean().nullish(),
7210
- hideToc: z29.boolean().nullish()
7272
+ hideCover: z30.boolean().nullish(),
7273
+ hideToc: z30.boolean().nullish()
7211
7274
  });
7212
- var PdfExportOptionsSchema = z29.discriminatedUnion("version", [
7213
- z29.object({ version: z29.literal("v1") }).merge(PdfExportOptionsV1Schema)
7275
+ var PdfExportOptionsSchema = z30.discriminatedUnion("version", [
7276
+ z30.object({ version: z30.literal("v1") }).merge(PdfExportOptionsV1Schema)
7214
7277
  ]);
7215
- var PdfExportTaskStatusSchema = z29.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
7216
- var PdfExportFormatSchema = z29.enum(["pdf", "html", "md"]);
7217
- var PdfExportTaskSchema = z29.object({
7218
- id: z29.string(),
7219
- orgId: z29.string(),
7220
- docsUrl: z29.string(),
7221
- productId: z29.string().nullish(),
7222
- versionId: z29.string().nullish(),
7223
- requesterName: z29.string().nullish(),
7224
- notifyEmails: z29.array(z29.string()).nullish(),
7278
+ var PdfExportTaskStatusSchema = z30.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
7279
+ var PdfExportFormatSchema = z30.enum(["pdf", "html", "md"]);
7280
+ var PdfExportTaskSchema = z30.object({
7281
+ id: z30.string(),
7282
+ orgId: z30.string(),
7283
+ docsUrl: z30.string(),
7284
+ productId: z30.string().nullish(),
7285
+ versionId: z30.string().nullish(),
7286
+ requesterName: z30.string().nullish(),
7287
+ notifyEmails: z30.array(z30.string()).nullish(),
7225
7288
  status: PdfExportTaskStatusSchema,
7226
7289
  format: PdfExportFormatSchema.nullish(),
7227
7290
  options: PdfExportOptionsSchema.nullish(),
7228
- createdAt: z29.string(),
7229
- startedAt: z29.string().nullish(),
7230
- completedAt: z29.string().nullish(),
7231
- fileName: z29.string().nullish(),
7232
- sizeBytes: z29.number().nullish(),
7233
- errorMessage: z29.string().nullish()
7234
- });
7235
- var ListPdfExportTasksResponseSchema = z29.object({
7236
- tasks: z29.array(PdfExportTaskSchema)
7237
- });
7238
- var PdfExportDownloadResponseSchema = z29.object({
7239
- downloadUrl: z29.string(),
7240
- fileName: z29.string(),
7241
- sizeBytes: z29.number()
7242
- });
7243
- var CreatePdfExportTaskInputSchema = z29.object({
7244
- orgId: z29.string(),
7245
- docsUrl: z29.string(),
7246
- productId: z29.string().nullish(),
7247
- versionId: z29.string().nullish(),
7248
- requesterName: z29.string().nullish(),
7291
+ createdAt: z30.string(),
7292
+ startedAt: z30.string().nullish(),
7293
+ completedAt: z30.string().nullish(),
7294
+ fileName: z30.string().nullish(),
7295
+ sizeBytes: z30.number().nullish(),
7296
+ errorMessage: z30.string().nullish()
7297
+ });
7298
+ var ListPdfExportTasksResponseSchema = z30.object({
7299
+ tasks: z30.array(PdfExportTaskSchema)
7300
+ });
7301
+ var PdfExportDownloadResponseSchema = z30.object({
7302
+ downloadUrl: z30.string(),
7303
+ fileName: z30.string(),
7304
+ sizeBytes: z30.number()
7305
+ });
7306
+ var CreatePdfExportTaskInputSchema = z30.object({
7307
+ orgId: z30.string(),
7308
+ docsUrl: z30.string(),
7309
+ productId: z30.string().nullish(),
7310
+ versionId: z30.string().nullish(),
7311
+ requesterName: z30.string().nullish(),
7249
7312
  format: PdfExportFormatSchema.nullish(),
7250
7313
  options: PdfExportOptionsSchema.nullish()
7251
7314
  });
7252
- var ListPdfExportTasksInputSchema = z29.object({
7253
- orgId: z29.string(),
7254
- docsUrl: z29.string(),
7255
- limit: z29.coerce.number().nullish()
7315
+ var ListPdfExportTasksInputSchema = z30.object({
7316
+ orgId: z30.string(),
7317
+ docsUrl: z30.string(),
7318
+ limit: z30.coerce.number().nullish()
7256
7319
  });
7257
- var GetPdfExportTaskInputSchema = z29.object({
7258
- taskId: z29.string()
7320
+ var GetPdfExportTaskInputSchema = z30.object({
7321
+ taskId: z30.string()
7259
7322
  });
7260
- var UpdatePdfExportTaskInputSchema = z29.object({
7261
- taskId: z29.string(),
7323
+ var UpdatePdfExportTaskInputSchema = z30.object({
7324
+ taskId: z30.string(),
7262
7325
  status: PdfExportTaskStatusSchema,
7263
- startedAt: z29.string().nullish(),
7264
- completedAt: z29.string().nullish(),
7265
- s3Key: z29.string().nullish(),
7266
- fileName: z29.string().nullish(),
7267
- sizeBytes: z29.number().nullish(),
7268
- errorMessage: z29.string().nullish()
7326
+ startedAt: z30.string().nullish(),
7327
+ completedAt: z30.string().nullish(),
7328
+ s3Key: z30.string().nullish(),
7329
+ fileName: z30.string().nullish(),
7330
+ sizeBytes: z30.number().nullish(),
7331
+ errorMessage: z30.string().nullish()
7269
7332
  });
7270
- var GetPdfExportDownloadUrlInputSchema = z29.object({
7271
- taskId: z29.string()
7333
+ var GetPdfExportDownloadUrlInputSchema = z30.object({
7334
+ taskId: z30.string()
7272
7335
  });
7273
- var CleanupPdfExportsResponseSchema = z29.object({
7274
- expiredTasksDeleted: z29.number(),
7275
- s3ObjectsDeleted: z29.number(),
7276
- timedOutTasksFailed: z29.number()
7336
+ var CleanupPdfExportsResponseSchema = z30.object({
7337
+ expiredTasksDeleted: z30.number(),
7338
+ s3ObjectsDeleted: z30.number(),
7339
+ timedOutTasksFailed: z30.number()
7277
7340
  });
7278
7341
  var pdfExportContract = {
7279
7342
  createTask: oc16.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
@@ -7306,8 +7369,8 @@ import { OpenAPILink as OpenAPILink19 } from "@orpc/openapi-client/fetch";
7306
7369
 
7307
7370
  // src/orpc-client/sdks/contract.ts
7308
7371
  import { oc as oc17 } from "@orpc/contract";
7309
- import * as z30 from "zod";
7310
- var LanguageEnumSchema = z30.enum([
7372
+ import * as z31 from "zod";
7373
+ var LanguageEnumSchema = z31.enum([
7311
7374
  "Go",
7312
7375
  "TypeScript",
7313
7376
  "Java",
@@ -7318,14 +7381,14 @@ var LanguageEnumSchema = z30.enum([
7318
7381
  "Swift",
7319
7382
  "Rust"
7320
7383
  ]);
7321
- var VersionBumpEnumSchema = z30.enum(["MAJOR", "MINOR", "PATCH"]);
7322
- var ComputeSemanticVersionInputSchema = z30.object({
7323
- package: z30.string(),
7384
+ var VersionBumpEnumSchema = z31.enum(["MAJOR", "MINOR", "PATCH"]);
7385
+ var ComputeSemanticVersionInputSchema = z31.object({
7386
+ package: z31.string(),
7324
7387
  language: LanguageEnumSchema,
7325
- githubRepository: z30.string().nullish()
7388
+ githubRepository: z31.string().nullish()
7326
7389
  });
7327
- var ComputeSemanticVersionOutputSchema = z30.object({
7328
- version: z30.string(),
7390
+ var ComputeSemanticVersionOutputSchema = z31.object({
7391
+ version: z31.string(),
7329
7392
  bump: VersionBumpEnumSchema
7330
7393
  });
7331
7394
  var sdksContract = {
@@ -7351,32 +7414,32 @@ import { OpenAPILink as OpenAPILink20 } from "@orpc/openapi-client/fetch";
7351
7414
 
7352
7415
  // src/orpc-client/slugs/contract.ts
7353
7416
  import { oc as oc18 } from "@orpc/contract";
7354
- import * as z31 from "zod";
7355
- var SlugsInputSchema = z31.object({
7356
- domain: z31.string(),
7357
- basepath: z31.string().optional().default("")
7358
- });
7359
- var SlugEntrySchema = z31.object({
7360
- orgId: z31.string(),
7361
- domain: z31.string(),
7362
- basepath: z31.string(),
7363
- slug: z31.string(),
7364
- lastUpdated: z31.string()
7365
- });
7366
- var MarkdownEntrySchema = z31.object({
7367
- orgId: z31.string(),
7368
- domain: z31.string(),
7369
- basepath: z31.string(),
7370
- pageId: z31.string(),
7371
- slug: z31.string(),
7372
- hash: z31.string(),
7373
- lastUpdated: z31.string()
7374
- });
7375
- var GetSlugEntriesResponseSchema = z31.object({
7376
- entries: z31.array(SlugEntrySchema)
7377
- });
7378
- var GetMarkdownEntriesResponseSchema = z31.object({
7379
- entries: z31.array(MarkdownEntrySchema)
7417
+ import * as z32 from "zod";
7418
+ var SlugsInputSchema = z32.object({
7419
+ domain: z32.string(),
7420
+ basepath: z32.string().optional().default("")
7421
+ });
7422
+ var SlugEntrySchema = z32.object({
7423
+ orgId: z32.string(),
7424
+ domain: z32.string(),
7425
+ basepath: z32.string(),
7426
+ slug: z32.string(),
7427
+ lastUpdated: z32.string()
7428
+ });
7429
+ var MarkdownEntrySchema = z32.object({
7430
+ orgId: z32.string(),
7431
+ domain: z32.string(),
7432
+ basepath: z32.string(),
7433
+ pageId: z32.string(),
7434
+ slug: z32.string(),
7435
+ hash: z32.string(),
7436
+ lastUpdated: z32.string()
7437
+ });
7438
+ var GetSlugEntriesResponseSchema = z32.object({
7439
+ entries: z32.array(SlugEntrySchema)
7440
+ });
7441
+ var GetMarkdownEntriesResponseSchema = z32.object({
7442
+ entries: z32.array(MarkdownEntrySchema)
7380
7443
  });
7381
7444
  var slugsContract = {
7382
7445
  getSlugEntries: oc18.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
@@ -7402,102 +7465,102 @@ import { OpenAPILink as OpenAPILink21 } from "@orpc/openapi-client/fetch";
7402
7465
 
7403
7466
  // src/orpc-client/snippets/contract.ts
7404
7467
  import { oc as oc19 } from "@orpc/contract";
7405
- import * as z32 from "zod";
7406
- var TypeScriptSdkSchema = z32.object({ package: z32.string(), version: z32.string() });
7407
- var PythonSdkSchema = z32.object({ package: z32.string(), version: z32.string() });
7408
- var GoSdkSchema = z32.object({ githubRepo: z32.string(), version: z32.string() });
7409
- var RubySdkSchema = z32.object({ gem: z32.string(), version: z32.string() });
7410
- var JavaSdkSchema = z32.object({ group: z32.string(), artifact: z32.string(), version: z32.string() });
7411
- var CsharpSdkSchema = z32.object({ package: z32.string(), version: z32.string() });
7412
- var BaseSnippetCreateSchema = z32.object({
7468
+ import * as z33 from "zod";
7469
+ var TypeScriptSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
7470
+ var PythonSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
7471
+ var GoSdkSchema = z33.object({ githubRepo: z33.string(), version: z33.string() });
7472
+ var RubySdkSchema = z33.object({ gem: z33.string(), version: z33.string() });
7473
+ var JavaSdkSchema = z33.object({ group: z33.string(), artifact: z33.string(), version: z33.string() });
7474
+ var CsharpSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
7475
+ var BaseSnippetCreateSchema = z33.object({
7413
7476
  endpoint: EndpointIdentifierSchema,
7414
- exampleIdentifier: z32.string().nullish()
7477
+ exampleIdentifier: z33.string().nullish()
7415
7478
  });
7416
- var SdkSnippetsCreateSchema = z32.discriminatedUnion("type", [
7417
- z32.object({
7418
- type: z32.literal("typescript"),
7479
+ var SdkSnippetsCreateSchema = z33.discriminatedUnion("type", [
7480
+ z33.object({
7481
+ type: z33.literal("typescript"),
7419
7482
  sdk: TypeScriptSdkSchema,
7420
- snippets: z32.array(BaseSnippetCreateSchema.extend({ snippet: z32.object({ client: z32.string() }) }))
7483
+ snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
7421
7484
  }),
7422
- z32.object({
7423
- type: z32.literal("python"),
7485
+ z33.object({
7486
+ type: z33.literal("python"),
7424
7487
  sdk: PythonSdkSchema,
7425
- snippets: z32.array(
7488
+ snippets: z33.array(
7426
7489
  BaseSnippetCreateSchema.extend({
7427
- snippet: z32.object({ async_client: z32.string(), sync_client: z32.string() })
7490
+ snippet: z33.object({ async_client: z33.string(), sync_client: z33.string() })
7428
7491
  })
7429
7492
  )
7430
7493
  }),
7431
- z32.object({
7432
- type: z32.literal("go"),
7494
+ z33.object({
7495
+ type: z33.literal("go"),
7433
7496
  sdk: GoSdkSchema,
7434
- snippets: z32.array(BaseSnippetCreateSchema.extend({ snippet: z32.object({ client: z32.string() }) }))
7497
+ snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
7435
7498
  }),
7436
- z32.object({
7437
- type: z32.literal("java"),
7499
+ z33.object({
7500
+ type: z33.literal("java"),
7438
7501
  sdk: JavaSdkSchema,
7439
- snippets: z32.array(
7502
+ snippets: z33.array(
7440
7503
  BaseSnippetCreateSchema.extend({
7441
- snippet: z32.object({ async_client: z32.string(), sync_client: z32.string() })
7504
+ snippet: z33.object({ async_client: z33.string(), sync_client: z33.string() })
7442
7505
  })
7443
7506
  )
7444
7507
  }),
7445
- z32.object({
7446
- type: z32.literal("ruby"),
7508
+ z33.object({
7509
+ type: z33.literal("ruby"),
7447
7510
  sdk: RubySdkSchema,
7448
- snippets: z32.array(BaseSnippetCreateSchema.extend({ snippet: z32.object({ client: z32.string() }) }))
7511
+ snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
7449
7512
  }),
7450
- z32.object({
7451
- type: z32.literal("csharp"),
7513
+ z33.object({
7514
+ type: z33.literal("csharp"),
7452
7515
  sdk: CsharpSdkSchema,
7453
- snippets: z32.array(BaseSnippetCreateSchema.extend({ snippet: z32.object({ client: z32.string() }) }))
7516
+ snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
7454
7517
  })
7455
7518
  ]);
7456
7519
  var snippetsFactoryContract = {
7457
7520
  createSnippetsForSdk: oc19.route({ method: "POST", path: "/create" }).input(
7458
- z32.object({
7459
- orgId: z32.string(),
7460
- apiId: z32.string(),
7521
+ z33.object({
7522
+ orgId: z33.string(),
7523
+ apiId: z33.string(),
7461
7524
  snippets: SdkSnippetsCreateSchema
7462
7525
  })
7463
7526
  )
7464
7527
  };
7465
- var ParameterPayloadSchema = z32.object({
7466
- name: z32.string(),
7467
- value: z32.unknown()
7528
+ var ParameterPayloadSchema = z33.object({
7529
+ name: z33.string(),
7530
+ value: z33.unknown()
7468
7531
  });
7469
- var AuthPayloadSchema = z32.discriminatedUnion("type", [
7470
- z32.object({ type: z32.literal("bearer"), token: z32.string() }),
7471
- z32.object({ type: z32.literal("basic"), username: z32.string(), password: z32.string() })
7532
+ var AuthPayloadSchema = z33.discriminatedUnion("type", [
7533
+ z33.object({ type: z33.literal("bearer"), token: z33.string() }),
7534
+ z33.object({ type: z33.literal("basic"), username: z33.string(), password: z33.string() })
7472
7535
  ]);
7473
- var CustomSnippetPayloadSchema = z32.object({
7474
- headers: z32.array(ParameterPayloadSchema).nullish(),
7475
- pathParameters: z32.array(ParameterPayloadSchema).nullish(),
7476
- queryParameters: z32.array(ParameterPayloadSchema).nullish(),
7477
- requestBody: z32.unknown().nullish(),
7536
+ var CustomSnippetPayloadSchema = z33.object({
7537
+ headers: z33.array(ParameterPayloadSchema).nullish(),
7538
+ pathParameters: z33.array(ParameterPayloadSchema).nullish(),
7539
+ queryParameters: z33.array(ParameterPayloadSchema).nullish(),
7540
+ requestBody: z33.unknown().nullish(),
7478
7541
  auth: AuthPayloadSchema.nullish()
7479
7542
  });
7480
7543
  var snippetsContract = {
7481
7544
  get: oc19.route({ method: "POST", path: "/" }).input(
7482
- z32.object({
7483
- orgId: z32.string().nullish(),
7484
- apiId: z32.string().nullish(),
7485
- sdks: z32.array(SdkRequestSchema).nullish(),
7545
+ z33.object({
7546
+ orgId: z33.string().nullish(),
7547
+ apiId: z33.string().nullish(),
7548
+ sdks: z33.array(SdkRequestSchema).nullish(),
7486
7549
  endpoint: EndpointIdentifierSchema,
7487
- exampleIdentifier: z32.string().nullish(),
7550
+ exampleIdentifier: z33.string().nullish(),
7488
7551
  payload: CustomSnippetPayloadSchema.nullish()
7489
7552
  })
7490
- ).output(z32.array(z32.unknown())),
7553
+ ).output(z33.array(z33.unknown())),
7491
7554
  load: oc19.route({ method: "POST", path: "/load" }).input(
7492
- z32.object({
7493
- orgId: z32.string().nullish(),
7494
- apiId: z32.string().nullish(),
7495
- sdks: z32.array(SdkRequestSchema).nullish()
7555
+ z33.object({
7556
+ orgId: z33.string().nullish(),
7557
+ apiId: z33.string().nullish(),
7558
+ sdks: z33.array(SdkRequestSchema).nullish()
7496
7559
  })
7497
7560
  ).output(
7498
- z32.object({
7499
- next: z32.number().nullish(),
7500
- snippets: z32.record(z32.string(), z32.unknown())
7561
+ z33.object({
7562
+ next: z33.number().nullish(),
7563
+ snippets: z33.record(z33.string(), z33.unknown())
7501
7564
  })
7502
7565
  )
7503
7566
  };
@@ -7532,44 +7595,44 @@ import { OpenAPILink as OpenAPILink22 } from "@orpc/openapi-client/fetch";
7532
7595
 
7533
7596
  // src/orpc-client/templates/contract.ts
7534
7597
  import { oc as oc20 } from "@orpc/contract";
7535
- import * as z33 from "zod";
7536
- var SnippetRegistryEntrySchema = z33.object({
7598
+ import * as z34 from "zod";
7599
+ var SnippetRegistryEntrySchema = z34.object({
7537
7600
  sdk: SdkSchema,
7538
- endpointId: z33.object({
7539
- path: z33.string(),
7601
+ endpointId: z34.object({
7602
+ path: z34.string(),
7540
7603
  method: HttpMethodSchema,
7541
- identifierOverride: z33.string().nullish()
7604
+ identifierOverride: z34.string().nullish()
7542
7605
  }),
7543
- snippetTemplate: z33.object({
7544
- type: z33.literal("v1"),
7545
- functionInvocation: z33.unknown(),
7546
- clientInstantiation: z33.string()
7606
+ snippetTemplate: z34.object({
7607
+ type: z34.literal("v1"),
7608
+ functionInvocation: z34.unknown(),
7609
+ clientInstantiation: z34.string()
7547
7610
  }),
7548
- additionalTemplates: z33.record(z33.string(), z33.unknown()).nullish()
7611
+ additionalTemplates: z34.record(z34.string(), z34.unknown()).nullish()
7549
7612
  });
7550
- var RegisterInputSchema = z33.object({
7551
- orgId: z33.string(),
7552
- apiId: z33.string(),
7553
- apiDefinitionId: z33.string(),
7613
+ var RegisterInputSchema = z34.object({
7614
+ orgId: z34.string(),
7615
+ apiId: z34.string(),
7616
+ apiDefinitionId: z34.string(),
7554
7617
  snippet: SnippetRegistryEntrySchema
7555
7618
  });
7556
- var RegisterBatchInputSchema = z33.object({
7557
- orgId: z33.string(),
7558
- apiId: z33.string(),
7559
- apiDefinitionId: z33.string(),
7560
- snippets: z33.array(SnippetRegistryEntrySchema)
7619
+ var RegisterBatchInputSchema = z34.object({
7620
+ orgId: z34.string(),
7621
+ apiId: z34.string(),
7622
+ apiDefinitionId: z34.string(),
7623
+ snippets: z34.array(SnippetRegistryEntrySchema)
7561
7624
  });
7562
- var GetInputSchema = z33.object({
7563
- orgId: z33.string(),
7564
- apiId: z33.string(),
7625
+ var GetInputSchema = z34.object({
7626
+ orgId: z34.string(),
7627
+ apiId: z34.string(),
7565
7628
  sdk: SdkSchema,
7566
- endpointId: z33.object({
7567
- path: z33.string(),
7629
+ endpointId: z34.object({
7630
+ path: z34.string(),
7568
7631
  method: HttpMethodSchema,
7569
- identifierOverride: z33.string().nullish()
7632
+ identifierOverride: z34.string().nullish()
7570
7633
  })
7571
7634
  });
7572
- var EndpointSnippetTemplateSchema = z33.record(z33.string(), z33.unknown());
7635
+ var EndpointSnippetTemplateSchema = z34.record(z34.string(), z34.unknown());
7573
7636
  var templatesContract = {
7574
7637
  register: oc20.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
7575
7638
  registerBatch: oc20.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
@@ -7596,18 +7659,18 @@ import { OpenAPILink as OpenAPILink23 } from "@orpc/openapi-client/fetch";
7596
7659
 
7597
7660
  // src/orpc-client/tokens/contract.ts
7598
7661
  import { oc as oc21 } from "@orpc/contract";
7599
- import * as z34 from "zod";
7600
- var GenerateTokenInputSchema = z34.object({
7601
- orgId: z34.string(),
7602
- scope: z34.string()
7603
- });
7604
- var RevokeTokenInputSchema = z34.object({
7605
- orgId: z34.string(),
7606
- tokenId: z34.string()
7607
- });
7608
- var GenerateTokenOutputSchema = z34.object({
7609
- token: z34.string(),
7610
- id: z34.string()
7662
+ import * as z35 from "zod";
7663
+ var GenerateTokenInputSchema = z35.object({
7664
+ orgId: z35.string(),
7665
+ scope: z35.string()
7666
+ });
7667
+ var RevokeTokenInputSchema = z35.object({
7668
+ orgId: z35.string(),
7669
+ tokenId: z35.string()
7670
+ });
7671
+ var GenerateTokenOutputSchema = z35.object({
7672
+ token: z35.string(),
7673
+ id: z35.string()
7611
7674
  });
7612
7675
  var tokensContract = {
7613
7676
  generate: oc21.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),