@superblocksteam/shared 0.9546.8 → 0.9547.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/socket/protocol.d.ts +10 -1
  2. package/dist/socket/protocol.d.ts.map +1 -1
  3. package/dist/socket/protocol.js.map +1 -1
  4. package/dist/types/datasource/auth.d.ts +7 -1
  5. package/dist/types/datasource/auth.d.ts.map +1 -1
  6. package/dist/types/datasource/auth.js +21 -1
  7. package/dist/types/datasource/auth.js.map +1 -1
  8. package/dist/types/datasource/index.d.ts +14 -0
  9. package/dist/types/datasource/index.d.ts.map +1 -1
  10. package/dist/types/datasource/index.js +36 -2
  11. package/dist/types/datasource/index.js.map +1 -1
  12. package/dist/types/datasource/index.test.d.ts +2 -0
  13. package/dist/types/datasource/index.test.d.ts.map +1 -0
  14. package/dist/types/datasource/index.test.js +421 -0
  15. package/dist/types/datasource/index.test.js.map +1 -0
  16. package/dist/types/lock/index.d.ts +8 -0
  17. package/dist/types/lock/index.d.ts.map +1 -1
  18. package/dist/types/plugin/integration.d.ts +2 -1
  19. package/dist/types/plugin/integration.d.ts.map +1 -1
  20. package/dist/types/plugin/integration.js +3 -1
  21. package/dist/types/plugin/integration.js.map +1 -1
  22. package/dist-esm/socket/protocol.d.ts +10 -1
  23. package/dist-esm/socket/protocol.d.ts.map +1 -1
  24. package/dist-esm/socket/protocol.js.map +1 -1
  25. package/dist-esm/types/datasource/auth.d.ts +7 -1
  26. package/dist-esm/types/datasource/auth.d.ts.map +1 -1
  27. package/dist-esm/types/datasource/auth.js +20 -0
  28. package/dist-esm/types/datasource/auth.js.map +1 -1
  29. package/dist-esm/types/datasource/index.d.ts +14 -0
  30. package/dist-esm/types/datasource/index.d.ts.map +1 -1
  31. package/dist-esm/types/datasource/index.js +33 -1
  32. package/dist-esm/types/datasource/index.js.map +1 -1
  33. package/dist-esm/types/datasource/index.test.d.ts +2 -0
  34. package/dist-esm/types/datasource/index.test.d.ts.map +1 -0
  35. package/dist-esm/types/datasource/index.test.js +419 -0
  36. package/dist-esm/types/datasource/index.test.js.map +1 -0
  37. package/dist-esm/types/lock/index.d.ts +8 -0
  38. package/dist-esm/types/lock/index.d.ts.map +1 -1
  39. package/dist-esm/types/plugin/integration.d.ts +2 -1
  40. package/dist-esm/types/plugin/integration.d.ts.map +1 -1
  41. package/dist-esm/types/plugin/integration.js +3 -1
  42. package/dist-esm/types/plugin/integration.js.map +1 -1
  43. package/package.json +1 -1
  44. package/src/socket/protocol.ts +3 -0
  45. package/src/types/datasource/auth.ts +21 -1
  46. package/src/types/datasource/index.test.ts +499 -0
  47. package/src/types/datasource/index.ts +45 -1
  48. package/src/types/lock/index.ts +9 -0
  49. package/src/types/plugin/integration.ts +4 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/types/datasource/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAEL,+BAA+B,EAC/B,kDAAkD,EAClD,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,IAAI,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAChE,MAAM,MAAM,GAA4B;YACtC,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,aAAa;gBACvB,YAAY,EAAE,aAAa;aAC5B;YACD,QAAQ,EAAE,mBAAmB,CAAC,WAAW;SAC1C,CAAC;QAEF,MAAM,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACtE,MAAM,MAAM,GAA4B;YACtC,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,aAAa;gBAC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,CAAC,CAAC;IAEH,IAAI,CAAC,6EAA6E,EAAE,GAAG,EAAE;QACvF,MAAM,MAAM,GAA4B;YACtC,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,aAAa;gBACvB,YAAY,EAAE,aAAa;aAC5B;YACD,aAAa,EAAE,gBAAgB;YAC/B,cAAc,EAAE,SAAS;SAC1B,CAAC;QAEF,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;QAC1D,MAAM,MAAM,GAA4B;YACtC,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,aAAa;gBACvB,YAAY,EAAE,aAAa;aAC5B;YACD,QAAQ,EAAE,mBAAmB,CAAC,WAAW;YACzC,aAAa,EAAE,gBAAgB;YAC/B,cAAc,EAAE,QAAQ;SACzB,CAAC;QAEF,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -10,4 +10,12 @@ export interface AppBranchLock {
10
10
  export interface GetAppBranchLockResponseBody {
11
11
  appBranchLock: AppBranchLock[];
12
12
  }
13
+ export interface LockInfo {
14
+ isUserActive: boolean;
15
+ ownerEmail: string;
16
+ ownerName: string;
17
+ lockLifetimeMs: number;
18
+ timeSinceLastActivityMs: number | null;
19
+ canForceTakeover: boolean;
20
+ }
13
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/lock/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,IAAI,CAAC;IACxB,mBAAmB,EAAE,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,aAAa,EAAE,CAAC;CAChC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/lock/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,IAAI,CAAC;IACxB,mBAAmB,EAAE,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,aAAa,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,QAAQ;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;CAC3B"}
@@ -43,7 +43,8 @@ export declare enum ExtendedIntegrationPluginId {
43
43
  GEMINI = "gemini",
44
44
  OPENAI_V2 = "openai_v2",
45
45
  GOOGLE_SHEETS_PLUGIN_ID = "gsheets",
46
- SNOWFLAKE = "snowflake"
46
+ SNOWFLAKE = "snowflake",
47
+ DATABRICKS = "databricks"
47
48
  }
48
49
  export declare const ExtendedIntegrationPluginMap: Record<string, string>;
49
50
  export declare const EXTENDED_INTEGRATION_PLUGIN_IDS: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"A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AAEF,eAAO,MAAM,+BAA+B,yBAAoB,OAE/D,CAAC;AAEF,eAAO,MAAM,8BAA8B,yBAAoB,OAM9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAAoB,OAMvD,CAAC"}
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,2BAA2B,QAA2C,CAAC;AACpF,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,kCAAkC,sCAAsC,CAAC;AAEtF,oBAAY,2BAA2B;IACrC,OAAO,uBAAuB;IAC9B,QAAQ,uBAAuB;IAE/B,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,YAAY,gBAAgB;IAC5B,gBAAgB,oBAAoB;IACpC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IAEvB,uBAAuB,YAAY;IACnC,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAID,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwC/D,CAAC;AAEF,eAAO,MAAM,+BAA+B,UAAyE,CAAC;AAEtH,eAAO,MAAM,+BAA+B,yBAAoB,OAE/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,yBAAoB,OAElD,CAAC;AAQF,eAAO,MAAM,eAAe,yBAAoB,MAE/C,CAAC;AAEF,eAAO,MAAM,+BAA+B,yBAAoB,OAE/D,CAAC;AAEF,eAAO,MAAM,8BAA8B,yBAAoB,OAO9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAAoB,OAMvD,CAAC"}
@@ -47,6 +47,7 @@ export var ExtendedIntegrationPluginId;
47
47
  // Not native OpenAPI-backed integrations, but leveraging the same auth system
48
48
  ExtendedIntegrationPluginId["GOOGLE_SHEETS_PLUGIN_ID"] = "gsheets";
49
49
  ExtendedIntegrationPluginId["SNOWFLAKE"] = "snowflake";
50
+ ExtendedIntegrationPluginId["DATABRICKS"] = "databricks";
50
51
  })(ExtendedIntegrationPluginId || (ExtendedIntegrationPluginId = {}));
51
52
  // Note that we cannot import the plugins themselves to reference the id as
52
53
  // that causes a cyclical import.
@@ -113,7 +114,8 @@ export const extendsRestApiIntegrationPlugin = (pluginId = '') => {
113
114
  export const extendsAnyApiIntegrationPlugin = (pluginId = '') => {
114
115
  return (getBasePluginId(pluginId) === ExtendedIntegrationPluginId.REST_API ||
115
116
  pluginId === ExtendedIntegrationPluginId.GRAPHQL ||
116
- pluginId === ExtendedIntegrationPluginId.SNOWFLAKE);
117
+ pluginId === ExtendedIntegrationPluginId.SNOWFLAKE ||
118
+ pluginId === ExtendedIntegrationPluginId.DATABRICKS);
117
119
  };
118
120
  export const shouldInjectAuthHeaders = (pluginId = '') => {
119
121
  return (getBasePluginId(pluginId) === ExtendedIntegrationPluginId.REST_API &&
@@ -1 +1 @@
1
- {"version":3,"file":"integration.js","sourceRoot":"","sources":["../../../src/types/plugin/integration.ts"],"names":[],"mappings":"AA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AAU,EAAE;IACvD,OAAO,4BAA4B,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IACxE,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IACvE,OAAO,CACL,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ;QAClE,QAAQ,KAAK,2BAA2B,CAAC,OAAO;QAChD,QAAQ,KAAK,2BAA2B,CAAC,SAAS;QAClD,QAAQ,KAAK,2BAA2B,CAAC,UAAU,CACpD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,QAAQ,GAAG,EAAE,EAAW,EAAE;IAChE,OAAO,CACL,eAAe,CAAC,QAAQ,CAAC,KAAK,2BAA2B,CAAC,QAAQ;QAClE,QAAQ,KAAK,2BAA2B,CAAC,QAAQ;QACjD,QAAQ,KAAK,2BAA2B,CAAC,OAAO,CACjD,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/shared",
3
- "version": "0.9546.8",
3
+ "version": "0.9547.1",
4
4
  "description": "Superblocks Shared Resources",
5
5
  "repository": "https://github.com/superblocksteam/shared.git",
6
6
  "license": "Superblocks Community Software License",
@@ -23,6 +23,7 @@ import {
23
23
  ModifyEntitiesPayload,
24
24
  ModifyEntitiesResponse,
25
25
  GetAppBranchLockResponseBody,
26
+ LockInfo,
26
27
  DegradedMode
27
28
  } from '../types';
28
29
  import { MethodSchema } from './types.js';
@@ -210,6 +211,8 @@ export interface ServerMethods {
210
211
  acquire: ServerMethodSchema<{ applicationId: string; branchName: string; sessionType: string }, GetAppBranchLockResponseBody>;
211
212
  release: ServerMethodSchema<{ applicationId: string; branchName: string; lockId: string }, void>;
212
213
  grab: ServerMethodSchema<{ applicationId: string; branchName: string; lockId: string }, GetAppBranchLockResponseBody>;
214
+ inspect: ServerMethodSchema<{ applicationId: string; branchName: string }, LockInfo>;
215
+ forceTake: ServerMethodSchema<{ applicationId: string; branchName: string; sessionType: string }, GetAppBranchLockResponseBody>;
213
216
  };
214
217
  };
215
218
  }
@@ -164,7 +164,15 @@ export function getAWSAuthTypeDisplayName(authType: AWSAuthType): string {
164
164
  return awsAuthTypeDisplayName.get(authType) ?? '';
165
165
  }
166
166
 
167
- export type AuthType = IntegrationAuthType | GoogleSheetsAuthType | NewAuthType;
167
+ // generally used with authTypeField='connectionType'
168
+ export enum DatabaseAuthType {
169
+ URL = 'url',
170
+ FIELDS = 'fields',
171
+ OKTA = 'okta',
172
+ KEY_PAIR = 'key-pair'
173
+ }
174
+
175
+ export type AuthType = IntegrationAuthType | GoogleSheetsAuthType | NewAuthType | DatabaseAuthType;
168
176
 
169
177
  export function getDisplayName(authType: AuthType): string {
170
178
  switch (authType) {
@@ -195,6 +203,14 @@ export function getDisplayName(authType: AuthType): string {
195
203
  return 'API Key';
196
204
  case IntegrationAuthType.API_KEY_FORM:
197
205
  return 'API Key';
206
+ case DatabaseAuthType.URL:
207
+ return 'Connection URL';
208
+ case DatabaseAuthType.FIELDS:
209
+ return 'Password-based authentication';
210
+ case DatabaseAuthType.OKTA:
211
+ return 'SSO';
212
+ case DatabaseAuthType.KEY_PAIR:
213
+ return 'Key Pair Authentication';
198
214
  case IntegrationAuthType.NONE:
199
215
  default:
200
216
  return 'None';
@@ -408,6 +424,10 @@ export const extractPublic = (authType: AuthType | undefined, authConfig: AuthCo
408
424
  case IntegrationAuthType.TOKEN_PREFIXED:
409
425
  case IntegrationAuthType.API_KEY:
410
426
  case IntegrationAuthType.API_KEY_FORM:
427
+ case DatabaseAuthType.FIELDS:
428
+ case DatabaseAuthType.OKTA:
429
+ case DatabaseAuthType.KEY_PAIR:
430
+ case DatabaseAuthType.URL:
411
431
  return {};
412
432
  default:
413
433
  throw new Error(`unknown auth type: ${authType}`);
@@ -0,0 +1,499 @@
1
+ import { IntegrationAuthType } from './auth.js';
2
+ import {
3
+ DatasourceConfiguration,
4
+ isAuthenticatedDatasourceConfig,
5
+ isAuthenticatedDatasourceConfigWithDynamicAuthType,
6
+ getAuthTypeFromConfig
7
+ } from './index.js';
8
+
9
+ describe('isAuthenticatedDatasourceConfig', () => {
10
+ test('returns true for config with authConfig and authType', () => {
11
+ const config: DatasourceConfiguration = {
12
+ name: 'test',
13
+ authConfig: {
14
+ clientId: 'test-client',
15
+ clientSecret: 'test-secret'
16
+ },
17
+ authType: IntegrationAuthType.OAUTH2_CODE
18
+ };
19
+
20
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(true);
21
+ });
22
+
23
+ test('returns false for config with authConfig and authTypeField', () => {
24
+ const config: DatasourceConfiguration = {
25
+ name: 'test',
26
+ authConfig: {
27
+ clientId: 'test-client',
28
+ clientSecret: 'test-secret'
29
+ },
30
+ authTypeField: 'connectionType',
31
+ connectionType: 'fields' // This field must exist for the test to pass
32
+ };
33
+
34
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
35
+ });
36
+
37
+ test('returns false for config without authConfig', () => {
38
+ const config: DatasourceConfiguration = {
39
+ name: 'test',
40
+ authType: IntegrationAuthType.OAUTH2_CODE
41
+ };
42
+
43
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
44
+ });
45
+
46
+ test('returns false for config with authConfig but no authType or authTypeField', () => {
47
+ const config: DatasourceConfiguration = {
48
+ name: 'test',
49
+ authConfig: {
50
+ clientId: 'test-client',
51
+ clientSecret: 'test-secret'
52
+ }
53
+ };
54
+
55
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
56
+ });
57
+
58
+ test('returns false for config with authType but no authConfig', () => {
59
+ const config: DatasourceConfiguration = {
60
+ name: 'test',
61
+ authType: IntegrationAuthType.OAUTH2_CODE
62
+ };
63
+
64
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
65
+ });
66
+
67
+ test('returns false for config with authTypeField but no authConfig', () => {
68
+ const config: DatasourceConfiguration = {
69
+ name: 'test',
70
+ authTypeField: 'connectionType'
71
+ };
72
+
73
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
74
+ });
75
+
76
+ test('returns false for empty config', () => {
77
+ const config: DatasourceConfiguration = {
78
+ name: 'test'
79
+ };
80
+
81
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
82
+ });
83
+
84
+ test('returns true for config with authConfig and both authType and authTypeField', () => {
85
+ const config: DatasourceConfiguration = {
86
+ name: 'test',
87
+ authConfig: {
88
+ clientId: 'test-client',
89
+ clientSecret: 'test-secret'
90
+ },
91
+ authType: IntegrationAuthType.OAUTH2_CODE,
92
+ authTypeField: 'connectionType',
93
+ connectionType: 'fields' // This field must exist for the test to pass
94
+ };
95
+
96
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(true);
97
+ });
98
+
99
+ test('returns false for config with authConfig but empty authTypeField', () => {
100
+ const config: DatasourceConfiguration = {
101
+ name: 'test',
102
+ authConfig: {
103
+ clientId: 'test-client',
104
+ clientSecret: 'test-secret'
105
+ },
106
+ authTypeField: ''
107
+ };
108
+
109
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
110
+ });
111
+
112
+ test('returns false for config with authConfig but undefined authTypeField', () => {
113
+ const config: DatasourceConfiguration = {
114
+ name: 'test',
115
+ authConfig: {
116
+ clientId: 'test-client',
117
+ clientSecret: 'test-secret'
118
+ },
119
+ authTypeField: undefined
120
+ };
121
+
122
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
123
+ });
124
+
125
+ test('returns false for config with authConfig but authTypeField pointing to non-existent field', () => {
126
+ const config: DatasourceConfiguration = {
127
+ name: 'test',
128
+ authConfig: {
129
+ clientId: 'test-client',
130
+ clientSecret: 'test-secret'
131
+ },
132
+ authTypeField: 'nonExistentField'
133
+ // nonExistentField is not defined in the config
134
+ };
135
+
136
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
137
+ });
138
+
139
+ test('returns false for config with authConfig but undefined authTypeField', () => {
140
+ const config: DatasourceConfiguration = {
141
+ name: 'test',
142
+ authConfig: {
143
+ clientId: 'test-client',
144
+ clientSecret: 'test-secret'
145
+ },
146
+ authTypeField: undefined
147
+ };
148
+
149
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
150
+ });
151
+
152
+ test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
153
+ const config: DatasourceConfiguration = {
154
+ name: 'test',
155
+ authConfig: {
156
+ clientId: 'test-client',
157
+ clientSecret: 'test-secret'
158
+ },
159
+ authTypeField: 'connectionType'
160
+ // connectionType is not defined, so it's undefined
161
+ };
162
+
163
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
164
+ });
165
+
166
+ test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
167
+ const config: DatasourceConfiguration = {
168
+ name: 'test',
169
+ authConfig: {
170
+ clientId: 'test-client',
171
+ clientSecret: 'test-secret'
172
+ },
173
+ authTypeField: 'connectionType',
174
+ connectionType: undefined
175
+ };
176
+
177
+ expect(isAuthenticatedDatasourceConfig(config)).toBe(false);
178
+ });
179
+ });
180
+
181
+ describe('isAuthenticatedDatasourceConfigWithDynamicAuthType', () => {
182
+ test('returns true for config with authConfig and valid authTypeField', () => {
183
+ const config = {
184
+ name: 'test',
185
+ authConfig: {
186
+ clientId: 'test-client',
187
+ clientSecret: 'test-secret'
188
+ },
189
+ authTypeField: 'connectionType',
190
+ connectionType: 'oauth2'
191
+ } as DatasourceConfiguration;
192
+
193
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
194
+ });
195
+
196
+ test('returns true for config with authConfig and authTypeField pointing to non-empty string', () => {
197
+ const config = {
198
+ name: 'test',
199
+ authConfig: {
200
+ clientId: 'test-client',
201
+ clientSecret: 'test-secret'
202
+ },
203
+ authTypeField: 'authMethod',
204
+ authMethod: 'api_key'
205
+ } as DatasourceConfiguration;
206
+
207
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
208
+ });
209
+
210
+ test('returns false for config without authConfig', () => {
211
+ const config = {
212
+ name: 'test',
213
+ authTypeField: 'connectionType',
214
+ connectionType: 'oauth2'
215
+ } as DatasourceConfiguration;
216
+
217
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
218
+ });
219
+
220
+ test('returns false for config with authConfig but no authTypeField', () => {
221
+ const config: DatasourceConfiguration = {
222
+ name: 'test',
223
+ authConfig: {
224
+ clientId: 'test-client',
225
+ clientSecret: 'test-secret'
226
+ }
227
+ };
228
+
229
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
230
+ });
231
+
232
+ test('returns false for config with authConfig and empty authTypeField', () => {
233
+ const config = {
234
+ name: 'test',
235
+ authConfig: {
236
+ clientId: 'test-client',
237
+ clientSecret: 'test-secret'
238
+ },
239
+ authTypeField: '',
240
+ connectionType: 'oauth2'
241
+ } as DatasourceConfiguration;
242
+
243
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
244
+ });
245
+
246
+ test('returns false for config with authConfig and undefined authTypeField', () => {
247
+ const config = {
248
+ name: 'test',
249
+ authConfig: {
250
+ clientId: 'test-client',
251
+ clientSecret: 'test-secret'
252
+ },
253
+ authTypeField: undefined,
254
+ connectionType: 'oauth2'
255
+ } as DatasourceConfiguration;
256
+
257
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
258
+ });
259
+
260
+ test('returns false for config with authConfig and authTypeField pointing to undefined field', () => {
261
+ const config = {
262
+ name: 'test',
263
+ authConfig: {
264
+ clientId: 'test-client',
265
+ clientSecret: 'test-secret'
266
+ },
267
+ authTypeField: 'connectionType'
268
+ // connectionType is not defined
269
+ } as DatasourceConfiguration;
270
+
271
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
272
+ });
273
+
274
+ test('returns false for config with authConfig and authTypeField pointing to null field', () => {
275
+ const config = {
276
+ name: 'test',
277
+ authConfig: {
278
+ clientId: 'test-client',
279
+ clientSecret: 'test-secret'
280
+ },
281
+ authTypeField: 'connectionType',
282
+ connectionType: null
283
+ } as DatasourceConfiguration;
284
+
285
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
286
+ });
287
+
288
+ test('returns false for config with authConfig and authTypeField pointing to empty string', () => {
289
+ const config = {
290
+ name: 'test',
291
+ authConfig: {
292
+ clientId: 'test-client',
293
+ clientSecret: 'test-secret'
294
+ },
295
+ authTypeField: 'connectionType',
296
+ connectionType: ''
297
+ } as DatasourceConfiguration;
298
+
299
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
300
+ });
301
+
302
+ test('returns true for config with authConfig and authTypeField pointing to zero', () => {
303
+ const config = {
304
+ name: 'test',
305
+ authConfig: {
306
+ clientId: 'test-client',
307
+ clientSecret: 'test-secret'
308
+ },
309
+ authTypeField: 'connectionType',
310
+ connectionType: 0
311
+ } as DatasourceConfiguration;
312
+
313
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
314
+ });
315
+
316
+ test('returns true for config with authConfig and authTypeField pointing to false', () => {
317
+ const config = {
318
+ name: 'test',
319
+ authConfig: {
320
+ clientId: 'test-client',
321
+ clientSecret: 'test-secret'
322
+ },
323
+ authTypeField: 'connectionType',
324
+ connectionType: false
325
+ } as DatasourceConfiguration;
326
+
327
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
328
+ });
329
+
330
+ test('returns true for config with authConfig and authTypeField pointing to object', () => {
331
+ const config = {
332
+ name: 'test',
333
+ authConfig: {
334
+ clientId: 'test-client',
335
+ clientSecret: 'test-secret'
336
+ },
337
+ authTypeField: 'connectionType',
338
+ connectionType: { type: 'oauth2' }
339
+ } as DatasourceConfiguration;
340
+
341
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
342
+ });
343
+
344
+ test('returns true for config with authConfig and authTypeField pointing to array', () => {
345
+ const config = {
346
+ name: 'test',
347
+ authConfig: {
348
+ clientId: 'test-client',
349
+ clientSecret: 'test-secret'
350
+ },
351
+ authTypeField: 'connectionType',
352
+ connectionType: ['oauth2', 'api_key']
353
+ } as DatasourceConfiguration;
354
+
355
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
356
+ });
357
+
358
+ test('returns false for empty config', () => {
359
+ const config: DatasourceConfiguration = {
360
+ name: 'test'
361
+ };
362
+
363
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
364
+ });
365
+
366
+ test('returns false for config with authConfig but authTypeField pointing to non-existent field', () => {
367
+ const config = {
368
+ name: 'test',
369
+ authConfig: {
370
+ clientId: 'test-client',
371
+ clientSecret: 'test-secret'
372
+ },
373
+ authTypeField: 'nonExistentField'
374
+ // nonExistentField is not defined in the config
375
+ } as DatasourceConfiguration;
376
+
377
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(false);
378
+ });
379
+
380
+ test('returns true for config with authConfig and authTypeField pointing to numeric value', () => {
381
+ const config = {
382
+ name: 'test',
383
+ authConfig: {
384
+ clientId: 'test-client',
385
+ clientSecret: 'test-secret'
386
+ },
387
+ authTypeField: 'connectionType',
388
+ connectionType: 42
389
+ } as DatasourceConfiguration;
390
+
391
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
392
+ });
393
+
394
+ test('returns true for config with authConfig and authTypeField pointing to boolean true', () => {
395
+ const config = {
396
+ name: 'test',
397
+ authConfig: {
398
+ clientId: 'test-client',
399
+ clientSecret: 'test-secret'
400
+ },
401
+ authTypeField: 'connectionType',
402
+ connectionType: true
403
+ } as DatasourceConfiguration;
404
+
405
+ expect(isAuthenticatedDatasourceConfigWithDynamicAuthType(config)).toBe(true);
406
+ });
407
+ });
408
+
409
+ describe('getAuthTypeFromConfig', () => {
410
+ test('returns authType for config with direct authType field', () => {
411
+ const config: DatasourceConfiguration = {
412
+ name: 'test',
413
+ authConfig: {
414
+ clientId: 'test-client',
415
+ clientSecret: 'test-secret'
416
+ },
417
+ authType: IntegrationAuthType.OAUTH2_CODE
418
+ };
419
+
420
+ expect(getAuthTypeFromConfig(config)).toBe(IntegrationAuthType.OAUTH2_CODE);
421
+ });
422
+
423
+ test('returns authType for config with authTypeField pointing to valid field', () => {
424
+ const config: DatasourceConfiguration = {
425
+ name: 'test',
426
+ authConfig: {
427
+ clientId: 'test-client',
428
+ clientSecret: 'test-secret'
429
+ },
430
+ authTypeField: 'connectionType',
431
+ connectionType: 'fields'
432
+ };
433
+
434
+ expect(getAuthTypeFromConfig(config)).toBe('fields');
435
+ });
436
+
437
+ test('returns undefined for non-authenticated config', () => {
438
+ const config: DatasourceConfiguration = {
439
+ name: 'test'
440
+ };
441
+
442
+ expect(getAuthTypeFromConfig(config)).toBe(undefined);
443
+ });
444
+
445
+ test('returns undefined for config with authConfig but no authType or authTypeField', () => {
446
+ const config: DatasourceConfiguration = {
447
+ name: 'test',
448
+ authConfig: {
449
+ clientId: 'test-client',
450
+ clientSecret: 'test-secret'
451
+ }
452
+ };
453
+
454
+ expect(getAuthTypeFromConfig(config)).toBe(undefined);
455
+ });
456
+
457
+ test('returns undefined for config with authTypeField pointing to undefined field', () => {
458
+ const config: DatasourceConfiguration = {
459
+ name: 'test',
460
+ authConfig: {
461
+ clientId: 'test-client',
462
+ clientSecret: 'test-secret'
463
+ },
464
+ authTypeField: 'connectionType'
465
+ // connectionType is not defined
466
+ };
467
+
468
+ expect(getAuthTypeFromConfig(config)).toBe(undefined);
469
+ });
470
+
471
+ test('returns undefined for config with authTypeField pointing to undefined field', () => {
472
+ const config: DatasourceConfiguration = {
473
+ name: 'test',
474
+ authConfig: {
475
+ clientId: 'test-client',
476
+ clientSecret: 'test-secret'
477
+ },
478
+ authTypeField: 'connectionType',
479
+ connectionType: undefined
480
+ };
481
+
482
+ expect(getAuthTypeFromConfig(config)).toBe(undefined);
483
+ });
484
+
485
+ test('prioritizes direct authType over authTypeField', () => {
486
+ const config: DatasourceConfiguration = {
487
+ name: 'test',
488
+ authConfig: {
489
+ clientId: 'test-client',
490
+ clientSecret: 'test-secret'
491
+ },
492
+ authType: IntegrationAuthType.OAUTH2_CODE,
493
+ authTypeField: 'connectionType',
494
+ connectionType: 'fields'
495
+ };
496
+
497
+ expect(getAuthTypeFromConfig(config)).toBe(IntegrationAuthType.OAUTH2_CODE);
498
+ });
499
+ });