-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanel-config.json
More file actions
392 lines (392 loc) · 12.4 KB
/
panel-config.json
File metadata and controls
392 lines (392 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
{
"basicInfo": {
"displayName": {
"label": "Integration Name",
"description": "The display name shown to users",
"dataType": "string",
"htmlType": "text",
"required": true,
"placeholder": "e.g., Salesforce"
},
"id": {
"label": "Unique Identifier",
"description": "Lowercase, numbers, hyphens, and underscores only",
"dataType": "string",
"htmlType": "text",
"required": true,
"pattern": "^[a-z0-9_-]+$",
"placeholder": "e.g., salesforce"
},
"category": {
"label": "Category",
"description": "Select the category that best fits this integration",
"dataType": "string",
"htmlType": "select",
"required": true,
"options": [
{ "value": "crm", "label": "CRM" },
{ "value": "payment", "label": "Payment" },
{ "value": "database", "label": "Database" },
{ "value": "communication", "label": "Communication" },
{ "value": "analytics", "label": "Analytics" },
{ "value": "storage", "label": "Storage" },
{ "value": "other", "label": "Other" }
]
},
"version": {
"label": "Version",
"description": "Semantic versioning (e.g., 1.0.0)",
"dataType": "string",
"htmlType": "text",
"required": false,
"default": "1.0.0",
"placeholder": "1.0.0"
},
"description": {
"label": "Description",
"description": "Describe what this integration does",
"dataType": "string",
"htmlType": "textarea",
"required": true,
"placeholder": "Describe what this integration does..."
},
"status": {
"label": "Status",
"description": "Current status of the integration",
"dataType": "string",
"htmlType": "select",
"required": true,
"default": "inactive",
"options": [
{ "value": "active", "label": "Active", "color": "#10b981", "bgColor": "#d1fae5" },
{ "value": "inactive", "label": "Inactive", "color": "#ef4444", "bgColor": "#fee2e2" },
{ "value": "beta", "label": "Beta", "color": "#f59e0b", "bgColor": "#fef3c7" }
]
},
"iconUrl": {
"label": "Icon URL",
"description": "URL to the integration's icon/logo",
"dataType": "url",
"htmlType": "text",
"required": false,
"placeholder": "explore https://seeklogo.com/"
},
"docsUrl": {
"label": "Documentation URL",
"description": "Link to integration documentation",
"dataType": "url",
"htmlType": "text",
"required": false,
"placeholder": "https://docs.example.com"
}
},
"features": {
"name": {
"label": "Feature Name",
"description": "Name of the API feature",
"dataType": "string",
"htmlType": "text",
"required": true,
"placeholder": "e.g., Get Contacts"
},
"id": {
"label": "Feature ID",
"description": "Unique identifier for this feature",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": "e.g., get_contacts"
},
"description": {
"label": "Description",
"description": "Brief description of what this feature does",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": "Brief description"
},
"method": {
"label": "HTTP Method",
"description": "HTTP method for this endpoint",
"dataType": "string",
"htmlType": "select",
"required": true,
"options": [
{ "value": "GET", "label": "GET" },
{ "value": "POST", "label": "POST" },
{ "value": "PUT", "label": "PUT" },
{ "value": "PATCH", "label": "PATCH" },
{ "value": "DELETE", "label": "DELETE" }
]
},
"path": {
"label": "Endpoint Path",
"description": "API endpoint path (must start with /)",
"dataType": "string",
"htmlType": "text",
"required": true,
"pattern": "^\\/.*",
"placeholder": "/api/v1/contacts"
}
},
"rateLimits": {
"path": {
"label": "Endpoint Path",
"description": "Path pattern (use * for wildcards, e.g., /api/*)",
"dataType": "string",
"htmlType": "text",
"required": true,
"placeholder": "/api/v1/*"
},
"requestsPerMinute": {
"label": "Requests per Minute",
"description": "Maximum requests allowed per minute",
"dataType": "number",
"htmlType": "number",
"required": true,
"min": 1,
"default": 60
},
"requestsPerHour": {
"label": "Requests per Hour",
"description": "Maximum requests allowed per hour",
"dataType": "number",
"htmlType": "number",
"required": true,
"min": 1,
"default": 3000
},
"requestsPerDay": {
"label": "Requests per Day",
"description": "Maximum requests allowed per day",
"dataType": "number",
"htmlType": "number",
"required": true,
"min": 1,
"default": 50000
},
"concurrentRequests": {
"label": "Concurrent Requests",
"description": "Maximum simultaneous requests",
"dataType": "number",
"htmlType": "number",
"required": true,
"min": 1,
"default": 10
}
},
"additionalFields": {
"name": {
"label": "Field Name",
"description": "Internal field name (lowercase, no spaces, underscores/hyphens only)",
"dataType": "string",
"htmlType": "text",
"required": true,
"pattern": "^[a-z0-9_-]+$",
"placeholder": "e.g., company_subdomain, tenant_id"
},
"label": {
"label": "Display Label",
"description": "User-friendly label shown in forms",
"dataType": "string",
"htmlType": "text",
"required": true,
"placeholder": "e.g., Company Subdomain, Tenant ID"
},
"type": {
"label": "Field Type",
"description": "Data type for validation and rendering",
"dataType": "string",
"htmlType": "select",
"required": true,
"default": "string",
"options": [
{ "value": "string", "label": "String (Text)" },
{ "value": "number", "label": "Number" },
{ "value": "boolean", "label": "Boolean (Yes/No)" },
{ "value": "url", "label": "URL" },
{ "value": "email", "label": "Email" },
{ "value": "select", "label": "Dropdown (Select)" }
]
},
"required": {
"label": "Required Field",
"description": "Is this field mandatory?",
"dataType": "boolean",
"htmlType": "select",
"required": true,
"default": true,
"options": [
{ "value": true, "label": "Yes (Required)" },
{ "value": false, "label": "No (Optional)" }
]
},
"placeholder": {
"label": "Placeholder Text",
"description": "Help text shown in empty field",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": "e.g., Enter your company subdomain"
},
"description": {
"label": "Help Text",
"description": "Additional instructions for users",
"dataType": "string",
"htmlType": "textarea",
"required": false,
"placeholder": "e.g., This can be found in your account settings"
},
"default": {
"label": "Default Value",
"description": "Pre-filled value (optional)",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": ""
},
"useAs": {
"label": "Use As",
"description": "How this field should be used in authentication",
"dataType": "string",
"htmlType": "select",
"required": true,
"default": "credential",
"options": [
{ "value": "credential", "label": "Credential (User Input)" },
{ "value": "header", "label": "HTTP Header" },
{ "value": "variable", "label": "URL Variable" }
]
},
"fillBy": {
"label": "Filled By",
"description": "Who provides the value for this field",
"dataType": "string",
"htmlType": "select",
"required": true,
"default": "user",
"options": [
{ "value": "user", "label": "User (End-user input during connection)" },
{ "value": "admin", "label": "Admin (Set by admin during integration creation)" }
]
},
"headerName": {
"label": "Header Name",
"description": "Actual HTTP header name (only used when useAs='header')",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": "e.g., User-Agent, Accept, X-Custom-Header"
},
"defaultValue": {
"label": "Admin Value",
"description": "Value set by admin (shown when fillBy='admin')",
"dataType": "string",
"htmlType": "text",
"required": false,
"placeholder": "e.g., IntegrationPlatform/1.0"
},
"encrypted": {
"label": "Encrypt Value",
"description": "Should this value be encrypted in storage?",
"dataType": "boolean",
"htmlType": "select",
"required": true,
"default": false,
"options": [
{ "value": true, "label": "Yes (Encrypt)" },
{ "value": false, "label": "No (Plain Text)" }
]
},
"htmlType": {
"label": "Input Type",
"description": "HTML input type for rendering in forms",
"dataType": "string",
"htmlType": "select",
"required": false,
"default": "text",
"options": [
{ "value": "text", "label": "Text" },
{ "value": "password", "label": "Password (Masked)" },
{ "value": "textarea", "label": "Textarea (Multi-line)" },
{ "value": "number", "label": "Number" },
{ "value": "email", "label": "Email" },
{ "value": "url", "label": "URL" }
]
}
},
"customHandlers": {
"valueHandler": {
"id": "valueHandler",
"label": "Value Handler",
"description": "Transform or normalize field values before processing",
"placeholder": "e.g., capitalizeFirstName, formatPhoneNumber",
"icon": "↓",
"helpText": "Function to transform field values (e.g., uppercase, trim spaces)",
"category": "transformation",
"order": 1
},
"validationHandler": {
"id": "validationHandler",
"label": "Validation Handler",
"description": "Validate field values and return error messages if invalid",
"placeholder": "e.g., validateEmail, validatePhoneNumber",
"icon": "✓",
"helpText": "Function to validate field values (returns true or error message)",
"category": "validation",
"order": 2
},
"submitHandler": {
"id": "submitHandler",
"label": "Submit Handler",
"description": "Process field values before API submission",
"placeholder": "e.g., encryptData, base64Encode",
"icon": "⚙",
"helpText": "Function to process values before sending to API",
"category": "submission",
"order": 3
},
"formatHandler": {
"id": "formatHandler",
"label": "Format Handler",
"description": "Format field values for display purposes",
"placeholder": "e.g., formatCurrency, formatDate",
"icon": "📝",
"helpText": "Function to format values for display",
"category": "formatting",
"order": 4
},
"parseHandler": {
"id": "parseHandler",
"label": "Parse Handler",
"description": "Parse incoming data before populating fields",
"placeholder": "e.g., parseJSON, parseXML",
"icon": "🔍",
"helpText": "Function to parse data from API responses",
"category": "parsing",
"order": 5
},
"conditionalHandler": {
"id": "conditionalHandler",
"label": "Conditional Handler",
"description": "Determine if field should be shown/enabled based on conditions",
"placeholder": "e.g., showIfPremium, enableIfAdmin",
"icon": "🔀",
"helpText": "Function to evaluate field visibility/enablement",
"category": "conditional",
"order": 6
}
},
"customHandlers_for_feature": {
"submitHandler": {
"id": "submitHandler",
"label": "Submit Handler",
"description": "Process entire feature data before API submission",
"placeholder": "e.g., transformPayload, validateAllFields, prepareRequest",
"icon": "🚀",
"helpText": "Function to process complete feature data before sending to API. Useful for payload transformation, final validation, or custom business logic.",
"category": "feature-submission",
"order": 1
}
}
}