@carthooks/arcubase-cli 0.1.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 (157) hide show
  1. package/bundle/arcubase-admin.mjs +9875 -0
  2. package/bundle/arcubase.mjs +9875 -0
  3. package/dist/bin/arcubase-admin.d.ts +2 -0
  4. package/dist/bin/arcubase-admin.d.ts.map +1 -0
  5. package/dist/bin/arcubase-admin.js +22 -0
  6. package/dist/bin/arcubase.d.ts +2 -0
  7. package/dist/bin/arcubase.d.ts.map +1 -0
  8. package/dist/bin/arcubase.js +22 -0
  9. package/dist/generated/command_registry.generated.d.ts +3072 -0
  10. package/dist/generated/command_registry.generated.d.ts.map +1 -0
  11. package/dist/generated/command_registry.generated.js +4587 -0
  12. package/dist/generated/type_index.generated.d.ts +496 -0
  13. package/dist/generated/type_index.generated.d.ts.map +1 -0
  14. package/dist/generated/type_index.generated.js +502 -0
  15. package/dist/generated/zod_registry.generated.d.ts +356 -0
  16. package/dist/generated/zod_registry.generated.d.ts.map +1 -0
  17. package/dist/generated/zod_registry.generated.js +483 -0
  18. package/dist/index.d.ts +5 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +4 -0
  21. package/dist/runtime/argv.d.ts +8 -0
  22. package/dist/runtime/argv.d.ts.map +1 -0
  23. package/dist/runtime/argv.js +31 -0
  24. package/dist/runtime/body_loader.d.ts +3 -0
  25. package/dist/runtime/body_loader.d.ts.map +1 -0
  26. package/dist/runtime/body_loader.js +26 -0
  27. package/dist/runtime/command_registry.d.ts +9 -0
  28. package/dist/runtime/command_registry.d.ts.map +1 -0
  29. package/dist/runtime/command_registry.js +14 -0
  30. package/dist/runtime/env.d.ts +14 -0
  31. package/dist/runtime/env.d.ts.map +1 -0
  32. package/dist/runtime/env.js +42 -0
  33. package/dist/runtime/errors.d.ts +23 -0
  34. package/dist/runtime/errors.d.ts.map +1 -0
  35. package/dist/runtime/errors.js +18 -0
  36. package/dist/runtime/execute.d.ts +17 -0
  37. package/dist/runtime/execute.d.ts.map +1 -0
  38. package/dist/runtime/execute.js +183 -0
  39. package/dist/runtime/http.d.ts +4 -0
  40. package/dist/runtime/http.d.ts.map +1 -0
  41. package/dist/runtime/http.js +21 -0
  42. package/dist/runtime/output.d.ts +2 -0
  43. package/dist/runtime/output.d.ts.map +1 -0
  44. package/dist/runtime/output.js +3 -0
  45. package/dist/runtime/paths.d.ts +4 -0
  46. package/dist/runtime/paths.d.ts.map +1 -0
  47. package/dist/runtime/paths.js +8 -0
  48. package/dist/runtime/zod_registry.d.ts +10 -0
  49. package/dist/runtime/zod_registry.d.ts.map +1 -0
  50. package/dist/runtime/zod_registry.js +50 -0
  51. package/dist/tests/bootstrap.test.d.ts +2 -0
  52. package/dist/tests/bootstrap.test.d.ts.map +1 -0
  53. package/dist/tests/bootstrap.test.js +59 -0
  54. package/dist/tests/command_registry.test.d.ts +2 -0
  55. package/dist/tests/command_registry.test.d.ts.map +1 -0
  56. package/dist/tests/command_registry.test.js +22 -0
  57. package/dist/tests/execute_validation.test.d.ts +2 -0
  58. package/dist/tests/execute_validation.test.d.ts.map +1 -0
  59. package/dist/tests/execute_validation.test.js +41 -0
  60. package/dist/tests/help.test.d.ts +2 -0
  61. package/dist/tests/help.test.d.ts.map +1 -0
  62. package/dist/tests/help.test.js +22 -0
  63. package/dist/tests/zod_registry.test.d.ts +2 -0
  64. package/dist/tests/zod_registry.test.d.ts.map +1 -0
  65. package/dist/tests/zod_registry.test.js +26 -0
  66. package/package.json +46 -0
  67. package/sdk-dist/api/admin/app-entity-share.ts +52 -0
  68. package/sdk-dist/api/admin/app.ts +187 -0
  69. package/sdk-dist/api/admin/automate-rule.ts +59 -0
  70. package/sdk-dist/api/admin/business-hooks.ts +17 -0
  71. package/sdk-dist/api/admin/config.ts +12 -0
  72. package/sdk-dist/api/admin/dashboard.ts +88 -0
  73. package/sdk-dist/api/admin/dataset.ts +133 -0
  74. package/sdk-dist/api/admin/departments.ts +223 -0
  75. package/sdk-dist/api/admin/developer.ts +126 -0
  76. package/sdk-dist/api/admin/entity-tags.ts +71 -0
  77. package/sdk-dist/api/admin/entity.ts +188 -0
  78. package/sdk-dist/api/admin/extension.ts +19 -0
  79. package/sdk-dist/api/admin/index.ts +21 -0
  80. package/sdk-dist/api/admin/ingress.ts +117 -0
  81. package/sdk-dist/api/admin/integration.ts +64 -0
  82. package/sdk-dist/api/admin/kiosk-flow.ts +67 -0
  83. package/sdk-dist/api/admin/print-template-background.ts +43 -0
  84. package/sdk-dist/api/admin/print-templates.ts +60 -0
  85. package/sdk-dist/api/admin/tenant.ts +231 -0
  86. package/sdk-dist/api/admin/workflow.ts +51 -0
  87. package/sdk-dist/api/kiosk/index.ts +4 -0
  88. package/sdk-dist/api/kiosk/starter.ts +34 -0
  89. package/sdk-dist/api/kiosk/ui.ts +79 -0
  90. package/sdk-dist/api/open/api.ts +11 -0
  91. package/sdk-dist/api/open/index.ts +3 -0
  92. package/sdk-dist/api/shared-link/form.ts +103 -0
  93. package/sdk-dist/api/shared-link/index.ts +3 -0
  94. package/sdk-dist/api/user/common.ts +159 -0
  95. package/sdk-dist/api/user/context.ts +10 -0
  96. package/sdk-dist/api/user/copilot.ts +20 -0
  97. package/sdk-dist/api/user/dashboard.ts +43 -0
  98. package/sdk-dist/api/user/entity.ts +213 -0
  99. package/sdk-dist/api/user/flow.ts +20 -0
  100. package/sdk-dist/api/user/global-action.ts +128 -0
  101. package/sdk-dist/api/user/index.ts +12 -0
  102. package/sdk-dist/api/user/kiosk.ts +12 -0
  103. package/sdk-dist/api/user/profile.ts +57 -0
  104. package/sdk-dist/api/user/workflow.ts +186 -0
  105. package/sdk-dist/generated/command_registry.generated.ts +4603 -0
  106. package/sdk-dist/generated/type_index.generated.ts +503 -0
  107. package/sdk-dist/generated/zod_registry.generated.ts +713 -0
  108. package/sdk-dist/types/app-user.ts +0 -0
  109. package/sdk-dist/types/app.ts +182 -0
  110. package/sdk-dist/types/auth.ts +174 -0
  111. package/sdk-dist/types/automate-rule.ts +100 -0
  112. package/sdk-dist/types/business-hooks.ts +37 -0
  113. package/sdk-dist/types/common.ts +676 -0
  114. package/sdk-dist/types/copilot.ts +34 -0
  115. package/sdk-dist/types/dashboard.ts +122 -0
  116. package/sdk-dist/types/dataset.ts +168 -0
  117. package/sdk-dist/types/departments.ts +351 -0
  118. package/sdk-dist/types/developer.ts +190 -0
  119. package/sdk-dist/types/entity.ts +400 -0
  120. package/sdk-dist/types/extension.ts +15 -0
  121. package/sdk-dist/types/global-action.ts +206 -0
  122. package/sdk-dist/types/index.ts +26 -0
  123. package/sdk-dist/types/ingress.ts +173 -0
  124. package/sdk-dist/types/kiosk-starter.ts +46 -0
  125. package/sdk-dist/types/kiosk-ui.ts +94 -0
  126. package/sdk-dist/types/oauth-authorize.ts +52 -0
  127. package/sdk-dist/types/oauth.ts +33 -0
  128. package/sdk-dist/types/openapi.ts +24 -0
  129. package/sdk-dist/types/platform-setup.ts +26 -0
  130. package/sdk-dist/types/shared-link.ts +41 -0
  131. package/sdk-dist/types/tenant.ts +340 -0
  132. package/sdk-dist/types/upload.ts +0 -0
  133. package/sdk-dist/types/user-action.ts +871 -0
  134. package/sdk-dist/types/user-flow.ts +90 -0
  135. package/sdk-dist/types/widgets.ts +115 -0
  136. package/sdk-dist/types/workflow.ts +162 -0
  137. package/src/bin/arcubase-admin.ts +23 -0
  138. package/src/bin/arcubase.ts +23 -0
  139. package/src/generated/command_registry.generated.ts +4603 -0
  140. package/src/generated/type_index.generated.ts +503 -0
  141. package/src/generated/zod_registry.generated.ts +713 -0
  142. package/src/index.ts +4 -0
  143. package/src/runtime/argv.ts +39 -0
  144. package/src/runtime/body_loader.ts +26 -0
  145. package/src/runtime/command_registry.ts +22 -0
  146. package/src/runtime/env.ts +60 -0
  147. package/src/runtime/errors.ts +41 -0
  148. package/src/runtime/execute.ts +206 -0
  149. package/src/runtime/http.ts +23 -0
  150. package/src/runtime/output.ts +3 -0
  151. package/src/runtime/paths.ts +8 -0
  152. package/src/runtime/zod_registry.ts +53 -0
  153. package/src/tests/bootstrap.test.ts +67 -0
  154. package/src/tests/command_registry.test.ts +27 -0
  155. package/src/tests/execute_validation.test.ts +50 -0
  156. package/src/tests/help.test.ts +25 -0
  157. package/src/tests/zod_registry.test.ts +33 -0
@@ -0,0 +1,676 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /*
4
+ * ---------------------------------------------------------------
5
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
6
+ * ## ##
7
+ * ## AUTHOR: acacode ##
8
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
9
+ * ---------------------------------------------------------------
10
+ */
11
+
12
+ /**
13
+ * Common types shared across multiple API modules
14
+ * This file is auto-generated to avoid duplicate type definitions
15
+ */
16
+
17
+ export interface GormDeletedAt {
18
+ Time?: string;
19
+ /** Valid is true if Time is not NULL */
20
+ Valid?: boolean;
21
+ }
22
+
23
+ export interface AppOptions {
24
+ use_home_dashboard?: boolean;
25
+ }
26
+
27
+ export interface IngressGroup {
28
+ default?: boolean;
29
+ i18n_name?: I18NText;
30
+ icon_name?: string;
31
+ id?: number;
32
+ items?: IngressItem[];
33
+ name?: string;
34
+ }
35
+
36
+ export interface IngressItem {
37
+ enabled?: boolean;
38
+ i18n_name?: I18NText;
39
+ id?: string;
40
+ meta?: Record<string, any>;
41
+ name?: string;
42
+ type?: string;
43
+ }
44
+
45
+ export type I18NText = Record<string, string>;
46
+
47
+ export interface ErrorResponse {
48
+ error?: string;
49
+ key?: string;
50
+ meta?: Record<string, any>;
51
+ status?: string;
52
+ }
53
+
54
+ export enum PronounsType {
55
+ PronounsTypeUnknown = 0,
56
+ PronounsTypeHeHim = 1,
57
+ PronounsTypeSheHer = 2,
58
+ PronounsTypeTheyThem = 3,
59
+ PronounsTypeOther = 4,
60
+ }
61
+
62
+ export interface Tenant {
63
+ CreatedAt?: string;
64
+ DeletedAt?: SqlNullTime;
65
+ /** not in db */
66
+ HashID?: string;
67
+ ID?: number;
68
+ UpdatedAt?: string;
69
+ color_schema?: string;
70
+ currency?: string;
71
+ icon_assets_id?: number;
72
+ icon_url?: string;
73
+ join_able?: boolean;
74
+ locale?: string;
75
+ logo_assets_id?: number;
76
+ logo_url?: string;
77
+ name?: string;
78
+ slug?: string;
79
+ timezone?: string;
80
+ }
81
+
82
+ export interface User {
83
+ bio?: string;
84
+ city?: string;
85
+ country?: string;
86
+ custom_pronouns?: string;
87
+ email?: string;
88
+ locale?: string;
89
+ mobile?: string;
90
+ mobile_prefix?: string;
91
+ name?: string;
92
+ pronouns?: PronounsType;
93
+ t?: number;
94
+ timezone?: string;
95
+ }
96
+
97
+ export interface SqlNullTime {
98
+ Time?: string;
99
+ /** Valid is true if Time is not NULL */
100
+ Valid?: boolean;
101
+ }
102
+
103
+ export interface AuthSessionVO {
104
+ access_token?: string;
105
+ expires_at?: number;
106
+ expires_in?: number;
107
+ id?: string;
108
+ refresh_token?: string;
109
+ token_type?: string;
110
+ }
111
+
112
+ export enum PermitValueFrom {
113
+ ValueFromStatic = 1,
114
+ ValueFromRelation = 2,
115
+ /** 新增:计算表达式 */
116
+ ValueFromFormula = 3,
117
+ }
118
+
119
+ export enum PermitEntityProp {
120
+ PropCreateTime = "created",
121
+ PropUpdateTime = "updated",
122
+ PropCreateBy = "creator",
123
+ }
124
+
125
+ export enum PermitEntityEvent {
126
+ EntityCreated = 1,
127
+ EntityUpdated = 2,
128
+ EntityDeleted = 3,
129
+ EntitySchemaChanged = 4,
130
+ EntityCommentAdded = 99,
131
+ EntityFlowChanged = 11,
132
+ EntityFlowAction = 12,
133
+ }
134
+
135
+ export interface PermitConditionSet {
136
+ conditions?: PermitRecordCondition[];
137
+ /** and, or */
138
+ mode?: string;
139
+ }
140
+
141
+ export interface PermitRecordCondition {
142
+ column?: PermitEntityProp;
143
+ operator?: string;
144
+ subset?: PermitConditionSet;
145
+ value?: any;
146
+ value_from?: PermitValueFrom;
147
+ value_relation?: PermitEntityProp;
148
+ }
149
+
150
+ export interface CommonPagination {
151
+ page?: number;
152
+ size?: number;
153
+ total?: number;
154
+ }
155
+
156
+ export interface App {
157
+ CreatedAt?: string;
158
+ DeletedAt?: GormDeletedAt;
159
+ ID?: number;
160
+ Options?: AppOptions;
161
+ UpdatedAt?: string;
162
+ has_workflow?: boolean;
163
+ icon_color?: string;
164
+ icon_name?: string;
165
+ name?: string;
166
+ tenant_id?: number;
167
+ }
168
+
169
+ export interface DashboardOptions {
170
+ i18n_name?: Record<string, string>;
171
+ theme?: {
172
+ gutter?: number;
173
+ has_shadow?: boolean;
174
+ round_corners?: number;
175
+ };
176
+ users?: PermitUserScope[];
177
+ }
178
+
179
+ export interface PermitUserScope {
180
+ data?: {
181
+ name?: string;
182
+ };
183
+ id?: number;
184
+ /** department, member, actor */
185
+ type?: string;
186
+ }
187
+
188
+ export interface TenantDepartment {
189
+ child_dept_count?: number;
190
+ children?: TenantDepartment[];
191
+ id?: number;
192
+ name?: string;
193
+ parent_id?: number;
194
+ }
195
+
196
+ export interface PostqueryAppendData {
197
+ assets?: Record<string, PostqueryAssetsData>;
198
+ departments?: Record<string, PostqueryDepartmentData>;
199
+ linkto?: Record<string, PostqueryLinktoData>;
200
+ users?: Record<string, PostqueryUserData>;
201
+ }
202
+
203
+ export interface PostqueryUserData {
204
+ avatar?: string;
205
+ city?: string;
206
+ country?: string;
207
+ custom_pronouns?: string;
208
+ id?: number;
209
+ name?: string;
210
+ pronouns?: PronounsType;
211
+ status?: number;
212
+ timezone?: string;
213
+ }
214
+
215
+ export interface PostqueryAssetsData {
216
+ created?: number;
217
+ expired?: number;
218
+ file_name?: string;
219
+ file_size?: number;
220
+ url?: StorageUrlSets;
221
+ }
222
+
223
+ export interface PostqueryDepartmentData {
224
+ id?: number;
225
+ name?: string;
226
+ }
227
+
228
+ export interface PostqueryLinktoData {
229
+ ID?: number;
230
+ Title?: string;
231
+ }
232
+
233
+ export interface StorageUrlSets {
234
+ /** 3种尺寸, 原始尺寸, 128x128px, 26x26px */
235
+ full_size_url?: string;
236
+ /** 26x26px */
237
+ icon_url?: string;
238
+ /** 128x128px */
239
+ thumb_url?: string;
240
+ }
241
+
242
+ export enum DeveloperClientType {
243
+ /** 租户级客户端 */
244
+ ClientTypeTenant = 1,
245
+ }
246
+
247
+ export enum DeveloperClientStatus {
248
+ ClientStatusActive = 1,
249
+ ClientStatusSuspended = 2,
250
+ }
251
+
252
+ export enum NotificationPayloadMode {
253
+ PayloadModeJson = 0,
254
+ PayloadModeURLEncoded = 1,
255
+ }
256
+
257
+ export enum NotificationNotificationType {
258
+ NotificationTypeWebhook = "webhook",
259
+ NotificationTypeSQS = "sqs",
260
+ }
261
+
262
+ export enum MagicStringPartType {
263
+ MagicStringPartStatic = 1,
264
+ MagicStringPartField = 2,
265
+ MagicStringPartProp = 3,
266
+ }
267
+
268
+ export interface ActionBulkUpdate {
269
+ action?: ActionBulkUpdateAction;
270
+ id?: number;
271
+ }
272
+
273
+ export interface ActionBulkUpdateAction {
274
+ number_add?: number;
275
+ number_mul?: number;
276
+ number_sub?: number;
277
+ text_append?: string;
278
+ text_prepend?: string;
279
+ text_replace?: string;
280
+ text_search?: string;
281
+ type?: string;
282
+ value?: any;
283
+ }
284
+
285
+ export interface KioskConfig {
286
+ interactiveMode?: string;
287
+ lookupFields?: number[];
288
+ options?: Record<string, any>;
289
+ screens?: KioskScreen[];
290
+ theme?: string;
291
+ }
292
+
293
+ export type KioskScreen = Record<string, any>;
294
+
295
+ export interface AiOptions {
296
+ custom?: MagicString;
297
+ result_map?: {
298
+ field_id?: number;
299
+ type?: string;
300
+ var?: string;
301
+ }[];
302
+ type?: string;
303
+ }
304
+
305
+ export interface ApiEndpoint {
306
+ content_type?: string;
307
+ headers?: ApiEndpointParam[];
308
+ method?: string;
309
+ params?: ApiEndpointParam[];
310
+ sign_mode?: string;
311
+ url?: MagicString;
312
+ }
313
+
314
+ export interface ApiEndpointParam {
315
+ key?: string;
316
+ value?: MagicString;
317
+ }
318
+
319
+ export interface ApiOptions {
320
+ api_id?: number;
321
+ input?: any;
322
+ output?: any;
323
+ }
324
+
325
+ export interface Assets {
326
+ CreatedAt?: string;
327
+ DeletedAt?: GormDeletedAt;
328
+ ID?: number;
329
+ UpdatedAt?: string;
330
+ content_type?: string;
331
+ file?: string;
332
+ file_name?: string;
333
+ file_size?: number;
334
+ is_public?: boolean;
335
+ platform?: string;
336
+ }
337
+
338
+ export interface Button {
339
+ Action?: Record<string, any>;
340
+ Label?: string;
341
+ Type?: string;
342
+ }
343
+
344
+ export interface CustomAction {
345
+ actions?: EntityFrontEvent[];
346
+ id?: string;
347
+ label?: string;
348
+ options?: any;
349
+ }
350
+
351
+ export interface EntityFrontEvent {
352
+ action?: string;
353
+ ai_options?: AiOptions;
354
+ api_options?: ApiOptions;
355
+ backfills?: any;
356
+ curl_options?: ApiEndpoint;
357
+ description?: string;
358
+ enabled?: boolean;
359
+ id?: string;
360
+ open_url_options?: any;
361
+ setValues?: any;
362
+ title?: string;
363
+ trigger_field?: number;
364
+ type?: string;
365
+ }
366
+
367
+ export interface EntityKioskFlow {
368
+ UpdatedAt?: string;
369
+ app_id?: number;
370
+ config?: KioskConfig;
371
+ enabled?: boolean;
372
+ entity_id?: number;
373
+ icon_name?: string;
374
+ id?: string;
375
+ last_modified_by?: number;
376
+ name?: string;
377
+ tenant_id?: number;
378
+ title_color?: string;
379
+ user_scope?: PermitUserScope[];
380
+ }
381
+
382
+ export interface EntityOptions {
383
+ ArchiveSearchFieldID?: number;
384
+ Buttons?: Button[];
385
+ CommentAble?: boolean;
386
+ CustomActions?: CustomAction[];
387
+ CustomTitle?: boolean;
388
+ /** 归档配置 */
389
+ EnableArchive?: boolean;
390
+ EnableDraft?: boolean;
391
+ EnableFastEdit?: boolean;
392
+ EnableLog?: boolean;
393
+ EnableOffline?: boolean;
394
+ EnableSuccessScreen?: boolean;
395
+ EnableTags?: boolean;
396
+ FrontendEvents?: EntityFrontEvent[];
397
+ SuccessScreen?: string;
398
+ TitleFormat?: MagicString;
399
+ misc?: Record<string, any>;
400
+ /** 通知配置 */
401
+ notifications?: {
402
+ /** 使用指针类型以支持默认值 */
403
+ enabled?: boolean;
404
+ events?: PermitEntityEvent[];
405
+ events_map?: Record<string, boolean>;
406
+ mode?: NotificationPayloadMode;
407
+ template?: string;
408
+ type?: NotificationNotificationType;
409
+ url?: string;
410
+ /** 统一使用 Version 字段 */
411
+ version?: string;
412
+ }[];
413
+ }
414
+
415
+ export interface EntityPrintTemplate {
416
+ background_assets?: Assets;
417
+ background_assets_id?: number;
418
+ entity_id?: number;
419
+ id?: number;
420
+ name?: string;
421
+ size?: string;
422
+ template?: Record<string, any>;
423
+ }
424
+
425
+ export type Fields = object;
426
+
427
+ export interface MagicString {
428
+ Body?: string;
429
+ Fields?: number[];
430
+ Parts?: MagicStringPart[];
431
+ }
432
+
433
+ export interface MagicStringPart {
434
+ Data?: string;
435
+ /** @format int32 */
436
+ FieldID?: number;
437
+ Type?: MagicStringPartType;
438
+ }
439
+
440
+ export interface PermitColumn {
441
+ field_id?: number;
442
+ is_field?: boolean;
443
+ prop?: string;
444
+ }
445
+
446
+ export interface PermitEntityListOptions {
447
+ default_sort?: {
448
+ column?: PermitColumn;
449
+ order?: string;
450
+ };
451
+ hide_all_tab_button?: boolean;
452
+ search?: PermitSearchColumn[];
453
+ sorts?: PermitColumn[];
454
+ tabs?: PermitEntityListTab[];
455
+ widgets?: PermitEntityListWidget[];
456
+ }
457
+
458
+ export interface PermitEntityListTab {
459
+ conditions?: PermitConditionSet;
460
+ hidden?: string[];
461
+ id?: string;
462
+ label?: string;
463
+ }
464
+
465
+ export interface PermitEntityListWidget {
466
+ dashboard_id?: number;
467
+ height?: number;
468
+ widget_id?: number;
469
+ width?: number;
470
+ }
471
+
472
+ export interface PermitFieldPermit {
473
+ key?: string;
474
+ read?: boolean;
475
+ report?: boolean;
476
+ write?: boolean;
477
+ }
478
+
479
+ export interface PermitPolicy {
480
+ actions?: string[];
481
+ all_fields_read?: boolean;
482
+ all_fields_write?: boolean;
483
+ condition?: PermitConditionSet;
484
+ description?: string;
485
+ fields?: PermitFieldPermit[];
486
+ /** TODO: 当migrateion完成后,删除ID字段 */
487
+ id?: string;
488
+ key?: string;
489
+ name?: string;
490
+ }
491
+
492
+ export interface PermitSearchColumn {
493
+ /** default search column */
494
+ default?: boolean;
495
+ /** default value for filter input box */
496
+ default_value?: number[];
497
+ field_id?: number;
498
+ infilter?: boolean;
499
+ is_field?: boolean;
500
+ /** pinned filter input box to listpage's top */
501
+ pinned?: boolean;
502
+ prop?: string;
503
+ /** has wildcard, when in default search column */
504
+ wildcard?: boolean;
505
+ }
506
+
507
+ export enum WorkflowStateType {
508
+ Normal = 0,
509
+ Processing = 1,
510
+ Completed = 2,
511
+ Denied = 3,
512
+ Cancelled = 4,
513
+ NotRequired = 5,
514
+ }
515
+
516
+ export interface DataRecord {
517
+ created_at?: number;
518
+ creator?: number;
519
+ data_version?: number;
520
+ fields?: Record<string, any>;
521
+ id?: number;
522
+ lock_subject?: string;
523
+ lock_user_id?: number;
524
+ locked?: boolean;
525
+ parent_id?: number;
526
+ process?: DataRecordProcess;
527
+ process_state?: WorkflowStateType;
528
+ resources?: DataRecordResource[];
529
+ subform_id?: number;
530
+ tags?: string[];
531
+ title?: string;
532
+ updated_at?: number;
533
+ }
534
+
535
+ export interface EntityVO {
536
+ app_id?: number;
537
+ field_id_seq?: number;
538
+ fields?: Fields;
539
+ id?: number;
540
+ layout?: number[][];
541
+ name?: string;
542
+ options?: EntityOptions;
543
+ prototypes?: number[];
544
+ schema_version?: number;
545
+ workflow_enabled?: boolean;
546
+ }
547
+
548
+ export interface DataRecordProcess {
549
+ trans?: DataRecordTrans[];
550
+ }
551
+
552
+ export interface DataRecordResource {
553
+ key?: any;
554
+ type?: string;
555
+ url?: string;
556
+ }
557
+
558
+ export interface DataRecordTrans {
559
+ id?: number;
560
+ label?: string;
561
+ time?: number;
562
+ }
563
+
564
+ export interface OpenAPITenantInfo {
565
+ /** HashID for external API */
566
+ ID?: string;
567
+ IconUrl?: string;
568
+ /** Whether user is admin of this tenant */
569
+ IsAdmin?: boolean;
570
+ Name?: string;
571
+ SiteLogoUrl?: string;
572
+ }
573
+
574
+ export interface EntityValidateUniqFieldVO {
575
+ field_id?: number;
576
+ value?: string;
577
+ }
578
+
579
+ export interface EntityValidateUniqReqVO {
580
+ fields?: EntityValidateUniqFieldVO[];
581
+ record_id?: number;
582
+ }
583
+
584
+ export type EntityValidateUniqRespVO = Record<string, boolean>;
585
+
586
+ export interface UploadPreviewReqVO {
587
+ fname?: string;
588
+ upload_id?: number;
589
+ }
590
+
591
+ export enum WidgetsTypeCode {
592
+ WidgetsTypeDashboard = 1,
593
+ WidgetsTypeIngress = 2,
594
+ }
595
+
596
+ export enum CubeMeasureAggregate {
597
+ CubeMeasureAggregateSum = "sum",
598
+ CubeMeasureAggregateAvg = "avg",
599
+ CubeMeasureAggregateMax = "max",
600
+ CubeMeasureAggregateMin = "min",
601
+ CubeMeasureAggregateCount = "count",
602
+ CubeMeasureAggregateDistinctCount = "distinct_count",
603
+ }
604
+
605
+ export interface ChartOption {
606
+ conditions?: PermitConditionSet;
607
+ dimensions?: CubeDimension[];
608
+ entity_id?: number;
609
+ measures?: CubeMeasure[];
610
+ options?: Record<string, any>;
611
+ type?: string;
612
+ }
613
+
614
+ export interface CubeDimension {
615
+ /** @format int32 */
616
+ FieldID?: number;
617
+ IsField?: boolean;
618
+ Label?: string;
619
+ Name?: string;
620
+ Options?: Record<string, any>;
621
+ OrderBy?: string;
622
+ PropName?: string;
623
+ }
624
+
625
+ export interface CubeMeasure {
626
+ Aggregate?: CubeMeasureAggregate;
627
+ /** @format int32 */
628
+ FieldID?: number;
629
+ Label?: string;
630
+ Name?: string;
631
+ Options?: Record<string, any>;
632
+ OrderBy?: string;
633
+ }
634
+
635
+ export interface DashboardWidgets {
636
+ DeletedAt?: GormDeletedAt;
637
+ app_id?: number;
638
+ dashboard_id?: number;
639
+ entity_id?: number;
640
+ h?: number;
641
+ id?: number;
642
+ ingress_id?: number;
643
+ options?: WidgetsOption;
644
+ tenant_id?: number;
645
+ type?: string;
646
+ updated_at?: string;
647
+ w?: number;
648
+ x?: number;
649
+ y?: number;
650
+ }
651
+
652
+ export interface WidgetsListViewOptions {
653
+ cond_follow?: boolean;
654
+ cond_follow_cols?: string[];
655
+ cond_follow_tab?: boolean;
656
+ link?: Record<string, any>;
657
+ }
658
+
659
+ export interface WidgetsOption {
660
+ charts?: ChartOption;
661
+ ingress?: WidgetsListViewOptions;
662
+ render?: Record<string, any>;
663
+ }
664
+
665
+ export interface EntityWorkflowNodeVO {
666
+ id?: number;
667
+ label?: string;
668
+ }
669
+
670
+ export interface EntityWorkflowVersionVO {
671
+ deployed?: boolean;
672
+ id?: number;
673
+ is_current?: boolean;
674
+ nodes?: EntityWorkflowNodeVO[];
675
+ version?: number;
676
+ }
@@ -0,0 +1,34 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
4
+ /*
5
+ * ---------------------------------------------------------------
6
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
7
+ * ## ##
8
+ * ## AUTHOR: acacode ##
9
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
+ * ---------------------------------------------------------------
11
+ */
12
+
13
+ import type { ErrorResponse } from './common'
14
+
15
+ export interface CopilotMessage {
16
+ Content?: string;
17
+ Type?: string;
18
+ }
19
+
20
+ export interface CopilotInitConversationRespVO {
21
+ ID?: string;
22
+ }
23
+
24
+ export interface CopilotSendMessageReqVO {
25
+ conversation_id?: string;
26
+ current_view?: string;
27
+ messages?: CopilotMessage[];
28
+ params?: Record<string, string>;
29
+ }
30
+
31
+ export interface CopilotSendMessageRespVO {
32
+ ID?: string;
33
+ Request?: string;
34
+ }