@redonvn/redai-backend-api-sdk 0.5.49 → 0.5.50

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.
@@ -1,85 +1,113 @@
1
- type PeerCertificate = unknown;
1
+ type AuthClientCtor = new (...args: any[]) => AuthClient;
2
+ type PeerCertificate = Record<string, unknown>;
2
3
  type HttpsAgentOptions = Record<string, unknown>;
3
4
  type HttpAgentOptions = Record<string, unknown>;
4
- interface Duplex {
5
+ declare const defaultErrorRedactor: (...args: any[]) => any;
6
+ declare const Bucket: new (...args: any[]) => any;
7
+ declare const Channel: new (...args: any[]) => any;
8
+ declare const HmacKey: new (...args: any[]) => any;
9
+ declare const PubSub: {
10
+ prototype: {
11
+ request: (...args: any[]) => any;
12
+ };
13
+ };
14
+ declare class Readable {
15
+ [key: string]: any;
5
16
  }
6
- interface Readable {
7
- read?(size?: number): any;
17
+ declare class Writable {
18
+ [key: string]: any;
19
+ end(...args: any[]): Writable;
8
20
  }
9
- interface Writable {
10
- end(...args: any[]): any;
21
+ declare class Duplex extends Readable {
22
+ [key: string]: any;
11
23
  }
12
- interface Transform {
24
+ declare class PassThrough extends Duplex {
25
+ [key: string]: any;
13
26
  }
14
- interface PassThrough {
27
+ declare class Transform extends Duplex {
28
+ [key: string]: any;
15
29
  }
16
- interface EventEmitter {
30
+ declare class EventEmitter {
31
+ [key: string]: any;
17
32
  }
18
- declare const defaultErrorRedactor: any;
19
- declare const Bucket: any;
20
- declare const Channel: any;
21
- declare const HmacKey: any;
22
- declare const PubSub: any;
23
- declare const grpc: {
24
- ChannelCredentials: any;
25
- };
26
33
  declare namespace r {
27
- type Response = any;
28
- type Request = any;
29
- type Options = any;
30
- type CoreOptions = any;
31
- type code = any;
32
- type message = any;
33
- }
34
- declare namespace gax {
35
- type ClientStub = any;
36
- type GrpcClientOptions = any;
37
- namespace grpc {
38
- type ChannelCredentials = any;
34
+ interface CoreOptions {
35
+ [key: string]: any;
36
+ }
37
+ interface Options extends CoreOptions {
38
+ [key: string]: any;
39
+ }
40
+ interface Response {
41
+ [key: string]: any;
42
+ }
43
+ interface Request {
44
+ [key: string]: any;
39
45
  }
40
46
  }
41
47
  declare namespace grpc {
42
- interface Client {
43
- }
48
+ type status = number;
44
49
  interface Metadata {
50
+ [key: string]: any;
51
+ }
52
+ interface ServiceError extends Error {
53
+ [key: string]: any;
45
54
  }
46
- interface ServiceError {
55
+ interface Client {
56
+ [key: string]: any;
47
57
  }
48
- type status = any;
49
58
  type ChannelCredentials = any;
50
59
  }
60
+ declare namespace gax {
61
+ interface GrpcClientOptions {
62
+ [key: string]: any;
63
+ }
64
+ interface ClientStub {
65
+ [key: string]: any;
66
+ }
67
+ namespace grpc {
68
+ type ChannelCredentials = any;
69
+ }
70
+ }
71
+ declare namespace protobuf {
72
+ interface Root {
73
+ [key: string]: any;
74
+ }
75
+ }
51
76
  declare namespace google {
52
77
  namespace api {
53
78
  interface IHttpRule {
79
+ [key: string]: any;
54
80
  }
55
81
  }
56
82
  namespace pubsub {
57
83
  namespace v1 {
58
84
  interface IPubsubMessage {
85
+ [key: string]: any;
59
86
  }
60
87
  interface ISnapshot {
88
+ [key: string]: any;
61
89
  }
62
90
  interface ITopic {
91
+ [key: string]: any;
63
92
  }
64
93
  namespace StreamingPullResponse {
65
94
  interface ISubscriptionProperties {
95
+ [key: string]: any;
66
96
  }
67
97
  }
68
98
  }
69
99
  }
70
100
  }
71
- declare namespace protobuf {
72
- interface Root {
73
- }
74
- }
75
101
  declare namespace tracing {
76
- interface MessageWithAttributes {
77
- }
78
102
  interface Span {
103
+ [key: string]: any;
104
+ }
105
+ interface MessageWithAttributes {
106
+ [key: string]: any;
79
107
  }
80
108
  }
81
109
  declare namespace defer {
82
- interface DeferredPromise<T = any> extends Promise<T> {
110
+ interface DeferredPromise<T> extends Promise<T> {
83
111
  }
84
112
  }
85
113
  export interface Abortable {
@@ -141,16 +169,11 @@ export interface AgentConfig {
141
169
  flowSchema?: AgentFlowSchema;
142
170
  paymentMethods?: PaymentMethod[];
143
171
  }
144
- export type AgentContext = {
145
- instruction?: string | null;
146
- memory?: string | null;
147
- flowSchema?: AgentFlowSchemaDto | null;
148
- multiAgents?: Array<{
149
- agentId: string;
150
- name: string;
151
- prompt?: string | null;
152
- }>;
153
- } & ProjectResourceSummary;
172
+ export interface AgentContext {
173
+ type: 'admin' | 'user';
174
+ employeeId?: number;
175
+ scope?: ScopeContext;
176
+ }
154
177
  export interface AgentFlowSchema {
155
178
  instruction: InstructionFlow;
156
179
  ui: UiGraph;
@@ -182,8 +205,8 @@ export type Allow = unknown;
182
205
  export type AND = unknown;
183
206
  export type ANTHROPIC = unknown;
184
207
  export type ANY_OF = unknown;
185
- export type AnyAuthClient = AuthClient;
186
- export type AnyAuthClientConstructor = new (...args: any[]) => AuthClient;
208
+ export type AnyAuthClient = InstanceType<Extract<ALL_EXPORTS, AuthClientCtor>>;
209
+ export type AnyAuthClientConstructor = Extract<ALL_EXPORTS, AuthClientCtor>;
187
210
  export type API = unknown;
188
211
  export type API_TOKEN = unknown;
189
212
  export type API_TOKEN_CREATE = unknown;
@@ -643,14 +666,8 @@ export type CLOUD_CLOUDFLARE_R2 = unknown;
643
666
  export type CLOUD_GOOGLE_CLOUD_STORAGE = unknown;
644
667
  export type CLOUD_MINIO = unknown;
645
668
  export type CLOUD_WASABI = unknown;
646
- export interface CloudStorageIntegrationMetadata {
647
- provider: CloudStorageProvider | ProviderEnum;
648
- displayName?: string;
649
- description?: string;
650
- icon?: string;
651
- tags?: string[];
652
- websiteUrl?: string;
653
- docsUrl?: string;
669
+ export interface CloudStorageIntegrationMetadata extends IntegrationMetadataBase {
670
+ provider: CloudStorageProvider;
654
671
  supportsSignedUrl?: boolean;
655
672
  supportsVersioning?: boolean;
656
673
  supportsCustomDomain?: boolean;
@@ -1776,7 +1793,7 @@ export interface GrpcClientOptions extends GoogleAuthOptions {
1776
1793
  numericEnums?: boolean;
1777
1794
  universeDomain?: string;
1778
1795
  }
1779
- export type GrpcModule = typeof grpc;
1796
+ export type GrpcModule = any;
1780
1797
  export type GT = unknown;
1781
1798
  export type GTE = unknown;
1782
1799
  export type HAS_MANY = unknown;
@@ -1914,6 +1931,25 @@ export interface IdentityPoolClientOptions extends BaseExternalAccountClientOpti
1914
1931
  subject_token_supplier?: SubjectTokenSupplier;
1915
1932
  }
1916
1933
  export type IFRAME = unknown;
1934
+ export type IframeWidgetConfig = {
1935
+ url: string;
1936
+ provider?: IframeWidgetProvider;
1937
+ allowFullscreen?: boolean;
1938
+ };
1939
+ export interface IframeWidgetConfigDto {
1940
+ url: string;
1941
+ provider?: IframeWidgetProvider;
1942
+ allowFullscreen?: boolean;
1943
+ }
1944
+ export type IframeWidgetProvider = 'website' | 'youtube' | 'google_sheets';
1945
+ export interface IframeWidgetRuntimeDto {
1946
+ family: 'iframe';
1947
+ widgetType: 'iframe';
1948
+ sourceUrl: string;
1949
+ embedUrl: string;
1950
+ provider: 'website' | 'youtube' | 'google_sheets';
1951
+ allowFullscreen?: boolean;
1952
+ }
1917
1953
  export interface IIntegrationInputField {
1918
1954
  key: string;
1919
1955
  label: string;
@@ -2043,7 +2079,7 @@ export declare enum IntegrationJobHealthStatus {
2043
2079
  }
2044
2080
  export type IntegrationMetadata = DatabaseIntegrationMetadata | CloudStorageIntegrationMetadata | AiIntegrationMetadata | ChannelIntegrationMetadata | EmailIntegrationMetadata | SmsIntegrationMetadata | GoogleIntegrationMetadata | ShippingIntegrationMetadata | PaymentIntegrationMetadata | OtherIntegrationMetadata;
2045
2081
  export interface IntegrationMetadataBase {
2046
- provider: ProviderEnum;
2082
+ provider: ProviderEnum | string;
2047
2083
  displayName?: string;
2048
2084
  description?: string;
2049
2085
  icon?: string;
@@ -2108,15 +2144,13 @@ export interface IStateVariable {
2108
2144
  export type JSON = unknown;
2109
2145
  export type JSON_PARSE = unknown;
2110
2146
  export type JSON_STRINGIFY = unknown;
2111
- export interface JsonArray extends Array<JsonValue> {
2112
- __jsonArrayBrand?: 'JsonArray';
2113
- }
2147
+ export type JsonArray = JsonValue[];
2114
2148
  export type JSONB = unknown;
2115
- export interface JsonObject {
2149
+ export type JsonObject = {
2116
2150
  [key: string]: JsonValue;
2117
- }
2151
+ };
2118
2152
  export type JsonPrimitive = string | number | boolean | null;
2119
- export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
2153
+ export type JsonValue = JsonPrimitive | JsonArray | JsonObject;
2120
2154
  export interface JWTInput {
2121
2155
  type?: string;
2122
2156
  client_email?: string;
@@ -2340,7 +2374,9 @@ export interface MessageWithAttributes {
2340
2374
  attributes?: Attributes | null | undefined;
2341
2375
  parentSpan?: Span;
2342
2376
  }
2343
- export type Metadata = any;
2377
+ export interface Metadata {
2378
+ [key: string]: JsonValue;
2379
+ }
2344
2380
  export interface Methods {
2345
2381
  [methodName: string]: {
2346
2382
  reqOpts?: r.CoreOptions;
@@ -2527,7 +2563,10 @@ export declare enum OwnerTypeEnum {
2527
2563
  ADMIN = "ADMIN",
2528
2564
  IN_SYSTEM = "IN_SYSTEM"
2529
2565
  }
2530
- export type PagedResponse<Item, Response = unknown> = [Item[]] | [Item[], {} | null, Response];
2566
+ export interface PagedResponse<T> {
2567
+ list: T[];
2568
+ pageInfo: PageInfo;
2569
+ }
2531
2570
  export type PageInfo = {
2532
2571
  totalRows: number;
2533
2572
  page: number;
@@ -3201,6 +3240,12 @@ export interface ScopeCapability {
3201
3240
  isSystem: boolean;
3202
3241
  isActive: boolean;
3203
3242
  }
3243
+ export interface ScopeContext {
3244
+ userId: number;
3245
+ workspaceId: string;
3246
+ baseId?: string | null;
3247
+ scopeSource: ScopeSource;
3248
+ }
3204
3249
  export interface ScopeRole {
3205
3250
  id: string;
3206
3251
  scopeType: WorkspaceAuthScopeType;
@@ -3220,6 +3265,7 @@ export interface ScopeRoleCapability {
3220
3265
  role: ScopeRole;
3221
3266
  capability: ScopeCapability;
3222
3267
  }
3268
+ export type ScopeSource = 'header' | 'state' | 'derived';
3223
3269
  export type SEARCH = unknown;
3224
3270
  export declare enum SegmentFieldNamespace {
3225
3271
  USER_AUDIENCE = "user_audience",
@@ -3486,8 +3532,10 @@ export interface Snapshot {
3486
3532
  metadata?: google.pubsub.v1.ISnapshot;
3487
3533
  }
3488
3534
  export declare enum SortDirection {
3489
- ASC = "ASC",
3490
- DESC = "DESC"
3535
+ ASC = "asc",
3536
+ DESC = "desc",
3537
+ COUNT_ASC = "count-asc",
3538
+ COUNT_DESC = "count-desc"
3491
3539
  }
3492
3540
  export type SOURCE = unknown;
3493
3541
  export type SOURCE_CREATE = unknown;
@@ -3602,11 +3650,12 @@ export type Storage = Service & {
3602
3650
  Channel: typeof Channel;
3603
3651
  File: typeof File;
3604
3652
  HmacKey: typeof HmacKey;
3605
- acl: {
3653
+ aclRoles: {
3606
3654
  OWNER_ROLE: string;
3607
3655
  READER_ROLE: string;
3608
3656
  WRITER_ROLE: string;
3609
3657
  };
3658
+ acl?: any;
3610
3659
  crc32cGenerator: CRC32CValidatorGenerator;
3611
3660
  retryOptions: RetryOptions;
3612
3661
  sanitizeEndpoint: any;
@@ -4741,7 +4790,7 @@ export interface WidgetAggregationSpecDto {
4741
4790
  fieldId?: string;
4742
4791
  distinct?: boolean;
4743
4792
  }
4744
- export type WidgetConfig = ChartWidgetConfig | MetricWidgetConfig | RedaiViewWidgetConfig | TextWidgetConfig | TableWidgetConfig | ListWidgetConfig | CalendarWidgetConfig | KanbanWidgetConfig | MapWidgetConfig;
4793
+ export type WidgetConfig = ChartWidgetConfig | IframeWidgetConfig | MetricWidgetConfig | RedaiViewWidgetConfig | TextWidgetConfig | TableWidgetConfig | ListWidgetConfig | CalendarWidgetConfig | KanbanWidgetConfig | MapWidgetConfig;
4745
4794
  export type WidgetDatePreset = 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'this_month' | 'last_month' | 'this_quarter' | 'this_year';
4746
4795
  export type WidgetFilter = FilterPayload | FilterPayload[];
4747
4796
  export type WidgetMeta = {
@@ -4781,7 +4830,7 @@ export interface WidgetResponseDto {
4781
4830
  title: string;
4782
4831
  description?: string | null;
4783
4832
  type: WidgetType;
4784
- config?: ChartWidgetConfigDto | MetricWidgetConfigDto | TextWidgetConfigDto | RedaiViewWidgetConfigDto | TableWidgetConfigDto | ListWidgetConfigDto | CalendarWidgetConfigDto | KanbanWidgetConfigDto | MapWidgetConfigDto;
4833
+ config?: ChartWidgetConfigDto | IframeWidgetConfigDto | MetricWidgetConfigDto | TextWidgetConfigDto | RedaiViewWidgetConfigDto | TableWidgetConfigDto | ListWidgetConfigDto | CalendarWidgetConfigDto | KanbanWidgetConfigDto | MapWidgetConfigDto;
4785
4834
  row?: number | null;
4786
4835
  col?: number | null;
4787
4836
  sizeX?: number | null;
@@ -4812,7 +4861,7 @@ export interface WidgetRuntimeResponseDto {
4812
4861
  widget: WidgetResponseDto;
4813
4862
  runtimeType: string;
4814
4863
  resolvedQuery: WidgetRuntimeResolvedQueryResponseDto;
4815
- data: CategoricalChartRuntimeDto | ScatterChartRuntimeDto | HeatmapChartRuntimeDto | TreemapChartRuntimeDto | FunnelChartRuntimeDto | MetricWidgetRuntimeDto | TextWidgetRuntimeDto | GridEmbedWidgetRuntimeDto | RedaiViewWidgetRuntimeDto | ForbiddenWidgetRuntimeDto | {
4864
+ data: CategoricalChartRuntimeDto | ScatterChartRuntimeDto | HeatmapChartRuntimeDto | TreemapChartRuntimeDto | FunnelChartRuntimeDto | MetricWidgetRuntimeDto | TextWidgetRuntimeDto | IframeWidgetRuntimeDto | GridEmbedWidgetRuntimeDto | RedaiViewWidgetRuntimeDto | ForbiddenWidgetRuntimeDto | {
4816
4865
  [key: string]: unknown;
4817
4866
  };
4818
4867
  }
@@ -4821,49 +4870,16 @@ export type WidgetSortSpec = {
4821
4870
  direction: 'asc' | 'desc';
4822
4871
  };
4823
4872
  export declare enum WidgetType {
4824
- TABLE = "TABLE",
4825
- CHART = "CHART",
4826
- CARD = "CARD",
4827
- METRIC = "METRIC",
4828
- GAUGE = "GAUGE",
4829
- PROGRESS = "PROGRESS",
4830
- HEATMAP = "HEATMAP",
4831
- FUNNEL = "FUNNEL",
4832
- PIE_CHART = "PIE_CHART",
4833
- FORM = "FORM",
4834
- INPUT = "INPUT",
4835
- SELECT = "SELECT",
4836
- CHECKBOX_GROUP = "CHECKBOX_GROUP",
4837
- RADIO_GROUP = "RADIO_GROUP",
4838
- DATE_PICKER = "DATE_PICKER",
4839
- SLIDER = "SLIDER",
4840
- TEXT = "TEXT",
4841
- IMAGE = "IMAGE",
4842
- VIDEO = "VIDEO",
4843
- IFRAME = "IFRAME",
4844
- LIST = "LIST",
4845
- TIMELINE = "TIMELINE",
4846
- NOTIFICATION = "NOTIFICATION",
4847
- CONTAINER = "CONTAINER",
4848
- GRID = "GRID",
4849
- TABS = "TABS",
4850
- ACCORDION = "ACCORDION",
4851
- DIVIDER = "DIVIDER",
4852
- SPACER = "SPACER",
4853
- BUTTON = "BUTTON",
4854
- BUTTON_GROUP = "BUTTON_GROUP",
4855
- FILTER = "FILTER",
4856
- SEARCH = "SEARCH",
4857
- PAGINATION = "PAGINATION",
4858
- BREADCRUMB = "BREADCRUMB",
4859
- MENU = "MENU",
4860
- MODAL = "MODAL",
4861
- KPI_GRID = "KPI_GRID",
4862
- COMPARISON = "COMPARISON",
4863
- MAP = "MAP",
4864
- CALENDAR = "CALENDAR",
4865
- TREE = "TREE",
4866
- KANBAN = "KANBAN"
4873
+ CHART = "chart",
4874
+ IFRAME = "iframe",
4875
+ METRIC = "metric",
4876
+ REDAI_VIEW = "redai_view",
4877
+ TEXT = "text",
4878
+ TABLE = "table",
4879
+ LIST = "list",
4880
+ CALENDAR = "calendar",
4881
+ KANBAN = "kanban",
4882
+ MAP = "map"
4867
4883
  }
4868
4884
  export interface Workflow {
4869
4885
  id: string;