@stablebaseline/sdk 0.3.0 → 0.3.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/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/openapi.json +6 -2
- package/package.json +3 -3
- package/src/types.generated.ts +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -674,7 +674,7 @@ interface paths {
|
|
|
674
674
|
put?: never;
|
|
675
675
|
/**
|
|
676
676
|
* updateWhiteboardScene
|
|
677
|
-
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene
|
|
677
|
+
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene — to rebuild or edit only PART of a board, still use 'patch', because replace DELETES every element you don't resend (of ANY type). As a safeguard, a replace that would drop ANY existing element not in your payload is REJECTED unless you pass confirmReplace:true (or include those ids); diagrams/images/frames are flagged specially since they're inserted separately and costliest to lose. To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.
|
|
678
678
|
*/
|
|
679
679
|
post: operations["updateWhiteboardScene"];
|
|
680
680
|
delete?: never;
|
|
@@ -6611,7 +6611,7 @@ interface operations {
|
|
|
6611
6611
|
/** @description Elements to write. For mode 'patch', each may be a partial { id, ...changedFields } merged into the matching element by id; full Excalidraw elements for 'replace'/'append' (or new ids in 'patch'). */
|
|
6612
6612
|
elements?: Record<string, never>[];
|
|
6613
6613
|
/**
|
|
6614
|
-
* @description patch (DEFAULT —
|
|
6614
|
+
* @description How to apply your `elements`. patch (DEFAULT — use this for ANY partial edit): merges each item into the element with the same id and leaves everything else untouched, like find-and-replace by id; new ids are added. append: only adds your items, changes nothing else. replace: OVERWRITES THE WHOLE CANVAS — every existing element you don't resend is DELETED — so use it ONLY to set an entire board at once. To change or rebuild just a SECTION, use patch (+ deleteIds to remove specific ids), NEVER replace. A replace that would drop any existing element is rejected unless confirmReplace:true.
|
|
6615
6615
|
* @enum {string}
|
|
6616
6616
|
*/
|
|
6617
6617
|
mode?: "patch" | "append" | "replace";
|
|
@@ -6623,6 +6623,8 @@ interface operations {
|
|
|
6623
6623
|
files?: Record<string, never>;
|
|
6624
6624
|
/** @description Optional optimistic-locking token from getWhiteboard. Only used for mode 'replace': if the board changed since you read it, the replace is rejected so you don't overwrite a collaborator's newer edits — re-read with getWhiteboard and retry. Not needed for patch/append, which automatically merge onto the latest scene. */
|
|
6625
6625
|
versionTimestamp?: number;
|
|
6626
|
+
/** @description Safety acknowledgement for mode 'replace' ONLY. A replace that would DELETE ANY existing element not present in your `elements` is rejected unless this is true. Leave it unset and use mode:'patch' to edit part of a board (it merges by id and keeps the rest); set true only when you truly intend to overwrite the WHOLE scene. */
|
|
6627
|
+
confirmReplace?: boolean;
|
|
6626
6628
|
};
|
|
6627
6629
|
};
|
|
6628
6630
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -674,7 +674,7 @@ interface paths {
|
|
|
674
674
|
put?: never;
|
|
675
675
|
/**
|
|
676
676
|
* updateWhiteboardScene
|
|
677
|
-
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene
|
|
677
|
+
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene — to rebuild or edit only PART of a board, still use 'patch', because replace DELETES every element you don't resend (of ANY type). As a safeguard, a replace that would drop ANY existing element not in your payload is REJECTED unless you pass confirmReplace:true (or include those ids); diagrams/images/frames are flagged specially since they're inserted separately and costliest to lose. To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.
|
|
678
678
|
*/
|
|
679
679
|
post: operations["updateWhiteboardScene"];
|
|
680
680
|
delete?: never;
|
|
@@ -6611,7 +6611,7 @@ interface operations {
|
|
|
6611
6611
|
/** @description Elements to write. For mode 'patch', each may be a partial { id, ...changedFields } merged into the matching element by id; full Excalidraw elements for 'replace'/'append' (or new ids in 'patch'). */
|
|
6612
6612
|
elements?: Record<string, never>[];
|
|
6613
6613
|
/**
|
|
6614
|
-
* @description patch (DEFAULT —
|
|
6614
|
+
* @description How to apply your `elements`. patch (DEFAULT — use this for ANY partial edit): merges each item into the element with the same id and leaves everything else untouched, like find-and-replace by id; new ids are added. append: only adds your items, changes nothing else. replace: OVERWRITES THE WHOLE CANVAS — every existing element you don't resend is DELETED — so use it ONLY to set an entire board at once. To change or rebuild just a SECTION, use patch (+ deleteIds to remove specific ids), NEVER replace. A replace that would drop any existing element is rejected unless confirmReplace:true.
|
|
6615
6615
|
* @enum {string}
|
|
6616
6616
|
*/
|
|
6617
6617
|
mode?: "patch" | "append" | "replace";
|
|
@@ -6623,6 +6623,8 @@ interface operations {
|
|
|
6623
6623
|
files?: Record<string, never>;
|
|
6624
6624
|
/** @description Optional optimistic-locking token from getWhiteboard. Only used for mode 'replace': if the board changed since you read it, the replace is rejected so you don't overwrite a collaborator's newer edits — re-read with getWhiteboard and retry. Not needed for patch/append, which automatically merge onto the latest scene. */
|
|
6625
6625
|
versionTimestamp?: number;
|
|
6626
|
+
/** @description Safety acknowledgement for mode 'replace' ONLY. A replace that would DELETE ANY existing element not present in your `elements` is rejected unless this is true. Leave it unset and use mode:'patch' to edit part of a board (it merges by id and keeps the rest); set true only when you truly intend to overwrite the WHOLE scene. */
|
|
6627
|
+
confirmReplace?: boolean;
|
|
6626
6628
|
};
|
|
6627
6629
|
};
|
|
6628
6630
|
};
|
package/openapi.json
CHANGED
|
@@ -4030,7 +4030,7 @@
|
|
|
4030
4030
|
"/tools/updateWhiteboardScene": {
|
|
4031
4031
|
"post": {
|
|
4032
4032
|
"summary": "updateWhiteboardScene",
|
|
4033
|
-
"description": "Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene
|
|
4033
|
+
"description": "Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene — to rebuild or edit only PART of a board, still use 'patch', because replace DELETES every element you don't resend (of ANY type). As a safeguard, a replace that would drop ANY existing element not in your payload is REJECTED unless you pass confirmReplace:true (or include those ids); diagrams/images/frames are flagged specially since they're inserted separately and costliest to lose. To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.",
|
|
4034
4034
|
"operationId": "updateWhiteboardScene",
|
|
4035
4035
|
"tags": [
|
|
4036
4036
|
"whiteboards"
|
|
@@ -4059,7 +4059,7 @@
|
|
|
4059
4059
|
"append",
|
|
4060
4060
|
"replace"
|
|
4061
4061
|
],
|
|
4062
|
-
"description": "patch (DEFAULT —
|
|
4062
|
+
"description": "How to apply your `elements`. patch (DEFAULT — use this for ANY partial edit): merges each item into the element with the same id and leaves everything else untouched, like find-and-replace by id; new ids are added. append: only adds your items, changes nothing else. replace: OVERWRITES THE WHOLE CANVAS — every existing element you don't resend is DELETED — so use it ONLY to set an entire board at once. To change or rebuild just a SECTION, use patch (+ deleteIds to remove specific ids), NEVER replace. A replace that would drop any existing element is rejected unless confirmReplace:true."
|
|
4063
4063
|
},
|
|
4064
4064
|
"deleteIds": {
|
|
4065
4065
|
"type": "array",
|
|
@@ -4079,6 +4079,10 @@
|
|
|
4079
4079
|
"versionTimestamp": {
|
|
4080
4080
|
"type": "number",
|
|
4081
4081
|
"description": "Optional optimistic-locking token from getWhiteboard. Only used for mode 'replace': if the board changed since you read it, the replace is rejected so you don't overwrite a collaborator's newer edits — re-read with getWhiteboard and retry. Not needed for patch/append, which automatically merge onto the latest scene."
|
|
4082
|
+
},
|
|
4083
|
+
"confirmReplace": {
|
|
4084
|
+
"type": "boolean",
|
|
4085
|
+
"description": "Safety acknowledgement for mode 'replace' ONLY. A replace that would DELETE ANY existing element not present in your `elements` is rejected unless this is true. Leave it unset and use mode:'patch' to edit part of a board (it merges by id and keeps the rest); set true only when you truly intend to overwrite the WHOLE scene."
|
|
4082
4086
|
}
|
|
4083
4087
|
},
|
|
4084
4088
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stablebaseline/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "TypeScript SDK for the Stable Baseline REST API. End-to-end agent-managed company brain — docs, diagrams, plans, and a self-learning Knowledge Graph. 180 tools across 18 categories.",
|
|
5
5
|
"homepage": "https://stablebaseline.io",
|
|
6
6
|
"repository": {
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"test:watch": "vitest"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"openapi-fetch": "^0.
|
|
57
|
+
"openapi-fetch": "^0.17.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"openapi-typescript": "^7.5.0",
|
|
61
61
|
"tsup": "^8.3.5",
|
|
62
62
|
"typescript": "^5.6.3",
|
|
63
|
-
"vitest": "^
|
|
63
|
+
"vitest": "^4.1.8"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=18"
|
package/src/types.generated.ts
CHANGED
|
@@ -675,7 +675,7 @@ export interface paths {
|
|
|
675
675
|
put?: never;
|
|
676
676
|
/**
|
|
677
677
|
* updateWhiteboardScene
|
|
678
|
-
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene
|
|
678
|
+
* @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene — to rebuild or edit only PART of a board, still use 'patch', because replace DELETES every element you don't resend (of ANY type). As a safeguard, a replace that would drop ANY existing element not in your payload is REJECTED unless you pass confirmReplace:true (or include those ids); diagrams/images/frames are flagged specially since they're inserted separately and costliest to lose. To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.
|
|
679
679
|
*/
|
|
680
680
|
post: operations["updateWhiteboardScene"];
|
|
681
681
|
delete?: never;
|
|
@@ -6612,7 +6612,7 @@ export interface operations {
|
|
|
6612
6612
|
/** @description Elements to write. For mode 'patch', each may be a partial { id, ...changedFields } merged into the matching element by id; full Excalidraw elements for 'replace'/'append' (or new ids in 'patch'). */
|
|
6613
6613
|
elements?: Record<string, never>[];
|
|
6614
6614
|
/**
|
|
6615
|
-
* @description patch (DEFAULT —
|
|
6615
|
+
* @description How to apply your `elements`. patch (DEFAULT — use this for ANY partial edit): merges each item into the element with the same id and leaves everything else untouched, like find-and-replace by id; new ids are added. append: only adds your items, changes nothing else. replace: OVERWRITES THE WHOLE CANVAS — every existing element you don't resend is DELETED — so use it ONLY to set an entire board at once. To change or rebuild just a SECTION, use patch (+ deleteIds to remove specific ids), NEVER replace. A replace that would drop any existing element is rejected unless confirmReplace:true.
|
|
6616
6616
|
* @enum {string}
|
|
6617
6617
|
*/
|
|
6618
6618
|
mode?: "patch" | "append" | "replace";
|
|
@@ -6624,6 +6624,8 @@ export interface operations {
|
|
|
6624
6624
|
files?: Record<string, never>;
|
|
6625
6625
|
/** @description Optional optimistic-locking token from getWhiteboard. Only used for mode 'replace': if the board changed since you read it, the replace is rejected so you don't overwrite a collaborator's newer edits — re-read with getWhiteboard and retry. Not needed for patch/append, which automatically merge onto the latest scene. */
|
|
6626
6626
|
versionTimestamp?: number;
|
|
6627
|
+
/** @description Safety acknowledgement for mode 'replace' ONLY. A replace that would DELETE ANY existing element not present in your `elements` is rejected unless this is true. Leave it unset and use mode:'patch' to edit part of a board (it merges by id and keeps the rest); set true only when you truly intend to overwrite the WHOLE scene. */
|
|
6628
|
+
confirmReplace?: boolean;
|
|
6627
6629
|
};
|
|
6628
6630
|
};
|
|
6629
6631
|
};
|