Skip to content
← Public packages

@kentcdodds/linkedin

Headless helpers for LinkedIn identity, requests, and guarded posting using the saved linkedin OAuth integration.

src/upload-video-part.ts

16 lines · 801 B · TypeScript
import { uploadVideoPart, requireRecord } from './client.ts'
import type { UploadVideoPartInput } from './client.ts'

/**
 * Upload one part of a native LinkedIn video to a pre-signed upload URL.
 * @param params.uploadUrl - Pre-signed URL from `register-video-upload`.
 * @returns Upload response metadata including the part ETag/id.
 * @example
 * import uploadVideoPart from 'kody:@kentcdodds/linkedin/upload-video-part'
 * const result = await uploadVideoPart({ uploadUrl: 'https://...', bytesBase64: '...', confirm: true })
 * // => { uploadedPartId: 'etag-value', ... }
 */
export default async function uploadVideoPartEntrypoint(params: Partial<UploadVideoPartInput> & Record<string, unknown> = {}) {
  const input = requireRecord(params, 'upload-video-part')
  return uploadVideoPart(input)
}