exponential-sdk 1.16.0 → 1.17.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/README.md +65 -0
- package/dist/index.d.ts +514 -1
- package/dist/index.js +117 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -548,6 +548,121 @@ var ContactsApi = class {
|
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
550
|
|
|
551
|
+
// src/decisions.ts
|
|
552
|
+
var DecisionsApi = class {
|
|
553
|
+
constructor(client) {
|
|
554
|
+
this.client = client;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Confirmed decisions in a workspace, newest decided first. Drafts are
|
|
558
|
+
* never included — see {@link listForMeeting} for those.
|
|
559
|
+
*/
|
|
560
|
+
async list(options) {
|
|
561
|
+
return await this.client.decision.list.query(options);
|
|
562
|
+
}
|
|
563
|
+
async get(workspaceId, decisionId) {
|
|
564
|
+
return await this.client.decision.get.query({
|
|
565
|
+
workspaceId,
|
|
566
|
+
decisionId
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Decisions logged from one meeting — both panels' contents. Drafts are
|
|
571
|
+
* included for callers who can edit the meeting. No workspace id needed:
|
|
572
|
+
* the meeting resolves it.
|
|
573
|
+
*/
|
|
574
|
+
async listForMeeting(transcriptionSessionId) {
|
|
575
|
+
return await this.client.decision.listForMeeting.query({
|
|
576
|
+
transcriptionSessionId
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
/** Decisions formalised as one ADR ("Decided in"). */
|
|
580
|
+
async listForAdr(workspaceId, adrDocumentId) {
|
|
581
|
+
return await this.client.decision.listForAdr.query({
|
|
582
|
+
workspaceId,
|
|
583
|
+
adrDocumentId
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Extract draft decisions from a meeting's notes and transcript. Drafts
|
|
588
|
+
* only — someone confirms or rejects each one. Idempotent per meeting:
|
|
589
|
+
* existing drafts come back untouched, and a meeting that already has
|
|
590
|
+
* confirmed decisions reports `alreadyPublished` without calling the model.
|
|
591
|
+
*/
|
|
592
|
+
async extractDrafts(transcriptionSessionId) {
|
|
593
|
+
return await this.client.decision.extractDrafts.mutate({
|
|
594
|
+
transcriptionSessionId
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Log a decision. Pass `status: 'OPEN'` for an open question, and
|
|
599
|
+
* `transcriptionSessionId` to attach it to the meeting it came out of.
|
|
600
|
+
*/
|
|
601
|
+
async create(input) {
|
|
602
|
+
return await this.client.decision.create.mutate(input);
|
|
603
|
+
}
|
|
604
|
+
async update(input) {
|
|
605
|
+
return await this.client.decision.update.mutate(input);
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Lifecycle transition — including answering an open question by moving it
|
|
609
|
+
* from `OPEN` to `ACCEPTED`.
|
|
610
|
+
*/
|
|
611
|
+
async setStatus(input) {
|
|
612
|
+
return await this.client.decision.setStatus.mutate(input);
|
|
613
|
+
}
|
|
614
|
+
/** "Implemented by" a ticket. Idempotent: an existing link is returned. */
|
|
615
|
+
async linkTicket(workspaceId, decisionId, ticketId) {
|
|
616
|
+
return await this.client.decision.linkTicket.mutate({
|
|
617
|
+
workspaceId,
|
|
618
|
+
decisionId,
|
|
619
|
+
ticketId
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
/** "Implemented by" a feature. Idempotent: an existing link is returned. */
|
|
623
|
+
async linkFeature(workspaceId, decisionId, featureId) {
|
|
624
|
+
return await this.client.decision.linkFeature.mutate({
|
|
625
|
+
workspaceId,
|
|
626
|
+
decisionId,
|
|
627
|
+
featureId
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
/** Remove one link, by the `DecisionLink` id (not the ticket/feature id). */
|
|
631
|
+
async unlink(workspaceId, linkId) {
|
|
632
|
+
return await this.client.decision.unlink.mutate({
|
|
633
|
+
workspaceId,
|
|
634
|
+
linkId
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
/** Publish a draft into the log. */
|
|
638
|
+
async confirmDraft(workspaceId, decisionId) {
|
|
639
|
+
return await this.client.decision.confirmDraft.mutate({
|
|
640
|
+
workspaceId,
|
|
641
|
+
decisionId
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Reject a draft. Confirmed decisions are never rejected — deprecate or
|
|
646
|
+
* supersede them through {@link setStatus}.
|
|
647
|
+
*/
|
|
648
|
+
async rejectDraft(workspaceId, decisionId) {
|
|
649
|
+
return await this.client.decision.rejectDraft.mutate({
|
|
650
|
+
workspaceId,
|
|
651
|
+
decisionId
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Hard-delete a draft or rejected row. The server refuses for a confirmed
|
|
656
|
+
* decision — the log keeps its history.
|
|
657
|
+
*/
|
|
658
|
+
async deleteDraft(workspaceId, decisionId) {
|
|
659
|
+
return await this.client.decision.deleteDraft.mutate({
|
|
660
|
+
workspaceId,
|
|
661
|
+
decisionId
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
|
|
551
666
|
// src/organizations.ts
|
|
552
667
|
var OrganizationsApi = class {
|
|
553
668
|
constructor(client) {
|
|
@@ -1129,6 +1244,7 @@ var ExponentialClient = class {
|
|
|
1129
1244
|
this.projects = new ProjectsApi(this.client);
|
|
1130
1245
|
this.workspaces = new WorkspacesApi(this.client);
|
|
1131
1246
|
this.contacts = new ContactsApi(this.client);
|
|
1247
|
+
this.decisions = new DecisionsApi(this.client);
|
|
1132
1248
|
this.organizations = new OrganizationsApi(this.client);
|
|
1133
1249
|
this.pipelines = new PipelinesApi(this.client);
|
|
1134
1250
|
this.tickets = new TicketsApi(this.client);
|
|
@@ -1156,6 +1272,7 @@ var ExponentialClient = class {
|
|
|
1156
1272
|
projects;
|
|
1157
1273
|
workspaces;
|
|
1158
1274
|
contacts;
|
|
1275
|
+
decisions;
|
|
1159
1276
|
organizations;
|
|
1160
1277
|
pipelines;
|
|
1161
1278
|
tickets;
|