@clowdops/tsclient 0.6.6 → 0.6.7

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
@@ -668,6 +668,18 @@ var ProjectsClient = class {
668
668
  listPMRevisions(projectId, recordId) {
669
669
  return this.http.get(`/project/${projectId}/pm/records/${recordId}/revisions`).then((res) => res.revisions ?? []);
670
670
  }
671
+ /** Re-read a PM chat proposal under current project membership and grants. */
672
+ getPMRecordProposal(projectId, proposalId) {
673
+ return this.http.get(`/project/${encodeURIComponent(projectId)}/pm/chat/record-proposals/${encodeURIComponent(proposalId)}`);
674
+ }
675
+ /** Human confirmation/rejection; a stale, expired or already decided proposal is refused. */
676
+ decidePMRecordProposal(projectId, proposalId, body) {
677
+ if (!body.expectedVersion?.trim()) return Promise.reject(new Error("expectedVersion is required to decide an exact proposal."));
678
+ if (body.decision !== "confirmed" && body.decision !== "rejected") return Promise.reject(new Error("A PM record proposal decision must be confirmed or rejected."));
679
+ return this.http.post(`/project/${encodeURIComponent(projectId)}/pm/chat/record-proposals/${encodeURIComponent(proposalId)}/decision`, {
680
+ body: { expectedVersion: body.expectedVersion, decision: body.decision }
681
+ });
682
+ }
671
683
  // ── Customer documents (PJM-IP03) ──────────────────────────────────────────
672
684
  /**
673
685
  * Uploads a customer document (immutable v1) and records its provenance +
@@ -887,6 +899,14 @@ var ProjectsClient = class {
887
899
  // by the shared-rail receipt read on the approvals/activity surface. The confirmed
888
900
  // risk, its register version and the response survive an owner decline or a
889
901
  // notification failure.
902
+ /** Loads saved risk proposals and current decision authority without appending a register version. */
903
+ getPMRiskRegister(projectId) {
904
+ return this.http.get(`/project/${encodeURIComponent(projectId)}/pm/chat/risk-register`);
905
+ }
906
+ /** Reloads one exact response proposal, including its terminal decision. */
907
+ getPMRiskResponse(projectId, proposalId) {
908
+ return this.http.get(`/project/${encodeURIComponent(projectId)}/pm/chat/risk-responses/${encodeURIComponent(proposalId)}`);
909
+ }
890
910
  /**
891
911
  * Confirms a told/derived risk as a human-authored `risk` record (member with
892
912
  * WRITE). A named `ownerContactId` is PROPOSED — never assigned — and must be a
@@ -1011,7 +1031,8 @@ function normalize2(wire) {
1011
1031
  userId: wire.userId,
1012
1032
  projectId: wire.projectId ?? wire.workspaceId ?? null,
1013
1033
  createdAt: wire.createdAt,
1014
- disabled: wire.disabled ?? false
1034
+ disabled: wire.disabled ?? false,
1035
+ product: wire.product
1015
1036
  };
1016
1037
  }
1017
1038