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_at
DateThe date of the concellation.
completed_at
DateThe date of the completion.
confirmed_at
DateThe date when the confirmation has been done.
context
Record<string, unknown>RequiredThe context of the batch job, the type of the batch job determines what the context should contain.
created_at
DateRequiredThe date with timezone at which the resource was created.
created_by
null | stringRequiredThe unique identifier of the user that created the batch job.
The details of the user that created the batch job.
deleted_at
null | DateRequiredThe date with timezone at which the resource was deleted.
dry_run
booleanRequiredSpecify if the job must apply the modifications or not.
Default: false
failed_at
DateThe date when the job failed.
id
stringRequiredThe unique identifier for the batch job.
pre_processed_at
DateThe date from which the job has been pre-processed.
processing_at
DateThe 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
type
stringRequiredThe type of batch job.
updated_at
DateRequiredThe date with timezone at which the resource was last updated.
Methods
beforeInsert
Private **beforeInsert**(): void
Returns
void
void
voidloadStatus
**loadStatus**(): void
Returns
void
void
voidtoJSON
**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?