@hubspot/ui-extensions 0.0.0 → 0.0.1-beta.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/types.ts DELETED
@@ -1,213 +0,0 @@
1
- // Do not manually update this file, changes will be overridden from ui-extensions-remote-renderer/static/js/types.ts
2
- import { ReactNode } from 'react';
3
-
4
- export interface AlertProps {
5
- title: string;
6
- body?: string;
7
- children?: ReactNode;
8
- variant?: 'info' | 'warning' | 'success' | 'error' | 'danger';
9
- }
10
-
11
- export interface ButtonProps {
12
- text: string;
13
- onClick?: () => void;
14
- href?: string;
15
- disabled?: boolean;
16
- variant?: 'primary' | 'secondary' | 'destructive';
17
- }
18
-
19
- export interface ButtonRowProps {
20
- children: ReactNode;
21
- disableDropdown?: boolean;
22
- }
23
-
24
- export interface DescriptionListItemProps {
25
- children: ReactNode;
26
- label: string;
27
- }
28
-
29
- export interface DescriptionListProps {
30
- children: ReactNode;
31
- direction?: 'row' | 'column';
32
- }
33
-
34
- export interface DividerProps {
35
- distance?:
36
- | 'flush'
37
- | 'extra-small'
38
- | 'small'
39
- | 'medium'
40
- | 'large'
41
- | 'extra-large';
42
- }
43
-
44
- export interface FormProps {
45
- children: ReactNode;
46
- onSubmit: () => void;
47
- }
48
-
49
- export interface HeadingProps {
50
- text: string;
51
- format?: 'plaintext' | 'markdown';
52
- }
53
-
54
- export interface ImageProps {
55
- alt?: string;
56
- href?: string;
57
- onClick?: () => void;
58
- src: string;
59
- width?: number;
60
- }
61
-
62
- export interface InputProps {
63
- label: string;
64
- name: string;
65
- value?: string;
66
- required?: boolean;
67
- readonly?: boolean;
68
- description?: string;
69
- tooltip?: string;
70
- placeholder?: string;
71
- error?: boolean;
72
- errorMessage?: string;
73
- visible?: boolean;
74
- onChange: (value: string) => void;
75
- onInput: (value: string) => void;
76
- }
77
-
78
- export interface ProgressBarProps {
79
- title?: string;
80
- showPercentage?: boolean;
81
- type: 'progressBar';
82
- value?: number;
83
- valueMax?: number;
84
- valueDescription?: string;
85
- variant?: 'success' | 'danger' | 'warning';
86
- }
87
-
88
- export interface SelectProps {
89
- label: string;
90
- name: string;
91
- value?: string | number | boolean;
92
- required?: boolean;
93
- readonly?: boolean;
94
- description?: string;
95
- tooltip?: string;
96
- placeholder?: string;
97
- error?: boolean;
98
- errorMessage?: string;
99
- onChange: (value: string) => void;
100
- options: {
101
- label: string;
102
- value: string | number | boolean;
103
- }[];
104
- }
105
-
106
- export interface TagProps {
107
- text: string;
108
- onClick?: () => void;
109
- variant?: 'default' | 'warning' | 'success' | 'error';
110
- }
111
-
112
- export interface TextProps {
113
- format?: 'plaintext' | 'markdown';
114
- text: string;
115
- variant?: 'bodytext' | 'microcopy';
116
- }
117
-
118
- export interface TileProps {
119
- children: ReactNode;
120
- flush?: boolean;
121
- }
122
-
123
- interface Team {
124
- id: number;
125
- name: string;
126
- teammates: number[];
127
- }
128
-
129
- export interface UserContext {
130
- id: number;
131
- emails: string[];
132
- email: string;
133
- firstName: string;
134
- lastName: string;
135
- roles: string[];
136
- teams: Team[];
137
- locale?: string;
138
- }
139
-
140
- export interface PortalContext {
141
- id: number;
142
- timezone: string;
143
- }
144
-
145
- export interface Context {
146
- user: UserContext;
147
- portal: PortalContext;
148
- }
149
-
150
- type distanceOptions = 'flush' | 'small';
151
-
152
- export interface StackProps {
153
- distance?: distanceOptions;
154
- children?: React.ReactNode;
155
- }
156
- export interface StatisticsTrendProps {
157
- value: string;
158
- direction: 'increase' | 'decrease';
159
- }
160
-
161
- export interface StatisticsItemProps {
162
- id?: string;
163
- label: string;
164
- number: string;
165
- children: ReactNode;
166
- }
167
-
168
- export interface StatisticsProps {
169
- children: ReactNode;
170
- }
171
-
172
- interface ServerlessRunnerParams {
173
- name: string;
174
- payload: Record<string, unknown>;
175
- onError?: () => void;
176
- }
177
-
178
- export type ServerlessFuncRunner = (
179
- params: ServerlessRunnerParams
180
- ) => Promise<any>;
181
-
182
- export interface ServerlessSuccessResponse {
183
- logId: string;
184
- response: {
185
- message?:
186
- | {
187
- type: 'SUCCESS' | 'ERROR';
188
- body: string;
189
- }
190
- | string;
191
- context?: Record<string, unknown>;
192
- section?: Record<string, unknown>;
193
- };
194
- }
195
-
196
- export interface ServerlessErrorResponse {
197
- responseJSON?: {
198
- message: string;
199
- correlationId: string;
200
- category: string;
201
- subCategory?: string;
202
- errors?: { message: string; subCategory: string }[];
203
- };
204
- status: number;
205
- }
206
-
207
- export interface ExtensionCardContextData {
208
- cardId: string;
209
- appId: number | string;
210
- objectId: number | string;
211
- objectTypeId: string;
212
- location: string;
213
- }