@unified-product-graph/sdk 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/chunk-ARDXTSGG.js +20904 -0
- package/dist/chunk-ARDXTSGG.js.map +1 -0
- package/dist/index.d.ts +678 -0
- package/dist/index.js +2732 -0
- package/dist/index.js.map +1 -0
- package/dist/logic-DriXyFKi.d.ts +1480 -0
- package/dist/logic.d.ts +2 -0
- package/dist/logic.js +95 -0
- package/dist/logic.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arkheiev UG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @unified-product-graph/sdk
|
|
2
|
+
|
|
3
|
+
Programmatic SDK for reading and writing [Unified Product Graph](https://unifiedproductgraph.org) `.upg` files.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @unified-product-graph/sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { UPGClient } from '@unified-product-graph/sdk'
|
|
11
|
+
|
|
12
|
+
const upg = new UPGClient({ file: './product.upg' })
|
|
13
|
+
|
|
14
|
+
// Nodes
|
|
15
|
+
await upg.nodes.create({ type: 'feature', title: 'Dark mode' })
|
|
16
|
+
await upg.nodes.list({ type: 'feature' })
|
|
17
|
+
await upg.nodes.get('node-id')
|
|
18
|
+
await upg.nodes.update('node-id', { status: 'active' })
|
|
19
|
+
await upg.nodes.delete('node-id')
|
|
20
|
+
|
|
21
|
+
// Edges
|
|
22
|
+
await upg.edges.connect('src-id', 'tgt-id')
|
|
23
|
+
await upg.edges.list({ source: 'node-id' })
|
|
24
|
+
|
|
25
|
+
// Graph-level
|
|
26
|
+
await upg.health()
|
|
27
|
+
await upg.search('dark mode')
|
|
28
|
+
await upg.verify()
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Why this exists
|
|
32
|
+
|
|
33
|
+
`@unified-product-graph/core` is the spec and type package. This SDK is the programmatic client that builds on top of it. The Unified Product Graph CLI and MCP server are both thin frontends over this SDK.
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
- [Getting started](https://unifiedproductgraph.org/sdk)
|
|
38
|
+
- [API reference](https://unifiedproductgraph.org/sdk/reference)
|
|
39
|
+
- [Building an adapter](https://unifiedproductgraph.org/sdk/guides/adapter)
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT © The Product Creator
|