@korso/shepherd-ui 0.2.2 → 0.3.1

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.
@@ -144,20 +144,59 @@ export declare interface EmptyStateProps {
144
144
  ctaLabel?: string;
145
145
  }
146
146
 
147
+ declare const FeedbackRequest: z.ZodObject<{
148
+ type: z.ZodEnum<["bug", "suggestion", "other"]>;
149
+ body: z.ZodString;
150
+ }, "strip", z.ZodTypeAny, {
151
+ type: "bug" | "suggestion" | "other";
152
+ body: string;
153
+ }, {
154
+ type: "bug" | "suggestion" | "other";
155
+ body: string;
156
+ }>;
157
+
158
+ declare type FeedbackRequestT = z.infer<typeof FeedbackRequest>;
159
+
160
+ declare const FeedbackResponse: z.ZodObject<{
161
+ ok: z.ZodLiteral<true>;
162
+ id: z.ZodString;
163
+ }, "strip", z.ZodTypeAny, {
164
+ id: string;
165
+ ok: true;
166
+ }, {
167
+ id: string;
168
+ ok: true;
169
+ }>;
170
+
171
+ declare type FeedbackResponseT = z.infer<typeof FeedbackResponse>;
172
+
173
+ declare const InviteByEmailResponse: z.ZodObject<{
174
+ email: z.ZodString;
175
+ sentAt: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ email: string;
178
+ sentAt: string;
179
+ }, {
180
+ email: string;
181
+ sentAt: string;
182
+ }>;
183
+
184
+ declare type InviteByEmailResponseT = z.infer<typeof InviteByEmailResponse>;
185
+
147
186
  declare const InviteResponse: z.ZodObject<{
148
187
  code: z.ZodString;
149
188
  expiresAt: z.ZodNullable<z.ZodString>;
150
- maxUses: z.ZodNumber;
189
+ maxUses: z.ZodNullable<z.ZodNumber>;
151
190
  useCount: z.ZodNumber;
152
191
  }, "strip", z.ZodTypeAny, {
153
192
  code: string;
154
193
  expiresAt: string | null;
155
- maxUses: number;
194
+ maxUses: number | null;
156
195
  useCount: number;
157
196
  }, {
158
197
  code: string;
159
198
  expiresAt: string | null;
160
- maxUses: number;
199
+ maxUses: number | null;
161
200
  useCount: number;
162
201
  }>;
163
202
 
@@ -395,6 +434,8 @@ export declare interface ShepherdClient {
395
434
  revokeToken(workspaceId: string, tokenId: string): Promise<void>;
396
435
  /** POST a new invite code for the workspace (admin only). */
397
436
  createInvite(workspaceId: string, body: CreateInviteRequestT): Promise<InviteResponseT>;
437
+ /** POST a one-time-use invite emailed directly to an address (admin only). */
438
+ inviteByEmail(workspaceId: string, email: string): Promise<InviteByEmailResponseT>;
398
439
  /** POST to revoke an invite code (admin only). */
399
440
  revokeInvite(workspaceId: string, code: string): Promise<void>;
400
441
  /** POST to redeem an invite code, joining its workspace as a member. */
@@ -409,6 +450,13 @@ export declare interface ShepherdClient {
409
450
  landscape(workspaceId: string): Promise<WorkspaceLandscapeResponseT>;
410
451
  /** POST an operator announcement to a specific workspace. */
411
452
  announceTo(workspaceId: string, body: WorkspaceAnnounceRequestT): Promise<WorkspaceAnnounceResponseT>;
453
+ /**
454
+ * POST a bug/suggestion/other note from the feedback widget. Hits
455
+ * `/workspaces/:id/feedback` when `workspaceId` is given (the normal hosted
456
+ * case — a validated workspace to attach), or the flat `/feedback` otherwise
457
+ * (self-host, or a hosted caller with no workspace selected yet).
458
+ */
459
+ submitFeedback(body: FeedbackRequestT, workspaceId?: string): Promise<FeedbackResponseT>;
412
460
  /** GET the unfiltered whole-workspace view (agents, tasks, announcements). */
413
461
  getLandscape(): Promise<WorkspaceLandscapeResponseT>;
414
462
  /** POST an operator announcement (broadcast or @targeted) to the workspace. */
@@ -706,7 +754,7 @@ declare const WorkspaceLandscapeResponse: z.ZodObject<{
706
754
 
707
755
  export declare type WorkspaceLandscapeResponseT = z.infer<typeof WorkspaceLandscapeResponse>;
708
756
 
709
- export declare function Workspaces({ workspaces, selected, onChanged, onSelect }: WorkspacesProps): JSX_2.Element;
757
+ export declare function Workspaces({ workspaces, selected, onChanged, onSelect, onMembersChanged, }: WorkspacesProps): JSX_2.Element;
710
758
 
711
759
  export declare interface WorkspacesProps {
712
760
  /** All workspaces the account belongs to (for the switcher / context). */
@@ -717,6 +765,9 @@ export declare interface WorkspacesProps {
717
765
  onChanged: () => void;
718
766
  /** Switch the active workspace (optional simple switcher). */
719
767
  onSelect?: (workspaceId: string) => void;
768
+ /** Called after a mutation that may change the selected workspace's roster
769
+ * (an invite created, a code redeemed), so the sibling <Members> refetches. */
770
+ onMembersChanged?: () => void;
720
771
  }
721
772
 
722
773
  /** One workspace as seen by an account, with that account's role in it. */