@adminide-stack/form-builder-core 5.1.8-alpha.98 → 5.1.9-alpha.2
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.
- package/lib/config/cdnConfig.d.ts +7 -3
- package/lib/config/cdnConfig.d.ts.map +1 -1
- package/lib/config/cdnConfig.js +17 -7
- package/lib/config/cdnConfig.js.map +1 -1
- package/lib/config/configTypes.d.ts +28 -1
- package/lib/config/configTypes.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/utils/authMetaDataSchema.d.ts +96 -2
- package/lib/utils/authMetaDataSchema.d.ts.map +1 -1
- package/lib/utils/authMetaDataSchema.js +268 -27
- package/lib/utils/authMetaDataSchema.js.map +1 -1
- package/lib/utils/integrationCommands.d.ts +14 -0
- package/lib/utils/integrationCommands.d.ts.map +1 -1
- package/lib/utils/integrationCommands.js +123 -11
- package/lib/utils/integrationCommands.js.map +1 -1
- package/package.json +3 -4
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CDN / asset-URL configuration.
|
|
2
|
+
* CDN / asset-URL configuration for connector artwork.
|
|
3
3
|
*
|
|
4
4
|
* Connector configs store only the *path* portion
|
|
5
5
|
* (e.g. `_side/thirdparty/logos/gmail.svg`); call `iurl(path)` to get the
|
|
6
6
|
* full URL at runtime.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Logos are served from the `cde-extensions` bucket (the same CDN that fronts
|
|
9
|
+
* the connector registry and pods), *not* from the tenant upload bucket that
|
|
10
|
+
* `AWS_CDN_URL` points at. Override with the `EXTENSION_CDN_URL` env var via
|
|
11
|
+
* `setCdnBase()`; browser packages do that at init time.
|
|
10
12
|
*/
|
|
13
|
+
/** `cde-extensions` bucket CDN — the default home for connector artwork. */
|
|
14
|
+
export declare const DEFAULT_EXTENSION_CDN_BASE = "https://cdn.yantra.app";
|
|
11
15
|
/** Set the CDN base URL (typically called once from env-config). */
|
|
12
16
|
export declare function setCdnBase(base: string): void;
|
|
13
17
|
/** Get the current CDN base URL. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdnConfig.d.ts","sourceRoot":"","sources":["../../src/config/cdnConfig.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cdnConfig.d.ts","sourceRoot":"","sources":["../../src/config/cdnConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AAInE,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAS7C;AAED,oCAAoC;AACpC,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,0DAA0D;AAC1D,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOzC"}
|
package/lib/config/cdnConfig.js
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CDN / asset-URL configuration.
|
|
2
|
+
* CDN / asset-URL configuration for connector artwork.
|
|
3
3
|
*
|
|
4
4
|
* Connector configs store only the *path* portion
|
|
5
5
|
* (e.g. `_side/thirdparty/logos/gmail.svg`); call `iurl(path)` to get the
|
|
6
6
|
* full URL at runtime.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Logos are served from the `cde-extensions` bucket (the same CDN that fronts
|
|
9
|
+
* the connector registry and pods), *not* from the tenant upload bucket that
|
|
10
|
+
* `AWS_CDN_URL` points at. Override with the `EXTENSION_CDN_URL` env var via
|
|
11
|
+
* `setCdnBase()`; browser packages do that at init time.
|
|
10
12
|
*/
|
|
11
|
-
|
|
13
|
+
/** `cde-extensions` bucket CDN — the default home for connector artwork. */
|
|
14
|
+
const DEFAULT_EXTENSION_CDN_BASE = 'https://cdn.yantra.app';
|
|
15
|
+
let _cdnBase = DEFAULT_EXTENSION_CDN_BASE;
|
|
12
16
|
/** Set the CDN base URL (typically called once from env-config). */
|
|
13
17
|
function setCdnBase(base) {
|
|
14
|
-
// Strip trailing slash for consistency.
|
|
15
|
-
|
|
18
|
+
// Strip trailing slash for consistency. Empty/blank resets to the default
|
|
19
|
+
// so an unset env var can never degrade logos to host-relative 404s.
|
|
20
|
+
const trimmed = (base || '').trim();
|
|
21
|
+
if (!trimmed) {
|
|
22
|
+
_cdnBase = DEFAULT_EXTENSION_CDN_BASE;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
_cdnBase = trimmed.endsWith('/') ? trimmed.slice(0, -1) : trimmed;
|
|
16
26
|
}
|
|
17
27
|
/** Get the current CDN base URL. */
|
|
18
28
|
function getCdnBase() {
|
|
@@ -26,4 +36,4 @@ function iurl(path) {
|
|
|
26
36
|
// Strip leading slash so we don't end up with a double-slash.
|
|
27
37
|
const clean = path.startsWith('/') ? path.slice(1) : path;
|
|
28
38
|
return _cdnBase ? `${_cdnBase}/${clean}` : clean;
|
|
29
|
-
}export{getCdnBase,iurl,setCdnBase};//# sourceMappingURL=cdnConfig.js.map
|
|
39
|
+
}export{DEFAULT_EXTENSION_CDN_BASE,getCdnBase,iurl,setCdnBase};//# sourceMappingURL=cdnConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdnConfig.js","sources":["../../src/config/cdnConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cdnConfig.js","sources":["../../src/config/cdnConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AAEH;AACA,MAAA,0BAAa,GAAA;AAIb,IAAA,QAAA,GAAA,0BAAA;AACA;AAWA,SAAA,UAAA,CAAA,IAAA,EAAA;AACA;AAIA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,IAAA,MAAqB,EAAA,IAAM,EAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -28,7 +28,7 @@ export type FieldType = 'string' | 'number' | 'integer' | 'boolean' | 'array' |
|
|
|
28
28
|
* - Credentials: username, password, email
|
|
29
29
|
* - Display-only: info, label_info
|
|
30
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';
|
|
31
|
+
export type GenericFieldType = 'api_key' | 'api_secret' | 'api_token' | 'access_token' | 'access_key' | 'bearer_token' | 'personal_access_token' | 'bot_token' | 'private_key' | 'private_key_passphrase' | 'bastion_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' | 'port' | 'host_allowlist' | 'host_fingerprint' | 'host_verification_mode' | 'auth_method' | 'agent_socket' | 'bastion_host' | 'bastion_port' | 'bastion_host_fingerprint' | 'read_only' | 'command_denylist' | 'command_quota' | 'username' | 'password' | 'email' | 'bastion_username' | 'bastion_password' | 'info' | 'label_info';
|
|
32
32
|
/**
|
|
33
33
|
* Where the field value should be placed in the HTTP request at runtime.
|
|
34
34
|
* Standard third-party placement model for HTTP request field mapping.
|
|
@@ -89,6 +89,12 @@ export interface FormFieldConfig {
|
|
|
89
89
|
/** Custom header/query-param name when placement is 'header' or 'query'. */
|
|
90
90
|
placementKey?: string;
|
|
91
91
|
scope?: ConfigurationScope;
|
|
92
|
+
/**
|
|
93
|
+
* Tucks the field under a collapsed "Advanced settings" toggle in the connector form, for
|
|
94
|
+
* values with a working default most people never change (an IMAP host or port). The
|
|
95
|
+
* section opens by itself when one of its fields fails validation.
|
|
96
|
+
*/
|
|
97
|
+
advanced?: boolean;
|
|
92
98
|
}
|
|
93
99
|
export type ResourceSourceType = 'jsCode' | 'graphql' | 'rest-api';
|
|
94
100
|
export interface GraphQLResourceConfig {
|
|
@@ -194,6 +200,20 @@ export interface ConnectorConfig {
|
|
|
194
200
|
usePKCE?: boolean;
|
|
195
201
|
/** OAuth client authentication method */
|
|
196
202
|
clientAuthMethod?: 'client_secret_basic' | 'client_secret_post';
|
|
203
|
+
/**
|
|
204
|
+
* Query/body parameter name the provider expects for the client id (e.g. TikTok uses
|
|
205
|
+
* `client_key`). Applies to custom OAuth endpoints only. Defaults to `client_id`.
|
|
206
|
+
*/
|
|
207
|
+
clientIdParamName?: string;
|
|
208
|
+
/** Join scopes with commas instead of spaces in the authorization request (e.g. TikTok). */
|
|
209
|
+
useCommaSeparatedScopes?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Extra headers the provider requires on its token, refresh and revocation requests, beyond
|
|
212
|
+
* client authentication (Stripe Link: `Authorization: Bearer <publishable key>`, with the
|
|
213
|
+
* client secret still in the body). Values take the same `{{KEY}}` templates as the OAuth
|
|
214
|
+
* URLs. Custom OAuth endpoints only.
|
|
215
|
+
*/
|
|
216
|
+
tokenEndpointHeaders?: Record<string, string>;
|
|
197
217
|
/** Explicit OAuth Authorization URL (if useCustomOAuthEndpoints is true) */
|
|
198
218
|
authorizationUrl?: string;
|
|
199
219
|
/** Explicit OAuth Token URL (if useCustomOAuthEndpoints is true) */
|
|
@@ -202,6 +222,13 @@ export interface ConnectorConfig {
|
|
|
202
222
|
revocationUrl?: string;
|
|
203
223
|
/** Use HTTP Basic auth for token exchange (client_secret_basic). */
|
|
204
224
|
useBasicAuth?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Provider issues a developer token that every API call must carry in addition to
|
|
227
|
+
* the OAuth access token (Google Ads). Declared alongside clientId/clientSecret —
|
|
228
|
+
* same scope, same vault-backed defaultValueSource, read from
|
|
229
|
+
* `<PROVIDER>_DEVELOPER_TOKEN`.
|
|
230
|
+
*/
|
|
231
|
+
requiresDeveloperToken?: boolean;
|
|
205
232
|
/** MCP endpoint (if the provider supports MCP auth) */
|
|
206
233
|
mcpUrl?: string;
|
|
207
234
|
/** Authentication methods supported by this connector */
|
|
@@ -1 +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,GACb,WAAW,GACX,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,aAAa,GACb,UAAU,GACV,UAAU,GACV,aAAa,GACb,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,YAAY,GACZ,iBAAiB,GAEjB,UAAU,GACV,cAAc,GACd,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,UAAU,GACV,aAAa,
|
|
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,wBAAwB,GACxB,qBAAqB,GACrB,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,WA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,setCdnBase}from'./config/cdnConfig.js';export{CONNECTOR_CATALOG_SAMPLE_CHUNK_SIZE,CONNECTOR_CATALOG_SAMPLE_ENTRIES,CONNECTOR_CATALOG_SAMPLE_ENTRY_BY_SCHEMA_ID}from'./config/connectorSampleOptions.generated.js';export{CONNECTOR_CATEGORIES}from'./config/configTypes.js';export{generateFunctionCode,generateHandlerBody,generateHandlerBodyWithReturn,generateStepFromFunction,generateStepFunctionsFromDB,wrapStepsInInngestFunction}from'./inngest/generateFunctionCode.js';export{getAvailableDefinitions,installLibraryForAutocomplete,setupMonacoAutocomplete,setupStepAutocomplete,updateAutocompleteConfig}from'./inngest/monacoAutocompleteIntegration.js';export{cleanStepCode,extractFunctionBody,extractStepVarName,generateFromExtractedFunctions}from'./inngest/stepGenerator.js';export{buildMetadataSchema,buildProviderConfig,buildProviderSeedFromConfig,buildProviderWithRefs,createOAuthSeedGenerator}from'./utils/authMetaDataSchema.js';export{resolveConnectorFieldTokensInString,resolveConnectorFieldTokensInValue}from'./utils/connectorFieldTokenResolver.js';export{deepMergeElements,deepMergeFormSteps}from'./utils/deepMergeFormSteps.js';export{flatten,unflatten}from'./utils/json.js';export{DatabaseType,FORM_METADATA_NODE_TYPE,FormType,SCHEMA_ID_OPTIONS,flattenSchemaWithUiContext,flattenSchemas,flattenUiSchema,isContributionSchemaId,parseSampleNodes}from'./utils/schemaHelpers.js';export{buildCommandsFromActions,buildMenusFromCommands,buildParamBindings,extractTemplateUserFields,extractUserFieldsFromStepperFormMetadata,parseInputTemplate,resolveInputTemplate}from'./utils/integrationCommands.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{DEFAULT_EXTENSION_CDN_BASE,getCdnBase,iurl,setCdnBase}from'./config/cdnConfig.js';export{CONNECTOR_CATALOG_SAMPLE_CHUNK_SIZE,CONNECTOR_CATALOG_SAMPLE_ENTRIES,CONNECTOR_CATALOG_SAMPLE_ENTRY_BY_SCHEMA_ID}from'./config/connectorSampleOptions.generated.js';export{CONNECTOR_CATEGORIES}from'./config/configTypes.js';export{generateFunctionCode,generateHandlerBody,generateHandlerBodyWithReturn,generateStepFromFunction,generateStepFunctionsFromDB,wrapStepsInInngestFunction}from'./inngest/generateFunctionCode.js';export{getAvailableDefinitions,installLibraryForAutocomplete,setupMonacoAutocomplete,setupStepAutocomplete,updateAutocompleteConfig}from'./inngest/monacoAutocompleteIntegration.js';export{cleanStepCode,extractFunctionBody,extractStepVarName,generateFromExtractedFunctions}from'./inngest/stepGenerator.js';export{buildCredentialOAuthConfigKey,buildCredentialOAuthTokenVaultKeys,buildCredentialScopedSecretKey,buildMetadataSchema,buildNamespaceCredentialOAuthTokenVaultKeys,buildOAuthInstanceTokenVaultKeys,buildProviderConfig,buildProviderCredentialOAuthTokenVaultKeys,buildProviderSeedFromConfig,buildProviderWithRefs,createOAuthSeedGenerator,credentialIdFromOAuthConfigKey,credentialIdFromScopedSecretKey,isCredentialAccountConfigKey,isCredentialScopedSecretKey,namespaceFromOAuthConfigKey,stripCredentialAccountConfigKey,stripCredentialScopedSecretKey,toVaultPrefix}from'./utils/authMetaDataSchema.js';export{resolveConnectorFieldTokensInString,resolveConnectorFieldTokensInValue}from'./utils/connectorFieldTokenResolver.js';export{deepMergeElements,deepMergeFormSteps}from'./utils/deepMergeFormSteps.js';export{flatten,unflatten}from'./utils/json.js';export{DatabaseType,FORM_METADATA_NODE_TYPE,FormType,SCHEMA_ID_OPTIONS,flattenSchemaWithUiContext,flattenSchemas,flattenUiSchema,isContributionSchemaId,parseSampleNodes}from'./utils/schemaHelpers.js';export{buildCommandsFromActions,buildIntegrationConfigurationContribution,buildMenusFromCommands,buildParamBindings,extractTemplateUserFields,extractUserFieldsFromStepperFormMetadata,parseInputTemplate,resolveInputTemplate}from'./utils/integrationCommands.js';//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConnectorType } from 'common';
|
|
2
2
|
import { ConnectorCategoryTuple, ConnectorConfig, CustomButtonConfig, FormFieldConfig, FormResourceConfig, MCPProviderConfig } from '../config/configTypes';
|
|
3
3
|
type SampleFormGenerator = (title?: string, formIcon?: string, formExtensionId?: string) => any[];
|
|
4
|
-
interface ProviderTemplateSeed {
|
|
4
|
+
export interface ProviderTemplateSeed {
|
|
5
5
|
key: string;
|
|
6
6
|
providerId: string;
|
|
7
7
|
title: string;
|
|
@@ -11,10 +11,15 @@ interface ProviderTemplateSeed {
|
|
|
11
11
|
useCustomOAuthEndpoints?: boolean;
|
|
12
12
|
usePKCE?: boolean;
|
|
13
13
|
clientAuthMethod?: 'client_secret_basic' | 'client_secret_post';
|
|
14
|
+
clientIdParamName?: string;
|
|
15
|
+
useCommaSeparatedScopes?: boolean;
|
|
16
|
+
tokenEndpointHeaders?: Record<string, string>;
|
|
14
17
|
authorizationUrl?: string;
|
|
15
18
|
tokenUrl?: string;
|
|
16
19
|
revocationUrl?: string;
|
|
17
20
|
useBasicAuth?: boolean;
|
|
21
|
+
/** Provider requires a developer token alongside the OAuth client credentials. */
|
|
22
|
+
requiresDeveloperToken?: boolean;
|
|
18
23
|
mcpUrl?: string;
|
|
19
24
|
connectorType: ConnectorType;
|
|
20
25
|
authMethods: string[];
|
|
@@ -179,7 +184,96 @@ export declare const buildProviderConfig: (providerConfig: CustomProviderConfigI
|
|
|
179
184
|
}[];
|
|
180
185
|
};
|
|
181
186
|
export declare function buildProviderSeedFromConfig(provider: ConnectorConfig | MCPProviderConfig, connectorType: ConnectorType): ProviderTemplateSeed;
|
|
182
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Normalize a provider id or form namespace into a vault secret key prefix.
|
|
189
|
+
* e.g. `gmail-app-hk7zf7w9` → `GMAIL_APP_HK7ZF7W9`
|
|
190
|
+
*/
|
|
191
|
+
export declare const toVaultPrefix: (value: string) => string;
|
|
192
|
+
/**
|
|
193
|
+
* Per-form-instance vault keys for non-account-specific secrets (e.g. API key fields).
|
|
194
|
+
*
|
|
195
|
+
* Do NOT use these for OAuth access/refresh tokens when multiple accounts can share
|
|
196
|
+
* one published form — connecting account B would overwrite account A's vault entry.
|
|
197
|
+
* Access/refresh live under per-credential `configKey.accounts.{id}.*` and durable
|
|
198
|
+
* `CRED_<id>_*` vault keys via syncOAuthTokensToCredentialVault.
|
|
199
|
+
*
|
|
200
|
+
* Client id/secret stay provider-scoped (shared OAuth app credentials).
|
|
201
|
+
*/
|
|
202
|
+
export declare const buildOAuthInstanceTokenVaultKeys: (namespace: string) => {
|
|
203
|
+
/** @deprecated Do not wire access tokens to this shared key — use CRED_* instead. */
|
|
204
|
+
readonly accessToken: `${string}_ACCESS_TOKEN`;
|
|
205
|
+
/** @deprecated Do not wire refresh tokens to this shared key — use CRED_* instead. */
|
|
206
|
+
readonly refreshToken: `${string}_REFRESH_TOKEN`;
|
|
207
|
+
readonly apiKey: `${string}_API_KEY`;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Credential-scoped vault key: `{BASE_KEY}_{credentialId}`.
|
|
211
|
+
*
|
|
212
|
+
* This is the platform's own convention — `preferences-service` resolves a
|
|
213
|
+
* `format: 'secret'` config key to `${defaultValueSource.secretKey}_${credentialId}`
|
|
214
|
+
* on both read and write whenever the node context carries a `credentialId`.
|
|
215
|
+
* API-key connectors reuse the exact same shape so several credentials for one
|
|
216
|
+
* provider can coexist in a project/env instead of overwriting each other's
|
|
217
|
+
* shared `PROVIDER_API_KEY` entry (the same isolation OAuth gets from its
|
|
218
|
+
* per-account configKey).
|
|
219
|
+
*
|
|
220
|
+
* Idempotent when `baseSecretKey` is already scoped to the same credential.
|
|
221
|
+
*/
|
|
222
|
+
export declare const buildCredentialScopedSecretKey: (baseSecretKey: string, credentialId: string) => string;
|
|
223
|
+
/** True when a vault key already carries a `_{credentialId}` suffix. */
|
|
224
|
+
export declare const isCredentialScopedSecretKey: (secretKey: string) => boolean;
|
|
225
|
+
/** Strip `_{credentialId}` to recover the catalog/base vault key. */
|
|
226
|
+
export declare const stripCredentialScopedSecretKey: (secretKey: string) => string;
|
|
227
|
+
/** credentialId embedded in a scoped vault key, if any. */
|
|
228
|
+
export declare const credentialIdFromScopedSecretKey: (secretKey: string) => string | null;
|
|
229
|
+
/**
|
|
230
|
+
* Durable per-credential token vault keys. Used after OAuth connect so each
|
|
231
|
+
* FormBuilderCredential keeps its own token pair even when several credentials
|
|
232
|
+
* share the same published template/configKey staging path.
|
|
233
|
+
*/
|
|
234
|
+
export declare const buildCredentialOAuthTokenVaultKeys: (credentialId: string) => {
|
|
235
|
+
readonly accessToken: `${string}_ACCESS_TOKEN`;
|
|
236
|
+
readonly refreshToken: `${string}_REFRESH_TOKEN`;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Provider-scoped per-credential OAuth vault keys (e.g. OAuth callback writes
|
|
240
|
+
* `GOOGLE_GMAIL_ACCESS_TOKEN_{credentialId}` to Personal Vault).
|
|
241
|
+
*/
|
|
242
|
+
export declare const buildProviderCredentialOAuthTokenVaultKeys: (providerId: string, credentialId: string) => {
|
|
243
|
+
readonly accessToken: `${string}_ACCESS_TOKEN_${string}`;
|
|
244
|
+
readonly refreshToken: `${string}_REFRESH_TOKEN_${string}`;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Namespace-scoped per-credential OAuth vault keys (`google_gmail-app` → `GOOGLE_GMAIL_APP_*_{id}`).
|
|
248
|
+
*/
|
|
249
|
+
export declare const buildNamespaceCredentialOAuthTokenVaultKeys: (namespace: string, credentialId: string) => {
|
|
250
|
+
readonly accessToken: `${string}_ACCESS_TOKEN_${string}`;
|
|
251
|
+
readonly refreshToken: `${string}_REFRESH_TOKEN_${string}`;
|
|
252
|
+
};
|
|
253
|
+
/** True when configKey is already scoped to a FormBuilder credential account. */
|
|
254
|
+
export declare const isCredentialAccountConfigKey: (configKey: string) => boolean;
|
|
255
|
+
/** Strip `.accounts.{credentialId}` to recover the published template configKey. */
|
|
256
|
+
export declare const stripCredentialAccountConfigKey: (configKey: string) => string;
|
|
257
|
+
/** credentialId embedded in an account-scoped configKey, if any. */
|
|
258
|
+
export declare const credentialIdFromOAuthConfigKey: (configKey: string) => string | null;
|
|
259
|
+
/**
|
|
260
|
+
* Build the per-credential OAuth configKey used for connect / refresh / disconnect.
|
|
261
|
+
* Idempotent when `baseConfigKey` is already account-scoped for the same id.
|
|
262
|
+
*/
|
|
263
|
+
export declare const buildCredentialOAuthConfigKey: (baseConfigKey: string, credentialId: string) => string;
|
|
264
|
+
/** Extract the form namespace from an oauthConnector configKey path. */
|
|
265
|
+
export declare const namespaceFromOAuthConfigKey: (configKey: string) => string | null;
|
|
266
|
+
export interface SeedGeneratorOptions {
|
|
267
|
+
/**
|
|
268
|
+
* Exact namespace (== formId) per seed, aligned by index. Pass a published template's
|
|
269
|
+
* key to regenerate a form that is identity-compatible with it - same formId and the
|
|
270
|
+
* same `integrationSettings.settings.<type>.<ns>.oauthConnector` configuration keys -
|
|
271
|
+
* so stored credentials and OAuth writes keep resolving. Omitted entries fall back to
|
|
272
|
+
* the random-suffix default (new-form behavior).
|
|
273
|
+
*/
|
|
274
|
+
namespaces?: Array<string | undefined>;
|
|
275
|
+
}
|
|
276
|
+
export declare function createOAuthSeedGenerator(seeds: ProviderTemplateSeed[], options?: SeedGeneratorOptions): SampleFormGenerator;
|
|
183
277
|
export declare const buildProviderWithRefs: (provider: any, sampleNodes: any[]) => any;
|
|
184
278
|
export declare const buildMetadataSchema: (sampleNodes: any[]) => ({
|
|
185
279
|
schemaId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authMetaDataSchema.d.ts","sourceRoot":"","sources":["../../src/utils/authMetaDataSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAyD,MAAM,QAAQ,CAAC;AAClH,OAAO,EAEH,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,uBAAuB,CAAC;AAI/B,KAAK,mBAAmB,GAAG,CAAC,KAAK,CAAC,E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AC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,eAAe,MAAM,EAAE,cAAc,MAAM,KAAG,MAM3F,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,2BAA2B,GAAI,WAAW,MAAM,KAAG,MAAM,GAAG,IAIxE,CAAC;AA48CF,MAAM,WAAW,oBAAoB;IACjC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,oBAAoB,EAAE,EAC7B,OAAO,GAAE,oBAAyB,GACnC,mBAAmB,CAGrB;AAqBD,eAAO,MAAM,qBAAqB,GAAI,UAAU,GAAG,EAAE,aAAa,GAAG,EAAE,QAsBtE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,GAAG,EAAE;;;;;;;;;;;;;IAqBrD,CAAC"}
|
|
@@ -92,10 +92,14 @@ const buildAppSeed = p => {
|
|
|
92
92
|
useCustomOAuthEndpoints: p.useCustomOAuthEndpoints,
|
|
93
93
|
usePKCE: p.usePKCE,
|
|
94
94
|
clientAuthMethod: p.clientAuthMethod,
|
|
95
|
+
clientIdParamName: p.clientIdParamName,
|
|
96
|
+
useCommaSeparatedScopes: p.useCommaSeparatedScopes,
|
|
97
|
+
tokenEndpointHeaders: p.tokenEndpointHeaders,
|
|
95
98
|
authorizationUrl: p.authorizationUrl,
|
|
96
99
|
tokenUrl: p.tokenUrl,
|
|
97
100
|
revocationUrl: p.revocationUrl,
|
|
98
101
|
useBasicAuth: p.useBasicAuth,
|
|
102
|
+
requiresDeveloperToken: p.requiresDeveloperToken,
|
|
99
103
|
mcpUrl: p.mcpUrl || '',
|
|
100
104
|
connectorType: 'app',
|
|
101
105
|
authMethods,
|
|
@@ -232,7 +236,128 @@ const seedCategory = seed => seed.categories[0];
|
|
|
232
236
|
* 'app' but a `${id}:llm` key; everything else is an app connector.
|
|
233
237
|
*/
|
|
234
238
|
const seedCredentialNamespace = seed => seed.connectorType === 'mcp' ? 'mcp' : seed.key.endsWith(':llm') ? 'llm' : 'app';
|
|
239
|
+
/**
|
|
240
|
+
* Normalize a provider id or form namespace into a vault secret key prefix.
|
|
241
|
+
* e.g. `gmail-app-hk7zf7w9` → `GMAIL_APP_HK7ZF7W9`
|
|
242
|
+
*/
|
|
235
243
|
const toVaultPrefix = value => value.replace(/[^a-zA-Z0-9]/g, '_').toUpperCase();
|
|
244
|
+
/**
|
|
245
|
+
* Per-form-instance vault keys for non-account-specific secrets (e.g. API key fields).
|
|
246
|
+
*
|
|
247
|
+
* Do NOT use these for OAuth access/refresh tokens when multiple accounts can share
|
|
248
|
+
* one published form — connecting account B would overwrite account A's vault entry.
|
|
249
|
+
* Access/refresh live under per-credential `configKey.accounts.{id}.*` and durable
|
|
250
|
+
* `CRED_<id>_*` vault keys via syncOAuthTokensToCredentialVault.
|
|
251
|
+
*
|
|
252
|
+
* Client id/secret stay provider-scoped (shared OAuth app credentials).
|
|
253
|
+
*/
|
|
254
|
+
const buildOAuthInstanceTokenVaultKeys = namespace => {
|
|
255
|
+
const prefix = toVaultPrefix(namespace);
|
|
256
|
+
return {
|
|
257
|
+
/** @deprecated Do not wire access tokens to this shared key — use CRED_* instead. */
|
|
258
|
+
accessToken: `${prefix}_ACCESS_TOKEN`,
|
|
259
|
+
/** @deprecated Do not wire refresh tokens to this shared key — use CRED_* instead. */
|
|
260
|
+
refreshToken: `${prefix}_REFRESH_TOKEN`,
|
|
261
|
+
apiKey: `${prefix}_API_KEY`
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
/** `_{24-hex}` suffix appended to a base vault key to scope it to one credential. */
|
|
265
|
+
const CREDENTIAL_SCOPED_SECRET_KEY_RE = /_([a-fA-F0-9]{24})$/;
|
|
266
|
+
/**
|
|
267
|
+
* Credential-scoped vault key: `{BASE_KEY}_{credentialId}`.
|
|
268
|
+
*
|
|
269
|
+
* This is the platform's own convention — `preferences-service` resolves a
|
|
270
|
+
* `format: 'secret'` config key to `${defaultValueSource.secretKey}_${credentialId}`
|
|
271
|
+
* on both read and write whenever the node context carries a `credentialId`.
|
|
272
|
+
* API-key connectors reuse the exact same shape so several credentials for one
|
|
273
|
+
* provider can coexist in a project/env instead of overwriting each other's
|
|
274
|
+
* shared `PROVIDER_API_KEY` entry (the same isolation OAuth gets from its
|
|
275
|
+
* per-account configKey).
|
|
276
|
+
*
|
|
277
|
+
* Idempotent when `baseSecretKey` is already scoped to the same credential.
|
|
278
|
+
*/
|
|
279
|
+
const buildCredentialScopedSecretKey = (baseSecretKey, credentialId) => {
|
|
280
|
+
const base = stripCredentialScopedSecretKey(baseSecretKey || '');
|
|
281
|
+
if (!base || !credentialId) {
|
|
282
|
+
return base || '';
|
|
283
|
+
}
|
|
284
|
+
return `${base}_${credentialId}`;
|
|
285
|
+
};
|
|
286
|
+
/** True when a vault key already carries a `_{credentialId}` suffix. */
|
|
287
|
+
const isCredentialScopedSecretKey = secretKey => CREDENTIAL_SCOPED_SECRET_KEY_RE.test(secretKey || '');
|
|
288
|
+
/** Strip `_{credentialId}` to recover the catalog/base vault key. */
|
|
289
|
+
const stripCredentialScopedSecretKey = secretKey => (secretKey || '').replace(CREDENTIAL_SCOPED_SECRET_KEY_RE, '');
|
|
290
|
+
/** credentialId embedded in a scoped vault key, if any. */
|
|
291
|
+
const credentialIdFromScopedSecretKey = secretKey => CREDENTIAL_SCOPED_SECRET_KEY_RE.exec(secretKey || '')?.[1] || null;
|
|
292
|
+
/**
|
|
293
|
+
* Durable per-credential token vault keys. Used after OAuth connect so each
|
|
294
|
+
* FormBuilderCredential keeps its own token pair even when several credentials
|
|
295
|
+
* share the same published template/configKey staging path.
|
|
296
|
+
*/
|
|
297
|
+
const buildCredentialOAuthTokenVaultKeys = credentialId => {
|
|
298
|
+
const prefix = toVaultPrefix(`cred_${credentialId}`);
|
|
299
|
+
return {
|
|
300
|
+
accessToken: `${prefix}_ACCESS_TOKEN`,
|
|
301
|
+
refreshToken: `${prefix}_REFRESH_TOKEN`
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Provider-scoped per-credential OAuth vault keys (e.g. OAuth callback writes
|
|
306
|
+
* `GOOGLE_GMAIL_ACCESS_TOKEN_{credentialId}` to Personal Vault).
|
|
307
|
+
*/
|
|
308
|
+
const buildProviderCredentialOAuthTokenVaultKeys = (providerId, credentialId) => {
|
|
309
|
+
const prefix = toVaultPrefix(providerId);
|
|
310
|
+
return {
|
|
311
|
+
accessToken: `${prefix}_ACCESS_TOKEN_${credentialId}`,
|
|
312
|
+
refreshToken: `${prefix}_REFRESH_TOKEN_${credentialId}`
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* Namespace-scoped per-credential OAuth vault keys (`google_gmail-app` → `GOOGLE_GMAIL_APP_*_{id}`).
|
|
317
|
+
*/
|
|
318
|
+
const buildNamespaceCredentialOAuthTokenVaultKeys = (namespace, credentialId) => {
|
|
319
|
+
const prefix = toVaultPrefix(namespace);
|
|
320
|
+
return {
|
|
321
|
+
accessToken: `${prefix}_ACCESS_TOKEN_${credentialId}`,
|
|
322
|
+
refreshToken: `${prefix}_REFRESH_TOKEN_${credentialId}`
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Per-connected-account OAuth preferences path.
|
|
327
|
+
* Template: `….{namespace}.oauthConnector`
|
|
328
|
+
* Account: `….{namespace}.oauthConnector.accounts.{credentialId}`
|
|
329
|
+
*
|
|
330
|
+
* OAuth app settings (client id/secret, scopes, endpoints) are seeded from the
|
|
331
|
+
* template path onto each account path so ApplicationConnectorOAuthService can
|
|
332
|
+
* use a single configKey without a shared token staging slot.
|
|
333
|
+
*/
|
|
334
|
+
const CREDENTIAL_ACCOUNT_CONFIG_KEY_RE = /\.accounts\.([a-fA-F0-9]{24})$/;
|
|
335
|
+
/** True when configKey is already scoped to a FormBuilder credential account. */
|
|
336
|
+
const isCredentialAccountConfigKey = configKey => CREDENTIAL_ACCOUNT_CONFIG_KEY_RE.test(configKey || '');
|
|
337
|
+
/** Strip `.accounts.{credentialId}` to recover the published template configKey. */
|
|
338
|
+
const stripCredentialAccountConfigKey = configKey => (configKey || '').replace(CREDENTIAL_ACCOUNT_CONFIG_KEY_RE, '');
|
|
339
|
+
/** credentialId embedded in an account-scoped configKey, if any. */
|
|
340
|
+
const credentialIdFromOAuthConfigKey = configKey => {
|
|
341
|
+
const match = CREDENTIAL_ACCOUNT_CONFIG_KEY_RE.exec(configKey || '');
|
|
342
|
+
return match?.[1] || null;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Build the per-credential OAuth configKey used for connect / refresh / disconnect.
|
|
346
|
+
* Idempotent when `baseConfigKey` is already account-scoped for the same id.
|
|
347
|
+
*/
|
|
348
|
+
const buildCredentialOAuthConfigKey = (baseConfigKey, credentialId) => {
|
|
349
|
+
const base = stripCredentialAccountConfigKey(baseConfigKey || '').replace(/\.+$/, '');
|
|
350
|
+
if (!base || !credentialId) {
|
|
351
|
+
return base || '';
|
|
352
|
+
}
|
|
353
|
+
return `${base}.accounts.${credentialId}`;
|
|
354
|
+
};
|
|
355
|
+
/** Extract the form namespace from an oauthConnector configKey path. */
|
|
356
|
+
const namespaceFromOAuthConfigKey = configKey => {
|
|
357
|
+
const normalized = stripCredentialAccountConfigKey(configKey || '');
|
|
358
|
+
const match = /integrationSettings\.settings\.[^.]+\.([^.]+)\.oauthConnector(?:\.|$)/.exec(normalized);
|
|
359
|
+
return match?.[1] || null;
|
|
360
|
+
};
|
|
236
361
|
const seedAuthMethodDefault = seed => seed.authMethods.includes('oauth2') ? 'oauth' : seed.connectorType === 'mcp' ? 'mcp' : 'api_key';
|
|
237
362
|
/**
|
|
238
363
|
* Build a `genericType -> count` map for the given fields. Used by
|
|
@@ -270,7 +395,10 @@ const resolveFieldKey = (field, genericTypeCounts) => {
|
|
|
270
395
|
return field.name;
|
|
271
396
|
};
|
|
272
397
|
function buildPreGeneratedFormSteps(seed, namespace) {
|
|
273
|
-
|
|
398
|
+
// Shared OAuth app credentials (one client id/secret per provider).
|
|
399
|
+
const providerVaultPrefix = toVaultPrefix(seed.providerId);
|
|
400
|
+
// Per-form-instance tokens — unique namespace prevents multi-account overwrite.
|
|
401
|
+
const instanceTokenKeys = buildOAuthInstanceTokenVaultKeys(namespace);
|
|
274
402
|
const isApp = seed.connectorType === 'app';
|
|
275
403
|
const isApiKeyOnly = seedIsApiKeyOnly(seed);
|
|
276
404
|
const templateType = seedTemplateType(seed);
|
|
@@ -367,12 +495,13 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
367
495
|
useBasicAuth: seed.useBasicAuth ?? false,
|
|
368
496
|
connectorRedirectUri: '{{CLIENT_URL}}/{{CONNECTOR_ENDPOINT}}',
|
|
369
497
|
// connectorAuthMethod — present only for non-oauth connectors (matches reference forms)
|
|
370
|
-
...(
|
|
498
|
+
...(seedAuthMethodDefault(seed) !== 'oauth' ? {
|
|
371
499
|
connectorAuthMethod: seedAuthMethodDefault(seed)
|
|
372
500
|
} : {}),
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
501
|
+
// Always emitted, even empty: a template entry is self-describing only when a reader can
|
|
502
|
+
// tell "no extra provider fields" from "unknown", and the credential picker synthesizes
|
|
503
|
+
// the form from this entry instead of fetching the published form document.
|
|
504
|
+
connectorProviderFields: seed.fields,
|
|
376
505
|
...(seed.resources.length > 0 ? {
|
|
377
506
|
connectorProviderResources: seed.resources
|
|
378
507
|
} : {}),
|
|
@@ -407,7 +536,7 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
407
536
|
defaultValueSource: {
|
|
408
537
|
type: ContributeDefaultValueSourceType.Vault,
|
|
409
538
|
secretType: 'OAUTH_CLIENT',
|
|
410
|
-
secretKey: `${
|
|
539
|
+
secretKey: `${providerVaultPrefix}_CLIENT_ID`,
|
|
411
540
|
...(isApp ? {
|
|
412
541
|
requiredReference: true
|
|
413
542
|
} : {})
|
|
@@ -426,13 +555,30 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
426
555
|
defaultValueSource: {
|
|
427
556
|
type: ContributeDefaultValueSourceType.Vault,
|
|
428
557
|
secretType: 'OAUTH_CLIENT',
|
|
429
|
-
secretKey: `${
|
|
558
|
+
secretKey: `${providerVaultPrefix}_CLIENT_SECRET`,
|
|
430
559
|
...(isApp ? {
|
|
431
560
|
requiredReference: true
|
|
432
561
|
} : {})
|
|
433
562
|
}
|
|
434
563
|
}
|
|
435
|
-
}, {
|
|
564
|
+
}, ...(seed.requiresDeveloperToken ? [{
|
|
565
|
+
id: 'developerToken',
|
|
566
|
+
type: 'string',
|
|
567
|
+
label: 'Developer Token',
|
|
568
|
+
description: 'Provider-issued developer token, sent with every API request alongside the OAuth access token',
|
|
569
|
+
format: 'secret',
|
|
570
|
+
readOnly: true,
|
|
571
|
+
default: '',
|
|
572
|
+
scope: isApp ? 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */ : 1 /* ConfigurationScope.APPLICATION */,
|
|
573
|
+
schemaExtensions: {
|
|
574
|
+
defaultValueSource: {
|
|
575
|
+
type: ContributeDefaultValueSourceType.Vault,
|
|
576
|
+
secretType: 'OAUTH_CLIENT',
|
|
577
|
+
secretKey: `${providerVaultPrefix}_DEVELOPER_TOKEN`,
|
|
578
|
+
requiredReference: true
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}] : []), {
|
|
436
582
|
id: 'apiKey',
|
|
437
583
|
type: 'string',
|
|
438
584
|
label: 'API Key',
|
|
@@ -445,7 +591,7 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
445
591
|
defaultValueSource: {
|
|
446
592
|
type: ContributeDefaultValueSourceType.Vault,
|
|
447
593
|
secretType: 'API_KEY',
|
|
448
|
-
secretKey:
|
|
594
|
+
secretKey: instanceTokenKeys.apiKey
|
|
449
595
|
}
|
|
450
596
|
}
|
|
451
597
|
}, {
|
|
@@ -457,11 +603,16 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
457
603
|
default: '',
|
|
458
604
|
readOnly: true,
|
|
459
605
|
scope: 1 /* ConfigurationScope.APPLICATION */,
|
|
606
|
+
|
|
607
|
+
// No shared vault secretKey by default — multi-account connects would overwrite.
|
|
608
|
+
// Staging still needs a vault route: writeSettings discards format:secret when
|
|
609
|
+
// defaultValueSource is missing. Instance keys are the temporary staging slot;
|
|
610
|
+
// completeOAuth / sync(force) copies them into CRED_<credentialId>_*.
|
|
460
611
|
schemaExtensions: {
|
|
461
612
|
defaultValueSource: {
|
|
462
613
|
type: ContributeDefaultValueSourceType.Vault,
|
|
463
614
|
secretType: 'OAUTH_CLIENT',
|
|
464
|
-
secretKey:
|
|
615
|
+
secretKey: instanceTokenKeys.accessToken
|
|
465
616
|
}
|
|
466
617
|
}
|
|
467
618
|
}, {
|
|
@@ -477,7 +628,7 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
477
628
|
defaultValueSource: {
|
|
478
629
|
type: ContributeDefaultValueSourceType.Vault,
|
|
479
630
|
secretType: 'OAUTH_CLIENT',
|
|
480
|
-
secretKey:
|
|
631
|
+
secretKey: instanceTokenKeys.refreshToken
|
|
481
632
|
}
|
|
482
633
|
}
|
|
483
634
|
}, {
|
|
@@ -660,6 +811,12 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
660
811
|
'ui:widget': 'hidden',
|
|
661
812
|
'ui:placeholder': 'Enter OAuth Client Secret'
|
|
662
813
|
},
|
|
814
|
+
...(seed.requiresDeveloperToken ? {
|
|
815
|
+
developerToken: {
|
|
816
|
+
'ui:widget': 'hidden',
|
|
817
|
+
'ui:placeholder': 'Enter Developer Token'
|
|
818
|
+
}
|
|
819
|
+
} : {}),
|
|
663
820
|
apiKey: {
|
|
664
821
|
'ui:widget': seed.connectorType === 'mcp' || !seed.authMethods.includes('oauth2') ? 'password' : 'hidden',
|
|
665
822
|
'ui:placeholder': 'Enter API Key'
|
|
@@ -760,12 +917,13 @@ function buildPreGeneratedFormSteps(seed, namespace) {
|
|
|
760
917
|
useBasicAuth: seed.useBasicAuth ?? false,
|
|
761
918
|
connectorRedirectUri: '{{CLIENT_URL}}/{{CONNECTOR_ENDPOINT}}',
|
|
762
919
|
// connectorAuthMethod — present only for non-oauth connectors (matches reference forms)
|
|
763
|
-
...(
|
|
920
|
+
...(seedAuthMethodDefault(seed) !== 'oauth' ? {
|
|
764
921
|
connectorAuthMethod: seedAuthMethodDefault(seed)
|
|
765
922
|
} : {}),
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
923
|
+
// Always emitted, even empty: a template entry is self-describing only when a reader can
|
|
924
|
+
// tell "no extra provider fields" from "unknown", and the credential picker synthesizes
|
|
925
|
+
// the form from this entry instead of fetching the published form document.
|
|
926
|
+
connectorProviderFields: seed.fields,
|
|
769
927
|
...(seed.resources.length > 0 ? {
|
|
770
928
|
connectorProviderResources: seed.resources
|
|
771
929
|
} : {}),
|
|
@@ -792,7 +950,8 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
792
950
|
seed,
|
|
793
951
|
namespace
|
|
794
952
|
} of seedsWithNamespaces) {
|
|
795
|
-
const
|
|
953
|
+
const providerVaultPrefix = toVaultPrefix(seed.providerId);
|
|
954
|
+
const instanceTokenKeys = buildOAuthInstanceTokenVaultKeys(namespace);
|
|
796
955
|
const isApp = seed.connectorType === 'app';
|
|
797
956
|
const isApiKeyOnly = seedIsApiKeyOnly(seed);
|
|
798
957
|
const templateType = seedTemplateType(seed);
|
|
@@ -854,7 +1013,7 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
854
1013
|
defaultValueSource: {
|
|
855
1014
|
type: ContributeDefaultValueSourceType.Vault,
|
|
856
1015
|
secretType: 'OAUTH_CLIENT',
|
|
857
|
-
secretKey: `${
|
|
1016
|
+
secretKey: `${providerVaultPrefix}_CLIENT_ID`,
|
|
858
1017
|
...(isApp ? {
|
|
859
1018
|
requiredReference: true
|
|
860
1019
|
} : {})
|
|
@@ -875,7 +1034,7 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
875
1034
|
defaultValueSource: {
|
|
876
1035
|
type: ContributeDefaultValueSourceType.Vault,
|
|
877
1036
|
secretType: 'OAUTH_CLIENT',
|
|
878
|
-
secretKey: `${
|
|
1037
|
+
secretKey: `${providerVaultPrefix}_CLIENT_SECRET`,
|
|
879
1038
|
...(isApp ? {
|
|
880
1039
|
requiredReference: true
|
|
881
1040
|
} : {})
|
|
@@ -885,6 +1044,29 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
885
1044
|
'ui:description': 'OAuth application client secret',
|
|
886
1045
|
'ui:placeholder': 'Enter OAuth Client Secret'
|
|
887
1046
|
});
|
|
1047
|
+
// ── Developer token — an extra provider credential a few APIs (Google Ads)
|
|
1048
|
+
// require on every call. Provisioned exactly like clientId/clientSecret.
|
|
1049
|
+
if (seed.requiresDeveloperToken) {
|
|
1050
|
+
addField('developerToken', {
|
|
1051
|
+
type: 'string',
|
|
1052
|
+
title: 'Developer Token',
|
|
1053
|
+
description: 'Provider-issued developer token, sent with every API request alongside the OAuth access token',
|
|
1054
|
+
format: 'secret',
|
|
1055
|
+
default: '',
|
|
1056
|
+
readOnly: true,
|
|
1057
|
+
scope: isApp ? 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */ : 1 /* ConfigurationScope.APPLICATION */,
|
|
1058
|
+
defaultValueSource: {
|
|
1059
|
+
type: ContributeDefaultValueSourceType.Vault,
|
|
1060
|
+
secretType: 'OAUTH_CLIENT',
|
|
1061
|
+
secretKey: `${providerVaultPrefix}_DEVELOPER_TOKEN`,
|
|
1062
|
+
requiredReference: true
|
|
1063
|
+
}
|
|
1064
|
+
}, {
|
|
1065
|
+
'ui:widget': 'hidden',
|
|
1066
|
+
'ui:description': 'Provider-issued developer token, sent with every API request alongside the OAuth access token',
|
|
1067
|
+
'ui:placeholder': 'Enter Developer Token'
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
888
1070
|
addField('apiKey', {
|
|
889
1071
|
type: 'string',
|
|
890
1072
|
title: 'API Key',
|
|
@@ -896,7 +1078,7 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
896
1078
|
defaultValueSource: {
|
|
897
1079
|
type: ContributeDefaultValueSourceType.Vault,
|
|
898
1080
|
secretType: 'API_KEY',
|
|
899
|
-
secretKey:
|
|
1081
|
+
secretKey: instanceTokenKeys.apiKey
|
|
900
1082
|
}
|
|
901
1083
|
}, {
|
|
902
1084
|
'ui:widget': !seed.authMethods.includes('oauth2') ? 'password' : 'hidden',
|
|
@@ -912,10 +1094,13 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
912
1094
|
readOnly: true,
|
|
913
1095
|
writeOnly: true,
|
|
914
1096
|
scope: 1 /* ConfigurationScope.APPLICATION */,
|
|
1097
|
+
|
|
1098
|
+
// Staging vault route required — writeSettings drops format:secret
|
|
1099
|
+
// without defaultValueSource. Durable isolation is CRED_* via sync.
|
|
915
1100
|
defaultValueSource: {
|
|
916
1101
|
type: ContributeDefaultValueSourceType.Vault,
|
|
917
1102
|
secretType: 'OAUTH_CLIENT',
|
|
918
|
-
secretKey:
|
|
1103
|
+
secretKey: instanceTokenKeys.accessToken
|
|
919
1104
|
}
|
|
920
1105
|
}, {
|
|
921
1106
|
'ui:widget': 'hidden'
|
|
@@ -932,7 +1117,7 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
932
1117
|
defaultValueSource: {
|
|
933
1118
|
type: ContributeDefaultValueSourceType.Vault,
|
|
934
1119
|
secretType: 'OAUTH_CLIENT',
|
|
935
|
-
secretKey:
|
|
1120
|
+
secretKey: instanceTokenKeys.refreshToken
|
|
936
1121
|
}
|
|
937
1122
|
}, {
|
|
938
1123
|
'ui:widget': 'hidden'
|
|
@@ -1039,6 +1224,18 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
1039
1224
|
}, {
|
|
1040
1225
|
'ui:widget': 'hidden'
|
|
1041
1226
|
});
|
|
1227
|
+
// Without this key in the registry the connect flow cannot see the catalog's
|
|
1228
|
+
// usePKCE, and both the widget and readOAuthConfigFromRegistry fall back to
|
|
1229
|
+
// PKCE-on — silently ignoring every `usePKCE: false` in the catalog.
|
|
1230
|
+
addField('usePKCE', {
|
|
1231
|
+
type: 'boolean',
|
|
1232
|
+
title: 'Use PKCE',
|
|
1233
|
+
default: seed.usePKCE !== false,
|
|
1234
|
+
readOnly: true,
|
|
1235
|
+
scope: 2 /* ConfigurationScope.MACHINE */
|
|
1236
|
+
}, {
|
|
1237
|
+
'ui:widget': 'hidden'
|
|
1238
|
+
});
|
|
1042
1239
|
if (seed.clientAuthMethod) {
|
|
1043
1240
|
addField('clientAuthMethod', {
|
|
1044
1241
|
type: 'string',
|
|
@@ -1050,6 +1247,41 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
1050
1247
|
'ui:widget': 'hidden'
|
|
1051
1248
|
});
|
|
1052
1249
|
}
|
|
1250
|
+
if (seed.clientIdParamName) {
|
|
1251
|
+
addField('clientIdParamName', {
|
|
1252
|
+
type: 'string',
|
|
1253
|
+
title: 'Client ID Parameter Name',
|
|
1254
|
+
default: seed.clientIdParamName,
|
|
1255
|
+
readOnly: true,
|
|
1256
|
+
scope: 2 /* ConfigurationScope.MACHINE */
|
|
1257
|
+
}, {
|
|
1258
|
+
'ui:widget': 'hidden'
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
if (seed.useCommaSeparatedScopes) {
|
|
1262
|
+
addField('useCommaSeparatedScopes', {
|
|
1263
|
+
type: 'boolean',
|
|
1264
|
+
title: 'Use Comma-Separated Scopes',
|
|
1265
|
+
default: true,
|
|
1266
|
+
readOnly: true,
|
|
1267
|
+
scope: 2 /* ConfigurationScope.MACHINE */
|
|
1268
|
+
}, {
|
|
1269
|
+
'ui:widget': 'hidden'
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
if (seed.tokenEndpointHeaders && Object.keys(seed.tokenEndpointHeaders).length > 0) {
|
|
1273
|
+
// Stored as a JSON string: the OAuth service reads it with one prefix read and
|
|
1274
|
+
// resolves its `{{KEY}}` templates the same way it does the OAuth URLs.
|
|
1275
|
+
addField('tokenEndpointHeaders', {
|
|
1276
|
+
type: 'string',
|
|
1277
|
+
title: 'Token Endpoint Headers',
|
|
1278
|
+
default: JSON.stringify(seed.tokenEndpointHeaders),
|
|
1279
|
+
readOnly: true,
|
|
1280
|
+
scope: 2 /* ConfigurationScope.MACHINE */
|
|
1281
|
+
}, {
|
|
1282
|
+
'ui:widget': 'hidden'
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1053
1285
|
addField('redirectUri', {
|
|
1054
1286
|
type: 'string',
|
|
1055
1287
|
title: 'Redirect URI',
|
|
@@ -1286,15 +1518,24 @@ function buildOAuthConfigurationContribution(seedsWithNamespaces) {
|
|
|
1286
1518
|
properties: formUIProperties
|
|
1287
1519
|
}];
|
|
1288
1520
|
}
|
|
1289
|
-
function generateFromSeeds(seeds, title, formIcon, formExtensionId) {
|
|
1521
|
+
function generateFromSeeds(seeds, title, formIcon, formExtensionId, options = {}) {
|
|
1290
1522
|
const allNodes = [];
|
|
1291
1523
|
const mergedUiLayoutTemplates = {};
|
|
1292
1524
|
const mergedUiLayoutUi = {};
|
|
1293
1525
|
let uiLayoutFormMetadataNode = null;
|
|
1294
1526
|
const seedsWithNamespaces = [];
|
|
1295
1527
|
seeds.forEach((seed, idx) => {
|
|
1296
|
-
|
|
1297
|
-
|
|
1528
|
+
// The namespace doubles as the formId AND flows into every configuration key
|
|
1529
|
+
// (`integrationSettings.settings.<type>.<ns>.oauthConnector…`). An explicit
|
|
1530
|
+
// namespace lets a caller regenerate the form for an ALREADY-PUBLISHED template
|
|
1531
|
+
// so the output is identity-compatible with it (same formId, same config keys);
|
|
1532
|
+
// the random default is only safe for brand-new forms.
|
|
1533
|
+
const generatedFormId = options.namespaces?.[idx] || `${sanitizeFieldKey(seed.providerId)}-${seed.connectorType}-${Math.random().toString(36).substring(2, 10)}`;
|
|
1534
|
+
// The connector's own title, with no `(APP)` marker appended. `connectorType` is
|
|
1535
|
+
// `app` for every one of the 1166 catalog connectors, so the suffix carried no
|
|
1536
|
+
// information - it just made every row in the credential picker read "… (APP)".
|
|
1537
|
+
// The type is still contributed as `connectorType` for anything that needs it.
|
|
1538
|
+
const providerTitle = seed.title;
|
|
1298
1539
|
const namespace = generatedFormId;
|
|
1299
1540
|
seedsWithNamespaces.push({
|
|
1300
1541
|
seed,
|
|
@@ -1574,8 +1815,8 @@ function generateFromSeeds(seeds, title, formIcon, formExtensionId) {
|
|
|
1574
1815
|
if (!uiLayoutFormMetadataNode) return allNodes;
|
|
1575
1816
|
return [...allNodes, uiLayoutFormMetadataNode, uiLayoutFormNode, uiLayoutFormUINode];
|
|
1576
1817
|
}
|
|
1577
|
-
function createOAuthSeedGenerator(seeds) {
|
|
1578
|
-
return (title = '', formIcon = '', formExtensionId = '') => generateFromSeeds(seeds, title, formIcon, formExtensionId);
|
|
1818
|
+
function createOAuthSeedGenerator(seeds, options = {}) {
|
|
1819
|
+
return (title = '', formIcon = '', formExtensionId = '') => generateFromSeeds(seeds, title, formIcon, formExtensionId, options);
|
|
1579
1820
|
}
|
|
1580
1821
|
// create provider refs
|
|
1581
1822
|
const findRefPath = node => {
|
|
@@ -1633,4 +1874,4 @@ const buildMetadataSchema = sampleNodes => {
|
|
|
1633
1874
|
configurationNodes: entry.configurationNodes,
|
|
1634
1875
|
contributes: {}
|
|
1635
1876
|
}))];
|
|
1636
|
-
};export{buildMetadataSchema,buildProviderConfig,buildProviderSeedFromConfig,buildProviderWithRefs,createOAuthSeedGenerator};//# sourceMappingURL=authMetaDataSchema.js.map
|
|
1877
|
+
};export{buildCredentialOAuthConfigKey,buildCredentialOAuthTokenVaultKeys,buildCredentialScopedSecretKey,buildMetadataSchema,buildNamespaceCredentialOAuthTokenVaultKeys,buildOAuthInstanceTokenVaultKeys,buildProviderConfig,buildProviderCredentialOAuthTokenVaultKeys,buildProviderSeedFromConfig,buildProviderWithRefs,createOAuthSeedGenerator,credentialIdFromOAuthConfigKey,credentialIdFromScopedSecretKey,isCredentialAccountConfigKey,isCredentialScopedSecretKey,namespaceFromOAuthConfigKey,stripCredentialAccountConfigKey,stripCredentialScopedSecretKey,toVaultPrefix};//# sourceMappingURL=authMetaDataSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authMetaDataSchema.js","sources":["../../src/utils/authMetaDataSchema.ts"],"sourcesContent":[null],"names":[],"mappings":"6NAeA,
|
|
1
|
+
{"version":3,"file":"authMetaDataSchema.js","sources":["../../src/utils/authMetaDataSchema.ts"],"sourcesContent":[null],"names":[],"mappings":"6NAeA,MAAM,WAAW,GAAA,GAAA,IAAA,GAAA,CAAA,KAAA,CAAoB,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,EAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA;MACjC,eAAY,GAAA,GAAA,IAAA;MACZ,KAAA,CAAA,WAAmB,CAAA,EAAA,OAAA,GAAA;MACnB,GAAK,SAAS,IAAA,GAAA,KAAA,SAAA,EAAA,OAAA,EAAA;MACd,OAAA,GAAW,aAAS,EAAA,OAAA,EAAA;MACpB,CAAA,GAAM,CAAA,IAAE,EAAA,EAAM,OAAG,EAAA;MACjB;IACA,MAAA,MAAA,GAAA,IAAA,CAAA,KAAwB,CAAE,GAAA,CAAA;IAC1B,OAAO,KAAG,CAAA,OAAQ,CAAA,MAAA,CAAA,GAAA,MAAA,GAAA,EAAA;AAClB,EAAA,CAAA,CAAA,OAAA,CAAA,EAAA;IACA,OAAA,GAAA,CAAA,KAAA,CAAiB,IAAG,CAAA,CAAA,GAAM,CAAC,IAAA,IAAA,IAAA,CAAA,IAAA,EAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CA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;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -61,6 +61,9 @@ export declare function extractTemplateUserFields(node: unknown, refs?: Set<stri
|
|
|
61
61
|
* A string that is exactly one placeholder is replaced with the raw typed value; placeholders
|
|
62
62
|
* embedded in a longer string are interpolated. Everything else (including workflow-native
|
|
63
63
|
* {{...}} expressions) passes through untouched.
|
|
64
|
+
*
|
|
65
|
+
* Values that the template never references are appended to the resolved root object so callers
|
|
66
|
+
* still receive them; template-authored keys always win over a same-named extra value.
|
|
64
67
|
*/
|
|
65
68
|
export declare function resolveInputTemplate(node: unknown, values: Record<string, unknown>): unknown;
|
|
66
69
|
export declare function buildParamBindings(action: ActionBinding): Record<string, string>;
|
|
@@ -75,6 +78,17 @@ export interface IntegrationMenusContributes {
|
|
|
75
78
|
commandPalette: IntegrationMenuEntry[];
|
|
76
79
|
}
|
|
77
80
|
export declare function buildMenusFromCommands(commands: IntegrationCommand[]): IntegrationMenusContributes;
|
|
81
|
+
export interface IntegrationConfigurationIdentity {
|
|
82
|
+
title?: string;
|
|
83
|
+
formId: string;
|
|
84
|
+
/** Identifies this template independently of formId — generated fresh if not supplied. */
|
|
85
|
+
formTemplateId?: string;
|
|
86
|
+
formExtensionId?: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
projectType?: string;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
}
|
|
91
|
+
export declare function buildIntegrationConfigurationContribution(userFields: Record<string, UserFieldDef>, slug: string, identity?: IntegrationConfigurationIdentity): Record<string, unknown>[];
|
|
78
92
|
export declare function extractUserFieldsFromStepperFormMetadata(metadataSchema: MetadataSchemaEntry[], stepKey?: string): Record<string, UserFieldDef>;
|
|
79
93
|
export {};
|
|
80
94
|
//# sourceMappingURL=integrationCommands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationCommands.d.ts","sourceRoot":"","sources":["../../src/utils/integrationCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integr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,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,2BAA2B,CASlG;AAED,MAAM,WAAW,gCAAgC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,yCAAyC,CACrD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,gCAAgC,GAC5C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CA+E3B;AAED,wBAAgB,wCAAwC,CACpD,cAAc,EAAE,mBAAmB,EAAE,EACrC,OAAO,SAAe,GACvB,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAe9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function normalizeWorkflowSelection(workflow) {
|
|
1
|
+
import {v4}from'uuid';function normalizeWorkflowSelection(workflow) {
|
|
2
2
|
if (!workflow) return {};
|
|
3
3
|
if (typeof workflow === 'string') {
|
|
4
4
|
try {
|
|
@@ -30,24 +30,37 @@ function extractTemplateUserFields(node, refs = new Set()) {
|
|
|
30
30
|
}
|
|
31
31
|
return [...refs];
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
* Fills {{$user.<key>}} placeholders with end-user values by walking the parsed template.
|
|
35
|
-
* A string that is exactly one placeholder is replaced with the raw typed value; placeholders
|
|
36
|
-
* embedded in a longer string are interpolated. Everything else (including workflow-native
|
|
37
|
-
* {{...}} expressions) passes through untouched.
|
|
38
|
-
*/
|
|
39
|
-
function resolveInputTemplate(node, values) {
|
|
33
|
+
function fillTemplateNode(node, values) {
|
|
40
34
|
if (typeof node === 'string') {
|
|
41
35
|
const full = FULL_USER_REF.exec(node);
|
|
42
36
|
if (full) return values[full[1]];
|
|
43
37
|
return node.replace(USER_REF, (_, key) => String(values[key] ?? ''));
|
|
44
38
|
}
|
|
45
|
-
if (Array.isArray(node)) return node.map(item =>
|
|
39
|
+
if (Array.isArray(node)) return node.map(item => fillTemplateNode(item, values));
|
|
46
40
|
if (node && typeof node === 'object') {
|
|
47
|
-
return Object.fromEntries(Object.entries(node).map(([key, value]) => [key,
|
|
41
|
+
return Object.fromEntries(Object.entries(node).map(([key, value]) => [key, fillTemplateNode(value, values)]));
|
|
48
42
|
}
|
|
49
43
|
return node;
|
|
50
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Fills {{$user.<key>}} placeholders with end-user values by walking the parsed template.
|
|
47
|
+
* A string that is exactly one placeholder is replaced with the raw typed value; placeholders
|
|
48
|
+
* embedded in a longer string are interpolated. Everything else (including workflow-native
|
|
49
|
+
* {{...}} expressions) passes through untouched.
|
|
50
|
+
*
|
|
51
|
+
* Values that the template never references are appended to the resolved root object so callers
|
|
52
|
+
* still receive them; template-authored keys always win over a same-named extra value.
|
|
53
|
+
*/
|
|
54
|
+
function resolveInputTemplate(node, values) {
|
|
55
|
+
const resolved = fillTemplateNode(node, values);
|
|
56
|
+
if (!resolved || typeof resolved !== 'object' || Array.isArray(resolved)) return resolved;
|
|
57
|
+
const referenced = new Set(extractTemplateUserFields(node));
|
|
58
|
+
const extras = Object.entries(values).filter(([key]) => !referenced.has(key) && !(key in resolved));
|
|
59
|
+
return extras.length ? {
|
|
60
|
+
...resolved,
|
|
61
|
+
...Object.fromEntries(extras)
|
|
62
|
+
} : resolved;
|
|
63
|
+
}
|
|
51
64
|
function buildParamBindings(action) {
|
|
52
65
|
const map = {};
|
|
53
66
|
(action.fieldBindings || []).forEach(binding => {
|
|
@@ -118,6 +131,105 @@ function buildMenusFromCommands(commands) {
|
|
|
118
131
|
}))
|
|
119
132
|
};
|
|
120
133
|
}
|
|
134
|
+
function buildIntegrationConfigurationContribution(userFields, slug, identity) {
|
|
135
|
+
const formProperties = {
|
|
136
|
+
required: []
|
|
137
|
+
};
|
|
138
|
+
const formUIProperties = {};
|
|
139
|
+
const basePath = `integrationSettings.settings.integrationWorkflow.${slug}`;
|
|
140
|
+
const metaPaths = new Set();
|
|
141
|
+
const baseParts = basePath.split('.');
|
|
142
|
+
for (let i = 1; i <= baseParts.length; i++) {
|
|
143
|
+
metaPaths.add(baseParts.slice(0, i).join('.'));
|
|
144
|
+
}
|
|
145
|
+
Array.from(metaPaths).sort().forEach(path => {
|
|
146
|
+
const parts = path.split('.');
|
|
147
|
+
formProperties[`${path}.meta`] = {
|
|
148
|
+
title: parts[parts.length - 1],
|
|
149
|
+
description: '',
|
|
150
|
+
type: 'object',
|
|
151
|
+
position: 0
|
|
152
|
+
};
|
|
153
|
+
formProperties[`${path}.required`] = [];
|
|
154
|
+
});
|
|
155
|
+
if (identity) {
|
|
156
|
+
formProperties[`${basePath}.title`] = {
|
|
157
|
+
type: 'string',
|
|
158
|
+
title: 'title',
|
|
159
|
+
default: identity.title || ''
|
|
160
|
+
};
|
|
161
|
+
formProperties[`${basePath}.description`] = {
|
|
162
|
+
type: 'string',
|
|
163
|
+
title: 'description',
|
|
164
|
+
default: identity.description || ''
|
|
165
|
+
};
|
|
166
|
+
formProperties[`${basePath}.projectType`] = {
|
|
167
|
+
type: 'string',
|
|
168
|
+
title: 'projectType',
|
|
169
|
+
default: identity.projectType || 'Integration'
|
|
170
|
+
};
|
|
171
|
+
formProperties[`${basePath}.tags`] = {
|
|
172
|
+
type: 'array',
|
|
173
|
+
title: 'tags',
|
|
174
|
+
items: {
|
|
175
|
+
type: 'string'
|
|
176
|
+
},
|
|
177
|
+
uniqueItems: true,
|
|
178
|
+
default: identity.tags || ['integration']
|
|
179
|
+
};
|
|
180
|
+
formProperties[`${basePath}.formId`] = {
|
|
181
|
+
type: 'string',
|
|
182
|
+
title: 'formId',
|
|
183
|
+
default: identity.formId,
|
|
184
|
+
readOnly: true
|
|
185
|
+
};
|
|
186
|
+
formProperties[`${basePath}.formTemplateId`] = {
|
|
187
|
+
type: 'string',
|
|
188
|
+
title: 'formTemplateId',
|
|
189
|
+
default: identity.formTemplateId || v4(),
|
|
190
|
+
readOnly: true
|
|
191
|
+
};
|
|
192
|
+
formProperties[`${basePath}.formExtensionId`] = {
|
|
193
|
+
type: 'string',
|
|
194
|
+
title: 'formExtensionId',
|
|
195
|
+
default: identity.formExtensionId || '',
|
|
196
|
+
readOnly: true
|
|
197
|
+
};
|
|
198
|
+
formUIProperties[`${basePath}.formId`] = {
|
|
199
|
+
'ui:readonly': true
|
|
200
|
+
};
|
|
201
|
+
formUIProperties[`${basePath}.formTemplateId`] = {
|
|
202
|
+
'ui:readonly': true
|
|
203
|
+
};
|
|
204
|
+
formUIProperties[`${basePath}.formExtensionId`] = {
|
|
205
|
+
'ui:readonly': true
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
Object.entries(userFields).forEach(([key, def]) => {
|
|
209
|
+
formProperties[`${basePath}.${key}`] = {
|
|
210
|
+
type: def.type || 'string',
|
|
211
|
+
title: def.title || key,
|
|
212
|
+
...(def.format ? {
|
|
213
|
+
format: def.format
|
|
214
|
+
} : {}),
|
|
215
|
+
...(Array.isArray(def.enum) ? {
|
|
216
|
+
enum: def.enum
|
|
217
|
+
} : {})
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
return [{
|
|
221
|
+
type: 'form-metadata',
|
|
222
|
+
properties: {
|
|
223
|
+
schemaId: 'configuration'
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
type: 'form',
|
|
227
|
+
properties: formProperties
|
|
228
|
+
}, {
|
|
229
|
+
type: 'formUI',
|
|
230
|
+
properties: formUIProperties
|
|
231
|
+
}];
|
|
232
|
+
}
|
|
121
233
|
function extractUserFieldsFromStepperFormMetadata(metadataSchema, stepKey = 'userFields') {
|
|
122
234
|
const result = {};
|
|
123
235
|
const stepper = (metadataSchema || []).find(entry => entry?.schemaId === 'stepper-form');
|
|
@@ -138,4 +250,4 @@ function extractUserFieldsFromStepperFormMetadata(metadataSchema, stepKey = 'use
|
|
|
138
250
|
};
|
|
139
251
|
});
|
|
140
252
|
return result;
|
|
141
|
-
}export{buildCommandsFromActions,buildMenusFromCommands,buildParamBindings,extractTemplateUserFields,extractUserFieldsFromStepperFormMetadata,parseInputTemplate,resolveInputTemplate};//# sourceMappingURL=integrationCommands.js.map
|
|
253
|
+
}export{buildCommandsFromActions,buildIntegrationConfigurationContribution,buildMenusFromCommands,buildParamBindings,extractTemplateUserFields,extractUserFieldsFromStepperFormMetadata,parseInputTemplate,resolveInputTemplate};//# sourceMappingURL=integrationCommands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationCommands.js","sources":["../../src/utils/integrationCommands.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integrationCommands.js","sources":["../../src/utils/integrationCommands.ts"],"sourcesContent":[null],"names":[],"mappings":"sBAIA,mCAAiB,CAAA,QAA2B,EAAA;MACxC,CAAA,UAAa,OAAA,EAAA;AACb,EAAA,IAAA,OAAQ,QAAA,KAAA,QAAA,EAAA;QAAE;aAAc,IAAA,CAAA,KAAc,CAAA,QAAO,CAAA;AAAC,IAAA,CAAA,CAAA,OAAI,CAAE,EAAA;MAAmB,OAAA,EAAA;AAC1E,IAAA;AAED,EAAA;SACQ;;MAEJ,QAAA,GAAY,4BAAS;MACrB,aAAe,GAAC,6BAAA;AAChB,SAAA,kBAA8B,CAAA,GAAA,EAAM;MACpC,CAAA,GAAA,EAAA,IAAA,EAAA,EAAA,OAAA,SAAA;MACA;AACH,IAAA,OAAA,IAAA,CAAA,KAAA,CAAA,GAAA,CAAA;AAED,EAAA,CAAA,CAAA;IACI,OAAO,SAAS;;;;AAIhB,SAAY,yBAAA,CAAA,IAA8B,EAAA,IAAA,GAAA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A,cAAiB,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,MAA2B;IACxC,MAAA,QAAc,GAAE,0BAAuB,CAAA,MAAA,CAAA,QAAA,CAAA;AAC1C,IAAA,MAAA,aAAA,GAAA,kBAAA,CAAA,MAAA,CAAA,aAAA,CAAA;AAED;AAWA,IAAA,kBAAiB,GAAA,aAAA,GAAA,yBAAgC,CAAA,aAAA,CAAA,CAAA,GAAA,CAAA,KAAA,KAAA;MAC7C,IAAM,EAAE,KAAA;MACR;KACA,CAAA,CAAA,GAAA,CAAA,MAAA,CAAA,aAAA,IAAA,EAAA,EAAA,MAAA,CAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,SAAA,IAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,KAAA;MACA,IAAA,EAAA,CAAA,CAAA,SAAiB,IAAM,CAAC,CAAA,SAAA;MACxB,SAAA,EAAA,CAAA,CAAe;KACf,CAAA,CAAA;IACA,MAAA,UAAc,GAAA,YAAO,CAAA,GAAA,CAAA,CAAA;AACrB,MAAA,IAAK;AACR,MAAA;AAED,KAAA,KAAA;AAqFA,MAAA,MAAA,MAAA,GAAA,6CACI,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminide-stack/form-builder-core",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.9-alpha.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,12 +19,11 @@
|
|
|
19
19
|
"watch": "npm run build:lib:watch"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"
|
|
23
|
-
"common": "5.1.8-alpha.98",
|
|
22
|
+
"common": "5.1.9-alpha.2",
|
|
24
23
|
"typescript": "^5.4.0"
|
|
25
24
|
},
|
|
26
25
|
"publishConfig": {
|
|
27
26
|
"access": "public"
|
|
28
27
|
},
|
|
29
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "94eab21e670ae0821b1bbb3838073ed04cb594ac"
|
|
30
29
|
}
|