Id
Generates IDs for media, resources, clips, and elements
type ApiEndpointId = 'add' | 'apis' | 'decode' | 'delete' | 'download' | 'encode' | 'file' | 'find' | 'insert' | 'mash' | 'media' | 'remove' | 'status' | 'transcode' | 'upload'
type EvaluationId = string
type IdIsTempFunction = (id: string) => boolean
type IdIsUuidFunction = (id: string) => boolean
type IdLocalFunction = (prefix?: string) => LocalId
type IdMediaFunction = () => string
interface IdPlugin
extends Plugable {
install: function
isTemp: IdIsTempFunction
isUuid: IdIsUuidFunction
local: IdLocalFunction
media: IdMediaFunction
resource: IdResourceFunction
temp: IdTempFunction
}
type IdTempFunction = () => TemporaryUuid
type LocalId = string
type PluginIdkeyof Plugables
type ScalarsById = Partial<SignalScalarRecord>
/**
* A signal id is a string with a dot in
* it, like `clip.frame` or `media.label`.
*/
type SignalId = string
interface StorableMediaWithId
extends StorableMedia {
accountId?: string
createdAt?: number
id?: string
label: string
resources?: Array<StorableResource>
source: string
type: string
updatedAt?: number
}
type TemporaryUuid = string
interface UserIdAndId {
accountId: string
id: string
}
/**
* UUID version 4 string.
See [RFC
* 4112](https://tools.ietf.org/html/rfc4122)
*/
type Uuid = string
interface WithId {
id: string
}
/** @implements IdPlugin */
class IdPluginClass
extends PluginClass {
install: function
isTemp: IdIsTempFunction
isUuid: IdIsUuidFunction
local: IdLocalFunction
media: IdMediaFunction
resource: IdResourceFunction
temp: IdTempFunction
}
function containsSignalId(
value: string
): boolean
/** Type guard for WithId */
function hasId(
value: unknown
): boolean
/** Type guard for SignalId */
function isSignalId(
value: unknown
): boolean