@fusebase/fusebase-gate-sdk 1.0.2-sdk.0

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 (88) hide show
  1. package/README.md +52 -0
  2. package/dist/apis/CustomDashboardRowsApi.d.ts +113 -0
  3. package/dist/apis/CustomDashboardRowsApi.js +122 -0
  4. package/dist/apis/DashboardDataApi.d.ts +98 -0
  5. package/dist/apis/DashboardDataApi.js +91 -0
  6. package/dist/apis/DashboardRelationsApi.d.ts +92 -0
  7. package/dist/apis/DashboardRelationsApi.js +117 -0
  8. package/dist/apis/DashboardsApi.d.ts +405 -0
  9. package/dist/apis/DashboardsApi.js +507 -0
  10. package/dist/apis/DatabasesApi.d.ts +134 -0
  11. package/dist/apis/DatabasesApi.js +162 -0
  12. package/dist/apis/HealthApi.d.ts +19 -0
  13. package/dist/apis/HealthApi.js +28 -0
  14. package/dist/apis/OrgUsersApi.d.ts +22 -0
  15. package/dist/apis/OrgUsersApi.js +29 -0
  16. package/dist/apis/ResolveApi.d.ts +20 -0
  17. package/dist/apis/ResolveApi.js +29 -0
  18. package/dist/apis/TemplatesApi.d.ts +100 -0
  19. package/dist/apis/TemplatesApi.js +124 -0
  20. package/dist/apis/TokensApi.d.ts +71 -0
  21. package/dist/apis/TokensApi.js +95 -0
  22. package/dist/extras/fetchWithRetry.d.ts +30 -0
  23. package/dist/extras/fetchWithRetry.js +53 -0
  24. package/dist/extras/messaging.d.ts +81 -0
  25. package/dist/extras/messaging.js +16 -0
  26. package/dist/index.d.ts +11 -0
  27. package/dist/index.js +31 -0
  28. package/dist/runtime/index.d.ts +5 -0
  29. package/dist/runtime/index.js +21 -0
  30. package/dist/runtime/transport.d.ts +28 -0
  31. package/dist/runtime/transport.js +237 -0
  32. package/dist/runtime/types.d.ts +52 -0
  33. package/dist/runtime/types.js +23 -0
  34. package/dist/types/common/portal-form.d.ts +14 -0
  35. package/dist/types/common/portal-form.js +8 -0
  36. package/dist/types/dashboard/custom-item.d.ts +53 -0
  37. package/dist/types/dashboard/custom-item.js +22 -0
  38. package/dist/types/dashboard/dashboard.d.ts +421 -0
  39. package/dist/types/dashboard/dashboard.js +8 -0
  40. package/dist/types/dashboard/dashboards.d.ts +19 -0
  41. package/dist/types/dashboard/dashboards.js +8 -0
  42. package/dist/types/dashboard/data.d.ts +10 -0
  43. package/dist/types/dashboard/data.js +8 -0
  44. package/dist/types/dashboard/export.d.ts +11 -0
  45. package/dist/types/dashboard/export.js +8 -0
  46. package/dist/types/dashboard/index.d.ts +215 -0
  47. package/dist/types/dashboard/index.js +34 -0
  48. package/dist/types/dashboard/intent.d.ts +243 -0
  49. package/dist/types/dashboard/intent.js +8 -0
  50. package/dist/types/dashboard/items.d.ts +14 -0
  51. package/dist/types/dashboard/items.js +8 -0
  52. package/dist/types/dashboard/metadata.d.ts +12 -0
  53. package/dist/types/dashboard/metadata.js +8 -0
  54. package/dist/types/dashboard/render.d.ts +188 -0
  55. package/dist/types/dashboard/render.js +51 -0
  56. package/dist/types/dashboard/rows.d.ts +77 -0
  57. package/dist/types/dashboard/rows.js +14 -0
  58. package/dist/types/dashboard/schema.d.ts +172 -0
  59. package/dist/types/dashboard/schema.js +17 -0
  60. package/dist/types/dashboard/values.d.ts +187 -0
  61. package/dist/types/dashboard/values.js +8 -0
  62. package/dist/types/dashboard/view.d.ts +249 -0
  63. package/dist/types/dashboard/view.js +8 -0
  64. package/dist/types/database/database.d.ts +203 -0
  65. package/dist/types/database/database.js +8 -0
  66. package/dist/types/database/export.d.ts +11 -0
  67. package/dist/types/database/export.js +8 -0
  68. package/dist/types/index.d.ts +31 -0
  69. package/dist/types/index.js +30 -0
  70. package/dist/types/org-user/org-user.d.ts +19 -0
  71. package/dist/types/org-user/org-user.js +6 -0
  72. package/dist/types/relations/relations.d.ts +138 -0
  73. package/dist/types/relations/relations.js +14 -0
  74. package/dist/types/resolve/resolve.d.ts +86 -0
  75. package/dist/types/resolve/resolve.js +20 -0
  76. package/dist/types/shared/common.d.ts +122 -0
  77. package/dist/types/shared/common.js +24 -0
  78. package/dist/types/shared/enums.d.ts +64 -0
  79. package/dist/types/shared/enums.js +52 -0
  80. package/dist/types/shared/health.d.ts +12 -0
  81. package/dist/types/shared/health.js +8 -0
  82. package/dist/types/shared/parameters.d.ts +95 -0
  83. package/dist/types/shared/parameters.js +2 -0
  84. package/dist/types/template/template.d.ts +74 -0
  85. package/dist/types/template/template.js +8 -0
  86. package/dist/types/token/token.d.ts +184 -0
  87. package/dist/types/token/token.js +8 -0
  88. package/package.json +16 -0
@@ -0,0 +1,405 @@
1
+ /**
2
+ * Dashboards API
3
+ *
4
+ * Generated from contract introspection
5
+ * Domain: dashboards
6
+ */
7
+ import type { Client } from "../runtime/transport";
8
+ import type { AliasContract, aliasInQueryOptional, aliasInQueryRequired, AssignRepresentationToViewRequestContract, CopyDashboardFromDashboardRequestContract, copyDataInQueryRequired, copyRelationsInQueryRequired, copyViewsInQueryRequired, CreateDashboardFromFormRequestContract, CreateDashboardFromTemplateRequestContract, CreateDashboardIntentRequestContract, CreateDashboardRequestContract, CreateDashboardViewRepresentationTemplateRequestContract, CreateDashboardViewRepresentationTemplateResponseContract, CreateDashboardViewRequestContract, createDefaultRowsInQuery, CreateViewIntentRequestContract, DashboardAllowedSchemaItemsResponseContract, DashboardDescribeResponseContract, dashboardIdInPathRequired, DashboardListResponseContract, DashboardResponseContract, DashboardViewRepresentationTemplateListResponseContract, DashboardViewResponseContract, databaseIdInQueryRequired, DeleteDashboardSchemaItem200ResponseContract, ExportDashboardAsJson200ResponseContract, GetChildTableLinkDashboardRequestContract, GetChildTableLinkDashboardResponseContract, GetOrCreateDashboardRequestContract, GetOrCreateDashboardResponseContract, ImportDashboardRequestContract, mappingInQueryRequiredContract, nameInQueryOptional, PortalFormInfoListResponseContract, rootEntitiesInQueryOptional, rootEntityInQueryOptional, scopeIdInQueryRequired, scopeTypeInQueryRequired, scopeTypeOrgInQueryRequired, StandardApiResponseContract, UpdateDashboardRequestContract, UpdateDashboardViewFiltersRequestContract, UpdateDashboardViewRequestContract, UpdateSchemaIntentRequestContract, viewIdInPathRequired, viewIdInQueryOptional } from "../types";
9
+ export declare class DashboardsApi {
10
+ private client;
11
+ constructor(client: Client);
12
+ /**
13
+ * Assign or update representation for a view
14
+ * Create or update a representation instance for a dashboard view. If this is the first representation for the view, it will automatically be set as default.
15
+ */
16
+ assignRepresentationToView(params: {
17
+ path: {
18
+ representationTemplateId: string;
19
+ dashboardId: dashboardIdInPathRequired;
20
+ viewId: viewIdInPathRequired;
21
+ };
22
+ headers?: Record<string, string>;
23
+ body?: AssignRepresentationToViewRequestContract;
24
+ }): Promise<StandardApiResponseContract>;
25
+ /**
26
+ * Copy dashboard from another dashboard
27
+ * Create a new dashboard by copying an existing dashboard with all its views, representations, rows, and optionally data
28
+ */
29
+ copyDashboardFromDashboard(params: {
30
+ query?: {
31
+ copy_views: copyViewsInQueryRequired;
32
+ copy_data: copyDataInQueryRequired;
33
+ copy_relations: copyRelationsInQueryRequired;
34
+ create_default_rows?: createDefaultRowsInQuery;
35
+ };
36
+ headers?: Record<string, string>;
37
+ body: CopyDashboardFromDashboardRequestContract;
38
+ }): Promise<DashboardResponseContract>;
39
+ /**
40
+ * Create dashboard
41
+ * Create a new dashboard
42
+ */
43
+ createDashboard(params: {
44
+ headers?: Record<string, string>;
45
+ body: CreateDashboardRequestContract;
46
+ }): Promise<DashboardResponseContract>;
47
+ /**
48
+ * Create dashboard from form
49
+ * Create a new dashboard based on an existing form
50
+ */
51
+ createDashboardFromForm(params: {
52
+ headers?: Record<string, string>;
53
+ body: CreateDashboardFromFormRequestContract;
54
+ }): Promise<DashboardResponseContract>;
55
+ /**
56
+ * Create dashboard from template
57
+ * Create a new dashboard based on an existing template
58
+ */
59
+ createDashboardFromTemplate(params: {
60
+ headers?: Record<string, string>;
61
+ body: CreateDashboardFromTemplateRequestContract;
62
+ }): Promise<DashboardResponseContract>;
63
+ /**
64
+ * Create dashboard via Intent
65
+ * Create a new dashboard using a simplified Intent payload.
66
+ * The Intent payload is enriched into a canonical full schema using allowed-items templates.
67
+ * Keys and aliases are auto-generated if not provided.
68
+ *
69
+ */
70
+ createDashboardIntent(params: {
71
+ headers?: Record<string, string>;
72
+ body: CreateDashboardIntentRequestContract;
73
+ }): Promise<DashboardResponseContract>;
74
+ /**
75
+ * Create dashboard view
76
+ * Create a new dashboard view
77
+ */
78
+ createDashboardView(params: {
79
+ path: {
80
+ dashboardId: dashboardIdInPathRequired;
81
+ };
82
+ headers?: Record<string, string>;
83
+ body: CreateDashboardViewRequestContract;
84
+ }): Promise<DashboardViewResponseContract>;
85
+ /**
86
+ * Create a dashboard view representation template (system endpoint)
87
+ * Create a new dashboard view representation template with its scope.
88
+ * This is a system endpoint used for internal operations.
89
+ *
90
+ */
91
+ createDashboardViewRepresentationTemplate(params: {
92
+ headers?: Record<string, string>;
93
+ body: CreateDashboardViewRepresentationTemplateRequestContract;
94
+ }): Promise<CreateDashboardViewRepresentationTemplateResponseContract>;
95
+ /**
96
+ * Create dashboard view via Intent
97
+ * Create a new dashboard view using a simplified Intent payload.
98
+ * Specify which columns from the dashboard schema to include in the view.
99
+ * Schema items must already exist in the dashboard before they can be included in a view.
100
+ * Does NOT modify the dashboard schema.
101
+ *
102
+ */
103
+ createViewIntent(params: {
104
+ path: {
105
+ dashboardId: dashboardIdInPathRequired;
106
+ };
107
+ headers?: Record<string, string>;
108
+ body: CreateViewIntentRequestContract;
109
+ }): Promise<DashboardViewResponseContract>;
110
+ /**
111
+ * Delete dashboard by UUID
112
+ * Delete a dashboard (soft delete) by UUID
113
+ */
114
+ deleteDashboard(params: {
115
+ path: {
116
+ dashboardId: dashboardIdInPathRequired;
117
+ };
118
+ headers?: Record<string, string>;
119
+ }): Promise<StandardApiResponseContract>;
120
+ /**
121
+ * Permanently delete dashboard schema item
122
+ * Permanently delete a schema item from a dashboard and all views by its key by dashboard UUID
123
+ */
124
+ deleteDashboardSchemaItem(params: {
125
+ path: {
126
+ itemKey: string;
127
+ dashboardId: dashboardIdInPathRequired;
128
+ };
129
+ headers?: Record<string, string>;
130
+ }): Promise<DeleteDashboardSchemaItem200ResponseContract>;
131
+ /**
132
+ * Delete dashboard view
133
+ * Delete a dashboard view (soft delete)
134
+ */
135
+ deleteDashboardView(params: {
136
+ path: {
137
+ dashboardId: dashboardIdInPathRequired;
138
+ viewId: viewIdInPathRequired;
139
+ };
140
+ headers?: Record<string, string>;
141
+ }): Promise<StandardApiResponseContract>;
142
+ /**
143
+ * Describe dashboard by UUID
144
+ * Describe a specific dashboard by UUID
145
+ */
146
+ describeDashboard(params: {
147
+ path: {
148
+ dashboardId: dashboardIdInPathRequired;
149
+ };
150
+ headers?: Record<string, string>;
151
+ }): Promise<DashboardDescribeResponseContract>;
152
+ /**
153
+ * Export dashboard data as CSV
154
+ * Export dashboard data as CSV format
155
+ */
156
+ exportDashboardAsCsv(params: {
157
+ path: {
158
+ dashboardId: dashboardIdInPathRequired;
159
+ };
160
+ query?: {
161
+ view_id?: string;
162
+ delimiter?: string;
163
+ include_root_index_value?: boolean;
164
+ };
165
+ headers?: Record<string, string>;
166
+ }): Promise<string>;
167
+ /**
168
+ * Export dashboard as JSON
169
+ * Export dashboard structure and optionally data as JSON
170
+ */
171
+ exportDashboardAsJson(params: {
172
+ path: {
173
+ dashboardId: dashboardIdInPathRequired;
174
+ viewId: viewIdInPathRequired;
175
+ };
176
+ query?: {
177
+ structure?: boolean;
178
+ data?: boolean;
179
+ };
180
+ headers?: Record<string, string>;
181
+ }): Promise<ExportDashboardAsJson200ResponseContract>;
182
+ /**
183
+ * Get or create child table link dashboard
184
+ * Get or create dashboard for a child-table-link cell.
185
+ * If childTableId in cell is null, creates new dashboard using template from schema item.
186
+ * If childTableId exists, returns the existing dashboard.
187
+ * Automatically updates the cell with the created dashboard ID.
188
+ *
189
+ */
190
+ getChildTableLinkDashboard(params: {
191
+ headers?: Record<string, string>;
192
+ body: GetChildTableLinkDashboardRequestContract;
193
+ }): Promise<GetChildTableLinkDashboardResponseContract>;
194
+ /**
195
+ * Get dashboard
196
+ * Get a specific dashboard by UUID
197
+ */
198
+ getDashboard(params: {
199
+ path: {
200
+ dashboardId: dashboardIdInPathRequired;
201
+ };
202
+ headers?: Record<string, string>;
203
+ }): Promise<DashboardResponseContract>;
204
+ /**
205
+ * Get available fields and related dashboards
206
+ * Returns the list of allowed SchemaItem fields for the specified dashboard, along with names and IDs of related dashboards.
207
+ */
208
+ getDashboardAllowedItems(params: {
209
+ path: {
210
+ dashboardId: dashboardIdInPathRequired;
211
+ };
212
+ query?: {
213
+ source_view_ids?: unknown[];
214
+ include_possible_lookup_items?: boolean;
215
+ viewId?: viewIdInQueryOptional;
216
+ };
217
+ headers?: Record<string, string>;
218
+ }): Promise<DashboardAllowedSchemaItemsResponseContract>;
219
+ /**
220
+ * Get allowed fields by root entity without related dashboards
221
+ * Returns the list of allowed SchemaItem fields without related dashboards. Returns only common fields that are allowed to be used in the dashboard specified by the root entity.
222
+ */
223
+ getDashboardAllowedItemsByRootEntity(params: {
224
+ query?: {
225
+ root_entity?: rootEntityInQueryOptional;
226
+ };
227
+ headers?: Record<string, string>;
228
+ }): Promise<DashboardAllowedSchemaItemsResponseContract>;
229
+ /**
230
+ * Get fields types supported for CSV columns mapping
231
+ * Returns a list of SchemaItem fields that are supported for mapping to CSV columns
232
+ */
233
+ getDashboardCsvImportAllowedItems(params: {
234
+ query?: {
235
+ sort_by_detection_priority?: boolean;
236
+ };
237
+ headers?: Record<string, string>;
238
+ }): Promise<DashboardAllowedSchemaItemsResponseContract>;
239
+ /**
240
+ * List dashboards
241
+ * Get a list of dashboards with optional filtering
242
+ */
243
+ getDashboards(params: {
244
+ query?: {
245
+ template_id?: string;
246
+ database_id?: string;
247
+ root_entities?: rootEntitiesInQueryOptional;
248
+ name?: nameInQueryOptional;
249
+ alias?: aliasInQueryOptional;
250
+ scope_type: scopeTypeInQueryRequired;
251
+ scope_id: scopeIdInQueryRequired;
252
+ };
253
+ headers?: Record<string, string>;
254
+ }): Promise<DashboardListResponseContract>;
255
+ /**
256
+ * Get dashboard view
257
+ * Get a specific dashboard view by ID
258
+ */
259
+ getDashboardView(params: {
260
+ path: {
261
+ dashboardId: dashboardIdInPathRequired;
262
+ viewId: viewIdInPathRequired;
263
+ };
264
+ query?: {
265
+ fetch_filters?: boolean;
266
+ };
267
+ headers?: Record<string, string>;
268
+ }): Promise<DashboardViewResponseContract>;
269
+ /**
270
+ * Get dashboard view templates for an organization
271
+ * Fetch dashboard view templates for a specific organization.
272
+ * Returns all managed templates and custom templates that have the provided scope ID in their scopes.
273
+ *
274
+ */
275
+ getDashboardViewRepresentationTemplates(params: {
276
+ query?: {
277
+ scope_type: scopeTypeOrgInQueryRequired;
278
+ scope_id: scopeIdInQueryRequired;
279
+ };
280
+ headers?: Record<string, string>;
281
+ }): Promise<DashboardViewRepresentationTemplateListResponseContract>;
282
+ /**
283
+ * Get or create dashboard
284
+ * Find dashboard by alias and scope, or create new one if not found.
285
+ * If creating from template, searches for template in template_scope first,
286
+ * then org scope from scopes array, then system org (from SYSTEM_ORG_SCOPE_ID env var).
287
+ *
288
+ */
289
+ getOrCreateDashboard(params: {
290
+ query?: {
291
+ database_id?: string;
292
+ database_alias?: AliasContract;
293
+ copy_with_content?: boolean;
294
+ alias: aliasInQueryRequired;
295
+ scope_type: scopeTypeOrgInQueryRequired;
296
+ scope_id: scopeIdInQueryRequired;
297
+ };
298
+ headers?: Record<string, string>;
299
+ body: GetOrCreateDashboardRequestContract;
300
+ }): Promise<GetOrCreateDashboardResponseContract>;
301
+ /**
302
+ * Get a list of forms
303
+ * Get a list of forms for a given org
304
+ */
305
+ getPortalFormsList(params: {
306
+ query?: {
307
+ scope_type: scopeTypeOrgInQueryRequired;
308
+ scope_id: scopeIdInQueryRequired;
309
+ };
310
+ headers?: Record<string, string>;
311
+ }): Promise<PortalFormInfoListResponseContract>;
312
+ /**
313
+ * Import dashboard from JSON
314
+ * Import a dashboard from exported JSON structure
315
+ */
316
+ importDashboard(params: {
317
+ headers?: Record<string, string>;
318
+ body: ImportDashboardRequestContract;
319
+ }): Promise<DashboardResponseContract>;
320
+ /**
321
+ * Import dashboard data from CSV
322
+ * The mapping parameter uses OpenAPI's deepObject style with bracket notation
323
+ * for type-safe serialization in the generated client.
324
+ * Example query string:
325
+ * ?database_id=8b7c5d9d-f178-4b2a-99fb-bc3d5c363a6f&mapping[columns][0][index]=0&mapping[columns][0][type]=string&mapping[columns][0][edit_type]=string-single-line&mapping[columns][1][index]=1&mapping[columns][1][type]=number&mapping[columns][1][edit_type]=number
326
+ *
327
+ */
328
+ importDashboardFromCsv(params: {
329
+ query?: {
330
+ delimiter?: string;
331
+ dashboard_id?: string;
332
+ view_id?: string;
333
+ dashboard_name?: string;
334
+ database_id: databaseIdInQueryRequired;
335
+ mapping?: mappingInQueryRequiredContract;
336
+ };
337
+ headers?: Record<string, string>;
338
+ body: FormData;
339
+ }): Promise<DashboardResponseContract>;
340
+ /**
341
+ * Update dashboard
342
+ * Update an existing dashboard by UUID
343
+ */
344
+ updateDashboard(params: {
345
+ path: {
346
+ dashboardId: dashboardIdInPathRequired;
347
+ };
348
+ headers?: Record<string, string>;
349
+ body: UpdateDashboardRequestContract;
350
+ }): Promise<DashboardResponseContract>;
351
+ /**
352
+ * Update dashboard schema via Intent patch
353
+ * Update dashboard schema items using a simplified Intent patch payload.
354
+ * Supports add, update, and remove operations on schema items.
355
+ * Only specified items are modified; others remain unchanged.
356
+ * The Intent payload is enriched into canonical full schema items using allowed-items templates.
357
+ *
358
+ */
359
+ updateDashboardSchemaIntent(params: {
360
+ path: {
361
+ dashboardId: dashboardIdInPathRequired;
362
+ };
363
+ headers?: Record<string, string>;
364
+ body: UpdateSchemaIntentRequestContract;
365
+ }): Promise<DashboardResponseContract>;
366
+ /**
367
+ * Update dashboard view
368
+ * Update an existing dashboard view
369
+ */
370
+ updateDashboardView(params: {
371
+ path: {
372
+ dashboardId: dashboardIdInPathRequired;
373
+ viewId: viewIdInPathRequired;
374
+ };
375
+ headers?: Record<string, string>;
376
+ body: UpdateDashboardViewRequestContract;
377
+ }): Promise<DashboardViewResponseContract>;
378
+ /**
379
+ * Update dashboard view filters
380
+ * Update only the filters configuration of a dashboard view
381
+ */
382
+ updateDashboardViewFilters(params: {
383
+ path: {
384
+ dashboardId: dashboardIdInPathRequired;
385
+ viewId: viewIdInPathRequired;
386
+ };
387
+ headers?: Record<string, string>;
388
+ body: UpdateDashboardViewFiltersRequestContract;
389
+ }): Promise<StandardApiResponseContract>;
390
+ /**
391
+ * Update view schema via Intent patch
392
+ * Update view schema using the same Intent patch payload as dashboard schema updates.
393
+ * Supports add, update, and remove operations on schema items for this view.
394
+ * Uses UpdateSchemaIntentRequest (schema_patch) — same payload as PATCH /dashboards/{id}/schema/intent.
395
+ *
396
+ */
397
+ updateViewIntent(params: {
398
+ path: {
399
+ dashboardId: dashboardIdInPathRequired;
400
+ viewId: viewIdInPathRequired;
401
+ };
402
+ headers?: Record<string, string>;
403
+ body: UpdateSchemaIntentRequestContract;
404
+ }): Promise<DashboardViewResponseContract>;
405
+ }