@streamoid/catalogix-chat 0.1.0 → 0.2.1
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.d.ts +84 -14
- package/dist/index.js +3586 -27
- package/package.json +19 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Props interface matching ChatComponentProps from @streamoid/chat-component-types.
|
|
5
|
-
* Declared locally to avoid a build-time dependency on the types package at
|
|
6
|
-
* runtime (types are erased anyway).
|
|
7
|
-
*/
|
|
8
3
|
interface CatalogixChatProps {
|
|
9
4
|
workspaceId: string;
|
|
10
5
|
userId: string;
|
|
@@ -18,14 +13,6 @@ interface CatalogixChatProps {
|
|
|
18
13
|
onSubmit: (values: Record<string, unknown>, message?: string) => void;
|
|
19
14
|
onCancel?: () => void;
|
|
20
15
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Placeholder component exported for use in the dashboard registry.
|
|
23
|
-
*
|
|
24
|
-
* The actual CreateStore, AddProductsOptions, SelectProducts and Automations
|
|
25
|
-
* components from the catalogix app tree will be wired in by the catalogix
|
|
26
|
-
* team once this package is fully integrated. For now this renders a shell
|
|
27
|
-
* that shows which section was requested.
|
|
28
|
-
*/
|
|
29
16
|
declare function CatalogixChat(props: CatalogixChatProps): react_jsx_runtime.JSX.Element;
|
|
30
17
|
|
|
31
18
|
declare const catalogixManifest: readonly [{
|
|
@@ -68,4 +55,87 @@ declare const catalogixManifest: readonly [{
|
|
|
68
55
|
};
|
|
69
56
|
}];
|
|
70
57
|
|
|
71
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Shared API configuration and helpers for all Catalogix chat components.
|
|
60
|
+
*
|
|
61
|
+
* The base URL is set once via `configureApi()` (called by CatalogixChat on
|
|
62
|
+
* mount) and read by every sub-component's API layer.
|
|
63
|
+
*/
|
|
64
|
+
interface ApiConfig {
|
|
65
|
+
catalogixBaseUrl: string;
|
|
66
|
+
keplerProxyPrefix: string;
|
|
67
|
+
}
|
|
68
|
+
declare function configureApi(config: Partial<ApiConfig>): void;
|
|
69
|
+
|
|
70
|
+
interface ProductRow {
|
|
71
|
+
id: string;
|
|
72
|
+
product_code: string;
|
|
73
|
+
product_uuid: string;
|
|
74
|
+
store_uuid: string;
|
|
75
|
+
parent_code: string;
|
|
76
|
+
status: string;
|
|
77
|
+
template: string;
|
|
78
|
+
/** Number of SKU variants under this style (set by formatProductsByStyle). */
|
|
79
|
+
_variantCount?: number;
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface SelectProductsProps {
|
|
84
|
+
workspaceId: string;
|
|
85
|
+
storeId: string;
|
|
86
|
+
userId?: string;
|
|
87
|
+
submitted?: boolean;
|
|
88
|
+
submittedValues?: Record<string, unknown> | null;
|
|
89
|
+
onConfirmSelection?: (selectedProducts: ProductRow[], excludedProducts: ProductRow[], selectedPageRange: number[], filters: Record<string, unknown>, useProductUuid: boolean, selectionPayload: Record<string, unknown>, resumeValues: Record<string, unknown>) => Promise<{
|
|
90
|
+
submitted: boolean;
|
|
91
|
+
submittedValues?: Record<string, unknown>;
|
|
92
|
+
} | void>;
|
|
93
|
+
useProductUuid?: boolean;
|
|
94
|
+
}
|
|
95
|
+
declare function SelectProducts({ workspaceId, storeId, userId, submitted, submittedValues, onConfirmSelection, useProductUuid, }: SelectProductsProps): react_jsx_runtime.JSX.Element;
|
|
96
|
+
|
|
97
|
+
interface ExistingStore {
|
|
98
|
+
_id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
}
|
|
101
|
+
interface CreateStoreProps {
|
|
102
|
+
workspaceId: string;
|
|
103
|
+
stores?: ExistingStore[];
|
|
104
|
+
initialStoreName?: string;
|
|
105
|
+
useCatalogixTaxonomy?: boolean;
|
|
106
|
+
shouldRefetchStore?: boolean;
|
|
107
|
+
onStoreCreated?: (storeData: Record<string, unknown>) => void;
|
|
108
|
+
onCreateError?: (error: unknown) => void;
|
|
109
|
+
onClose?: () => void;
|
|
110
|
+
}
|
|
111
|
+
declare function CreateStore({ workspaceId, stores, initialStoreName, useCatalogixTaxonomy, shouldRefetchStore, onStoreCreated, onCreateError, onClose, }: CreateStoreProps): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
113
|
+
interface ProductAutomationProps {
|
|
114
|
+
storeId: string;
|
|
115
|
+
workspaceId: string;
|
|
116
|
+
channelsWithVersion?: Record<string, string>;
|
|
117
|
+
selectedProducts: unknown[];
|
|
118
|
+
excludedProducts: unknown[];
|
|
119
|
+
totalProducts: number;
|
|
120
|
+
productsCount: number;
|
|
121
|
+
filters: Record<string, unknown>;
|
|
122
|
+
selectedPageRange: number[];
|
|
123
|
+
userId: string;
|
|
124
|
+
onClose: () => void;
|
|
125
|
+
onSubmit?: (automationConfigs: Record<string, unknown>) => void;
|
|
126
|
+
onAutomationApplied?: (configs: Record<string, unknown>) => void;
|
|
127
|
+
}
|
|
128
|
+
declare function ProductAutomation({ storeId, workspaceId, channelsWithVersion, selectedProducts, excludedProducts, totalProducts, productsCount: productsCountProp, filters, selectedPageRange, userId, onClose, onSubmit, onAutomationApplied, }: ProductAutomationProps): react_jsx_runtime.JSX.Element;
|
|
129
|
+
|
|
130
|
+
interface StoreAutomationProps {
|
|
131
|
+
storeId: string;
|
|
132
|
+
channelsWithVersion?: Record<string, string>;
|
|
133
|
+
enabledAutomations?: Record<string, Record<string, unknown>>;
|
|
134
|
+
onSubmit?: (settings: {
|
|
135
|
+
enabled_automations: Record<string, unknown>;
|
|
136
|
+
}) => void;
|
|
137
|
+
onClose?: () => void;
|
|
138
|
+
}
|
|
139
|
+
declare function StoreAutomation({ storeId, channelsWithVersion, enabledAutomations, onSubmit, onClose, }: StoreAutomationProps): react_jsx_runtime.JSX.Element;
|
|
140
|
+
|
|
141
|
+
export { CatalogixChat, CreateStore, ProductAutomation, SelectProducts, StoreAutomation, catalogixManifest, configureApi };
|