@replohq/canopy-sdk 3.0.6 → 3.0.7
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/_vendor/replo-utils/lib/crypto.d.ts +8 -0
- package/_vendor/replo-utils/lib/fonts.mjs +2 -3
- package/_vendor/replo-utils/lib/geometry.mjs +0 -2
- package/_vendor/replo-utils/lib/json.d.ts +0 -4
- package/_vendor/replo-utils/lib/json.mjs +1 -4
- package/_vendor/replo-utils/lib/misc.mjs +2 -4
- package/_vendor/replo-utils/lib/posthogReplay.mjs +0 -2
- package/_vendor/replo-utils/lib/string.d.ts +0 -12
- package/_vendor/replo-utils/lib/url.d.ts +10 -3
- package/_vendor/replo-utils/lib/url.mjs +3 -4
- package/_vendor/replo-utils/react/use-iframe-rpc-channel.mjs +0 -1
- package/_vendor/schemas/agentBillingFeatureType.d.ts +1 -0
- package/_vendor/schemas/comments.d.ts +932 -0
- package/_vendor/schemas/designLibrary.d.ts +1 -1
- package/_vendor/schemas/designLibrary.mjs +72 -73
- package/_vendor/schemas/errors.d.ts +36 -45
- package/_vendor/schemas/generated/comments.d.ts +244 -0
- package/_vendor/schemas/generated/consent.d.ts +43 -2
- package/_vendor/schemas/generated/errors.d.ts +1 -0
- package/_vendor/schemas/generated/selectMode.d.ts +3 -1
- package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +43 -0
- package/_vendor/schemas/iframeRpcChannel.d.ts +13 -1
- package/_vendor/schemas/iframeRpcChannel.mjs +167 -8
- package/_vendor/schemas/loaderKeys.mjs +0 -2
- package/_vendor/schemas/{money.d.ts → moneyFormat.d.ts} +11 -9
- package/_vendor/schemas/moneyFormat.mjs +119 -0
- package/_vendor/schemas/pageAnnotations.d.ts +1 -1
- package/_vendor/schemas/pageAnnotations.mjs +1 -2
- package/_vendor/schemas/reploError.d.ts +43 -0
- package/_vendor/schemas/routing/match.mjs +0 -1
- package/_vendor/schemas/routing/rules.d.ts +2 -2
- package/_vendor/schemas/routing/rules.mjs +5 -8
- package/_vendor/schemas/savedStyles.d.ts +1 -1
- package/_vendor/schemas/selectMode.d.ts +117 -4
- package/_vendor/schemas/selectMode.mjs +4 -6
- package/_vendor/schemas/selectModeIframeRpc.d.ts +373 -1
- package/_vendor/schemas/selectModeIframeRpc.mjs +77 -9
- package/chunk-B7XDEXPL.mjs +19 -0
- package/chunk-CJIK4NVP.mjs +547 -0
- package/chunk-DINTPZM2.mjs +71 -0
- package/{chunk-AKZNN7F2.mjs → chunk-IQCJXNJU.mjs} +1 -1
- package/{chunk-EXI4VDHP.mjs → chunk-PQEA6P4V.mjs} +20 -3
- package/{chunk-DINXH6YP.mjs → chunk-YGLYUC6R.mjs} +18 -7
- package/money.d.ts +1 -1
- package/package.json +2 -2
- package/_vendor/replo-utils/lib/object.d.ts +0 -31
- package/_vendor/schemas/money.mjs +0 -1937
- package/chunk-HGXQNZW7.mjs +0 -38
- package/chunk-ILGEM42C.mjs +0 -21
- package/chunk-RLFL66ST.mjs +0 -242
- package/chunk-UJCSKKID.mjs +0 -23
- package/chunk-VUXOGD76.mjs +0 -206
- /package/{chunk-FNTGY7I5.mjs → chunk-JELVREEB.mjs} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { z } from 'zod';
|
|
1
|
+
import * as z2 from 'zod';
|
|
3
2
|
|
|
4
|
-
var colorTypeSchema =
|
|
3
|
+
var colorTypeSchema = z2.enum([
|
|
5
4
|
"basic",
|
|
6
5
|
"foregroundPrimary",
|
|
7
6
|
"foregroundSecondary",
|
|
@@ -10,12 +9,12 @@ var colorTypeSchema = z.enum([
|
|
|
10
9
|
"backgroundSecondary",
|
|
11
10
|
"backgroundTertiary"
|
|
12
11
|
]).describe("SavedStyleColorType");
|
|
13
|
-
var savedStyleColorAttributesSchema =
|
|
14
|
-
type:
|
|
15
|
-
color:
|
|
12
|
+
var savedStyleColorAttributesSchema = z2.object({
|
|
13
|
+
type: z2.literal("color"),
|
|
14
|
+
color: z2.string(),
|
|
16
15
|
colorType: colorTypeSchema
|
|
17
16
|
}).describe("SavedStyleColorAttributes");
|
|
18
|
-
var savedStyleTextHtmlTagSchema =
|
|
17
|
+
var savedStyleTextHtmlTagSchema = z2.enum([
|
|
19
18
|
"h1",
|
|
20
19
|
"h2",
|
|
21
20
|
"h3",
|
|
@@ -24,13 +23,13 @@ var savedStyleTextHtmlTagSchema = z.enum([
|
|
|
24
23
|
"h6",
|
|
25
24
|
"p"
|
|
26
25
|
]);
|
|
27
|
-
var savedStyleTextAttributesSchema =
|
|
28
|
-
type:
|
|
26
|
+
var savedStyleTextAttributesSchema = z2.object({
|
|
27
|
+
type: z2.literal("text"),
|
|
29
28
|
htmlTag: savedStyleTextHtmlTagSchema,
|
|
30
|
-
color:
|
|
31
|
-
fontFamily:
|
|
32
|
-
fontSize:
|
|
33
|
-
fontWeight:
|
|
29
|
+
color: z2.string().optional(),
|
|
30
|
+
fontFamily: z2.string().nullish(),
|
|
31
|
+
fontSize: z2.string().optional(),
|
|
32
|
+
fontWeight: z2.enum([
|
|
34
33
|
"100",
|
|
35
34
|
"200",
|
|
36
35
|
"300",
|
|
@@ -42,91 +41,91 @@ var savedStyleTextAttributesSchema = z.object({
|
|
|
42
41
|
"900",
|
|
43
42
|
"950"
|
|
44
43
|
]).optional(),
|
|
45
|
-
letterSpacing:
|
|
46
|
-
lineHeight:
|
|
47
|
-
textAlign:
|
|
48
|
-
textDecoration:
|
|
49
|
-
textShadow:
|
|
50
|
-
textStroke:
|
|
51
|
-
textTransform:
|
|
44
|
+
letterSpacing: z2.string().optional(),
|
|
45
|
+
lineHeight: z2.string().optional(),
|
|
46
|
+
textAlign: z2.enum(["left", "center", "right"]).optional(),
|
|
47
|
+
textDecoration: z2.enum(["underline", "line-through", "italic", "none"]).optional(),
|
|
48
|
+
textShadow: z2.string().optional(),
|
|
49
|
+
textStroke: z2.string().optional(),
|
|
50
|
+
textTransform: z2.enum(["lowercase", "uppercase", "capitalize", "none"]).optional()
|
|
52
51
|
}).describe("SavedStyleTextAttributes");
|
|
53
|
-
|
|
52
|
+
z2.discriminatedUnion("type", [
|
|
54
53
|
savedStyleColorAttributesSchema,
|
|
55
54
|
savedStyleTextAttributesSchema
|
|
56
55
|
]).describe("SavedStyleAttributes");
|
|
57
56
|
|
|
58
|
-
var savedColorStyleSchema =
|
|
59
|
-
type:
|
|
60
|
-
name:
|
|
57
|
+
var savedColorStyleSchema = z2.object({
|
|
58
|
+
type: z2.literal("color"),
|
|
59
|
+
name: z2.string(),
|
|
61
60
|
attributes: savedStyleColorAttributesSchema,
|
|
62
|
-
optionalUsageGuidelines:
|
|
63
|
-
deletedAt:
|
|
64
|
-
isPrimary:
|
|
61
|
+
optionalUsageGuidelines: z2.string().nullish(),
|
|
62
|
+
deletedAt: z2.coerce.date().nullish(),
|
|
63
|
+
isPrimary: z2.boolean().optional()
|
|
65
64
|
}).describe("SavedColorStyle");
|
|
66
|
-
var savedTextStyleSchema =
|
|
67
|
-
type:
|
|
68
|
-
name:
|
|
65
|
+
var savedTextStyleSchema = z2.object({
|
|
66
|
+
type: z2.literal("text"),
|
|
67
|
+
name: z2.string(),
|
|
69
68
|
attributes: savedStyleTextAttributesSchema,
|
|
70
|
-
optionalUsageGuidelines:
|
|
71
|
-
deletedAt:
|
|
72
|
-
isPrimary:
|
|
69
|
+
optionalUsageGuidelines: z2.string().nullish(),
|
|
70
|
+
deletedAt: z2.coerce.date().nullish(),
|
|
71
|
+
isPrimary: z2.boolean().optional()
|
|
73
72
|
}).describe("SavedTextStyle");
|
|
74
|
-
var designLibrarySavedStylesSchema =
|
|
75
|
-
var designLibrarySchema =
|
|
76
|
-
id:
|
|
77
|
-
createdAt:
|
|
78
|
-
updatedAt:
|
|
79
|
-
deletedAt:
|
|
73
|
+
var designLibrarySavedStylesSchema = z2.record(z2.string(), z2.union([savedColorStyleSchema, savedTextStyleSchema])).describe("DesignLibrarySavedStylesMapping");
|
|
74
|
+
var designLibrarySchema = z2.object({
|
|
75
|
+
id: z2.uuid(),
|
|
76
|
+
createdAt: z2.date(),
|
|
77
|
+
updatedAt: z2.date(),
|
|
78
|
+
deletedAt: z2.coerce.date().nullish(),
|
|
80
79
|
savedStyles: designLibrarySavedStylesSchema
|
|
81
80
|
}).describe("DesignLibrary");
|
|
82
|
-
var designLibrarySavedStyleMetadataSchema =
|
|
83
|
-
library:
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
var designLibrarySavedStyleMetadataSchema = z2.object({
|
|
82
|
+
library: z2.record(
|
|
83
|
+
z2.string(),
|
|
84
|
+
z2.object({
|
|
86
85
|
styles: designLibrarySavedStylesSchema
|
|
87
86
|
})
|
|
88
87
|
)
|
|
89
88
|
}).describe("DesignLibrarySavedStyleMetadata");
|
|
90
|
-
var globalsCssTokenSchema =
|
|
91
|
-
name:
|
|
92
|
-
value:
|
|
89
|
+
var globalsCssTokenSchema = z2.object({
|
|
90
|
+
name: z2.string(),
|
|
91
|
+
value: z2.string()
|
|
93
92
|
}).describe("GlobalsCssToken");
|
|
94
|
-
var globalsCssScopeSchema =
|
|
95
|
-
selector:
|
|
96
|
-
tokens:
|
|
93
|
+
var globalsCssScopeSchema = z2.object({
|
|
94
|
+
selector: z2.string(),
|
|
95
|
+
tokens: z2.array(globalsCssTokenSchema)
|
|
97
96
|
}).describe("GlobalsCssScope");
|
|
98
|
-
var globalsCssSnapshotSchema =
|
|
99
|
-
scopes:
|
|
97
|
+
var globalsCssSnapshotSchema = z2.object({
|
|
98
|
+
scopes: z2.array(globalsCssScopeSchema)
|
|
100
99
|
}).describe("GlobalsCssSnapshot");
|
|
101
|
-
var siteFontRoleSchema =
|
|
102
|
-
role:
|
|
103
|
-
family:
|
|
104
|
-
cssVar:
|
|
105
|
-
rawValue:
|
|
100
|
+
var siteFontRoleSchema = z2.object({
|
|
101
|
+
role: z2.string(),
|
|
102
|
+
family: z2.string().nullable(),
|
|
103
|
+
cssVar: z2.string().nullable(),
|
|
104
|
+
rawValue: z2.string()
|
|
106
105
|
}).describe("SiteFontRole");
|
|
107
|
-
var siteFontsSnapshotSchema =
|
|
108
|
-
roles:
|
|
109
|
-
defaultRole:
|
|
106
|
+
var siteFontsSnapshotSchema = z2.object({
|
|
107
|
+
roles: z2.array(siteFontRoleSchema),
|
|
108
|
+
defaultRole: z2.string().nullable()
|
|
110
109
|
}).describe("SiteFontsSnapshot");
|
|
111
|
-
var siteDesignLibraryStateSchema =
|
|
112
|
-
siteId:
|
|
110
|
+
var siteDesignLibraryStateSchema = z2.object({
|
|
111
|
+
siteId: z2.uuid(),
|
|
113
112
|
globalsCss: globalsCssSnapshotSchema.nullable(),
|
|
114
113
|
fonts: siteFontsSnapshotSchema.nullable(),
|
|
115
|
-
isLoading:
|
|
116
|
-
error:
|
|
114
|
+
isLoading: z2.boolean(),
|
|
115
|
+
error: z2.string().nullable()
|
|
117
116
|
}).describe("SiteDesignLibraryState");
|
|
118
117
|
var DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE = "replo:design-library:applyOverrides";
|
|
119
|
-
var designLibraryPreviewFontSchema =
|
|
120
|
-
family:
|
|
121
|
-
cssVar:
|
|
122
|
-
faceUrl:
|
|
123
|
-
format:
|
|
118
|
+
var designLibraryPreviewFontSchema = z2.object({
|
|
119
|
+
family: z2.string(),
|
|
120
|
+
cssVar: z2.string(),
|
|
121
|
+
faceUrl: z2.string().optional(),
|
|
122
|
+
format: z2.string().optional()
|
|
124
123
|
}).describe("DesignLibraryPreviewFont");
|
|
125
|
-
var designLibraryPreviewMessageSchema =
|
|
126
|
-
type:
|
|
127
|
-
cssVars:
|
|
128
|
-
fonts:
|
|
129
|
-
defaultFontCssVar:
|
|
124
|
+
var designLibraryPreviewMessageSchema = z2.object({
|
|
125
|
+
type: z2.literal(DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE),
|
|
126
|
+
cssVars: z2.record(z2.string(), z2.string()),
|
|
127
|
+
fonts: z2.array(designLibraryPreviewFontSchema),
|
|
128
|
+
defaultFontCssVar: z2.string().nullable()
|
|
130
129
|
}).describe("DesignLibraryPreviewMessage");
|
|
131
130
|
|
|
132
131
|
export { DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE, designLibraryPreviewFontSchema, designLibraryPreviewMessageSchema, designLibrarySavedStyleMetadataSchema, designLibrarySavedStylesSchema, designLibrarySchema, globalsCssScopeSchema, globalsCssSnapshotSchema, globalsCssTokenSchema, savedColorStyleSchema, savedTextStyleSchema, siteDesignLibraryStateSchema, siteFontRoleSchema, siteFontsSnapshotSchema };
|
|
@@ -1,48 +1,7 @@
|
|
|
1
1
|
import type { ErrorUserFacingDetails, ErrorUserFacingDetailsWithMessage } from "./generated/errors";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export type ReploErrorConfig = {
|
|
7
|
-
/**
|
|
8
|
-
* Message of the error, used only internally. If not provided, defaults to
|
|
9
|
-
* the error's class name
|
|
10
|
-
*/
|
|
11
|
-
message?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Any additional data about the error, e.g. ids of content that was trying
|
|
14
|
-
* to be accessed, contextual variables, etc. This is included when the error
|
|
15
|
-
* is logged to Sentry, etc
|
|
16
|
-
*/
|
|
17
|
-
additionalData?: Record<string, unknown>;
|
|
18
|
-
/** Meta details for error reporting */
|
|
19
|
-
errorReportingDetails?: {
|
|
20
|
-
/**
|
|
21
|
-
* If true, tells Sentry that it should group this error differently when
|
|
22
|
-
* it happens on different endpoints ("transactions" in Sentry are endpoints)
|
|
23
|
-
*/
|
|
24
|
-
includeTransactionInFingerprint?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* If provided, these get added to the Sentry fingerprint for this error. Useful
|
|
27
|
-
* for when you want to modify the grouping of an error, especially for reusing
|
|
28
|
-
* errors in different places.
|
|
29
|
-
*/
|
|
30
|
-
customFingerprint?: string[];
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Original cause of the error (useful for if you need to catch and re-throw errors
|
|
34
|
-
* with more context). Will be reported in stacktraces, sentry, etc.
|
|
35
|
-
*/
|
|
36
|
-
cause?: unknown;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Base error that all errors in Replo inherit from
|
|
40
|
-
*/
|
|
41
|
-
export declare abstract class ReploError extends Error {
|
|
42
|
-
config: ReploErrorConfig;
|
|
43
|
-
id: string;
|
|
44
|
-
constructor(config: ReploErrorConfig);
|
|
45
|
-
}
|
|
2
|
+
import type { ReploErrorConfig } from "./reploError";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
import { ReploError } from "./reploError";
|
|
46
5
|
/**
|
|
47
6
|
* Wraps an error so `async-retry` stops immediately instead of scheduling
|
|
48
7
|
* another attempt: the library rejects with any thrown error carrying a truthy
|
|
@@ -61,6 +20,8 @@ export type ReploAuthenticationErrorConfig = {
|
|
|
61
20
|
additionalData?: ReploErrorConfig["additionalData"];
|
|
62
21
|
cause?: ReploErrorConfig["cause"];
|
|
63
22
|
};
|
|
23
|
+
export declare const PROJECT_ACCESS_DENIED_ERROR_KEY = "project.accessDenied";
|
|
24
|
+
export declare const WORKSPACE_ACCESS_DENIED_ERROR_KEY = "workspace.accessDenied";
|
|
64
25
|
export declare class ReploAuthenticationError extends ReploError {
|
|
65
26
|
type: AuthErrorType;
|
|
66
27
|
userFacingDetails?: ErrorUserFacingDetailsWithMessage;
|
|
@@ -83,6 +44,24 @@ export declare class ReploHTTPError extends ReploError {
|
|
|
83
44
|
details?: object;
|
|
84
45
|
});
|
|
85
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* HTTP error for callers that branch on `key` in code (SDKs, other services)
|
|
49
|
+
* rather than showing it in Replo's own UI, so it has no display `type`. The
|
|
50
|
+
* worker error handler answers `{ key, message, details, errorId }`. Should
|
|
51
|
+
* only be thrown from routes.
|
|
52
|
+
*/
|
|
53
|
+
export declare class ReploParseableHTTPError extends ReploError {
|
|
54
|
+
statusCode: number;
|
|
55
|
+
key: string;
|
|
56
|
+
userFacingMessage: string;
|
|
57
|
+
details?: Record<string, unknown>;
|
|
58
|
+
constructor(config: ReploErrorConfig & {
|
|
59
|
+
statusCode: number;
|
|
60
|
+
key: string;
|
|
61
|
+
userFacingMessage: string;
|
|
62
|
+
details?: Record<string, unknown>;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
86
65
|
/**
|
|
87
66
|
* Error used to represent an HTTP error that should be surfaced as such. This
|
|
88
67
|
* should be thrown when we want to pass the error through without changing the
|
|
@@ -272,6 +251,12 @@ export declare const errorUserFacingDetailsMessageSchema: z.ZodObject<{
|
|
|
272
251
|
maximum: z.ZodNumber;
|
|
273
252
|
}, z.core.$strip>>;
|
|
274
253
|
plan: z.ZodOptional<z.ZodString>;
|
|
254
|
+
featureType: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
credits: "credits";
|
|
256
|
+
"shopifyThemeBuilder.publishedElements": "shopifyThemeBuilder.publishedElements";
|
|
257
|
+
sites: "sites";
|
|
258
|
+
"shopifyThemeBuilder.projects": "shopifyThemeBuilder.projects";
|
|
259
|
+
}>>>;
|
|
275
260
|
callToAction: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
276
261
|
type: z.ZodLiteral<"reload">;
|
|
277
262
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -339,6 +324,12 @@ export declare const errorUserFacingDetailsSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
339
324
|
maximum: z.ZodNumber;
|
|
340
325
|
}, z.core.$strip>>;
|
|
341
326
|
plan: z.ZodOptional<z.ZodString>;
|
|
327
|
+
featureType: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
328
|
+
credits: "credits";
|
|
329
|
+
"shopifyThemeBuilder.publishedElements": "shopifyThemeBuilder.publishedElements";
|
|
330
|
+
sites: "sites";
|
|
331
|
+
"shopifyThemeBuilder.projects": "shopifyThemeBuilder.projects";
|
|
332
|
+
}>>>;
|
|
342
333
|
callToAction: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
343
334
|
type: z.ZodLiteral<"reload">;
|
|
344
335
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -467,6 +458,6 @@ export declare class IframeRpcChannelConfigurationError extends IframeRpcChannel
|
|
|
467
458
|
export declare class IframeRpcChannelInvalidInputError extends IframeRpcChannelError {
|
|
468
459
|
constructor({ method, cause }: {
|
|
469
460
|
method: string;
|
|
470
|
-
cause: ZodError;
|
|
461
|
+
cause: z.ZodError;
|
|
471
462
|
});
|
|
472
463
|
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
export type CommentSource = "ui" | "agent" | "mcp" | "api";
|
|
2
|
+
export type CommentAnchorContext = {
|
|
3
|
+
url: string;
|
|
4
|
+
locale?: string | null;
|
|
5
|
+
};
|
|
6
|
+
export type CommentAnchorNone = {
|
|
7
|
+
type: "none";
|
|
8
|
+
context?: CommentAnchorContext;
|
|
9
|
+
};
|
|
10
|
+
export type CommentAnchorElement = {
|
|
11
|
+
type: "element";
|
|
12
|
+
semanticSelector?: string;
|
|
13
|
+
selector: string;
|
|
14
|
+
nthOfTypePath: string;
|
|
15
|
+
source?: {
|
|
16
|
+
filePath: string;
|
|
17
|
+
componentChain: string[];
|
|
18
|
+
line?: number;
|
|
19
|
+
col?: number;
|
|
20
|
+
};
|
|
21
|
+
listKey?: string;
|
|
22
|
+
tagName: string;
|
|
23
|
+
textPreview: string;
|
|
24
|
+
quote?: {
|
|
25
|
+
exact: string;
|
|
26
|
+
prefix: string;
|
|
27
|
+
suffix: string;
|
|
28
|
+
};
|
|
29
|
+
offset: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
context?: CommentAnchorContext;
|
|
34
|
+
};
|
|
35
|
+
export type CommentAnchorCanvas = {
|
|
36
|
+
type: "canvas";
|
|
37
|
+
nodeId: string;
|
|
38
|
+
layerId?: string;
|
|
39
|
+
point: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
};
|
|
43
|
+
world?: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type CommentAnchorPoint = {
|
|
49
|
+
type: "point";
|
|
50
|
+
page?: number;
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
};
|
|
54
|
+
export type CommentAnchor = CommentAnchorNone | CommentAnchorElement | CommentAnchorCanvas | CommentAnchorPoint;
|
|
55
|
+
export type CommentTarget = {
|
|
56
|
+
kind: "file";
|
|
57
|
+
fileId: string;
|
|
58
|
+
folderId?: string;
|
|
59
|
+
} | {
|
|
60
|
+
kind: "sitePage";
|
|
61
|
+
siteId: string;
|
|
62
|
+
url: string;
|
|
63
|
+
locale?: string | null;
|
|
64
|
+
routePatternHint?: string;
|
|
65
|
+
via?: {
|
|
66
|
+
fileId: string;
|
|
67
|
+
shareId: string;
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
kind: "order";
|
|
71
|
+
orderId: string;
|
|
72
|
+
} | {
|
|
73
|
+
kind: "asset";
|
|
74
|
+
assetId: string;
|
|
75
|
+
} | {
|
|
76
|
+
kind: "experiment";
|
|
77
|
+
experimentId: string;
|
|
78
|
+
};
|
|
79
|
+
export type CommentSurface = "artifact" | "canvas" | "image" | "markdown" | "pdf" | "file" | "websiteBuilder" | "embeddedPreview" | "orders" | "assets" | "experiments";
|
|
80
|
+
export type CommentAuthor = {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
avatarUrl: string | null;
|
|
84
|
+
deleted: boolean;
|
|
85
|
+
};
|
|
86
|
+
export type Comment = {
|
|
87
|
+
id: string;
|
|
88
|
+
threadId: string;
|
|
89
|
+
authorUserId: string;
|
|
90
|
+
source: CommentSource;
|
|
91
|
+
body: string;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
editedAt: string | null;
|
|
94
|
+
deletedAt: string | null;
|
|
95
|
+
};
|
|
96
|
+
export type CommentReaction = {
|
|
97
|
+
commentId: string;
|
|
98
|
+
userId: string;
|
|
99
|
+
emoji: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
};
|
|
102
|
+
export type CommentThreadTarget = {
|
|
103
|
+
fileId?: string;
|
|
104
|
+
siteId?: string;
|
|
105
|
+
path?: string;
|
|
106
|
+
orderId?: string;
|
|
107
|
+
assetId?: string;
|
|
108
|
+
experimentId?: string;
|
|
109
|
+
};
|
|
110
|
+
export type CommentThread = {
|
|
111
|
+
id: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
target: Partial<CommentThreadTarget>;
|
|
114
|
+
viaFileId: string | null;
|
|
115
|
+
viaFileName: string | null;
|
|
116
|
+
anchor: CommentAnchor;
|
|
117
|
+
resolvedAt: string | null;
|
|
118
|
+
resolvedByUserId: string | null;
|
|
119
|
+
resolvedSource: CommentSource | null;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
updatedAt: string;
|
|
122
|
+
deletedAt: string | null;
|
|
123
|
+
};
|
|
124
|
+
export type CommentThreadBundle = {
|
|
125
|
+
threads: CommentThread[];
|
|
126
|
+
comments: Comment[];
|
|
127
|
+
reactions: CommentReaction[];
|
|
128
|
+
authors: CommentAuthor[];
|
|
129
|
+
viewer: CommentViewer;
|
|
130
|
+
};
|
|
131
|
+
export type CreateCommentThreadBody = {
|
|
132
|
+
id: string;
|
|
133
|
+
target: CommentTarget;
|
|
134
|
+
anchor: CommentAnchor;
|
|
135
|
+
body: {
|
|
136
|
+
id: string;
|
|
137
|
+
body: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type UpdateCommentThreadBody = {
|
|
141
|
+
resolved?: boolean;
|
|
142
|
+
path?: string;
|
|
143
|
+
anchor?: CommentAnchor;
|
|
144
|
+
};
|
|
145
|
+
export type CreateCommentBody = {
|
|
146
|
+
id: string;
|
|
147
|
+
body: string;
|
|
148
|
+
};
|
|
149
|
+
export type UpdateCommentBody = {
|
|
150
|
+
body: string;
|
|
151
|
+
};
|
|
152
|
+
export type CommentThreadStatus = "open" | "resolved";
|
|
153
|
+
export type ListCommentThreadsQuery = {
|
|
154
|
+
fileId?: string;
|
|
155
|
+
folderId?: string;
|
|
156
|
+
siteId?: string;
|
|
157
|
+
path?: string;
|
|
158
|
+
locale?: string;
|
|
159
|
+
viaFileId?: string;
|
|
160
|
+
orderId?: string;
|
|
161
|
+
assetId?: string;
|
|
162
|
+
experimentId?: string;
|
|
163
|
+
status?: CommentThreadStatus;
|
|
164
|
+
};
|
|
165
|
+
export type CommentThreadLocation = {
|
|
166
|
+
kind: "artifact" | "miniapp" | "commentsScreen" | "gone";
|
|
167
|
+
url?: string;
|
|
168
|
+
projectId?: string;
|
|
169
|
+
miniappId?: string;
|
|
170
|
+
miniappRoute?: string;
|
|
171
|
+
};
|
|
172
|
+
export type PresignCommentAttachmentBody = {
|
|
173
|
+
target: CommentTarget;
|
|
174
|
+
contentType: string;
|
|
175
|
+
contentLength: number;
|
|
176
|
+
};
|
|
177
|
+
export type PresignCommentAttachmentResponse = {
|
|
178
|
+
objectKey: string;
|
|
179
|
+
presignedPutUrl: string;
|
|
180
|
+
publicUrl: string;
|
|
181
|
+
};
|
|
182
|
+
export type CommitCommentAttachmentBody = {
|
|
183
|
+
target: CommentTarget;
|
|
184
|
+
objectKey: string;
|
|
185
|
+
};
|
|
186
|
+
export type CommitCommentAttachmentResponse = {
|
|
187
|
+
publicUrl: string;
|
|
188
|
+
};
|
|
189
|
+
export type CommentViewer = {
|
|
190
|
+
userId: string | null;
|
|
191
|
+
isMember: boolean;
|
|
192
|
+
canComment: boolean;
|
|
193
|
+
canModerate: boolean;
|
|
194
|
+
};
|
|
195
|
+
export type CommentSiteThreadPage = {
|
|
196
|
+
threads: CommentThread[];
|
|
197
|
+
comments: Comment[];
|
|
198
|
+
reactions: CommentReaction[];
|
|
199
|
+
authors: CommentAuthor[];
|
|
200
|
+
orphanedPaths: string[] | null;
|
|
201
|
+
nextCursor: string | null;
|
|
202
|
+
};
|
|
203
|
+
export type CommentSiteThreadSort = {
|
|
204
|
+
column: "page" | "excerpt" | "author" | "created" | "lastActivity" | "replies" | "status" | "from";
|
|
205
|
+
direction: "asc" | "desc";
|
|
206
|
+
};
|
|
207
|
+
export type CommentMentionPerson = {
|
|
208
|
+
id: string;
|
|
209
|
+
name: string;
|
|
210
|
+
avatarUrl: string | null;
|
|
211
|
+
};
|
|
212
|
+
export type MentionableDisplay = {
|
|
213
|
+
label: string;
|
|
214
|
+
imageUrl?: string;
|
|
215
|
+
};
|
|
216
|
+
export type MentionableResolution = {
|
|
217
|
+
state: "ok";
|
|
218
|
+
display: MentionableDisplay;
|
|
219
|
+
} | {
|
|
220
|
+
state: "forbidden";
|
|
221
|
+
category: string;
|
|
222
|
+
};
|
|
223
|
+
export type CommentThreadTargetSummary = {
|
|
224
|
+
kind: "file" | "sitePage" | "order" | "asset" | "experiment";
|
|
225
|
+
fileId?: string;
|
|
226
|
+
fileName?: string;
|
|
227
|
+
filePath?: string;
|
|
228
|
+
artifactFolderId?: string;
|
|
229
|
+
fileDeleted?: boolean;
|
|
230
|
+
siteId?: string;
|
|
231
|
+
path?: string;
|
|
232
|
+
url?: string;
|
|
233
|
+
orderId?: string;
|
|
234
|
+
assetId?: string;
|
|
235
|
+
experimentId?: string;
|
|
236
|
+
experimentName?: string;
|
|
237
|
+
};
|
|
238
|
+
export type CommentThreadDetail = {
|
|
239
|
+
thread: CommentThread;
|
|
240
|
+
comments: Comment[];
|
|
241
|
+
reactions: CommentReaction[];
|
|
242
|
+
authors: CommentAuthor[];
|
|
243
|
+
target: CommentThreadTargetSummary;
|
|
244
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ReploScriptType = "GA4" | "GoogleTagManager" | "Meta" | "TikTok" | "Pinterest" | "Reddit" | "Snapchat" | "Hotjar" | "MicrosoftClarity" | "Contentsquare" | "Segment" | "Northbeam" | "Gorgias" | "Converge" | "Cookiebot" | "snippet" | "custom" | "consentPlatform";
|
|
1
|
+
export type ReploScriptType = "GA4" | "GoogleTagManager" | "Meta" | "TikTok" | "Pinterest" | "Reddit" | "Snapchat" | "X" | "Hotjar" | "MicrosoftClarity" | "Contentsquare" | "Segment" | "Northbeam" | "Gorgias" | "Converge" | "Mixpanel" | "HubSpot" | "Attentive" | "Alia" | "Cookiebot" | "Usercentrics" | "snippet" | "custom" | "consentPlatform";
|
|
2
2
|
export type ConsentCategory = "necessary" | "analytics" | "marketing" | "preferences" | "sale_of_data";
|
|
3
3
|
export type ConsentMode = "off" | "simple" | "per-category";
|
|
4
4
|
export type ScriptTagDescriptor = {
|
|
@@ -12,26 +12,67 @@ export type ScriptTagDescriptor = {
|
|
|
12
12
|
body: string;
|
|
13
13
|
module?: boolean;
|
|
14
14
|
};
|
|
15
|
+
export type XPixelEvents = {
|
|
16
|
+
pageView?: string;
|
|
17
|
+
productViewed?: string;
|
|
18
|
+
addToCart?: string;
|
|
19
|
+
startCheckout?: string;
|
|
20
|
+
purchase?: string;
|
|
21
|
+
};
|
|
22
|
+
export type ScriptRuntimeOwner = {
|
|
23
|
+
type: "gtm";
|
|
24
|
+
containerId: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "external";
|
|
27
|
+
};
|
|
28
|
+
export type MixpanelRegion = "us" | "eu" | "in";
|
|
15
29
|
export type ReploScriptEntry = {
|
|
16
|
-
type: "
|
|
30
|
+
type: "GoogleTagManager" | "Meta" | "TikTok" | "Pinterest" | "Reddit" | "Snapchat" | "Hotjar" | "MicrosoftClarity" | "Contentsquare" | "Segment" | "Northbeam" | "Gorgias" | "Converge" | "HubSpot" | "Attentive" | "Alia";
|
|
31
|
+
identifier: string;
|
|
32
|
+
requiredConsent?: ConsentCategory[];
|
|
33
|
+
usercentricsService?: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "GA4";
|
|
36
|
+
identifier: string;
|
|
37
|
+
requiredConsent?: ConsentCategory[];
|
|
38
|
+
runtimeOwner?: ScriptRuntimeOwner;
|
|
39
|
+
usercentricsService?: string;
|
|
40
|
+
} | {
|
|
41
|
+
type: "X";
|
|
17
42
|
identifier: string;
|
|
43
|
+
events?: Partial<XPixelEvents>;
|
|
18
44
|
requiredConsent?: ConsentCategory[];
|
|
45
|
+
usercentricsService?: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: "Mixpanel";
|
|
48
|
+
identifier: string;
|
|
49
|
+
region?: MixpanelRegion;
|
|
50
|
+
requiredConsent?: ConsentCategory[];
|
|
51
|
+
usercentricsService?: string;
|
|
19
52
|
} | {
|
|
20
53
|
type: "Cookiebot";
|
|
21
54
|
identifier: string;
|
|
22
55
|
requiredConsent?: ConsentCategory[];
|
|
56
|
+
} | {
|
|
57
|
+
type: "Usercentrics";
|
|
58
|
+
identifier: string;
|
|
59
|
+
loaderVersion?: "v2" | "v3";
|
|
60
|
+
runtimeOwner?: ScriptRuntimeOwner;
|
|
61
|
+
reploUsercentricsService?: string;
|
|
23
62
|
} | {
|
|
24
63
|
type: "snippet";
|
|
25
64
|
id: string;
|
|
26
65
|
body: string;
|
|
27
66
|
module?: boolean;
|
|
28
67
|
requiredConsent: ConsentCategory[];
|
|
68
|
+
usercentricsService?: string;
|
|
29
69
|
} | {
|
|
30
70
|
type: "custom";
|
|
31
71
|
id: string;
|
|
32
72
|
requiredConsent: ConsentCategory[];
|
|
33
73
|
src?: string;
|
|
34
74
|
body?: string;
|
|
75
|
+
usercentricsService?: string;
|
|
35
76
|
} | {
|
|
36
77
|
type: "consentPlatform";
|
|
37
78
|
id: string;
|
|
@@ -12,6 +12,7 @@ export type ErrorUserFacingDetailsWithMessage = {
|
|
|
12
12
|
maximum: number;
|
|
13
13
|
};
|
|
14
14
|
plan?: string;
|
|
15
|
+
featureType?: ("credits" | "shopifyThemeBuilder.publishedElements" | "sites" | "shopifyThemeBuilder.projects") | undefined;
|
|
15
16
|
callToAction?: {
|
|
16
17
|
type: "reload";
|
|
17
18
|
} | {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CommentAnchorElement } from "./comments";
|
|
2
|
+
export type DisplayMode = "browse" | "selection" | "comment";
|
|
2
3
|
export type SelectModeSelectionType = "none" | "element" | "area" | "drag";
|
|
3
4
|
export type SelectModeInlineTextStatus = "editable" | "dynamic" | "translated" | null;
|
|
4
5
|
export type SelectModeTextMetrics = {
|
|
@@ -115,6 +116,7 @@ export type SelectedElement = {
|
|
|
115
116
|
sourceLocation?: SelectModeSourceLocation;
|
|
116
117
|
fiberChain: SelectModeFiberChainEntry[];
|
|
117
118
|
siblingSelectors: string[];
|
|
119
|
+
anchor?: CommentAnchorElement;
|
|
118
120
|
};
|
|
119
121
|
export type SelectablePlanData = {
|
|
120
122
|
kind: "plan";
|