> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkApproveRequestReview

# Package: cmsCompliance

# Namespace: CmsComplianceService

# Method link: https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-approve-request-review.md

## Permission Scopes:
Enterprise CMS compliance flow : SCOPE.ENTERPRISE.CMS-COMPLIANCE-MANAGE

## Introduction

Approves one or more previously submitted compliance review requests.

Approving applies each request's `action` to the underlying CMS data item and sets the item's
`requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests
returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md)
or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md).
All the items belong to the collection specified by `prodCollectionId`.

Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published
from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and
`UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish
and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the
call fails with `INVALID_VERSION_ON_UNPUBLISH`.

Every item must still exist in the collection version its action requires. If any item is missing, the
whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.

Publishing, unpublishing, and the status update each resolve per item, so individual items can fail
while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the
outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*`
item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to
`APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what
actually changed.

To reject review requests instead, call
[Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).

---

## REST API

### Schema

```
 Method: bulkApproveRequestReview
 Description: Approves one or more previously submitted compliance review requests.  Approving applies each request's `action` to the underlying CMS data item and sets the item's `requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). All the items belong to the collection specified by `prodCollectionId`.  Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and `UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the call fails with `INVALID_VERSION_ON_UNPUBLISH`.  Every item must still exist in the collection version its action requires. If any item is missing, the whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.  Publishing, unpublishing, and the status update each resolve per item, so individual items can fail while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*` item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to `APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what actually changed.  To reject review requests instead, call [Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).
 URL: https://www.wixapis.com/cms-compliance/v1/bulk/approve-request-review
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prodCollectionId, items, items.id, items.action, items.submittedByUserId, items.submittedByAccountId
 Method parameters: 
   param name: items | type: array<items> | description: Compliance review requests to approve, as returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). Each item's `id` must appear once per call. | required: true | validation: minItems 1, maxItems 100
              - name: id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item. | required: true | read-only: true | validation: format GUID
              - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item. | required: true 
                     - enum:
                     -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                     -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                     -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                     -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                     -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
              - name: submittedByUserId | type: string | description: GUID of the user who submitted the action. | required: true | read-only: true | validation: format GUID
              - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under. | required: true | read-only: true | validation: format GUID
   param name: prodCollectionId | type: prodCollectionId | description: GUID of the published CMS collection every item in the request belongs to. A single call approves items from a single collection. | required: true | validation: maxLength 256
 Return type: BulkApproveRequestReviewResponse
  - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Approved compliance review requests, in the same order as the request's `items`. The same objects are emitted in the [Bulk Review Approved](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-review-approved.md) event.  Each one is built from the data items as they stand in CMS at the moment the decision is made, not from the copy sent in the request. Their `requestReviewStatus` is therefore the value the items held before this call; the status this call wrote is in `statusUpdateResults`.  | validation: maxItems 100
     - name: id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.  | read-only: true | validation: format GUID
     - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
         - enum:
         -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
         -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
         -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
         -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
         -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
     - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.  | read-only: true 
        - name: id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.  | validation: maxLength 128, immutable
        - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.  | read-only: true | validation: maxLength 256
        - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_owner`: GUID of the user who created the item. Can be modified with site owner permissions.  
     - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.  | read-only: true 
     - name: submittedAt | type: string | description: Date and time the action was submitted.  | read-only: true | validation: format date-time
     - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.  | read-only: true | validation: format GUID
     - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.  | read-only: true | validation: format GUID
     - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished. Returned only for `UNPUBLISH_CHANGED` when the caller provides a meaningful value.  | read-only: true 
         - enum:
         -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
         -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.
  - name: publishResult | type: BulkPublishDataItemDraftsResponse | description: Results of publishing the items whose action starts with `PUBLISH`, with 1 entry per item the call tried to publish. Each entry's `itemMetadata` reports whether that item was published, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `PUBLISH`.  
     - name: results | type: array<BulkPublishDataItemDraftResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true`, the published item.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
           - name: id | type: string | description: Item GUID. Does not appear if the item GUID is missing. For example, when item creation fails.  | validation: maxLength 128
           - name: originalIndex | type: integer | description: Original index of the item in the array specified in the request. Use this to match items in the request with those in the response.  
           - name: success | type: boolean | description: Whether the requested action was successful. When `false`, the `error` field is populated.  
           - name: error | type: ApplicationError | description: In case of failure, the error details.  
              - name: code | type: string | description: Error code.  
              - name: description | type: string | description: Description of the error.  
              - name: data | type: object | description: Data related to the error.  
        - name: dataItem | type: DataItem | description: Published data item.  Returned only when `returnEntity` is `true` and this item was published successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
        - name: totalSuccesses | type: integer | description: Number of items successfully processed.  
        - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
  - name: unpublishResult | type: BulkUnpublishDataItemsResponse | description: Results of unpublishing the items whose action starts with `UNPUBLISH`, with 1 entry per item the call tried to unpublish. Each entry's `itemMetadata` reports whether that item was unpublished, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `UNPUBLISH`.  
     - name: results | type: array<BulkUnpublishDataItemsResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true` and `copyToDraft` isn't `false`, the resulting draft.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
        - name: dataItem | type: DataItem | description: Draft created from the unpublished data item.  Returned only when `returnEntity` is `true`, `copyToDraft` isn't `false`, and this item was unpublished successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
  - name: statusUpdateResults | type: array<BulkUpdateDataItemsResponse> | description: Results of setting `requestReviewStatus` to `APPROVED`. Within each entry, `results` holds 1 entry per item, whose `itemMetadata` reports whether the status was set and whose `itemMetadata.originalIndex` is the item's position in the request's `items` array.  The status is set in one update per publishing direction, and there's 1 entry here per update, not per item. A batch whose actions all start with `PUBLISH`, or all start with `UNPUBLISH`, therefore returns a single entry covering every item in it. A batch that mixes the two returns 2 entries, the first covering its `PUBLISH_*` items and the second its `UNPUBLISH_*` items.  `PUBLISH_*` items are always covered, because their status is set before they're published. An `UNPUBLISH_*` item is covered only if it was unpublished successfully, so a batch whose unpublishes all failed has no second entry at all. This isn't a complete list of the items in the request: for any item missing from it, read `unpublishResult` to see why.  | validation: maxItems 2
     - name: results | type: array<BulkDataItemResult> | description: Information about the updated items.  
        - name: action | type: BulkActionType | description: Action attempted for the data item.  
             - enum: UNKNOWN_ACTION_TYPE, INSERT, UPDATE, DELETE, PATCH
        - name: itemMetadata | type: ItemMetadata | description: Item metadata.  
        - name: dataItem | type: DataItem | description: Updated data item.  Returned if `returnEntity` is set to `true` and the action is successful.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_ITEM_ID | Description: The same item id appears more than once in `items`. Each id may only be submitted once per call.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_VERSION_ON_UNPUBLISH | Description: An `UNPUBLISH_CHANGED` item doesn't specify a recognized `versionOnUnpublish`.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ACTION | Description: An item's `action` is missing or isn't a recognized review action.
   HTTP Code: 401 | Status Code: UNAUTHENTICATED | Application Code: MISSING_IDENTITY | Description: The request identity doesn't include the required account GUID.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DATA_ITEMS_NOT_FOUND | Description: Couldn't find one or more of the data items in the collection version their `action` requires. The whole call fails and nothing is changed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CMS_METASITE_NOT_RESOLVED | Description: Couldn't resolve the account's CMS metasite. Exactly one `ACCOUNT_MASTER_CMS` metasite must exist for the account.


```

### Examples

### Approve a batch that mixes publish and unpublish items
Approves 2 review requests from the same collection, one PUBLISH_CHANGED and one UNPUBLISH_CHANGED. Because the batch mixes the two directions and both succeeded, statusUpdateResults holds 2 entries, one per direction.

```curl
curl -X POST \
'https://www.wixapis.com/cms-compliance/v1/bulk/approve-request-review' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "prodCollectionId": "Announcements",
  "items": [
    {
      "id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
      "action": "PUBLISH_CHANGED",
      "submittedAt": "2024-01-15T10:30:00.000Z",
      "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
      "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8"
    },
    {
      "id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
      "action": "UNPUBLISH_CHANGED",
      "versionOnUnpublish": "KEEP_LATEST_DRAFT_VERSION",
      "submittedAt": "2024-01-15T10:30:00.000Z",
      "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
      "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8"
    }
  ]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.enterpriseCmsCompliance.enterpriseCmsCompliance.bulkApproveRequestReview(prodCollectionId, options)
 Description: Approves one or more previously submitted compliance review requests.  Approving applies each request's `action` to the underlying CMS data item and sets the item's `requestReviewStatus` to `APPROVED`. Specify `prodCollectionId` and the compliance review requests returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). All the items belong to the collection specified by `prodCollectionId`.  Each item is resolved on its own `action`. `PUBLISH_DRAFT` and `PUBLISH_CHANGED` items are published from their draft, `PUBLISH_PUBLISHED` items are already live so only their status is set, and `UNPUBLISH_PUBLISHED` and `UNPUBLISH_CHANGED` items are unpublished. A single call can combine publish and unpublish items. Each `UNPUBLISH_CHANGED` item must specify its own `versionOnUnpublish`, or the call fails with `INVALID_VERSION_ON_UNPUBLISH`.  Every item must still exist in the collection version its action requires. If any item is missing, the whole call fails with `DATA_ITEMS_NOT_FOUND` and nothing is published, unpublished, or updated.  Publishing, unpublishing, and the status update each resolve per item, so individual items can fail while the rest succeed. Read `publishResult`, `unpublishResult`, and `statusUpdateResults` for the outcome of each item. The status is set before publishing but after unpublishing, so a `PUBLISH_*` item can be `APPROVED` without having been published, while an `UNPUBLISH_*` item is set to `APPROVED` only once it was unpublished. Read the content results, not the status, to confirm what actually changed.  To reject review requests instead, call [Bulk Reject Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-reject-request-review.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prodCollectionId, options.items, options.items._id, options.items.action, options.items.submittedByUserId, options.items.submittedByAccountId, options
 Method parameters: 
   param name: options | type: BulkApproveRequestReviewOptions  none | required: true 
        - name: items | type: array<ComplianceReviewRequest> | description: Compliance review requests to approve, as returned by [Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/request-review.md) or [Bulk Request Review](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-request-review.md). Each item's `id` must appear once per call. | required: true | validation: minItems 1, maxItems 100
           - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
                 - enum:
                 -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
                 -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
                 -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
                 -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
                 -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
   param name: prodCollectionId | type: string | description: GUID of the published CMS collection every item in the request belongs to. A single call approves items from a single collection. | required: true | validation: maxLength 256
 Return type: PROMISE<BulkApproveRequestReviewResponse>
  - name: complianceReviewRequests | type: array<ComplianceReviewRequest> | description: Approved compliance review requests, in the same order as the request's `items`. The same objects are emitted in the [Bulk Review Approved](https://dev.wix.com/docs/api-reference/account-level/enterprise/cms-compliance/compliance-review-request-v1/bulk-review-approved.md) event.  Each one is built from the data items as they stand in CMS at the moment the decision is made, not from the copy sent in the request. Their `requestReviewStatus` is therefore the value the items held before this call; the status this call wrote is in `statusUpdateResults`.  | validation: maxItems 100
     - name: _id | type: string | description: Compliance review request GUID. Matches the `_id` of the submitted data item.  | read-only: true | validation: format GUID
     - name: action | type: ReviewAction | description: Publishing or unpublishing action the user requested for the data item.  
         - enum:
         -     PUBLISH_DRAFT: Publish an item that currently exists only as a draft.
         -     PUBLISH_CHANGED: Publish a draft containing changes to an existing published item.
         -     UNPUBLISH_PUBLISHED: Unpublish an item that has no pending draft changes.
         -     PUBLISH_PUBLISHED: Submit an already-published item for review without content changes.
         -     UNPUBLISH_CHANGED: Unpublish an item that also has pending draft changes.
     - name: currentDataItem | type: DataItem | description: Published (live) version of the data item. Returned for every action except `PUBLISH_DRAFT`.  | read-only: true 
        - name: _id | type: string | description: Data item GUID.  When an item is inserted into a collection, the item's GUID is automatically assigned a random value. You can optionally provide a custom GUID in `dataItem.id` when inserting the item. If you specify an GUID that already exists in the collection, the insertion will fail.  | validation: maxLength 128, immutable
        - name: dataCollectionId | type: string | description: GUID of the collection this item belongs to.  This is the user-defined collection identifier set when the collection is created (for example, `EvalCustomers`), not a GUID.  | read-only: true | validation: maxLength 256
        - name: data | type: object | description: Data item contents.  Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:  + `_id`: Item GUID. + `_createdDate`: Date and time the item was added to the collection. + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. + `_owner`: GUID of the user who created the item. Can be modified with site owner permissions.  
     - name: proposedDataItem | type: DataItem | description: Version of the data item proposed by the request. For `PUBLISH_PUBLISHED`, this is the same published item as `current_data_item`. Absent only for `UNPUBLISH_PUBLISHED`.  | read-only: true 
     - name: submittedAt | type: Date | description: Date and time the action was submitted.  | read-only: true 
     - name: submittedByUserId | type: string | description: GUID of the user who submitted the action.  | read-only: true | validation: format GUID
     - name: submittedByAccountId | type: string | description: GUID of the account the action was submitted under.  | read-only: true | validation: format GUID
     - name: versionOnUnpublish | type: VersionOnUnpublish | description: Version to preserve as a draft after a changed item is unpublished. Returned only for `UNPUBLISH_CHANGED` when the caller provides a meaningful value.  | read-only: true 
         - enum:
         -     KEEP_LATEST_DRAFT_VERSION: Preserve the item's latest draft edits.
         -     KEEP_LIVE_PUBLISHED_VERSION: Preserve the item's current live version.
  - name: publishResult | type: BulkPublishDataItemDraftsResponse | description: Results of publishing the items whose action starts with `PUBLISH`, with 1 entry per item the call tried to publish. Each entry's `itemMetadata` reports whether that item was published, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `PUBLISH`.  
     - name: results | type: array<BulkPublishDataItemDraftResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true`, the published item.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
           - name: _id | type: string | description: Item GUID. Does not appear if the item GUID is missing. For example, when item creation fails.  | validation: maxLength 128
           - name: originalIndex | type: integer | description: Original index of the item in the array specified in the request. Use this to match items in the request with those in the response.  
           - name: success | type: boolean | description: Whether the requested action was successful. When `false`, the `error` field is populated.  
           - name: error | type: ApplicationError | description: In case of failure, the error details.  
              - name: code | type: string | description: Error code.  
              - name: description | type: string | description: Description of the error.  
              - name: data | type: object | description: Data related to the error.  
        - name: dataItem | type: DataItem | description: Published data item.  Returned only when `returnEntity` is `true` and this item was published successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
        - name: totalSuccesses | type: integer | description: Number of items successfully processed.  
        - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
  - name: unpublishResult | type: BulkUnpublishDataItemsResponse | description: Results of unpublishing the items whose action starts with `UNPUBLISH`, with 1 entry per item the call tried to unpublish. Each entry's `itemMetadata` reports whether that item was unpublished, and its `itemMetadata.originalIndex` is the item's position in the request's `items` array.  Returned only when the request contains at least 1 item whose action starts with `UNPUBLISH`.  
     - name: results | type: array<BulkUnpublishDataItemsResult> | description: Per-item results, in the same order as `dataItemIds` in the request. Each entry includes success or error details and, when `returnEntity` is `true` and `copyToDraft` isn't `false`, the resulting draft.  
        - name: itemMetadata | type: ItemMetadata | description: Per-item success or failure details. Use `originalIndex` to match this result to an GUID in the request's `dataItemIds` array.  
        - name: dataItem | type: DataItem | description: Draft created from the unpublished data item.  Returned only when `returnEntity` is `true`, `copyToDraft` isn't `false`, and this item was unpublished successfully.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Total numbers of items that succeeded and failed.  
  - name: statusUpdateResults | type: array<BulkUpdateDataItemsResponse> | description: Results of setting `requestReviewStatus` to `APPROVED`. Within each entry, `results` holds 1 entry per item, whose `itemMetadata` reports whether the status was set and whose `itemMetadata.originalIndex` is the item's position in the request's `items` array.  The status is set in one update per publishing direction, and there's 1 entry here per update, not per item. A batch whose actions all start with `PUBLISH`, or all start with `UNPUBLISH`, therefore returns a single entry covering every item in it. A batch that mixes the two returns 2 entries, the first covering its `PUBLISH_*` items and the second its `UNPUBLISH_*` items.  `PUBLISH_*` items are always covered, because their status is set before they're published. An `UNPUBLISH_*` item is covered only if it was unpublished successfully, so a batch whose unpublishes all failed has no second entry at all. This isn't a complete list of the items in the request: for any item missing from it, read `unpublishResult` to see why.  | validation: maxItems 2
     - name: results | type: array<BulkDataItemResult> | description: Information about the updated items.  
        - name: action | type: BulkActionType | description: Action attempted for the data item.  
             - enum: UNKNOWN_ACTION_TYPE, INSERT, UPDATE, DELETE, PATCH
        - name: itemMetadata | type: ItemMetadata | description: Item metadata.  
        - name: dataItem | type: DataItem | description: Updated data item.  Returned if `returnEntity` is set to `true` and the action is successful.  
     - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk action metadata.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_ITEM_ID | Description: The same item id appears more than once in `items`. Each id may only be submitted once per call.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_VERSION_ON_UNPUBLISH | Description: An `UNPUBLISH_CHANGED` item doesn't specify a recognized `versionOnUnpublish`.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_ACTION | Description: An item's `action` is missing or isn't a recognized review action.
   HTTP Code: 401 | Status Code: UNAUTHENTICATED | Application Code: MISSING_IDENTITY | Description: The request identity doesn't include the required account GUID.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: DATA_ITEMS_NOT_FOUND | Description: Couldn't find one or more of the data items in the collection version their `action` requires. The whole call fails and nothing is changed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CMS_METASITE_NOT_RESOLVED | Description: Couldn't resolve the account's CMS metasite. Exactly one `ACCOUNT_MASTER_CMS` metasite must exist for the account.


```

### Examples

### Approve a batch that mixes publish and unpublish items
Approves 2 review requests from the same collection, one PUBLISH_CHANGED and one UNPUBLISH_CHANGED. Because the batch mixes the two directions and both succeeded, statusUpdateResults holds 2 entries, one per direction.

```javascript
import { enterpriseCmsCompliance } from "@wix/enterprise-cms-compliance";

async function bulkApproveRequestReview() {
  const response = await enterpriseCmsCompliance.bulkApproveRequestReview(
    "Announcements",
    {
      items: [
        {
          _id: "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
          action: "PUBLISH_CHANGED",
          submittedAt: new Date("2024-01-15T10:30:00.000Z"),
          submittedByUserId: "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
          submittedByAccountId: "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
        },
        {
          _id: "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
          action: "UNPUBLISH_CHANGED",
          versionOnUnpublish: "KEEP_LATEST_DRAFT_VERSION",
          submittedAt: new Date("2024-01-15T10:30:00.000Z"),
          submittedByUserId: "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
          submittedByAccountId: "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
        },
      ],
    },
  );
}

/* Promise resolves to:
 * {
 *   "complianceReviewRequests": [
 *     {
 *       "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *       "action": "PUBLISH_CHANGED",
 *       "currentDataItem": {
 *         "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *         "dataCollectionId": "Announcements",
 *         "data": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "_createdDate": "2024-01-14T09:12:40.738Z",
 *           "_updatedDate": "2024-01-14T09:12:40.738Z",
 *           "status": "published",
 *           "title": "Q3 disclosure"
 *         }
 *       },
 *       "proposedDataItem": {
 *         "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *         "dataCollectionId": "Announcements__drafts",
 *         "data": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "_createdDate": "2024-01-15T10:28:10.264Z",
 *           "_updatedDate": "2024-01-15T10:28:10.264Z",
 *           "status": "draft",
 *           "title": "Q3 disclosure (revised)"
 *         }
 *       },
 *       "submittedAt": "2024-01-15T10:30:00Z",
 *       "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
 *       "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
 *       "versionOnUnpublish": "UNKNOWN_VERSION_ON_UNPUBLISH"
 *     },
 *     {
 *       "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *       "action": "UNPUBLISH_CHANGED",
 *       "currentDataItem": {
 *         "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *         "dataCollectionId": "Announcements",
 *         "data": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "_createdDate": "2024-01-14T09:12:40.737Z",
 *           "_updatedDate": "2024-01-14T09:12:40.737Z",
 *           "status": "published",
 *           "title": "Annual compliance statement"
 *         }
 *       },
 *       "proposedDataItem": {
 *         "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *         "dataCollectionId": "Announcements__drafts",
 *         "data": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "_createdDate": "2024-01-15T10:28:10.263Z",
 *           "_updatedDate": "2024-01-15T10:28:10.263Z",
 *           "status": "draft",
 *           "title": "Annual compliance statement (revised)"
 *         }
 *       },
 *       "submittedAt": "2024-01-15T10:30:00Z",
 *       "submittedByUserId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
 *       "submittedByAccountId": "4f907f5d-bb05-4d99-90a4-7f55d34e9fe8",
 *       "versionOnUnpublish": "KEEP_LATEST_DRAFT_VERSION"
 *     }
 *   ],
 *   "publishResult": {
 *     "results": [
 *       {
 *         "itemMetadata": {
 *           "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *           "originalIndex": 0,
 *           "success": true
 *         }
 *       }
 *     ],
 *     "bulkActionMetadata": {
 *       "totalSuccesses": 1,
 *       "totalFailures": 0
 *     }
 *   },
 *   "unpublishResult": {
 *     "results": [
 *       {
 *         "itemMetadata": {
 *           "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *           "originalIndex": 1,
 *           "success": true
 *         }
 *       }
 *     ],
 *     "bulkActionMetadata": {
 *       "totalSuccesses": 1,
 *       "totalFailures": 0
 *     }
 *   },
 *   "statusUpdateResults": [
 *     {
 *       "results": [
 *         {
 *           "action": "UPDATE",
 *           "itemMetadata": {
 *             "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *             "originalIndex": 0,
 *             "success": true
 *           },
 *           "dataItem": {
 *             "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *             "dataCollectionId": "Announcements__drafts",
 *             "data": {
 *               "_id": "b4f87c20-9a16-4e53-8d71-2c6049fb3a85",
 *               "_createdDate": "2024-01-15T10:28:10.264Z",
 *               "_updatedDate": "2024-01-15T10:30:21.363Z",
 *               "status": "draft",
 *               "title": "Q3 disclosure (revised)",
 *               "requestReviewStatus": "APPROVED"
 *             }
 *           }
 *         }
 *       ],
 *       "bulkActionMetadata": {
 *         "totalSuccesses": 1,
 *         "totalFailures": 0
 *       }
 *     },
 *     {
 *       "results": [
 *         {
 *           "action": "UPDATE",
 *           "itemMetadata": {
 *             "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *             "originalIndex": 1,
 *             "success": true
 *           },
 *           "dataItem": {
 *             "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *             "dataCollectionId": "Announcements__drafts",
 *             "data": {
 *               "_id": "17de6c93-4b02-48af-9e35-8a1f7d604c2b",
 *               "_createdDate": "2024-01-15T10:28:10.263Z",
 *               "_updatedDate": "2024-01-15T10:30:22.130Z",
 *               "status": "draft",
 *               "title": "Annual compliance statement (revised)",
 *               "requestReviewStatus": "APPROVED"
 *             }
 *           }
 *         }
 *       ],
 *       "bulkActionMetadata": {
 *         "totalSuccesses": 1,
 *         "totalFailures": 0
 *       }
 *     }
 *   ]
 * }
 */

```

### bulkApproveRequestReview (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { enterpriseCmsCompliance } from '@wix/enterprise-cms-compliance';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { enterpriseCmsCompliance },
  // Include the auth strategy and host as relevant
});


async function bulkApproveRequestReview(prodCollectionId,options) {
  const response = await myWixClient.enterpriseCmsCompliance.bulkApproveRequestReview(prodCollectionId,options);
};
```

---