OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

file.downloadUrl

Get a presigned download URL.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.files
  • Tags: files, download
  • File: packages/libs/files/src/contracts/index.ts
  • field.key.label
    file.downloadUrl
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    file.downloadUrl
    field.description.label

    Get a presigned download URL.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.files
  • Tags: files, download
  • File: packages/libs/files/src/contracts/index.ts
  • field.tags.label
    files,download
    field.owners.label
    platform.files
    field.stability.label
    stable

    Get a presigned download URL.

    Goal

    Generate a temporary URL for downloading.

    Context

    Called when user wants to download a file.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const GetDownloadUrlContract = defineQuery({
    	meta: {
    		key: 'file.downloadUrl',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.files'],
    		tags: ['files', 'download'],
    		description: 'Get a presigned download URL.',
    		goal: 'Generate a temporary URL for downloading.',
    		context: 'Called when user wants to download a file.',
    	},
    	io: {
    		input: GetDownloadUrlInput,
    		output: PresignedUrlModel,
    		errors: {
    			FILE_NOT_FOUND: {
    				description: 'File does not exist',
    				http: 404,
    				gqlCode: 'FILE_NOT_FOUND',
    				when: 'File ID is invalid',
    			},
    		},
    	},
    	policy: {
    		auth: 'user',
    	},
    });