@stackable-labs/embeddables 2.22.0 → 2.23.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.
@@ -14,9 +14,10 @@ interface WidgetAppProps {
14
14
  colors?: WidgetColors;
15
15
  instanceId: string;
16
16
  customerId?: string;
17
- customerEmail?: string;
18
17
  customerName?: string;
18
+ customerEmail?: string;
19
+ customerProvider?: string;
19
20
  snippetKey: string;
20
21
  }
21
- export declare const WidgetApp: ({ queryApiBase, apiBase, appId, theme, icon, iconUrl, position, offsetX, offsetY, colors, instanceId, customerId, customerEmail, customerName, snippetKey, }: WidgetAppProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const WidgetApp: ({ queryApiBase, apiBase, appId, theme, icon, iconUrl, position, offsetX, offsetY, colors, snippetKey, instanceId, customerId, customerName, customerEmail, customerProvider, }: WidgetAppProps) => import("react/jsx-runtime").JSX.Element;
22
23
  export {};
@@ -12,8 +12,9 @@ export interface ExtensionSetupProps {
12
12
  appId?: string;
13
13
  instanceId?: string;
14
14
  customerId?: string;
15
- customerEmail?: string;
16
15
  customerName?: string;
16
+ customerEmail?: string;
17
+ customerProvider?: string;
17
18
  children: React.ReactNode;
18
19
  }
19
- export declare const ExtensionSetup: ({ instanceId, queryApiBase, apiBase, appId, children, customerId, customerEmail, customerName, }: ExtensionSetupProps) => import("react/jsx-runtime").JSX.Element | null;
20
+ export declare const ExtensionSetup: ({ instanceId, queryApiBase, apiBase, appId, children, customerId, customerName, customerEmail, customerProvider, }: ExtensionSetupProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Host-side identity-claim filtering.
3
+ *
4
+ * When an extension's useExtendIdentity handler returns claims, the host
5
+ * filters the result per-extension against `manifest.identityClaims` before
6
+ * merging into `identityState.user.metadata` and forwarding to the JWT
7
+ * signing endpoint as `custom_claims`.
8
+ *
9
+ * Standard JWT claims (external_id, email, name) are exempt — they're part
10
+ * of the documented signing contract and may be overridden by any extension
11
+ * with `identity:extend` permission without explicit declaration.
12
+ *
13
+ * Undeclared custom keys are dropped with a console.warn so extension authors
14
+ * see the signal during local development and Studio preview.
15
+ */
16
+ import { STANDARD_IDENTITY_CLAIM_KEYS } from '@stackable-labs/sdk-extension-contracts';
17
+ /** Re-export so existing test imports from this module keep working. */
18
+ export { STANDARD_IDENTITY_CLAIM_KEYS };
19
+ /**
20
+ * Filter raw claims returned from a useExtendIdentity handler against the
21
+ * extension's manifest.identityClaims declaration.
22
+ *
23
+ * - Standard JWT claims (external_id, email, name) always allowed
24
+ * - Custom keys must be in `declared`
25
+ * - Undeclared keys dropped with a console.warn referencing the extension id
26
+ */
27
+ export declare const filterByDeclaration: (raw: Record<string, unknown>, declared: Set<string>, extensionId: string) => Record<string, unknown>;