@bagelink/sdk 1.8.3 → 1.8.5

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/index.cjs CHANGED
@@ -70,7 +70,11 @@ function extractSSEEventInfo(operation) {
70
70
  const fields = [];
71
71
  const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm);
72
72
  for (const fieldMatch of fieldMatches) {
73
- const [, fieldName, fieldDescription] = fieldMatch;
73
+ let [, fieldName, fieldDescription] = fieldMatch;
74
+ if (fieldName.includes(".")) {
75
+ const parts = fieldName.split(".");
76
+ fieldName = parts[parts.length - 1];
77
+ }
74
78
  fields.push({
75
79
  name: fieldName,
76
80
  description: fieldDescription.trim()
package/dist/index.mjs CHANGED
@@ -64,7 +64,11 @@ function extractSSEEventInfo(operation) {
64
64
  const fields = [];
65
65
  const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm);
66
66
  for (const fieldMatch of fieldMatches) {
67
- const [, fieldName, fieldDescription] = fieldMatch;
67
+ let [, fieldName, fieldDescription] = fieldMatch;
68
+ if (fieldName.includes(".")) {
69
+ const parts = fieldName.split(".");
70
+ fieldName = parts[parts.length - 1];
71
+ }
68
72
  fields.push({
69
73
  name: fieldName,
70
74
  description: fieldDescription.trim()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "1.8.3",
4
+ "version": "1.8.5",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -154,7 +154,15 @@ export function extractSSEEventInfo(operation: OpenAPIOperation): SSEEventTypeIn
154
154
  const fieldMatches = section.matchAll(/^\s+[-*]\s+`([^`]+)`:\s*([^\n]+)/gm)
155
155
 
156
156
  for (const fieldMatch of fieldMatches) {
157
- const [, fieldName, fieldDescription] = fieldMatch
157
+ let [, fieldName, fieldDescription] = fieldMatch
158
+
159
+ // Handle nested field names like "error.code" → extract just "code"
160
+ // This handles documentation that shows nested object paths
161
+ if (fieldName.includes('.')) {
162
+ const parts = fieldName.split('.')
163
+ fieldName = parts[parts.length - 1] // Take the last part
164
+ }
165
+
158
166
  fields.push({
159
167
  name: fieldName,
160
168
  description: fieldDescription.trim(),