@usenadia/node 0.3.0 → 0.5.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/README.md CHANGED
@@ -33,7 +33,7 @@ try {
33
33
  ],
34
34
  });
35
35
 
36
- await nadia.deletePost(postId);
36
+ await nadia.deletePost(postId); // the API never asks for a confirmation
37
37
  } catch (err) {
38
38
  if (err instanceof NadiaError) {
39
39
  console.error(err.status, err.message); // 402 "You have reached your limit"
@@ -75,11 +75,20 @@ ends (15 minutes at most, `importPoll` in the options), and resolves to the
75
75
  media all the same. A failed import throws the `NadiaError` the server would
76
76
  have answered at once.
77
77
 
78
- ## The content board
78
+ ## Confirmations
79
79
 
80
- Every card of the board in the app is reachable: create one from anywhere
81
- (a voice note, a Notion page, a DM), move it along, read its numbers once
82
- it is published.
80
+ None since 2026-12-04: the API does what the key asks, deletions included, on
81
+ the first call. The setting « What the agent does without asking » is for
82
+ agents only (the MCP, the Agent of the app); to limit what a program can
83
+ reach, give it a key limited to some workspaces. `NadiaConfirmationRequired`,
84
+ `err.confirm()`, the `confirmationToken` options and `autoConfirm` stay for a
85
+ server that would still answer `428`: the API no longer does.
86
+
87
+ ## Ideas
88
+
89
+ Every card of Ideas in the app is reachable: create one from anywhere
90
+ (a voice note, a Notion page, a DM), move it to its next stage, read its
91
+ numbers once it is published.
83
92
 
84
93
  ```ts
85
94
  const card = await nadia.createContent({
@@ -96,7 +105,7 @@ await nadia.linkContentPost(card.id, 'g-42'); // → PUBLISHED when it goes live
96
105
  const numbers = await nadia.contentsPerformance(); // keyed by card id
97
106
  ```
98
107
 
99
- Columns, in order: `IDEA`, `SCRIPT`, `VALIDATED`, `TO_SHOOT`, `TO_EDIT`,
108
+ Stages (`stage`), in order: `IDEA`, `SCRIPT`, `VALIDATED`, `TO_SHOOT`, `TO_EDIT`,
100
109
  `TO_SCHEDULE`, `PUBLISHED`.
101
110
 
102
111
  ## How it is built
@@ -183,17 +192,13 @@ error names). `err.isTransient` is true for 429 and 5xx — those
183
192
  are retried automatically (twice by default, `new Nadia(key, { retries: 0 })`
184
193
  to turn it off).
185
194
 
186
- ## Coming from upstream's SDK
187
-
188
- The class is called `Nadia` instead of upstream's name. Otherwise
189
- `new Nadia(apiKey, baseUrl?)` and the five original methods (`post`,
190
- `postList`, `upload`, `integrations`, `deletePost`) keep their names and
191
- shapes, so existing code only changes its import. Two other differences,
192
- both fixes:
195
+ ## Short methods
193
196
 
194
- - **HTTP errors are no longer swallowed.** Upstream called `.json()` without
195
- looking at the status, so a 402 came back looking like a success.
196
- - **`deletePost()` awaits.** Upstream returned an unawaited `fetch`.
197
+ `new Nadia(apiKey, baseUrl?)` also takes the base URL as a second argument,
198
+ and five short methods cover the common calls: `post`, `postList`, `upload`,
199
+ `integrations` and `deletePost`. Each one checks the HTTP status (a 402
200
+ throws a `NadiaError`, it never comes back looking like a success) and
201
+ `deletePost()` resolves once the post is deleted.
197
202
 
198
203
  The default base URL is `https://app.usenadia.com/api`.
199
204