samva 0.43.2 → 0.43.3

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 CHANGED
@@ -13,8 +13,9 @@ import { createClient } from "samva";
13
13
 
14
14
  const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
15
15
 
16
+ const { organization } = await samva.whoami.get();
16
17
  const mailbox = await samva.mailboxes.create({
17
- endpoint: { channel: "email", address: "support@acme.samva.email" },
18
+ endpoint: { channel: "email", address: `support@${organization.hostedMailDomain}` },
18
19
  name: "Support",
19
20
  });
20
21
 
@@ -29,9 +30,9 @@ console.log(receipt.state);
29
30
 
30
31
  Replies arrive as signed webhooks or over the mailbox event stream, threaded to the conversation. Give
31
32
  the agent a key that reaches only its own mailbox, and set rules that hold a send for a person to
32
- approve: see [Give an agent an inbox](https://samva.dev/docs/mailboxes). To drive the same mailbox
33
+ approve: see [Give an agent an inbox](https://samva.dev/docs/mailboxes?utm_source=readme&utm_medium=sdk). To drive the same mailbox
33
34
  from an MCP client instead, connect it to `https://mcp.samva.dev`
34
- ([guide](https://samva.dev/docs/developers/mcp)).
35
+ ([guide](https://samva.dev/docs/developers/mcp?utm_source=readme&utm_medium=sdk)).
35
36
 
36
37
  ## Documentation
37
38
 
@@ -255,7 +256,7 @@ The Promise client exposes:
255
256
  - `webhooks`
256
257
  - `whoami`
257
258
 
258
- The Effect SDK exposes Pascal-cased domain modules; see the [namespace reference](https://samva.dev/docs/developers/typescript-sdk#namespaces) for their import paths.
259
+ The Effect SDK exposes Pascal-cased domain modules; see the [namespace reference](https://samva.dev/docs/developers/typescript-sdk?utm_source=readme&utm_medium=sdk#namespaces) for their import paths.
259
260
 
260
261
  Effect operations take direct parameter objects: body, path, and query fields are not wrapped in `payload` or `params` envelopes. Import the modules you use from `samva/effect/<lower-kebab>` and provide `Client.layerFetch` once at the program boundary.
261
262
 
@@ -539,7 +540,7 @@ completed, and `notSent` replays return `200`. Non-send approvals execute synchr
539
540
  `200`, as does `denyAction`.
540
541
  The same behavior applies to `samva/effect/mailboxes`.
541
542
 
542
- See [mailbox approvals and receipts](https://samva.dev/docs/mailboxes/approvals) for the receipt
543
+ See [mailbox approvals and receipts](https://samva.dev/docs/mailboxes/approvals?utm_source=readme&utm_medium=sdk) for the receipt
543
544
  fields, sending deadline, approval permissions, and idempotency retention.
544
545
 
545
546
  ### Read Mailbox Events
@@ -1570,6 +1570,10 @@ export type WhoamiOrganization = {
1570
1570
  id: OrganizationId;
1571
1571
  slug: string;
1572
1572
  name: string;
1573
+ /**
1574
+ * The organization’s hosted mail domain. Create mailbox addresses on this domain without adding or verifying a custom domain. It may differ from the organization slug.
1575
+ */
1576
+ hostedMailDomain: string;
1573
1577
  };
1574
1578
  export type FeedbackReceipt = {
1575
1579
  id: FeedbackId;
@@ -15,11 +15,13 @@ export type WhoamiOrganization = {
15
15
  readonly id: OrganizationId;
16
16
  readonly slug: string;
17
17
  readonly name: string;
18
+ readonly hostedMailDomain: string;
18
19
  };
19
20
  export declare const WhoamiOrganization: Schema.Struct<{
20
21
  readonly id: Schema.brand<Schema.String, "OrganizationId">;
21
22
  readonly slug: Schema.String;
22
23
  readonly name: Schema.String;
24
+ readonly hostedMailDomain: Schema.String;
23
25
  }>;
24
26
  export type WhoamiUserCredential = {
25
27
  readonly type: "user";
@@ -85,6 +87,7 @@ export declare const Whoami: Schema.Struct<{
85
87
  readonly id: Schema.brand<Schema.String, "OrganizationId">;
86
88
  readonly slug: Schema.String;
87
89
  readonly name: Schema.String;
90
+ readonly hostedMailDomain: Schema.String;
88
91
  }>;
89
92
  readonly credential: Schema.Union<readonly [Schema.Struct<{
90
93
  readonly type: Schema.Literal<"apiKey">;
@@ -135,6 +138,7 @@ export declare const WhoamiGet200: Schema.Struct<{
135
138
  readonly id: Schema.brand<Schema.String, "OrganizationId">;
136
139
  readonly slug: Schema.String;
137
140
  readonly name: Schema.String;
141
+ readonly hostedMailDomain: Schema.String;
138
142
  }>;
139
143
  readonly credential: Schema.Union<readonly [Schema.Struct<{
140
144
  readonly type: Schema.Literal<"apiKey">;
@@ -196,6 +200,7 @@ declare const WhoamiGroup_base: HttpApiGroup.HttpApiGroup<"Whoami", HttpApiEndpo
196
200
  readonly id: Schema.brand<Schema.String, "OrganizationId">;
197
201
  readonly slug: Schema.String;
198
202
  readonly name: Schema.String;
203
+ readonly hostedMailDomain: Schema.String;
199
204
  }>;
200
205
  readonly credential: Schema.Union<readonly [Schema.Struct<{
201
206
  readonly type: Schema.Literal<"apiKey">;
@@ -10,7 +10,8 @@ const WhoamiUser = /* @__PURE__ */ (() => Schema.Struct({
10
10
  const WhoamiOrganization = /* @__PURE__ */ (() => Schema.Struct({
11
11
  id: OrganizationId,
12
12
  slug: Schema.String,
13
- name: Schema.String
13
+ name: Schema.String,
14
+ hostedMailDomain: Schema.String.annotate({ description: "The organization’s hosted mail domain. Create mailbox addresses on this domain without adding or verifying a custom domain. It may differ from the organization slug." })
14
15
  }).annotate({ identifier: "WhoamiOrganization" }))();
15
16
  const WhoamiUserCredential = /* @__PURE__ */ (() => Schema.Struct({
16
17
  type: Schema.Literal("user"),
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.43.2";
2
+ var version = "0.43.3";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samva",
3
- "version": "0.43.2",
3
+ "version": "0.43.3",
4
4
  "description": "TypeScript SDK for the Samva email and WhatsApp API",
5
5
  "keywords": [
6
6
  "api-client",
@@ -237,7 +237,7 @@
237
237
  "typecheck": "effect-tsgo tsrs --noEmit && effect-tsgo tsrs --noEmit -p codegen/tsconfig.json && effect-tsgo tsrs --noEmit -p tests/tsconfig.json && effect-tsgo tsrs --noEmit --project tests/parity/tsconfig.json"
238
238
  },
239
239
  "dependencies": {
240
- "@samva/webhooks": "0.43.2"
240
+ "@samva/webhooks": "0.43.3"
241
241
  },
242
242
  "devDependencies": {
243
243
  "@effect/openapi-generator": "^4.1.2",