@critical-path/client 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +50 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @critical-path/client
2
+
3
+ > **Type-safe JavaScript/TypeScript HTTP Client SDK for Critical Path.**
4
+
5
+ `@critical-path/client` provides a lightweight, end-to-end type-safe SDK for interacting with Critical Path REST API endpoints from any web or Node.js application.
6
+
7
+ ---
8
+
9
+ ## 📦 Installation
10
+
11
+ ```bash
12
+ npm install @critical-path/client
13
+ # or
14
+ pnpm add @critical-path/client
15
+ ```
16
+
17
+ ---
18
+
19
+ ## 💡 Usage Example
20
+
21
+ ```ts
22
+ import { CriticalPathClient } from '@critical-path/client';
23
+
24
+ const client = new CriticalPathClient({
25
+ baseUrl: '/api/critical-path'
26
+ });
27
+
28
+ // Fetch projects
29
+ const projects = await client.getProjects();
30
+
31
+ // Fetch tasks for a project
32
+ const tasks = await client.getTasks('proj_1');
33
+
34
+ // Create a new task
35
+ const newTask = await client.createTask({
36
+ projectId: 'proj_1',
37
+ title: 'Design UI Wireframes',
38
+ priority: 'high',
39
+ status: 'todo'
40
+ });
41
+
42
+ // Update task status
43
+ await client.updateTask(newTask.id, { status: 'in_progress' });
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 📄 License
49
+
50
+ MIT © [Critical Path](https://github.com/Pixerate/Critical-Path)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@critical-path/client",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Type-safe JavaScript/TypeScript client SDK for consuming Critical Path API endpoints",
5
5
  "author": "Jack James",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@critical-path/core": "0.1.0"
17
+ "@critical-path/core": "0.1.2"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^24.0.0",