productcraft 0.0.7 → 0.0.9

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 +10 -6
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -36,16 +36,20 @@ const tokens = await consumer.auth.signin({
36
36
  password: "...",
37
37
  });
38
38
 
39
- // Envoi — send a transactional email from the same backend
39
+ // Envoi — send a template-rendered transactional email from the same backend.
40
+ // The mailboxes-keyed send path does not exist; sends are workspace-scoped
41
+ // template renders.
40
42
  await pc.envoi.client.POST(
41
- "/v1/mailboxes/{mailboxId}/messages/send",
43
+ "/v1/workspaces/{workspace_id}/templates/{name}/send",
42
44
  {
43
- params: { path: { mailboxId: "mbx_..." } },
45
+ params: {
46
+ path: { workspace_id: "<workspace-uuid>", name: "welcome" },
47
+ header: { "Idempotency-Key": "welcome-2026-05-22-alice" },
48
+ },
44
49
  body: {
45
- to: "alice@example.com",
46
50
  from: "hello@yourbrand.com",
47
- subject: "Welcome",
48
- html: "<p>Hi!</p>",
51
+ to: "alice@example.com",
52
+ data: { name: "Alice" },
49
53
  },
50
54
  },
51
55
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "productcraft",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "All-in-one Node.js / TypeScript SDK for the ProductCraft platform — Heimdall, Envoi, Rally, Agora, and Platform-Auth from a single import. Install per-product packages (`@productcraft/heimdall`, ...) if you only need one.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -46,12 +46,12 @@
46
46
  "provenance": true
47
47
  },
48
48
  "dependencies": {
49
- "@productcraft/agora": "^0.0.5",
49
+ "@productcraft/agora": "^0.0.6",
50
50
  "@productcraft/core": "^0.0.3",
51
- "@productcraft/envoi": "^0.0.4",
52
- "@productcraft/heimdall": "^0.2.0",
53
- "@productcraft/platform-auth": "^0.0.4",
54
- "@productcraft/rally": "^0.0.4"
51
+ "@productcraft/envoi": "^0.0.5",
52
+ "@productcraft/heimdall": "^0.3.0",
53
+ "@productcraft/platform-auth": "^0.0.5",
54
+ "@productcraft/rally": "^0.0.5"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",