@uidu/client 3.4.1 → 3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @uidu/client
2
2
 
3
+ ## 3.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 526792f: `Employment.contractType` is gone from the API — uidu promoted the contract
8
+ type to a configurable `EmploymentKind` record. The people documents now select
9
+ `employmentKind { id name }`, `EmploymentRecord` carries it, and
10
+ `contractType` stays as its name so existing readers keep working. Writes take
11
+ `employmentKindId`.
12
+
13
+ ## 3.5.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 45e1997: Normalize `fieldValuesAttributes[].content` on every mutation.
18
+
19
+ The API stores each field value as JSON and reads it back as `content['value']`,
20
+ so `content` must always be `{ value: … }`. A bare scalar wasn't rejected at the
21
+ mutation boundary — the record saved, the server-side typed columns stayed
22
+ empty, and later reads of that field errored out. Code-generating agents hit
23
+ this constantly, since `FieldValueAttributes.content` is typed as an untyped
24
+ `JSON` scalar.
25
+
26
+ `UiduClient.mutate` now wraps a bare `content` in `{ value }` before sending,
27
+ and warns once per mutation outside production so the call site gets fixed.
28
+ Doing it in `mutate` rather than per function covers all ~50 authoring
29
+ mutations and reaches `fieldValuesAttributes` wherever it nests — under
30
+ `contactAttributes.contactableAttributes`, inside `pageBlocksAttributes[]`, and
31
+ on the 15 other `*Attributes` types that carry it. Already-wrapped payloads,
32
+ `content` payloads themselves, the caller's object, and every untouched subtree
33
+ are left alone by reference. Reads (`query`) are unaffected.
34
+
35
+ The helpers are exported as `normalizeFieldValueContent` and
36
+ `normalizeFieldValuesAttributes` for callers that assemble
37
+ `fieldValuesAttributes` outside the SDK.
38
+
3
39
  ## 3.4.1
4
40
 
5
41
  ### Patch Changes
@@ -8,7 +8,7 @@ export declare function listBookings(client: UiduClient, variables?: ListBooking
8
8
  __typename?: "Booking";
9
9
  id: string;
10
10
  kind?: string | null;
11
- status?: number | null;
11
+ status?: string | null;
12
12
  number?: string | null;
13
13
  currency?: string | null;
14
14
  itemsCount?: number | null;