@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.
- package/dist/js/client/FdrClient.js +262 -238
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +262 -238
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +528 -504
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +528 -504
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client/mcp-hosting/schemas.js +106 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.js.map +1 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.mjs +68 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.mjs.map +1 -0
- package/dist/js/orpc-client.js +519 -447
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +512 -447
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts +9 -322
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/index.d.ts +1 -0
- package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/kv.d.ts +39 -0
- package/dist/types/orpc-client/mcp-hosting/kv.d.ts.map +1 -0
- package/dist/types/orpc-client/mcp-hosting/schemas.d.ts +424 -0
- package/dist/types/orpc-client/mcp-hosting/schemas.d.ts.map +1 -0
- package/package.json +7 -1
|
@@ -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:
|
|
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
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
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 =
|
|
5380
|
-
repoUrl:
|
|
5381
|
-
branch:
|
|
5382
|
-
commitSha:
|
|
5403
|
+
var McpGitInputSchema = z26.object({
|
|
5404
|
+
repoUrl: z26.string(),
|
|
5405
|
+
branch: z26.string(),
|
|
5406
|
+
commitSha: z26.string().optional()
|
|
5383
5407
|
}).strict();
|
|
5384
|
-
var DeployMcpServerInputSchema =
|
|
5408
|
+
var DeployMcpServerInputSchema = z26.object({
|
|
5385
5409
|
orgId: McpPathSegmentSchema,
|
|
5386
5410
|
slug: McpPathSegmentSchema,
|
|
5387
|
-
mainModule:
|
|
5388
|
-
compatibilityDate:
|
|
5389
|
-
compatibilityFlags:
|
|
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:
|
|
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:
|
|
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:
|
|
5401
|
-
generatorVersion:
|
|
5402
|
-
cliVersion:
|
|
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:
|
|
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:
|
|
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 =
|
|
5448
|
+
var GetMcpServerInputSchema = z26.object({
|
|
5425
5449
|
orgId: McpPathSegmentSchema,
|
|
5426
5450
|
slug: McpPathSegmentSchema
|
|
5427
5451
|
});
|
|
5428
|
-
var ListMcpServersInputSchema =
|
|
5429
|
-
orgId:
|
|
5452
|
+
var ListMcpServersInputSchema = z26.object({
|
|
5453
|
+
orgId: z26.string()
|
|
5430
5454
|
});
|
|
5431
5455
|
var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
|
|
5432
5456
|
var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
|
|
5433
|
-
var McpDeploymentSummarySchema =
|
|
5434
|
-
id:
|
|
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:
|
|
5438
|
-
generatorVersion:
|
|
5439
|
-
createdAt:
|
|
5440
|
-
createdBy:
|
|
5441
|
-
error:
|
|
5442
|
-
});
|
|
5443
|
-
var McpServerSchema =
|
|
5444
|
-
id:
|
|
5445
|
-
orgId:
|
|
5446
|
-
slug:
|
|
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:
|
|
5472
|
+
activeDeploymentId: z26.string().nullish(),
|
|
5449
5473
|
/** Most recent publication attempt — how the last deploy went. */
|
|
5450
5474
|
latestDeployment: McpDeploymentSummarySchema.nullish(),
|
|
5451
|
-
url:
|
|
5452
|
-
createdAt:
|
|
5453
|
-
updatedAt:
|
|
5475
|
+
url: z26.string().url(),
|
|
5476
|
+
createdAt: z26.string(),
|
|
5477
|
+
updatedAt: z26.string()
|
|
5454
5478
|
});
|
|
5455
|
-
var ListMcpServersResponseSchema =
|
|
5456
|
-
var ListMcpDeploymentsResponseSchema =
|
|
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
|
|
5485
|
-
var PdfExportScopeSchema =
|
|
5486
|
-
pageSlugs:
|
|
5487
|
-
});
|
|
5488
|
-
var PdfExportOptionsV1Schema =
|
|
5489
|
-
coverTitle:
|
|
5490
|
-
coverSubtitle:
|
|
5491
|
-
hideCoverFooter:
|
|
5492
|
-
headerLeftTemplate:
|
|
5493
|
-
headerRightTemplate:
|
|
5494
|
-
footerLeftTemplate:
|
|
5495
|
-
footerRightTemplate:
|
|
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:
|
|
5498
|
-
hideToc:
|
|
5521
|
+
hideCover: z27.boolean().nullish(),
|
|
5522
|
+
hideToc: z27.boolean().nullish()
|
|
5499
5523
|
});
|
|
5500
|
-
var PdfExportOptionsSchema =
|
|
5501
|
-
|
|
5524
|
+
var PdfExportOptionsSchema = z27.discriminatedUnion("version", [
|
|
5525
|
+
z27.object({ version: z27.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
5502
5526
|
]);
|
|
5503
|
-
var PdfExportTaskStatusSchema =
|
|
5504
|
-
var PdfExportTaskSchema =
|
|
5505
|
-
id:
|
|
5506
|
-
orgId:
|
|
5507
|
-
docsUrl:
|
|
5508
|
-
productId:
|
|
5509
|
-
versionId:
|
|
5510
|
-
requesterName:
|
|
5511
|
-
notifyEmails:
|
|
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:
|
|
5515
|
-
startedAt:
|
|
5516
|
-
completedAt:
|
|
5517
|
-
fileName:
|
|
5518
|
-
sizeBytes:
|
|
5519
|
-
errorMessage:
|
|
5520
|
-
});
|
|
5521
|
-
var ListPdfExportTasksResponseSchema =
|
|
5522
|
-
tasks:
|
|
5523
|
-
});
|
|
5524
|
-
var PdfExportDownloadResponseSchema =
|
|
5525
|
-
downloadUrl:
|
|
5526
|
-
fileName:
|
|
5527
|
-
sizeBytes:
|
|
5528
|
-
});
|
|
5529
|
-
var CreatePdfExportTaskInputSchema =
|
|
5530
|
-
orgId:
|
|
5531
|
-
docsUrl:
|
|
5532
|
-
productId:
|
|
5533
|
-
versionId:
|
|
5534
|
-
requesterName:
|
|
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 =
|
|
5538
|
-
orgId:
|
|
5539
|
-
docsUrl:
|
|
5540
|
-
limit:
|
|
5561
|
+
var ListPdfExportTasksInputSchema = z27.object({
|
|
5562
|
+
orgId: z27.string(),
|
|
5563
|
+
docsUrl: z27.string(),
|
|
5564
|
+
limit: z27.coerce.number().nullish()
|
|
5541
5565
|
});
|
|
5542
|
-
var GetPdfExportTaskInputSchema =
|
|
5543
|
-
taskId:
|
|
5566
|
+
var GetPdfExportTaskInputSchema = z27.object({
|
|
5567
|
+
taskId: z27.string()
|
|
5544
5568
|
});
|
|
5545
|
-
var UpdatePdfExportTaskInputSchema =
|
|
5546
|
-
taskId:
|
|
5569
|
+
var UpdatePdfExportTaskInputSchema = z27.object({
|
|
5570
|
+
taskId: z27.string(),
|
|
5547
5571
|
status: PdfExportTaskStatusSchema,
|
|
5548
|
-
startedAt:
|
|
5549
|
-
completedAt:
|
|
5550
|
-
s3Key:
|
|
5551
|
-
fileName:
|
|
5552
|
-
sizeBytes:
|
|
5553
|
-
errorMessage:
|
|
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 =
|
|
5556
|
-
taskId:
|
|
5579
|
+
var GetPdfExportDownloadUrlInputSchema = z27.object({
|
|
5580
|
+
taskId: z27.string()
|
|
5557
5581
|
});
|
|
5558
|
-
var CleanupPdfExportsResponseSchema =
|
|
5559
|
-
expiredTasksDeleted:
|
|
5560
|
-
s3ObjectsDeleted:
|
|
5561
|
-
timedOutTasksFailed:
|
|
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
|
|
5592
|
-
var LanguageEnumSchema =
|
|
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 =
|
|
5604
|
-
var ComputeSemanticVersionInputSchema =
|
|
5605
|
-
package:
|
|
5627
|
+
var VersionBumpEnumSchema = z28.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
5628
|
+
var ComputeSemanticVersionInputSchema = z28.object({
|
|
5629
|
+
package: z28.string(),
|
|
5606
5630
|
language: LanguageEnumSchema,
|
|
5607
|
-
githubRepository:
|
|
5631
|
+
githubRepository: z28.string().nullish()
|
|
5608
5632
|
});
|
|
5609
|
-
var ComputeSemanticVersionOutputSchema =
|
|
5610
|
-
version:
|
|
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
|
|
5637
|
-
var SlugsInputSchema =
|
|
5638
|
-
domain:
|
|
5639
|
-
basepath:
|
|
5640
|
-
});
|
|
5641
|
-
var SlugEntrySchema =
|
|
5642
|
-
orgId:
|
|
5643
|
-
domain:
|
|
5644
|
-
basepath:
|
|
5645
|
-
slug:
|
|
5646
|
-
lastUpdated:
|
|
5647
|
-
});
|
|
5648
|
-
var MarkdownEntrySchema =
|
|
5649
|
-
orgId:
|
|
5650
|
-
domain:
|
|
5651
|
-
basepath:
|
|
5652
|
-
pageId:
|
|
5653
|
-
slug:
|
|
5654
|
-
hash:
|
|
5655
|
-
lastUpdated:
|
|
5656
|
-
});
|
|
5657
|
-
var GetSlugEntriesResponseSchema =
|
|
5658
|
-
entries:
|
|
5659
|
-
});
|
|
5660
|
-
var GetMarkdownEntriesResponseSchema =
|
|
5661
|
-
entries:
|
|
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
|
|
5688
|
-
var TypeScriptSdkSchema =
|
|
5689
|
-
var PythonSdkSchema =
|
|
5690
|
-
var GoSdkSchema =
|
|
5691
|
-
var RubySdkSchema =
|
|
5692
|
-
var JavaSdkSchema =
|
|
5693
|
-
var CsharpSdkSchema =
|
|
5694
|
-
var BaseSnippetCreateSchema =
|
|
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:
|
|
5720
|
+
exampleIdentifier: z30.string().nullish()
|
|
5697
5721
|
});
|
|
5698
|
-
var SdkSnippetsCreateSchema =
|
|
5699
|
-
|
|
5700
|
-
type:
|
|
5722
|
+
var SdkSnippetsCreateSchema = z30.discriminatedUnion("type", [
|
|
5723
|
+
z30.object({
|
|
5724
|
+
type: z30.literal("typescript"),
|
|
5701
5725
|
sdk: TypeScriptSdkSchema,
|
|
5702
|
-
snippets:
|
|
5726
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5703
5727
|
}),
|
|
5704
|
-
|
|
5705
|
-
type:
|
|
5728
|
+
z30.object({
|
|
5729
|
+
type: z30.literal("python"),
|
|
5706
5730
|
sdk: PythonSdkSchema,
|
|
5707
|
-
snippets:
|
|
5731
|
+
snippets: z30.array(
|
|
5708
5732
|
BaseSnippetCreateSchema.extend({
|
|
5709
|
-
snippet:
|
|
5733
|
+
snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
|
|
5710
5734
|
})
|
|
5711
5735
|
)
|
|
5712
5736
|
}),
|
|
5713
|
-
|
|
5714
|
-
type:
|
|
5737
|
+
z30.object({
|
|
5738
|
+
type: z30.literal("go"),
|
|
5715
5739
|
sdk: GoSdkSchema,
|
|
5716
|
-
snippets:
|
|
5740
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5717
5741
|
}),
|
|
5718
|
-
|
|
5719
|
-
type:
|
|
5742
|
+
z30.object({
|
|
5743
|
+
type: z30.literal("java"),
|
|
5720
5744
|
sdk: JavaSdkSchema,
|
|
5721
|
-
snippets:
|
|
5745
|
+
snippets: z30.array(
|
|
5722
5746
|
BaseSnippetCreateSchema.extend({
|
|
5723
|
-
snippet:
|
|
5747
|
+
snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
|
|
5724
5748
|
})
|
|
5725
5749
|
)
|
|
5726
5750
|
}),
|
|
5727
|
-
|
|
5728
|
-
type:
|
|
5751
|
+
z30.object({
|
|
5752
|
+
type: z30.literal("ruby"),
|
|
5729
5753
|
sdk: RubySdkSchema,
|
|
5730
|
-
snippets:
|
|
5754
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5731
5755
|
}),
|
|
5732
|
-
|
|
5733
|
-
type:
|
|
5756
|
+
z30.object({
|
|
5757
|
+
type: z30.literal("csharp"),
|
|
5734
5758
|
sdk: CsharpSdkSchema,
|
|
5735
|
-
snippets:
|
|
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
|
-
|
|
5741
|
-
orgId:
|
|
5742
|
-
apiId:
|
|
5764
|
+
z30.object({
|
|
5765
|
+
orgId: z30.string(),
|
|
5766
|
+
apiId: z30.string(),
|
|
5743
5767
|
snippets: SdkSnippetsCreateSchema
|
|
5744
5768
|
})
|
|
5745
5769
|
)
|
|
5746
5770
|
};
|
|
5747
|
-
var ParameterPayloadSchema =
|
|
5748
|
-
name:
|
|
5749
|
-
value:
|
|
5771
|
+
var ParameterPayloadSchema = z30.object({
|
|
5772
|
+
name: z30.string(),
|
|
5773
|
+
value: z30.unknown()
|
|
5750
5774
|
});
|
|
5751
|
-
var AuthPayloadSchema =
|
|
5752
|
-
|
|
5753
|
-
|
|
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 =
|
|
5756
|
-
headers:
|
|
5757
|
-
pathParameters:
|
|
5758
|
-
queryParameters:
|
|
5759
|
-
requestBody:
|
|
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
|
-
|
|
5765
|
-
orgId:
|
|
5766
|
-
apiId:
|
|
5767
|
-
sdks:
|
|
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:
|
|
5793
|
+
exampleIdentifier: z30.string().nullish(),
|
|
5770
5794
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
5771
5795
|
})
|
|
5772
|
-
).output(
|
|
5796
|
+
).output(z30.array(z30.unknown())),
|
|
5773
5797
|
load: oc19.route({ method: "POST", path: "/load" }).input(
|
|
5774
|
-
|
|
5775
|
-
orgId:
|
|
5776
|
-
apiId:
|
|
5777
|
-
sdks:
|
|
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
|
-
|
|
5781
|
-
next:
|
|
5782
|
-
snippets:
|
|
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
|
|
5818
|
-
var SnippetRegistryEntrySchema =
|
|
5841
|
+
import * as z31 from "zod";
|
|
5842
|
+
var SnippetRegistryEntrySchema = z31.object({
|
|
5819
5843
|
sdk: SdkSchema,
|
|
5820
|
-
endpointId:
|
|
5821
|
-
path:
|
|
5844
|
+
endpointId: z31.object({
|
|
5845
|
+
path: z31.string(),
|
|
5822
5846
|
method: HttpMethodSchema,
|
|
5823
|
-
identifierOverride:
|
|
5847
|
+
identifierOverride: z31.string().nullish()
|
|
5824
5848
|
}),
|
|
5825
|
-
snippetTemplate:
|
|
5826
|
-
type:
|
|
5827
|
-
functionInvocation:
|
|
5828
|
-
clientInstantiation:
|
|
5849
|
+
snippetTemplate: z31.object({
|
|
5850
|
+
type: z31.literal("v1"),
|
|
5851
|
+
functionInvocation: z31.unknown(),
|
|
5852
|
+
clientInstantiation: z31.string()
|
|
5829
5853
|
}),
|
|
5830
|
-
additionalTemplates:
|
|
5854
|
+
additionalTemplates: z31.record(z31.string(), z31.unknown()).nullish()
|
|
5831
5855
|
});
|
|
5832
|
-
var RegisterInputSchema =
|
|
5833
|
-
orgId:
|
|
5834
|
-
apiId:
|
|
5835
|
-
apiDefinitionId:
|
|
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 =
|
|
5839
|
-
orgId:
|
|
5840
|
-
apiId:
|
|
5841
|
-
apiDefinitionId:
|
|
5842
|
-
snippets:
|
|
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 =
|
|
5845
|
-
orgId:
|
|
5846
|
-
apiId:
|
|
5868
|
+
var GetInputSchema = z31.object({
|
|
5869
|
+
orgId: z31.string(),
|
|
5870
|
+
apiId: z31.string(),
|
|
5847
5871
|
sdk: SdkSchema,
|
|
5848
|
-
endpointId:
|
|
5849
|
-
path:
|
|
5872
|
+
endpointId: z31.object({
|
|
5873
|
+
path: z31.string(),
|
|
5850
5874
|
method: HttpMethodSchema,
|
|
5851
|
-
identifierOverride:
|
|
5875
|
+
identifierOverride: z31.string().nullish()
|
|
5852
5876
|
})
|
|
5853
5877
|
});
|
|
5854
|
-
var EndpointSnippetTemplateSchema =
|
|
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
|
|
5882
|
-
var GenerateTokenInputSchema =
|
|
5883
|
-
orgId:
|
|
5884
|
-
scope:
|
|
5885
|
-
});
|
|
5886
|
-
var RevokeTokenInputSchema =
|
|
5887
|
-
orgId:
|
|
5888
|
-
tokenId:
|
|
5889
|
-
});
|
|
5890
|
-
var GenerateTokenOutputSchema =
|
|
5891
|
-
token:
|
|
5892
|
-
id:
|
|
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),
|