@foir/sdk 0.27.0 → 0.27.1

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/CHANGELOG.md CHANGED
@@ -108,6 +108,17 @@ nobody asking for `@foir/sdk` gets it early. The push that carries the commit to
108
108
 
109
109
  Changes on `dev` that have not been published to npm.
110
110
 
111
+ ## [0.27.1] — 2026-10-20
112
+
113
+ ### Fixed
114
+
115
+ - **`<FoirFeedback>` takes a client made without a generated module**
116
+ (`@foir/sdk/react`). `createFoirClient({ apiUrl, apiKey })` with no
117
+ `generated` prints from the manifest it fetches, and the widget worked with
118
+ one, but `FoirFeedbackClient` refused it at compile time for lacking
119
+ `notes`. `FoirFeedbackClient` is now that client or a generated one; a
120
+ generated client whose module has no notes namespace is still refused.
121
+
111
122
  ## [0.27.0] — 2026-10-20
112
123
 
113
124
  ### Added
@@ -7,10 +7,22 @@
7
7
  * shape (see `data/selection.ts`) — so every response here has to be read rather
8
8
  * than cast, and reading is the part worth testing on its own.
9
9
  */
10
- import type { FoirUserNote, FoirNoteConfig, FoirNoteReceipt, FoirSubject } from '../data';
10
+ import type { FoirClient, FoirSchemaDefinition, FoirUserNote, FoirNoteConfig, FoirNoteReceipt, FoirSubject } from '../data';
11
11
  import type { FoirScreenCapture } from '../media/screen-capture';
12
12
  /**
13
- * The client the widget needs, and no more of it.
13
+ * The client the widget writes through: a generated one whose module names the
14
+ * notes namespace, or one made without a generated module.
15
+ *
16
+ * A client made without a module prints from the manifest it fetches, so which
17
+ * namespaces it reaches is known only once it has asked, and its type names
18
+ * every namespace. The panel's first call is what finds out whether its
19
+ * credential reaches notes, as it is for a generated client whose key has lost
20
+ * the scope. A generated client whose module has no notes namespace is neither,
21
+ * and is refused here: it cannot send a note.
22
+ */
23
+ export type FoirFeedbackClient = FoirGeneratedFeedbackClient | FoirClient<FoirSchemaDefinition>;
24
+ /**
25
+ * A generated client, as far as the widget needs it.
14
26
  *
15
27
  * Structural rather than `FoirClient<S>`, for two reasons. `FoirClient` is
16
28
  * generic in the caller's generated schema, so naming it here would force the
@@ -23,7 +35,7 @@ import type { FoirScreenCapture } from '../media/screen-capture';
23
35
  * `Record<string, unknown>` in, `unknown` out — so a real generated client
24
36
  * assigns to this without a cast. `react/__tests__/feedback.test-d.ts` pins that.
25
37
  */
26
- export interface FoirFeedbackClient {
38
+ interface FoirGeneratedFeedbackClient {
27
39
  readonly ns: {
28
40
  readonly notes: {
29
41
  noteConfig(args?: Record<string, unknown>): Promise<unknown>;
@@ -135,3 +147,4 @@ export interface FoirVisitorSubmission {
135
147
  * visitor's note cannot carry.
136
148
  */
137
149
  export declare function submitVisitorNote(client: FoirFeedbackClient, submission: FoirVisitorSubmission): Promise<FoirNoteReceipt>;
150
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foir/sdk",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "Official Foir SDK — editor iframe client + server-side platform helpers",
5
5
  "type": "module",
6
6
  "publishConfig": {