@redonvn/redai-backend-api-sdk 0.1.13 → 0.1.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redonvn/redai-backend-api-sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Axios SDK for RedAI Dynamic Table APIs",
5
5
  "license": "UNLICENSED",
6
6
  "main": "src/index.ts",
@@ -319,24 +319,6 @@ export interface CommandPaletteSearchQueryDto {
319
319
  limit?: number;
320
320
  workspaceId?: string;
321
321
  }
322
- export interface ComponentConfig {
323
- id: string;
324
- label: string;
325
- type?: string;
326
- required?: boolean;
327
- validation?: ValidationConfig;
328
- options?: string[];
329
- min?: number;
330
- max?: number;
331
- step?: number;
332
- defaultValue?: any;
333
- placeholder?: string;
334
- variant?: string;
335
- size?: string;
336
- disabled?: boolean;
337
- readOnly?: boolean;
338
- helperText?: string;
339
- }
340
322
  export interface CreateApiTokenDto {
341
323
  fkWorkspaceId?: string | null;
342
324
  fkBaseId?: string | null;
@@ -606,17 +588,88 @@ export interface ExternalSyncConfig {
606
588
  lastSyncAt?: Date;
607
589
  }
608
590
  export interface FieldConfig {
609
- component: string;
610
- config: ComponentConfig;
611
- grid: GridConfig;
591
+ options?: { id: string; label: string; color?: string }[];
592
+ precision?: number;
593
+ currencySymbol?: string;
594
+ currencyCode?: string;
595
+ percentFormat?: 'decimal' | 'whole';
596
+ maxRating?: number;
597
+ ratingIcon?: 'star' | 'heart' | 'thumb';
598
+ prefix?: string;
599
+ startNumber?: number;
600
+ digitCount?: number;
601
+ dateFormat?: string;
602
+ timeFormat?: '12h' | '24h';
603
+ includeTime?: boolean;
604
+ timezone?: string;
605
+ durationFormat?: 'h:mm' | 'h:mm:ss' | 'days';
606
+ targetTableId?: string;
607
+ allowMultiple?: boolean;
608
+ symmetricFieldId?: string;
609
+ relationFieldId?: string;
610
+ lookupFieldId?: string;
611
+ rollupRelationFieldId?: string;
612
+ rollupFieldId?: string;
613
+ rollupFunction?: 'sum' | 'avg' | 'min' | 'max' | 'count' | 'counta' | 'countall';
614
+ formulaExpression?: string;
615
+ outputType?: 'number' | 'text' | 'date' | 'boolean';
616
+ enableRichText?: boolean;
617
+ maxLength?: number;
618
+ defaultCountryCode?: string;
619
+ urlType?: 'any' | 'image' | 'video';
620
+ allowMultipleUsers?: boolean;
621
+ notifyOnAssign?: boolean;
622
+ allowedFileTypes?: string[];
623
+ maxFileSize?: number;
624
+ maxFiles?: number;
625
+ qrValueFieldId?: string;
626
+ barcodeValueFieldId?: string;
627
+ barcodeFormat?: string;
628
+ buttonLabel?: string;
629
+ buttonType?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
630
+ buttonActionType?: 'url' | 'api' | 'script' | 'email' | 'page';
631
+ buttonActionConfig?: Record<string, any>;
632
+ buttonIcon?: string;
633
+ buttonTooltip?: string;
634
+ buttonWidth?: number;
635
+ buttonConfirmation?: string;
636
+ aiPrompt?: string;
637
+ aiModel?: string;
638
+ aiConfig?: Record<string, any>;
612
639
  }
613
640
  export enum FieldType {
614
- STRING = 'string',
641
+ TEXT = 'text',
642
+ LONG_TEXT = 'long_text',
643
+ EMAIL = 'email',
644
+ PHONE = 'phone',
645
+ URL = 'url',
615
646
  NUMBER = 'number',
647
+ CURRENCY = 'currency',
648
+ PERCENT = 'percent',
649
+ RATING = 'rating',
650
+ AUTONUMBER = 'autonumber',
651
+ SELECT = 'select',
652
+ MULTI_SELECT = 'multi_select',
616
653
  BOOLEAN = 'boolean',
617
654
  DATE = 'date',
618
- OBJECT = 'object',
619
- ARRAY = 'array',
655
+ DATETIME = 'datetime',
656
+ DURATION = 'duration',
657
+ RELATION = 'relation',
658
+ LINK_TO_ANOTHER_RECORD = 'link_to_another_record',
659
+ LINKS = 'links',
660
+ LOOKUP = 'lookup',
661
+ ROLLUP = 'rollup',
662
+ FORMULA = 'formula',
663
+ CREATED_TIME = 'created_time',
664
+ MODIFIED_TIME = 'modified_time',
665
+ CREATED_BY = 'created_by',
666
+ MODIFIED_BY = 'modified_by',
667
+ ATTACHMENT = 'attachment',
668
+ QR_CODE = 'qrcode',
669
+ BARCODE = 'barcode',
670
+ BUTTON = 'button',
671
+ USER = 'user',
672
+ AI = 'ai',
620
673
  }
621
674
  export enum FilterComparisonOp {
622
675
  EQ = 'eq',
@@ -777,18 +830,6 @@ export interface GetUserUiPreferencesResponseDto {
777
830
  raw: UserUiPreferencesRawDto;
778
831
  resolved: UserUiPreferencesResolvedDto;
779
832
  }
780
- export interface GridConfig {
781
- i: string;
782
- x: number;
783
- y: number;
784
- w: number;
785
- h: number;
786
- minW?: number;
787
- minH?: number;
788
- maxW?: number;
789
- maxH?: number;
790
- static?: boolean;
791
- }
792
833
  export enum GridRowHeight {
793
834
  SHORT = 'short',
794
835
  MEDIUM = 'medium',
@@ -1401,19 +1442,6 @@ export interface UserUiPreferencesResolvedDto {
1401
1442
  isValid: boolean;
1402
1443
  reason?: string;
1403
1444
  }
1404
- export interface ValidationConfig {
1405
- minLength?: number;
1406
- maxLength?: number;
1407
- pattern?: string;
1408
- minDate?: string;
1409
- maxDate?: string;
1410
- min?: number;
1411
- max?: number;
1412
- minItems?: number;
1413
- maxItems?: number;
1414
- itemType?: 'string' | 'number' | 'boolean';
1415
- requiredProperties?: string[];
1416
- }
1417
1445
  export interface ViewColumnResponseDto {
1418
1446
  id: string;
1419
1447
  viewId: string;