@fern-api/fdr-sdk 1.1.23-2bdec6cd78 → 1.1.23-bebb482a16

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.
@@ -4418,6 +4418,49 @@ function createFdrORPCClient(options) {
4418
4418
  tokens: createTokensClient(normalizedOptions)
4419
4419
  };
4420
4420
  }
4421
+
4422
+ // src/orpc-client/files/contract.ts
4423
+ import { oc as oc19 } from "@orpc/contract";
4424
+ import * as z30 from "zod";
4425
+ var PutContentInputSchema = z30.object({
4426
+ contentType: z30.string(),
4427
+ contentLength: z30.number().int().positive()
4428
+ });
4429
+ var PutContentResponseSchema = z30.discriminatedUnion("status", [
4430
+ /** Content already exists in storage — client can skip the S3 upload. */
4431
+ z30.object({ status: z30.literal("exists") }),
4432
+ /** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
4433
+ z30.object({ status: z30.literal("upload_required"), uploadUrl: z30.string() })
4434
+ ]);
4435
+ var PutFileInputSchema = z30.object({
4436
+ hash: z30.string(),
4437
+ contentType: z30.string()
4438
+ });
4439
+ var FileResponseSchema = z30.object({
4440
+ /** SHA-256 hex digest of the file content (64 characters). */
4441
+ hash: z30.string(),
4442
+ /** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
4443
+ downloadUrl: z30.string()
4444
+ });
4445
+ var contentContract = {
4446
+ /**
4447
+ * Check whether content exists or obtain a presigned S3 upload URL.
4448
+ * Requires org membership or super-user.
4449
+ */
4450
+ putContent: oc19.route({ method: "PUT", path: "/" }).input(PutContentInputSchema).output(PutContentResponseSchema)
4451
+ };
4452
+ var filesContract = {
4453
+ /**
4454
+ * Bind a content hash to an org-scoped file path, confirming the S3 upload.
4455
+ * Requires org admin or super-user.
4456
+ */
4457
+ putFile: oc19.route({ method: "PUT", path: "/" }).input(PutFileInputSchema).output(FileResponseSchema),
4458
+ /**
4459
+ * Get a presigned download URL for an org file.
4460
+ * Requires org membership or super-user.
4461
+ */
4462
+ getFile: oc19.route({ method: "GET", path: "/" }).output(FileResponseSchema)
4463
+ };
4421
4464
  export {
4422
4465
  AlgoliaDomainInputSchema,
4423
4466
  ApiAuthSchema,
@@ -4525,6 +4568,7 @@ export {
4525
4568
  FilePathSchema2 as FilePathSchema,
4526
4569
  FilePropertyArraySchema,
4527
4570
  FilePropertySingleSchema,
4571
+ FileResponseSchema,
4528
4572
  FileS3UploadUrlSchema,
4529
4573
  FilenameWithDataSchema,
4530
4574
  FinishDocsRegisterV1InputSchema,
@@ -4718,6 +4762,9 @@ export {
4718
4762
  PullRequestSchema,
4719
4763
  PullRequestState,
4720
4764
  PullRequestStateSchema,
4765
+ PutContentInputSchema,
4766
+ PutContentResponseSchema,
4767
+ PutFileInputSchema,
4721
4768
  PythonLibraryDocsConfigSchema,
4722
4769
  PythonPackageSchema,
4723
4770
  QueryParameterSchema,
@@ -4864,6 +4911,7 @@ export {
4864
4911
  WithDescriptionSchema,
4865
4912
  WithNamespaceSchema,
4866
4913
  YankSchema,
4914
+ contentContract,
4867
4915
  createApiClient,
4868
4916
  createDashboardClient,
4869
4917
  createDocsCacheClient,
@@ -4894,6 +4942,7 @@ export {
4894
4942
  docsV1WriteContract,
4895
4943
  docsV2ReadContract,
4896
4944
  docsV2WriteContract,
4945
+ filesContract,
4897
4946
  generatorCliContract,
4898
4947
  generatorVersionsContract,
4899
4948
  generatorsContract,