exponential-sdk 1.15.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 +540 -1
- package/dist/index.js +137 -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) {
|
|
@@ -911,6 +1026,26 @@ var MeetingsApi = class {
|
|
|
911
1026
|
async setNotes(id, notes) {
|
|
912
1027
|
return await this.update({ id, notes });
|
|
913
1028
|
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Permanently delete one meeting. Owner-only: the server answers
|
|
1031
|
+
* NOT_FOUND for a missing id and FORBIDDEN for a meeting you don't own.
|
|
1032
|
+
* Linked actions survive (their meeting link is nulled).
|
|
1033
|
+
*/
|
|
1034
|
+
async delete(id) {
|
|
1035
|
+
return await this.client.transcription.deleteTranscription.mutate({
|
|
1036
|
+
id
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Permanently delete meetings in bulk. Scoped to meetings the caller
|
|
1041
|
+
* owns — ids that are missing or owned by someone else are silently
|
|
1042
|
+
* skipped, so compare `count` against the ids you sent.
|
|
1043
|
+
*/
|
|
1044
|
+
async deleteMany(ids) {
|
|
1045
|
+
return await this.client.transcription.bulkDeleteTranscriptions.mutate({
|
|
1046
|
+
ids
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
914
1049
|
/**
|
|
915
1050
|
* Append a block to the meeting's notes (separated by a blank line),
|
|
916
1051
|
* creating them if none exist. Read-modify-write, not atomic.
|
|
@@ -1109,6 +1244,7 @@ var ExponentialClient = class {
|
|
|
1109
1244
|
this.projects = new ProjectsApi(this.client);
|
|
1110
1245
|
this.workspaces = new WorkspacesApi(this.client);
|
|
1111
1246
|
this.contacts = new ContactsApi(this.client);
|
|
1247
|
+
this.decisions = new DecisionsApi(this.client);
|
|
1112
1248
|
this.organizations = new OrganizationsApi(this.client);
|
|
1113
1249
|
this.pipelines = new PipelinesApi(this.client);
|
|
1114
1250
|
this.tickets = new TicketsApi(this.client);
|
|
@@ -1136,6 +1272,7 @@ var ExponentialClient = class {
|
|
|
1136
1272
|
projects;
|
|
1137
1273
|
workspaces;
|
|
1138
1274
|
contacts;
|
|
1275
|
+
decisions;
|
|
1139
1276
|
organizations;
|
|
1140
1277
|
pipelines;
|
|
1141
1278
|
tickets;
|