@botbuddy/react 0.22.0 → 0.24.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/CHANGELOG.md +36 -0
- package/README.md +42 -0
- package/dist/index.cjs +61 -16
- package/dist/index.d.cts +208 -2
- package/dist/index.d.ts +208 -2
- package/dist/index.js +61 -16
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -151,6 +151,30 @@ interface ReleaseNoteFilter {
|
|
|
151
151
|
}
|
|
152
152
|
/** BOT-3169: `draft_on_your_branch` (local) and `in_this_preview` (preview) mark the viewer's own branch drafts. BOT-3167: `in_staging`. BOT-3168: `released`. BOT-3428: `rolled_back` (production moved back past the change). */
|
|
153
153
|
type ReleaseNoteDeliveryBadge = "not_bound" | "draft_on_branch" | "draft_on_pr" | "merged" | "draft_on_your_branch" | "in_this_preview" | "in_staging" | "released" | "rolled_back";
|
|
154
|
+
/** BOT-3635: the "Try it" part of a pack: where to find the change (an app path or https URL, plus its screen name), what to do, and what to look for. */
|
|
155
|
+
interface ReleaseNotePackTour {
|
|
156
|
+
find_it: string;
|
|
157
|
+
/** BOT-3638: the screen's name, shown as the link text. */
|
|
158
|
+
where: string | null;
|
|
159
|
+
try: ReleaseNoteBlock[] | null;
|
|
160
|
+
look_for: ReleaseNoteBlock[] | null;
|
|
161
|
+
watch: ReleaseNoteBlock[] | null;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* BOT-3635: a note's pack as the CEO reads it (the team's feed only; never
|
|
165
|
+
* customers'). Written by the agent that made the change. Text fields are
|
|
166
|
+
* bbrn-md-1 syntax trees, like a body.
|
|
167
|
+
*/
|
|
168
|
+
interface ReleaseNotePackView {
|
|
169
|
+
/** Feature, Bug fix or Chore (bbrn-pack-1). A Chore shows only `after`. */
|
|
170
|
+
category: string;
|
|
171
|
+
before: ReleaseNoteBlock[] | null;
|
|
172
|
+
after: ReleaseNoteBlock[] | null;
|
|
173
|
+
benefit: ReleaseNoteBlock[] | null;
|
|
174
|
+
/** Where it shows in the product; null when the change has no UI. */
|
|
175
|
+
ui: ReleaseNoteBlock[] | null;
|
|
176
|
+
tour: ReleaseNotePackTour | null;
|
|
177
|
+
}
|
|
154
178
|
interface ReleaseNoteEntry {
|
|
155
179
|
id: string;
|
|
156
180
|
source_key: string;
|
|
@@ -176,6 +200,8 @@ interface ReleaseNoteEntry {
|
|
|
176
200
|
version?: string | null;
|
|
177
201
|
/** BOT-3168: when that release went live (UTC ISO), else null. Absent from older servers. */
|
|
178
202
|
released_at?: string | null;
|
|
203
|
+
/** BOT-3635: the note's pack as the CEO reads it, else null. Absent from older servers. */
|
|
204
|
+
pack?: ReleaseNotePackView | null;
|
|
179
205
|
created_at: string;
|
|
180
206
|
updated_at: string;
|
|
181
207
|
}
|
|
@@ -235,11 +261,13 @@ interface ReleaseNotesFeedFilters {
|
|
|
235
261
|
}
|
|
236
262
|
type ReleaseNotesFeed =
|
|
237
263
|
/** BOT-3428: `notice` is "No production release recorded since <date>" when production records stopped, else null or absent. */
|
|
264
|
+
/** BOT-3635: `app_origin` is the tenant's one production origin (a signed-in member's feed only), where a pack tip's app path opens. */
|
|
238
265
|
({
|
|
239
266
|
tenant: string;
|
|
240
267
|
audience: "internal";
|
|
241
268
|
entries: ReleaseNoteEntry[];
|
|
242
269
|
notice?: string | null;
|
|
270
|
+
app_origin?: string | null;
|
|
243
271
|
} & ReleaseNotesFeedFilters)
|
|
244
272
|
/** BOT-3163: newest published first, 50 per page. */
|
|
245
273
|
/** BOT-3208: `announcements` is the tenant's setting (absent from older servers). */
|
|
@@ -261,7 +289,7 @@ type ReleaseNotesTheme = Partial<Record<ReleaseNotesToken, string>>;
|
|
|
261
289
|
type ReleaseNotesToken = "accent" | "fg" | "bg" | "muted" | "border" | "radius" | "font";
|
|
262
290
|
/** BOT-3159 depth 2: class names added (never replacing the `bbrn-*` class) to each part. */
|
|
263
291
|
type ReleaseNotesClassNames = Partial<Record<ReleaseNotesSlot, string>>;
|
|
264
|
-
type ReleaseNotesSlot = "root" | "entry" | "head" | "title" | "badge" | "delivery" | "meta" | "body" | "links" | "link" | "status" | "retry" | "tags" | "tag" | "filters" | "filter" | "pager";
|
|
292
|
+
type ReleaseNotesSlot = "root" | "entry" | "head" | "title" | "badge" | "delivery" | "meta" | "body" | "links" | "link" | "status" | "retry" | "tags" | "tag" | "filters" | "filter" | "pager" | "pack";
|
|
265
293
|
/** Props the `components.Link` override receives. `className` already holds the link slot. */
|
|
266
294
|
interface ReleaseNoteLinkProps {
|
|
267
295
|
href: string;
|
|
@@ -305,6 +333,184 @@ declare function ReleaseNoteBody({ ast }: {
|
|
|
305
333
|
}): react_jsx_runtime.JSX.Element;
|
|
306
334
|
declare function ReleaseNotes({ endpoint, getToken, onNavigate, theme, classNames, components, timeoutMs }: ReleaseNotesProps): react_jsx_runtime.JSX.Element;
|
|
307
335
|
|
|
336
|
+
interface ReleaseNotePackProps {
|
|
337
|
+
pack: ReleaseNotePackView;
|
|
338
|
+
/** The tenant's one production origin, where an app path opens (BotBuddy's pages). */
|
|
339
|
+
appOrigin?: string | null;
|
|
340
|
+
/** The origin of this page; an app path on the same origin opens in place. */
|
|
341
|
+
currentOrigin?: string | null;
|
|
342
|
+
/** Rendered inside the tenant's own app (the embed): an app path is a relative link. */
|
|
343
|
+
inHostApp?: boolean;
|
|
344
|
+
/** Called with an app path instead of a full page load. */
|
|
345
|
+
onNavigate?: (path: string) => void;
|
|
346
|
+
/** Renders an in-place app link (e.g. the host's router Link). Defaults to an anchor routed through `onNavigate`. */
|
|
347
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
348
|
+
/** Shown under a tip that is not a link (an app path with no app origin). */
|
|
349
|
+
unresolvedHint?: ReactNode;
|
|
350
|
+
/** The section heading level; 3 under a note title (h2), 2 on a note's own page. */
|
|
351
|
+
headingLevel?: 2 | 3 | 4;
|
|
352
|
+
className?: string;
|
|
353
|
+
}
|
|
354
|
+
declare function ReleaseNotePack({ pack, appOrigin, currentOrigin, inHostApp, onNavigate, renderInternalLink, unresolvedHint, headingLevel, className }: ReleaseNotePackProps): react_jsx_runtime.JSX.Element;
|
|
355
|
+
|
|
356
|
+
/** What the page says about the release itself (the team feed's `release`). */
|
|
357
|
+
interface ReleaseViewFacts {
|
|
358
|
+
repository: string;
|
|
359
|
+
environment: string;
|
|
360
|
+
version: string;
|
|
361
|
+
/** A production candidate: a commit not yet released. */
|
|
362
|
+
candidate: boolean;
|
|
363
|
+
commit_sha: string;
|
|
364
|
+
previous_version: string;
|
|
365
|
+
/** When it went live (UTC ISO); null or absent for a candidate. */
|
|
366
|
+
live_at?: string | null;
|
|
367
|
+
/** The workflow run that deployed it; null or absent when none is recorded. */
|
|
368
|
+
run_id?: string | null;
|
|
369
|
+
}
|
|
370
|
+
/** One pull request in the release, noted or not (the digest's list). */
|
|
371
|
+
interface ReleaseViewPullRequest {
|
|
372
|
+
pr: {
|
|
373
|
+
number: number;
|
|
374
|
+
title: string;
|
|
375
|
+
url: string | null;
|
|
376
|
+
};
|
|
377
|
+
has_note: boolean;
|
|
378
|
+
source_key: string | null;
|
|
379
|
+
tickets: Array<{
|
|
380
|
+
key: string;
|
|
381
|
+
title: string | null;
|
|
382
|
+
url: string | null;
|
|
383
|
+
}>;
|
|
384
|
+
project: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string | null;
|
|
387
|
+
percent_complete: number | null;
|
|
388
|
+
url: string | null;
|
|
389
|
+
} | null;
|
|
390
|
+
author: {
|
|
391
|
+
label: string;
|
|
392
|
+
} | null;
|
|
393
|
+
}
|
|
394
|
+
interface ReleaseViewSections {
|
|
395
|
+
/** Notes customers will read (external wording), in feed order. */
|
|
396
|
+
customer: ReleaseNoteEntry[];
|
|
397
|
+
/** Notes only the team reads. */
|
|
398
|
+
internal: ReleaseNoteEntry[];
|
|
399
|
+
/** Pull requests with no release note, in merge order. */
|
|
400
|
+
missing: ReleaseViewPullRequest[];
|
|
401
|
+
}
|
|
402
|
+
declare const RELEASE_SECTION_TITLES: {
|
|
403
|
+
readonly customer: "Customer-facing";
|
|
404
|
+
readonly internal: "Internal";
|
|
405
|
+
readonly missing: "Missing a release note";
|
|
406
|
+
};
|
|
407
|
+
declare const NOTHING_CUSTOMER_FACING = "Nothing customer-facing in this release.";
|
|
408
|
+
declare const RELEASE_RANGE_UNAVAILABLE = "BotBuddy could not read this release's range from GitHub.";
|
|
409
|
+
/** True when customers read the note: the feed's `audience`, else its `customer_facing` flag. */
|
|
410
|
+
declare function isCustomerFacing(entry: ReleaseNoteEntry): boolean;
|
|
411
|
+
declare function releaseSections(entries: readonly ReleaseNoteEntry[], pullRequests: readonly ReleaseViewPullRequest[]): ReleaseViewSections;
|
|
412
|
+
/**
|
|
413
|
+
* The header's one summary line. Pull requests with no note at all read as one
|
|
414
|
+
* sentence, never "No release notes" above a list of them.
|
|
415
|
+
*/
|
|
416
|
+
declare function releaseSummary(s: {
|
|
417
|
+
pullRequests: number;
|
|
418
|
+
notes: number;
|
|
419
|
+
missing: number;
|
|
420
|
+
previousVersion: string;
|
|
421
|
+
}): string;
|
|
422
|
+
/** "1 Dec 2026, 15:25 UTC", or null for a value that is not a time. */
|
|
423
|
+
declare function releaseTime(iso: string | null | undefined): string | null;
|
|
424
|
+
/** "Deployed to staging · 1 Dec 2026, 15:25 UTC", or what a candidate is. */
|
|
425
|
+
declare function releaseDeployedLine(f: ReleaseViewFacts): string;
|
|
426
|
+
/** The commit's GitHub page, or null when the repository is not owner/name. */
|
|
427
|
+
declare function releaseCommitUrl(f: ReleaseViewFacts): string | null;
|
|
428
|
+
/** The deploying workflow run's GitHub page, or null. */
|
|
429
|
+
declare function releaseRunUrl(f: ReleaseViewFacts): string | null;
|
|
430
|
+
/**
|
|
431
|
+
* The note.json a missing pull request's note starts from: its key (the first
|
|
432
|
+
* ticket, else `<owner/repo>#<n>`, so the same number in two repositories never
|
|
433
|
+
* shares a note), the pull request it binds to (`change`), and the
|
|
434
|
+
* pull request's subject as a title the agent rewrites. Binding by `change`
|
|
435
|
+
* names the right pull request whatever branch the agent submits from.
|
|
436
|
+
*/
|
|
437
|
+
declare function missingNoteDraft(pr: ReleaseViewPullRequest, repository: string): string;
|
|
438
|
+
|
|
439
|
+
type Level = 1 | 2 | 3;
|
|
440
|
+
interface ReleaseHeaderProps {
|
|
441
|
+
facts: ReleaseViewFacts;
|
|
442
|
+
/** The summary line (releaseSummary). */
|
|
443
|
+
summary: string;
|
|
444
|
+
/** The version's heading level; 1 on a page of its own. */
|
|
445
|
+
headingLevel?: Level;
|
|
446
|
+
}
|
|
447
|
+
declare function ReleaseHeader({ facts, summary, headingLevel }: ReleaseHeaderProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
interface ReleaseFactsProps {
|
|
449
|
+
facts: ReleaseViewFacts;
|
|
450
|
+
/** The release's readiness page, when the host has one. */
|
|
451
|
+
readinessHref?: string | null;
|
|
452
|
+
onNavigate?: (path: string) => void;
|
|
453
|
+
headingLevel?: Level | 4;
|
|
454
|
+
}
|
|
455
|
+
declare function ReleaseFacts({ facts, readinessHref, onNavigate, headingLevel }: ReleaseFactsProps): react_jsx_runtime.JSX.Element;
|
|
456
|
+
interface ReleaseSectionProps {
|
|
457
|
+
title: string;
|
|
458
|
+
count: number;
|
|
459
|
+
/** Folded by default (a disclosure the reader opens). */
|
|
460
|
+
folded?: boolean;
|
|
461
|
+
/** Shown instead of the children when the count is 0. */
|
|
462
|
+
empty?: ReactNode;
|
|
463
|
+
headingLevel?: Level | 4;
|
|
464
|
+
children?: ReactNode;
|
|
465
|
+
}
|
|
466
|
+
declare function ReleaseSection({ title, count, folded, empty, headingLevel, children }: ReleaseSectionProps): react_jsx_runtime.JSX.Element;
|
|
467
|
+
interface ReleaseNoteCardProps {
|
|
468
|
+
entry: ReleaseNoteEntry;
|
|
469
|
+
/** The note's own page; the title links there. */
|
|
470
|
+
href?: string | null;
|
|
471
|
+
onNavigate?: (path: string) => void;
|
|
472
|
+
/** Passed to ReleaseNotePack (where a tip's app path opens). */
|
|
473
|
+
appOrigin?: string | null;
|
|
474
|
+
currentOrigin?: string | null;
|
|
475
|
+
/** Rendered inside the tenant's own app: a tip's app path stays a relative link. */
|
|
476
|
+
inHostApp?: boolean;
|
|
477
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
478
|
+
headingLevel?: Level | 4;
|
|
479
|
+
}
|
|
480
|
+
declare function ReleaseNoteCard({ entry, href, onNavigate, appOrigin, currentOrigin, inHostApp, renderInternalLink, headingLevel }: ReleaseNoteCardProps): react_jsx_runtime.JSX.Element;
|
|
481
|
+
interface MissingReleaseNotesProps {
|
|
482
|
+
pullRequests: readonly ReleaseViewPullRequest[];
|
|
483
|
+
/** Opens the host's way to write the note. Absent (a viewer who cannot submit): no Write the note. */
|
|
484
|
+
onWriteNote?: (pr: ReleaseViewPullRequest) => void;
|
|
485
|
+
/** Rows shown before "Show all". */
|
|
486
|
+
pageSize?: number;
|
|
487
|
+
}
|
|
488
|
+
declare function MissingReleaseNotes({ pullRequests, onWriteNote, pageSize }: MissingReleaseNotesProps): react_jsx_runtime.JSX.Element;
|
|
489
|
+
interface ReleaseViewProps {
|
|
490
|
+
facts: ReleaseViewFacts;
|
|
491
|
+
/** The release's notes (the team feed's entries for this release). */
|
|
492
|
+
entries: readonly ReleaseNoteEntry[];
|
|
493
|
+
/** Every pull request in the release, noted or not. */
|
|
494
|
+
pullRequests: readonly ReleaseViewPullRequest[];
|
|
495
|
+
/** Opens the host's way to write a missing note; absent hides Write the note. */
|
|
496
|
+
onWriteNote?: (pr: ReleaseViewPullRequest) => void;
|
|
497
|
+
/** A note's own page. */
|
|
498
|
+
noteHref?: (entry: ReleaseNoteEntry) => string | null;
|
|
499
|
+
onNavigate?: (path: string) => void;
|
|
500
|
+
appOrigin?: string | null;
|
|
501
|
+
currentOrigin?: string | null;
|
|
502
|
+
/** Rendered inside the tenant's own app (Supply Guard's admin Changelog): app paths stay relative. */
|
|
503
|
+
inHostApp?: boolean;
|
|
504
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
505
|
+
readinessHref?: string | null;
|
|
506
|
+
/** Shown above the version (e.g. the host's breadcrumb). */
|
|
507
|
+
top?: ReactNode;
|
|
508
|
+
headingLevel?: Level;
|
|
509
|
+
missingPageSize?: number;
|
|
510
|
+
className?: string;
|
|
511
|
+
}
|
|
512
|
+
declare function ReleaseView({ facts, entries, pullRequests, onWriteNote, noteHref, onNavigate, appOrigin, currentOrigin, inHostApp, renderInternalLink, readinessHref, top, headingLevel, missingPageSize, className, }: ReleaseViewProps): react_jsx_runtime.JSX.Element;
|
|
513
|
+
|
|
308
514
|
interface FindItLinkOptions {
|
|
309
515
|
/** The tenant's one production origin (https://host), or null when it has none or several. */
|
|
310
516
|
appOrigin?: string | null;
|
|
@@ -467,4 +673,4 @@ declare function useReleaseNoteAnnouncements({ feed, viewer }: UseReleaseNoteAnn
|
|
|
467
673
|
|
|
468
674
|
declare const RELEASE_NOTES_TOKENS: readonly ReleaseNotesToken[];
|
|
469
675
|
|
|
470
|
-
export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, RELEASE_NOTES_TOKENS, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
|
|
676
|
+
export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -151,6 +151,30 @@ interface ReleaseNoteFilter {
|
|
|
151
151
|
}
|
|
152
152
|
/** BOT-3169: `draft_on_your_branch` (local) and `in_this_preview` (preview) mark the viewer's own branch drafts. BOT-3167: `in_staging`. BOT-3168: `released`. BOT-3428: `rolled_back` (production moved back past the change). */
|
|
153
153
|
type ReleaseNoteDeliveryBadge = "not_bound" | "draft_on_branch" | "draft_on_pr" | "merged" | "draft_on_your_branch" | "in_this_preview" | "in_staging" | "released" | "rolled_back";
|
|
154
|
+
/** BOT-3635: the "Try it" part of a pack: where to find the change (an app path or https URL, plus its screen name), what to do, and what to look for. */
|
|
155
|
+
interface ReleaseNotePackTour {
|
|
156
|
+
find_it: string;
|
|
157
|
+
/** BOT-3638: the screen's name, shown as the link text. */
|
|
158
|
+
where: string | null;
|
|
159
|
+
try: ReleaseNoteBlock[] | null;
|
|
160
|
+
look_for: ReleaseNoteBlock[] | null;
|
|
161
|
+
watch: ReleaseNoteBlock[] | null;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* BOT-3635: a note's pack as the CEO reads it (the team's feed only; never
|
|
165
|
+
* customers'). Written by the agent that made the change. Text fields are
|
|
166
|
+
* bbrn-md-1 syntax trees, like a body.
|
|
167
|
+
*/
|
|
168
|
+
interface ReleaseNotePackView {
|
|
169
|
+
/** Feature, Bug fix or Chore (bbrn-pack-1). A Chore shows only `after`. */
|
|
170
|
+
category: string;
|
|
171
|
+
before: ReleaseNoteBlock[] | null;
|
|
172
|
+
after: ReleaseNoteBlock[] | null;
|
|
173
|
+
benefit: ReleaseNoteBlock[] | null;
|
|
174
|
+
/** Where it shows in the product; null when the change has no UI. */
|
|
175
|
+
ui: ReleaseNoteBlock[] | null;
|
|
176
|
+
tour: ReleaseNotePackTour | null;
|
|
177
|
+
}
|
|
154
178
|
interface ReleaseNoteEntry {
|
|
155
179
|
id: string;
|
|
156
180
|
source_key: string;
|
|
@@ -176,6 +200,8 @@ interface ReleaseNoteEntry {
|
|
|
176
200
|
version?: string | null;
|
|
177
201
|
/** BOT-3168: when that release went live (UTC ISO), else null. Absent from older servers. */
|
|
178
202
|
released_at?: string | null;
|
|
203
|
+
/** BOT-3635: the note's pack as the CEO reads it, else null. Absent from older servers. */
|
|
204
|
+
pack?: ReleaseNotePackView | null;
|
|
179
205
|
created_at: string;
|
|
180
206
|
updated_at: string;
|
|
181
207
|
}
|
|
@@ -235,11 +261,13 @@ interface ReleaseNotesFeedFilters {
|
|
|
235
261
|
}
|
|
236
262
|
type ReleaseNotesFeed =
|
|
237
263
|
/** BOT-3428: `notice` is "No production release recorded since <date>" when production records stopped, else null or absent. */
|
|
264
|
+
/** BOT-3635: `app_origin` is the tenant's one production origin (a signed-in member's feed only), where a pack tip's app path opens. */
|
|
238
265
|
({
|
|
239
266
|
tenant: string;
|
|
240
267
|
audience: "internal";
|
|
241
268
|
entries: ReleaseNoteEntry[];
|
|
242
269
|
notice?: string | null;
|
|
270
|
+
app_origin?: string | null;
|
|
243
271
|
} & ReleaseNotesFeedFilters)
|
|
244
272
|
/** BOT-3163: newest published first, 50 per page. */
|
|
245
273
|
/** BOT-3208: `announcements` is the tenant's setting (absent from older servers). */
|
|
@@ -261,7 +289,7 @@ type ReleaseNotesTheme = Partial<Record<ReleaseNotesToken, string>>;
|
|
|
261
289
|
type ReleaseNotesToken = "accent" | "fg" | "bg" | "muted" | "border" | "radius" | "font";
|
|
262
290
|
/** BOT-3159 depth 2: class names added (never replacing the `bbrn-*` class) to each part. */
|
|
263
291
|
type ReleaseNotesClassNames = Partial<Record<ReleaseNotesSlot, string>>;
|
|
264
|
-
type ReleaseNotesSlot = "root" | "entry" | "head" | "title" | "badge" | "delivery" | "meta" | "body" | "links" | "link" | "status" | "retry" | "tags" | "tag" | "filters" | "filter" | "pager";
|
|
292
|
+
type ReleaseNotesSlot = "root" | "entry" | "head" | "title" | "badge" | "delivery" | "meta" | "body" | "links" | "link" | "status" | "retry" | "tags" | "tag" | "filters" | "filter" | "pager" | "pack";
|
|
265
293
|
/** Props the `components.Link` override receives. `className` already holds the link slot. */
|
|
266
294
|
interface ReleaseNoteLinkProps {
|
|
267
295
|
href: string;
|
|
@@ -305,6 +333,184 @@ declare function ReleaseNoteBody({ ast }: {
|
|
|
305
333
|
}): react_jsx_runtime.JSX.Element;
|
|
306
334
|
declare function ReleaseNotes({ endpoint, getToken, onNavigate, theme, classNames, components, timeoutMs }: ReleaseNotesProps): react_jsx_runtime.JSX.Element;
|
|
307
335
|
|
|
336
|
+
interface ReleaseNotePackProps {
|
|
337
|
+
pack: ReleaseNotePackView;
|
|
338
|
+
/** The tenant's one production origin, where an app path opens (BotBuddy's pages). */
|
|
339
|
+
appOrigin?: string | null;
|
|
340
|
+
/** The origin of this page; an app path on the same origin opens in place. */
|
|
341
|
+
currentOrigin?: string | null;
|
|
342
|
+
/** Rendered inside the tenant's own app (the embed): an app path is a relative link. */
|
|
343
|
+
inHostApp?: boolean;
|
|
344
|
+
/** Called with an app path instead of a full page load. */
|
|
345
|
+
onNavigate?: (path: string) => void;
|
|
346
|
+
/** Renders an in-place app link (e.g. the host's router Link). Defaults to an anchor routed through `onNavigate`. */
|
|
347
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
348
|
+
/** Shown under a tip that is not a link (an app path with no app origin). */
|
|
349
|
+
unresolvedHint?: ReactNode;
|
|
350
|
+
/** The section heading level; 3 under a note title (h2), 2 on a note's own page. */
|
|
351
|
+
headingLevel?: 2 | 3 | 4;
|
|
352
|
+
className?: string;
|
|
353
|
+
}
|
|
354
|
+
declare function ReleaseNotePack({ pack, appOrigin, currentOrigin, inHostApp, onNavigate, renderInternalLink, unresolvedHint, headingLevel, className }: ReleaseNotePackProps): react_jsx_runtime.JSX.Element;
|
|
355
|
+
|
|
356
|
+
/** What the page says about the release itself (the team feed's `release`). */
|
|
357
|
+
interface ReleaseViewFacts {
|
|
358
|
+
repository: string;
|
|
359
|
+
environment: string;
|
|
360
|
+
version: string;
|
|
361
|
+
/** A production candidate: a commit not yet released. */
|
|
362
|
+
candidate: boolean;
|
|
363
|
+
commit_sha: string;
|
|
364
|
+
previous_version: string;
|
|
365
|
+
/** When it went live (UTC ISO); null or absent for a candidate. */
|
|
366
|
+
live_at?: string | null;
|
|
367
|
+
/** The workflow run that deployed it; null or absent when none is recorded. */
|
|
368
|
+
run_id?: string | null;
|
|
369
|
+
}
|
|
370
|
+
/** One pull request in the release, noted or not (the digest's list). */
|
|
371
|
+
interface ReleaseViewPullRequest {
|
|
372
|
+
pr: {
|
|
373
|
+
number: number;
|
|
374
|
+
title: string;
|
|
375
|
+
url: string | null;
|
|
376
|
+
};
|
|
377
|
+
has_note: boolean;
|
|
378
|
+
source_key: string | null;
|
|
379
|
+
tickets: Array<{
|
|
380
|
+
key: string;
|
|
381
|
+
title: string | null;
|
|
382
|
+
url: string | null;
|
|
383
|
+
}>;
|
|
384
|
+
project: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string | null;
|
|
387
|
+
percent_complete: number | null;
|
|
388
|
+
url: string | null;
|
|
389
|
+
} | null;
|
|
390
|
+
author: {
|
|
391
|
+
label: string;
|
|
392
|
+
} | null;
|
|
393
|
+
}
|
|
394
|
+
interface ReleaseViewSections {
|
|
395
|
+
/** Notes customers will read (external wording), in feed order. */
|
|
396
|
+
customer: ReleaseNoteEntry[];
|
|
397
|
+
/** Notes only the team reads. */
|
|
398
|
+
internal: ReleaseNoteEntry[];
|
|
399
|
+
/** Pull requests with no release note, in merge order. */
|
|
400
|
+
missing: ReleaseViewPullRequest[];
|
|
401
|
+
}
|
|
402
|
+
declare const RELEASE_SECTION_TITLES: {
|
|
403
|
+
readonly customer: "Customer-facing";
|
|
404
|
+
readonly internal: "Internal";
|
|
405
|
+
readonly missing: "Missing a release note";
|
|
406
|
+
};
|
|
407
|
+
declare const NOTHING_CUSTOMER_FACING = "Nothing customer-facing in this release.";
|
|
408
|
+
declare const RELEASE_RANGE_UNAVAILABLE = "BotBuddy could not read this release's range from GitHub.";
|
|
409
|
+
/** True when customers read the note: the feed's `audience`, else its `customer_facing` flag. */
|
|
410
|
+
declare function isCustomerFacing(entry: ReleaseNoteEntry): boolean;
|
|
411
|
+
declare function releaseSections(entries: readonly ReleaseNoteEntry[], pullRequests: readonly ReleaseViewPullRequest[]): ReleaseViewSections;
|
|
412
|
+
/**
|
|
413
|
+
* The header's one summary line. Pull requests with no note at all read as one
|
|
414
|
+
* sentence, never "No release notes" above a list of them.
|
|
415
|
+
*/
|
|
416
|
+
declare function releaseSummary(s: {
|
|
417
|
+
pullRequests: number;
|
|
418
|
+
notes: number;
|
|
419
|
+
missing: number;
|
|
420
|
+
previousVersion: string;
|
|
421
|
+
}): string;
|
|
422
|
+
/** "1 Dec 2026, 15:25 UTC", or null for a value that is not a time. */
|
|
423
|
+
declare function releaseTime(iso: string | null | undefined): string | null;
|
|
424
|
+
/** "Deployed to staging · 1 Dec 2026, 15:25 UTC", or what a candidate is. */
|
|
425
|
+
declare function releaseDeployedLine(f: ReleaseViewFacts): string;
|
|
426
|
+
/** The commit's GitHub page, or null when the repository is not owner/name. */
|
|
427
|
+
declare function releaseCommitUrl(f: ReleaseViewFacts): string | null;
|
|
428
|
+
/** The deploying workflow run's GitHub page, or null. */
|
|
429
|
+
declare function releaseRunUrl(f: ReleaseViewFacts): string | null;
|
|
430
|
+
/**
|
|
431
|
+
* The note.json a missing pull request's note starts from: its key (the first
|
|
432
|
+
* ticket, else `<owner/repo>#<n>`, so the same number in two repositories never
|
|
433
|
+
* shares a note), the pull request it binds to (`change`), and the
|
|
434
|
+
* pull request's subject as a title the agent rewrites. Binding by `change`
|
|
435
|
+
* names the right pull request whatever branch the agent submits from.
|
|
436
|
+
*/
|
|
437
|
+
declare function missingNoteDraft(pr: ReleaseViewPullRequest, repository: string): string;
|
|
438
|
+
|
|
439
|
+
type Level = 1 | 2 | 3;
|
|
440
|
+
interface ReleaseHeaderProps {
|
|
441
|
+
facts: ReleaseViewFacts;
|
|
442
|
+
/** The summary line (releaseSummary). */
|
|
443
|
+
summary: string;
|
|
444
|
+
/** The version's heading level; 1 on a page of its own. */
|
|
445
|
+
headingLevel?: Level;
|
|
446
|
+
}
|
|
447
|
+
declare function ReleaseHeader({ facts, summary, headingLevel }: ReleaseHeaderProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
interface ReleaseFactsProps {
|
|
449
|
+
facts: ReleaseViewFacts;
|
|
450
|
+
/** The release's readiness page, when the host has one. */
|
|
451
|
+
readinessHref?: string | null;
|
|
452
|
+
onNavigate?: (path: string) => void;
|
|
453
|
+
headingLevel?: Level | 4;
|
|
454
|
+
}
|
|
455
|
+
declare function ReleaseFacts({ facts, readinessHref, onNavigate, headingLevel }: ReleaseFactsProps): react_jsx_runtime.JSX.Element;
|
|
456
|
+
interface ReleaseSectionProps {
|
|
457
|
+
title: string;
|
|
458
|
+
count: number;
|
|
459
|
+
/** Folded by default (a disclosure the reader opens). */
|
|
460
|
+
folded?: boolean;
|
|
461
|
+
/** Shown instead of the children when the count is 0. */
|
|
462
|
+
empty?: ReactNode;
|
|
463
|
+
headingLevel?: Level | 4;
|
|
464
|
+
children?: ReactNode;
|
|
465
|
+
}
|
|
466
|
+
declare function ReleaseSection({ title, count, folded, empty, headingLevel, children }: ReleaseSectionProps): react_jsx_runtime.JSX.Element;
|
|
467
|
+
interface ReleaseNoteCardProps {
|
|
468
|
+
entry: ReleaseNoteEntry;
|
|
469
|
+
/** The note's own page; the title links there. */
|
|
470
|
+
href?: string | null;
|
|
471
|
+
onNavigate?: (path: string) => void;
|
|
472
|
+
/** Passed to ReleaseNotePack (where a tip's app path opens). */
|
|
473
|
+
appOrigin?: string | null;
|
|
474
|
+
currentOrigin?: string | null;
|
|
475
|
+
/** Rendered inside the tenant's own app: a tip's app path stays a relative link. */
|
|
476
|
+
inHostApp?: boolean;
|
|
477
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
478
|
+
headingLevel?: Level | 4;
|
|
479
|
+
}
|
|
480
|
+
declare function ReleaseNoteCard({ entry, href, onNavigate, appOrigin, currentOrigin, inHostApp, renderInternalLink, headingLevel }: ReleaseNoteCardProps): react_jsx_runtime.JSX.Element;
|
|
481
|
+
interface MissingReleaseNotesProps {
|
|
482
|
+
pullRequests: readonly ReleaseViewPullRequest[];
|
|
483
|
+
/** Opens the host's way to write the note. Absent (a viewer who cannot submit): no Write the note. */
|
|
484
|
+
onWriteNote?: (pr: ReleaseViewPullRequest) => void;
|
|
485
|
+
/** Rows shown before "Show all". */
|
|
486
|
+
pageSize?: number;
|
|
487
|
+
}
|
|
488
|
+
declare function MissingReleaseNotes({ pullRequests, onWriteNote, pageSize }: MissingReleaseNotesProps): react_jsx_runtime.JSX.Element;
|
|
489
|
+
interface ReleaseViewProps {
|
|
490
|
+
facts: ReleaseViewFacts;
|
|
491
|
+
/** The release's notes (the team feed's entries for this release). */
|
|
492
|
+
entries: readonly ReleaseNoteEntry[];
|
|
493
|
+
/** Every pull request in the release, noted or not. */
|
|
494
|
+
pullRequests: readonly ReleaseViewPullRequest[];
|
|
495
|
+
/** Opens the host's way to write a missing note; absent hides Write the note. */
|
|
496
|
+
onWriteNote?: (pr: ReleaseViewPullRequest) => void;
|
|
497
|
+
/** A note's own page. */
|
|
498
|
+
noteHref?: (entry: ReleaseNoteEntry) => string | null;
|
|
499
|
+
onNavigate?: (path: string) => void;
|
|
500
|
+
appOrigin?: string | null;
|
|
501
|
+
currentOrigin?: string | null;
|
|
502
|
+
/** Rendered inside the tenant's own app (Supply Guard's admin Changelog): app paths stay relative. */
|
|
503
|
+
inHostApp?: boolean;
|
|
504
|
+
renderInternalLink?: (href: string, text: string) => ReactNode;
|
|
505
|
+
readinessHref?: string | null;
|
|
506
|
+
/** Shown above the version (e.g. the host's breadcrumb). */
|
|
507
|
+
top?: ReactNode;
|
|
508
|
+
headingLevel?: Level;
|
|
509
|
+
missingPageSize?: number;
|
|
510
|
+
className?: string;
|
|
511
|
+
}
|
|
512
|
+
declare function ReleaseView({ facts, entries, pullRequests, onWriteNote, noteHref, onNavigate, appOrigin, currentOrigin, inHostApp, renderInternalLink, readinessHref, top, headingLevel, missingPageSize, className, }: ReleaseViewProps): react_jsx_runtime.JSX.Element;
|
|
513
|
+
|
|
308
514
|
interface FindItLinkOptions {
|
|
309
515
|
/** The tenant's one production origin (https://host), or null when it has none or several. */
|
|
310
516
|
appOrigin?: string | null;
|
|
@@ -467,4 +673,4 @@ declare function useReleaseNoteAnnouncements({ feed, viewer }: UseReleaseNoteAnn
|
|
|
467
673
|
|
|
468
674
|
declare const RELEASE_NOTES_TOKENS: readonly ReleaseNotesToken[];
|
|
469
675
|
|
|
470
|
-
export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, RELEASE_NOTES_TOKENS, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
|
|
676
|
+
export { type BotBuddyConfig, type FindItLink, type FindItLinkOptions, MissingReleaseNotes, type MissingReleaseNotesProps, NOTHING_CUSTOMER_FACING, RELEASE_NOTES_TOKENS, RELEASE_RANGE_UNAVAILABLE, RELEASE_SECTION_TITLES, ReleaseFacts, type ReleaseFactsProps, ReleaseHeader, type ReleaseHeaderProps, type ReleaseNoteAnnouncement, type ReleaseNoteAnnouncementEntry, type ReleaseNoteAnnouncementMode, type ReleaseNoteAnnouncementsFeed, type ReleaseNoteBlock, ReleaseNoteBody, type ReleaseNoteBody$1 as ReleaseNoteBodyData, ReleaseNoteCard, type ReleaseNoteCardProps, type ReleaseNoteEntry, type ReleaseNoteExternalEntry, type ReleaseNoteFilter, type ReleaseNoteInline, type ReleaseNoteLink, type ReleaseNoteLinkProps, ReleaseNotePack, type ReleaseNotePackProps, type ReleaseNotePackTour, type ReleaseNotePackView, type ReleaseNoteTag, ReleaseNotes, ReleaseNotesAnnouncement, type ReleaseNotesAnnouncementProps, ReleaseNotesBadge, type ReleaseNotesBadgeProps, type ReleaseNotesClassNames, type ReleaseNotesComponents, type ReleaseNotesFeed, type ReleaseNotesProps, type ReleaseNotesSlot, type ReleaseNotesTheme, type ReleaseNotesToken, ReleaseSection, type ReleaseSectionProps, ReleaseView, type ReleaseViewFacts, type ReleaseViewProps, type ReleaseViewPullRequest, type ReleaseViewSections, type TestCase, type TestRun, type TestRunSummary, TestRunWidget, type TestRunWidgetProps, type UseReleaseNoteAnnouncementsOptions, type UseReleaseNoteAnnouncementsState, type UseReleaseNotesOptions, type UseReleaseNotesState, type Verdict, type WidgetMode, type WidgetState, findItLink, isCustomerFacing, missingNoteDraft, releaseCommitUrl, releaseDeployedLine, releaseRunUrl, releaseSections, releaseSummary, releaseTime, safeHref, useDraggable, useRealtimeRefresh, useReleaseNoteAnnouncements, useReleaseNotes, useTestRun, useWidgetAuth };
|