@albatrossai/albatross-sdk 0.2.0-b → 0.2.0-c
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/README.md +53 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,23 +1,63 @@
|
|
|
1
|
-
# albatross-sdk
|
|
1
|
+
# @albatrossai/albatross-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@albatrossai/albatross-sdk)
|
|
4
|
+
[](https://albatross-core.github.io/fake-ecommerce/)
|
|
4
5
|
|
|
5
|
-
-
|
|
6
|
-
- **validation**: zod (runtime type validation)
|
|
7
|
-
- **documentation**: jsdoc + TypeDoc (future)
|
|
6
|
+
Official TypeScript/JavaScript SDK for Albatross AI - intelligent content selection, recommendations, and personalization.
|
|
8
7
|
|
|
9
|
-
##
|
|
8
|
+
## Installation
|
|
10
9
|
|
|
11
10
|
```bash
|
|
12
|
-
|
|
13
|
-
bun run dev # watch mode
|
|
14
|
-
bun run typecheck # type checking
|
|
11
|
+
npm install @albatrossai/albatross-sdk
|
|
15
12
|
```
|
|
16
13
|
|
|
17
|
-
##
|
|
14
|
+
## Quick Start
|
|
18
15
|
|
|
19
16
|
```typescript
|
|
20
|
-
import Client from 'albatross-sdk';
|
|
17
|
+
import { Client } from '@albatrossai/albatross-sdk';
|
|
21
18
|
|
|
22
|
-
const client = new Client(token,
|
|
23
|
-
|
|
19
|
+
const client = new Client('your-api-token', 'your-tenant-id');
|
|
20
|
+
|
|
21
|
+
// Search
|
|
22
|
+
const results = await client.search('query', 'use-case', { limit: 10 });
|
|
23
|
+
|
|
24
|
+
// Recommendations
|
|
25
|
+
const recs = await client.getRecommendations('use-case', {
|
|
26
|
+
user_id: 'user-123',
|
|
27
|
+
limit: 10
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Track events
|
|
31
|
+
await client.putEvent({
|
|
32
|
+
eventType: 'view',
|
|
33
|
+
payload: { user_id: 'user-123', item_id: 'item-456' }
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
**📖 [Complete API Documentation](https://albatross-core.github.io/fake-ecommerce/)**
|
|
40
|
+
|
|
41
|
+
The full API reference with detailed examples, type definitions, and method documentation is available in the auto-generated TypeDoc documentation.
|
|
42
|
+
|
|
43
|
+
### Key Features
|
|
44
|
+
|
|
45
|
+
- 🎯 Content selection & search (text, image, vector)
|
|
46
|
+
- 🔮 AI predictions & recommendations
|
|
47
|
+
- 📊 Event tracking
|
|
48
|
+
- 📦 Catalog management
|
|
49
|
+
- 🛡️ Full TypeScript support
|
|
50
|
+
- 🔄 Auto-retry with exponential backoff
|
|
51
|
+
|
|
52
|
+
## Development
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bun install # Install dependencies
|
|
56
|
+
bun run build # Build the SDK
|
|
57
|
+
bun test # Run tests
|
|
58
|
+
bun run docs # Generate documentation
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT
|