@hasna/connectors 1.4.2 → 1.4.3

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 (168) hide show
  1. package/bin/index.js +1 -5
  2. package/bin/mcp.js +1 -1
  3. package/bin/serve.js +1 -1
  4. package/connectors/clickbank/README.md +2 -2
  5. package/connectors/split-in-batches/CLAUDE.md +1 -1
  6. package/connectors/split-in-batches/README.md +1 -1
  7. package/connectors/split-in-batches/src/api/client.test.ts +16 -17
  8. package/connectors/split-in-batches/src/api/client.ts +4 -3
  9. package/connectors/split-in-batches/src/cli/index.ts +1 -1
  10. package/connectors/spreadsheet-file/.env.example +1 -1
  11. package/connectors/spreadsheet-file/CLAUDE.md +2 -2
  12. package/connectors/spreadsheet-file/README.md +3 -3
  13. package/connectors/spreadsheet-file/src/api/client.test.ts +8 -9
  14. package/connectors/spreadsheet-file/src/api/client.ts +4 -3
  15. package/connectors/spreadsheet-file/src/cli/index.ts +1 -1
  16. package/connectors/sse-trigger/.env.example +1 -1
  17. package/connectors/sse-trigger/CLAUDE.md +2 -2
  18. package/connectors/sse-trigger/README.md +1 -1
  19. package/connectors/sse-trigger/src/api/client.test.ts +12 -8
  20. package/connectors/sse-trigger/src/api/client.ts +4 -3
  21. package/connectors/sse-trigger/src/api/index.ts +1 -1
  22. package/connectors/sse-trigger/src/cli/index.ts +1 -1
  23. package/connectors/sse-trigger/src/index.ts +1 -1
  24. package/connectors/stability-api-platform/AGENTS.md +1 -1
  25. package/connectors/stability-api-platform/CLAUDE.md +1 -1
  26. package/connectors/stability-api-platform/README.md +2 -2
  27. package/connectors/stability-api-platform/src/api/client.test.ts +17 -12
  28. package/connectors/stability-api-platform/src/api/client.ts +4 -3
  29. package/connectors/stability-api-platform/src/api/index.ts +0 -1
  30. package/connectors/stability-api-platform/src/cli/index.ts +1 -1
  31. package/connectors/stability-api-platform/src/index.ts +0 -1
  32. package/connectors/stop-and-error/.env.example +1 -1
  33. package/connectors/stop-and-error/CLAUDE.md +1 -1
  34. package/connectors/stop-and-error/README.md +1 -1
  35. package/connectors/stop-and-error/src/api/client.test.ts +12 -8
  36. package/connectors/stop-and-error/src/api/client.ts +4 -3
  37. package/connectors/stop-and-error/src/cli/index.ts +2 -2
  38. package/connectors/stripe-financial-connections/.env.example +1 -1
  39. package/connectors/stripe-financial-connections/CLAUDE.md +2 -2
  40. package/connectors/stripe-financial-connections/src/api/client.test.ts +34 -0
  41. package/connectors/stripe-financial-connections/src/api/client.ts +4 -3
  42. package/connectors/stripe-financial-connections/src/cli/index.ts +1 -1
  43. package/connectors/sucuri-api-platform/.env.example +1 -1
  44. package/connectors/sucuri-api-platform/CLAUDE.md +1 -1
  45. package/connectors/sucuri-api-platform/README.md +2 -2
  46. package/connectors/sucuri-api-platform/src/api/client.test.ts +9 -7
  47. package/connectors/sucuri-api-platform/src/api/client.ts +4 -3
  48. package/connectors/sucuri-api-platform/src/api/index.ts +1 -1
  49. package/connectors/sucuri-api-platform/src/cli/index.ts +1 -1
  50. package/connectors/sucuri-api-platform/src/index.ts +1 -1
  51. package/connectors/tettra-api-platform/CLAUDE.md +1 -1
  52. package/connectors/tettra-api-platform/README.md +2 -2
  53. package/connectors/tettra-api-platform/src/api/client.test.ts +7 -8
  54. package/connectors/tettra-api-platform/src/api/client.ts +4 -3
  55. package/connectors/tettra-api-platform/src/api/index.ts +1 -1
  56. package/connectors/tettra-api-platform/src/cli/index.ts +1 -1
  57. package/connectors/tettra-api-platform/src/index.ts +1 -1
  58. package/connectors/together-api-platform/.env.example +1 -1
  59. package/connectors/together-api-platform/CLAUDE.md +1 -1
  60. package/connectors/together-api-platform/README.md +1 -1
  61. package/connectors/together-api-platform/src/api/client.test.ts +11 -7
  62. package/connectors/together-api-platform/src/api/client.ts +4 -4
  63. package/connectors/together-api-platform/src/api/index.ts +1 -1
  64. package/connectors/together-api-platform/src/cli/index.ts +1 -1
  65. package/connectors/together-api-platform/src/index.ts +1 -1
  66. package/connectors/travo-real-estate/CLAUDE.md +1 -1
  67. package/connectors/travo-real-estate/README.md +1 -1
  68. package/connectors/travo-real-estate/src/api/client.test.ts +20 -16
  69. package/connectors/travo-real-estate/src/api/client.ts +4 -3
  70. package/connectors/travo-real-estate/src/utils/config.ts +2 -4
  71. package/connectors/tray-api-platform/CLAUDE.md +1 -1
  72. package/connectors/tray-api-platform/src/api/client.test.ts +17 -13
  73. package/connectors/tray-api-platform/src/api/client.ts +4 -3
  74. package/connectors/tray-api-platform/src/api/index.ts +1 -1
  75. package/connectors/tray-api-platform/src/cli/index.ts +1 -1
  76. package/connectors/tray-api-platform/src/index.ts +0 -1
  77. package/connectors/turso-api-platform/CLAUDE.md +1 -1
  78. package/connectors/turso-api-platform/README.md +2 -2
  79. package/connectors/turso-api-platform/src/api/client.test.ts +17 -13
  80. package/connectors/turso-api-platform/src/api/client.ts +4 -3
  81. package/connectors/turso-api-platform/src/cli/index.ts +2 -2
  82. package/connectors/twilio-api-platform/CLAUDE.md +1 -1
  83. package/connectors/twilio-api-platform/src/api/client.test.ts +11 -11
  84. package/connectors/twilio-api-platform/src/api/client.ts +4 -3
  85. package/connectors/twilio-api-platform/src/api/index.ts +1 -1
  86. package/connectors/twilio-api-platform/src/cli/index.ts +1 -1
  87. package/connectors/twilio-api-platform/src/index.ts +1 -1
  88. package/connectors/tyk-api-platform/.env.example +1 -1
  89. package/connectors/tyk-api-platform/CLAUDE.md +2 -2
  90. package/connectors/tyk-api-platform/README.md +1 -1
  91. package/connectors/tyk-api-platform/src/api/client.test.ts +14 -15
  92. package/connectors/tyk-api-platform/src/api/client.ts +4 -3
  93. package/connectors/tyk-api-platform/src/api/index.ts +1 -1
  94. package/connectors/tyk-api-platform/src/cli/index.ts +1 -1
  95. package/connectors/tyk-api-platform/src/index.ts +1 -1
  96. package/connectors/vector-legal/.env.example +1 -1
  97. package/connectors/vector-legal/AGENTS.md +1 -1
  98. package/connectors/vector-legal/CLAUDE.md +1 -1
  99. package/connectors/vector-legal/README.md +1 -1
  100. package/connectors/vector-legal/src/api/client.test.ts +9 -5
  101. package/connectors/vector-legal/src/api/client.ts +4 -3
  102. package/connectors/vector-legal/src/api/index.ts +1 -1
  103. package/connectors/vector-legal/src/cli/index.ts +2 -2
  104. package/connectors/vector-legal/src/index.ts +0 -1
  105. package/connectors/vector-legal-api/CLAUDE.md +1 -1
  106. package/connectors/vector-legal-api/README.md +2 -2
  107. package/connectors/vector-legal-api/src/api/client.test.ts +12 -7
  108. package/connectors/vector-legal-api/src/api/client.ts +4 -3
  109. package/connectors/vector-legal-api/src/api/index.ts +1 -1
  110. package/connectors/vector-legal-api/src/cli/index.ts +1 -1
  111. package/connectors/vector-legal-api/src/index.ts +1 -2
  112. package/connectors/velum-data-quality/.env.example +1 -1
  113. package/connectors/velum-data-quality/CLAUDE.md +1 -1
  114. package/connectors/velum-data-quality/src/api/client.test.ts +15 -16
  115. package/connectors/velum-data-quality/src/api/client.ts +4 -3
  116. package/connectors/velum-data-quality/src/api/index.ts +1 -1
  117. package/connectors/velum-data-quality/src/cli/index.ts +1 -1
  118. package/connectors/velum-data-quality/src/index.ts +0 -1
  119. package/connectors/vercel-api-platform/.env.example +1 -1
  120. package/connectors/vercel-api-platform/CLAUDE.md +2 -2
  121. package/connectors/vercel-api-platform/README.md +2 -2
  122. package/connectors/vercel-api-platform/src/api/client.test.ts +27 -6
  123. package/connectors/vercel-api-platform/src/api/client.ts +4 -3
  124. package/connectors/vercel-api-platform/src/api/index.ts +1 -1
  125. package/connectors/vercel-api-platform/src/cli/index.ts +2 -2
  126. package/connectors/vercel-api-platform/src/index.ts +0 -1
  127. package/connectors/veriphone/README.md +2 -2
  128. package/connectors/wave-accounting/CLAUDE.md +1 -1
  129. package/connectors/wave-accounting/src/utils/auth.ts +1 -1
  130. package/connectors/weaviate-api-platform/CLAUDE.md +1 -1
  131. package/connectors/weaviate-api-platform/src/api/client.test.ts +32 -7
  132. package/connectors/weaviate-api-platform/src/api/client.ts +4 -3
  133. package/connectors/weaviate-api-platform/src/api/index.ts +1 -1
  134. package/connectors/weaviate-api-platform/src/cli/index.ts +1 -1
  135. package/connectors/weaviate-api-platform/src/index.ts +1 -1
  136. package/connectors/workflow-trigger/.env.example +1 -1
  137. package/connectors/workflow-trigger/CLAUDE.md +1 -1
  138. package/connectors/workflow-trigger/README.md +1 -1
  139. package/connectors/workflow-trigger/src/api/client.test.ts +10 -6
  140. package/connectors/workflow-trigger/src/api/client.ts +4 -3
  141. package/connectors/workflow-trigger/src/cli/index.ts +1 -1
  142. package/connectors/write-binary-file/CLAUDE.md +1 -1
  143. package/connectors/write-binary-file/README.md +1 -1
  144. package/connectors/write-binary-file/src/api/client.test.ts +16 -12
  145. package/connectors/write-binary-file/src/api/client.ts +4 -3
  146. package/connectors/write-binary-file/src/api/index.ts +1 -1
  147. package/connectors/write-binary-file/src/index.ts +1 -1
  148. package/connectors/wubookratechecker/src/api/client.test.ts +34 -0
  149. package/connectors/wubookratechecker/src/api/client.ts +3 -1
  150. package/connectors/wubookratechecker/src/api/index.ts +1 -1
  151. package/connectors/wubookratechecker/src/types/index.ts +1 -1
  152. package/connectors/xai-api-platform/.env.example +1 -1
  153. package/connectors/xai-api-platform/CLAUDE.md +1 -1
  154. package/connectors/xai-api-platform/README.md +1 -1
  155. package/connectors/xai-api-platform/src/api/client.test.ts +33 -8
  156. package/connectors/xai-api-platform/src/api/client.ts +4 -3
  157. package/connectors/xai-api-platform/src/api/index.ts +1 -1
  158. package/connectors/xai-api-platform/src/index.ts +1 -1
  159. package/connectors/xai-api-platform/src/utils/config.ts +2 -3
  160. package/connectors/zapier-api-platform/CLAUDE.md +1 -1
  161. package/connectors/zapier-api-platform/README.md +1 -1
  162. package/connectors/zapier-api-platform/src/api/client.test.ts +19 -14
  163. package/connectors/zapier-api-platform/src/api/client.ts +4 -3
  164. package/connectors/zapier-api-platform/src/api/index.ts +1 -1
  165. package/connectors/zapier-api-platform/src/cli/index.ts +1 -1
  166. package/connectors/zapier-api-platform/src/index.ts +1 -1
  167. package/dist/index.js +1 -1
  168. package/package.json +1 -1
@@ -202,7 +202,7 @@ configCmd
202
202
  console.log(chalk.bold(`Active Profile: ${profileName}`));
203
203
  info(`Config directory: ${getConfigDir()}`);
204
204
  info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
205
- info(`Base URL: ${baseUrl || 'https://api.twilioapiplatform.com/v1 (default)'}`);
205
+ info(`Base URL: ${baseUrl || 'none configured'}`);
206
206
  });
207
207
 
208
208
  configCmd
@@ -1,4 +1,4 @@
1
- export { TwilioApiPlatform, TwilioApiPlatformClient, DEFAULT_BASE_URL } from './api';
1
+ export { TwilioApiPlatform, TwilioApiPlatformClient } from './api';
2
2
  export * from './types';
3
3
 
4
4
  export {
@@ -1,5 +1,5 @@
1
1
  # Tyk API Platform credentials
2
2
  TYK_API_PLATFORM_API_KEY=your-api-key-here
3
3
 
4
- # Optional: override the API base URL (default: https://api.tykapiplatform.com/v1)
4
+ # Optional: override the API base URL (no default - must be configured)
5
5
  # TYK_API_PLATFORM_BASE_URL=https://api.tykapiplatform.com/v1
@@ -53,7 +53,7 @@ connect-tyk-api-platform raw --path /search --method POST --data '{"query":"test
53
53
  | Variable | Description |
54
54
  |----------|-------------|
55
55
  | `TYK_API_PLATFORM_API_KEY` | API key (overrides profile config) |
56
- | `TYK_API_PLATFORM_BASE_URL` | API base URL (default: `https://api.tykapiplatform.com/v1`) |
56
+ | `TYK_API_PLATFORM_BASE_URL` | API base URL (default: `configured.example.com/v1`) |
57
57
 
58
58
  ## Authentication
59
59
 
@@ -73,7 +73,7 @@ Profile JSON structure:
73
73
  ```json
74
74
  {
75
75
  "apiKey": "your-api-key",
76
- "baseUrl": "https://api.tykapiplatform.com/v1"
76
+ "baseUrl": "configured.example.com/v1"
77
77
  }
78
78
  ```
79
79
 
@@ -31,7 +31,7 @@ bun run dev search --data '{"query":"gateway"}'
31
31
  | Variable | Description |
32
32
  |----------|-------------|
33
33
  | `TYK_API_PLATFORM_API_KEY` | API key |
34
- | `TYK_API_PLATFORM_BASE_URL` | Optional base URL (default: `https://api.tykapiplatform.com/v1`) |
34
+ | `TYK_API_PLATFORM_BASE_URL` | Optional base URL (default: `configured.example.com/v1`) |
35
35
 
36
36
  ## Library Usage
37
37
 
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, mock } from 'bun:test';
2
- import { TykApiPlatformClient, DEFAULT_BASE_URL } from './client';
2
+ import { TykApiPlatformClient } from './client';
3
3
  import { TykApiPlatform } from './index';
4
4
  import { TykApiPlatformApiError } from '../types';
5
5
 
@@ -9,12 +9,11 @@ function restoreFetch(original: typeof globalThis.fetch) {
9
9
 
10
10
  describe('TykApiPlatformClient', () => {
11
11
  it('should require an API key', () => {
12
- expect(() => new TykApiPlatformClient({ apiKey: '' })).toThrow('API key is required');
12
+ expect(() => new TykApiPlatformClient({ apiKey: '', baseUrl: 'https://configured.example.com/v1' })).toThrow('API key is required');
13
13
  });
14
14
 
15
- it('should use default base URL', () => {
16
- const client = new TykApiPlatformClient({ apiKey: 'test-key' });
17
- expect(client.getBaseUrl()).toBe(DEFAULT_BASE_URL);
15
+ it('refuses to send without a configured base URL (no default endpoint)', () => {
16
+ expect(() => new TykApiPlatformClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
18
17
  });
19
18
 
20
19
  it('should allow base URL override', () => {
@@ -39,14 +38,14 @@ describe('TykApiPlatformClient', () => {
39
38
  );
40
39
  }) as any;
41
40
 
42
- const client = new TykApiPlatformClient({ apiKey: 'my-api-key' });
41
+ const client = new TykApiPlatformClient({ apiKey: 'my-api-key', baseUrl: 'https://configured.example.com/v1' });
43
42
  await client.get('/items');
44
43
 
45
44
  expect(capturedHeaders.Authorization).toBe('Bearer my-api-key');
46
45
  restoreFetch(originalFetch);
47
46
  });
48
47
 
49
- it('should request GET /items on default base URL', async () => {
48
+ it('should request GET /items on the configured base URL', async () => {
50
49
  const originalFetch = globalThis.fetch;
51
50
  let capturedUrl = '';
52
51
 
@@ -60,10 +59,10 @@ describe('TykApiPlatformClient', () => {
60
59
  );
61
60
  }) as any;
62
61
 
63
- const client = new TykApiPlatformClient({ apiKey: 'key' });
62
+ const client = new TykApiPlatformClient({ apiKey: 'key', baseUrl: 'https://configured.example.com/v1' });
64
63
  await client.get('/items');
65
64
 
66
- expect(capturedUrl).toBe(`${DEFAULT_BASE_URL}/items`);
65
+ expect(capturedUrl).toBe(`https://configured.example.com/v1/items`);
67
66
  restoreFetch(originalFetch);
68
67
  });
69
68
 
@@ -81,10 +80,10 @@ describe('TykApiPlatformClient', () => {
81
80
  );
82
81
  }) as any;
83
82
 
84
- const api = new TykApiPlatform({ apiKey: 'key' });
83
+ const api = new TykApiPlatform({ apiKey: 'key', baseUrl: 'https://configured.example.com/v1' });
85
84
  await api.getItem('a/b');
86
85
 
87
- expect(capturedUrl).toBe(`${DEFAULT_BASE_URL}/items/a%2Fb`);
86
+ expect(capturedUrl).toBe(`https://configured.example.com/v1/items/a%2Fb`);
88
87
  restoreFetch(originalFetch);
89
88
  });
90
89
 
@@ -100,7 +99,7 @@ describe('TykApiPlatformClient', () => {
100
99
  )
101
100
  ) as any;
102
101
 
103
- const client = new TykApiPlatformClient({ apiKey: 'bad-key' });
102
+ const client = new TykApiPlatformClient({ apiKey: 'bad-key', baseUrl: 'https://configured.example.com/v1' });
104
103
 
105
104
  try {
106
105
  await client.get('/items');
@@ -132,10 +131,10 @@ describe('TykApiPlatformClient', () => {
132
131
  );
133
132
  }) as any;
134
133
 
135
- const api = new TykApiPlatform({ apiKey: 'key' });
134
+ const api = new TykApiPlatform({ apiKey: 'key', baseUrl: 'https://configured.example.com/v1' });
136
135
  await api.search({ query: 'gateway' });
137
136
 
138
- expect(capturedUrl).toBe(`${DEFAULT_BASE_URL}/search`);
137
+ expect(capturedUrl).toBe(`https://configured.example.com/v1/search`);
139
138
  expect(capturedMethod).toBe('POST');
140
139
  expect(JSON.parse(capturedBody)).toEqual({ query: 'gateway' });
141
140
 
@@ -145,7 +144,7 @@ describe('TykApiPlatformClient', () => {
145
144
 
146
145
  describe('TykApiPlatform', () => {
147
146
  it('should expose underlying client', () => {
148
- const api = new TykApiPlatform({ apiKey: 'key' });
147
+ const api = new TykApiPlatform({ apiKey: 'key', baseUrl: 'https://configured.example.com/v1' });
149
148
  expect(api.getClient()).toBeInstanceOf(TykApiPlatformClient);
150
149
  });
151
150
  });
@@ -1,8 +1,6 @@
1
1
  import type { TykApiPlatformConfig } from '../types';
2
2
  import { TykApiPlatformApiError } from '../types';
3
3
 
4
- export const DEFAULT_BASE_URL = 'https://api.tykapiplatform.com/v1';
5
-
6
4
  export interface RequestOptions {
7
5
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
8
6
  params?: Record<string, string | number | boolean | undefined>;
@@ -19,7 +17,10 @@ export class TykApiPlatformClient {
19
17
  throw new Error('API key is required');
20
18
  }
21
19
  this.apiKey = config.apiKey;
22
- this.baseUrl = (config.baseUrl || DEFAULT_BASE_URL).replace(/\/$/, '');
20
+ if (!config.baseUrl) {
21
+ throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
22
+ }
23
+ this.baseUrl = config.baseUrl.replace(/\/$/, '');
23
24
  }
24
25
 
25
26
  getBaseUrl(): string {
@@ -7,7 +7,7 @@ import type {
7
7
  RawRequestOptions,
8
8
  } from '../types';
9
9
 
10
- export { TykApiPlatformClient, DEFAULT_BASE_URL } from './client';
10
+ export { TykApiPlatformClient } from './client';
11
11
 
12
12
  export class TykApiPlatform {
13
13
  private readonly client: TykApiPlatformClient;
@@ -180,7 +180,7 @@ configCmd
180
180
  console.log(chalk.bold(`Active Profile: ${profileName}`));
181
181
  info(`Config directory: ${getConfigDir()}`);
182
182
  info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
183
- info(`Base URL: ${baseUrl || chalk.gray('default (https://api.tykapiplatform.com/v1)')}`);
183
+ info(`Base URL: ${baseUrl || chalk.gray('none configured')}`);
184
184
  });
185
185
 
186
186
  configCmd
@@ -1,4 +1,4 @@
1
- export { TykApiPlatform, TykApiPlatformClient, DEFAULT_BASE_URL } from './api';
1
+ export { TykApiPlatform, TykApiPlatformClient } from './api';
2
2
  export * from './types';
3
3
 
4
4
  export {
@@ -1,5 +1,5 @@
1
1
  # Vector Legal API credentials
2
2
  VECTOR_LEGAL_API_KEY=your-api-key-here
3
3
 
4
- # Optional: custom API base URL (default https://api.vector-legal.com/v1)
4
+ # Optional: custom API base URL (no default - must be configured)
5
5
  # VECTOR_LEGAL_BASE_URL=https://api.vector-legal.com/v1
@@ -10,7 +10,7 @@ Guidance for AI agents working with the Vector Legal connector.
10
10
 
11
11
  - **Type**: Bearer API key
12
12
  - **Env**: `VECTOR_LEGAL_API_KEY`
13
- - **Optional**: `VECTOR_LEGAL_BASE_URL` (default `https://api.vector-legal.com/v1`)
13
+ - **Optional**: `VECTOR_LEGAL_BASE_URL` (no default - must be set)
14
14
 
15
15
  ## API Surface
16
16
 
@@ -19,7 +19,7 @@ bun run dev -- --help # Show CLI help
19
19
 
20
20
  ## API Details
21
21
 
22
- - **Base URL**: `https://api.vector-legal.com/v1` (configurable via `VECTOR_LEGAL_BASE_URL`)
22
+ - **Base URL**: no default (must be configured) (configurable via `VECTOR_LEGAL_BASE_URL`)
23
23
  - **Auth**: Bearer token: `Authorization: Bearer <API_KEY>`
24
24
 
25
25
  ## API Resources
@@ -50,7 +50,7 @@ const docs = await client.documents.list();
50
50
  | Variable | Description |
51
51
  |----------|-------------|
52
52
  | `VECTOR_LEGAL_API_KEY` | API key |
53
- | `VECTOR_LEGAL_BASE_URL` | Optional base URL (default `https://api.vector-legal.com/v1`) |
53
+ | `VECTOR_LEGAL_BASE_URL` | Optional base URL (no default - must be configured) |
54
54
 
55
55
  ## License
56
56
 
@@ -1,5 +1,5 @@
1
1
  import { afterEach, describe, expect, test } from 'bun:test';
2
- import { ConnectorClient, DEFAULT_BASE_URL } from './client';
2
+ import { ConnectorClient } from './client';
3
3
 
4
4
  const realFetch = globalThis.fetch;
5
5
 
@@ -47,22 +47,22 @@ afterEach(() => {
47
47
  describe('Vector Legal API client', () => {
48
48
  test('uses default base URL and Bearer auth for GET /documents', async () => {
49
49
  const recorded = installFetch();
50
- const client = new ConnectorClient({ apiKey: 'vector-legal-key' });
50
+ const client = new ConnectorClient({ apiKey: 'vector-legal-key', baseUrl: 'https://configured.example.com/v1' });
51
51
  await client.get('/documents');
52
52
 
53
53
  expect(recorded).toHaveLength(1);
54
- expect(recorded[0].url).toBe(`${DEFAULT_BASE_URL}/documents`);
54
+ expect(recorded[0].url).toBe(`https://configured.example.com/v1/documents`);
55
55
  expect(recorded[0].method).toBe('GET');
56
56
  expect(headerValue(recorded[0].headers, 'Authorization')).toBe('Bearer vector-legal-key');
57
57
  });
58
58
 
59
59
  test('uses default base URL and Bearer auth for GET /documents/:id', async () => {
60
60
  const recorded = installFetch();
61
- const client = new ConnectorClient({ apiKey: 'vector-legal-key' });
61
+ const client = new ConnectorClient({ apiKey: 'vector-legal-key', baseUrl: 'https://configured.example.com/v1' });
62
62
  await client.get('/documents/item-1');
63
63
 
64
64
  expect(recorded).toHaveLength(1);
65
- expect(recorded[0].url).toBe(`${DEFAULT_BASE_URL}/documents/item-1`);
65
+ expect(recorded[0].url).toBe(`https://configured.example.com/v1/documents/item-1`);
66
66
  expect(recorded[0].method).toBe('GET');
67
67
  expect(headerValue(recorded[0].headers, 'Authorization')).toBe('Bearer vector-legal-key');
68
68
  });
@@ -81,4 +81,8 @@ describe('Vector Legal API client', () => {
81
81
  test('requires API key', () => {
82
82
  expect(() => new ConnectorClient({})).toThrow('API key');
83
83
  });
84
+
85
+ test('refuses to send without a configured base URL (no default endpoint)', () => {
86
+ expect(() => new ConnectorClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
87
+ });
84
88
  });
@@ -1,8 +1,6 @@
1
1
  import type { ConnectorConfig, OutputFormat } from '../types';
2
2
  import { ConnectorApiError, parseApiError } from '../types';
3
3
 
4
- export const DEFAULT_BASE_URL = 'https://api.vector-legal.com/v1';
5
-
6
4
  export interface RequestOptions {
7
5
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
8
6
  params?: Record<string, string | number | boolean | undefined>;
@@ -23,7 +21,10 @@ export class ConnectorClient {
23
21
  throw new Error('API key, token, or accessToken is required');
24
22
  }
25
23
  this.apiKey = key;
26
- this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
24
+ if (!config.baseUrl) {
25
+ throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
26
+ }
27
+ this.baseUrl = config.baseUrl;
27
28
  }
28
29
 
29
30
  private buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string {
@@ -41,7 +41,7 @@ export class Connector {
41
41
  }
42
42
  }
43
43
 
44
- export { ConnectorClient, DEFAULT_BASE_URL } from './client';
44
+ export { ConnectorClient } from './client';
45
45
  export { DocumentsApi } from './documents';
46
46
  export { EventsApi } from './events';
47
47
  export { SearchApi } from './search';
@@ -160,7 +160,7 @@ profileCmd
160
160
 
161
161
  console.log(chalk.bold(`Profile: ${profileName}${profileName === active ? chalk.green(' (active)') : ''}`));
162
162
  info(`API Key: ${config.apiKey ? `${config.apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
163
- info(`Base URL: ${config.baseUrl || chalk.gray('default (https://api.vector-legal.com/v1)')}`);
163
+ info(`Base URL: ${config.baseUrl || chalk.gray('none configured')}`);
164
164
  });
165
165
 
166
166
  // ============================================
@@ -197,7 +197,7 @@ configCmd
197
197
  console.log(chalk.bold(`Active Profile: ${profileName}`));
198
198
  info(`Config directory: ${getConfigDir()}`);
199
199
  info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
200
- info(`Base URL: ${baseUrl || chalk.gray('default (https://api.vector-legal.com/v1)')}`);
200
+ info(`Base URL: ${baseUrl || chalk.gray('none configured')}`);
201
201
  });
202
202
 
203
203
  configCmd
@@ -5,7 +5,6 @@ export * from './types';
5
5
 
6
6
  export {
7
7
  ConnectorClient,
8
- DEFAULT_BASE_URL,
9
8
  DocumentsApi,
10
9
  EventsApi,
11
10
  SearchApi,
@@ -19,7 +19,7 @@ bun run dev -- --help # Show CLI help
19
19
 
20
20
  ## API Details
21
21
 
22
- - **Base URL**: `https://api.vector-legal.com/v1` (configurable via `VECTOR_LEGAL_API_BASE_URL`)
22
+ - **Base URL**: no default (must be configured) (configurable via `VECTOR_LEGAL_API_BASE_URL`)
23
23
  - **Auth**: Bearer token: `Authorization: Bearer <API_KEY>` (api_key credential field)
24
24
 
25
25
  ## API Resources
@@ -1,6 +1,6 @@
1
1
  # connect-vector-legal-api
2
2
 
3
- TypeScript connector for the [Vector Legal API](https://api.vector-legal.com/v1) — legal document management, events, and search.
3
+ TypeScript connector for the [Vector Legal API](configured.example.com/v1) — legal document management, events, and search.
4
4
 
5
5
  ## Features
6
6
 
@@ -30,7 +30,7 @@ bun run dev documents list
30
30
  | Variable | Required | Description |
31
31
  |----------|----------|-------------|
32
32
  | `VECTOR_LEGAL_API_KEY` | Yes | API key |
33
- | `VECTOR_LEGAL_API_BASE_URL` | No | Base URL (default: `https://api.vector-legal.com/v1`) |
33
+ | `VECTOR_LEGAL_API_BASE_URL` | No | Base URL (default: `configured.example.com/v1`) |
34
34
 
35
35
  ## CLI
36
36
 
@@ -1,5 +1,6 @@
1
1
  import { afterEach, describe, expect, mock, test } from 'bun:test';
2
- import { Connector, DEFAULT_BASE_URL } from './index';
2
+ import { ConnectorClient } from './client';
3
+ import { Connector } from './index';
3
4
 
4
5
  const realFetch = globalThis.fetch;
5
6
 
@@ -30,21 +31,21 @@ function installFetch(): Recorded[] {
30
31
  describe('Vector Legal API client', () => {
31
32
  test('uses default base URL and Bearer auth for list documents', async () => {
32
33
  const recorded = installFetch();
33
- const client = new Connector({ apiKey: 'vector-legal-api-key' });
34
+ const client = new Connector({ apiKey: 'vector-legal-api-key', baseUrl: 'https://configured.example.com/v1' });
34
35
  await client.documents.list();
35
36
 
36
37
  expect(recorded).toHaveLength(1);
37
- expect(recorded[0].url).toBe(`${DEFAULT_BASE_URL}/documents`);
38
+ expect(recorded[0].url).toBe(`https://configured.example.com/v1/documents`);
38
39
  expect(recorded[0].method).toBe('GET');
39
40
  expect(recorded[0].headers.get('Authorization')).toBe('Bearer vector-legal-api-key');
40
41
  });
41
42
 
42
43
  test('get document encodes id in path', async () => {
43
44
  const recorded = installFetch();
44
- const client = new Connector({ apiKey: 'vector-legal-api-key' });
45
+ const client = new Connector({ apiKey: 'vector-legal-api-key', baseUrl: 'https://configured.example.com/v1' });
45
46
  await client.documents.get('item-1');
46
47
 
47
- expect(recorded[0].url).toBe(`${DEFAULT_BASE_URL}/documents/item-1`);
48
+ expect(recorded[0].url).toBe(`https://configured.example.com/v1/documents/item-1`);
48
49
  expect(recorded[0].headers.get('Authorization')).toBe('Bearer vector-legal-api-key');
49
50
  });
50
51
 
@@ -61,10 +62,10 @@ describe('Vector Legal API client', () => {
61
62
 
62
63
  test('search posts to /search with body', async () => {
63
64
  const recorded = installFetch();
64
- const client = new Connector({ apiKey: 'test-key' });
65
+ const client = new Connector({ apiKey: 'test-key', baseUrl: 'https://configured.example.com/v1' });
65
66
  await client.search.search({ query: 'nda' });
66
67
 
67
- expect(recorded[0].url).toBe(`${DEFAULT_BASE_URL}/search`);
68
+ expect(recorded[0].url).toBe(`https://configured.example.com/v1/search`);
68
69
  expect(recorded[0].method).toBe('POST');
69
70
  });
70
71
 
@@ -78,4 +79,8 @@ describe('Vector Legal API client', () => {
78
79
  test('requires api key', () => {
79
80
  expect(() => new Connector({})).toThrow('API key');
80
81
  });
82
+
83
+ test('refuses to send without a configured base URL (no default endpoint)', () => {
84
+ expect(() => new ConnectorClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
85
+ });
81
86
  });
@@ -1,8 +1,6 @@
1
1
  import type { ConnectorConfig, OutputFormat } from '../types';
2
2
  import { ConnectorApiError, parseApiError } from '../types';
3
3
 
4
- export const DEFAULT_BASE_URL = 'https://api.vector-legal.com/v1';
5
-
6
4
  export interface RequestOptions {
7
5
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
8
6
  params?: Record<string, string | number | boolean | undefined>;
@@ -23,7 +21,10 @@ export class ConnectorClient {
23
21
  throw new Error('API key or token is required');
24
22
  }
25
23
  this.apiKey = key;
26
- this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
24
+ if (!config.baseUrl) {
25
+ throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
26
+ }
27
+ this.baseUrl = config.baseUrl;
27
28
  }
28
29
 
29
30
  getBaseUrl(): string {
@@ -38,7 +38,7 @@ export class Connector {
38
38
  }
39
39
  }
40
40
 
41
- export { ConnectorClient, DEFAULT_BASE_URL } from './client';
41
+ export { ConnectorClient } from './client';
42
42
  export { DocumentsApi } from './documents';
43
43
  export { EventsApi } from './events';
44
44
  export { SearchApi } from './search';
@@ -200,7 +200,7 @@ configCmd
200
200
  console.log(chalk.bold(`Active Profile: ${getCurrentProfile()}`));
201
201
  info(`Config directory: ${getConfigDir()}`);
202
202
  info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
203
- info(`Base URL: ${baseUrl || chalk.gray('default (https://api.vector-legal.com/v1)')}`);
203
+ info(`Base URL: ${baseUrl || chalk.gray('none configured')}`);
204
204
  });
205
205
 
206
206
  configCmd
@@ -8,8 +8,7 @@ export {
8
8
  DocumentsApi,
9
9
  EventsApi,
10
10
  SearchApi,
11
- DEFAULT_BASE_URL,
12
- } from './api';
11
+ } from './api';
13
12
 
14
13
  export {
15
14
  getApiKey,
@@ -2,5 +2,5 @@
2
2
 
3
3
  VELUM_DATA_QUALITY_API_KEY=your-api-key-here
4
4
 
5
- # Optional: override API base URL (default https://api.velum-data-quality.com/v1)
5
+ # Optional: override API base URL (no default - must be configured)
6
6
  # VELUM_DATA_QUALITY_BASE_URL=https://api.velum-data-quality.com/v1
@@ -18,7 +18,7 @@ bun run dev -- --help # Show CLI help
18
18
 
19
19
  ## API Details
20
20
 
21
- - **Base URL**: `https://api.velum-data-quality.com/v1` (configurable via `VELUM_DATA_QUALITY_BASE_URL`)
21
+ - **Base URL**: no default (must be configured) (configurable via `VELUM_DATA_QUALITY_BASE_URL`)
22
22
  - **Auth**: Bearer token: `Authorization: Bearer <API_KEY>`
23
23
 
24
24
  ## API Resources
@@ -1,5 +1,5 @@
1
1
  import { afterEach, describe, expect, test } from 'bun:test';
2
- import { Connector, ConnectorClient, DEFAULT_BASE_URL } from './index';
2
+ import { Connector, ConnectorClient } from './index';
3
3
 
4
4
  const realFetch = globalThis.fetch;
5
5
 
@@ -48,20 +48,19 @@ describe('Velum Data Quality API client', () => {
48
48
  expect(() => new ConnectorClient({})).toThrow('API key');
49
49
  });
50
50
 
51
- test('uses default base URL', () => {
52
- const client = new ConnectorClient({ apiKey: 'test-key' });
53
- expect(client.getBaseUrl()).toBe(DEFAULT_BASE_URL);
51
+ test('refuses to send without a configured base URL (no default endpoint)', () => {
52
+ expect(() => new ConnectorClient({ apiKey: 'test-key' })).toThrow(/baseUrl/);
54
53
  });
55
54
 
56
55
  test('listChecks sends Bearer auth to GET /checks', async () => {
57
56
  const recorded = installFetch((req) => {
58
57
  expect(req.method).toBe('GET');
59
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/checks`);
58
+ expect(req.url).toBe(`https://configured.example.com/v1/checks`);
60
59
  expect(req.headers.authorization).toBe('Bearer velum-test-key');
61
60
  return { checks: [{ id: 'chk_1' }] };
62
61
  });
63
62
 
64
- const connector = new Connector({ apiKey: 'velum-test-key' });
63
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
65
64
  const result = await connector.checks.list();
66
65
  expect(result).toEqual({ checks: [{ id: 'chk_1' }] });
67
66
  expect(recorded).toHaveLength(1);
@@ -70,11 +69,11 @@ describe('Velum Data Quality API client', () => {
70
69
  test('getCheck encodes check ID in path', async () => {
71
70
  const recorded = installFetch((req) => {
72
71
  expect(req.method).toBe('GET');
73
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/checks/check%2F123`);
72
+ expect(req.url).toBe(`https://configured.example.com/v1/checks/check%2F123`);
74
73
  return { id: 'check/123', status: 'active' };
75
74
  });
76
75
 
77
- const connector = new Connector({ apiKey: 'velum-test-key' });
76
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
78
77
  const result = await connector.checks.get('check/123');
79
78
  expect(result).toEqual({ id: 'check/123', status: 'active' });
80
79
  expect(recorded).toHaveLength(1);
@@ -83,12 +82,12 @@ describe('Velum Data Quality API client', () => {
83
82
  test('createCheck POSTs JSON body to /checks', async () => {
84
83
  const recorded = installFetch((req) => {
85
84
  expect(req.method).toBe('POST');
86
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/checks`);
85
+ expect(req.url).toBe(`https://configured.example.com/v1/checks`);
87
86
  expect(req.body).toBe(JSON.stringify({ name: 'freshness' }));
88
87
  return { id: 'chk_new', name: 'freshness' };
89
88
  });
90
89
 
91
- const connector = new Connector({ apiKey: 'velum-test-key' });
90
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
92
91
  const result = await connector.checks.create({ name: 'freshness' });
93
92
  expect(result).toEqual({ id: 'chk_new', name: 'freshness' });
94
93
  expect(recorded).toHaveLength(1);
@@ -97,11 +96,11 @@ describe('Velum Data Quality API client', () => {
97
96
  test('listEvents hits GET /events', async () => {
98
97
  const recorded = installFetch((req) => {
99
98
  expect(req.method).toBe('GET');
100
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/events`);
99
+ expect(req.url).toBe(`https://configured.example.com/v1/events`);
101
100
  return { events: [{ id: 'evt_1' }] };
102
101
  });
103
102
 
104
- const connector = new Connector({ apiKey: 'velum-test-key' });
103
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
105
104
  const result = await connector.events.list();
106
105
  expect(result).toEqual({ events: [{ id: 'evt_1' }] });
107
106
  expect(recorded).toHaveLength(1);
@@ -110,12 +109,12 @@ describe('Velum Data Quality API client', () => {
110
109
  test('search POSTs to /search', async () => {
111
110
  const recorded = installFetch((req) => {
112
111
  expect(req.method).toBe('POST');
113
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/search`);
112
+ expect(req.url).toBe(`https://configured.example.com/v1/search`);
114
113
  expect(req.body).toBe(JSON.stringify({ query: 'failed' }));
115
114
  return { results: [] };
116
115
  });
117
116
 
118
- const connector = new Connector({ apiKey: 'velum-test-key' });
117
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
119
118
  const result = await connector.search.search({ query: 'failed' });
120
119
  expect(result).toEqual({ results: [] });
121
120
  expect(recorded).toHaveLength(1);
@@ -124,11 +123,11 @@ describe('Velum Data Quality API client', () => {
124
123
  test('rawRequest supports custom path and method', async () => {
125
124
  const recorded = installFetch((req) => {
126
125
  expect(req.method).toBe('PATCH');
127
- expect(req.url).toBe(`${DEFAULT_BASE_URL}/checks/chk_1`);
126
+ expect(req.url).toBe(`https://configured.example.com/v1/checks/chk_1`);
128
127
  return { ok: true };
129
128
  });
130
129
 
131
- const connector = new Connector({ apiKey: 'velum-test-key' });
130
+ const connector = new Connector({ apiKey: 'velum-test-key', baseUrl: 'https://configured.example.com/v1' });
132
131
  await connector.rawRequest({ method: 'PATCH', path: '/checks/chk_1', body: { status: 'paused' } });
133
132
  expect(recorded).toHaveLength(1);
134
133
  });
@@ -1,8 +1,6 @@
1
1
  import type { ConnectorConfig, OutputFormat } from '../types';
2
2
  import { ConnectorApiError, parseApiError } from '../types';
3
3
 
4
- export const DEFAULT_BASE_URL = 'https://api.velum-data-quality.com/v1';
5
-
6
4
  export interface RequestOptions {
7
5
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
8
6
  params?: Record<string, string | number | boolean | undefined>;
@@ -23,7 +21,10 @@ export class ConnectorClient {
23
21
  throw new Error('API key, token, or accessToken is required');
24
22
  }
25
23
  this.apiKey = key;
26
- this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
24
+ if (!config.baseUrl) {
25
+ throw new Error('baseUrl is required: no default endpoint is configured; set baseUrl (profile, config, or the connector BASE_URL environment variable)');
26
+ }
27
+ this.baseUrl = config.baseUrl;
27
28
  }
28
29
 
29
30
  private buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string {
@@ -48,7 +48,7 @@ export class Connector {
48
48
  }
49
49
  }
50
50
 
51
- export { ConnectorClient, DEFAULT_BASE_URL } from './client';
51
+ export { ConnectorClient } from './client';
52
52
  export { ChecksApi } from './checks';
53
53
  export { EventsApi } from './events';
54
54
  export { SearchApi } from './search';
@@ -226,7 +226,7 @@ configCmd
226
226
  console.log(chalk.bold(`Active Profile: ${profileName}`));
227
227
  info(`Config directory: ${getConfigDir()}`);
228
228
  info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : chalk.gray('not set')}`);
229
- info(`Base URL: ${baseUrl || chalk.gray('default (https://api.velum-data-quality.com/v1)')}`);
229
+ info(`Base URL: ${baseUrl || chalk.gray('none configured')}`);
230
230
  });
231
231
 
232
232
  configCmd