@adminide-stack/form-builder-core 5.1.4-alpha.82 → 5.1.6-alpha.0

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 (60) hide show
  1. package/LICENSE +30 -21
  2. package/lib/config/__tests__/connectorFieldTokenResolver.test.d.ts +2 -0
  3. package/lib/config/__tests__/connectorFieldTokenResolver.test.d.ts.map +1 -0
  4. package/lib/config/cdnConfig.d.ts +17 -0
  5. package/lib/config/cdnConfig.d.ts.map +1 -0
  6. package/lib/config/cdnConfig.js +29 -0
  7. package/lib/config/cdnConfig.js.map +1 -0
  8. package/lib/config/configTypes.d.ts +220 -0
  9. package/lib/config/configTypes.d.ts.map +1 -0
  10. package/lib/config/configTypes.js +6 -0
  11. package/lib/config/configTypes.js.map +1 -0
  12. package/lib/config/connectorFieldTokenResolver.d.ts +11 -0
  13. package/lib/config/connectorFieldTokenResolver.d.ts.map +1 -0
  14. package/lib/config/connectorFieldTokenResolver.js +95 -0
  15. package/lib/config/connectorFieldTokenResolver.js.map +1 -0
  16. package/lib/config/connectorsConfig.d.ts +3 -0
  17. package/lib/config/connectorsConfig.d.ts.map +1 -0
  18. package/lib/config/connectorsConfig.js +44533 -0
  19. package/lib/config/connectorsConfig.js.map +1 -0
  20. package/lib/config/connectorsConfig2.d.ts +11 -0
  21. package/lib/config/connectorsConfig2.d.ts.map +1 -0
  22. package/lib/config/llmProviderConfig.d.ts +3 -0
  23. package/lib/config/llmProviderConfig.d.ts.map +1 -0
  24. package/lib/config/llmProviderConfig.js +457 -0
  25. package/lib/config/llmProviderConfig.js.map +1 -0
  26. package/lib/config/mcpConnectorConfig.d.ts +3 -0
  27. package/lib/config/mcpConnectorConfig.d.ts.map +1 -0
  28. package/lib/config/mcpConnectorConfig.js +961 -0
  29. package/lib/config/mcpConnectorConfig.js.map +1 -0
  30. package/lib/index.d.ts +11 -2
  31. package/lib/index.d.ts.map +1 -1
  32. package/lib/index.js +1 -1
  33. package/lib/inngest/generateFunctionCode.js +1 -1
  34. package/lib/utils/__tests__/deepMergeFormSteps.test.d.ts +2 -0
  35. package/lib/utils/__tests__/deepMergeFormSteps.test.d.ts.map +1 -0
  36. package/lib/utils/authMetaDataSchema.d.ts +199 -0
  37. package/lib/utils/authMetaDataSchema.d.ts.map +1 -0
  38. package/lib/utils/authMetaDataSchema.js +1601 -0
  39. package/lib/utils/authMetaDataSchema.js.map +1 -0
  40. package/lib/utils/deepMergeFormSteps.d.ts +15 -0
  41. package/lib/utils/deepMergeFormSteps.d.ts.map +1 -0
  42. package/lib/utils/deepMergeFormSteps.js +64 -0
  43. package/lib/utils/deepMergeFormSteps.js.map +1 -0
  44. package/lib/utils/schemaHelpers.d.ts +85 -0
  45. package/lib/utils/schemaHelpers.d.ts.map +1 -0
  46. package/lib/utils/schemaHelpers.js +473 -0
  47. package/lib/utils/schemaHelpers.js.map +1 -0
  48. package/package.json +3 -2
  49. package/CHANGELOG.md +0 -60
  50. package/rollup.config.mjs +0 -33
  51. package/src/index.ts +0 -5
  52. package/src/inngest/MONACO_INTEGRATION_EXAMPLE.md +0 -406
  53. package/src/inngest/README_AUTOCOMPLETE.md +0 -380
  54. package/src/inngest/generateFunctionCode.ts +0 -248
  55. package/src/inngest/interfaces/index.ts +0 -1
  56. package/src/inngest/interfaces/types.ts +0 -63
  57. package/src/inngest/monacoAutocompleteIntegration.ts +0 -432
  58. package/src/inngest/stepGenerator.ts +0 -538
  59. package/src/utils/json.ts +0 -50
  60. package/tsconfig.json +0 -14
package/LICENSE CHANGED
@@ -1,21 +1,30 @@
1
- The MIT License
2
-
3
- Copyright (c) 2017 CDMBase LLC.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ PROPRIETARY SOFTWARE LICENSE
2
+
3
+ Copyright (c) 2025 CDMBase. All Rights Reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary and confidential property of CDMBase.
7
+
8
+ ALL RIGHTS RESERVED.
9
+
10
+ No part of this Software may be reproduced, distributed, transmitted,
11
+ displayed, published, or broadcast in any form or by any means, electronic,
12
+ mechanical, photocopying, recording, or otherwise, without the prior written
13
+ permission of CDMBase.
14
+
15
+ The Software is provided to authorized users only under separate written
16
+ agreement and may not be used, copied, modified, merged, published, distributed,
17
+ sublicensed, and/or sold without express written permission from CDMBase.
18
+
19
+ UNAUTHORIZED USE, REPRODUCTION, OR DISTRIBUTION OF THIS SOFTWARE, OR ANY
20
+ PORTION OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL
21
+ BE PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER LAW.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
+ CDMBase BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
+
30
+ For licensing inquiries, please contact: legal@cdmbase.com
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=connectorFieldTokenResolver.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorFieldTokenResolver.test.d.ts","sourceRoot":"","sources":["../../../src/config/__tests__/connectorFieldTokenResolver.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * CDN / asset-URL configuration.
3
+ *
4
+ * Connector configs store only the *path* portion
5
+ * (e.g. `_side/thirdparty/logos/gmail.svg`); call `iurl(path)` to get the
6
+ * full URL at runtime.
7
+ *
8
+ * The CDN base is read from `AWS_CDN_URL` env var via `setCdnBase()`.
9
+ * Browser packages call `setCdnBase(config.AWS_CDN_URL)` at init time.
10
+ */
11
+ /** Set the CDN base URL (typically called once from env-config). */
12
+ export declare function setCdnBase(base: string): void;
13
+ /** Get the current CDN base URL. */
14
+ export declare function getCdnBase(): string;
15
+ /** Resolve a relative asset path against the CDN base. */
16
+ export declare function iurl(path: string): string;
17
+ //# sourceMappingURL=cdnConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdnConfig.d.ts","sourceRoot":"","sources":["../../src/config/cdnConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAG7C;AAED,oCAAoC;AACpC,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,0DAA0D;AAC1D,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOzC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * CDN / asset-URL configuration.
3
+ *
4
+ * Connector configs store only the *path* portion
5
+ * (e.g. `_side/thirdparty/logos/gmail.svg`); call `iurl(path)` to get the
6
+ * full URL at runtime.
7
+ *
8
+ * The CDN base is read from `AWS_CDN_URL` env var via `setCdnBase()`.
9
+ * Browser packages call `setCdnBase(config.AWS_CDN_URL)` at init time.
10
+ */
11
+ let _cdnBase = '';
12
+ /** Set the CDN base URL (typically called once from env-config). */
13
+ function setCdnBase(base) {
14
+ // Strip trailing slash for consistency.
15
+ _cdnBase = base.endsWith('/') ? base.slice(0, -1) : base;
16
+ }
17
+ /** Get the current CDN base URL. */
18
+ function getCdnBase() {
19
+ return _cdnBase;
20
+ }
21
+ /** Resolve a relative asset path against the CDN base. */
22
+ function iurl(path) {
23
+ if (!path) return '';
24
+ // Already an absolute URL or data URI — pass through unchanged.
25
+ if (path.startsWith('http://') || path.startsWith('https://') || path.startsWith('data:')) return path;
26
+ // Strip leading slash so we don't end up with a double-slash.
27
+ const clean = path.startsWith('/') ? path.slice(1) : path;
28
+ return _cdnBase ? `${_cdnBase}/${clean}` : clean;
29
+ }export{getCdnBase,iurl,setCdnBase};//# sourceMappingURL=cdnConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdnConfig.js","sources":["../../src/config/cdnConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;AASG;AAIH,IAAA,QAAA,GAAA,EAAA;AACA;AAKA,SAAA,UAAA,CAAA,IAAA,EAAA;AACA;AAIA,EAAA,QAAA,GAAA,IAAA,CAAA,QAAA,CAAA,GAAA,CAAA,GAAA,IAAA,CAAA,KAAA,CAAA,CAAA,EAAA,EAAA,CAAA,GAAA,IAA0D;AAC1D;;;;;;;;;;;;;"}
@@ -0,0 +1,220 @@
1
+ import { ConfigurationScope, ContributeDefaultValueSourceType, KeyMgmtSecretType } from 'common';
2
+ /**
3
+ * Shared API configuration types.
4
+ *
5
+ * These types define the structure for API-key form fields, resources (REST API
6
+ * test endpoints), and custom buttons (e.g. "Test token"). They are used by
7
+ * ConnectorConfig when a connector supports API-key authentication.
8
+ *
9
+ * Originally defined in form-builder-browser; moved here so core can reference
10
+ * them without depending on the browser package.
11
+ */
12
+ export interface FieldSecretSource {
13
+ type: ContributeDefaultValueSourceType;
14
+ secretType: KeyMgmtSecretType;
15
+ secretKey: string;
16
+ }
17
+ export type FieldType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
18
+ /**
19
+ * Standardized generic field type taxonomy.
20
+ *
21
+ * Standardized third-party field naming convention so every connector
22
+ * field has a canonical semantic type regardless of the connector-specific name.
23
+ *
24
+ * Categories:
25
+ * - Keys & tokens: api_key, api_secret, api_token, access_token, bearer_token, personal_access_token, bot_token, private_key, secret_key
26
+ * - Identifiers: app_id, app_key, workspace_id, project_id, organization_id, account_id, space_id, site_id, dataset_id, client_id, tenant_id, campaign_id
27
+ * - Connection: base_url, instance_url, subdomain, domain, region, connection_string, endpoint
28
+ * - Credentials: username, password, email
29
+ * - Display-only: info, label_info
30
+ */
31
+ export type GenericFieldType = 'api_key' | 'api_secret' | 'api_token' | 'access_token' | 'access_key' | 'bearer_token' | 'personal_access_token' | 'bot_token' | 'private_key' | 'secret_key' | 'jwt_token' | 'auth_token' | 'data_api_key' | 'public_api_key' | 'secret_access_key' | 'app_id' | 'app_key' | 'workspace_id' | 'project_id' | 'organization_id' | 'account_id' | 'space_id' | 'site_id' | 'dataset_id' | 'client_id' | 'tenant_id' | 'campaign_id' | 'public_id' | 'public_key' | 'user_id' | 'cloud_name' | 'business_id' | 'event_id' | 'store_id' | 'bucket_name' | 'index_name' | 'database_name' | 'collection_name' | 'table_name' | 'deployment_name' | 'base_url' | 'instance_url' | 'subdomain' | 'domain' | 'region' | 'connection_string' | 'endpoint' | 'environment' | 'username' | 'password' | 'email' | 'info' | 'label_info';
32
+ /**
33
+ * Where the field value should be placed in the HTTP request at runtime.
34
+ * Standard third-party placement model for HTTP request field mapping.
35
+ */
36
+ export type FieldPlacement = 'header' | 'query' | 'body' | 'path' | 'none';
37
+ /**
38
+ * Connector-level metadata: app URL, auth guides, base URL, test endpoint,
39
+ * and categories.
40
+ *
41
+ * Two guide-URL concepts:
42
+ * - `connectionGuideUrl` — general documentation for how end users
43
+ * obtain their credentials (API key, workspace ID, etc.).
44
+ * - `authHintUrl` — a quick-reference URL shown alongside a
45
+ * specific auth scheme to help the user find the right value.
46
+ */
47
+ export interface ConnectorMetaConfig {
48
+ /** The API base URL template (may include {{subdomain}} placeholders). */
49
+ baseUrl?: string;
50
+ /** The app/product homepage URL. */
51
+ appUrl?: string;
52
+ /** URL to end-user guide for obtaining credentials. */
53
+ connectionGuideUrl?: string;
54
+ /** Quick-reference URL shown alongside a specific auth scheme. */
55
+ authHintUrl?: string;
56
+ /** Endpoint to validate credentials (GET). May include {{field}} placeholders. */
57
+ testEndpoint?: string;
58
+ /** HTTP method for testEndpoint (defaults to GET). */
59
+ testEndpointMethod?: 'GET' | 'POST';
60
+ /** Connector categories (propagated from ConnectorConfig.categories for JSON output). */
61
+ categories?: string[];
62
+ }
63
+ export type UiWidget = 'text' | 'password' | 'hidden' | 'textarea' | 'select' | 'switch' | 'resourceSelect' | 'chips' | 'LabelWidget';
64
+ export declare const CONNECTOR_CATEGORIES: readonly ["advertising & marketing", "ai & machine learning", "analytics & data", "cloud & infrastructure", "collaboration & communication", "crm", "cybersecurity", "data & analytics", "design & creative tools", "developer tools & devops", "direct mail automation", "document & file management", "e-commerce", "education & lms", "entertainment & media", "finance & accounting", "fundraising", "hr & recruiting", "marketing & social media", "productivity & project management", "sales & customer support", "scheduling & booking", "security & compliance", "security & identity tools", "social media", "wi-fi management", "workflow automation", "api", "database", "storage", "llm", "mcp", "cache", "embeddings", "agents", "memory", "tools", "other"];
65
+ export type ConnectorCategory = (typeof CONNECTOR_CATEGORIES)[number];
66
+ export type ConnectorCategoryTuple = [ConnectorCategory];
67
+ export interface FormFieldConfig {
68
+ name: string;
69
+ label: string;
70
+ type: FieldType;
71
+ placeholder: string;
72
+ description: string;
73
+ required: boolean;
74
+ defaultValue: string | number | boolean | null;
75
+ isConfigField: boolean;
76
+ isSecret: boolean;
77
+ secretSource: FieldSecretSource | null;
78
+ uiWidget: UiWidget;
79
+ enumValues: Array<{
80
+ value: string;
81
+ label: string;
82
+ }>;
83
+ readOnly: boolean;
84
+ iconType: string;
85
+ /** Standardized semantic type for this field (e.g. 'api_key', 'subdomain', 'workspace_id'). */
86
+ genericType: GenericFieldType;
87
+ /** Where this field should be placed in the HTTP request (header, query, body, path). */
88
+ placement?: FieldPlacement;
89
+ /** Custom header/query-param name when placement is 'header' or 'query'. */
90
+ placementKey?: string;
91
+ scope?: ConfigurationScope;
92
+ }
93
+ export type ResourceSourceType = 'jsCode' | 'graphql' | 'rest-api';
94
+ export interface GraphQLResourceConfig {
95
+ query: string;
96
+ useInternalLink: boolean;
97
+ transformResults: string;
98
+ variables: Record<string, any>;
99
+ }
100
+ export interface JsCodeResourceConfig {
101
+ query: string;
102
+ transformResults: string;
103
+ }
104
+ export interface RestApiHeader {
105
+ key: string;
106
+ value: string;
107
+ }
108
+ export interface RestApiBodyData {
109
+ key: string;
110
+ value: string;
111
+ }
112
+ export interface RestApiResourceConfig {
113
+ httpMethod: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
114
+ url: string;
115
+ urlParams: Array<{
116
+ key: string;
117
+ value: string;
118
+ }>;
119
+ headers: RestApiHeader[];
120
+ body: {
121
+ format: 'JSON' | 'form-data' | 'Raw';
122
+ data: RestApiBodyData[];
123
+ rawData: string;
124
+ };
125
+ cookies: Array<{
126
+ key: string;
127
+ value: string;
128
+ }>;
129
+ runBehavior: 'automatic' | 'manual';
130
+ transformResults: string;
131
+ }
132
+ export interface FormResourceConfig {
133
+ name: string;
134
+ label: string;
135
+ type: ResourceSourceType;
136
+ config: {
137
+ graphql?: GraphQLResourceConfig;
138
+ jsCode?: JsCodeResourceConfig;
139
+ restApi?: RestApiResourceConfig;
140
+ };
141
+ }
142
+ export type ButtonAction = 'trigger-resource' | 'trigger-inngest' | 'submit';
143
+ export interface CustomButtonConfig {
144
+ id: string;
145
+ title: string;
146
+ action: ButtonAction;
147
+ resourceId: string;
148
+ inngestId: string;
149
+ }
150
+ export type MCPAuthMethod = 'oauth2' | 'api_key';
151
+ export interface MCPProviderConfig {
152
+ id: string;
153
+ title: string;
154
+ description: string;
155
+ providerUrl?: string;
156
+ scopes: string[];
157
+ mcpUrl: string;
158
+ icon: {
159
+ name: string;
160
+ style?: {
161
+ fontSize?: string;
162
+ };
163
+ };
164
+ /** Logo URL from Composio */
165
+ logo?: string;
166
+ color?: string;
167
+ enabled?: boolean;
168
+ /** Authentication methods supported */
169
+ authMethods: [MCPAuthMethod];
170
+ categories: ConnectorCategoryTuple;
171
+ fields?: FormFieldConfig[];
172
+ }
173
+ export interface ConnectorConfig {
174
+ id: string;
175
+ title: string;
176
+ description: string;
177
+ /** OAuth/OIDC provider base URL */
178
+ providerUrl: string;
179
+ icon: {
180
+ name: string;
181
+ style?: {
182
+ fontSize?: string;
183
+ };
184
+ };
185
+ /** Logo URL from CDM S3 */
186
+ logo?: string;
187
+ color?: string;
188
+ enabled: boolean;
189
+ /** Default OAuth scopes for this provider */
190
+ scopes?: string[];
191
+ /** When true, use explicit OAuth endpoints instead of OIDC discovery */
192
+ useCustomOAuthEndpoints?: boolean;
193
+ /** When false, disables PKCE for this OAuth provider. Defaults to true when omitted. */
194
+ usePKCE?: boolean;
195
+ /** OAuth client authentication method */
196
+ clientAuthMethod?: 'client_secret_basic' | 'client_secret_post';
197
+ /** Explicit OAuth Authorization URL (if useCustomOAuthEndpoints is true) */
198
+ authorizationUrl?: string;
199
+ /** Explicit OAuth Token URL (if useCustomOAuthEndpoints is true) */
200
+ tokenUrl?: string;
201
+ /** Explicit OAuth Revocation URL (if supported) */
202
+ revocationUrl?: string;
203
+ /** Use HTTP Basic auth for token exchange (client_secret_basic). */
204
+ useBasicAuth?: boolean;
205
+ /** MCP endpoint (if the provider supports MCP auth) */
206
+ mcpUrl?: string;
207
+ /** Authentication methods supported by this connector */
208
+ authMethods?: ['api_key'] | ['oauth2'] | ['api_key', 'oauth2'];
209
+ /** Connector categories */
210
+ categories: ConnectorCategoryTuple;
211
+ /** Form fields for API-key configuration (when api_key auth is selected) */
212
+ fields?: FormFieldConfig[];
213
+ /** REST API resources for credential testing (e.g. "Test token" button) */
214
+ resources?: FormResourceConfig[];
215
+ /** Custom action buttons (e.g. "Test token", "Test connection") */
216
+ customButtons?: CustomButtonConfig[];
217
+ /** Connector-level metadata: base URL, app URL, auth guide, test endpoint. */
218
+ meta?: ConnectorMetaConfig;
219
+ }
220
+ //# sourceMappingURL=configTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configTypes.d.ts","sourceRoot":"","sources":["../../src/config/configTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEjG;;;;;;;;;GASG;AAMH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,gCAAgC,CAAC;IACvC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAEtB,SAAS,GACT,YAAY,GACZ,WAAW,GACX,cAAc,GACd,YAAY,GACZ,cAAc,GACd,uBAAuB,GACvB,WAAW,GACX,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,QAAQ,GACR,SAAS,GACT,cAAc,GACd,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,UAAU,GACV,SAAS,GACT,YAAY,GACZ,WAAW,GACX,WAAW,GACX,aAAa,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A4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/D,2BAA2B;IAC3B,UAAU,EAAE,sBAAsB,CAAC;IACnC,4EAA4E;IAC5E,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACjC,mEAAmE;IACnE,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACrC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
@@ -0,0 +1,6 @@
1
+ // Credential template values from contribution points that should also be selectable.
2
+ const CREDENTIAL_TEMPLATE_CATEGORIES = ['api', 'database', 'storage', 'llm', 'mcp', 'cache', 'embeddings', 'agents', 'memory', 'tools', 'other'];
3
+ // Connector domain categories from contribution points.
4
+ const CONNECTOR_DOMAIN_CATEGORIES = ['advertising & marketing', 'ai & machine learning', 'analytics & data', 'cloud & infrastructure', 'collaboration & communication', 'crm', 'cybersecurity', 'data & analytics', 'design & creative tools', 'developer tools & devops', 'direct mail automation', 'document & file management', 'e-commerce', 'education & lms', 'entertainment & media', 'finance & accounting', 'fundraising', 'hr & recruiting', 'marketing & social media', 'productivity & project management', 'sales & customer support', 'scheduling & booking', 'security & compliance', 'security & identity tools', 'social media', 'wi-fi management', 'workflow automation'];
5
+ // Available categories for custom credentials/connectors.
6
+ const CONNECTOR_CATEGORIES = [...CONNECTOR_DOMAIN_CATEGORIES, ...CREDENTIAL_TEMPLATE_CATEGORIES];export{CONNECTOR_CATEGORIES};//# sourceMappingURL=configTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configTypes.js","sources":["../../src/config/configTypes.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AAEA,MAAA,8BAAA,GAAA,CAAA,KAAA,EAAA,UAAA,EAAA,SAAA,EAAA,KAAA,EAAA,KAAA,EAAA,OAAA,EAAA,YAAA,EAAA,QAAA,EAAA,QAAA,EAAA,OAAA,EAAA,OAAA,CAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ import type { FormFieldConfig } from './configTypes';
2
+ type ConnectorFieldToken = Pick<FormFieldConfig, 'name' | 'genericType'>;
3
+ export interface ResolveConnectorFieldTokensOptions {
4
+ fields: ConnectorFieldToken[];
5
+ basePath?: string;
6
+ context?: string;
7
+ }
8
+ export declare function resolveConnectorFieldTokensInString(value: string, options: ResolveConnectorFieldTokensOptions): string;
9
+ export declare function resolveConnectorFieldTokensInValue<T>(value: T, options: ResolveConnectorFieldTokensOptions): T;
10
+ export {};
11
+ //# sourceMappingURL=connectorFieldTokenResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorFieldTokenResolver.d.ts","sourceRoot":"","sources":["../../src/config/connectorFieldTokenResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,KAAK,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC;AAEzE,MAAM,WAAW,kCAAkC;IAC/C,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAgGD,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kCAAkC,GAC5C,MAAM,CAER;AAuBD,wBAAgB,kCAAkC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,kCAAkC,GAAG,CAAC,CAE9G"}
@@ -0,0 +1,95 @@
1
+ const DEFAULT_BASE_PATH = 'step1.oauthConnector';
2
+ const CONNECTOR_FIELD_TOKEN_PATTERN = /\{\{\s*connectorField\.([^}\s]+)\s*\}\}/g;
3
+ const escapeRegExp = value => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
4
+ const generatedFieldLeaf = field => field.genericType || field.name;
5
+ const buildConcreteTokenPattern = basePath => new RegExp(`\\{\\{\\s*${escapeRegExp(basePath)}\\.([^}\\s]+)\\s*\\}\\}`, 'g');
6
+ const describeContext = context => context ? ` in ${context}` : '';
7
+ const buildFieldLookup = fields => {
8
+ const byName = new Map();
9
+ const ambiguousNames = new Set();
10
+ const aliases = new Map();
11
+ const ambiguousAliases = new Set();
12
+ const addName = field => {
13
+ const existing = byName.get(field.name);
14
+ if (existing && existing !== field) {
15
+ ambiguousNames.add(field.name);
16
+ return;
17
+ }
18
+ byName.set(field.name, field);
19
+ };
20
+ const addAlias = (alias, field) => {
21
+ if (!alias) return;
22
+ const existing = aliases.get(alias);
23
+ if (existing && existing !== field) {
24
+ ambiguousAliases.add(alias);
25
+ return;
26
+ }
27
+ aliases.set(alias, field);
28
+ };
29
+ fields.forEach(field => {
30
+ addName(field);
31
+ addAlias(field.name, field);
32
+ addAlias(generatedFieldLeaf(field), field);
33
+ });
34
+ return {
35
+ byName,
36
+ ambiguousNames,
37
+ aliases,
38
+ ambiguousAliases
39
+ };
40
+ };
41
+ const resolveByName = (reference, options, lookup) => {
42
+ const {
43
+ byName,
44
+ ambiguousNames
45
+ } = lookup;
46
+ if (ambiguousNames.has(reference)) {
47
+ throw new Error(`Ambiguous connector field reference "${reference}"${describeContext(options.context)}`);
48
+ }
49
+ const field = byName.get(reference);
50
+ if (!field) {
51
+ const names = Array.from(byName.keys()).sort().join(', ');
52
+ throw new Error(`Unknown connector field reference "${reference}"${describeContext(options.context)}. Expected one of: ${names}`);
53
+ }
54
+ return generatedFieldLeaf(field);
55
+ };
56
+ const resolveByAlias = (reference, options, lookup) => {
57
+ const {
58
+ aliases,
59
+ ambiguousAliases
60
+ } = lookup;
61
+ if (ambiguousAliases.has(reference)) {
62
+ throw new Error(`Ambiguous connector field alias "${reference}"${describeContext(options.context)}`);
63
+ }
64
+ const field = aliases.get(reference);
65
+ return field ? generatedFieldLeaf(field) : null;
66
+ };
67
+ const resolveString = (value, options, lookup) => {
68
+ const basePath = options.basePath || DEFAULT_BASE_PATH;
69
+ const concreteTokenPattern = buildConcreteTokenPattern(basePath);
70
+ return value.replace(CONNECTOR_FIELD_TOKEN_PATTERN, (_match, reference) => {
71
+ const leaf = resolveByName(reference, options, lookup);
72
+ return `{{${basePath}.${leaf}}}`;
73
+ }).replace(concreteTokenPattern, (_match, reference) => {
74
+ const leaf = resolveByAlias(reference, options, lookup);
75
+ return leaf ? `{{${basePath}.${leaf}}}` : `{{${basePath}.${reference}}}`;
76
+ });
77
+ };
78
+ function resolveConnectorFieldTokensInString(value, options) {
79
+ return resolveString(value, options, buildFieldLookup(options.fields));
80
+ }
81
+ const resolveValue = (value, options, lookup) => {
82
+ if (typeof value === 'string') {
83
+ return resolveString(value, options, lookup);
84
+ }
85
+ if (Array.isArray(value)) {
86
+ return value.map(item => resolveValue(item, options, lookup));
87
+ }
88
+ if (value && typeof value === 'object') {
89
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, resolveValue(item, options, lookup)]));
90
+ }
91
+ return value;
92
+ };
93
+ function resolveConnectorFieldTokensInValue(value, options) {
94
+ return resolveValue(value, options, buildFieldLookup(options.fields));
95
+ }export{resolveConnectorFieldTokensInString,resolveConnectorFieldTokensInValue};//# sourceMappingURL=connectorFieldTokenResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorFieldTokenResolver.js","sources":["../../src/config/connectorFieldTokenResolver.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAA,iBAAc,GAAA;AAEd,MAAK,6BAA2B,GAAA,0CAAyC;AAEzE,MAAM,YAAW,GAAA,KAAA,IAAA,KAAA,CAAA,OAAA,CAAA,qBAAkC,EAAA,MAAA,CAAA;MAC/C,kBAAQ,GAAA,KAAmB,IAAG,KAAA,CAAA,WAAA,IAAA,KAAA,CAAA,IAAA;MAC9B,yBAAkB,GAAA,QAAA,IAAA,IAAA,MAAA,CAAA,CAAA,UAAA,EAAA,YAAA,CAAA,QAAA,CAAA,CAAA,uBAAA,CAAA,EAAA,GAAA,CAAA;MAClB,eAAiB,GAAA,OAAA,IAAA,OAAA,GAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA,GAAA,EAAA;AACpB,MAAA,gBAAA,GAAA,MAAA,IAAA;AAgGD,EAAA,MAAA,MAAA,GAAA,IAAA,GAAgB,EAAA;AA4BhB,EAAA,MAAA,cAAA,GAAgB,IAAA,GAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { ConnectorConfig } from './configTypes';
2
+ export declare const connectorsConfig: ConnectorConfig[];
3
+ //# sourceMappingURL=connectorsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorsConfig.d.ts","sourceRoot":"","sources":["../../src/config/connectorsConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA+n/C7C,CAAC"}