# sfcc-webdav

> Salesforce Commerce Cloud simple webdav API

Latest version **1.2.0** (published 2022-08-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install sfcc-webdav
pnpm add sfcc-webdav
yarn add sfcc-webdav
bun add sfcc-webdav
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-08-22 |
| First published | 2019-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 4 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Fabrizio Giustina |
| Maintainers | fgiust |
| Keywords | Salesforce Commerce Cloud, Demandware |

## Links

- npm: https://www.npmjs.com/package/sfcc-webdav
- Repository: https://github.com/openmindlab/sfcc-webdav
- Homepage: https://github.com/openmindlab/sfcc-webdav#readme
- Issues: https://github.com/openmindlab/sfcc-webdav/issues
- npm.io page: https://npm.io/package/sfcc-webdav

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) 0.27.2
- [byte-size](https://npm.io/package/byte-size.md) 8.1.0
- [picocolors](https://npm.io/package/picocolors.md) 1.0.0
- [@types/node](https://npm.io/package/@types/node.md) 18.7.9

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2022-08-22
- 1.1.1 — 2022-06-14
- 1.1.0 — 2022-05-25
- 1.0.2 — 2020-04-26
- 1.0.1 — 2020-04-13
- 1.0.0 — 2019-07-27

## README

# sfcc-webdav

>  Salesforce Commerce Cloud simple webdav API

## Features

* API for upload and delete files via webdav, useful for real-time upload of changes file during development
* Authentication via OCAPI client, uses dw.json for configuration

## Installation

```bash
$ npm i sfcc-webdav
```

## Requirements
* Node >= 10

## Configuration

Requires a dw.json with client_id/secret

```json
{
  "hostname": "dev01-mysandbox.demandware.net",
  "client_id": "a12464ae-b484-4b90-4dfe-17e20844e9f0",
  "client_secret": "mysupersecretpassword"
}
```

### API client configuration

The API client must be created from the account.demandware.com consoleand must be granted the required permissions for accessing the `cartridges` folder through webdav.

For doing so access Business Manager and add the following in Administration -> Organization -> WebDAV Client Permissions. Replace client id with your client id, you may need to merge these settings with existing ones.

```json
{
  "clients": [
    {
      "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "permissions": [
        {
          "path": "/cartridges",
          "operations": [
            "read_write"
          ]
        }
      ]
    }
  ]
}
```

## Usage

```javascript
const sfccwebdav = require('sfcc-webdav');

sfccwebdav.fileUpload('/path/to/local/file', '/cartridges/mycodeversion/app_storefront/cartridge/static/filetoupload');

sfccwebdav.fileDelete('/path/to/local/file', '/cartridges/mycodeversion/app_storefront/cartridge/static/filetodelete');
```


## License

Released under the MIT license.

---
_Source: https://npm.io/package/sfcc-webdav · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
