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