@docmana/sdk 0.38.0 → 0.39.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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.39.0 - 2026-11-06
4
+
5
+ - Read per-node rule assignments and rule impact and update an existing assignment through Consumer Edge formula authoring.
6
+
3
7
  ## 0.38.0 - 2026-11-05
4
8
 
5
9
  - Expose optional extraction grounding, with field origins, page evidence and tool-call references.
package/README.md CHANGED
@@ -480,6 +480,9 @@ new message. Do not replay an uncertain network failure automatically.
480
480
  `/v1/authoring` endpoints. It requires the DOC-2385 Consumer deployment and the
481
481
  DocMana API authoring endpoints. These methods do not manage Git or YAML.
482
482
 
483
+ Use `registrySnapshot(flowId, options)` for per-node assignments and `ruleImpact(flowId, ruleId, options)` before committing changes to shared content.
484
+ `setRuleAssignment(flowId, ruleId, nodeId, { enabled, expectedEnabled }, options)` saves a single existing attachment independently of the formula draft.
485
+
483
486
  ```ts
484
487
  const options = { organization: "my-organization" };
485
488
  const formulas = await docmana.authoring.list({ ...options, limit: 50, offset: 0 });
@@ -99,6 +99,17 @@ export interface AuthoringSnapshot {
99
99
  published: number;
100
100
  };
101
101
  }
102
+ export interface AuthoringRuleImpact {
103
+ impact_hash: string;
104
+ usages: {
105
+ flow_id: string;
106
+ flow_name: string;
107
+ node_id: string;
108
+ node_label: string;
109
+ published: boolean;
110
+ }[];
111
+ flows_to_republish: string[];
112
+ }
102
113
  export interface AuthoringChanges {
103
114
  create?: AuthoringData[];
104
115
  update?: {
@@ -306,6 +317,15 @@ export declare class FormulaAuthoring {
306
317
  flowName?: string;
307
318
  }>;
308
319
  get(id: string, options: AuthoringOptions): Promise<AuthoringSnapshot>;
320
+ registrySnapshot(id: string, options: AuthoringOptions): Promise<AuthoringSnapshot>;
321
+ ruleImpact(id: string, ruleId: string, options: AuthoringOptions): Promise<AuthoringRuleImpact>;
322
+ setRuleAssignment(id: string, ruleId: string, nodeId: string, body: {
323
+ enabled: boolean;
324
+ expectedEnabled: boolean;
325
+ }, options: AuthoringOptions): Promise<{
326
+ node_id: string;
327
+ enabled: boolean;
328
+ }>;
309
329
  create(body: AuthoringCreate, options: AuthoringOptions): Promise<AuthoringReceipt>;
310
330
  save(id: string, body: AuthoringDraft, options: AuthoringOptions): Promise<AuthoringReceipt>;
311
331
  validate(id: string, revisions: AuthoringRevisions, options: AuthoringOptions): Promise<AuthoringData>;
package/dist/cli.mjs CHANGED
@@ -141,6 +141,20 @@ var FormulaAuthoring = class {
141
141
  get(id, options) {
142
142
  return this.request("GET", `flows/${identity(id)}`, options);
143
143
  }
144
+ registrySnapshot(id, options) {
145
+ return this.request("GET", `flows/${identity(id)}/rule-registry`, options);
146
+ }
147
+ ruleImpact(id, ruleId, options) {
148
+ return this.request("POST", `flows/${identity(id)}/rules/${identity(ruleId)}/impact`, options);
149
+ }
150
+ setRuleAssignment(id, ruleId, nodeId, body, options) {
151
+ return this.request(
152
+ "PATCH",
153
+ `flows/${identity(id)}/rules/${identity(ruleId)}/assignments/${identity(nodeId)}`,
154
+ options,
155
+ body
156
+ );
157
+ }
144
158
  create(body, options) {
145
159
  return this.request("POST", "flows", options, body);
146
160
  }