@fern-api/fdr-sdk 1.2.115-60bc9699d1 → 1.2.116-4e00acf721

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.
@@ -5331,9 +5331,10 @@ import { OpenAPILink as OpenAPILink17 } from "@orpc/openapi-client/fetch";
5331
5331
 
5332
5332
  // src/orpc-client/mcp-hosting/contract.ts
5333
5333
  import { oc as oc15 } from "@orpc/contract";
5334
+ import * as z26 from "zod";
5335
+
5336
+ // src/orpc-client/mcp-hosting/schemas.ts
5334
5337
  import * as z25 from "zod";
5335
- var McpPathSegmentSchema = z25.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
5336
- var McpDeploymentStatusSchema = z25.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
5337
5338
  var McpAuthSchemeSchema = z25.discriminatedUnion("type", [
5338
5339
  z25.object({ type: z25.literal("bearer") }),
5339
5340
  z25.object({
@@ -5343,6 +5344,9 @@ var McpAuthSchemeSchema = z25.discriminatedUnion("type", [
5343
5344
  }),
5344
5345
  z25.object({ type: z25.literal("basic") })
5345
5346
  ]);
5347
+ var HttpUrlSchema = z25.string().url().refine((value) => /^https?:\/\//i.test(value), {
5348
+ message: "must be an http(s) URL"
5349
+ });
5346
5350
  var McpMetadataSchema = z25.object({
5347
5351
  name: z25.string().min(1),
5348
5352
  toolsets: z25.record(z25.string(), z25.array(z25.string())),
@@ -5366,47 +5370,67 @@ var McpMetadataSchema = z25.object({
5366
5370
  required: z25.boolean()
5367
5371
  }).strict()
5368
5372
  ),
5369
- baseUrl: z25.string().url(),
5373
+ baseUrl: HttpUrlSchema,
5370
5374
  followRedirects: z25.boolean(),
5371
5375
  maxRedirects: z25.number().int().nonnegative(),
5372
5376
  allowedRedirectHosts: z25.array(z25.string())
5373
5377
  }).passthrough();
5374
- var McpModuleSchema = z25.object({
5375
- name: z25.string().regex(/^[A-Za-z0-9._/-]+$/),
5376
- hash: z25.string().regex(/^[0-9a-f]{64}$/),
5377
- contentType: z25.string().min(1)
5378
+ var DeploymentConfigSchema = z25.object({
5379
+ serverName: z25.string().min(1),
5380
+ baseUrl: HttpUrlSchema,
5381
+ /**
5382
+ * Runtime rewrite of the upstream base URL. Part of the edge contract
5383
+ * (the outbound worker honors it) but not yet written by FDR.
5384
+ */
5385
+ baseUrlOverride: HttpUrlSchema.optional(),
5386
+ followRedirects: z25.boolean(),
5387
+ maxRedirects: z25.number().int().nonnegative(),
5388
+ allowedRedirectHosts: z25.array(z25.string()),
5389
+ authSchemes: z25.array(McpAuthSchemeSchema),
5390
+ authRequired: z25.boolean(),
5391
+ toolsets: z25.record(z25.string(), z25.array(z25.string())),
5392
+ toolsetMetadata: McpMetadataSchema.shape.toolsetMetadata
5393
+ });
5394
+
5395
+ // src/orpc-client/mcp-hosting/contract.ts
5396
+ var McpPathSegmentSchema = z26.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
5397
+ var McpDeploymentStatusSchema = z26.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
5398
+ var McpModuleSchema = z26.object({
5399
+ name: z26.string().regex(/^[A-Za-z0-9._/-]+$/),
5400
+ hash: z26.string().regex(/^[0-9a-f]{64}$/),
5401
+ contentType: z26.string().min(1)
5378
5402
  }).strict();
5379
- var McpGitInputSchema = z25.object({
5380
- repoUrl: z25.string(),
5381
- branch: z25.string(),
5382
- commitSha: z25.string().optional()
5403
+ var McpGitInputSchema = z26.object({
5404
+ repoUrl: z26.string(),
5405
+ branch: z26.string(),
5406
+ commitSha: z26.string().optional()
5383
5407
  }).strict();
5384
- var DeployMcpServerInputSchema = z25.object({
5408
+ var DeployMcpServerInputSchema = z26.object({
5385
5409
  orgId: McpPathSegmentSchema,
5386
5410
  slug: McpPathSegmentSchema,
5387
- mainModule: z25.string().min(1),
5388
- compatibilityDate: z25.string().regex(/^\d{4}-\d{2}-\d{2}$/),
5389
- compatibilityFlags: z25.array(z25.string()),
5411
+ mainModule: z26.string().min(1),
5412
+ compatibilityDate: z26.string().regex(/^\d{4}-\d{2}-\d{2}$/),
5413
+ compatibilityFlags: z26.array(z26.string()),
5390
5414
  // Bounded so a single deploy request cannot fan out unbounded parallel
5391
5415
  // CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
5392
5416
  // 20 leaves room for wasm/sourcemap/chunk splitting.
5393
- modules: z25.array(McpModuleSchema).min(1).max(20),
5417
+ modules: z26.array(McpModuleSchema).min(1).max(20),
5394
5418
  metadata: McpMetadataSchema,
5395
5419
  // Everything else in this schema is bounded; keep the opaque config
5396
5420
  // blob bounded too so it cannot balloon the JSONB row.
5397
- config: z25.unknown().optional().refine((value) => value === void 0 || (JSON.stringify(value)?.length ?? 0) <= 65536, {
5421
+ config: z26.unknown().optional().refine((value) => value === void 0 || (JSON.stringify(value)?.length ?? 0) <= 65536, {
5398
5422
  message: "config must be at most 64KB serialized"
5399
5423
  }),
5400
- generatorName: z25.string().min(1),
5401
- generatorVersion: z25.string().min(1),
5402
- cliVersion: z25.string().optional(),
5424
+ generatorName: z26.string().min(1),
5425
+ generatorVersion: z26.string().min(1),
5426
+ cliVersion: z26.string().optional(),
5403
5427
  git: McpGitInputSchema.optional()
5404
5428
  }).strict().superRefine((input, ctx) => {
5405
5429
  const names = /* @__PURE__ */ new Set();
5406
5430
  for (const module of input.modules) {
5407
5431
  if (names.has(module.name)) {
5408
5432
  ctx.addIssue({
5409
- code: z25.ZodIssueCode.custom,
5433
+ code: z26.ZodIssueCode.custom,
5410
5434
  path: ["modules"],
5411
5435
  message: `duplicate module name: ${module.name}`
5412
5436
  });
@@ -5415,45 +5439,45 @@ var DeployMcpServerInputSchema = z25.object({
5415
5439
  }
5416
5440
  if (!names.has(input.mainModule)) {
5417
5441
  ctx.addIssue({
5418
- code: z25.ZodIssueCode.custom,
5442
+ code: z26.ZodIssueCode.custom,
5419
5443
  path: ["mainModule"],
5420
5444
  message: `mainModule ${input.mainModule} is not among the submitted modules`
5421
5445
  });
5422
5446
  }
5423
5447
  });
5424
- var GetMcpServerInputSchema = z25.object({
5448
+ var GetMcpServerInputSchema = z26.object({
5425
5449
  orgId: McpPathSegmentSchema,
5426
5450
  slug: McpPathSegmentSchema
5427
5451
  });
5428
- var ListMcpServersInputSchema = z25.object({
5429
- orgId: z25.string()
5452
+ var ListMcpServersInputSchema = z26.object({
5453
+ orgId: z26.string()
5430
5454
  });
5431
5455
  var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
5432
5456
  var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
5433
- var McpDeploymentSummarySchema = z25.object({
5434
- id: z25.string(),
5457
+ var McpDeploymentSummarySchema = z26.object({
5458
+ id: z26.string(),
5435
5459
  status: McpDeploymentStatusSchema,
5436
5460
  /** True when this deployment is the one the server currently serves. */
5437
- isActive: z25.boolean(),
5438
- generatorVersion: z25.string(),
5439
- createdAt: z25.string(),
5440
- createdBy: z25.string().nullish(),
5441
- error: z25.object({ name: z25.string(), message: z25.string() }).nullish()
5442
- });
5443
- var McpServerSchema = z25.object({
5444
- id: z25.string(),
5445
- orgId: z25.string(),
5446
- slug: z25.string(),
5461
+ isActive: z26.boolean(),
5462
+ generatorVersion: z26.string(),
5463
+ createdAt: z26.string(),
5464
+ createdBy: z26.string().nullish(),
5465
+ error: z26.object({ name: z26.string(), message: z26.string() }).nullish()
5466
+ });
5467
+ var McpServerSchema = z26.object({
5468
+ id: z26.string(),
5469
+ orgId: z26.string(),
5470
+ slug: z26.string(),
5447
5471
  /** The server is serving iff this is set; it names the serving deployment. */
5448
- activeDeploymentId: z25.string().nullish(),
5472
+ activeDeploymentId: z26.string().nullish(),
5449
5473
  /** Most recent publication attempt — how the last deploy went. */
5450
5474
  latestDeployment: McpDeploymentSummarySchema.nullish(),
5451
- url: z25.string().url(),
5452
- createdAt: z25.string(),
5453
- updatedAt: z25.string()
5475
+ url: z26.string().url(),
5476
+ createdAt: z26.string(),
5477
+ updatedAt: z26.string()
5454
5478
  });
5455
- var ListMcpServersResponseSchema = z25.object({ servers: z25.array(McpServerSchema) });
5456
- var ListMcpDeploymentsResponseSchema = z25.object({ deployments: z25.array(McpDeploymentSummarySchema) });
5479
+ var ListMcpServersResponseSchema = z26.object({ servers: z26.array(McpServerSchema) });
5480
+ var ListMcpDeploymentsResponseSchema = z26.object({ deployments: z26.array(McpDeploymentSummarySchema) });
5457
5481
  var mcpHostingContract = {
5458
5482
  deploy: oc15.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
5459
5483
  getServer: oc15.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
@@ -5481,84 +5505,84 @@ import { OpenAPILink as OpenAPILink18 } from "@orpc/openapi-client/fetch";
5481
5505
 
5482
5506
  // src/orpc-client/pdf-export/contract.ts
5483
5507
  import { oc as oc16 } from "@orpc/contract";
5484
- import * as z26 from "zod";
5485
- var PdfExportScopeSchema = z26.object({
5486
- pageSlugs: z26.array(z26.string())
5487
- });
5488
- var PdfExportOptionsV1Schema = z26.object({
5489
- coverTitle: z26.string().nullish(),
5490
- coverSubtitle: z26.string().nullish(),
5491
- hideCoverFooter: z26.boolean().nullish(),
5492
- headerLeftTemplate: z26.string().nullish(),
5493
- headerRightTemplate: z26.string().nullish(),
5494
- footerLeftTemplate: z26.string().nullish(),
5495
- footerRightTemplate: z26.string().nullish(),
5508
+ import * as z27 from "zod";
5509
+ var PdfExportScopeSchema = z27.object({
5510
+ pageSlugs: z27.array(z27.string())
5511
+ });
5512
+ var PdfExportOptionsV1Schema = z27.object({
5513
+ coverTitle: z27.string().nullish(),
5514
+ coverSubtitle: z27.string().nullish(),
5515
+ hideCoverFooter: z27.boolean().nullish(),
5516
+ headerLeftTemplate: z27.string().nullish(),
5517
+ headerRightTemplate: z27.string().nullish(),
5518
+ footerLeftTemplate: z27.string().nullish(),
5519
+ footerRightTemplate: z27.string().nullish(),
5496
5520
  scope: PdfExportScopeSchema.nullish(),
5497
- hideCover: z26.boolean().nullish(),
5498
- hideToc: z26.boolean().nullish()
5521
+ hideCover: z27.boolean().nullish(),
5522
+ hideToc: z27.boolean().nullish()
5499
5523
  });
5500
- var PdfExportOptionsSchema = z26.discriminatedUnion("version", [
5501
- z26.object({ version: z26.literal("v1") }).merge(PdfExportOptionsV1Schema)
5524
+ var PdfExportOptionsSchema = z27.discriminatedUnion("version", [
5525
+ z27.object({ version: z27.literal("v1") }).merge(PdfExportOptionsV1Schema)
5502
5526
  ]);
5503
- var PdfExportTaskStatusSchema = z26.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
5504
- var PdfExportTaskSchema = z26.object({
5505
- id: z26.string(),
5506
- orgId: z26.string(),
5507
- docsUrl: z26.string(),
5508
- productId: z26.string().nullish(),
5509
- versionId: z26.string().nullish(),
5510
- requesterName: z26.string().nullish(),
5511
- notifyEmails: z26.array(z26.string()).nullish(),
5527
+ var PdfExportTaskStatusSchema = z27.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
5528
+ var PdfExportTaskSchema = z27.object({
5529
+ id: z27.string(),
5530
+ orgId: z27.string(),
5531
+ docsUrl: z27.string(),
5532
+ productId: z27.string().nullish(),
5533
+ versionId: z27.string().nullish(),
5534
+ requesterName: z27.string().nullish(),
5535
+ notifyEmails: z27.array(z27.string()).nullish(),
5512
5536
  status: PdfExportTaskStatusSchema,
5513
5537
  options: PdfExportOptionsSchema.nullish(),
5514
- createdAt: z26.string(),
5515
- startedAt: z26.string().nullish(),
5516
- completedAt: z26.string().nullish(),
5517
- fileName: z26.string().nullish(),
5518
- sizeBytes: z26.number().nullish(),
5519
- errorMessage: z26.string().nullish()
5520
- });
5521
- var ListPdfExportTasksResponseSchema = z26.object({
5522
- tasks: z26.array(PdfExportTaskSchema)
5523
- });
5524
- var PdfExportDownloadResponseSchema = z26.object({
5525
- downloadUrl: z26.string(),
5526
- fileName: z26.string(),
5527
- sizeBytes: z26.number()
5528
- });
5529
- var CreatePdfExportTaskInputSchema = z26.object({
5530
- orgId: z26.string(),
5531
- docsUrl: z26.string(),
5532
- productId: z26.string().nullish(),
5533
- versionId: z26.string().nullish(),
5534
- requesterName: z26.string().nullish(),
5538
+ createdAt: z27.string(),
5539
+ startedAt: z27.string().nullish(),
5540
+ completedAt: z27.string().nullish(),
5541
+ fileName: z27.string().nullish(),
5542
+ sizeBytes: z27.number().nullish(),
5543
+ errorMessage: z27.string().nullish()
5544
+ });
5545
+ var ListPdfExportTasksResponseSchema = z27.object({
5546
+ tasks: z27.array(PdfExportTaskSchema)
5547
+ });
5548
+ var PdfExportDownloadResponseSchema = z27.object({
5549
+ downloadUrl: z27.string(),
5550
+ fileName: z27.string(),
5551
+ sizeBytes: z27.number()
5552
+ });
5553
+ var CreatePdfExportTaskInputSchema = z27.object({
5554
+ orgId: z27.string(),
5555
+ docsUrl: z27.string(),
5556
+ productId: z27.string().nullish(),
5557
+ versionId: z27.string().nullish(),
5558
+ requesterName: z27.string().nullish(),
5535
5559
  options: PdfExportOptionsSchema.nullish()
5536
5560
  });
5537
- var ListPdfExportTasksInputSchema = z26.object({
5538
- orgId: z26.string(),
5539
- docsUrl: z26.string(),
5540
- limit: z26.coerce.number().nullish()
5561
+ var ListPdfExportTasksInputSchema = z27.object({
5562
+ orgId: z27.string(),
5563
+ docsUrl: z27.string(),
5564
+ limit: z27.coerce.number().nullish()
5541
5565
  });
5542
- var GetPdfExportTaskInputSchema = z26.object({
5543
- taskId: z26.string()
5566
+ var GetPdfExportTaskInputSchema = z27.object({
5567
+ taskId: z27.string()
5544
5568
  });
5545
- var UpdatePdfExportTaskInputSchema = z26.object({
5546
- taskId: z26.string(),
5569
+ var UpdatePdfExportTaskInputSchema = z27.object({
5570
+ taskId: z27.string(),
5547
5571
  status: PdfExportTaskStatusSchema,
5548
- startedAt: z26.string().nullish(),
5549
- completedAt: z26.string().nullish(),
5550
- s3Key: z26.string().nullish(),
5551
- fileName: z26.string().nullish(),
5552
- sizeBytes: z26.number().nullish(),
5553
- errorMessage: z26.string().nullish()
5572
+ startedAt: z27.string().nullish(),
5573
+ completedAt: z27.string().nullish(),
5574
+ s3Key: z27.string().nullish(),
5575
+ fileName: z27.string().nullish(),
5576
+ sizeBytes: z27.number().nullish(),
5577
+ errorMessage: z27.string().nullish()
5554
5578
  });
5555
- var GetPdfExportDownloadUrlInputSchema = z26.object({
5556
- taskId: z26.string()
5579
+ var GetPdfExportDownloadUrlInputSchema = z27.object({
5580
+ taskId: z27.string()
5557
5581
  });
5558
- var CleanupPdfExportsResponseSchema = z26.object({
5559
- expiredTasksDeleted: z26.number(),
5560
- s3ObjectsDeleted: z26.number(),
5561
- timedOutTasksFailed: z26.number()
5582
+ var CleanupPdfExportsResponseSchema = z27.object({
5583
+ expiredTasksDeleted: z27.number(),
5584
+ s3ObjectsDeleted: z27.number(),
5585
+ timedOutTasksFailed: z27.number()
5562
5586
  });
5563
5587
  var pdfExportContract = {
5564
5588
  createTask: oc16.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
@@ -5588,8 +5612,8 @@ import { OpenAPILink as OpenAPILink19 } from "@orpc/openapi-client/fetch";
5588
5612
 
5589
5613
  // src/orpc-client/sdks/contract.ts
5590
5614
  import { oc as oc17 } from "@orpc/contract";
5591
- import * as z27 from "zod";
5592
- var LanguageEnumSchema = z27.enum([
5615
+ import * as z28 from "zod";
5616
+ var LanguageEnumSchema = z28.enum([
5593
5617
  "Go",
5594
5618
  "TypeScript",
5595
5619
  "Java",
@@ -5600,14 +5624,14 @@ var LanguageEnumSchema = z27.enum([
5600
5624
  "Swift",
5601
5625
  "Rust"
5602
5626
  ]);
5603
- var VersionBumpEnumSchema = z27.enum(["MAJOR", "MINOR", "PATCH"]);
5604
- var ComputeSemanticVersionInputSchema = z27.object({
5605
- package: z27.string(),
5627
+ var VersionBumpEnumSchema = z28.enum(["MAJOR", "MINOR", "PATCH"]);
5628
+ var ComputeSemanticVersionInputSchema = z28.object({
5629
+ package: z28.string(),
5606
5630
  language: LanguageEnumSchema,
5607
- githubRepository: z27.string().nullish()
5631
+ githubRepository: z28.string().nullish()
5608
5632
  });
5609
- var ComputeSemanticVersionOutputSchema = z27.object({
5610
- version: z27.string(),
5633
+ var ComputeSemanticVersionOutputSchema = z28.object({
5634
+ version: z28.string(),
5611
5635
  bump: VersionBumpEnumSchema
5612
5636
  });
5613
5637
  var sdksContract = {
@@ -5633,32 +5657,32 @@ import { OpenAPILink as OpenAPILink20 } from "@orpc/openapi-client/fetch";
5633
5657
 
5634
5658
  // src/orpc-client/slugs/contract.ts
5635
5659
  import { oc as oc18 } from "@orpc/contract";
5636
- import * as z28 from "zod";
5637
- var SlugsInputSchema = z28.object({
5638
- domain: z28.string(),
5639
- basepath: z28.string().optional().default("")
5640
- });
5641
- var SlugEntrySchema = z28.object({
5642
- orgId: z28.string(),
5643
- domain: z28.string(),
5644
- basepath: z28.string(),
5645
- slug: z28.string(),
5646
- lastUpdated: z28.string()
5647
- });
5648
- var MarkdownEntrySchema = z28.object({
5649
- orgId: z28.string(),
5650
- domain: z28.string(),
5651
- basepath: z28.string(),
5652
- pageId: z28.string(),
5653
- slug: z28.string(),
5654
- hash: z28.string(),
5655
- lastUpdated: z28.string()
5656
- });
5657
- var GetSlugEntriesResponseSchema = z28.object({
5658
- entries: z28.array(SlugEntrySchema)
5659
- });
5660
- var GetMarkdownEntriesResponseSchema = z28.object({
5661
- entries: z28.array(MarkdownEntrySchema)
5660
+ import * as z29 from "zod";
5661
+ var SlugsInputSchema = z29.object({
5662
+ domain: z29.string(),
5663
+ basepath: z29.string().optional().default("")
5664
+ });
5665
+ var SlugEntrySchema = z29.object({
5666
+ orgId: z29.string(),
5667
+ domain: z29.string(),
5668
+ basepath: z29.string(),
5669
+ slug: z29.string(),
5670
+ lastUpdated: z29.string()
5671
+ });
5672
+ var MarkdownEntrySchema = z29.object({
5673
+ orgId: z29.string(),
5674
+ domain: z29.string(),
5675
+ basepath: z29.string(),
5676
+ pageId: z29.string(),
5677
+ slug: z29.string(),
5678
+ hash: z29.string(),
5679
+ lastUpdated: z29.string()
5680
+ });
5681
+ var GetSlugEntriesResponseSchema = z29.object({
5682
+ entries: z29.array(SlugEntrySchema)
5683
+ });
5684
+ var GetMarkdownEntriesResponseSchema = z29.object({
5685
+ entries: z29.array(MarkdownEntrySchema)
5662
5686
  });
5663
5687
  var slugsContract = {
5664
5688
  getSlugEntries: oc18.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
@@ -5684,102 +5708,102 @@ import { OpenAPILink as OpenAPILink21 } from "@orpc/openapi-client/fetch";
5684
5708
 
5685
5709
  // src/orpc-client/snippets/contract.ts
5686
5710
  import { oc as oc19 } from "@orpc/contract";
5687
- import * as z29 from "zod";
5688
- var TypeScriptSdkSchema = z29.object({ package: z29.string(), version: z29.string() });
5689
- var PythonSdkSchema = z29.object({ package: z29.string(), version: z29.string() });
5690
- var GoSdkSchema = z29.object({ githubRepo: z29.string(), version: z29.string() });
5691
- var RubySdkSchema = z29.object({ gem: z29.string(), version: z29.string() });
5692
- var JavaSdkSchema = z29.object({ group: z29.string(), artifact: z29.string(), version: z29.string() });
5693
- var CsharpSdkSchema = z29.object({ package: z29.string(), version: z29.string() });
5694
- var BaseSnippetCreateSchema = z29.object({
5711
+ import * as z30 from "zod";
5712
+ var TypeScriptSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
5713
+ var PythonSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
5714
+ var GoSdkSchema = z30.object({ githubRepo: z30.string(), version: z30.string() });
5715
+ var RubySdkSchema = z30.object({ gem: z30.string(), version: z30.string() });
5716
+ var JavaSdkSchema = z30.object({ group: z30.string(), artifact: z30.string(), version: z30.string() });
5717
+ var CsharpSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
5718
+ var BaseSnippetCreateSchema = z30.object({
5695
5719
  endpoint: EndpointIdentifierSchema,
5696
- exampleIdentifier: z29.string().nullish()
5720
+ exampleIdentifier: z30.string().nullish()
5697
5721
  });
5698
- var SdkSnippetsCreateSchema = z29.discriminatedUnion("type", [
5699
- z29.object({
5700
- type: z29.literal("typescript"),
5722
+ var SdkSnippetsCreateSchema = z30.discriminatedUnion("type", [
5723
+ z30.object({
5724
+ type: z30.literal("typescript"),
5701
5725
  sdk: TypeScriptSdkSchema,
5702
- snippets: z29.array(BaseSnippetCreateSchema.extend({ snippet: z29.object({ client: z29.string() }) }))
5726
+ snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
5703
5727
  }),
5704
- z29.object({
5705
- type: z29.literal("python"),
5728
+ z30.object({
5729
+ type: z30.literal("python"),
5706
5730
  sdk: PythonSdkSchema,
5707
- snippets: z29.array(
5731
+ snippets: z30.array(
5708
5732
  BaseSnippetCreateSchema.extend({
5709
- snippet: z29.object({ async_client: z29.string(), sync_client: z29.string() })
5733
+ snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
5710
5734
  })
5711
5735
  )
5712
5736
  }),
5713
- z29.object({
5714
- type: z29.literal("go"),
5737
+ z30.object({
5738
+ type: z30.literal("go"),
5715
5739
  sdk: GoSdkSchema,
5716
- snippets: z29.array(BaseSnippetCreateSchema.extend({ snippet: z29.object({ client: z29.string() }) }))
5740
+ snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
5717
5741
  }),
5718
- z29.object({
5719
- type: z29.literal("java"),
5742
+ z30.object({
5743
+ type: z30.literal("java"),
5720
5744
  sdk: JavaSdkSchema,
5721
- snippets: z29.array(
5745
+ snippets: z30.array(
5722
5746
  BaseSnippetCreateSchema.extend({
5723
- snippet: z29.object({ async_client: z29.string(), sync_client: z29.string() })
5747
+ snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
5724
5748
  })
5725
5749
  )
5726
5750
  }),
5727
- z29.object({
5728
- type: z29.literal("ruby"),
5751
+ z30.object({
5752
+ type: z30.literal("ruby"),
5729
5753
  sdk: RubySdkSchema,
5730
- snippets: z29.array(BaseSnippetCreateSchema.extend({ snippet: z29.object({ client: z29.string() }) }))
5754
+ snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
5731
5755
  }),
5732
- z29.object({
5733
- type: z29.literal("csharp"),
5756
+ z30.object({
5757
+ type: z30.literal("csharp"),
5734
5758
  sdk: CsharpSdkSchema,
5735
- snippets: z29.array(BaseSnippetCreateSchema.extend({ snippet: z29.object({ client: z29.string() }) }))
5759
+ snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
5736
5760
  })
5737
5761
  ]);
5738
5762
  var snippetsFactoryContract = {
5739
5763
  createSnippetsForSdk: oc19.route({ method: "POST", path: "/create" }).input(
5740
- z29.object({
5741
- orgId: z29.string(),
5742
- apiId: z29.string(),
5764
+ z30.object({
5765
+ orgId: z30.string(),
5766
+ apiId: z30.string(),
5743
5767
  snippets: SdkSnippetsCreateSchema
5744
5768
  })
5745
5769
  )
5746
5770
  };
5747
- var ParameterPayloadSchema = z29.object({
5748
- name: z29.string(),
5749
- value: z29.unknown()
5771
+ var ParameterPayloadSchema = z30.object({
5772
+ name: z30.string(),
5773
+ value: z30.unknown()
5750
5774
  });
5751
- var AuthPayloadSchema = z29.discriminatedUnion("type", [
5752
- z29.object({ type: z29.literal("bearer"), token: z29.string() }),
5753
- z29.object({ type: z29.literal("basic"), username: z29.string(), password: z29.string() })
5775
+ var AuthPayloadSchema = z30.discriminatedUnion("type", [
5776
+ z30.object({ type: z30.literal("bearer"), token: z30.string() }),
5777
+ z30.object({ type: z30.literal("basic"), username: z30.string(), password: z30.string() })
5754
5778
  ]);
5755
- var CustomSnippetPayloadSchema = z29.object({
5756
- headers: z29.array(ParameterPayloadSchema).nullish(),
5757
- pathParameters: z29.array(ParameterPayloadSchema).nullish(),
5758
- queryParameters: z29.array(ParameterPayloadSchema).nullish(),
5759
- requestBody: z29.unknown().nullish(),
5779
+ var CustomSnippetPayloadSchema = z30.object({
5780
+ headers: z30.array(ParameterPayloadSchema).nullish(),
5781
+ pathParameters: z30.array(ParameterPayloadSchema).nullish(),
5782
+ queryParameters: z30.array(ParameterPayloadSchema).nullish(),
5783
+ requestBody: z30.unknown().nullish(),
5760
5784
  auth: AuthPayloadSchema.nullish()
5761
5785
  });
5762
5786
  var snippetsContract = {
5763
5787
  get: oc19.route({ method: "POST", path: "/" }).input(
5764
- z29.object({
5765
- orgId: z29.string().nullish(),
5766
- apiId: z29.string().nullish(),
5767
- sdks: z29.array(SdkRequestSchema).nullish(),
5788
+ z30.object({
5789
+ orgId: z30.string().nullish(),
5790
+ apiId: z30.string().nullish(),
5791
+ sdks: z30.array(SdkRequestSchema).nullish(),
5768
5792
  endpoint: EndpointIdentifierSchema,
5769
- exampleIdentifier: z29.string().nullish(),
5793
+ exampleIdentifier: z30.string().nullish(),
5770
5794
  payload: CustomSnippetPayloadSchema.nullish()
5771
5795
  })
5772
- ).output(z29.array(z29.unknown())),
5796
+ ).output(z30.array(z30.unknown())),
5773
5797
  load: oc19.route({ method: "POST", path: "/load" }).input(
5774
- z29.object({
5775
- orgId: z29.string().nullish(),
5776
- apiId: z29.string().nullish(),
5777
- sdks: z29.array(SdkRequestSchema).nullish()
5798
+ z30.object({
5799
+ orgId: z30.string().nullish(),
5800
+ apiId: z30.string().nullish(),
5801
+ sdks: z30.array(SdkRequestSchema).nullish()
5778
5802
  })
5779
5803
  ).output(
5780
- z29.object({
5781
- next: z29.number().nullish(),
5782
- snippets: z29.record(z29.string(), z29.unknown())
5804
+ z30.object({
5805
+ next: z30.number().nullish(),
5806
+ snippets: z30.record(z30.string(), z30.unknown())
5783
5807
  })
5784
5808
  )
5785
5809
  };
@@ -5814,44 +5838,44 @@ import { OpenAPILink as OpenAPILink22 } from "@orpc/openapi-client/fetch";
5814
5838
 
5815
5839
  // src/orpc-client/templates/contract.ts
5816
5840
  import { oc as oc20 } from "@orpc/contract";
5817
- import * as z30 from "zod";
5818
- var SnippetRegistryEntrySchema = z30.object({
5841
+ import * as z31 from "zod";
5842
+ var SnippetRegistryEntrySchema = z31.object({
5819
5843
  sdk: SdkSchema,
5820
- endpointId: z30.object({
5821
- path: z30.string(),
5844
+ endpointId: z31.object({
5845
+ path: z31.string(),
5822
5846
  method: HttpMethodSchema,
5823
- identifierOverride: z30.string().nullish()
5847
+ identifierOverride: z31.string().nullish()
5824
5848
  }),
5825
- snippetTemplate: z30.object({
5826
- type: z30.literal("v1"),
5827
- functionInvocation: z30.unknown(),
5828
- clientInstantiation: z30.string()
5849
+ snippetTemplate: z31.object({
5850
+ type: z31.literal("v1"),
5851
+ functionInvocation: z31.unknown(),
5852
+ clientInstantiation: z31.string()
5829
5853
  }),
5830
- additionalTemplates: z30.record(z30.string(), z30.unknown()).nullish()
5854
+ additionalTemplates: z31.record(z31.string(), z31.unknown()).nullish()
5831
5855
  });
5832
- var RegisterInputSchema = z30.object({
5833
- orgId: z30.string(),
5834
- apiId: z30.string(),
5835
- apiDefinitionId: z30.string(),
5856
+ var RegisterInputSchema = z31.object({
5857
+ orgId: z31.string(),
5858
+ apiId: z31.string(),
5859
+ apiDefinitionId: z31.string(),
5836
5860
  snippet: SnippetRegistryEntrySchema
5837
5861
  });
5838
- var RegisterBatchInputSchema = z30.object({
5839
- orgId: z30.string(),
5840
- apiId: z30.string(),
5841
- apiDefinitionId: z30.string(),
5842
- snippets: z30.array(SnippetRegistryEntrySchema)
5862
+ var RegisterBatchInputSchema = z31.object({
5863
+ orgId: z31.string(),
5864
+ apiId: z31.string(),
5865
+ apiDefinitionId: z31.string(),
5866
+ snippets: z31.array(SnippetRegistryEntrySchema)
5843
5867
  });
5844
- var GetInputSchema = z30.object({
5845
- orgId: z30.string(),
5846
- apiId: z30.string(),
5868
+ var GetInputSchema = z31.object({
5869
+ orgId: z31.string(),
5870
+ apiId: z31.string(),
5847
5871
  sdk: SdkSchema,
5848
- endpointId: z30.object({
5849
- path: z30.string(),
5872
+ endpointId: z31.object({
5873
+ path: z31.string(),
5850
5874
  method: HttpMethodSchema,
5851
- identifierOverride: z30.string().nullish()
5875
+ identifierOverride: z31.string().nullish()
5852
5876
  })
5853
5877
  });
5854
- var EndpointSnippetTemplateSchema = z30.record(z30.string(), z30.unknown());
5878
+ var EndpointSnippetTemplateSchema = z31.record(z31.string(), z31.unknown());
5855
5879
  var templatesContract = {
5856
5880
  register: oc20.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
5857
5881
  registerBatch: oc20.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
@@ -5878,18 +5902,18 @@ import { OpenAPILink as OpenAPILink23 } from "@orpc/openapi-client/fetch";
5878
5902
 
5879
5903
  // src/orpc-client/tokens/contract.ts
5880
5904
  import { oc as oc21 } from "@orpc/contract";
5881
- import * as z31 from "zod";
5882
- var GenerateTokenInputSchema = z31.object({
5883
- orgId: z31.string(),
5884
- scope: z31.string()
5885
- });
5886
- var RevokeTokenInputSchema = z31.object({
5887
- orgId: z31.string(),
5888
- tokenId: z31.string()
5889
- });
5890
- var GenerateTokenOutputSchema = z31.object({
5891
- token: z31.string(),
5892
- id: z31.string()
5905
+ import * as z32 from "zod";
5906
+ var GenerateTokenInputSchema = z32.object({
5907
+ orgId: z32.string(),
5908
+ scope: z32.string()
5909
+ });
5910
+ var RevokeTokenInputSchema = z32.object({
5911
+ orgId: z32.string(),
5912
+ tokenId: z32.string()
5913
+ });
5914
+ var GenerateTokenOutputSchema = z32.object({
5915
+ token: z32.string(),
5916
+ id: z32.string()
5893
5917
  });
5894
5918
  var tokensContract = {
5895
5919
  generate: oc21.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),