Skip to content

Commit b78d02a

Browse files
committed
use VECTORIZE_TOKEN
1 parent 517aa33 commit b78d02a

File tree

13 files changed

+34
-34
lines changed

13 files changed

+34
-34
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ vectorize-iris large-document.pdf \
310310
Set your API credentials:
311311

312312
```bash
313-
export VECTORIZE_API_TOKEN="your-token"
313+
export VECTORIZE_TOKEN="your-token"
314314
export VECTORIZE_ORG_ID="your-org-id"
315315
```
316316

nodejs-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install @vectorize-io/iris
3636
Set your credentials (get them at [vectorize.io](https://vectorize.io)):
3737

3838
```bash
39-
export VECTORIZE_API_TOKEN="your-token"
39+
export VECTORIZE_TOKEN="your-token"
4040
export VECTORIZE_ORG_ID="your-org-id"
4141
```
4242

nodejs-api/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export async function extractText(
193193
options: ExtractionOptions = {}
194194
): Promise<ExtractionResultData> {
195195
const {
196-
apiToken = process.env.VECTORIZE_API_TOKEN,
196+
apiToken = process.env.VECTORIZE_TOKEN,
197197
orgId = process.env.VECTORIZE_ORG_ID,
198198
pollInterval = 2000,
199199
timeout = 300000,
@@ -204,7 +204,7 @@ export async function extractText(
204204
// Validate credentials
205205
if (!apiToken || !orgId) {
206206
throw new VectorizeIrisError(
207-
'Missing credentials. Set VECTORIZE_API_TOKEN and VECTORIZE_ORG_ID ' +
207+
'Missing credentials. Set VECTORIZE_TOKEN and VECTORIZE_ORG_ID ' +
208208
'environment variables or pass them in options.'
209209
);
210210
}
@@ -260,7 +260,7 @@ export async function extractTextFromFile(
260260
options: ExtractionOptions = {}
261261
): Promise<ExtractionResultData> {
262262
const {
263-
apiToken = process.env.VECTORIZE_API_TOKEN,
263+
apiToken = process.env.VECTORIZE_TOKEN,
264264
orgId = process.env.VECTORIZE_ORG_ID,
265265
pollInterval = 2000,
266266
timeout = 300000,
@@ -271,7 +271,7 @@ export async function extractTextFromFile(
271271
// Validate credentials
272272
if (!apiToken || !orgId) {
273273
throw new VectorizeIrisError(
274-
'Missing credentials. Set VECTORIZE_API_TOKEN and VECTORIZE_ORG_ID ' +
274+
'Missing credentials. Set VECTORIZE_TOKEN and VECTORIZE_ORG_ID ' +
275275
'environment variables or pass them in options.'
276276
);
277277
}

nodejs-api/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export interface ExtractionResult {
6060
// Options for extract functions
6161

6262
export interface ExtractionOptions {
63-
/** Vectorize API token (defaults to VECTORIZE_API_TOKEN env var) */
63+
/** Vectorize API token (defaults to VECTORIZE_TOKEN env var) */
6464
apiToken?: string;
6565
/** Organization ID (defaults to VECTORIZE_ORG_ID env var) */
6666
orgId?: string;

nodejs-api/tests/index.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('extractText', () => {
1818
beforeEach(() => {
1919
jest.clearAllMocks();
2020
// Reset environment variables
21-
delete process.env.VECTORIZE_API_TOKEN;
21+
delete process.env.VECTORIZE_TOKEN;
2222
delete process.env.VECTORIZE_ORG_ID;
2323
});
2424

@@ -28,7 +28,7 @@ describe('extractText', () => {
2828
});
2929

3030
it('should throw error when file does not exist', async () => {
31-
process.env.VECTORIZE_API_TOKEN = 'test-token';
31+
process.env.VECTORIZE_TOKEN = 'test-token';
3232
process.env.VECTORIZE_ORG_ID = 'test-org';
3333

3434
mockFs.access.mockRejectedValueOnce(new Error('File not found'));
@@ -37,7 +37,7 @@ describe('extractText', () => {
3737
});
3838

3939
it('should successfully extract text from a file', async () => {
40-
process.env.VECTORIZE_API_TOKEN = 'test-token';
40+
process.env.VECTORIZE_TOKEN = 'test-token';
4141
process.env.VECTORIZE_ORG_ID = 'test-org';
4242

4343
// Mock file operations
@@ -101,7 +101,7 @@ describe('extractText', () => {
101101
});
102102

103103
it('should handle upload failure', async () => {
104-
process.env.VECTORIZE_API_TOKEN = 'test-token';
104+
process.env.VECTORIZE_TOKEN = 'test-token';
105105
process.env.VECTORIZE_ORG_ID = 'test-org';
106106

107107
mockFs.access.mockResolvedValueOnce(undefined);
@@ -120,7 +120,7 @@ describe('extractText', () => {
120120
});
121121

122122
it('should handle file upload failure', async () => {
123-
process.env.VECTORIZE_API_TOKEN = 'test-token';
123+
process.env.VECTORIZE_TOKEN = 'test-token';
124124
process.env.VECTORIZE_ORG_ID = 'test-org';
125125

126126
mockFs.access.mockResolvedValueOnce(undefined);
@@ -150,7 +150,7 @@ describe('extractText', () => {
150150
});
151151

152152
it('should handle extraction failure', async () => {
153-
process.env.VECTORIZE_API_TOKEN = 'test-token';
153+
process.env.VECTORIZE_TOKEN = 'test-token';
154154
process.env.VECTORIZE_ORG_ID = 'test-org';
155155

156156
mockFs.access.mockResolvedValueOnce(undefined);
@@ -198,7 +198,7 @@ describe('extractText', () => {
198198
});
199199

200200
it('should handle extraction timeout', async () => {
201-
process.env.VECTORIZE_API_TOKEN = 'test-token';
201+
process.env.VECTORIZE_TOKEN = 'test-token';
202202
process.env.VECTORIZE_ORG_ID = 'test-org';
203203

204204
mockFs.access.mockResolvedValueOnce(undefined);

nodejs-api/tests/integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { extractText, extractTextFromFile, VectorizeIrisError } from '../src/ind
99
import type { ExtractionOptions } from '../src/index';
1010

1111
// Skip tests if credentials not available
12-
const hasCredentials = process.env.VECTORIZE_API_TOKEN && process.env.VECTORIZE_ORG_ID;
12+
const hasCredentials = process.env.VECTORIZE_TOKEN && process.env.VECTORIZE_ORG_ID;
1313
const describeIfCredentials = hasCredentials ? describe : describe.skip;
1414

1515
const TEST_FILE = path.join(__dirname, '../../examples/sample.md');

python-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pip install vectorize-iris
3535
Set your credentials (get them at [vectorize.io](https://vectorize.io)):
3636

3737
```bash
38-
export VECTORIZE_API_TOKEN="your-token"
38+
export VECTORIZE_TOKEN="your-token"
3939
export VECTORIZE_ORG_ID="your-org-id"
4040
```
4141

python-api/tests/test_async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def mock_env():
1616
"""Set up mock environment variables"""
1717
with patch.dict(os.environ, {
18-
'VECTORIZE_API_TOKEN': 'test-token',
18+
'VECTORIZE_TOKEN': 'test-token',
1919
'VECTORIZE_ORG_ID': 'test-org-id'
2020
}):
2121
yield

python-api/tests/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Skip all tests if credentials are not available
2121
pytestmark = pytest.mark.skipif(
22-
not os.getenv("VECTORIZE_API_TOKEN") or not os.getenv("VECTORIZE_ORG_ID"),
22+
not os.getenv("VECTORIZE_TOKEN") or not os.getenv("VECTORIZE_ORG_ID"),
2323
reason="API credentials not found"
2424
)
2525

python-api/tests/test_vectorize_iris.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def mock_env():
1515
"""Set up mock environment variables"""
1616
with patch.dict(os.environ, {
17-
'VECTORIZE_API_TOKEN': 'test-token',
17+
'VECTORIZE_TOKEN': 'test-token',
1818
'VECTORIZE_ORG_ID': 'test-org-id'
1919
}):
2020
yield

0 commit comments

Comments
 (0)