@redonvn/redai-backend-api-sdk 0.5.47 → 0.5.48

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 (49) hide show
  1. package/dist/cjs/generated/ask-ai/index.js +7 -1
  2. package/dist/cjs/generated/ask-ai/index.js.map +1 -1
  3. package/dist/cjs/generated/ask-ai/services/ask-ai-dynamic-table.service.js +9 -0
  4. package/dist/cjs/generated/ask-ai/services/ask-ai-dynamic-table.service.js.map +1 -1
  5. package/dist/cjs/generated/ask-ai/services/ask-ai-segment.service.js +28 -0
  6. package/dist/cjs/generated/ask-ai/services/ask-ai-segment.service.js.map +1 -0
  7. package/dist/cjs/generated/ask-ai/services/index.js +3 -1
  8. package/dist/cjs/generated/ask-ai/services/index.js.map +1 -1
  9. package/dist/cjs/generated/ask-ai/types.js +66 -1
  10. package/dist/cjs/generated/ask-ai/types.js.map +1 -1
  11. package/dist/cjs/generated/index.js +8 -2
  12. package/dist/cjs/generated/index.js.map +1 -1
  13. package/dist/cjs/generated/shared-types.js +279 -14
  14. package/dist/cjs/generated/shared-types.js.map +1 -1
  15. package/dist/cjs/index.js +1 -0
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/esm/generated/ask-ai/index.d.ts +1 -1
  18. package/dist/esm/generated/ask-ai/index.d.ts.map +1 -1
  19. package/dist/esm/generated/ask-ai/index.js +1 -1
  20. package/dist/esm/generated/ask-ai/index.js.map +1 -1
  21. package/dist/esm/generated/ask-ai/services/ask-ai-dynamic-table.service.d.ts +2 -1
  22. package/dist/esm/generated/ask-ai/services/ask-ai-dynamic-table.service.d.ts.map +1 -1
  23. package/dist/esm/generated/ask-ai/services/ask-ai-dynamic-table.service.js +9 -0
  24. package/dist/esm/generated/ask-ai/services/ask-ai-dynamic-table.service.js.map +1 -1
  25. package/dist/esm/generated/ask-ai/services/ask-ai-segment.service.d.ts +9 -0
  26. package/dist/esm/generated/ask-ai/services/ask-ai-segment.service.d.ts.map +1 -0
  27. package/dist/esm/generated/ask-ai/services/ask-ai-segment.service.js +24 -0
  28. package/dist/esm/generated/ask-ai/services/ask-ai-segment.service.js.map +1 -0
  29. package/dist/esm/generated/ask-ai/services/index.d.ts +1 -0
  30. package/dist/esm/generated/ask-ai/services/index.d.ts.map +1 -1
  31. package/dist/esm/generated/ask-ai/services/index.js +1 -0
  32. package/dist/esm/generated/ask-ai/services/index.js.map +1 -1
  33. package/dist/esm/generated/ask-ai/types.d.ts +281 -161
  34. package/dist/esm/generated/ask-ai/types.d.ts.map +1 -1
  35. package/dist/esm/generated/ask-ai/types.js +65 -0
  36. package/dist/esm/generated/ask-ai/types.js.map +1 -1
  37. package/dist/esm/generated/index.d.ts +2 -2
  38. package/dist/esm/generated/index.d.ts.map +1 -1
  39. package/dist/esm/generated/index.js +1 -1
  40. package/dist/esm/generated/index.js.map +1 -1
  41. package/dist/esm/generated/shared-types.d.ts +2566 -35
  42. package/dist/esm/generated/shared-types.d.ts.map +1 -1
  43. package/dist/esm/generated/shared-types.js +277 -13
  44. package/dist/esm/generated/shared-types.js.map +1 -1
  45. package/dist/esm/index.d.ts +4 -2
  46. package/dist/esm/index.d.ts.map +1 -1
  47. package/dist/esm/index.js +2 -1
  48. package/dist/esm/index.js.map +1 -1
  49. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import type { ColumnResponseDto, CreateTableFieldDto, FilterResponseDto, JsonValue, TableResponseDto } from '../shared-types';
2
- import { FieldType, FilterComparisonOp, FilterComparisonSubOp, FilterLogicalOp, FlowNodeType, NotificationProviderType, ReferentialAction, RelationType, RollupFunction, ViewType } from '../shared-types';
3
- export type { ACTION, AI, ALL_OF, AND, ANY_OF, ApiResponseDto, ARRAY, ATTACHMENT, AUTONUMBER, AVG, AVG_DISTINCT, BARCODE, BELONGS_TO, BETWEEN, BIGINT, BIGSERIAL, BINARY, BIT, BLANK, BLOB, BOOLEAN, BUTTON, BYTEA, CALENDAR, CASCADE, CHAR, CHECKED, CIDR, COLLABORATIVE, ColumnResponseDto, COUNT, COUNT_DISTINCT, CreateColumnDto, CREATED_BY, CREATED_TIME, CreateTableFieldDto, CURRENCY, CUSTOM, DASHBOARD, DATE, DATETIME, DATETIME2, DAYS_AGO, DAYS_FROM_NOW, DECIMAL, DEFAULT, DOCUMENT, DOUBLE, DURATION, EAV, EMAIL, EMAIL_GMAIL, EMAIL_SMTP, EMPTY, END, ENUM, EQ, EXACT_DATE, EXTERNAL_TEMPLATE, ExternalSyncConfig, FACEBOOK_PAGE, FieldMeta, FILTER, FilterResponseDto, FLOAT, FORM, FORMULA, GALLERY, GEOGRAPHY, GEOMETRY, GRID, GROUP_BY_EQ, GROUP_BY_NULL, GT, GTE, HAS_MANY, HSTORE, IMAGE, INET, INT, INTEGER, INTERVAL, IS, IS_NOT, IS_WITHIN, JSON, JSONB, JsonObject, JsonPrimitive, JsonValue, KANBAN, LIKE, LINK_TO_ANOTHER_RECORD, LINKS, LOCKED, LONG_TEXT, LONGTEXT, LOOKUP, LookupConfigDto, LookupConfigResponseDto, LT, LTE, MACADDR, MANY_TO_MANY, MAP, MAX, MEDIUMINT, MEDIUMTEXT, MIN, MODIFIED_BY, MODIFIED_TIME, MONEY, MULTI_SELECT, NCHAR, NEQ, NEXT_MONTH, NEXT_NUMBER_OF_DAYS, NEXT_WEEK, NEXT_YEAR, NLIKE, NO, NO_ACTION, NOT, NOT_ALL_OF, NOT_ANY_OF, NOT_BETWEEN, NOT_BLANK, NOT_CHECKED, NOT_EMPTY, NOT_NULL, NOTIFICATION, NULL, NUMBER, NUMERIC, NVARCHAR, OBJECT_ID, ONE_MONTH_AGO, ONE_MONTH_FROM_NOW, ONE_TO_ONE, ONE_WEEK_AGO, ONE_WEEK_FROM_NOW, OR, ORDER, PAST_MONTH, PAST_NUMBER_OF_DAYS, PAST_WEEK, PAST_YEAR, PERCENT, PERSONAL, PHONE, PHYSICAL, POINT, QR_CODE, RATING, REAL, RELATION, RelationConfigDto, RelationConfigResponseDto, RelationFieldRefDto, RESTRICT, ROLLUP, RollupConfigDto, RollupConfigResponseDto, SELECT, SERIAL, SET, SET_DEFAULT, SET_NULL, SMALLDATETIME, SMALLINT, SMALLMONEY, START, STEP, SUM, SUM_DISTINCT, TABLE, TableMeta, TableResponseDto, TableSettings, TELEGRAM, TEXT, TIME, TIMESTAMP, TIMESTAMPTZ, TINYINT, TINYTEXT, TODAY, TOMORROW, UNIQUEIDENTIFIER, URL, USER, UUID, VARBINARY, VARCHAR, VIEW, ViewMeta, ViewResponseDto, XML, YEAR, YESTERDAY, ZALO_BOT, ZALO_OA, ZALO_OA_GROUP, ZALO_OA_PROMOTION, ZALO_PERSONAL, ZALO_ZNS } from '../shared-types';
1
+ import type { AgentFlowSchemaDto, ColumnResponseDto, CreateTableFieldDto, FilterResponseDto, TableResponseDto } from '../shared-types';
2
+ import { FieldType, FilterComparisonOp, FilterComparisonSubOp, FilterLogicalOp, NotificationProviderType, ReferentialAction, RelationType, RollupFunction, ViewType } from '../shared-types';
3
+ export type { ACTION, AgentFlowSchemaDto, AI, ALL_OF, AND, ANY_OF, API, ApiResponseDto, ARRAY, ATTACHMENT, AUTONUMBER, AVG, AVG_DISTINCT, BARCODE, BELONGS_TO, BETWEEN, BIGINT, BIGSERIAL, BINARY, BIT, BLANK, BLOB, BOOLEAN, BUTTON, BYTEA, CALENDAR, CASCADE, CHAR, CHECKED, CIDR, COLLABORATIVE, ColumnResponseDto, COUNT, COUNT_DISTINCT, CreateColumnDto, CREATED_BY, CREATED_TIME, CreateTableFieldDto, CURRENCY, CUSTOM, CUSTOMER_PLATFORM, DASHBOARD, DATE, DATETIME, DATETIME2, DAYS_AGO, DAYS_FROM_NOW, DECIMAL, DEFAULT, DOCUMENT, DOUBLE, DURATION, EAV, EMAIL, EMAIL_GMAIL, EMAIL_SMTP, EMPTY, END, ENUM, EQ, EXACT_DATE, EXTERNAL_TEMPLATE, FACEBOOK_PAGE, FieldConfig, FILTER, FilterResponseDto, FLOAT, FORM, FORMULA, GALLERY, GEOGRAPHY, GEOMETRY, GRID, GROUP_BY_EQ, GROUP_BY_NULL, GT, GTE, HAS_MANY, HSTORE, IMAGE, IN_SYSTEM, INET, InstructionEdgeDto, InstructionFlowDto, InstructionStepDto, INT, INTEGER, INTERVAL, IS, IS_NOT, IS_WITHIN, JSON, JsonArray, JSONB, JsonObject, JsonPrimitive, JsonValue, KANBAN, LIKE, LINK_TO_ANOTHER_RECORD, LINKS, LOCKED, LONG_TEXT, LONGTEXT, LOOKUP, LookupConfigDto, LookupConfigResponseDto, LT, LTE, MACADDR, MANY_TO_MANY, MAP, MAX, MEDIUMINT, MEDIUMTEXT, MIN, MODIFIED_BY, MODIFIED_TIME, MONEY, MULTI_SELECT, NCHAR, NEQ, NEXT_MONTH, NEXT_NUMBER_OF_DAYS, NEXT_WEEK, NEXT_YEAR, NLIKE, NO, NO_ACTION, NOT, NOT_ALL_OF, NOT_ANY_OF, NOT_BETWEEN, NOT_BLANK, NOT_CHECKED, NOT_EMPTY, NOT_NULL, NOTIFICATION, NULL, NUMBER, NUMERIC, NVARCHAR, OBJECT_ID, ONE_MONTH_AGO, ONE_MONTH_FROM_NOW, ONE_TO_ONE, ONE_WEEK_AGO, ONE_WEEK_FROM_NOW, OR, ORDER, PAST_MONTH, PAST_NUMBER_OF_DAYS, PAST_WEEK, PAST_YEAR, PERCENT, PERSONAL, PHONE, PHYSICAL, POINT, PositionDto, QR_CODE, RATING, REAL, RELATION, RelationConfigDto, RelationConfigResponseDto, RelationFieldRefDto, RESTRICT, ROLLUP, RollupConfigDto, RollupConfigResponseDto, SELECT, SERIAL, SET, SET_DEFAULT, SET_NULL, SMALLDATETIME, SMALLINT, SMALLMONEY, START, STEP, SUM, SUM_DISTINCT, TABLE, TableResponseDto, TELEGRAM, TEXT, TIME, TIMESTAMP, TIMESTAMPTZ, TINYINT, TINYTEXT, TODAY, TOMORROW, UiEdgeDto, UiGraphDto, UiStepDataDto, UiStepDto, UNIQUEIDENTIFIER, URL, USER, UUID, VARBINARY, VARCHAR, VIEW, ViewResponseDto, XML, YEAR, YESTERDAY, ZALO_BOT, ZALO_GROUP, ZALO_OA, ZALO_OA_GROUP, ZALO_OA_PROMOTION, ZALO_PERSONAL, ZALO_ZNS } from '../shared-types';
4
4
  export { ExternalDataType, FieldType, FilterComparisonOp, FilterComparisonSubOp, FilterLogicalOp, FlowNodeType, ModelType, NotificationProviderType, ReferentialAction, RelationType, RollupFunction, RowColoringMode, StorageMode, ViewLockType, ViewType } from '../shared-types';
5
5
  export interface ActiveFormInfoDto {
6
6
  formId: string;
@@ -9,16 +9,12 @@ export interface ActiveFormInfoDto {
9
9
  currentValues?: Record<string, any>;
10
10
  metadata?: Record<string, any>;
11
11
  }
12
- export interface AgentFlowSchemaDto {
13
- instruction: InstructionFlowDto;
14
- ui: UiGraphDto;
15
- }
16
12
  export interface AskAiCodeEditorDto {
17
13
  editorContent: CodeEditorContentDto;
18
14
  action?: 'edit' | 'refactor' | 'optimize' | 'fix';
19
15
  }
20
16
  export interface AskAiCodeEditorResponseData {
21
- edits: CodeEditorEditOperation[];
17
+ edits: (CodeEditorEditOperation)[];
22
18
  path?: string;
23
19
  totalEdits?: number;
24
20
  metadata?: {
@@ -36,10 +32,10 @@ export interface AskAiCreateSkillDataDto {
36
32
  name: string;
37
33
  description: string;
38
34
  skillBody: string;
39
- docs: AskAiSkillDocResultDto[];
40
- toolIds: string[];
41
- mcpIds: string[];
42
- workflowIds: string[];
35
+ docs: (AskAiSkillDocResultDto)[];
36
+ toolIds: (string)[];
37
+ mcpIds: (string)[];
38
+ workflowIds: (string)[];
43
39
  }
44
40
  export interface AskAiCreateSkillRequestDto {
45
41
  prompt: string;
@@ -58,7 +54,7 @@ export interface AskAiDynamicTableBlueprintDto {
58
54
  name: string;
59
55
  slug: string;
60
56
  description?: string;
61
- fields: AskAiDynamicTableFieldBlueprintDto[];
57
+ fields: (AskAiDynamicTableFieldBlueprintDto)[];
62
58
  note?: string;
63
59
  }
64
60
  export interface AskAiDynamicTableContextFieldDto {
@@ -72,18 +68,28 @@ export interface AskAiDynamicTableContextFieldDto {
72
68
  isUnique?: boolean | null;
73
69
  isReadonly?: boolean | null;
74
70
  isVirtual?: boolean | null;
75
- config?: Record<string, any> | null;
76
- meta?: Record<string, any> | null;
77
- relation?: Record<string, any> | null;
78
- lookup?: Record<string, any> | null;
79
- rollup?: Record<string, any> | null;
71
+ config?: {
72
+ [key: string]: unknown;
73
+ };
74
+ meta?: {
75
+ [key: string]: unknown;
76
+ };
77
+ relation?: {
78
+ [key: string]: unknown;
79
+ };
80
+ lookup?: {
81
+ [key: string]: unknown;
82
+ };
83
+ rollup?: {
84
+ [key: string]: unknown;
85
+ };
80
86
  }
81
87
  export interface AskAiDynamicTableContextTableDto {
82
88
  id: string;
83
89
  name: string;
84
90
  slug: string;
85
91
  description?: string | null;
86
- fields: AskAiDynamicTableContextFieldDto[];
92
+ fields: (AskAiDynamicTableContextFieldDto)[];
87
93
  }
88
94
  export interface AskAiDynamicTableContextViewDto {
89
95
  id: string;
@@ -91,7 +97,7 @@ export interface AskAiDynamicTableContextViewDto {
91
97
  type: ViewType;
92
98
  tableId: string;
93
99
  tableName: string;
94
- filters?: FilterResponseDto[];
100
+ filters?: (FilterResponseDto)[];
95
101
  }
96
102
  export interface AskAiDynamicTableDecisionDto {
97
103
  shouldCreate: boolean;
@@ -105,8 +111,12 @@ export interface AskAiDynamicTableFieldBlueprintDto {
105
111
  isPrimary?: boolean;
106
112
  isRequired?: boolean;
107
113
  isUnique?: boolean;
108
- config?: Record<string, any>;
109
- meta?: Record<string, any>;
114
+ config?: {
115
+ [key: string]: unknown;
116
+ };
117
+ meta?: {
118
+ [key: string]: unknown;
119
+ };
110
120
  relationConfig?: AskAiDynamicTableRelationConfigDto;
111
121
  lookupConfig?: AskAiDynamicTableLookupConfigDto;
112
122
  rollupConfig?: AskAiDynamicTableRollupConfigDto;
@@ -114,18 +124,18 @@ export interface AskAiDynamicTableFieldBlueprintDto {
114
124
  }
115
125
  export interface AskAiDynamicTableFieldRequestDto {
116
126
  prompt: string;
117
- tableIds?: string[];
127
+ tableIds?: (string)[];
118
128
  includeExistingTables?: boolean;
119
129
  apply?: boolean;
120
130
  }
121
131
  export interface AskAiDynamicTableFieldResponseDto {
122
132
  decision: AskAiDynamicTableDecisionDto;
123
- field?: CreateTableFieldDto | null;
124
- warnings?: string[];
133
+ field?: CreateTableFieldDto;
134
+ warnings?: (string)[];
125
135
  contextTable?: AskAiDynamicTableContextTableDto;
126
- contextTables?: AskAiDynamicTableContextTableDto[];
136
+ contextTables?: (AskAiDynamicTableContextTableDto)[];
127
137
  applied?: boolean;
128
- createdField?: ColumnResponseDto | null;
138
+ createdField?: ColumnResponseDto;
129
139
  }
130
140
  export interface AskAiDynamicTableFilterNodeDto {
131
141
  clientKey: string;
@@ -142,20 +152,20 @@ export interface AskAiDynamicTableFilterNodeDto {
142
152
  }
143
153
  export interface AskAiDynamicTableFilterResponseDto {
144
154
  decision: AskAiDynamicTableDecisionDto;
145
- filters?: AskAiDynamicTableFilterNodeDto[];
146
- warnings?: string[];
155
+ filters?: (AskAiDynamicTableFilterNodeDto)[];
156
+ warnings?: (string)[];
147
157
  contextView?: AskAiDynamicTableContextViewDto;
148
158
  contextTable?: AskAiDynamicTableContextTableDto;
149
159
  applied?: boolean;
150
- createdFilters?: FilterResponseDto[];
160
+ createdFilters?: (FilterResponseDto)[];
151
161
  }
152
162
  export interface AskAiDynamicTableFormulaPayloadDto {
153
163
  formulaExpression: string;
154
164
  outputType: 'number' | 'text' | 'date' | 'boolean';
155
165
  normalizedFormula?: string;
156
- referencedFieldIds?: string[];
157
- referencedFieldKeys?: string[];
158
- usedFunctions?: string[];
166
+ referencedFieldIds?: (string)[];
167
+ referencedFieldKeys?: (string)[];
168
+ usedFunctions?: (string)[];
159
169
  validationError?: string | null;
160
170
  }
161
171
  export interface AskAiDynamicTableFormulaRequestDto {
@@ -166,12 +176,12 @@ export interface AskAiDynamicTableFormulaRequestDto {
166
176
  }
167
177
  export interface AskAiDynamicTableFormulaResponseDto {
168
178
  decision: AskAiDynamicTableDecisionDto;
169
- formula?: AskAiDynamicTableFormulaPayloadDto | null;
170
- warnings?: string[];
179
+ formula?: AskAiDynamicTableFormulaPayloadDto;
180
+ warnings?: (string)[];
171
181
  contextTable?: AskAiDynamicTableContextTableDto;
172
- contextField?: AskAiDynamicTableContextFieldDto | null;
182
+ contextField?: AskAiDynamicTableContextFieldDto;
173
183
  applied?: boolean;
174
- updatedField?: ColumnResponseDto | null;
184
+ updatedField?: ColumnResponseDto;
175
185
  }
176
186
  export interface AskAiDynamicTableLookupConfigDto {
177
187
  relationFieldRef: AskAiDynamicTableRelationFieldRefDto;
@@ -181,7 +191,7 @@ export interface AskAiDynamicTableLookupConfigDto {
181
191
  export interface AskAiDynamicTableRelationConfigDto {
182
192
  relationType: RelationType;
183
193
  relatedTableId?: string | null;
184
- relatedTableRef?: AskAiDynamicTableRelationTableRefDto | null;
194
+ relatedTableRef?: AskAiDynamicTableRelationTableRefDto;
185
195
  onUpdate?: ReferentialAction | null;
186
196
  onDelete?: ReferentialAction | null;
187
197
  isVirtual?: boolean | null;
@@ -196,20 +206,17 @@ export interface AskAiDynamicTableRelationTableRefDto {
196
206
  }
197
207
  export interface AskAiDynamicTableRequestDto {
198
208
  prompt: string;
199
- tableIds?: string[];
209
+ tableIds?: (string)[];
200
210
  includeExistingTables?: boolean;
201
211
  }
202
212
  export interface AskAiDynamicTableResponseDto {
203
- decision: {
204
- shouldCreate: boolean;
205
- reason?: string;
206
- };
207
- tables: AskAiDynamicTableBlueprintDto[];
208
- assumptions?: string[];
209
- warnings?: string[];
210
- contextTables?: AskAiDynamicTableContextTableDto[];
213
+ decision: {};
214
+ tables: (AskAiDynamicTableBlueprintDto)[];
215
+ assumptions?: (string)[];
216
+ warnings?: (string)[];
217
+ contextTables?: (AskAiDynamicTableContextTableDto)[];
211
218
  applied?: boolean;
212
- createdTables?: TableResponseDto[];
219
+ createdTables?: (TableResponseDto)[];
213
220
  }
214
221
  export interface AskAiDynamicTableRollupConfigDto {
215
222
  relationFieldRef: AskAiDynamicTableRelationFieldRefDto;
@@ -222,6 +229,47 @@ export interface AskAiDynamicTableTargetFieldRefDto {
222
229
  fieldKey?: string;
223
230
  tableClientKey?: string;
224
231
  }
232
+ export interface AskAiDynamicTableTextWidgetGenerateRequestDto {
233
+ mode: AskAiDynamicTableTextWidgetMode;
234
+ instruction: string;
235
+ widgetId?: string;
236
+ content: {
237
+ [key: string]: unknown;
238
+ };
239
+ selection?: AskAiDynamicTableTextWidgetSelectionDto;
240
+ variables?: (AskAiDynamicTableTextWidgetVariableDto)[];
241
+ }
242
+ export declare enum AskAiDynamicTableTextWidgetMode {
243
+ DOCUMENT = "document",
244
+ SELECTION = "selection"
245
+ }
246
+ export interface AskAiDynamicTableTextWidgetResolvedVariableDto {
247
+ key: string;
248
+ sourceWidgetId: string;
249
+ sourceWidgetTitle?: string | null;
250
+ displayValue: string;
251
+ status: 'resolved' | 'missing' | 'forbidden' | 'invalid_source';
252
+ }
253
+ export interface AskAiDynamicTableTextWidgetResponseDto {
254
+ mode: AskAiDynamicTableTextWidgetMode;
255
+ content?: {
256
+ [key: string]: unknown;
257
+ };
258
+ fragment?: ({
259
+ [key: string]: unknown;
260
+ })[];
261
+ warnings?: (string)[];
262
+ resolvedVariables?: (AskAiDynamicTableTextWidgetResolvedVariableDto)[];
263
+ }
264
+ export interface AskAiDynamicTableTextWidgetSelectionDto {
265
+ from: number;
266
+ to: number;
267
+ selectedText?: string;
268
+ }
269
+ export interface AskAiDynamicTableTextWidgetVariableDto {
270
+ key: string;
271
+ sourceWidgetId: string;
272
+ }
225
273
  export interface AskAiDynamicTableViewFilterRequestDto {
226
274
  prompt: string;
227
275
  apply?: boolean;
@@ -244,14 +292,14 @@ export interface AskAiExternalTemplateResponseData {
244
292
  suggestedName?: string;
245
293
  }
246
294
  export interface AskAiFormEditDto {
247
- activeForms: ActiveFormInfoDto[];
295
+ activeForms: (ActiveFormInfoDto)[];
248
296
  action?: 'fill' | 'reset' | 'validate' | 'submit' | 'update';
249
297
  }
250
298
  export interface AskAiFormEditResponseData {
251
299
  action: string;
252
300
  isMultiForm: boolean;
253
301
  totalForms: number;
254
- forms: FormControlData[];
302
+ forms: (FormControlData)[];
255
303
  formId?: string;
256
304
  data?: Record<string, any>;
257
305
  metadata?: Record<string, any>;
@@ -267,18 +315,18 @@ export interface AskAiIdentityCardExtractDataDto {
267
315
  dateOfExpiry: string;
268
316
  }
269
317
  export interface AskAiIdentityCardExtractRequestDto {
270
- imageUrls: string[];
318
+ imageUrls: (string)[];
271
319
  agentId?: string;
272
320
  timeoutMs?: number;
273
321
  }
274
322
  export interface AskAiIdentityCardExtractResponseDto {
275
323
  data: AskAiIdentityCardExtractDataDto;
276
- warnings?: string[];
324
+ warnings?: (string)[];
277
325
  }
278
326
  export interface AskAiPageTemplateDto {
279
327
  pageTemplateId?: string;
280
- apiIds?: string[];
281
- userCustomToolIds?: string[];
328
+ apiIds?: (string)[];
329
+ userCustomToolIds?: (string)[];
282
330
  pattern?: 'props-driven' | 'all-in-one';
283
331
  }
284
332
  export interface AskAiPageTemplateResponseData {
@@ -305,6 +353,37 @@ export interface AskAiResponseDto {
305
353
  codeEditorData?: AskAiCodeEditorResponseData;
306
354
  error?: string;
307
355
  }
356
+ export interface AskAiSegmentDecisionDto {
357
+ shouldCreate: boolean;
358
+ reason?: string;
359
+ }
360
+ export interface AskAiSegmentFieldContextDto {
361
+ fullFieldName: string;
362
+ displayName: string;
363
+ description?: string;
364
+ dataType: string;
365
+ supportedOperators: (string)[];
366
+ options?: ({
367
+ value?: string;
368
+ label?: string;
369
+ })[];
370
+ }
371
+ export interface AskAiSegmentRequestDto {
372
+ prompt: string;
373
+ targetType?: SegmentTargetType;
374
+ apply?: boolean;
375
+ }
376
+ export interface AskAiSegmentResponseDto {
377
+ decision: AskAiSegmentDecisionDto;
378
+ resolvedTargetType: SegmentTargetType;
379
+ segment?: UserCreateSegmentDto;
380
+ assumptions?: (string)[];
381
+ warnings?: (string)[];
382
+ estimatedTargetCount?: number | null;
383
+ applied?: boolean;
384
+ createdSegment?: UserSegmentResponseDto;
385
+ availableFields?: (AskAiSegmentFieldContextDto)[];
386
+ }
308
387
  export interface AskAiSkillDocResultDto {
309
388
  action: 'create' | 'update' | 'delete';
310
389
  docId: string;
@@ -313,9 +392,9 @@ export interface AskAiSkillDocResultDto {
313
392
  reason?: string;
314
393
  }
315
394
  export interface AskAiSkillResourcesDto {
316
- toolIds?: string[];
317
- mcpIds?: string[];
318
- workflowIds?: string[];
395
+ toolIds?: (string)[];
396
+ mcpIds?: (string)[];
397
+ workflowIds?: (string)[];
319
398
  }
320
399
  export declare enum AskAiType {
321
400
  EMAIL_TEMPLATE = "EMAIL_TEMPLATE",
@@ -328,7 +407,7 @@ export interface AskAiUpdateSkillDataDto {
328
407
  id: string;
329
408
  name: string;
330
409
  skillBody: string;
331
- docOperations: AskAiSkillDocResultDto[];
410
+ docOperations: (AskAiSkillDocResultDto)[];
332
411
  }
333
412
  export interface AskAiUpdateSkillRequestDto {
334
413
  skillId: string;
@@ -349,7 +428,7 @@ export interface BaseAskAiDto {
349
428
  }
350
429
  export interface CodeEditorContentDto {
351
430
  path: string;
352
- lines: CodeEditorLineDto[];
431
+ lines: (CodeEditorLineDto)[];
353
432
  docLength: number;
354
433
  selection?: CodeEditorSelectionDto;
355
434
  timestamp: number;
@@ -381,11 +460,15 @@ export interface CodeEditorSelectionDto {
381
460
  column: number;
382
461
  };
383
462
  }
463
+ export declare enum ConditionType {
464
+ AND = "AND",
465
+ OR = "OR"
466
+ }
384
467
  export interface CurrencyResponseDto {
385
468
  code: string;
386
469
  name: string;
387
470
  number: string;
388
- symbol?: string | null;
471
+ symbol?: unknown | null;
389
472
  }
390
473
  export declare enum ExternalTemplateType {
391
474
  ZALO_OA = "ZALO_OA",
@@ -394,6 +477,12 @@ export declare enum ExternalTemplateType {
394
477
  ZALO_ZNS = "ZALO_ZNS",
395
478
  NOTIFICATION = "NOTIFICATION"
396
479
  }
480
+ export interface FilterConditionDto {
481
+ id?: string;
482
+ field: string;
483
+ operator: SegmentFieldOperator;
484
+ value?: any;
485
+ }
397
486
  export interface FlowSchemaAskAiResponseDto {
398
487
  flowSchema: AgentFlowSchemaDto;
399
488
  warnings?: string[];
@@ -402,8 +491,8 @@ export interface FlowSchemaGenerateRequestDto {
402
491
  prompt: string;
403
492
  currentFlowSchema?: AgentFlowSchemaDto;
404
493
  instruction?: string;
405
- projectIds?: string[];
406
- multiAgents?: InstructionMultiAgentDto[];
494
+ projectIds?: (string)[];
495
+ multiAgents?: (InstructionMultiAgentDto)[];
407
496
  }
408
497
  export interface FlowSchemaUpdateRequestDto {
409
498
  prompt: string;
@@ -414,16 +503,6 @@ export interface FormControlData {
414
503
  action: string;
415
504
  data: Record<string, any>;
416
505
  }
417
- export interface InstructionEdgeDto {
418
- from: number;
419
- to: number;
420
- reason?: string;
421
- }
422
- export interface InstructionFlowDto {
423
- start: number;
424
- steps: InstructionStepDto[];
425
- edges: InstructionEdgeDto[];
426
- }
427
506
  export interface InstructionMultiAgentDto {
428
507
  agentId: string;
429
508
  prompt: string;
@@ -433,8 +512,8 @@ export interface InstructionOptimizationRequestDto {
433
512
  prompt: string;
434
513
  typeAgentId: number;
435
514
  currentInstruction?: string;
436
- projectIds?: string[];
437
- skillIds?: string[];
515
+ projectIds?: (string)[];
516
+ skillIds?: (string)[];
438
517
  }
439
518
  export interface InstructionOptimizationUpdateRequestDto {
440
519
  prompt: string;
@@ -450,44 +529,130 @@ export interface InstructionOptimizationUpdateRequestDto {
450
529
  languages?: string[];
451
530
  nations?: string;
452
531
  };
453
- skillIds?: string[];
454
- }
455
- export interface InstructionStepDto {
456
- id: number;
457
- type: FlowNodeType;
458
- prompt?: string;
459
- example?: string;
460
- }
461
- export interface JsonArray extends Array<JsonValue> {
462
- __jsonArrayBrand?: 'JsonArray';
463
- }
464
- export interface PositionDto {
465
- x: number;
466
- y: number;
467
- }
468
- export interface UiEdgeDto {
469
- id: number;
470
- source: number;
471
- target: number;
472
- sourceHandle?: string;
473
- }
474
- export interface UiGraphDto {
475
- steps: UiStepDto[];
476
- edges: UiEdgeDto[];
477
- }
478
- export interface UiStepDataDto {
479
- label?: string;
532
+ skillIds?: (string)[];
533
+ }
534
+ export declare enum ResourceType {
535
+ API = "api",
536
+ CUSTOM_TOOL = "custom_tool",
537
+ USER = "USER",
538
+ IN_SYSTEM = "IN_SYSTEM"
539
+ }
540
+ export interface SegmentCriteriaDto {
541
+ groups: (SegmentGroupDto)[];
542
+ }
543
+ export declare enum SegmentFieldOperator {
544
+ EQUALS = "equals",
545
+ NOT_EQUALS = "not_equals",
546
+ CONTAINS = "contains",
547
+ NOT_CONTAINS = "not_contains",
548
+ STARTS_WITH = "starts_with",
549
+ ENDS_WITH = "ends_with",
550
+ IN = "in",
551
+ NOT_IN = "not_in",
552
+ GREATER_THAN = "greater_than",
553
+ GREATER_THAN_OR_EQUAL = "greater_than_or_equal",
554
+ LESS_THAN = "less_than",
555
+ LESS_THAN_OR_EQUAL = "less_than_or_equal",
556
+ BETWEEN = "between",
557
+ IS_TRUE = "is_true",
558
+ IS_FALSE = "is_false",
559
+ EXISTS = "exists",
560
+ NOT_EXISTS = "not_exists",
561
+ EMPTY = "empty",
562
+ NOT_EMPTY = "not_empty",
563
+ IS_NULL = "is_null",
564
+ IS_NOT_NULL = "is_not_null",
565
+ HAS_ANY = "has_any",
566
+ HAS_ALL = "has_all",
567
+ HAS_TAG = "has_tag",
568
+ HAS_ANY_TAG = "has_any_tag",
569
+ HAS_ALL_TAGS = "has_all_tags",
570
+ NOT_HAS_TAG = "not_has_tag",
571
+ IN_ZALO_GROUP = "in_zalo_group",
572
+ NOT_IN_ZALO_GROUP = "not_in_zalo_group",
573
+ IN_ANY_ZALO_GROUP = "in_any_zalo_group",
574
+ NOT_IN_ANY_ZALO_GROUP = "not_in_any_zalo_group"
575
+ }
576
+ export interface SegmentGroupDto {
577
+ id?: string;
578
+ logicalOperator: ConditionType;
579
+ conditions: (FilterConditionDto)[];
580
+ }
581
+ export declare enum SegmentTargetType {
582
+ USER = "USER",
583
+ AUDIENCE = "AUDIENCE",
584
+ ZALO_GROUP = "ZALO_GROUP",
585
+ CUSTOMER_PLATFORM = "CUSTOMER_PLATFORM"
586
+ }
587
+ export declare enum TagCategory {
588
+ AUDIENCE = "AUDIENCE",
589
+ SEGMENT = "SEGMENT",
590
+ TEMPLATE_EMAIL = "TEMPLATE_EMAIL",
591
+ ZALO_GROUP = "ZALO_GROUP"
592
+ }
593
+ export interface TagSummaryDto {
594
+ id: string;
595
+ name: string;
596
+ color: string;
597
+ targetCount: number;
598
+ resourceType?: ResourceType;
599
+ category?: TagCategory;
480
600
  }
481
- export interface UiStepDto {
482
- id: number;
483
- type: FlowNodeType;
484
- position: PositionDto;
485
- data: UiStepDataDto;
601
+ export interface UserCreateSegmentDto {
602
+ name: string;
603
+ description?: string;
604
+ targetType?: SegmentTargetType;
605
+ criteria: SegmentCriteriaDto;
486
606
  }
607
+ export interface UserSegmentResponseDto {
608
+ id: string;
609
+ name: string;
610
+ description: string;
611
+ criteria: SegmentCriteriaDto;
612
+ audienceCount: number;
613
+ createdAt: number;
614
+ updatedAt: number;
615
+ resourceType: ResourceType.USER | ResourceType.IN_SYSTEM;
616
+ targetType: SegmentTargetType;
617
+ tags?: TagSummaryDto;
618
+ }
619
+ export type AUDIENCE = unknown;
487
620
  export type CODE_EDITOR = unknown;
621
+ export type CONTAINS = unknown;
622
+ export type CUSTOM_TOOL = unknown;
488
623
  export type EMAIL_TEMPLATE = unknown;
624
+ export type ENDS_WITH = unknown;
625
+ export type EQUALS = unknown;
626
+ export type EXISTS = unknown;
489
627
  export type FORM_EDIT = unknown;
628
+ export type GREATER_THAN = unknown;
629
+ export type GREATER_THAN_OR_EQUAL = unknown;
630
+ export type HAS_ALL = unknown;
631
+ export type HAS_ALL_TAGS = unknown;
632
+ export type HAS_ANY = unknown;
633
+ export type HAS_ANY_TAG = unknown;
634
+ export type HAS_TAG = unknown;
635
+ export type IN = unknown;
636
+ export type IN_ANY_ZALO_GROUP = unknown;
637
+ export type IN_ZALO_GROUP = unknown;
638
+ export type IS_FALSE = unknown;
639
+ export type IS_NOT_NULL = unknown;
640
+ export type IS_NULL = unknown;
641
+ export type IS_TRUE = unknown;
642
+ export type LESS_THAN = unknown;
643
+ export type LESS_THAN_OR_EQUAL = unknown;
644
+ export type NOT_CONTAINS = unknown;
645
+ export type NOT_EQUALS = unknown;
646
+ export type NOT_EXISTS = unknown;
647
+ export type NOT_HAS_TAG = unknown;
648
+ export type NOT_IN = unknown;
649
+ export type NOT_IN_ANY_ZALO_GROUP = unknown;
650
+ export type NOT_IN_ZALO_GROUP = unknown;
490
651
  export type PAGE_TEMPLATE = unknown;
652
+ export type SEGMENT = unknown;
653
+ export type SELECTION = unknown;
654
+ export type STARTS_WITH = unknown;
655
+ export type TEMPLATE_EMAIL = unknown;
491
656
  export interface AdminAskAiOptimizeInstructionUpdateParams {
492
657
  body: InstructionOptimizationUpdateRequestDto;
493
658
  }
@@ -524,6 +689,10 @@ export interface AskAiDynamicTableGenerateFormulaParams {
524
689
  tableId: string;
525
690
  body: AskAiDynamicTableFormulaRequestDto;
526
691
  }
692
+ export interface AskAiDynamicTableGenerateTextWidgetContentParams {
693
+ dashboardId: string;
694
+ body: AskAiDynamicTableTextWidgetGenerateRequestDto;
695
+ }
527
696
  export interface AskAiDynamicTableSuggestFieldParams {
528
697
  tableId: string;
529
698
  body: AskAiDynamicTableFieldRequestDto;
@@ -543,6 +712,12 @@ export interface AskAiOptimizeInstructionParams {
543
712
  export interface AskAiOptimizeInstructionUpdateParams {
544
713
  body: InstructionOptimizationUpdateRequestDto;
545
714
  }
715
+ export interface AskAiSegmentCreateParams {
716
+ body: AskAiSegmentRequestDto;
717
+ }
718
+ export interface AskAiSegmentSuggestParams {
719
+ body: AskAiSegmentRequestDto;
720
+ }
546
721
  export interface AskAiSkillCreateSkillParams {
547
722
  body: AskAiCreateSkillRequestDto;
548
723
  headers?: {
@@ -558,59 +733,4 @@ export interface AskAiSkillUpdateSkillParams {
558
733
  export interface CommonGetCurrenciesParams {
559
734
  _?: never;
560
735
  }
561
- export interface FieldConfig {
562
- defaultValue?: unknown;
563
- options?: {
564
- id: string;
565
- label: string;
566
- color?: string;
567
- }[];
568
- precision?: number;
569
- currencySymbol?: string;
570
- currencyCode?: string;
571
- percentFormat?: 'decimal' | 'whole';
572
- maxRating?: number;
573
- ratingIcon?: 'star' | 'heart' | 'thumb';
574
- prefix?: string;
575
- startNumber?: number;
576
- digitCount?: number;
577
- dateFormat?: string;
578
- timeFormat?: '12h' | '24h';
579
- includeTime?: boolean;
580
- timezone?: string;
581
- durationFormat?: 'h:mm' | 'h:mm:ss' | 'days';
582
- targetTableId?: string;
583
- allowMultiple?: boolean;
584
- symmetricFieldId?: string;
585
- relationFieldId?: string;
586
- lookupFieldId?: string;
587
- rollupRelationFieldId?: string;
588
- rollupFieldId?: string;
589
- rollupFunction?: 'sum' | 'avg' | 'min' | 'max' | 'count' | 'counta' | 'countall';
590
- formulaExpression?: string;
591
- outputType?: 'number' | 'text' | 'date' | 'boolean';
592
- enableRichText?: boolean;
593
- maxLength?: number;
594
- defaultCountryCode?: string;
595
- urlType?: 'any' | 'image' | 'video';
596
- allowMultipleUsers?: boolean;
597
- notifyOnAssign?: boolean;
598
- allowedFileTypes?: string[];
599
- maxFileSize?: number;
600
- maxFiles?: number;
601
- qrValueFieldId?: string;
602
- barcodeValueFieldId?: string;
603
- barcodeFormat?: string;
604
- buttonLabel?: string;
605
- buttonType?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
606
- buttonActionType?: 'url' | 'api' | 'script' | 'email' | 'page';
607
- buttonActionConfig?: Record<string, any>;
608
- buttonIcon?: string;
609
- buttonTooltip?: string;
610
- buttonWidth?: number;
611
- buttonConfirmation?: string;
612
- aiPrompt?: string;
613
- aiModel?: string;
614
- aiConfig?: Record<string, any>;
615
- }
616
736
  //# sourceMappingURL=types.d.ts.map