@startsimpli/funnels 0.1.2

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +564 -0
  3. package/dist/client-3ESO2NHy.d.ts +310 -0
  4. package/dist/client-CZu03ACp.d.cts +310 -0
  5. package/dist/components/index.cjs +3243 -0
  6. package/dist/components/index.cjs.map +1 -0
  7. package/dist/components/index.css +198 -0
  8. package/dist/components/index.css.map +1 -0
  9. package/dist/components/index.d.cts +726 -0
  10. package/dist/components/index.d.ts +726 -0
  11. package/dist/components/index.js +3196 -0
  12. package/dist/components/index.js.map +1 -0
  13. package/dist/core/index.cjs +500 -0
  14. package/dist/core/index.cjs.map +1 -0
  15. package/dist/core/index.d.cts +359 -0
  16. package/dist/core/index.d.ts +359 -0
  17. package/dist/core/index.js +486 -0
  18. package/dist/core/index.js.map +1 -0
  19. package/dist/hooks/index.cjs +21 -0
  20. package/dist/hooks/index.cjs.map +1 -0
  21. package/dist/hooks/index.d.cts +11 -0
  22. package/dist/hooks/index.d.ts +11 -0
  23. package/dist/hooks/index.js +19 -0
  24. package/dist/hooks/index.js.map +1 -0
  25. package/dist/index-BGDEXbuz.d.cts +434 -0
  26. package/dist/index-BGDEXbuz.d.ts +434 -0
  27. package/dist/index.cjs +4499 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.css +198 -0
  30. package/dist/index.css.map +1 -0
  31. package/dist/index.d.cts +99 -0
  32. package/dist/index.d.ts +99 -0
  33. package/dist/index.js +4421 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/store/index.cjs +391 -0
  36. package/dist/store/index.cjs.map +1 -0
  37. package/dist/store/index.d.cts +225 -0
  38. package/dist/store/index.d.ts +225 -0
  39. package/dist/store/index.js +388 -0
  40. package/dist/store/index.js.map +1 -0
  41. package/package.json +122 -0
package/dist/index.css ADDED
@@ -0,0 +1,198 @@
1
+ /* src/components/FunnelVisualFlow/FunnelVisualFlow.css */
2
+ .funnel-visual-flow {
3
+ position: relative;
4
+ width: 100%;
5
+ background: #f9fafb;
6
+ border-radius: 8px;
7
+ overflow: hidden;
8
+ }
9
+ .funnel-visual-flow-empty {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ background: #f9fafb;
14
+ border: 2px dashed #d1d5db;
15
+ border-radius: 8px;
16
+ }
17
+ .empty-state {
18
+ text-align: center;
19
+ padding: 32px;
20
+ }
21
+ .stage-node {
22
+ padding: 16px;
23
+ border-radius: 8px;
24
+ background: white;
25
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
26
+ min-width: 220px;
27
+ max-width: 280px;
28
+ text-align: center;
29
+ cursor: pointer;
30
+ transition: all 0.2s ease;
31
+ }
32
+ .stage-node:hover {
33
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
34
+ transform: translateY(-2px);
35
+ }
36
+ .stage-node:focus {
37
+ outline: none;
38
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
39
+ }
40
+ .stage-number {
41
+ font-size: 28px;
42
+ font-weight: 700;
43
+ line-height: 1;
44
+ margin-bottom: 8px;
45
+ }
46
+ .stage-name {
47
+ font-size: 16px;
48
+ font-weight: 600;
49
+ color: #111827;
50
+ margin-bottom: 4px;
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+ white-space: nowrap;
54
+ }
55
+ .stage-rules {
56
+ font-size: 13px;
57
+ color: #6b7280;
58
+ margin-bottom: 6px;
59
+ }
60
+ .stage-action {
61
+ font-size: 12px;
62
+ font-weight: 600;
63
+ text-transform: uppercase;
64
+ letter-spacing: 0.5px;
65
+ margin-bottom: 8px;
66
+ }
67
+ .stage-stats {
68
+ margin-top: 12px;
69
+ padding-top: 12px;
70
+ border-top: 1px solid #e5e7eb;
71
+ }
72
+ .stat-row {
73
+ display: flex;
74
+ justify-content: space-between;
75
+ font-size: 13px;
76
+ margin-bottom: 4px;
77
+ }
78
+ .stat-label {
79
+ color: #6b7280;
80
+ font-weight: 500;
81
+ }
82
+ .stat-value {
83
+ font-weight: 600;
84
+ color: #111827;
85
+ }
86
+ .stage-description {
87
+ margin-top: 8px;
88
+ font-size: 12px;
89
+ color: #9ca3af;
90
+ font-style: italic;
91
+ overflow: hidden;
92
+ text-overflow: ellipsis;
93
+ white-space: nowrap;
94
+ }
95
+ .flow-legend-panel {
96
+ background: transparent;
97
+ border: none;
98
+ }
99
+ .flow-legend {
100
+ background: white;
101
+ border-radius: 8px;
102
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
103
+ padding: 12px;
104
+ min-width: 140px;
105
+ }
106
+ .legend-toggle {
107
+ width: 100%;
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: space-between;
111
+ background: none;
112
+ border: none;
113
+ cursor: pointer;
114
+ padding: 0;
115
+ margin-bottom: 8px;
116
+ }
117
+ .legend-toggle:hover {
118
+ opacity: 0.8;
119
+ }
120
+ .legend-toggle:focus {
121
+ outline: 2px solid #3b82f6;
122
+ outline-offset: 2px;
123
+ border-radius: 4px;
124
+ }
125
+ .legend-title {
126
+ font-size: 13px;
127
+ font-weight: 600;
128
+ color: #374151;
129
+ }
130
+ .legend-chevron {
131
+ transition: transform 0.2s ease;
132
+ color: #6b7280;
133
+ }
134
+ .legend-chevron.expanded {
135
+ transform: rotate(180deg);
136
+ }
137
+ .legend-items {
138
+ display: flex;
139
+ flex-direction: column;
140
+ gap: 8px;
141
+ }
142
+ .legend-item {
143
+ display: flex;
144
+ align-items: center;
145
+ gap: 8px;
146
+ }
147
+ .legend-color {
148
+ width: 16px;
149
+ height: 16px;
150
+ border-radius: 4px;
151
+ flex-shrink: 0;
152
+ }
153
+ .legend-label {
154
+ font-size: 12px;
155
+ color: #4b5563;
156
+ font-weight: 500;
157
+ }
158
+ .react-flow__edge-path {
159
+ stroke-width: 2;
160
+ }
161
+ .react-flow__edge-text {
162
+ font-size: 12px;
163
+ font-weight: 600;
164
+ }
165
+ .react-flow__controls {
166
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
167
+ }
168
+ .react-flow__controls-button {
169
+ border-bottom: 1px solid #e5e7eb;
170
+ }
171
+ .react-flow__controls-button:hover {
172
+ background: #f3f4f6;
173
+ }
174
+ .react-flow__background {
175
+ background-color: #f9fafb;
176
+ }
177
+ .react-flow__attribution {
178
+ opacity: 0.5;
179
+ font-size: 10px;
180
+ }
181
+ @media (max-width: 640px) {
182
+ .stage-node {
183
+ min-width: 180px;
184
+ max-width: 220px;
185
+ padding: 12px;
186
+ }
187
+ .stage-number {
188
+ font-size: 24px;
189
+ }
190
+ .stage-name {
191
+ font-size: 14px;
192
+ }
193
+ .flow-legend {
194
+ min-width: 120px;
195
+ padding: 8px;
196
+ }
197
+ }
198
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/FunnelVisualFlow/FunnelVisualFlow.css"],"sourcesContent":["/**\n * FunnelVisualFlow Styles\n *\n * Design System:\n * - Uses Tailwind-like utility values\n * - Consistent spacing (4px grid)\n * - Clean, minimal aesthetic\n * - Smooth transitions\n */\n\n/* =============================================================================\n * Flow Container\n * ============================================================================= */\n\n.funnel-visual-flow {\n position: relative;\n width: 100%;\n background: #f9fafb; /* gray-50 */\n border-radius: 8px;\n overflow: hidden;\n}\n\n.funnel-visual-flow-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n background: #f9fafb;\n border: 2px dashed #d1d5db; /* gray-300 */\n border-radius: 8px;\n}\n\n.empty-state {\n text-align: center;\n padding: 32px;\n}\n\n/* =============================================================================\n * Stage Node\n * ============================================================================= */\n\n.stage-node {\n padding: 16px;\n border-radius: 8px;\n background: white;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n min-width: 220px;\n max-width: 280px;\n text-align: center;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.stage-node:hover {\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n transform: translateY(-2px);\n}\n\n.stage-node:focus {\n outline: none;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);\n}\n\n/* Stage number (circled number) */\n.stage-number {\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n margin-bottom: 8px;\n}\n\n/* Stage name */\n.stage-name {\n font-size: 16px;\n font-weight: 600;\n color: #111827; /* gray-900 */\n margin-bottom: 4px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Rule count */\n.stage-rules {\n font-size: 13px;\n color: #6b7280; /* gray-500 */\n margin-bottom: 6px;\n}\n\n/* Action label */\n.stage-action {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 8px;\n}\n\n/* Stats section */\n.stage-stats {\n margin-top: 12px;\n padding-top: 12px;\n border-top: 1px solid #e5e7eb; /* gray-200 */\n}\n\n.stat-row {\n display: flex;\n justify-content: space-between;\n font-size: 13px;\n margin-bottom: 4px;\n}\n\n.stat-label {\n color: #6b7280; /* gray-500 */\n font-weight: 500;\n}\n\n.stat-value {\n font-weight: 600;\n color: #111827; /* gray-900 */\n}\n\n/* Description (if shown) */\n.stage-description {\n margin-top: 8px;\n font-size: 12px;\n color: #9ca3af; /* gray-400 */\n font-style: italic;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* =============================================================================\n * Flow Legend\n * ============================================================================= */\n\n.flow-legend-panel {\n background: transparent;\n border: none;\n}\n\n.flow-legend {\n background: white;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n padding: 12px;\n min-width: 140px;\n}\n\n.legend-toggle {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n margin-bottom: 8px;\n}\n\n.legend-toggle:hover {\n opacity: 0.8;\n}\n\n.legend-toggle:focus {\n outline: 2px solid #3b82f6;\n outline-offset: 2px;\n border-radius: 4px;\n}\n\n.legend-title {\n font-size: 13px;\n font-weight: 600;\n color: #374151; /* gray-700 */\n}\n\n.legend-chevron {\n transition: transform 0.2s ease;\n color: #6b7280; /* gray-500 */\n}\n\n.legend-chevron.expanded {\n transform: rotate(180deg);\n}\n\n.legend-items {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.legend-item {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.legend-color {\n width: 16px;\n height: 16px;\n border-radius: 4px;\n flex-shrink: 0;\n}\n\n.legend-label {\n font-size: 12px;\n color: #4b5563; /* gray-600 */\n font-weight: 500;\n}\n\n/* =============================================================================\n * React Flow Overrides\n * ============================================================================= */\n\n/* Make edges more visible */\n.react-flow__edge-path {\n stroke-width: 2;\n}\n\n/* Edge labels */\n.react-flow__edge-text {\n font-size: 12px;\n font-weight: 600;\n}\n\n/* Controls */\n.react-flow__controls {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.react-flow__controls-button {\n border-bottom: 1px solid #e5e7eb;\n}\n\n.react-flow__controls-button:hover {\n background: #f3f4f6;\n}\n\n/* Background */\n.react-flow__background {\n background-color: #f9fafb;\n}\n\n/* Attribution */\n.react-flow__attribution {\n opacity: 0.5;\n font-size: 10px;\n}\n\n/* =============================================================================\n * Responsive Design\n * ============================================================================= */\n\n@media (max-width: 640px) {\n .stage-node {\n min-width: 180px;\n max-width: 220px;\n padding: 12px;\n }\n\n .stage-number {\n font-size: 24px;\n }\n\n .stage-name {\n font-size: 14px;\n }\n\n .flow-legend {\n min-width: 120px;\n padding: 8px;\n }\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,99 @@
1
+ export { C as CreateFunnelInput, a as CreateStageInput, D as DeepPartial, F as FieldConstraints, b as FieldDefinition, c as FieldPath, d as FieldRegistry, e as FieldType, f as FilterConfig, g as FilterLogic, h as FilterRule, i as Funnel, j as FunnelResult, k as FunnelRun, l as FunnelRunStatus, m as FunnelStage, n as FunnelStatus, I as InputType, M as MatchAction, N as NoMatchAction, O as Operator, R as RuleResult, S as StageResult, o as StageStats, T as TriggerType, U as UpdateFunnelInput, p as UpdateStageInput, V as ValidOperators, q as getValidOperators, r as isFieldDefinition, s as isFilterRule, t as isFunnel, u as isFunnelResult, v as isFunnelRun, w as isStage, x as isValidOperator, y as validateFilterRule, z as validateFunnel, A as validateStage } from './index-BGDEXbuz.cjs';
2
+ export { ExecutionResult, FunnelEngine, applyOperator, evaluateRule, evaluateRuleWithResult, evaluateRules, evaluateRulesAND, evaluateRulesOR, evaluateRulesWithResults, filterEntities, getFields, hasField, resolveField, setField } from './core/index.cjs';
3
+ import { A as ApiAdapter } from './client-CZu03ACp.cjs';
4
+ export { a as ApiError, F as FunnelApiClient, b as FunnelListFilters, P as PaginatedResponse, c as createApiError, i as isApiError } from './client-CZu03ACp.cjs';
5
+ export { FunnelStore, createFunnelStore, createInitialState } from './store/index.cjs';
6
+ export { useDebouncedValue } from './hooks/index.cjs';
7
+ export { AddStageButton, AddStageButtonProps, BooleanValueInput, ChoiceValueInput, DateValueInput, EntityCard, FieldSelector, FilterRuleEditor, FilterRuleEditorProps, FlowLegend, FunnelCard, FunnelCardProps, FunnelPreview, FunnelPreviewProps, FunnelRunHistory, FunnelStageBuilder, FunnelStageBuilderProps, FunnelStats, FunnelVisualFlow, FunnelVisualFlowProps, LoadingPreview, LogicToggle, MULTI_VALUE_OPERATORS, MatchBar, MultiChoiceValueInput, NULL_VALUE_OPERATORS, NumberValueInput, OPERATOR_LABELS, OperatorSelector, Pagination, PreviewResult, PreviewStats, RuleRow, RunAction, RunActions, RunDetailsModal, RunFilters, RunFiltersType, RunRow, RunSort, RunStatusBadge, StageActions, StageActionsProps, StageBreakdown, StageBreakdownList, StageCard, StageCardProps, StageForm, StageFormProps, StageIndicator, StageNode, StageNodeData, StagePreviewStats, StatusBadge, TagInput, TagInputProps, TextValueInput, calculateMatchRate, formatDuration, formatFullTimestamp, formatNumber, formatRelativeTime, getCircledNumber } from './components/index.cjs';
8
+ import 'zustand';
9
+ import 'react/jsx-runtime';
10
+ import 'react';
11
+ import '@xyflow/react';
12
+
13
+ /**
14
+ * FetchAdapter - Default fetch-based implementation
15
+ *
16
+ * Simple adapter using standard fetch API.
17
+ * Suitable for apps that don't need custom authentication.
18
+ *
19
+ * @packageDocumentation
20
+ */
21
+
22
+ /**
23
+ * Configuration options for FetchAdapter
24
+ */
25
+ interface FetchAdapterConfig {
26
+ /** Optional headers to include in all requests */
27
+ headers?: Record<string, string>;
28
+ /** Request timeout in milliseconds (default: 30000) */
29
+ timeout?: number;
30
+ /**
31
+ * Handle response parsing
32
+ * Default: response.json()
33
+ */
34
+ parseResponse?: (response: Response) => Promise<any>;
35
+ /**
36
+ * Transform error before throwing
37
+ * Useful for logging, monitoring, etc.
38
+ */
39
+ onError?: (error: Error) => void;
40
+ }
41
+ /**
42
+ * Default fetch-based adapter
43
+ *
44
+ * Features:
45
+ * - JSON request/response handling
46
+ * - Configurable headers
47
+ * - Request timeout
48
+ * - Error transformation
49
+ *
50
+ * Example:
51
+ * ```ts
52
+ * const adapter = new FetchAdapter({
53
+ * headers: { 'X-API-Key': 'secret' },
54
+ * timeout: 10000
55
+ * });
56
+ * ```
57
+ */
58
+ declare class FetchAdapter implements ApiAdapter {
59
+ private config;
60
+ constructor(config?: FetchAdapterConfig);
61
+ /**
62
+ * Build fetch options
63
+ */
64
+ private buildOptions;
65
+ /**
66
+ * Build URL with query params
67
+ */
68
+ private buildUrl;
69
+ /**
70
+ * Fetch with timeout
71
+ */
72
+ private fetchWithTimeout;
73
+ /**
74
+ * Handle response
75
+ */
76
+ private handleResponse;
77
+ /**
78
+ * Execute request
79
+ */
80
+ private request;
81
+ /**
82
+ * HTTP GET
83
+ */
84
+ get<T>(url: string, params?: Record<string, any>): Promise<T>;
85
+ /**
86
+ * HTTP POST
87
+ */
88
+ post<T>(url: string, data: any): Promise<T>;
89
+ /**
90
+ * HTTP PATCH
91
+ */
92
+ patch<T>(url: string, data: any): Promise<T>;
93
+ /**
94
+ * HTTP DELETE
95
+ */
96
+ delete<T>(url: string): Promise<T>;
97
+ }
98
+
99
+ export { ApiAdapter, FetchAdapter, type FetchAdapterConfig };
@@ -0,0 +1,99 @@
1
+ export { C as CreateFunnelInput, a as CreateStageInput, D as DeepPartial, F as FieldConstraints, b as FieldDefinition, c as FieldPath, d as FieldRegistry, e as FieldType, f as FilterConfig, g as FilterLogic, h as FilterRule, i as Funnel, j as FunnelResult, k as FunnelRun, l as FunnelRunStatus, m as FunnelStage, n as FunnelStatus, I as InputType, M as MatchAction, N as NoMatchAction, O as Operator, R as RuleResult, S as StageResult, o as StageStats, T as TriggerType, U as UpdateFunnelInput, p as UpdateStageInput, V as ValidOperators, q as getValidOperators, r as isFieldDefinition, s as isFilterRule, t as isFunnel, u as isFunnelResult, v as isFunnelRun, w as isStage, x as isValidOperator, y as validateFilterRule, z as validateFunnel, A as validateStage } from './index-BGDEXbuz.js';
2
+ export { ExecutionResult, FunnelEngine, applyOperator, evaluateRule, evaluateRuleWithResult, evaluateRules, evaluateRulesAND, evaluateRulesOR, evaluateRulesWithResults, filterEntities, getFields, hasField, resolveField, setField } from './core/index.js';
3
+ import { A as ApiAdapter } from './client-3ESO2NHy.js';
4
+ export { a as ApiError, F as FunnelApiClient, b as FunnelListFilters, P as PaginatedResponse, c as createApiError, i as isApiError } from './client-3ESO2NHy.js';
5
+ export { FunnelStore, createFunnelStore, createInitialState } from './store/index.js';
6
+ export { useDebouncedValue } from './hooks/index.js';
7
+ export { AddStageButton, AddStageButtonProps, BooleanValueInput, ChoiceValueInput, DateValueInput, EntityCard, FieldSelector, FilterRuleEditor, FilterRuleEditorProps, FlowLegend, FunnelCard, FunnelCardProps, FunnelPreview, FunnelPreviewProps, FunnelRunHistory, FunnelStageBuilder, FunnelStageBuilderProps, FunnelStats, FunnelVisualFlow, FunnelVisualFlowProps, LoadingPreview, LogicToggle, MULTI_VALUE_OPERATORS, MatchBar, MultiChoiceValueInput, NULL_VALUE_OPERATORS, NumberValueInput, OPERATOR_LABELS, OperatorSelector, Pagination, PreviewResult, PreviewStats, RuleRow, RunAction, RunActions, RunDetailsModal, RunFilters, RunFiltersType, RunRow, RunSort, RunStatusBadge, StageActions, StageActionsProps, StageBreakdown, StageBreakdownList, StageCard, StageCardProps, StageForm, StageFormProps, StageIndicator, StageNode, StageNodeData, StagePreviewStats, StatusBadge, TagInput, TagInputProps, TextValueInput, calculateMatchRate, formatDuration, formatFullTimestamp, formatNumber, formatRelativeTime, getCircledNumber } from './components/index.js';
8
+ import 'zustand';
9
+ import 'react/jsx-runtime';
10
+ import 'react';
11
+ import '@xyflow/react';
12
+
13
+ /**
14
+ * FetchAdapter - Default fetch-based implementation
15
+ *
16
+ * Simple adapter using standard fetch API.
17
+ * Suitable for apps that don't need custom authentication.
18
+ *
19
+ * @packageDocumentation
20
+ */
21
+
22
+ /**
23
+ * Configuration options for FetchAdapter
24
+ */
25
+ interface FetchAdapterConfig {
26
+ /** Optional headers to include in all requests */
27
+ headers?: Record<string, string>;
28
+ /** Request timeout in milliseconds (default: 30000) */
29
+ timeout?: number;
30
+ /**
31
+ * Handle response parsing
32
+ * Default: response.json()
33
+ */
34
+ parseResponse?: (response: Response) => Promise<any>;
35
+ /**
36
+ * Transform error before throwing
37
+ * Useful for logging, monitoring, etc.
38
+ */
39
+ onError?: (error: Error) => void;
40
+ }
41
+ /**
42
+ * Default fetch-based adapter
43
+ *
44
+ * Features:
45
+ * - JSON request/response handling
46
+ * - Configurable headers
47
+ * - Request timeout
48
+ * - Error transformation
49
+ *
50
+ * Example:
51
+ * ```ts
52
+ * const adapter = new FetchAdapter({
53
+ * headers: { 'X-API-Key': 'secret' },
54
+ * timeout: 10000
55
+ * });
56
+ * ```
57
+ */
58
+ declare class FetchAdapter implements ApiAdapter {
59
+ private config;
60
+ constructor(config?: FetchAdapterConfig);
61
+ /**
62
+ * Build fetch options
63
+ */
64
+ private buildOptions;
65
+ /**
66
+ * Build URL with query params
67
+ */
68
+ private buildUrl;
69
+ /**
70
+ * Fetch with timeout
71
+ */
72
+ private fetchWithTimeout;
73
+ /**
74
+ * Handle response
75
+ */
76
+ private handleResponse;
77
+ /**
78
+ * Execute request
79
+ */
80
+ private request;
81
+ /**
82
+ * HTTP GET
83
+ */
84
+ get<T>(url: string, params?: Record<string, any>): Promise<T>;
85
+ /**
86
+ * HTTP POST
87
+ */
88
+ post<T>(url: string, data: any): Promise<T>;
89
+ /**
90
+ * HTTP PATCH
91
+ */
92
+ patch<T>(url: string, data: any): Promise<T>;
93
+ /**
94
+ * HTTP DELETE
95
+ */
96
+ delete<T>(url: string): Promise<T>;
97
+ }
98
+
99
+ export { ApiAdapter, FetchAdapter, type FetchAdapterConfig };