BatchJob
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
Constructors
constructor
**new BatchJob**()
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
Properties
canceled_atDateThe date of the concellation.
completed_atDateThe date of the completion.
confirmed_atDateThe date when the confirmation has been done.
contextRecord<string, unknown>RequiredThe context of the batch job, the type of the batch job determines what the context should contain.
created_atDateRequiredThe date with timezone at which the resource was created.
created_bynull | stringRequiredThe unique identifier of the user that created the batch job.
The details of the user that created the batch job.
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
dry_runbooleanRequiredSpecify if the job must apply the modifications or not.
Default: false
failed_atDateThe date when the job failed.
idstringRequiredThe unique identifier for the batch job.
pre_processed_atDateThe date from which the job has been pre-processed.
processing_atDateThe date the job is processing at.
result{ advancement_count?: number ; count?: number ; errors?: (string \| [BatchJobResultError](/references/services/types/BatchJobResultError))[] ; file_key?: string ; file_size?: number ; progress?: number ; stat_descriptors?: [BatchJobResultStatDescriptor](/references/services/types/BatchJobResultStatDescriptor)[] } & Record<string, unknown>RequiredThe result of the batch job.
The status of the batch job.
Default: created
typestringRequiredThe type of batch job.
updated_atDateRequiredThe date with timezone at which the resource was last updated.
Methods
beforeInsert
Private **beforeInsert**(): void
Returns
void
voidvoidloadStatus
**loadStatus**(): void
Returns
void
voidvoidtoJSON
**toJSON**(): [BatchJob](/references/services/classes/BatchJob)
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
Returns
Was this section helpful?