@adminide-stack/form-builder-core 5.1.4-alpha.241 → 5.1.4-alpha.253

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Shared API configuration types.
3
+ *
4
+ * These types define the structure for API-key form fields, resources (REST API
5
+ * test endpoints), and custom buttons (e.g. "Test token"). They are used by
6
+ * ConnectorConfig when a connector supports API-key authentication.
7
+ *
8
+ * Originally defined in form-builder-browser; moved here so core can reference
9
+ * them without depending on the browser package.
10
+ */
11
+ export interface FieldSecretSource {
12
+ type: 'vault';
13
+ secretType: 'API_KEY' | 'OAUTH_CLIENT' | 'ENVIRONMENT_VAR';
14
+ secretKey: string;
15
+ }
16
+ export type FieldType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
17
+ export type UiWidget = 'text' | 'password' | 'hidden' | 'textarea' | 'select' | 'switch' | 'resourceSelect' | 'chips' | 'LabelWidget';
18
+ export interface FormFieldConfig {
19
+ name: string;
20
+ label: string;
21
+ type: FieldType;
22
+ placeholder: string;
23
+ description: string;
24
+ required: boolean;
25
+ defaultValue: string | number | boolean | null;
26
+ isConfigField: boolean;
27
+ isSecret: boolean;
28
+ secretSource: FieldSecretSource | null;
29
+ uiWidget: UiWidget;
30
+ enumValues: Array<{
31
+ value: string;
32
+ label: string;
33
+ }>;
34
+ readOnly: boolean;
35
+ iconType: string;
36
+ }
37
+ export type ResourceSourceType = 'jsCode' | 'graphql' | 'rest-api';
38
+ export interface GraphQLResourceConfig {
39
+ query: string;
40
+ useInternalLink: boolean;
41
+ transformResults: string;
42
+ variables: Record<string, any>;
43
+ }
44
+ export interface JsCodeResourceConfig {
45
+ query: string;
46
+ transformResults: string;
47
+ }
48
+ export interface RestApiHeader {
49
+ key: string;
50
+ value: string;
51
+ }
52
+ export interface RestApiBodyData {
53
+ key: string;
54
+ value: string;
55
+ }
56
+ export interface RestApiResourceConfig {
57
+ httpMethod: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
58
+ url: string;
59
+ urlParams: Array<{
60
+ key: string;
61
+ value: string;
62
+ }>;
63
+ headers: RestApiHeader[];
64
+ body: {
65
+ format: 'JSON' | 'form-data' | 'Raw';
66
+ data: RestApiBodyData[];
67
+ rawData: string;
68
+ };
69
+ cookies: Array<{
70
+ key: string;
71
+ value: string;
72
+ }>;
73
+ runBehavior: 'automatic' | 'manual';
74
+ transformResults: string;
75
+ }
76
+ export interface FormResourceConfig {
77
+ name: string;
78
+ label: string;
79
+ type: ResourceSourceType;
80
+ config: {
81
+ graphql?: GraphQLResourceConfig;
82
+ jsCode?: JsCodeResourceConfig;
83
+ restApi?: RestApiResourceConfig;
84
+ };
85
+ }
86
+ export type ButtonAction = 'trigger-resource' | 'trigger-inngest' | 'submit';
87
+ export interface CustomButtonConfig {
88
+ id: string;
89
+ title: string;
90
+ action: ButtonAction;
91
+ resourceId: string;
92
+ inngestId: string;
93
+ }
94
+ //# sourceMappingURL=apiConfigTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiConfigTypes.d.ts","sourceRoot":"","sources":["../../src/config/apiConfigTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,SAAS,GAAG,cAAc,GAAG,iBAAiB,CAAC;IAC3D,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzF,MAAM,MAAM,QAAQ,GACd,MAAM,GACN,UAAU,GACV,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,OAAO,GACP,aAAa,CAAC;AAEpB,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,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,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,IAAI,EAAE;QACF,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;QACrC,IAAI,EAAE,eAAe,EAAE,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,WAAW,EAAE,WAAW,GAAG,QAAQ,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,EAAE;QACJ,OAAO,CAAC,EAAE,qBAAqB,CAAC;QAChC,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B,OAAO,CAAC,EAAE,qBAAqB,CAAC;KACnC,CAAC;CACL;AAMD,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,QAAQ,CAAC;AAE7E,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -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;;;;;;;;;;;;;"}
@@ -7,7 +7,12 @@
7
7
  *
8
8
  * Keep this as the single source of truth so ids, provider URLs, scopes, etc.
9
9
  * never drift between packages.
10
+ *
11
+ * Auto-generated from TrustClaw/Composio connector catalog + commonApiConfig.
12
+ * Hand-curated entries are at the top; auto-generated entries follow.
10
13
  */
14
+ import type { CustomButtonConfig, FormFieldConfig, FormResourceConfig } from './apiConfigTypes';
15
+ export type { CustomButtonConfig, FormFieldConfig, FormResourceConfig } from './apiConfigTypes';
11
16
  export interface ConnectorConfig {
12
17
  id: string;
13
18
  title: string;
@@ -20,12 +25,24 @@ export interface ConnectorConfig {
20
25
  fontSize?: string;
21
26
  };
22
27
  };
28
+ /** Logo URL from Composio */
29
+ logo?: string;
23
30
  color?: string;
24
31
  enabled: boolean;
25
32
  /** Default OAuth scopes for this provider */
26
33
  scopes?: string[];
27
34
  /** MCP endpoint (if the provider supports MCP auth) */
28
35
  mcpUrl?: string;
36
+ /** Authentication methods supported by this connector */
37
+ authMethods?: string[];
38
+ /** Connector categories */
39
+ categories?: string[];
40
+ /** Form fields for API-key configuration (when api_key auth is selected) */
41
+ fields?: FormFieldConfig[];
42
+ /** REST API resources for credential testing (e.g. "Test token" button) */
43
+ resources?: FormResourceConfig[];
44
+ /** Custom action buttons (e.g. "Test token", "Test connection") */
45
+ customButtons?: CustomButtonConfig[];
29
46
  }
30
47
  export declare const connectorsConfig: ConnectorConfig[];
31
48
  //# sourceMappingURL=connectorsConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectorsConfig.d.ts","sourceRoot":"","sources":["../../src/config/connectorsConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACjC,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAmJ7C,CAAC"}
1
+ {"version":3,"file":"connectorsConfig.d.ts","sourceRoot":"","sources":["../../src/config/connectorsConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAA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