Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/linkedin

src/upload-video-part.ts

16 lines · 795 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:@kody/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)
}