chore: prepare v1.0.0 release
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export type DriveAction = 'new' | 'replace'
|
||||
import { isRecord } from './guards'
|
||||
|
||||
type DriveAction = 'new' | 'replace'
|
||||
|
||||
interface StagingRequestBody {
|
||||
stagingId: string
|
||||
@@ -8,10 +10,6 @@ interface DriveRequestBody extends StagingRequestBody {
|
||||
action: DriveAction
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === 'object' && value !== null
|
||||
}
|
||||
|
||||
export function parseStagingRequestBody(value: unknown): StagingRequestBody {
|
||||
if (!isRecord(value) || typeof value.stagingId !== 'string' || value.stagingId.trim() === '') {
|
||||
throw new Error('stagingId manquant')
|
||||
|
||||
Reference in New Issue
Block a user