@meetreeve/ui 0.9.0 → 0.10.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/dist/console/index.d.mts +65 -0
- package/dist/console/index.d.ts +65 -0
- package/dist/console/index.js +3528 -0
- package/dist/console/index.mjs +3490 -0
- package/dist/index.d.mts +95 -1
- package/dist/index.d.ts +95 -1
- package/dist/index.js +436 -11
- package/dist/index.mjs +436 -11
- package/package.json +10 -1
package/dist/index.d.mts
CHANGED
|
@@ -641,6 +641,73 @@ interface ConnectorGrantInput {
|
|
|
641
641
|
granteeType: ConnectorGranteeType;
|
|
642
642
|
granteeId: string;
|
|
643
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* One credential input on the paste path (DEV-7849 / G1). Data-driven per
|
|
646
|
+
* provider exactly like the legacy cockpit modal's `fieldDefs` prop, which
|
|
647
|
+
* this shape is lifted from (src/components/connectors/dual-auth-modal.tsx)
|
|
648
|
+
* — the package renders `label`/`placeholder` generically and never knows
|
|
649
|
+
* which provider it is rendering.
|
|
650
|
+
*/
|
|
651
|
+
interface ConnectorCredentialField {
|
|
652
|
+
key: string;
|
|
653
|
+
label: string;
|
|
654
|
+
placeholder?: string | null;
|
|
655
|
+
/** Input type; "password" masks the value. Defaults to "text". */
|
|
656
|
+
type?: "text" | "password" | "url";
|
|
657
|
+
/** Only an explicit `false` makes a field optional. */
|
|
658
|
+
required?: boolean;
|
|
659
|
+
/** Prefilled value the form starts from (e.g. PostHog's default host);
|
|
660
|
+
* submitted as-is when the customer doesn't change it. */
|
|
661
|
+
defaultValue?: string | null;
|
|
662
|
+
}
|
|
663
|
+
/** One numbered step of a setup guide; `copyable` is a literal to paste. */
|
|
664
|
+
interface ConnectorGuideStep {
|
|
665
|
+
text: string;
|
|
666
|
+
copyable?: string | null;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* A fully-rendered setup guide as the server returns it (SG-1). The backend
|
|
670
|
+
* refuses to render a guide it cannot fully ground, so this is never a
|
|
671
|
+
* partially interpolated guide — see `hasUngroundedPlaceholder` for what
|
|
672
|
+
* happens if one ever arrives anyway.
|
|
673
|
+
*/
|
|
674
|
+
interface ConnectorSetupGuide {
|
|
675
|
+
prerequisites: string[];
|
|
676
|
+
steps: ConnectorGuideStep[];
|
|
677
|
+
verify: string;
|
|
678
|
+
scope_note: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* The result of testing a credential WITHOUT storing it (DEV-7852 / G4).
|
|
682
|
+
*
|
|
683
|
+
* `valid` is deliberately tri-state and mirrors the server's own semantics
|
|
684
|
+
* (`TestCredentialsResponse`): true/false for a provider with a live
|
|
685
|
+
* verifier, null for one that has none. null is NOT a pass — the UI says so
|
|
686
|
+
* in words rather than showing a green check it cannot justify.
|
|
687
|
+
*/
|
|
688
|
+
interface ConnectorCredentialTestResult {
|
|
689
|
+
valid: boolean | null;
|
|
690
|
+
/** The account the verifier resolved, shown on success. */
|
|
691
|
+
account_name?: string | null;
|
|
692
|
+
/**
|
|
693
|
+
* Why the test failed. Already redacted server-side (the repo's
|
|
694
|
+
* no-raw-error-passthrough invariant) — the picker renders it verbatim and
|
|
695
|
+
* never composes its own message out of an upstream envelope.
|
|
696
|
+
*/
|
|
697
|
+
error?: string | null;
|
|
698
|
+
/**
|
|
699
|
+
* Failure reasons keyed by credential field key. For a multi-field
|
|
700
|
+
* credential bundle a bare "invalid credentials" is close to useless, so
|
|
701
|
+
* anything that can be attributed to one field is rendered on that field.
|
|
702
|
+
*/
|
|
703
|
+
field_errors?: Record<string, string> | null;
|
|
704
|
+
/**
|
|
705
|
+
* What the stored credential would actually be able to do, as read back
|
|
706
|
+
* from the verifier — e.g. "reporting only, this token cannot publish".
|
|
707
|
+
* Absent when the verifier reports no permission set.
|
|
708
|
+
*/
|
|
709
|
+
permissions_note?: string | null;
|
|
710
|
+
}
|
|
644
711
|
interface ConnectableEntry {
|
|
645
712
|
slug: string;
|
|
646
713
|
name: string;
|
|
@@ -676,6 +743,18 @@ interface ConnectableEntry {
|
|
|
676
743
|
deprecated: boolean;
|
|
677
744
|
/** Org-connect permission + role options for this entry (CD-4). */
|
|
678
745
|
org_connect?: OrgConnectPolicy | null;
|
|
746
|
+
/**
|
|
747
|
+
* Fully-rendered setup guide for this entry, or null/absent when the
|
|
748
|
+
* server has none for it (DEV-7849 / G1). Absent is the NORMAL state
|
|
749
|
+
* while the guide registry fills in (G2/G3), never an error.
|
|
750
|
+
*/
|
|
751
|
+
guide?: ConnectorSetupGuide | null;
|
|
752
|
+
/**
|
|
753
|
+
* Credential fields for the bring-your-own-credential path (DEV-7849).
|
|
754
|
+
* Absent or empty = this entry has no paste path and only the OAuth
|
|
755
|
+
* connect button renders, exactly as before.
|
|
756
|
+
*/
|
|
757
|
+
credential_fields?: ConnectorCredentialField[] | null;
|
|
679
758
|
}
|
|
680
759
|
interface ConnectorPickerClient {
|
|
681
760
|
listConnectable(opts: {
|
|
@@ -700,6 +779,21 @@ interface ConnectorPickerClient {
|
|
|
700
779
|
listGrants?(entry: ConnectableEntry): Promise<ConnectorGrant[]>;
|
|
701
780
|
grant?(entry: ConnectableEntry, input: ConnectorGrantInput): Promise<void>;
|
|
702
781
|
revokeGrant?(entry: ConnectableEntry, grantId: string): Promise<void>;
|
|
782
|
+
/**
|
|
783
|
+
* Store a pasted credential (DEV-7849 / G1). Optional, same posture as the
|
|
784
|
+
* grant methods: the credential form renders only when the injected client
|
|
785
|
+
* provides this, so a pre-G1 client keeps working unchanged. Rejecting
|
|
786
|
+
* with an Error surfaces that message on the form.
|
|
787
|
+
*/
|
|
788
|
+
submitCredentials?(entry: ConnectableEntry, values: Record<string, string>, opts?: {
|
|
789
|
+
kind: ConnectionKind;
|
|
790
|
+
}): Promise<void>;
|
|
791
|
+
/**
|
|
792
|
+
* Validate a credential without storing it (DEV-7852 / G4). Optional for
|
|
793
|
+
* the same reason `submitCredentials` is: a client that cannot test simply
|
|
794
|
+
* gets the G1 form with no Test action and no test gate.
|
|
795
|
+
*/
|
|
796
|
+
testCredentials?(entry: ConnectableEntry, values: Record<string, string>): Promise<ConnectorCredentialTestResult>;
|
|
703
797
|
}
|
|
704
798
|
/**
|
|
705
799
|
* Structurally identical to the app's own `DnaLens` (src/lib/dna-lens.ts) —
|
|
@@ -724,4 +818,4 @@ interface ConnectorPickerProps {
|
|
|
724
818
|
}
|
|
725
819
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
726
820
|
|
|
727
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
821
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
package/dist/index.d.ts
CHANGED
|
@@ -641,6 +641,73 @@ interface ConnectorGrantInput {
|
|
|
641
641
|
granteeType: ConnectorGranteeType;
|
|
642
642
|
granteeId: string;
|
|
643
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* One credential input on the paste path (DEV-7849 / G1). Data-driven per
|
|
646
|
+
* provider exactly like the legacy cockpit modal's `fieldDefs` prop, which
|
|
647
|
+
* this shape is lifted from (src/components/connectors/dual-auth-modal.tsx)
|
|
648
|
+
* — the package renders `label`/`placeholder` generically and never knows
|
|
649
|
+
* which provider it is rendering.
|
|
650
|
+
*/
|
|
651
|
+
interface ConnectorCredentialField {
|
|
652
|
+
key: string;
|
|
653
|
+
label: string;
|
|
654
|
+
placeholder?: string | null;
|
|
655
|
+
/** Input type; "password" masks the value. Defaults to "text". */
|
|
656
|
+
type?: "text" | "password" | "url";
|
|
657
|
+
/** Only an explicit `false` makes a field optional. */
|
|
658
|
+
required?: boolean;
|
|
659
|
+
/** Prefilled value the form starts from (e.g. PostHog's default host);
|
|
660
|
+
* submitted as-is when the customer doesn't change it. */
|
|
661
|
+
defaultValue?: string | null;
|
|
662
|
+
}
|
|
663
|
+
/** One numbered step of a setup guide; `copyable` is a literal to paste. */
|
|
664
|
+
interface ConnectorGuideStep {
|
|
665
|
+
text: string;
|
|
666
|
+
copyable?: string | null;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* A fully-rendered setup guide as the server returns it (SG-1). The backend
|
|
670
|
+
* refuses to render a guide it cannot fully ground, so this is never a
|
|
671
|
+
* partially interpolated guide — see `hasUngroundedPlaceholder` for what
|
|
672
|
+
* happens if one ever arrives anyway.
|
|
673
|
+
*/
|
|
674
|
+
interface ConnectorSetupGuide {
|
|
675
|
+
prerequisites: string[];
|
|
676
|
+
steps: ConnectorGuideStep[];
|
|
677
|
+
verify: string;
|
|
678
|
+
scope_note: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* The result of testing a credential WITHOUT storing it (DEV-7852 / G4).
|
|
682
|
+
*
|
|
683
|
+
* `valid` is deliberately tri-state and mirrors the server's own semantics
|
|
684
|
+
* (`TestCredentialsResponse`): true/false for a provider with a live
|
|
685
|
+
* verifier, null for one that has none. null is NOT a pass — the UI says so
|
|
686
|
+
* in words rather than showing a green check it cannot justify.
|
|
687
|
+
*/
|
|
688
|
+
interface ConnectorCredentialTestResult {
|
|
689
|
+
valid: boolean | null;
|
|
690
|
+
/** The account the verifier resolved, shown on success. */
|
|
691
|
+
account_name?: string | null;
|
|
692
|
+
/**
|
|
693
|
+
* Why the test failed. Already redacted server-side (the repo's
|
|
694
|
+
* no-raw-error-passthrough invariant) — the picker renders it verbatim and
|
|
695
|
+
* never composes its own message out of an upstream envelope.
|
|
696
|
+
*/
|
|
697
|
+
error?: string | null;
|
|
698
|
+
/**
|
|
699
|
+
* Failure reasons keyed by credential field key. For a multi-field
|
|
700
|
+
* credential bundle a bare "invalid credentials" is close to useless, so
|
|
701
|
+
* anything that can be attributed to one field is rendered on that field.
|
|
702
|
+
*/
|
|
703
|
+
field_errors?: Record<string, string> | null;
|
|
704
|
+
/**
|
|
705
|
+
* What the stored credential would actually be able to do, as read back
|
|
706
|
+
* from the verifier — e.g. "reporting only, this token cannot publish".
|
|
707
|
+
* Absent when the verifier reports no permission set.
|
|
708
|
+
*/
|
|
709
|
+
permissions_note?: string | null;
|
|
710
|
+
}
|
|
644
711
|
interface ConnectableEntry {
|
|
645
712
|
slug: string;
|
|
646
713
|
name: string;
|
|
@@ -676,6 +743,18 @@ interface ConnectableEntry {
|
|
|
676
743
|
deprecated: boolean;
|
|
677
744
|
/** Org-connect permission + role options for this entry (CD-4). */
|
|
678
745
|
org_connect?: OrgConnectPolicy | null;
|
|
746
|
+
/**
|
|
747
|
+
* Fully-rendered setup guide for this entry, or null/absent when the
|
|
748
|
+
* server has none for it (DEV-7849 / G1). Absent is the NORMAL state
|
|
749
|
+
* while the guide registry fills in (G2/G3), never an error.
|
|
750
|
+
*/
|
|
751
|
+
guide?: ConnectorSetupGuide | null;
|
|
752
|
+
/**
|
|
753
|
+
* Credential fields for the bring-your-own-credential path (DEV-7849).
|
|
754
|
+
* Absent or empty = this entry has no paste path and only the OAuth
|
|
755
|
+
* connect button renders, exactly as before.
|
|
756
|
+
*/
|
|
757
|
+
credential_fields?: ConnectorCredentialField[] | null;
|
|
679
758
|
}
|
|
680
759
|
interface ConnectorPickerClient {
|
|
681
760
|
listConnectable(opts: {
|
|
@@ -700,6 +779,21 @@ interface ConnectorPickerClient {
|
|
|
700
779
|
listGrants?(entry: ConnectableEntry): Promise<ConnectorGrant[]>;
|
|
701
780
|
grant?(entry: ConnectableEntry, input: ConnectorGrantInput): Promise<void>;
|
|
702
781
|
revokeGrant?(entry: ConnectableEntry, grantId: string): Promise<void>;
|
|
782
|
+
/**
|
|
783
|
+
* Store a pasted credential (DEV-7849 / G1). Optional, same posture as the
|
|
784
|
+
* grant methods: the credential form renders only when the injected client
|
|
785
|
+
* provides this, so a pre-G1 client keeps working unchanged. Rejecting
|
|
786
|
+
* with an Error surfaces that message on the form.
|
|
787
|
+
*/
|
|
788
|
+
submitCredentials?(entry: ConnectableEntry, values: Record<string, string>, opts?: {
|
|
789
|
+
kind: ConnectionKind;
|
|
790
|
+
}): Promise<void>;
|
|
791
|
+
/**
|
|
792
|
+
* Validate a credential without storing it (DEV-7852 / G4). Optional for
|
|
793
|
+
* the same reason `submitCredentials` is: a client that cannot test simply
|
|
794
|
+
* gets the G1 form with no Test action and no test gate.
|
|
795
|
+
*/
|
|
796
|
+
testCredentials?(entry: ConnectableEntry, values: Record<string, string>): Promise<ConnectorCredentialTestResult>;
|
|
703
797
|
}
|
|
704
798
|
/**
|
|
705
799
|
* Structurally identical to the app's own `DnaLens` (src/lib/dna-lens.ts) —
|
|
@@ -724,4 +818,4 @@ interface ConnectorPickerProps {
|
|
|
724
818
|
}
|
|
725
819
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
726
820
|
|
|
727
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
821
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|