@adminide-stack/form-builder-core 5.1.4-alpha.165 → 5.1.4-alpha.227

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.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Unified connector/provider configuration.
3
+ *
4
+ * Shared by:
5
+ * - credentials-browser (connector cards, credentials table)
6
+ * - form-builder-browser (OAuthConnectorConfigPanel – known-provider dropdown)
7
+ *
8
+ * Keep this as the single source of truth so ids, authUrls, scopes, etc.
9
+ * never drift between packages.
10
+ */
11
+ export interface ConnectorConfig {
12
+ id: string;
13
+ title: string;
14
+ description: string;
15
+ /** OAuth 2.0 authorization endpoint URL */
16
+ authUrl: string;
17
+ icon: {
18
+ name: string;
19
+ style?: {
20
+ fontSize?: string;
21
+ };
22
+ };
23
+ color?: string;
24
+ enabled: boolean;
25
+ /** Default OAuth scopes for this provider */
26
+ scopes?: string[];
27
+ /** MCP endpoint (if the provider supports MCP auth) */
28
+ mcpUrl?: string;
29
+ }
30
+ export declare const connectorsConfig: ConnectorConfig[];
31
+ //# sourceMappingURL=connectorsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorsConfig.d.ts","sourceRoot":"","sources":["../../src/config/connectorsConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACjC,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAmJ7C,CAAC"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Unified connector/provider configuration.
3
+ *
4
+ * Shared by:
5
+ * - credentials-browser (connector cards, credentials table)
6
+ * - form-builder-browser (OAuthConnectorConfigPanel – known-provider dropdown)
7
+ *
8
+ * Keep this as the single source of truth so ids, authUrls, scopes, etc.
9
+ * never drift between packages.
10
+ */
11
+ const connectorsConfig = [{
12
+ id: 'gmail',
13
+ title: 'Gmail',
14
+ description: 'Draft replies, search your inbox, and summarize email threads instantly',
15
+ authUrl: 'https://accounts.google.com',
16
+ icon: {
17
+ name: 'AiOutlineMail',
18
+ style: {
19
+ fontSize: 'large'
20
+ }
21
+ },
22
+ color: '#EA4335',
23
+ enabled: true,
24
+ scopes: ['https://mail.google.com/', 'openid', 'email', 'profile']
25
+ }, {
26
+ id: 'google-calendar',
27
+ title: 'Google Calendar',
28
+ description: 'View and manage your calendar events, schedule meetings, and set reminders',
29
+ authUrl: 'https://accounts.google.com',
30
+ icon: {
31
+ name: 'AiOutlineCalendar',
32
+ style: {
33
+ fontSize: 'large'
34
+ }
35
+ },
36
+ color: '#4285F4',
37
+ enabled: true,
38
+ scopes: ['https://www.googleapis.com/auth/calendar', 'openid', 'email']
39
+ }, {
40
+ id: 'notion',
41
+ title: 'Notion',
42
+ description: 'Access your Notion pages, databases, and create new content seamlessly',
43
+ authUrl: 'https://api.notion.com/v1',
44
+ icon: {
45
+ name: 'AiOutlineFileText',
46
+ style: {
47
+ fontSize: 'large'
48
+ }
49
+ },
50
+ color: '#000000',
51
+ enabled: true,
52
+ scopes: ['read:consent'],
53
+ mcpUrl: 'https://mcp.notion.com'
54
+ }, {
55
+ id: 'google-drive',
56
+ title: 'Google Drive',
57
+ description: 'Access and manage your files, folders, and documents from Google Drive',
58
+ authUrl: 'https://accounts.google.com',
59
+ icon: {
60
+ name: 'AiOutlineFolder',
61
+ style: {
62
+ fontSize: 'large'
63
+ }
64
+ },
65
+ color: '#4285F4',
66
+ enabled: true,
67
+ scopes: ['https://www.googleapis.com/auth/drive', 'openid', 'email']
68
+ }, {
69
+ id: 'outlook-mail',
70
+ title: 'Outlook Mail',
71
+ description: 'Send and receive emails, manage your inbox, and organize messages',
72
+ authUrl: 'https://login.microsoftonline.com/common',
73
+ icon: {
74
+ name: 'AiOutlineMail',
75
+ style: {
76
+ fontSize: 'large'
77
+ }
78
+ },
79
+ color: '#0078D4',
80
+ enabled: true,
81
+ scopes: ['Mail.Read', 'Mail.Send', 'User.Read']
82
+ }, {
83
+ id: 'slack',
84
+ title: 'Slack',
85
+ description: 'Send messages, create channels, and collaborate with your team',
86
+ authUrl: 'https://slack.com',
87
+ icon: {
88
+ name: 'AiOutlineMessage',
89
+ style: {
90
+ fontSize: 'large'
91
+ }
92
+ },
93
+ color: '#4A154B',
94
+ enabled: true,
95
+ scopes: ['channels:read', 'chat:write', 'users:read']
96
+ }, {
97
+ id: 'github',
98
+ title: 'GitHub',
99
+ description: 'Access repositories, manage issues, and review pull requests',
100
+ authUrl: 'https://github.com',
101
+ icon: {
102
+ name: 'AiOutlineGithub',
103
+ style: {
104
+ fontSize: 'large'
105
+ }
106
+ },
107
+ color: '#181717',
108
+ enabled: true,
109
+ scopes: ['repo', 'read:org', 'read:user']
110
+ }, {
111
+ id: 'outlook-calendar',
112
+ title: 'Outlook Calendar',
113
+ description: 'Manage your calendar, schedule meetings, and view availability',
114
+ authUrl: 'https://login.microsoftonline.com',
115
+ icon: {
116
+ name: 'AiOutlineCalendar',
117
+ style: {
118
+ fontSize: 'large'
119
+ }
120
+ },
121
+ color: '#0078D4',
122
+ enabled: true,
123
+ scopes: ['Calendars.ReadWrite', 'User.Read']
124
+ }, {
125
+ id: 'linear',
126
+ title: 'Linear',
127
+ description: 'Track issues, manage projects, and collaborate on your work',
128
+ authUrl: 'https://linear.app',
129
+ icon: {
130
+ name: 'AiOutlineCheckSquare',
131
+ style: {
132
+ fontSize: 'large'
133
+ }
134
+ },
135
+ color: '#5E6AD2',
136
+ enabled: true,
137
+ scopes: ['read', 'write'],
138
+ mcpUrl: 'https://mcp.linear.app'
139
+ }, {
140
+ id: 'asana',
141
+ title: 'Asana',
142
+ description: 'Organize tasks, track projects, and collaborate with your team',
143
+ authUrl: 'https://app.asana.com',
144
+ icon: {
145
+ name: 'AiOutlineProject',
146
+ style: {
147
+ fontSize: 'large'
148
+ }
149
+ },
150
+ color: '#F06A6A',
151
+ enabled: true,
152
+ scopes: ['default']
153
+ }, {
154
+ id: 'jira',
155
+ title: 'Jira',
156
+ description: 'Issue and project tracking',
157
+ authUrl: 'https://auth.atlassian.com',
158
+ icon: {
159
+ name: 'AiOutlineCheckSquare',
160
+ style: {
161
+ fontSize: 'large'
162
+ }
163
+ },
164
+ color: '#0052CC',
165
+ enabled: true,
166
+ scopes: ['read:jira-work', 'write:jira-work'],
167
+ mcpUrl: 'https://mcp.atlassian.com/v1'
168
+ }];export{connectorsConfig};//# sourceMappingURL=connectorsConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorsConfig.js","sources":["../../src/config/connectorsConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;AASG;sBAEc,GAAe,CAAA;IAC5B,EAAE;OACF,EAAK;aACL,EAAW,yEAAS;SACpB,EAAA,6BAAA;MACA,EAAA;AACA,IAAA,IAAI,EAAE,eAAA;SACF,EAAA;AACA,MAAA,QAAM,EAAE;;;OACV,EAAA,SAAA;SACG,EAAC,IAAE;QACR,EAAA,CAAO,0BAAU,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA;;AAEjB,EAAA,EAAA,EAAA,iBAAkB;OAClB,EAAA,iBAAA;aACS,EAAA,4EAAO;AACnB,EAAA,OAAA,EAAA,6BAAA;AAED,EAAA,IAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ export * from './config/connectorsConfig';
1
2
  export * from './inngest/interfaces/types';
2
3
  export * from './inngest/generateFunctionCode';
3
4
  export { generateFromExtractedFunctions, extractFunctionBody } from './inngest/stepGenerator';
4
5
  export * from './inngest/monacoAutocompleteIntegration';
5
6
  export * from './utils/json';
7
+ export * from './utils/deepMergeFormSteps';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,cAAc,yCAAyC,CAAC;AACxD,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,cAAc,yCAAyC,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{generateFunctionCode,generateHandlerBody,generateHandlerBodyWithReturn,generateStepFromFunction,generateStepFunctionsFromDB,wrapStepsInInngestFunction}from'./inngest/generateFunctionCode.js';export{cleanStepCode,extractFunctionBody,extractStepVarName,generateFromExtractedFunctions}from'./inngest/stepGenerator.js';export{getAvailableDefinitions,installLibraryForAutocomplete,setupMonacoAutocomplete,setupStepAutocomplete,updateAutocompleteConfig}from'./inngest/monacoAutocompleteIntegration.js';export{flatten,unflatten}from'./utils/json.js';//# sourceMappingURL=index.js.map
1
+ export{connectorsConfig}from'./config/connectorsConfig.js';export{generateFunctionCode,generateHandlerBody,generateHandlerBodyWithReturn,generateStepFromFunction,generateStepFunctionsFromDB,wrapStepsInInngestFunction}from'./inngest/generateFunctionCode.js';export{cleanStepCode,extractFunctionBody,extractStepVarName,generateFromExtractedFunctions}from'./inngest/stepGenerator.js';export{getAvailableDefinitions,installLibraryForAutocomplete,setupMonacoAutocomplete,setupStepAutocomplete,updateAutocompleteConfig}from'./inngest/monacoAutocompleteIntegration.js';export{flatten,unflatten}from'./utils/json.js';export{deepMergeElements,deepMergeFormSteps}from'./utils/deepMergeFormSteps.js';//# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import {generateFromExtractedFunctions,extractStepVarName,extractFunctionBody,cleanStepCode}from'./stepGenerator.js';// Check if code contains direct step operations (sleep, sendEvent, etc)
1
+ import {extractStepVarName,extractFunctionBody,generateFromExtractedFunctions,cleanStepCode}from'./stepGenerator.js';// Check if code contains direct step operations (sleep, sendEvent, etc)
2
2
  function hasDirectStepOperations(code) {
3
3
  return /step\.(sleep|sendEvent|waitForEvent|run)\s*\(/.test(code);
4
4
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deepMergeFormSteps.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMergeFormSteps.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/deepMergeFormSteps.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Deep merge preGeneratedFormSteps arrays by matching step/element ids recursively.
3
+ * When two steps share the same id (e.g. "credential"), their elements/children are
4
+ * recursively merged so that all unique template namespaces appear as siblings in the tree.
5
+ *
6
+ * This utility lives in core so it can be reused by both browser and server code.
7
+ */
8
+ export declare function deepMergeFormSteps(existingSteps: any[], newSteps: any[]): any[];
9
+ /**
10
+ * Recursively merge element/children arrays by matching on element id.
11
+ * Groups with matching ids have their children merged recursively;
12
+ * elements with unique ids are appended.
13
+ */
14
+ export declare function deepMergeElements(existingElements: any[], newElements: any[]): any[];
15
+ //# sourceMappingURL=deepMergeFormSteps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMergeFormSteps.d.ts","sourceRoot":"","sources":["../../src/utils/deepMergeFormSteps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAmB/E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAyBpF"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Deep merge preGeneratedFormSteps arrays by matching step/element ids recursively.
3
+ * When two steps share the same id (e.g. "credential"), their elements/children are
4
+ * recursively merged so that all unique template namespaces appear as siblings in the tree.
5
+ *
6
+ * This utility lives in core so it can be reused by both browser and server code.
7
+ */
8
+ function deepMergeFormSteps(existingSteps, newSteps) {
9
+ const result = existingSteps.map(step => ({
10
+ ...step
11
+ }));
12
+ for (const newStep of newSteps) {
13
+ const existingIndex = result.findIndex(s => s.id === newStep.id);
14
+ if (existingIndex >= 0) {
15
+ // Same step id — deep merge elements
16
+ const existing = result[existingIndex];
17
+ result[existingIndex] = {
18
+ ...existing,
19
+ ...newStep,
20
+ elements: deepMergeElements(existing.elements || [], newStep.elements || [])
21
+ };
22
+ } else {
23
+ result.push({
24
+ ...newStep
25
+ });
26
+ }
27
+ }
28
+ return result;
29
+ }
30
+ /**
31
+ * Recursively merge element/children arrays by matching on element id.
32
+ * Groups with matching ids have their children merged recursively;
33
+ * elements with unique ids are appended.
34
+ */
35
+ function deepMergeElements(existingElements, newElements) {
36
+ const result = existingElements.map(el => ({
37
+ ...el
38
+ }));
39
+ for (const newEl of newElements) {
40
+ const existingIndex = result.findIndex(e => e.id === newEl.id);
41
+ if (existingIndex >= 0) {
42
+ const existing = result[existingIndex];
43
+ if (existing.children && newEl.children) {
44
+ // Both have children — recursively merge
45
+ result[existingIndex] = {
46
+ ...existing,
47
+ ...newEl,
48
+ children: deepMergeElements(existing.children, newEl.children)
49
+ };
50
+ } else if (newEl.children) {
51
+ // Only new has children — use new
52
+ result[existingIndex] = {
53
+ ...newEl
54
+ };
55
+ }
56
+ // If only existing has children or neither has, keep existing
57
+ } else {
58
+ result.push({
59
+ ...newEl
60
+ });
61
+ }
62
+ }
63
+ return result;
64
+ }export{deepMergeElements,deepMergeFormSteps};//# sourceMappingURL=deepMergeFormSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMergeFormSteps.js","sources":["../../src/utils/deepMergeFormSteps.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;AAMG;AACH,SAAA,kBAAgB,CAAA,aAAmB,EAAA,QAAe;AAqBlD,EAAA,MAAA,MAAA,GAAA,aAAA,CAAA,GAAA,CAAA,IAAA,KAAA;;;;AAIG,IAAA,MAAA,aAAA,GAAA,MAAA,CAAA,SAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,KAAA,OAAA,CAAA,EAAA,CAAA;AACH,IAAA,IAAA,aAAA,IAAgB,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminide-stack/form-builder-core",
3
- "version": "5.1.4-alpha.165",
3
+ "version": "5.1.4-alpha.227",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -24,5 +24,5 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "510d8c71063863bcf0edb864f66a7555c017476d"
27
+ "gitHead": "4df72abce6ecdcce0c442abf4d4df7753ac2ec98"
28
28
  }