@membranehq/sdk 0.4.0 → 0.5.1

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 (82) hide show
  1. package/dist/bundle.d.ts +16299 -1303
  2. package/dist/bundle.js +3980 -3701
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +78 -1
  5. package/dist/dts/accessors/integrations-accessors.d.ts +78 -1
  6. package/dist/dts/api-client.d.ts +1 -0
  7. package/dist/dts/client.d.ts +1 -0
  8. package/dist/dts/data-schema/index.d.ts +0 -1
  9. package/dist/dts/data-schema/types.d.ts +4 -3
  10. package/dist/dts/entity-repository.d.ts +88 -20
  11. package/dist/dts/formulas/dataSchemaRef.d.ts +2 -2
  12. package/dist/dts/http-requests.d.ts +20 -6
  13. package/dist/dts/iframe.d.ts +12 -4
  14. package/dist/dts/index.d.ts +2 -1
  15. package/dist/dts/sse/index.d.ts +1 -0
  16. package/dist/dts/sse/workspace-elements.d.ts +9 -0
  17. package/dist/dts/workspace-elements/api/action-instances-api.d.ts +269 -8
  18. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +529 -10
  19. package/dist/dts/workspace-elements/api/actions-api.d.ts +1010 -45
  20. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +203 -8
  21. package/dist/dts/workspace-elements/api/app-data-schemas-api.d.ts +49 -3
  22. package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +376 -0
  23. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +293 -8
  24. package/dist/dts/workspace-elements/api/app-event-types-api.d.ts +88 -3
  25. package/dist/dts/workspace-elements/api/connections-api.d.ts +993 -42
  26. package/dist/dts/workspace-elements/api/customers-api.d.ts +92 -16
  27. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +541 -12
  28. package/dist/dts/workspace-elements/api/data-link-tables-api.d.ts +43 -2
  29. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +1590 -12
  30. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +1113 -78
  31. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +696 -19
  32. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +702 -19
  33. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +559 -10
  34. package/dist/dts/workspace-elements/api/external-events-api.d.ts +582 -6
  35. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +2786 -14
  36. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +885 -7
  37. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +1652 -47
  38. package/dist/dts/workspace-elements/api/flows-api.d.ts +3202 -52
  39. package/dist/dts/workspace-elements/api/index.d.ts +1 -1
  40. package/dist/dts/workspace-elements/api/integrations-api.d.ts +339 -26
  41. package/dist/dts/workspace-elements/api/scenarios-api.d.ts +523 -35
  42. package/dist/dts/workspace-elements/api/screens-api.d.ts +35 -15
  43. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +78 -15
  44. package/dist/dts/workspace-elements/base/action-run-log-records/types.d.ts +37 -12
  45. package/dist/dts/workspace-elements/base/actions/types.d.ts +78 -18
  46. package/dist/dts/workspace-elements/base/app-data-schema-instances/types.d.ts +59 -7
  47. package/dist/dts/workspace-elements/base/app-data-schemas/types.d.ts +49 -7
  48. package/dist/dts/workspace-elements/base/app-event-subscriptions/types.d.ts +92 -9
  49. package/dist/dts/workspace-elements/base/app-event-types/types.d.ts +84 -7
  50. package/dist/dts/workspace-elements/base/connections/types.d.ts +82 -20
  51. package/dist/dts/workspace-elements/base/connectors/types.d.ts +14 -2
  52. package/dist/dts/workspace-elements/base/customers/index.d.ts +32 -6
  53. package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +93 -92
  54. package/dist/dts/workspace-elements/base/data-link-table-instances/types.d.ts +78 -11
  55. package/dist/dts/workspace-elements/base/data-link-tables/types.d.ts +43 -4
  56. package/dist/dts/workspace-elements/base/data-source-instances/types.d.ts +1048 -19
  57. package/dist/dts/workspace-elements/base/data-sources/types.d.ts +97 -22
  58. package/dist/dts/workspace-elements/base/external-event-log-records/types.d.ts +31 -8
  59. package/dist/dts/workspace-elements/base/external-event-pulls/types.d.ts +35 -8
  60. package/dist/dts/workspace-elements/base/external-event-subscriptions/types.d.ts +197 -24
  61. package/dist/dts/workspace-elements/base/external-events/types.d.ts +145 -5
  62. package/dist/dts/workspace-elements/base/field-mapping-instances/types.d.ts +92 -16
  63. package/dist/dts/workspace-elements/base/field-mappings/types.d.ts +105 -14
  64. package/dist/dts/workspace-elements/base/flow-instances/schemas.d.ts +43 -43
  65. package/dist/dts/workspace-elements/base/flow-instances/types.d.ts +170 -24
  66. package/dist/dts/workspace-elements/base/flow-runs/flow-node-runs.d.ts +20 -20
  67. package/dist/dts/workspace-elements/base/flow-runs/types.d.ts +127 -19
  68. package/dist/dts/workspace-elements/base/flows/types.d.ts +234 -26
  69. package/dist/dts/workspace-elements/base/integrations/types.d.ts +988 -25
  70. package/dist/dts/workspace-elements/base/scenarios/types.d.ts +740 -23
  71. package/dist/dts/workspace-elements/base/screens/types.d.ts +48 -6
  72. package/dist/dts/workspace-elements/types.d.ts +25 -3
  73. package/dist/dts/workspaces/types.d.ts +4 -3
  74. package/dist/index.d.ts +26481 -3080
  75. package/dist/index.js +1717 -535
  76. package/dist/index.js.map +1 -1
  77. package/dist/index.module.d.mts +26481 -3080
  78. package/dist/index.module.mjs +1550 -502
  79. package/dist/index.module.mjs.map +1 -1
  80. package/package.json +3 -2
  81. package/dist/dts/data-schema/schemas.d.ts +0 -4
  82. package/dist/dts/workspace-elements/api/app-events-api.d.ts +0 -17
@@ -1,27 +1,103 @@
1
+ import { z } from 'zod';
1
2
  import { DataSchema } from '../../../data-schema';
2
- import { ErrorData } from '../../../errors';
3
- import { BaseMembraneInterface, WorkspaceElementState } from '../../types';
3
+ import { WorkspaceElementState } from '../../types';
4
4
  import { FieldMappingDirection } from '../field-mappings/types';
5
- export interface BaseFieldMappingInstance extends BaseMembraneInterface {
5
+ export declare const BaseFieldMappingInstance: z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ key: z.ZodOptional<z.ZodString>;
9
+ uuid: z.ZodOptional<z.ZodString>;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
12
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
13
+ createdAt: z.ZodOptional<z.ZodString>;
14
+ updatedAt: z.ZodOptional<z.ZodString>;
15
+ archivedAt: z.ZodOptional<z.ZodString>;
16
+ } & {
17
+ userId: z.ZodString;
18
+ revision: z.ZodString;
19
+ connectionId: z.ZodString;
20
+ integrationId: z.ZodString;
21
+ fieldMappingRevision: z.ZodOptional<z.ZodString>;
22
+ fieldMappingId: z.ZodOptional<z.ZodString>;
23
+ instanceKey: z.ZodOptional<z.ZodString>;
24
+ dataSourceInstanceId: z.ZodOptional<z.ZodString>;
25
+ dataSourceSchema: z.ZodOptional<z.ZodType<DataSchema, z.ZodTypeDef, DataSchema>>;
26
+ direction: z.ZodOptional<z.ZodNativeEnum<typeof FieldMappingDirection>>;
27
+ appSchema: z.ZodOptional<z.ZodType<DataSchema, z.ZodTypeDef, DataSchema>>;
28
+ importValue: z.ZodOptional<z.ZodAny>;
29
+ exportValue: z.ZodOptional<z.ZodAny>;
30
+ isCustomized: z.ZodOptional<z.ZodBoolean>;
31
+ unifiedExportValue: z.ZodOptional<z.ZodAny>;
32
+ unifiedImportValue: z.ZodOptional<z.ZodAny>;
33
+ frozenImportFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
34
+ frozenExportFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
35
+ state: z.ZodOptional<z.ZodNativeEnum<typeof WorkspaceElementState>>;
36
+ error: any;
37
+ externalSchema: z.ZodOptional<z.ZodAny>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ name: string;
41
+ revision: string;
6
42
  userId: string;
43
+ connectionId: string;
44
+ integrationId: string;
45
+ key?: string | undefined;
46
+ error?: any;
47
+ uuid?: string | undefined;
48
+ description?: string | undefined;
49
+ state?: WorkspaceElementState | undefined;
50
+ errors?: any[] | undefined;
51
+ isDeactivated?: boolean | undefined;
52
+ createdAt?: string | undefined;
53
+ updatedAt?: string | undefined;
54
+ archivedAt?: string | undefined;
55
+ instanceKey?: string | undefined;
56
+ appSchema?: DataSchema | undefined;
57
+ direction?: FieldMappingDirection | undefined;
58
+ importValue?: any;
59
+ exportValue?: any;
60
+ frozenImportFields?: string[] | undefined;
61
+ frozenExportFields?: string[] | undefined;
62
+ isCustomized?: boolean | undefined;
63
+ dataSourceInstanceId?: string | undefined;
64
+ fieldMappingRevision?: string | undefined;
65
+ fieldMappingId?: string | undefined;
66
+ dataSourceSchema?: DataSchema | undefined;
67
+ unifiedExportValue?: any;
68
+ unifiedImportValue?: any;
69
+ externalSchema?: any;
70
+ }, {
71
+ id: string;
72
+ name: string;
7
73
  revision: string;
74
+ userId: string;
8
75
  connectionId: string;
9
76
  integrationId: string;
10
- fieldMappingRevision?: string;
11
- fieldMappingId?: string;
12
- instanceKey?: string;
13
- dataSourceInstanceId?: string;
14
- dataSourceSchema?: DataSchema;
15
- direction?: FieldMappingDirection;
16
- appSchema?: DataSchema;
77
+ key?: string | undefined;
78
+ error?: any;
79
+ uuid?: string | undefined;
80
+ description?: string | undefined;
81
+ state?: WorkspaceElementState | undefined;
82
+ errors?: any[] | undefined;
83
+ isDeactivated?: boolean | undefined;
84
+ createdAt?: string | undefined;
85
+ updatedAt?: string | undefined;
86
+ archivedAt?: string | undefined;
87
+ instanceKey?: string | undefined;
88
+ appSchema?: DataSchema | undefined;
89
+ direction?: FieldMappingDirection | undefined;
17
90
  importValue?: any;
18
91
  exportValue?: any;
19
- isCustomized?: boolean;
92
+ frozenImportFields?: string[] | undefined;
93
+ frozenExportFields?: string[] | undefined;
94
+ isCustomized?: boolean | undefined;
95
+ dataSourceInstanceId?: string | undefined;
96
+ fieldMappingRevision?: string | undefined;
97
+ fieldMappingId?: string | undefined;
98
+ dataSourceSchema?: DataSchema | undefined;
20
99
  unifiedExportValue?: any;
21
100
  unifiedImportValue?: any;
22
- frozenImportFields?: string[];
23
- frozenExportFields?: string[];
24
- state?: WorkspaceElementState;
25
- error?: ErrorData;
26
101
  externalSchema?: any;
27
- }
102
+ }>;
103
+ export type BaseFieldMappingInstance = z.infer<typeof BaseFieldMappingInstance>;
@@ -1,20 +1,61 @@
1
+ import { z } from 'zod';
1
2
  import { DataSchema } from '../../../data-schema';
2
- import { BaseMembraneInterface } from '../../types';
3
3
  export declare enum FieldMappingDirection {
4
4
  IMPORT = "import",
5
5
  EXPORT = "export",
6
6
  BOTH = "both"
7
7
  }
8
- export interface BaseFieldMapping extends BaseMembraneInterface {
8
+ export declare const BaseFieldMapping: z.ZodObject<{
9
+ id: z.ZodString;
10
+ name: z.ZodString;
11
+ key: z.ZodOptional<z.ZodString>;
12
+ uuid: z.ZodOptional<z.ZodString>;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ state: z.ZodOptional<z.ZodNativeEnum<typeof import("../../types").WorkspaceElementState>>;
15
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
16
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
17
+ createdAt: z.ZodOptional<z.ZodString>;
18
+ updatedAt: z.ZodOptional<z.ZodString>;
19
+ } & {
20
+ revision: z.ZodString;
21
+ publishedRevision: z.ZodOptional<z.ZodString>;
22
+ universalFieldMappingId: z.ZodOptional<z.ZodString>;
23
+ universalFieldMappingRevision: z.ZodOptional<z.ZodString>;
24
+ integrationId: z.ZodOptional<z.ZodString>;
25
+ dataSourceId: z.ZodString;
26
+ dataSourceKey: z.ZodString;
27
+ appSchema: z.ZodType<DataSchema, z.ZodTypeDef, DataSchema>;
28
+ direction: z.ZodNativeEnum<typeof FieldMappingDirection>;
29
+ defaultImportValue: z.ZodOptional<z.ZodAny>;
30
+ defaultExportValue: z.ZodOptional<z.ZodAny>;
31
+ importValue: z.ZodOptional<z.ZodAny>;
32
+ exportValue: z.ZodOptional<z.ZodAny>;
33
+ frozenImportFields: z.ZodOptional<z.ZodAny>;
34
+ frozenExportFields: z.ZodOptional<z.ZodAny>;
35
+ frozenUnifiedExportFields: z.ZodOptional<z.ZodAny>;
36
+ archivedAt: z.ZodOptional<z.ZodString>;
37
+ customized: z.ZodOptional<z.ZodBoolean>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ name: string;
9
41
  revision: string;
10
- publishedRevision?: string;
11
- universalFieldMappingId?: string;
12
- universalFieldMappingRevision?: string;
13
- integrationId?: string;
14
42
  dataSourceId: string;
15
43
  dataSourceKey: string;
16
44
  appSchema: DataSchema;
17
45
  direction: FieldMappingDirection;
46
+ key?: string | undefined;
47
+ uuid?: string | undefined;
48
+ description?: string | undefined;
49
+ state?: import("../../types").WorkspaceElementState | undefined;
50
+ errors?: any[] | undefined;
51
+ isDeactivated?: boolean | undefined;
52
+ createdAt?: string | undefined;
53
+ updatedAt?: string | undefined;
54
+ archivedAt?: string | undefined;
55
+ integrationId?: string | undefined;
56
+ publishedRevision?: string | undefined;
57
+ universalFieldMappingId?: string | undefined;
58
+ universalFieldMappingRevision?: string | undefined;
18
59
  defaultImportValue?: any;
19
60
  defaultExportValue?: any;
20
61
  importValue?: any;
@@ -22,17 +63,67 @@ export interface BaseFieldMapping extends BaseMembraneInterface {
22
63
  frozenImportFields?: any;
23
64
  frozenExportFields?: any;
24
65
  frozenUnifiedExportFields?: any;
25
- archivedAt?: string;
26
- customized?: boolean;
27
- }
28
- export interface FieldMappingUnitConfig {
29
- key?: string;
66
+ customized?: boolean | undefined;
67
+ }, {
68
+ id: string;
69
+ name: string;
70
+ revision: string;
71
+ dataSourceId: string;
72
+ dataSourceKey: string;
73
+ appSchema: DataSchema;
74
+ direction: FieldMappingDirection;
75
+ key?: string | undefined;
76
+ uuid?: string | undefined;
77
+ description?: string | undefined;
78
+ state?: import("../../types").WorkspaceElementState | undefined;
79
+ errors?: any[] | undefined;
80
+ isDeactivated?: boolean | undefined;
81
+ createdAt?: string | undefined;
82
+ updatedAt?: string | undefined;
83
+ archivedAt?: string | undefined;
84
+ integrationId?: string | undefined;
85
+ publishedRevision?: string | undefined;
86
+ universalFieldMappingId?: string | undefined;
87
+ universalFieldMappingRevision?: string | undefined;
88
+ defaultImportValue?: any;
89
+ defaultExportValue?: any;
90
+ importValue?: any;
91
+ exportValue?: any;
92
+ frozenImportFields?: any;
93
+ frozenExportFields?: any;
94
+ frozenUnifiedExportFields?: any;
95
+ customized?: boolean | undefined;
96
+ }>;
97
+ export type BaseFieldMapping = z.infer<typeof BaseFieldMapping>;
98
+ export declare const FieldMappingUnitConfig: z.ZodObject<{
99
+ key: z.ZodOptional<z.ZodString>;
100
+ input: z.ZodOptional<z.ZodAny>;
101
+ includeRawFields: z.ZodOptional<z.ZodAny>;
102
+ importValue: z.ZodOptional<z.ZodAny>;
103
+ exportValue: z.ZodOptional<z.ZodAny>;
104
+ default: z.ZodOptional<z.ZodAny>;
105
+ defaultUnifiedValue: z.ZodOptional<z.ZodAny>;
106
+ defaultValue: z.ZodOptional<z.ZodAny>;
107
+ appSchema: z.ZodOptional<z.ZodType<DataSchema, z.ZodTypeDef, DataSchema>>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ key?: string | undefined;
110
+ default?: any;
30
111
  input?: any;
31
- includeRawFields?: any;
112
+ appSchema?: DataSchema | undefined;
32
113
  importValue?: any;
33
114
  exportValue?: any;
115
+ includeRawFields?: any;
116
+ defaultUnifiedValue?: any;
117
+ defaultValue?: any;
118
+ }, {
119
+ key?: string | undefined;
34
120
  default?: any;
121
+ input?: any;
122
+ appSchema?: DataSchema | undefined;
123
+ importValue?: any;
124
+ exportValue?: any;
125
+ includeRawFields?: any;
35
126
  defaultUnifiedValue?: any;
36
127
  defaultValue?: any;
37
- appSchema?: DataSchema;
38
- }
128
+ }>;
129
+ export type FieldMappingUnitConfig = z.infer<typeof FieldMappingUnitConfig>;
@@ -33,30 +33,30 @@ export declare const createFlowInstanceSchema: z.ZodObject<{
33
33
  concurrency?: number | undefined;
34
34
  type?: string | undefined;
35
35
  name?: string | undefined;
36
- userConfig?: any;
36
+ ui?: any;
37
+ isCustomized?: boolean | undefined;
37
38
  config?: any;
38
39
  onError?: "stop" | "continue" | undefined;
39
- ui?: any;
40
40
  links?: {
41
41
  key?: string | undefined;
42
42
  filter?: any;
43
43
  name?: string | undefined;
44
44
  }[] | undefined;
45
- isCustomized?: boolean | undefined;
45
+ userConfig?: any;
46
46
  }, {
47
47
  concurrency?: number | undefined;
48
48
  type?: string | undefined;
49
49
  name?: string | undefined;
50
- userConfig?: any;
50
+ ui?: any;
51
+ isCustomized?: boolean | undefined;
51
52
  config?: any;
52
53
  onError?: "stop" | "continue" | undefined;
53
- ui?: any;
54
54
  links?: {
55
55
  key?: string | undefined;
56
56
  filter?: any;
57
57
  name?: string | undefined;
58
58
  }[] | undefined;
59
- isCustomized?: boolean | undefined;
59
+ userConfig?: any;
60
60
  }>>>;
61
61
  enabled: z.ZodOptional<z.ZodBoolean>;
62
62
  customized: z.ZodOptional<z.ZodObject<{
@@ -71,60 +71,60 @@ export declare const createFlowInstanceSchema: z.ZodObject<{
71
71
  }>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
73
  name?: string | undefined;
74
- parameters?: any;
75
74
  userId?: string | undefined;
76
- flowId?: string | undefined;
75
+ instanceKey?: string | undefined;
77
76
  connectionId?: string | undefined;
78
77
  integrationId?: string | undefined;
79
- instanceKey?: string | undefined;
78
+ parameters?: any;
79
+ customized?: {
80
+ name?: boolean | undefined;
81
+ nodes?: boolean | undefined;
82
+ } | undefined;
80
83
  nodes?: Record<string, {
81
84
  concurrency?: number | undefined;
82
85
  type?: string | undefined;
83
86
  name?: string | undefined;
84
- userConfig?: any;
87
+ ui?: any;
88
+ isCustomized?: boolean | undefined;
85
89
  config?: any;
86
90
  onError?: "stop" | "continue" | undefined;
87
- ui?: any;
88
91
  links?: {
89
92
  key?: string | undefined;
90
93
  filter?: any;
91
94
  name?: string | undefined;
92
95
  }[] | undefined;
93
- isCustomized?: boolean | undefined;
96
+ userConfig?: any;
94
97
  }> | undefined;
98
+ flowId?: string | undefined;
95
99
  enabled?: boolean | undefined;
96
- customized?: {
97
- name?: boolean | undefined;
98
- nodes?: boolean | undefined;
99
- } | undefined;
100
100
  }, {
101
101
  name?: string | undefined;
102
- parameters?: any;
103
102
  userId?: string | undefined;
104
- flowId?: string | undefined;
103
+ instanceKey?: string | undefined;
105
104
  connectionId?: string | undefined;
106
105
  integrationId?: string | undefined;
107
- instanceKey?: string | undefined;
106
+ parameters?: any;
107
+ customized?: {
108
+ name?: boolean | undefined;
109
+ nodes?: boolean | undefined;
110
+ } | undefined;
108
111
  nodes?: Record<string, {
109
112
  concurrency?: number | undefined;
110
113
  type?: string | undefined;
111
114
  name?: string | undefined;
112
- userConfig?: any;
115
+ ui?: any;
116
+ isCustomized?: boolean | undefined;
113
117
  config?: any;
114
118
  onError?: "stop" | "continue" | undefined;
115
- ui?: any;
116
119
  links?: {
117
120
  key?: string | undefined;
118
121
  filter?: any;
119
122
  name?: string | undefined;
120
123
  }[] | undefined;
121
- isCustomized?: boolean | undefined;
124
+ userConfig?: any;
122
125
  }> | undefined;
126
+ flowId?: string | undefined;
123
127
  enabled?: boolean | undefined;
124
- customized?: {
125
- name?: boolean | undefined;
126
- nodes?: boolean | undefined;
127
- } | undefined;
128
128
  }>;
129
129
  export declare const updateFlowInstanceSchema: z.ZodObject<{
130
130
  name: z.ZodOptional<z.ZodString>;
@@ -155,7 +155,7 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
155
155
  concurrency?: number | undefined;
156
156
  type?: string | undefined;
157
157
  name?: string | undefined;
158
- userConfig?: any;
158
+ isCustomized?: boolean | undefined;
159
159
  config?: any;
160
160
  onError?: "stop" | "continue" | undefined;
161
161
  links?: {
@@ -163,12 +163,12 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
163
163
  filter?: any;
164
164
  name?: string | undefined;
165
165
  }[] | undefined;
166
- isCustomized?: boolean | undefined;
166
+ userConfig?: any;
167
167
  }, {
168
168
  concurrency?: number | undefined;
169
169
  type?: string | undefined;
170
170
  name?: string | undefined;
171
- userConfig?: any;
171
+ isCustomized?: boolean | undefined;
172
172
  config?: any;
173
173
  onError?: "stop" | "continue" | undefined;
174
174
  links?: {
@@ -176,7 +176,7 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
176
176
  filter?: any;
177
177
  name?: string | undefined;
178
178
  }[] | undefined;
179
- isCustomized?: boolean | undefined;
179
+ userConfig?: any;
180
180
  }>>>;
181
181
  archivedAt: z.ZodOptional<z.ZodString>;
182
182
  customized: z.ZodOptional<z.ZodObject<{
@@ -191,12 +191,17 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
191
191
  }>>;
192
192
  }, "strip", z.ZodTypeAny, {
193
193
  name?: string | undefined;
194
+ archivedAt?: string | undefined;
194
195
  parameters?: any;
196
+ customized?: {
197
+ name?: boolean | undefined;
198
+ nodes?: boolean | undefined;
199
+ } | undefined;
195
200
  nodes?: Record<string, {
196
201
  concurrency?: number | undefined;
197
202
  type?: string | undefined;
198
203
  name?: string | undefined;
199
- userConfig?: any;
204
+ isCustomized?: boolean | undefined;
200
205
  config?: any;
201
206
  onError?: "stop" | "continue" | undefined;
202
207
  links?: {
@@ -204,22 +209,22 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
204
209
  filter?: any;
205
210
  name?: string | undefined;
206
211
  }[] | undefined;
207
- isCustomized?: boolean | undefined;
212
+ userConfig?: any;
208
213
  }> | undefined;
209
214
  enabled?: boolean | undefined;
215
+ }, {
216
+ name?: string | undefined;
217
+ archivedAt?: string | undefined;
218
+ parameters?: any;
210
219
  customized?: {
211
220
  name?: boolean | undefined;
212
221
  nodes?: boolean | undefined;
213
222
  } | undefined;
214
- archivedAt?: string | undefined;
215
- }, {
216
- name?: string | undefined;
217
- parameters?: any;
218
223
  nodes?: Record<string, {
219
224
  concurrency?: number | undefined;
220
225
  type?: string | undefined;
221
226
  name?: string | undefined;
222
- userConfig?: any;
227
+ isCustomized?: boolean | undefined;
223
228
  config?: any;
224
229
  onError?: "stop" | "continue" | undefined;
225
230
  links?: {
@@ -227,14 +232,9 @@ export declare const updateFlowInstanceSchema: z.ZodObject<{
227
232
  filter?: any;
228
233
  name?: string | undefined;
229
234
  }[] | undefined;
230
- isCustomized?: boolean | undefined;
235
+ userConfig?: any;
231
236
  }> | undefined;
232
237
  enabled?: boolean | undefined;
233
- customized?: {
234
- name?: boolean | undefined;
235
- nodes?: boolean | undefined;
236
- } | undefined;
237
- archivedAt?: string | undefined;
238
238
  }>;
239
239
  export type CreateFlowInstanceRequest = z.infer<typeof createFlowInstanceSchema>;
240
240
  export type UpdateFlowInstanceRequest = z.infer<typeof updateFlowInstanceSchema>;
@@ -1,37 +1,183 @@
1
+ import { z } from 'zod';
1
2
  import { DataSchema } from '../../../data-schema';
2
- import { ErrorData } from '../../../errors';
3
- import { IntegrationElementInstance } from '../../../integration-elements';
4
- import { BaseMembraneInterface, WorkspaceElementState } from '../../types';
5
- import { FlowNode } from '../flows/types';
6
- export interface BaseFlowInstance extends BaseMembraneInterface {
3
+ import { WorkspaceElementState } from '../../types';
4
+ export declare const BaseFlowInstance: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ key: z.ZodOptional<z.ZodString>;
8
+ uuid: z.ZodOptional<z.ZodString>;
9
+ description: z.ZodOptional<z.ZodString>;
10
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
11
+ revision: z.ZodOptional<z.ZodString>;
12
+ isDeactivated: z.ZodOptional<z.ZodBoolean>;
13
+ archivedAt: z.ZodOptional<z.ZodString>;
14
+ } & {
15
+ userId: z.ZodString;
16
+ connectionId: z.ZodOptional<z.ZodString>;
17
+ flowId: z.ZodOptional<z.ZodString>;
18
+ universalFlowId: z.ZodOptional<z.ZodString>;
19
+ integrationId: z.ZodString;
20
+ instanceKey: z.ZodOptional<z.ZodString>;
21
+ parameters: z.ZodOptional<z.ZodAny>;
22
+ parametersSchema: z.ZodOptional<z.ZodType<DataSchema, z.ZodTypeDef, DataSchema>>;
23
+ nodes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
24
+ enabled: z.ZodBoolean;
25
+ createdAt: z.ZodString;
26
+ updatedAt: z.ZodString;
27
+ state: z.ZodOptional<z.ZodNativeEnum<typeof WorkspaceElementState>>;
28
+ outdated: z.ZodOptional<z.ZodBoolean>;
29
+ customized: z.ZodOptional<z.ZodObject<{
30
+ name: z.ZodOptional<z.ZodBoolean>;
31
+ nodes: z.ZodOptional<z.ZodBoolean>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ name?: boolean | undefined;
34
+ nodes?: boolean | undefined;
35
+ }, {
36
+ name?: boolean | undefined;
37
+ nodes?: boolean | undefined;
38
+ }>>;
39
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ id: string;
42
+ name: string;
43
+ createdAt: string;
44
+ updatedAt: string;
7
45
  userId: string;
8
- connectionId?: string;
9
- flowId?: string;
10
- universalFlowId?: string;
11
46
  integrationId: string;
12
- instanceKey?: string;
13
- parameters?: any;
14
- parametersSchema?: DataSchema;
15
- nodes?: Record<string, FlowInstanceNode>;
16
47
  enabled: boolean;
48
+ key?: string | undefined;
49
+ uuid?: string | undefined;
50
+ description?: string | undefined;
51
+ state?: WorkspaceElementState | undefined;
52
+ errors?: any[] | undefined;
53
+ revision?: string | undefined;
54
+ isDeactivated?: boolean | undefined;
55
+ archivedAt?: string | undefined;
56
+ instanceKey?: string | undefined;
57
+ connectionId?: string | undefined;
58
+ parameters?: any;
59
+ parametersSchema?: DataSchema | undefined;
60
+ customized?: {
61
+ name?: boolean | undefined;
62
+ nodes?: boolean | undefined;
63
+ } | undefined;
64
+ dependencies?: any[] | undefined;
65
+ universalFlowId?: string | undefined;
66
+ nodes?: Record<string, any> | undefined;
67
+ flowId?: string | undefined;
68
+ outdated?: boolean | undefined;
69
+ }, {
70
+ id: string;
71
+ name: string;
17
72
  createdAt: string;
18
73
  updatedAt: string;
19
- state?: WorkspaceElementState;
20
- outdated?: boolean;
74
+ userId: string;
75
+ integrationId: string;
76
+ enabled: boolean;
77
+ key?: string | undefined;
78
+ uuid?: string | undefined;
79
+ description?: string | undefined;
80
+ state?: WorkspaceElementState | undefined;
81
+ errors?: any[] | undefined;
82
+ revision?: string | undefined;
83
+ isDeactivated?: boolean | undefined;
84
+ archivedAt?: string | undefined;
85
+ instanceKey?: string | undefined;
86
+ connectionId?: string | undefined;
87
+ parameters?: any;
88
+ parametersSchema?: DataSchema | undefined;
21
89
  customized?: {
22
- name?: boolean;
23
- nodes?: boolean;
24
- };
25
- dependencies?: IntegrationElementInstance[];
26
- }
90
+ name?: boolean | undefined;
91
+ nodes?: boolean | undefined;
92
+ } | undefined;
93
+ dependencies?: any[] | undefined;
94
+ universalFlowId?: string | undefined;
95
+ nodes?: Record<string, any> | undefined;
96
+ flowId?: string | undefined;
97
+ outdated?: boolean | undefined;
98
+ }>;
99
+ export type BaseFlowInstance = z.infer<typeof BaseFlowInstance>;
27
100
  export declare enum FlowInstanceNodeState {
28
101
  SETUP_FAILED = "SETUP_FAILED",
29
102
  READY = "READY"
30
103
  }
31
- export interface FlowInstanceNode extends FlowNode {
32
- state?: FlowInstanceNodeState;
33
- errors?: ErrorData[];
104
+ export declare const FlowInstanceNode: z.ZodObject<{
105
+ type: z.ZodOptional<z.ZodString>;
106
+ version: z.ZodOptional<z.ZodNumber>;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ description: z.ZodOptional<z.ZodString>;
109
+ config: z.ZodOptional<z.ZodAny>;
110
+ concurrency: z.ZodOptional<z.ZodNumber>;
111
+ onError: z.ZodOptional<z.ZodEnum<["stop", "continue"]>>;
112
+ ui: z.ZodOptional<z.ZodAny>;
113
+ inputSchema: z.ZodOptional<z.ZodAny>;
114
+ outputSchema: z.ZodOptional<z.ZodAny>;
115
+ outputExample: z.ZodOptional<z.ZodAny>;
116
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ key: z.ZodOptional<z.ZodString>;
118
+ filter: z.ZodOptional<z.ZodAny>;
119
+ name: z.ZodOptional<z.ZodString>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ key?: string | undefined;
122
+ filter?: any;
123
+ name?: string | undefined;
124
+ }, {
125
+ key?: string | undefined;
126
+ filter?: any;
127
+ name?: string | undefined;
128
+ }>, "many">>;
129
+ isCustomized: z.ZodOptional<z.ZodBoolean>;
130
+ } & {
131
+ state: z.ZodOptional<z.ZodNativeEnum<typeof FlowInstanceNodeState>>;
132
+ errors: z.ZodOptional<z.ZodArray<any, "many">>;
133
+ userConfig: z.ZodOptional<z.ZodAny>;
134
+ testInput: z.ZodOptional<z.ZodAny>;
135
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ concurrency?: number | undefined;
138
+ type?: string | undefined;
139
+ name?: string | undefined;
140
+ description?: string | undefined;
141
+ state?: FlowInstanceNodeState | undefined;
142
+ errors?: any[] | undefined;
143
+ ui?: any;
144
+ isCustomized?: boolean | undefined;
145
+ inputSchema?: any;
146
+ config?: any;
147
+ outputSchema?: any;
148
+ dependencies?: any[] | undefined;
149
+ version?: number | undefined;
150
+ onError?: "stop" | "continue" | undefined;
151
+ outputExample?: any;
152
+ links?: {
153
+ key?: string | undefined;
154
+ filter?: any;
155
+ name?: string | undefined;
156
+ }[] | undefined;
34
157
  userConfig?: any;
35
158
  testInput?: any;
36
- dependencies?: IntegrationElementInstance[];
37
- }
159
+ }, {
160
+ concurrency?: number | undefined;
161
+ type?: string | undefined;
162
+ name?: string | undefined;
163
+ description?: string | undefined;
164
+ state?: FlowInstanceNodeState | undefined;
165
+ errors?: any[] | undefined;
166
+ ui?: any;
167
+ isCustomized?: boolean | undefined;
168
+ inputSchema?: any;
169
+ config?: any;
170
+ outputSchema?: any;
171
+ dependencies?: any[] | undefined;
172
+ version?: number | undefined;
173
+ onError?: "stop" | "continue" | undefined;
174
+ outputExample?: any;
175
+ links?: {
176
+ key?: string | undefined;
177
+ filter?: any;
178
+ name?: string | undefined;
179
+ }[] | undefined;
180
+ userConfig?: any;
181
+ testInput?: any;
182
+ }>;
183
+ export type FlowInstanceNode = z.infer<typeof FlowInstanceNode>;