@40rty/ams-sdk 0.5.11 → 0.5.12
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/index.js +630 -599
- package/dist/types/sdk/src/host/host-modules.d.ts +24 -0
- package/dist/types/sdk/src/shell/bot-check-notice.d.ts +9 -0
- package/dist/types/sdk/src/shell/index.d.ts +1 -0
- package/dist/types/spacestation/src/index.d.ts +1 -0
- package/dist/types/spacestation/src/shell/bot-check-notice.d.ts +34 -0
- package/dist/types/spacestation/src/space/space-config.d.ts +4 -0
- package/package.json +1 -1
|
@@ -72,6 +72,30 @@ export declare const HOST_MODULES: {
|
|
|
72
72
|
useShellRoot: typeof sdk.useShellRoot;
|
|
73
73
|
DockPersistenceProvider: typeof sdk.DockPersistenceProvider;
|
|
74
74
|
useDockPersistence: typeof sdk.useDockPersistence;
|
|
75
|
+
BotCheckNoticeProvider: typeof sdk.BotCheckNoticeProvider;
|
|
76
|
+
BotCheckNoticeSchema: zod.ZodObject<{
|
|
77
|
+
segments: zod.ZodArray<zod.ZodUnion<[zod.ZodString, zod.ZodObject<{
|
|
78
|
+
text: zod.ZodString;
|
|
79
|
+
href: zod.ZodString;
|
|
80
|
+
}, "strip", zod.ZodTypeAny, {
|
|
81
|
+
text: string;
|
|
82
|
+
href: string;
|
|
83
|
+
}, {
|
|
84
|
+
text: string;
|
|
85
|
+
href: string;
|
|
86
|
+
}>]>, "many">;
|
|
87
|
+
}, "strip", zod.ZodTypeAny, {
|
|
88
|
+
segments: (string | {
|
|
89
|
+
text: string;
|
|
90
|
+
href: string;
|
|
91
|
+
})[];
|
|
92
|
+
}, {
|
|
93
|
+
segments: (string | {
|
|
94
|
+
text: string;
|
|
95
|
+
href: string;
|
|
96
|
+
})[];
|
|
97
|
+
}>;
|
|
98
|
+
useBotCheckNotice: typeof sdk.useBotCheckNotice;
|
|
75
99
|
useDockState: typeof sdk.useDockState;
|
|
76
100
|
registerExclusiveOverlay: typeof sdk.registerExclusiveOverlay;
|
|
77
101
|
claimExclusiveOverlay: typeof sdk.claimExclusiveOverlay;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BotCheckNoticeSchema, type BotCheckNotice } from '../../../spacestation/src/index';
|
|
3
|
+
export { BotCheckNoticeSchema, type BotCheckNotice };
|
|
4
|
+
export declare function BotCheckNoticeProvider({ value, children, }: {
|
|
5
|
+
value: BotCheckNotice | null;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}): React.ReactElement;
|
|
8
|
+
/** The notice a brand footer renders, or `null` when this page runs no bot check. */
|
|
9
|
+
export declare function useBotCheckNotice(): BotCheckNotice | null;
|
|
@@ -2,6 +2,7 @@ export { ScrollContainerProvider, useScrollContainerRef, type ScrollContainerRef
|
|
|
2
2
|
export { ShellRegistryProvider, useShellRegistry, type ShellComponentProps, type ShellComponent, type ShellRegistry, } from './ShellRegistry';
|
|
3
3
|
export { ShellRootContext, useShellRoot } from './ShellRootContext';
|
|
4
4
|
export { DockPersistenceProvider, useDockPersistence, type DockPersistence, } from './dock-persistence';
|
|
5
|
+
export { BotCheckNoticeProvider, BotCheckNoticeSchema, useBotCheckNotice, type BotCheckNotice, } from './bot-check-notice';
|
|
5
6
|
export { useDockState, type ShellDockState } from './use-dock-state';
|
|
6
7
|
export { registerExclusiveOverlay, claimExclusiveOverlay, useExclusiveOverlay, } from './exclusive-overlay';
|
|
7
8
|
export { useComposerAttachments, ATTACHMENT_ACCEPT, type AttachmentStatus, type ComposerAttachmentsApi, type ComposerAttachment, } from './composer-attachments/use-composer-attachments';
|
|
@@ -53,6 +53,7 @@ export type { HostedApp, SpaceConfig, SpaceWithConfig, VisitorAccess } from './s
|
|
|
53
53
|
export type { ConnectorDescriptor, ConnectorFieldDescriptor } from './space/connector';
|
|
54
54
|
export { AgentDirectiveSchema, SpaceAgentDirectiveSchema, SpaceAgentDirectiveListItemSchema, UpdateAgentDirectiveInputSchema, ReorderAgentDirectivesInputSchema, AGENT_DIRECTIVE_KINDS, AGENT_DIRECTIVE_SEVERITIES, AGENT_DIRECTIVE_SOURCES, AGENT_DIRECTIVE_STATUSES, MAX_ACTIVE_AGENT_DIRECTIVES, } from './space/agent-directive';
|
|
55
55
|
export type { AgentDirective, SpaceAgentDirective, SpaceAgentDirectiveListItem, UpdateAgentDirectiveInput, } from './space/agent-directive';
|
|
56
|
+
export { BotCheckNoticeSchema, type BotCheckNotice } from './shell/bot-check-notice';
|
|
56
57
|
export { DEFAULT_SPACE_LOCALE, SpaceLocaleSchema, textDirectionOf, languageOf, languageNameOf, spaceLocaleOf, declaredSpaceLocaleOf, SUPPORTED_SPACE_LOCALES, } from './space/space-locale';
|
|
57
58
|
export type { TextDirection } from './space/space-locale';
|
|
58
59
|
export { DEFAULT_SPACE_CONFIG, DEFAULT_VISITOR_ACCESS, VISITOR_ACCESS, visitorAccessOf, } from './space/space-config';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The bot check's disclosure a spacefront shows — words and links the host
|
|
4
|
+
* supplies and a brand's footer renders (`useBotCheckNotice` in the sdk).
|
|
5
|
+
*
|
|
6
|
+
* The platform checks every spacefront visitor with an invisible bot check
|
|
7
|
+
* (reCAPTCHA Enterprise today). Its provider floats a badge over the page
|
|
8
|
+
* unless the page carries the provider's notice itself, and a brand's own
|
|
9
|
+
* chrome is the only place on the page that can carry it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BotCheckNoticeSchema: z.ZodObject<{
|
|
12
|
+
/** Read in order: plain text, and links the notice must keep linked. */
|
|
13
|
+
segments: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
14
|
+
text: z.ZodString;
|
|
15
|
+
href: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
text: string;
|
|
18
|
+
href: string;
|
|
19
|
+
}, {
|
|
20
|
+
text: string;
|
|
21
|
+
href: string;
|
|
22
|
+
}>]>, "many">;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
segments: (string | {
|
|
25
|
+
text: string;
|
|
26
|
+
href: string;
|
|
27
|
+
})[];
|
|
28
|
+
}, {
|
|
29
|
+
segments: (string | {
|
|
30
|
+
text: string;
|
|
31
|
+
href: string;
|
|
32
|
+
})[];
|
|
33
|
+
}>;
|
|
34
|
+
export type BotCheckNotice = z.infer<typeof BotCheckNoticeSchema>;
|
|
@@ -57,6 +57,10 @@ export interface SpaceConfig {
|
|
|
57
57
|
* every page it measures, so it is the other config key besides
|
|
58
58
|
* `componentSources` the public projection may carry. */
|
|
59
59
|
facebookPixelId?: string;
|
|
60
|
+
/** The brand's OWN Google Tag Manager container id (`GTM-XXXXXXX`), loaded on
|
|
61
|
+
* their spacefront. Absent = no container on this spacefront. Same
|
|
62
|
+
* publication rule as `googleAnalyticsId`. */
|
|
63
|
+
googleTagManagerId?: string;
|
|
60
64
|
/** The language this space speaks (BCP 47, e.g. `he-IL`) — agent output, UI
|
|
61
65
|
* chrome, direction and formatting all follow it. Absent ⇒ `en-US`. Public
|
|
62
66
|
* by design: the page renders in it. See `space-locale.ts`. */
|