# node-matrix-import-actions

> Action specification for Squiz Matrix' "Import Assets from XML Tool".

Latest version **2.0.1** (published 2015-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-matrix-import-actions
pnpm add node-matrix-import-actions
yarn add node-matrix-import-actions
bun add node-matrix-import-actions
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2015-06-12 |
| First published | 2015-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Josh Gillies |
| Maintainers | joshgillies |
| Keywords | matrix, mysource, my, source, squiz, xml, import, actions |

## Links

- npm: https://www.npmjs.com/package/node-matrix-import-actions
- Repository: https://github.com/joshgillies/node-matrix-import-actions
- Issues: https://github.com/joshgillies/node-matrix-import-actions/issues
- npm.io page: https://npm.io/package/node-matrix-import-actions

## Dependencies (1)

- [string-template](https://npm.io/package/string-template.md) ^0.2.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2015-06-12
- 2.0.0 — 2015-06-12
- 1.1.0 — 2015-06-11
- 1.0.3 — 2015-04-19
- 1.0.2 — 2015-03-28
- 1.0.1 — 2015-03-17
- 1.0.0 — 2015-03-17

## README

# node-matrix-import-actions

Action specification for Squiz Matrix' "[Import Assets from XML Tool]".

[![Build Status](https://travis-ci.org/joshgillies/node-matrix-import-actions.svg)](https://travis-ci.org/joshgillies/node-matrix-import-actions)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

## Example

```js
var Action = require('node-matrix-import-actions');

var createAction = new Action('create_asset', {
  id: 'Site_1',
  parentId: 1,
  type: 'site'
});

```

## API

### Actions

An action is a task performed against a Squiz Matrix system.

`node-matrix-import-actions` provides an Action constructor via `require('node-matrix-import-actions')`

#### Action(type, opts)

`type` is a String representing the type of action. The following types are available:

#### Action('add_web_path', opts)

A `add_path` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.path`
  * `opts.assetId`

#### Action('create_asset', opts)

A `create_asset` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.parentId`
  * `opts.type`
  * `opts.link`
  * `opts.value`
  * `opts.dependant`
  * `opts.exclusive`

#### Action('create_file_asset', opts)

A `create_file_asset` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.parentId`
  * `opts.file`
  * `opts.type`
  * `opts.link`
  * `opts.value`
  * `opts.dependant`
  * `opts.exclusive`

#### Action('create_link', opts)

A `create_link` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.to`
  * `opts.from`
  * `opts.link`
  * `opts.value`
  * `opts.dependant`
  * `opts.exclusive`
  * `opts.major`

#### Action('set_attribute_value', opts)

A `set_attribute` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.assetId`
  * `opts.attribute`
  * `opts.value`

#### Action('set_design_parse_file', opts)

A `set_design_parse_file` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.assetId`
  * `opts.file`

#### Action('set_metadata_schema', opts)

A `set_metadata_schema` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.assetId`
  * `opts.schemaId`
  * `opts.granted`
  * `opts.cascade`

#### Action('set_metadata_value', opts)

A `set_metadata_value` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.id`
  * `opts.assetId`
  * `opts.fieldId`
  * `opts.value`

#### Action('set_permission', opts)

A `set_permission` Action accepts an Object as it's second argument `opts` with the following properties:

  * `opts.assetId`
  * `opts.permission`
  * `opts.muteError`
  * `opts.granted`
  * `opts.userId`

## License

MIT

[Import Assets from XML Tool]: http://manuals.matrix.squizsuite.net/tools/chapters/import-assets-from-xml-tool

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