exponential-sdk 1.28.0 → 1.29.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 +29 -0
- package/dist/index.d.ts +163 -1
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,35 @@ Returns all workspaces you have access to.
|
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
63
|
+
### Positions (roles & responsibilities)
|
|
64
|
+
|
|
65
|
+
The roles shown on a workspace's settings page (ADR-0068). Writes need a
|
|
66
|
+
person's own API token — agent keys get `FORBIDDEN` — and owner/admin, except
|
|
67
|
+
that a holder who is at least a member may edit their Position's remit.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
const { positions, members } = await client.positions.list(workspaceId);
|
|
71
|
+
|
|
72
|
+
const cto = await client.positions.create({
|
|
73
|
+
workspaceId,
|
|
74
|
+
title: 'Technical Director',
|
|
75
|
+
remit: 'Architecture, hiring engineers, the release process.',
|
|
76
|
+
notAccountableFor: 'Sales and marketing.',
|
|
77
|
+
holderUserIds: [userId],
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
await client.positions.update({ workspaceId, positionId: cto.id, remit: '...' });
|
|
81
|
+
await client.positions.setHolders(workspaceId, cto.id, [userId, otherUserId]);
|
|
82
|
+
await client.positions.delete(workspaceId, cto.id);
|
|
83
|
+
|
|
84
|
+
// Upsert by title in one transaction; dryRun shows the plan first.
|
|
85
|
+
await client.positions.importMany({ workspaceId, dryRun: true, positions: [
|
|
86
|
+
{ title: 'Travel researcher', remit: 'Flights, hotels, visas.', holderUserIds: [] },
|
|
87
|
+
] });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
63
92
|
### Projects
|
|
64
93
|
|
|
65
94
|
```typescript
|
package/dist/index.d.ts
CHANGED
|
@@ -688,6 +688,132 @@ declare class CeremoniesApi {
|
|
|
688
688
|
detachMeeting(meetingId: string): Promise<CeremonyMeetingAttachment>;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
+
/**
|
|
692
|
+
* Positions (ADR-0068): the roles & responsibilities of a workspace — "who
|
|
693
|
+
* does what", for humans and agents alike. Shown on the workspace settings
|
|
694
|
+
* page. Routing data only: a Position never grants or restricts access;
|
|
695
|
+
* the member's workspace role does that.
|
|
696
|
+
*/
|
|
697
|
+
/** Someone who holds a Position. Always a member of the workspace. */
|
|
698
|
+
interface PositionHolder {
|
|
699
|
+
userId: string;
|
|
700
|
+
name: string | null;
|
|
701
|
+
image: string | null;
|
|
702
|
+
isAgent: boolean;
|
|
703
|
+
}
|
|
704
|
+
interface Position {
|
|
705
|
+
id: string;
|
|
706
|
+
/** 1–80 characters, unique per workspace (case-sensitive). */
|
|
707
|
+
title: string;
|
|
708
|
+
/** Markdown, 1–2000 characters: the kinds of work its holders take on. */
|
|
709
|
+
remit: string;
|
|
710
|
+
/** Markdown, up to 2000 characters. */
|
|
711
|
+
notAccountableFor: string | null;
|
|
712
|
+
holders: PositionHolder[];
|
|
713
|
+
}
|
|
714
|
+
/** One row per workspace member, from `positions.list()`. */
|
|
715
|
+
interface PositionMemberCoverage {
|
|
716
|
+
userId: string;
|
|
717
|
+
/** Ids of the Positions this member holds. */
|
|
718
|
+
positionIds: string[];
|
|
719
|
+
/** True when the member has no stated remit (no Position, and no agent description). */
|
|
720
|
+
remitGap: boolean;
|
|
721
|
+
}
|
|
722
|
+
interface PositionList {
|
|
723
|
+
positions: Position[];
|
|
724
|
+
members: PositionMemberCoverage[];
|
|
725
|
+
}
|
|
726
|
+
interface PositionCoverage {
|
|
727
|
+
/** Whether the chat would offer "Import roles & responsibilities". */
|
|
728
|
+
offerImport: boolean;
|
|
729
|
+
memberCount: number;
|
|
730
|
+
eligibleCount: number;
|
|
731
|
+
coveredCount: number;
|
|
732
|
+
}
|
|
733
|
+
/** One row of an import result, in input order. */
|
|
734
|
+
interface PositionImportResult {
|
|
735
|
+
title: string;
|
|
736
|
+
outcome: 'create' | 'update';
|
|
737
|
+
/** The value after the import. */
|
|
738
|
+
notAccountableFor: string | null;
|
|
739
|
+
/** Every holder after the import. */
|
|
740
|
+
holderUserIds: string[];
|
|
741
|
+
}
|
|
742
|
+
interface PositionImportOutput {
|
|
743
|
+
/** False for a dry run. */
|
|
744
|
+
written: boolean;
|
|
745
|
+
results: PositionImportResult[];
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
interface PositionCreateInput {
|
|
749
|
+
workspaceId: string;
|
|
750
|
+
/** 1–80 characters, unique per workspace. */
|
|
751
|
+
title: string;
|
|
752
|
+
/** Markdown, 1–2000 characters. */
|
|
753
|
+
remit: string;
|
|
754
|
+
/** Markdown, up to 2000 characters. */
|
|
755
|
+
notAccountableFor?: string;
|
|
756
|
+
/** Member userIds (max 50). Every one must belong to the workspace. */
|
|
757
|
+
holderUserIds?: string[];
|
|
758
|
+
}
|
|
759
|
+
/** At least one field besides the ids must be present. */
|
|
760
|
+
interface PositionUpdateInput {
|
|
761
|
+
workspaceId: string;
|
|
762
|
+
positionId: string;
|
|
763
|
+
title?: string;
|
|
764
|
+
remit?: string;
|
|
765
|
+
/** `null` or `""` clears it. */
|
|
766
|
+
notAccountableFor?: string | null;
|
|
767
|
+
/** Replaces the whole holder set (owner/admin only). */
|
|
768
|
+
holderUserIds?: string[];
|
|
769
|
+
}
|
|
770
|
+
interface PositionImportRow {
|
|
771
|
+
title: string;
|
|
772
|
+
remit: string;
|
|
773
|
+
/** Omit to keep the stored value on an update; `""` clears it. */
|
|
774
|
+
notAccountableFor?: string;
|
|
775
|
+
holderUserIds: string[];
|
|
776
|
+
}
|
|
777
|
+
interface PositionImportInput {
|
|
778
|
+
workspaceId: string;
|
|
779
|
+
/** Validate and return the plan without writing. */
|
|
780
|
+
dryRun: boolean;
|
|
781
|
+
/** 1–50 rows, titles unique (case-insensitive), at most 200 distinct holders. */
|
|
782
|
+
positions: PositionImportRow[];
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Positions — a workspace's roles & responsibilities (ADR-0068).
|
|
786
|
+
*
|
|
787
|
+
* Every write is human-only: it needs a person's own API token (`exponential
|
|
788
|
+
* auth login`), and an agent key is refused with FORBIDDEN. Owners and admins
|
|
789
|
+
* create, rename, delete, set holders and import; a member may edit the
|
|
790
|
+
* remit of a Position they hold.
|
|
791
|
+
*/
|
|
792
|
+
declare class PositionsApi {
|
|
793
|
+
private client;
|
|
794
|
+
constructor(client: TrpcClient);
|
|
795
|
+
/** Every Position with its holders, plus each member's coverage. */
|
|
796
|
+
list(workspaceId: string): Promise<PositionList>;
|
|
797
|
+
/** One Position by id, from `list` (the router has no single-row read). */
|
|
798
|
+
get(workspaceId: string, positionId: string): Promise<Position | null>;
|
|
799
|
+
/** How many members have a stated remit, and whether to offer an import. */
|
|
800
|
+
coverage(workspaceId: string): Promise<PositionCoverage>;
|
|
801
|
+
create(input: PositionCreateInput): Promise<Position>;
|
|
802
|
+
update(input: PositionUpdateInput): Promise<Position>;
|
|
803
|
+
/** Holders cascade. */
|
|
804
|
+
delete(workspaceId: string, positionId: string): Promise<{
|
|
805
|
+
id: string;
|
|
806
|
+
}>;
|
|
807
|
+
/** Replace the holder set; `[]` removes everyone. */
|
|
808
|
+
setHolders(workspaceId: string, positionId: string, userIds: string[]): Promise<Position>;
|
|
809
|
+
/**
|
|
810
|
+
* Upsert many Positions by title (matched case-insensitively, never renamed).
|
|
811
|
+
* An update replaces the remit and only ADDS holders. Run with
|
|
812
|
+
* `dryRun: true` first to see the plan.
|
|
813
|
+
*/
|
|
814
|
+
importMany(input: PositionImportInput): Promise<PositionImportOutput>;
|
|
815
|
+
}
|
|
816
|
+
|
|
691
817
|
type ActionInput = {
|
|
692
818
|
assigneeId?: string;
|
|
693
819
|
};
|
|
@@ -1069,6 +1195,40 @@ interface TrpcClient {
|
|
|
1069
1195
|
}) => Promise<unknown[]>;
|
|
1070
1196
|
};
|
|
1071
1197
|
};
|
|
1198
|
+
position: {
|
|
1199
|
+
list: {
|
|
1200
|
+
query: (input: {
|
|
1201
|
+
workspaceId: string;
|
|
1202
|
+
}) => Promise<unknown>;
|
|
1203
|
+
};
|
|
1204
|
+
coverage: {
|
|
1205
|
+
query: (input: {
|
|
1206
|
+
workspaceId: string;
|
|
1207
|
+
}) => Promise<unknown>;
|
|
1208
|
+
};
|
|
1209
|
+
create: {
|
|
1210
|
+
mutate: (input: PositionCreateInput) => Promise<unknown>;
|
|
1211
|
+
};
|
|
1212
|
+
update: {
|
|
1213
|
+
mutate: (input: PositionUpdateInput) => Promise<unknown>;
|
|
1214
|
+
};
|
|
1215
|
+
delete: {
|
|
1216
|
+
mutate: (input: {
|
|
1217
|
+
workspaceId: string;
|
|
1218
|
+
positionId: string;
|
|
1219
|
+
}) => Promise<unknown>;
|
|
1220
|
+
};
|
|
1221
|
+
setHolders: {
|
|
1222
|
+
mutate: (input: {
|
|
1223
|
+
workspaceId: string;
|
|
1224
|
+
positionId: string;
|
|
1225
|
+
userIds: string[];
|
|
1226
|
+
}) => Promise<unknown>;
|
|
1227
|
+
};
|
|
1228
|
+
importMany: {
|
|
1229
|
+
mutate: (input: PositionImportInput) => Promise<unknown>;
|
|
1230
|
+
};
|
|
1231
|
+
};
|
|
1072
1232
|
goal: {
|
|
1073
1233
|
getById: {
|
|
1074
1234
|
query: (input: {
|
|
@@ -6332,6 +6492,8 @@ declare class ExponentialClient {
|
|
|
6332
6492
|
keyResults: KeyResultsApi;
|
|
6333
6493
|
projects: ProjectsApi;
|
|
6334
6494
|
workspaces: WorkspacesApi;
|
|
6495
|
+
/** Positions — a workspace's roles & responsibilities (ADR-0068). */
|
|
6496
|
+
positions: PositionsApi;
|
|
6335
6497
|
/** Ceremonies and their occurrences (ADR-0059). */
|
|
6336
6498
|
ceremonies: CeremoniesApi;
|
|
6337
6499
|
contacts: ContactsApi;
|
|
@@ -6363,4 +6525,4 @@ declare class ExponentialClient {
|
|
|
6363
6525
|
});
|
|
6364
6526
|
}
|
|
6365
6527
|
|
|
6366
|
-
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionUpsertBySourceInput, type ActionUpsertBySourceResult, type ActionsListOutput, type AddInteractionInput, type AddablePropertyType, type AgentRunStatus, AgentRunsApi, type AppendEventsResult, type Area, type AreaCreateInput, type AreaListOptions, CeremoniesApi, type Ceremony, type CeremonyAddAgendaItemInput, type CeremonyAddedOccurrence, type CeremonyAgenda, type CeremonyAgendaItem, type CeremonyAgendaMatrixPost, type CeremonyAgendaRefType, type CeremonyAgendaResult, type CeremonyAgendaSection, type CeremonyAgendaTemplateSection, type CeremonyBackfillResult, type CeremonyBackfillRow, type CeremonyCreateInput, type CeremonyGenerateAgendaResult, type CeremonyImportDefinition, type CeremonyImportInput, type CeremonyImportResult, type CeremonyKind, type CeremonyListOccurrencesInput, type CeremonyMatrixPostResult, type CeremonyMatrixRemoveResult, type CeremonyMeetingAttachment, type CeremonyMeetingUrlMatch, type CeremonyMyUpdate, type CeremonyNamedRef, type CeremonyOccurrence, type CeremonyOccurrenceListRow, type CeremonyOccurrenceRow, type CeremonyOccurrenceStatus, type CeremonyParticipantUpdate, type CeremonyRecord, type CeremonyRecordedMeeting, type CeremonyRescheduledOccurrence, type CeremonySaveMyUpdateInput, type CeremonySkipProposal, type CeremonySkipResult, type CeremonySummary, type CeremonyTemplate, type CeremonyUpdateInput, type CeremonyUpdateQuestion, type CeremonyUpdateSummary, type CeremonyUserRef, type CeremonyWriteResult, type ClaimedRun, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type ConversationMessage, type CsvCellError, type CsvColumnTarget, type CsvCommitResult, type CsvMapping, type CsvPreview, type CsvPreviewColumn, type CsvPreviewRow, DEFAULT_GAP_MINUTES, type Database, type DatabaseCreateInput, type DatabaseFilter, type DatabasePropertyResult, type DatabaseRow, type DatabaseRowsPage, type DatabaseUpdateInput, type DatabaseView, type DayReport, type DayReportActionRow, type DayReportEntry, type DayReportProductRow, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Decision, type DecisionAdrRef, type DecisionChainRef, type DecisionCreateInput, type DecisionDecider, type DecisionDeciderInput, type DecisionEvidenceTurn, type DecisionFeatureRef, type DecisionLink, type DecisionListOptions, type DecisionListRow, type DecisionMeetingRef, type DecisionOccurrenceRef, type DecisionProductRef, type DecisionProjectRef, type DecisionReviewState, type DecisionSetStatusInput, type DecisionSource, type DecisionStatus, type DecisionTicketRef, type DecisionUpdateInput, type DecisionUserRef, type DeletedDatabase, type DraftDecisionsResult, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type FilterOp, type FinishInput, type FinishResult, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type HeartbeatResult, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type KnowledgeSearchOptions, type KnowledgeSearchOutput, type KnowledgeSearchResult, type KnowledgeSourceType, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingDecisions, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageDiff, type PageDiffOptions, type PageDiffSide, type PageGetFormat, type PageGetOptions, type PageHistory, type PageHistoryOptions, type PageListOptions, type PageOutlineEntry, type PageRestoreOptions, type PageRevision, type PageRevisionAuthor, type PageRevisionDetail, type PageRevisionKind, type PageSearchOptions, type PageSearchOutput, type PageSearchResult, type PageUpdateInput, type PillColor, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectCeremony, type ProjectDetail, type ProjectKeyResultLink, type ProjectOccurrenceRow, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, type PropertyAddInput, type PropertyDef, type PropertyRejection, type PropertyType, type PropertyUpdateInput, type PropertyValue, ROUND_MINUTES, type ReadStatus, type RelationConfig, type RelationTargetKind, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type Resource, type ResourceContentType, type ResourceCreateInput, type ResourceListOptions, type ResourceListResult, type ResourceReadState, type ResourceUpdateInput, type RowListOptions, type RowValuesInput, type RowWriteOptions, type RunMessage, type RunnerEvent, type RunnerEventKind, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SelectOption, type SelectOptionInput, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, TimeApi, type TimeConfirmDayResult, type TimeEntry, type TimeEntrySource, type TimeEntryStatus, type TimeLogBatchResult, type TimeLogInput, type TimeLogOutcome, type TimeLogResult, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type WorklogSegment, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig, segmentConversation };
|
|
6528
|
+
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionUpsertBySourceInput, type ActionUpsertBySourceResult, type ActionsListOutput, type AddInteractionInput, type AddablePropertyType, type AgentRunStatus, AgentRunsApi, type AppendEventsResult, type Area, type AreaCreateInput, type AreaListOptions, CeremoniesApi, type Ceremony, type CeremonyAddAgendaItemInput, type CeremonyAddedOccurrence, type CeremonyAgenda, type CeremonyAgendaItem, type CeremonyAgendaMatrixPost, type CeremonyAgendaRefType, type CeremonyAgendaResult, type CeremonyAgendaSection, type CeremonyAgendaTemplateSection, type CeremonyBackfillResult, type CeremonyBackfillRow, type CeremonyCreateInput, type CeremonyGenerateAgendaResult, type CeremonyImportDefinition, type CeremonyImportInput, type CeremonyImportResult, type CeremonyKind, type CeremonyListOccurrencesInput, type CeremonyMatrixPostResult, type CeremonyMatrixRemoveResult, type CeremonyMeetingAttachment, type CeremonyMeetingUrlMatch, type CeremonyMyUpdate, type CeremonyNamedRef, type CeremonyOccurrence, type CeremonyOccurrenceListRow, type CeremonyOccurrenceRow, type CeremonyOccurrenceStatus, type CeremonyParticipantUpdate, type CeremonyRecord, type CeremonyRecordedMeeting, type CeremonyRescheduledOccurrence, type CeremonySaveMyUpdateInput, type CeremonySkipProposal, type CeremonySkipResult, type CeremonySummary, type CeremonyTemplate, type CeremonyUpdateInput, type CeremonyUpdateQuestion, type CeremonyUpdateSummary, type CeremonyUserRef, type CeremonyWriteResult, type ClaimedRun, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type ConversationMessage, type CsvCellError, type CsvColumnTarget, type CsvCommitResult, type CsvMapping, type CsvPreview, type CsvPreviewColumn, type CsvPreviewRow, DEFAULT_GAP_MINUTES, type Database, type DatabaseCreateInput, type DatabaseFilter, type DatabasePropertyResult, type DatabaseRow, type DatabaseRowsPage, type DatabaseUpdateInput, type DatabaseView, type DayReport, type DayReportActionRow, type DayReportEntry, type DayReportProductRow, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Decision, type DecisionAdrRef, type DecisionChainRef, type DecisionCreateInput, type DecisionDecider, type DecisionDeciderInput, type DecisionEvidenceTurn, type DecisionFeatureRef, type DecisionLink, type DecisionListOptions, type DecisionListRow, type DecisionMeetingRef, type DecisionOccurrenceRef, type DecisionProductRef, type DecisionProjectRef, type DecisionReviewState, type DecisionSetStatusInput, type DecisionSource, type DecisionStatus, type DecisionTicketRef, type DecisionUpdateInput, type DecisionUserRef, type DeletedDatabase, type DraftDecisionsResult, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type FilterOp, type FinishInput, type FinishResult, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type HeartbeatResult, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type KnowledgeSearchOptions, type KnowledgeSearchOutput, type KnowledgeSearchResult, type KnowledgeSourceType, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingDecisions, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageDiff, type PageDiffOptions, type PageDiffSide, type PageGetFormat, type PageGetOptions, type PageHistory, type PageHistoryOptions, type PageListOptions, type PageOutlineEntry, type PageRestoreOptions, type PageRevision, type PageRevisionAuthor, type PageRevisionDetail, type PageRevisionKind, type PageSearchOptions, type PageSearchOutput, type PageSearchResult, type PageUpdateInput, type PillColor, type Pipeline, type PipelineStage, type Position, type PositionCoverage, type PositionCreateInput, type PositionHolder, type PositionImportInput, type PositionImportOutput, type PositionImportResult, type PositionImportRow, type PositionList, type PositionMemberCoverage, type PositionUpdateInput, PositionsApi, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectCeremony, type ProjectDetail, type ProjectKeyResultLink, type ProjectOccurrenceRow, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, type PropertyAddInput, type PropertyDef, type PropertyRejection, type PropertyType, type PropertyUpdateInput, type PropertyValue, ROUND_MINUTES, type ReadStatus, type RelationConfig, type RelationTargetKind, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type Resource, type ResourceContentType, type ResourceCreateInput, type ResourceListOptions, type ResourceListResult, type ResourceReadState, type ResourceUpdateInput, type RowListOptions, type RowValuesInput, type RowWriteOptions, type RunMessage, type RunnerEvent, type RunnerEventKind, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SelectOption, type SelectOptionInput, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, TimeApi, type TimeConfirmDayResult, type TimeEntry, type TimeEntrySource, type TimeEntryStatus, type TimeLogBatchResult, type TimeLogInput, type TimeLogOutcome, type TimeLogResult, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type WorklogSegment, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig, segmentConversation };
|
package/dist/index.js
CHANGED
|
@@ -519,6 +519,52 @@ var WorkspacesApi = class {
|
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
|
|
522
|
+
// src/positions.ts
|
|
523
|
+
var PositionsApi = class {
|
|
524
|
+
constructor(client) {
|
|
525
|
+
this.client = client;
|
|
526
|
+
}
|
|
527
|
+
/** Every Position with its holders, plus each member's coverage. */
|
|
528
|
+
async list(workspaceId) {
|
|
529
|
+
return await this.client.position.list.query({ workspaceId });
|
|
530
|
+
}
|
|
531
|
+
/** One Position by id, from `list` (the router has no single-row read). */
|
|
532
|
+
async get(workspaceId, positionId) {
|
|
533
|
+
const { positions } = await this.list(workspaceId);
|
|
534
|
+
return positions.find((position) => position.id === positionId) ?? null;
|
|
535
|
+
}
|
|
536
|
+
/** How many members have a stated remit, and whether to offer an import. */
|
|
537
|
+
async coverage(workspaceId) {
|
|
538
|
+
return await this.client.position.coverage.query({ workspaceId });
|
|
539
|
+
}
|
|
540
|
+
async create(input) {
|
|
541
|
+
return await this.client.position.create.mutate(input);
|
|
542
|
+
}
|
|
543
|
+
async update(input) {
|
|
544
|
+
const { workspaceId, positionId, ...edits } = input;
|
|
545
|
+
if (Object.values(edits).every((value) => value === void 0)) {
|
|
546
|
+
throw new Error("Nothing to update: pass title, remit, notAccountableFor or holderUserIds");
|
|
547
|
+
}
|
|
548
|
+
return await this.client.position.update.mutate(input);
|
|
549
|
+
}
|
|
550
|
+
/** Holders cascade. */
|
|
551
|
+
async delete(workspaceId, positionId) {
|
|
552
|
+
return await this.client.position.delete.mutate({ workspaceId, positionId });
|
|
553
|
+
}
|
|
554
|
+
/** Replace the holder set; `[]` removes everyone. */
|
|
555
|
+
async setHolders(workspaceId, positionId, userIds) {
|
|
556
|
+
return await this.client.position.setHolders.mutate({ workspaceId, positionId, userIds });
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Upsert many Positions by title (matched case-insensitively, never renamed).
|
|
560
|
+
* An update replaces the remit and only ADDS holders. Run with
|
|
561
|
+
* `dryRun: true` first to see the plan.
|
|
562
|
+
*/
|
|
563
|
+
async importMany(input) {
|
|
564
|
+
return await this.client.position.importMany.mutate(input);
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
|
|
522
568
|
// src/ceremonies.ts
|
|
523
569
|
var CeremoniesApi = class {
|
|
524
570
|
constructor(client) {
|
|
@@ -1836,6 +1882,7 @@ var ExponentialClient = class {
|
|
|
1836
1882
|
this.goals = new GoalsApi(this.client, this.keyResults);
|
|
1837
1883
|
this.projects = new ProjectsApi(this.client);
|
|
1838
1884
|
this.workspaces = new WorkspacesApi(this.client);
|
|
1885
|
+
this.positions = new PositionsApi(this.client);
|
|
1839
1886
|
this.ceremonies = new CeremoniesApi(this.client);
|
|
1840
1887
|
this.contacts = new ContactsApi(this.client);
|
|
1841
1888
|
this.decisions = new DecisionsApi(this.client);
|
|
@@ -1869,6 +1916,8 @@ var ExponentialClient = class {
|
|
|
1869
1916
|
keyResults;
|
|
1870
1917
|
projects;
|
|
1871
1918
|
workspaces;
|
|
1919
|
+
/** Positions — a workspace's roles & responsibilities (ADR-0068). */
|
|
1920
|
+
positions;
|
|
1872
1921
|
/** Ceremonies and their occurrences (ADR-0059). */
|
|
1873
1922
|
ceremonies;
|
|
1874
1923
|
contacts;
|
|
@@ -1900,6 +1949,7 @@ export {
|
|
|
1900
1949
|
CeremoniesApi,
|
|
1901
1950
|
DEFAULT_GAP_MINUTES,
|
|
1902
1951
|
ExponentialClient,
|
|
1952
|
+
PositionsApi,
|
|
1903
1953
|
ROUND_MINUTES,
|
|
1904
1954
|
TRPCClientError,
|
|
1905
1955
|
TimeApi,
|