---
displayed_sidebar: jsClientSidebar
slug: /references/js-client/AdminBatchJobsResource
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# AdminBatchJobsResource

This class is used to send requests to [Admin Batch Job API Routes](https://docs.medusajs.com/api/admin#batch-jobs). All its method
are available in the JS Client under the `medusa.admin.batchJobs` property.

All methods in this class require [user authentication](js_client.AdminAuthResource.mdx#createsession).

A batch job is a task that is performed by the Medusa backend asynchronusly. For example, the Import Product feature is implemented using batch jobs.
The methods in this class allow admins to manage the batch jobs and their state.

Related Guide: [How to import products](https://docs.medusajs.com/modules/products/admin/import-products).

## Methods

### cancel

Mark a batch job as canceled. When a batch job is canceled, the processing of the batch job doesn’t automatically stop.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.cancel(batchJobId)
.then(({ batch_job }) => {
  console.log(batch_job.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "batchJobId",
    "type": "`string`",
    "description": "The ID of the batch job.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminBatchJobRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the batch job's details.",
    "expandable": false,
    "children": [
      {
        "name": "batch_job",
        "type": "[BatchJob](../../entities/classes/entities.BatchJob.mdx)",
        "description": "Batch job details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date of the concellation.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "completed_at",
            "type": "`Date`",
            "description": "The date of the completion.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date when the confirmation has been done.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "context",
            "type": "`Record<string, unknown>`",
            "description": "The context of the batch job, the type of the batch job determines what the context should contain.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`null` \\| `string`",
            "description": "The unique identifier of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by_user",
            "type": "[User](../../entities/classes/entities.User.mdx)",
            "description": "The details of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "api_token",
                "type": "`string`",
                "description": "An API token associated with the user.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`string`",
                "description": "The first name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The user's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`string`",
                "description": "The last name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "password_hash",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "role",
                "type": "[UserRoles](../../entities/enums/entities.UserRoles.mdx)",
                "description": "The user's role. These roles don't provide any different privileges.",
                "optional": false,
                "defaultValue": "member",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "dry_run",
            "type": "`boolean`",
            "description": "Specify if the job must apply the modifications or not.",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "failed_at",
            "type": "`Date`",
            "description": "The date when the job failed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The unique identifier for the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "pre_processed_at",
            "type": "`Date`",
            "description": "The date from which the job has been pre-processed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "processing_at",
            "type": "`Date`",
            "description": "The date the job is processing at.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "result",
            "type": "`object` & `Record<string, unknown>`",
            "description": "The result of the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "advancement_count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "errors",
                "type": "(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_key",
                "type": "`string`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_size",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "progress",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "stat_descriptors",
                "type": "[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "status",
            "type": "[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)",
            "description": "The status of the batch job.",
            "optional": false,
            "defaultValue": "created",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "COMPLETED",
                "type": "`\"completed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CREATED",
                "type": "`\"created\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FAILED",
                "type": "`\"failed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PRE_PROCESSED",
                "type": "`\"pre_processed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PROCESSING",
                "type": "`\"processing\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "`string`",
            "description": "The type of batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was last updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### confirm

When a batch job is created, it's not executed automatically if `dry_run` is set to `true`. This method confirms that the batch job should be executed.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.confirm(batchJobId)
.then(({ batch_job }) => {
  console.log(batch_job.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "batchJobId",
    "type": "`string`",
    "description": "The ID of the batch job.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminBatchJobRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the batch job's details.",
    "expandable": false,
    "children": [
      {
        "name": "batch_job",
        "type": "[BatchJob](../../entities/classes/entities.BatchJob.mdx)",
        "description": "Batch job details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date of the concellation.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "completed_at",
            "type": "`Date`",
            "description": "The date of the completion.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date when the confirmation has been done.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "context",
            "type": "`Record<string, unknown>`",
            "description": "The context of the batch job, the type of the batch job determines what the context should contain.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`null` \\| `string`",
            "description": "The unique identifier of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by_user",
            "type": "[User](../../entities/classes/entities.User.mdx)",
            "description": "The details of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "api_token",
                "type": "`string`",
                "description": "An API token associated with the user.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`string`",
                "description": "The first name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The user's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`string`",
                "description": "The last name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "password_hash",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "role",
                "type": "[UserRoles](../../entities/enums/entities.UserRoles.mdx)",
                "description": "The user's role. These roles don't provide any different privileges.",
                "optional": false,
                "defaultValue": "member",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "dry_run",
            "type": "`boolean`",
            "description": "Specify if the job must apply the modifications or not.",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "failed_at",
            "type": "`Date`",
            "description": "The date when the job failed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The unique identifier for the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "pre_processed_at",
            "type": "`Date`",
            "description": "The date from which the job has been pre-processed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "processing_at",
            "type": "`Date`",
            "description": "The date the job is processing at.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "result",
            "type": "`object` & `Record<string, unknown>`",
            "description": "The result of the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "advancement_count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "errors",
                "type": "(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_key",
                "type": "`string`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_size",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "progress",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "stat_descriptors",
                "type": "[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "status",
            "type": "[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)",
            "description": "The status of the batch job.",
            "optional": false,
            "defaultValue": "created",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "COMPLETED",
                "type": "`\"completed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CREATED",
                "type": "`\"created\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FAILED",
                "type": "`\"failed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PRE_PROCESSED",
                "type": "`\"pre_processed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PROCESSING",
                "type": "`\"processing\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "`string`",
            "description": "The type of batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was last updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### create

Create a Batch Job to be executed asynchronously in the Medusa backend. If `dry_run` is set to `true`, the batch job will not be executed until the it is confirmed,
which can be done using the [confirm](js_client.AdminBatchJobsResource.mdx#confirm) method.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.create({
  type: 'product-export',
  context: {},
  dry_run: false
}).then((({ batch_job }) => {
  console.log(batch_job.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[AdminPostBatchesReq](../../medusa/classes/medusa.AdminPostBatchesReq.mdx)",
    "description": "The data of the batch job to create.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "context",
        "type": "`Record<string, unknown>`",
        "description": "Additional infomration regarding the batch to be used for processing.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "dry_run",
        "type": "`boolean`",
        "description": "Set a batch job in dry\\_run mode, which would delay executing the batch job until it's confirmed.",
        "optional": false,
        "defaultValue": "false",
        "expandable": false,
        "children": []
      },
      {
        "name": "type",
        "type": "`string`",
        "description": "The type of batch job to start, which is defined by the `batchType` property of the associated batch job strategy.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminBatchJobRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the batch job's details.",
    "expandable": false,
    "children": [
      {
        "name": "batch_job",
        "type": "[BatchJob](../../entities/classes/entities.BatchJob.mdx)",
        "description": "Batch job details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date of the concellation.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "completed_at",
            "type": "`Date`",
            "description": "The date of the completion.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date when the confirmation has been done.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "context",
            "type": "`Record<string, unknown>`",
            "description": "The context of the batch job, the type of the batch job determines what the context should contain.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`null` \\| `string`",
            "description": "The unique identifier of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by_user",
            "type": "[User](../../entities/classes/entities.User.mdx)",
            "description": "The details of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "api_token",
                "type": "`string`",
                "description": "An API token associated with the user.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`string`",
                "description": "The first name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The user's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`string`",
                "description": "The last name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "password_hash",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "role",
                "type": "[UserRoles](../../entities/enums/entities.UserRoles.mdx)",
                "description": "The user's role. These roles don't provide any different privileges.",
                "optional": false,
                "defaultValue": "member",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "dry_run",
            "type": "`boolean`",
            "description": "Specify if the job must apply the modifications or not.",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "failed_at",
            "type": "`Date`",
            "description": "The date when the job failed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The unique identifier for the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "pre_processed_at",
            "type": "`Date`",
            "description": "The date from which the job has been pre-processed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "processing_at",
            "type": "`Date`",
            "description": "The date the job is processing at.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "result",
            "type": "`object` & `Record<string, unknown>`",
            "description": "The result of the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "advancement_count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "errors",
                "type": "(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_key",
                "type": "`string`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_size",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "progress",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "stat_descriptors",
                "type": "[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "status",
            "type": "[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)",
            "description": "The status of the batch job.",
            "optional": false,
            "defaultValue": "created",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "COMPLETED",
                "type": "`\"completed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CREATED",
                "type": "`\"created\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FAILED",
                "type": "`\"failed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PRE_PROCESSED",
                "type": "`\"pre_processed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PROCESSING",
                "type": "`\"processing\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "`string`",
            "description": "The type of batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was last updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### list

Retrieve a list of Batch Jobs. The batch jobs can be filtered by fields such as `type` or `confirmed_at`. The batch jobs can also be sorted or paginated.

#### Example

To list batch jobs:

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.list()
.then(({ batch_jobs, limit, offset, count }) => {
  console.log(batch_jobs.length)
})
```

To specify relations that should be retrieved within the batch jobs:

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.list({
  expand: "created_by_user"
})
.then(({ batch_jobs, limit, offset, count }) => {
  console.log(batch_jobs.length)
})
```

By default, only the first `10` records are retrieved. You can control pagination by specifying the `limit` and `offset` properties:

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.list({
  expand: "created_by_user",
  limit,
  offset
})
.then(({ batch_jobs, limit, offset, count }) => {
  console.log(batch_jobs.length)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "query",
    "type": "[AdminGetBatchParams](../../medusa/classes/medusa.AdminGetBatchParams.mdx)",
    "description": "Filters and pagination configurations to apply on the retrieved batch jobs.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "canceled_at",
        "type": "`null` \\| [DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `canceled_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "completed_at",
        "type": "`null` \\| [DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `completed_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "confirmed_at",
        "type": "`null` \\| [DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `confirmed_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "created_at",
        "type": "[DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `created_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "gt",
            "type": "`Date`",
            "description": "The filtered date must be greater than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "gte",
            "type": "`Date`",
            "description": "The filtered date must be greater than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lt",
            "type": "`Date`",
            "description": "The filtered date must be less than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lte",
            "type": "`Date`",
            "description": "The filtered date must be less than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "failed_at",
        "type": "`null` \\| [DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `failed_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string` \\| `string`[]",
        "description": "IDs to filter batch jobs by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "limit",
        "type": "`number`",
        "description": "Limit the number of items returned in the list.",
        "optional": false,
        "defaultValue": "10",
        "expandable": false,
        "children": []
      },
      {
        "name": "offset",
        "type": "`number`",
        "description": "The number of items to skip when retrieving a list.",
        "optional": false,
        "defaultValue": "0",
        "expandable": false,
        "children": []
      },
      {
        "name": "order",
        "type": "`string`",
        "description": "The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "pre_processed_at",
        "type": "`null` \\| [DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `pre_processed_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "type",
        "type": "`string`[]",
        "description": "Types to filter batch jobs by.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "updated_at",
        "type": "[DateComparisonOperator](../../medusa/classes/medusa.DateComparisonOperator.mdx)",
        "description": "Date filters to apply on the batch jobs' `updated_at` date.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "gt",
            "type": "`Date`",
            "description": "The filtered date must be greater than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "gte",
            "type": "`Date`",
            "description": "The filtered date must be greater than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lt",
            "type": "`Date`",
            "description": "The filtered date must be less than this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "lte",
            "type": "`Date`",
            "description": "The filtered date must be less than or equal to this value.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminBatchJobListRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "The list of batch jobs with pagination fields.",
    "expandable": false,
    "children": [
      {
        "name": "AdminBatchJobListRes",
        "type": "[PaginatedResponse](../../medusa/interfaces/medusa.PaginatedResponse.mdx) & `object`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "count",
            "type": "`number`",
            "description": "The total number of items available.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "limit",
            "type": "`number`",
            "description": "The maximum number of items that can be returned in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "offset",
            "type": "`number`",
            "description": "The number of items skipped before the returned items in the list.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "batch_jobs",
            "type": "[BatchJob](../../entities/classes/entities.BatchJob.mdx)[]",
            "description": "An array of batch job details.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date of the concellation.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "completed_at",
                "type": "`Date`",
                "description": "The date of the completion.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "confirmed_at",
                "type": "`Date`",
                "description": "The date when the confirmation has been done.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "context",
                "type": "`Record<string, unknown>`",
                "description": "The context of the batch job, the type of the batch job determines what the context should contain.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_by",
                "type": "`null` \\| `string`",
                "description": "The unique identifier of the user that created the batch job.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_by_user",
                "type": "[User](../../entities/classes/entities.User.mdx)",
                "description": "The details of the user that created the batch job.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "dry_run",
                "type": "`boolean`",
                "description": "Specify if the job must apply the modifications or not.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "failed_at",
                "type": "`Date`",
                "description": "The date when the job failed.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The unique identifier for the batch job.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "pre_processed_at",
                "type": "`Date`",
                "description": "The date from which the job has been pre-processed.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "processing_at",
                "type": "`Date`",
                "description": "The date the job is processing at.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "result",
                "type": "`object` & `Record<string, unknown>`",
                "description": "The result of the batch job.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)",
                "description": "The status of the batch job.",
                "optional": false,
                "defaultValue": "created",
                "expandable": false,
                "children": []
              },
              {
                "name": "type",
                "type": "`string`",
                "description": "The type of batch job.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was last updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          }
        ]
      }
    ]
  }
]} />

___

### retrieve

Retrieve the details of a batch job.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.batchJobs.retrieve(batchJobId)
.then(({ batch_job }) => {
  console.log(batch_job.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "batchJobId",
    "type": "`string`",
    "description": "The ID of the batch job.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminBatchJobRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the batch job's details.",
    "expandable": false,
    "children": [
      {
        "name": "batch_job",
        "type": "[BatchJob](../../entities/classes/entities.BatchJob.mdx)",
        "description": "Batch job details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date of the concellation.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "completed_at",
            "type": "`Date`",
            "description": "The date of the completion.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date when the confirmation has been done.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "context",
            "type": "`Record<string, unknown>`",
            "description": "The context of the batch job, the type of the batch job determines what the context should contain.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`null` \\| `string`",
            "description": "The unique identifier of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by_user",
            "type": "[User](../../entities/classes/entities.User.mdx)",
            "description": "The details of the user that created the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "api_token",
                "type": "`string`",
                "description": "An API token associated with the user.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`string`",
                "description": "The first name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The user's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`string`",
                "description": "The last name of the User",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "password_hash",
                "type": "`string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "role",
                "type": "[UserRoles](../../entities/enums/entities.UserRoles.mdx)",
                "description": "The user's role. These roles don't provide any different privileges.",
                "optional": false,
                "defaultValue": "member",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "dry_run",
            "type": "`boolean`",
            "description": "Specify if the job must apply the modifications or not.",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "failed_at",
            "type": "`Date`",
            "description": "The date when the job failed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The unique identifier for the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "pre_processed_at",
            "type": "`Date`",
            "description": "The date from which the job has been pre-processed.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "processing_at",
            "type": "`Date`",
            "description": "The date the job is processing at.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "result",
            "type": "`object` & `Record<string, unknown>`",
            "description": "The result of the batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "advancement_count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "count",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "errors",
                "type": "(`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx))[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_key",
                "type": "`string`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "file_size",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "progress",
                "type": "`number`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "stat_descriptors",
                "type": "[BatchJobResultStatDescriptor](../../medusa/types/medusa.BatchJobResultStatDescriptor.mdx)[]",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "status",
            "type": "[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)",
            "description": "The status of the batch job.",
            "optional": false,
            "defaultValue": "created",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "COMPLETED",
                "type": "`\"completed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CREATED",
                "type": "`\"created\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FAILED",
                "type": "`\"failed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PRE_PROCESSED",
                "type": "`\"pre_processed\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PROCESSING",
                "type": "`\"processing\"`",
                "description": "",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "`string`",
            "description": "The type of batch job.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was last updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
