@apotech-os/support-kit 2.7.0 → 2.8.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/dist/ui/index.cjs CHANGED
@@ -41,6 +41,7 @@ function toCategory(record) {
41
41
  groupId: data.groupId ?? null,
42
42
  order: data.order ?? 0,
43
43
  extraTags: data.extraTags ?? [],
44
+ description: data.description ?? null,
44
45
  examples: data.examples ?? null,
45
46
  autoReplyEnabled: data.autoReplyEnabled ?? false,
46
47
  fastResponseEnabled: data.fastResponseEnabled ?? false
@@ -2195,12 +2196,14 @@ function CategoryFormModal({
2195
2196
  groupId,
2196
2197
  agentId: category?.agentId ?? "",
2197
2198
  extraTags: category?.extraTags.join(", ") ?? "",
2199
+ description: category?.description ?? "",
2198
2200
  examples: category?.examples ?? ""
2199
2201
  });
2200
2202
  const nameId = react.useId();
2201
2203
  const tagId = react.useId();
2202
2204
  const agentSelectId = react.useId();
2203
2205
  const extraTagsId = react.useId();
2206
+ const descriptionId = react.useId();
2204
2207
  const examplesId = react.useId();
2205
2208
  const isValid = form.name.trim() !== "" && form.tagName.trim() !== "";
2206
2209
  async function submit(event) {
@@ -2250,6 +2253,18 @@ function CategoryFormModal({
2250
2253
  }
2251
2254
  )
2252
2255
  ] }),
2256
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2257
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: descriptionId, className: "mb-1 block text-sm font-medium", children: "Description" }),
2258
+ /* @__PURE__ */ jsxRuntime.jsx(
2259
+ uiSdk.Textarea,
2260
+ {
2261
+ id: descriptionId,
2262
+ value: form.description,
2263
+ onChange: (e) => setForm({ ...form, description: e.target.value })
2264
+ }
2265
+ ),
2266
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Ce que le tri montre au mod\xE8le pour choisir cette cat\xE9gorie. Les \xAB Exemples \xBB ci-dessous restent des messages clients types \u2014 les deux sont envoy\xE9s s\xE9par\xE9ment." })
2267
+ ] }),
2253
2268
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2254
2269
  /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: examplesId, className: "mb-1 block text-sm font-medium", children: "Exemples" }),
2255
2270
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2331,6 +2346,10 @@ function CategoriesPage() {
2331
2346
  groupId: form.groupId || null,
2332
2347
  agentId: form.agentId || null,
2333
2348
  extraTags: form.extraTags.split(",").map((t) => t.trim()).filter(Boolean),
2349
+ // Explicit, `null` when blank — never omitted: the platform validates a
2350
+ // record write against the declared fields, and a declared-but-absent
2351
+ // key is a 422 (same trap as the graph-dry-run payload fixed in 2.7.1).
2352
+ description: form.description.trim() || null,
2334
2353
  examples: form.examples
2335
2354
  };
2336
2355
  try {
@@ -5269,10 +5288,11 @@ function SingleTicketTab({ langfuseConfig, agents, categories, knownTags, tagSet
5269
5288
  ...autoSendOverride ? { autoSend: true } : {}
5270
5289
  };
5271
5290
  const payload = {
5272
- ...isInline ? { inlineTicket: { body: body.trim(), ...subject.trim() ? { subject: subject.trim() } : {}, channel } } : { ticketId: ticketId.trim() },
5273
- ...agentId.trim() ? { agentId: agentId.trim() } : {},
5274
- ...categoryId.trim() ? { categoryId: categoryId.trim() } : {},
5275
- ...Object.keys(overrides).length > 0 ? { overrides } : {}
5291
+ ticketId: isInline ? null : ticketId.trim(),
5292
+ inlineTicket: isInline ? { body: body.trim(), subject: subject.trim() || null, channel } : null,
5293
+ agentId: agentId.trim() || null,
5294
+ categoryId: categoryId.trim() || null,
5295
+ overrides: Object.keys(overrides).length > 0 ? overrides : null
5276
5296
  };
5277
5297
  try {
5278
5298
  const response = await api.invoke(