@ductape/sdk 0.0.5 → 0.0.6

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 (2) hide show
  1. package/README.md +87 -53
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,58 +1,92 @@
1
- # Ductape
1
+ # @ductape/sdk
2
2
 
3
- ### **Simplifying Product Development with Seamless Interoperability**
3
+ SDK for building Ductape-powered products. Use a single access key to work with databases, message brokers, storage, sessions, workflows, and more.
4
4
 
5
- Ductape streamlines software development with **composable** and **portable** components that unify services, enable interoperability, and ensure consistency—all from your codebase.
5
+ ## Install
6
6
 
7
- ## 🚀 Why Ductape?
8
-
9
- - **Composable & Reusable** – Reduce redundancy, accelerate feature development, and integrate databases, message brokers, storage, and third-party services.
10
- - **Safe Testing** – Validate features in isolated environments for **reliable deployments** and **early issue detection**.
11
- - **Built-in Monitoring** – Track performance, log issues, and analyze usage patterns in real time.
12
-
13
- ## 🔧 Core Features
14
-
15
- - **Modular Components** – Seamless integration with databases, messaging, storage, and web services.
16
- - **Effortless Scaling** – Dynamic resource allocation with minimal backend maintenance.
17
- - **Streamlined Management** – Define, monitor, and optimize services directly in your codebase.
18
-
19
- ## 🛠 Getting Started
20
-
21
- ### 1️ Install SDK
22
7
  ```sh
23
8
  npm install @ductape/sdk
24
- ```
25
-
26
- ### 2️ Define Apps & Actions
27
- - **Apps:** Third-party services (e.g., payment gateways, AI agents).
28
- - **Actions:** Tasks like "Send Email" or "Create Payment."
29
-
30
- ### 3️ Configure App Resources
31
- - **Webhooks** for real-time updates.
32
- - **Events** to trigger workflows.
33
- - **Authentication** via API keys or OAuth.
34
-
35
- ### 4️ Create Products & Add Apps
36
- Group apps, resources, and features into a **product** for seamless interoperability.
37
-
38
- ### 5️ Define Product Resources
39
- - **Storage** (AWS S3, AZURE, GCP) **Databases** (SQL & NOSQL), **Message Brokers** (RabbitMQ, AWS SQS, Redis, Kafka, Google PubSub).
40
- - **Third-Party API Integrations, Notifications, Background Jobs.**
41
- - **Features & Workflows** to automate actions.
42
-
43
- ### 6️ Use in Code
44
- ```js
45
- import Ductape from "@ductape/sdk";
46
-
47
- const { processor } = new Ductape(credentials);
48
-
49
- await processor.storage.save({ env: "prd", product: "myApp", event: "bucket-name", input: { blob, fileName: "text.txt" } });
50
-
51
- await processor.messageBroker.publish({ env: "prd", product: "myApp", event: "queue:topic", input: { message: { orderId: 12345 } } });
52
- ```
53
-
54
- ## 📖 Documentation
55
- Find detailed usage at [docs.ductape.app](https://docs.ductape.app).
56
-
57
- ## 📄 License
58
- Ductape is **MIT-licensed**. Made with ❤️ by **Ductape Technologies**.
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ Initialize the client with your **access key** (and optional `env_type`). Then use the namespaced APIs: `messaging`, `storage`, `sessions`, `databases`, etc.
14
+
15
+ ```ts
16
+ import Ductape from '@ductape/sdk';
17
+
18
+ const ductape = new Ductape({
19
+ accessKey: 'your-access-key',
20
+ });
21
+
22
+ // Message brokers: produce and consume
23
+ await ductape.messaging.produce({
24
+ product: 'my-product',
25
+ env: 'prd',
26
+ event: 'order-events:order-created',
27
+ message: { orderId: '123', amount: 99.99 },
28
+ });
29
+
30
+ await ductape.messaging.consume({
31
+ product: 'my-product',
32
+ env: 'prd',
33
+ event: 'order-events:order-created',
34
+ callback: async (msg) => console.log(msg),
35
+ });
36
+
37
+ // Storage: upload, download, list files
38
+ const uploadResult = await ductape.storage.upload({
39
+ product: 'my-product',
40
+ env: 'prd',
41
+ storage: 'main-storage',
42
+ fileName: 'reports/file.pdf',
43
+ buffer: fileBuffer,
44
+ mimeType: 'application/pdf',
45
+ });
46
+
47
+ // Sessions: start, verify, refresh
48
+ const session = await ductape.sessions.start({
49
+ product: 'my-product',
50
+ env: 'prd',
51
+ tag: 'user-session',
52
+ data: { userId: 'u1', email: 'user@example.com' },
53
+ });
54
+ // session.token, session.refreshToken, session.sessionId
55
+ ```
56
+
57
+ ## What you can do
58
+
59
+ - **Messaging** - `ductape.messaging.produce()`, `consume()`, `list()`, `fetch()`, `topics.create()`, etc. (Kafka, RabbitMQ, Redis, SQS, Pub/Sub, NATS)
60
+ - **Storage** - `ductape.storage.upload()`, `download()`, `remove()`, `listFiles()`, `getSignedUrl()`, `stats()` (AWS S3, GCP, Azure)
61
+ - **Sessions** - `ductape.sessions.start()`, `verify()`, `refresh()`, `revoke()`, `listActive()` (JWT-based)
62
+ - **Databases** - relational, graph, vector (via `ductape.databases`, `ductape.graph`, `ductape.vector`)
63
+ - **Warehouse** - unified query across relational, graph, and vector (via `ductape.warehouse`)
64
+ - **Caching** - multi-tier cache with product-scoped tags (`ductape.cache`)
65
+ - **Agents** - LLM agents with tools, memory, and multi-agent flows (`ductape.agents`)
66
+ - **Resilience** - quotas, fallbacks, health checks (`ductape.quota`, `ductape.fallback`, `ductape.healthcheck`)
67
+ - **Workflows** - define and run workflows with steps that call actions, storage, messaging, etc.
68
+ - **Jobs** - schedule and run background jobs
69
+ - **Notifications** - email, SMS, push (multiple providers), callbacks
70
+ - **Secrets** - store and resolve secrets per environment
71
+
72
+ ## Environment
73
+
74
+ The SDK is intended for **Node.js** (server). Browser use is not supported for broker, storage, and similar operations.
75
+
76
+ ## Documentation
77
+
78
+ Full docs: [docs.ductape.app](https://docs.ductape.app)
79
+
80
+ - [Message Brokers](https://docs.ductape.app/message-brokers/overview)
81
+ - [Storage](https://docs.ductape.app/storage/overview)
82
+ - [Sessions](https://docs.ductape.app/sessions/overview)
83
+ - [Databases](https://docs.ductape.app/databases/relational/getting-started)
84
+ - [Warehouse](https://docs.ductape.app/databases/warehouse/getting-started)
85
+ - [Caching](https://docs.ductape.app/caching/overview)
86
+ - [Agents](https://docs.ductape.app/agents/overview)
87
+ - [Resilience](https://docs.ductape.app/resilience/overview)
88
+ - [Workflows](https://docs.ductape.app/workflows/overview)
89
+
90
+ ## License
91
+
92
+ MIT © Ductape Technologies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "sdk for building ductaped products",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",