@40rty/ams-sdk 0.5.18 → 0.5.20
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 +1171 -950
- package/dist/types/ecommerce/src/catalog-search.d.ts +32 -0
- package/dist/types/ecommerce/src/commerce-schemas.d.ts +18 -0
- package/dist/types/ecommerce/src/index.d.ts +3 -0
- package/dist/types/ecommerce/src/shop-checkout.d.ts +21 -0
- package/dist/types/ecommerce/src/store-articles.d.ts +34 -0
- package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +8 -0
- package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +10 -3
- package/dist/types/sdk/src/canvas/canvas-turn-tail.d.ts +44 -0
- package/dist/types/sdk/src/canvas/index.d.ts +2 -1
- package/dist/types/sdk/src/host/host-modules.d.ts +102 -6
- package/dist/types/sdk/src/shell/index.d.ts +1 -0
- package/dist/types/sdk/src/shell/use-ask-about.d.ts +10 -0
- package/dist/types/sdk/src/verticals/commerce/commerce-context.d.ts +21 -2
- package/dist/types/sdk/src/verticals/commerce/commerce-shapes.d.ts +41 -1
- package/dist/types/sdk/src/verticals/commerce/index.d.ts +2 -2
- package/dist/types/spacestation/src/index.d.ts +1 -0
- package/dist/types/spacestation/src/signal/visitor-view.d.ts +101 -0
- package/dist/types/spacestation/src/space/connector.d.ts +8 -1
- package/dist/types/spacestation/src/space/session-queue.d.ts +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What the visitor is looking at and pointing to, for the agent — vertical-neutral.
|
|
4
|
+
*
|
|
5
|
+
* ATTENTION is a client-leads live-state namespace (`publishClientState(ATTENTION_NAMESPACE, …)`):
|
|
6
|
+
* a shell that renders things the agent did not place (an endless feed, a client-paged section)
|
|
7
|
+
* or knows where the visitor lingers reports it here, and the agent reads it as live state on
|
|
8
|
+
* every turn (and in its follow-up suggestions).
|
|
9
|
+
*
|
|
10
|
+
* POINTING rides one prompt (`about` on the prompt payload): the element the visitor tapped to
|
|
11
|
+
* talk about — a price, a colour, a block — so the turn answers about exactly that.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ATTENTION_NAMESPACE = "attention";
|
|
14
|
+
export declare const POINTING_NAMESPACE = "pointing";
|
|
15
|
+
export declare const AttentionSchema: z.ZodObject<{
|
|
16
|
+
/** On the visitor's screen now, in reading order. */
|
|
17
|
+
onScreen: z.ZodArray<z.ZodObject<{
|
|
18
|
+
/** The entity's id as the agent knows it (a product id), when the thing is an entity. */
|
|
19
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
20
|
+
label: z.ZodString;
|
|
21
|
+
/** One short fact the visitor can see on it ("$48", "sold out"). */
|
|
22
|
+
note: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
label: string;
|
|
25
|
+
ref?: string | undefined;
|
|
26
|
+
note?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
label: string;
|
|
29
|
+
ref?: string | undefined;
|
|
30
|
+
note?: string | undefined;
|
|
31
|
+
}>, "many">;
|
|
32
|
+
/** Where the visitor rested longest, most first. */
|
|
33
|
+
lingered: z.ZodArray<z.ZodObject<{
|
|
34
|
+
/** The entity's id as the agent knows it (a product id), when the thing is an entity. */
|
|
35
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
36
|
+
label: z.ZodString;
|
|
37
|
+
/** One short fact the visitor can see on it ("$48", "sold out"). */
|
|
38
|
+
note: z.ZodOptional<z.ZodString>;
|
|
39
|
+
} & {
|
|
40
|
+
seconds: z.ZodNumber;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
label: string;
|
|
43
|
+
seconds: number;
|
|
44
|
+
ref?: string | undefined;
|
|
45
|
+
note?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
label: string;
|
|
48
|
+
seconds: number;
|
|
49
|
+
ref?: string | undefined;
|
|
50
|
+
note?: string | undefined;
|
|
51
|
+
}>, "many">;
|
|
52
|
+
/** Sections the visitor has scrolled through, in order (titles the page showed). */
|
|
53
|
+
passed: z.ZodArray<z.ZodString, "many">;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
onScreen: {
|
|
56
|
+
label: string;
|
|
57
|
+
ref?: string | undefined;
|
|
58
|
+
note?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
lingered: {
|
|
61
|
+
label: string;
|
|
62
|
+
seconds: number;
|
|
63
|
+
ref?: string | undefined;
|
|
64
|
+
note?: string | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
passed: string[];
|
|
67
|
+
}, {
|
|
68
|
+
onScreen: {
|
|
69
|
+
label: string;
|
|
70
|
+
ref?: string | undefined;
|
|
71
|
+
note?: string | undefined;
|
|
72
|
+
}[];
|
|
73
|
+
lingered: {
|
|
74
|
+
label: string;
|
|
75
|
+
seconds: number;
|
|
76
|
+
ref?: string | undefined;
|
|
77
|
+
note?: string | undefined;
|
|
78
|
+
}[];
|
|
79
|
+
passed: string[];
|
|
80
|
+
}>;
|
|
81
|
+
export type Attention = z.infer<typeof AttentionSchema>;
|
|
82
|
+
export declare const PointedAtSchema: z.ZodObject<{
|
|
83
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
84
|
+
/** What the element is ("Faherty linen shirt", "the page headline"). */
|
|
85
|
+
label: z.ZodString;
|
|
86
|
+
/** Which of its facets the visitor tapped ("price", "colour", "style", "section"). */
|
|
87
|
+
field: z.ZodString;
|
|
88
|
+
/** That facet's value as shown ("$128", "Navy"). */
|
|
89
|
+
value: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
field: string;
|
|
92
|
+
label: string;
|
|
93
|
+
value?: string | undefined;
|
|
94
|
+
ref?: string | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
field: string;
|
|
97
|
+
label: string;
|
|
98
|
+
value?: string | undefined;
|
|
99
|
+
ref?: string | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
export type PointedAt = z.infer<typeof PointedAtSchema>;
|
|
@@ -27,6 +27,13 @@ export interface ConnectorFieldDescriptor {
|
|
|
27
27
|
* config field must be named in `browserConfig` (publishable — designed to
|
|
28
28
|
* ship in client code) or `vaultedConfig` (server-only). */
|
|
29
29
|
secret: boolean;
|
|
30
|
+
/** The connector connects without it — left empty, it is not stored (and
|
|
31
|
+
* a stored one is cleared). Absent: required. */
|
|
32
|
+
optional?: true;
|
|
33
|
+
/** Where an app conventionally keeps this value, as `.env` names in the
|
|
34
|
+
* connector's own vocabulary (`PUBLIC_STORE_DOMAIN`). `forty connect` reads
|
|
35
|
+
* the first one set when its flag is not given; the console ignores it. */
|
|
36
|
+
env?: readonly string[];
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
39
|
* A connector, as the console renders it. A space has MANY — one per platform
|
|
@@ -55,7 +62,7 @@ export interface ConnectorDescriptor {
|
|
|
55
62
|
/** The heading the console files it under, in the connector's own words
|
|
56
63
|
* ("Ecommerce"). Connectors that serve the same kind of space sit together. */
|
|
57
64
|
category: string;
|
|
58
|
-
/** What connecting it asks for, in order.
|
|
65
|
+
/** What connecting it asks for, in order. Required unless marked `optional`. */
|
|
59
66
|
fields: ConnectorFieldDescriptor[];
|
|
60
67
|
/** Whether the connector can check typed values against the live service
|
|
61
68
|
* before they are saved. */
|
|
@@ -43,16 +43,16 @@ export declare const SessionReviewEventSchema: z.ZodObject<{
|
|
|
43
43
|
createdAt: z.ZodString;
|
|
44
44
|
}, "strip", z.ZodTypeAny, {
|
|
45
45
|
id: string;
|
|
46
|
+
note: string | null;
|
|
46
47
|
createdAt: string;
|
|
47
48
|
verdict: "viewed" | "bug";
|
|
48
49
|
reviewer: string;
|
|
49
|
-
note: string | null;
|
|
50
50
|
}, {
|
|
51
51
|
id: string;
|
|
52
|
+
note: string | null;
|
|
52
53
|
createdAt: string;
|
|
53
54
|
verdict: "viewed" | "bug";
|
|
54
55
|
reviewer: string;
|
|
55
|
-
note: string | null;
|
|
56
56
|
}>;
|
|
57
57
|
export type SessionReviewEvent = z.infer<typeof SessionReviewEventSchema>;
|
|
58
58
|
export declare const BugSeveritySchema: z.ZodEnum<["high", "medium", "low"]>;
|
|
@@ -1571,16 +1571,16 @@ export declare const SessionDetailSchema: z.ZodObject<{
|
|
|
1571
1571
|
createdAt: z.ZodString;
|
|
1572
1572
|
}, "strip", z.ZodTypeAny, {
|
|
1573
1573
|
id: string;
|
|
1574
|
+
note: string | null;
|
|
1574
1575
|
createdAt: string;
|
|
1575
1576
|
verdict: "viewed" | "bug";
|
|
1576
1577
|
reviewer: string;
|
|
1577
|
-
note: string | null;
|
|
1578
1578
|
}, {
|
|
1579
1579
|
id: string;
|
|
1580
|
+
note: string | null;
|
|
1580
1581
|
createdAt: string;
|
|
1581
1582
|
verdict: "viewed" | "bug";
|
|
1582
1583
|
reviewer: string;
|
|
1583
|
-
note: string | null;
|
|
1584
1584
|
}>, "many">;
|
|
1585
1585
|
bugs: z.ZodArray<z.ZodObject<{
|
|
1586
1586
|
id: z.ZodString;
|
|
@@ -1884,10 +1884,10 @@ export declare const SessionDetailSchema: z.ZodObject<{
|
|
|
1884
1884
|
};
|
|
1885
1885
|
reviews: {
|
|
1886
1886
|
id: string;
|
|
1887
|
+
note: string | null;
|
|
1887
1888
|
createdAt: string;
|
|
1888
1889
|
verdict: "viewed" | "bug";
|
|
1889
1890
|
reviewer: string;
|
|
1890
|
-
note: string | null;
|
|
1891
1891
|
}[];
|
|
1892
1892
|
bugs: {
|
|
1893
1893
|
id: string;
|
|
@@ -1982,10 +1982,10 @@ export declare const SessionDetailSchema: z.ZodObject<{
|
|
|
1982
1982
|
};
|
|
1983
1983
|
reviews: {
|
|
1984
1984
|
id: string;
|
|
1985
|
+
note: string | null;
|
|
1985
1986
|
createdAt: string;
|
|
1986
1987
|
verdict: "viewed" | "bug";
|
|
1987
1988
|
reviewer: string;
|
|
1988
|
-
note: string | null;
|
|
1989
1989
|
}[];
|
|
1990
1990
|
bugs: {
|
|
1991
1991
|
id: string;
|