@vect.io/api.connect.change.client.binding.web
v0.3.3
Published
The [Vect Change API](https://docs.vect.io/Change-API-14ad170381708121949cd0c94d9e2c86) enables you to manage your Changes and the Parameters within them with [JSON Patches RFC](https://jsonpatch.com/), powered by [Connect](https://connectrpc.com/).
Downloads
172
Keywords
Readme
Vect Change API Web Client
The Vect Change API enables you to manage your Changes and the Parameters within them with JSON Patches RFC, powered by Connect.
We recommend reading the Vect Change API Docs.
Getting Started
Install
npm install @vect.io/api.connect.change.client.binding.web
You can use CDN over npm such as
- [jsdelivr] (https://cdn.jsdelivr.net/npm/@vect.io/[email protected]/+esm)
- esm.sh
- unpkg
Usage
import { createClient } from '@vect.io/api.connect.change.client.binding.web'
const client = createClient({ auth: 'access-key' });
await client.changeAction({
patches: [{ path: 'example.json', operation: 'ADD', content: 'hello world!' }],
repository: { path: 'acme-com/acme-com-2024v1' },
});
More
You can also use plain fetch
if you prefer:
fetch('https://change.connect.api.vect.io/vect.change.v1.ChangeApiService/ChangeAction', {
method: 'POST',
headers: {
'Authorization': 'Bearer <access-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patches: [{
path: 'example.json',
operation: 'ADD',
content: 'hello world!'
}],
repository: {
path: 'acme-com/acme-com-2024v1'
}
})
})
Copyrighted by Vect.