productcraft 0.0.4 → 0.0.8

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 +14 -10
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -13,10 +13,10 @@ Install **`productcraft`** when you call more than one ProductCraft API from the
13
13
  Install the **per-product packages** when you only need one:
14
14
 
15
15
  - `@productcraft/heimdall` — customer auth + EndUsers
16
- - `@productcraft/envoi` — transactional email
17
- - `@productcraft/rally` — waitlists
18
- - `@productcraft/agora` — communities, posts, feeds, stories, moderation
19
- - `@productcraft/platform-auth` — workspace administration
16
+ - `@productcraft/envoi` — receive-and-store mail: template sends, mailboxes, domains + DKIM, webhooks
17
+ - `@productcraft/rally` — waitlists: public-form signups, variants, referrals, leaderboard, approvals, signed webhooks
18
+ - `@productcraft/agora` — social-as-a-service: communities, posts, feeds, stories, conversations, notifications, moderation
19
+ - `@productcraft/platform-auth` — PlatformUser auth + workspaces + members + roles + IAM policies + PAKs + introspect
20
20
 
21
21
  The per-product packages are leaner (no bundled deps for the surfaces you don't use).
22
22
 
@@ -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.4",
3
+ "version": "0.0.8",
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.4",
50
- "@productcraft/envoi": "^0.0.3",
49
+ "@productcraft/agora": "^0.0.6",
51
50
  "@productcraft/core": "^0.0.3",
52
- "@productcraft/platform-auth": "^0.0.3",
53
- "@productcraft/rally": "^0.0.3",
54
- "@productcraft/heimdall": "^0.1.0"
51
+ "@productcraft/envoi": "^0.0.5",
52
+ "@productcraft/heimdall": "^0.2.1",
53
+ "@productcraft/platform-auth": "^0.0.5",
54
+ "@productcraft/rally": "^0.0.5"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",