exponential-sdk 1.26.0 → 1.28.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 +36 -0
- package/dist/index.d.ts +850 -1
- package/dist/index.js +205 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -519,6 +519,207 @@ var WorkspacesApi = class {
|
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
|
|
522
|
+
// src/ceremonies.ts
|
|
523
|
+
var CeremoniesApi = class {
|
|
524
|
+
constructor(client) {
|
|
525
|
+
this.client = client;
|
|
526
|
+
}
|
|
527
|
+
/** Built-in templates, one per kind — the "Add from template" list. */
|
|
528
|
+
async templates() {
|
|
529
|
+
return await this.client.ceremony.templates.query();
|
|
530
|
+
}
|
|
531
|
+
/** Ceremonies of a workspace, active first then by name. Inactive ones only on request. */
|
|
532
|
+
async list(workspaceId, options = {}) {
|
|
533
|
+
return await this.client.ceremony.list.query({
|
|
534
|
+
workspaceId,
|
|
535
|
+
...options.includeInactive ? { includeInactive: true } : {}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
/** Active ceremonies linked to a project, each with its next planned occurrence. */
|
|
539
|
+
async listForProject(projectId) {
|
|
540
|
+
return await this.client.ceremony.listForProject.query({ projectId });
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* A project's Meetings timeline: occurrences of the ceremonies reviewing it
|
|
544
|
+
* (one-offs included), two weeks back to one week ahead by default, newest
|
|
545
|
+
* first, at most `perCeremony` (default 5) per recurring ceremony.
|
|
546
|
+
*/
|
|
547
|
+
async listOccurrencesForProject(input) {
|
|
548
|
+
return await this.client.ceremony.listOccurrencesForProject.query(input);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* The ceremony that meets in a video room, with the occurrence on at `at`
|
|
552
|
+
* (default now). Searches all your workspaces unless `workspaceId` narrows
|
|
553
|
+
* it; null when nothing (or nothing unambiguous) matches.
|
|
554
|
+
*/
|
|
555
|
+
async matchMeetingUrl(input) {
|
|
556
|
+
return await this.client.ceremony.matchMeetingUrl.query(input);
|
|
557
|
+
}
|
|
558
|
+
/** One ceremony with participants, projects and its recent + upcoming occurrences. */
|
|
559
|
+
async get(workspaceId, id) {
|
|
560
|
+
return await this.client.ceremony.get.query({ workspaceId, id });
|
|
561
|
+
}
|
|
562
|
+
/** Occurrences starting inside a window, across ceremonies or for one (max 200). */
|
|
563
|
+
async listOccurrences(input) {
|
|
564
|
+
return await this.client.ceremony.listOccurrences.query(input);
|
|
565
|
+
}
|
|
566
|
+
/** One occurrence — the meeting page — with its agenda, ceremony and recordings. */
|
|
567
|
+
async getOccurrence(workspaceId, occurrenceId) {
|
|
568
|
+
return await this.client.ceremony.getOccurrence.query({
|
|
569
|
+
workspaceId,
|
|
570
|
+
occurrenceId
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/** The caller's own async update for an occurrence. */
|
|
574
|
+
async myUpdate(workspaceId, occurrenceId) {
|
|
575
|
+
return await this.client.ceremony.myOccurrenceUpdate.query({
|
|
576
|
+
workspaceId,
|
|
577
|
+
occurrenceId
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
/** Every participant's submitted update, and who hasn't answered. */
|
|
581
|
+
async updateSummary(workspaceId, occurrenceId) {
|
|
582
|
+
return await this.client.ceremony.occurrenceUpdateSummary.query({
|
|
583
|
+
workspaceId,
|
|
584
|
+
occurrenceId
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
/** Draft the caller's answers from their activity since the previous occurrence. */
|
|
588
|
+
async draftMyUpdate(workspaceId, occurrenceId) {
|
|
589
|
+
return await this.client.ceremony.draftMyOccurrenceUpdate.mutate({
|
|
590
|
+
workspaceId,
|
|
591
|
+
occurrenceId
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
/** Save, submit or reopen the caller's own answers. */
|
|
595
|
+
async saveMyUpdate(input) {
|
|
596
|
+
return await this.client.ceremony.saveMyOccurrenceUpdate.mutate(input);
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Generate or regenerate an occurrence's agenda. `circulate` also notifies
|
|
600
|
+
* participants and posts to the ceremony's Matrix room, and it re-sends both
|
|
601
|
+
* if they already went out, so don't retry it blindly.
|
|
602
|
+
*/
|
|
603
|
+
async generateAgenda(workspaceId, occurrenceId, options = {}) {
|
|
604
|
+
return await this.client.ceremony.generateAgenda.mutate({
|
|
605
|
+
workspaceId,
|
|
606
|
+
occurrenceId,
|
|
607
|
+
...options.circulate ? { circulate: true } : {}
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Skip an occurrence with a reason (1-500 characters). Participants are
|
|
612
|
+
* told. Skipping a booked one-off cancels the meeting: every attendee with an
|
|
613
|
+
* address gets a calendar cancellation, the ceremony is retired, and it can't
|
|
614
|
+
* be unskipped.
|
|
615
|
+
*/
|
|
616
|
+
async skipOccurrence(workspaceId, occurrenceId, reason) {
|
|
617
|
+
return await this.client.ceremony.skipOccurrence.mutate({
|
|
618
|
+
workspaceId,
|
|
619
|
+
occurrenceId,
|
|
620
|
+
reason
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
async unskipOccurrence(workspaceId, occurrenceId) {
|
|
624
|
+
return await this.client.ceremony.unskipOccurrence.mutate({
|
|
625
|
+
workspaceId,
|
|
626
|
+
occurrenceId
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
/** Add one occurrence at any time — a meeting off the cadence (owner, or workspace owner/admin). */
|
|
630
|
+
async addOccurrence(workspaceId, ceremonyId, scheduledStart) {
|
|
631
|
+
return await this.client.ceremony.addOccurrence.mutate({
|
|
632
|
+
workspaceId,
|
|
633
|
+
ceremonyId,
|
|
634
|
+
scheduledStart
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Move an occurrence that hasn't happened to another time (owner, or
|
|
639
|
+
* workspace owner/admin). It keeps its agenda, notes, updates and recordings.
|
|
640
|
+
*/
|
|
641
|
+
async rescheduleOccurrence(workspaceId, occurrenceId, scheduledStart) {
|
|
642
|
+
return await this.client.ceremony.rescheduleOccurrence.mutate({
|
|
643
|
+
workspaceId,
|
|
644
|
+
occurrenceId,
|
|
645
|
+
scheduledStart
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
/** Mark an agenda item resolved, or reopen it. Survives regeneration. */
|
|
649
|
+
async resolveAgendaItem(workspaceId, occurrenceId, itemId, resolved = true) {
|
|
650
|
+
return await this.client.ceremony.resolveAgendaItem.mutate({
|
|
651
|
+
workspaceId,
|
|
652
|
+
occurrenceId,
|
|
653
|
+
itemId,
|
|
654
|
+
resolved
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
/** Add an item by hand to an agenda section; kept across regeneration. */
|
|
658
|
+
async addAgendaItem(input) {
|
|
659
|
+
return await this.client.ceremony.addAgendaItem.mutate(input);
|
|
660
|
+
}
|
|
661
|
+
/** Reorder one section's items; the order is kept across regeneration. */
|
|
662
|
+
async reorderAgendaItems(workspaceId, occurrenceId, sectionKey, itemIds) {
|
|
663
|
+
return await this.client.ceremony.reorderAgendaItems.mutate({
|
|
664
|
+
workspaceId,
|
|
665
|
+
occurrenceId,
|
|
666
|
+
sectionKey,
|
|
667
|
+
itemIds
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
/** Post the agenda to the ceremony's Matrix room. A repost needs `confirmRepost`. */
|
|
671
|
+
async postAgendaToMatrix(workspaceId, occurrenceId, options = {}) {
|
|
672
|
+
return await this.client.ceremony.postAgendaToMatrix.mutate({
|
|
673
|
+
workspaceId,
|
|
674
|
+
occurrenceId,
|
|
675
|
+
...options.confirmRepost ? { confirmRepost: true } : {}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
/** Take one of the bot's agenda posts back out of its Matrix room. `eventId` comes from `agenda.matrixPosts`. */
|
|
679
|
+
async removeAgendaFromMatrix(workspaceId, occurrenceId, eventId) {
|
|
680
|
+
return await this.client.ceremony.removeAgendaFromMatrix.mutate({
|
|
681
|
+
workspaceId,
|
|
682
|
+
occurrenceId,
|
|
683
|
+
eventId
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
/** Create a ceremony and its first occurrences for the rolling window. */
|
|
687
|
+
async create(input) {
|
|
688
|
+
return await this.client.ceremony.create.mutate(input);
|
|
689
|
+
}
|
|
690
|
+
async update(input) {
|
|
691
|
+
return await this.client.ceremony.update.mutate(input);
|
|
692
|
+
}
|
|
693
|
+
/** Upsert definitions by slug. Keys a definition omits are left untouched. */
|
|
694
|
+
async importDefinitions(input) {
|
|
695
|
+
return await this.client.ceremony.importDefinitions.mutate(input);
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Attach unattached recordings to occurrences by alias. Defaults to a dry
|
|
699
|
+
* run — the report is the review step; pass `dryRun: false` to write. Even a
|
|
700
|
+
* dry run writes one thing: it schedules any missing occurrences of active
|
|
701
|
+
* ceremonies, so that historical ones exist to attach to.
|
|
702
|
+
*/
|
|
703
|
+
async backfillAttachments(workspaceId, options = {}) {
|
|
704
|
+
return await this.client.ceremony.backfillAttachments.mutate({
|
|
705
|
+
workspaceId,
|
|
706
|
+
dryRun: options.dryRun ?? true
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
/** Link a recorded meeting to the occurrence it captured (same workspace). */
|
|
710
|
+
async attachMeeting(meetingId, occurrenceId) {
|
|
711
|
+
return await this.client.ceremony.attachMeeting.mutate({
|
|
712
|
+
meetingId,
|
|
713
|
+
occurrenceId
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
async detachMeeting(meetingId) {
|
|
717
|
+
return await this.client.ceremony.detachMeeting.mutate({
|
|
718
|
+
meetingId
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
|
|
522
723
|
// src/contacts.ts
|
|
523
724
|
var ContactsApi = class {
|
|
524
725
|
constructor(client) {
|
|
@@ -1635,6 +1836,7 @@ var ExponentialClient = class {
|
|
|
1635
1836
|
this.goals = new GoalsApi(this.client, this.keyResults);
|
|
1636
1837
|
this.projects = new ProjectsApi(this.client);
|
|
1637
1838
|
this.workspaces = new WorkspacesApi(this.client);
|
|
1839
|
+
this.ceremonies = new CeremoniesApi(this.client);
|
|
1638
1840
|
this.contacts = new ContactsApi(this.client);
|
|
1639
1841
|
this.decisions = new DecisionsApi(this.client);
|
|
1640
1842
|
this.organizations = new OrganizationsApi(this.client);
|
|
@@ -1667,6 +1869,8 @@ var ExponentialClient = class {
|
|
|
1667
1869
|
keyResults;
|
|
1668
1870
|
projects;
|
|
1669
1871
|
workspaces;
|
|
1872
|
+
/** Ceremonies and their occurrences (ADR-0059). */
|
|
1873
|
+
ceremonies;
|
|
1670
1874
|
contacts;
|
|
1671
1875
|
decisions;
|
|
1672
1876
|
organizations;
|
|
@@ -1693,6 +1897,7 @@ var ExponentialClient = class {
|
|
|
1693
1897
|
};
|
|
1694
1898
|
export {
|
|
1695
1899
|
AgentRunsApi,
|
|
1900
|
+
CeremoniesApi,
|
|
1696
1901
|
DEFAULT_GAP_MINUTES,
|
|
1697
1902
|
ExponentialClient,
|
|
1698
1903
|
ROUND_MINUTES,
|