samva 0.3.0 → 0.5.0

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 (54) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +5 -1
  3. package/dist/{categories-CsUa8ojo.js → categories-B9Nw2v_F.js} +5 -1
  4. package/dist/client/sdk.gen.d.ts +312 -190
  5. package/dist/client/types.gen.d.ts +2284 -728
  6. package/dist/{client-BOghX8fr.js → client-B7gEkvEq.js} +2740 -1036
  7. package/dist/client-attribution-B2yJBXdZ.js +9 -0
  8. package/dist/client-attribution.d.ts +2 -0
  9. package/dist/effect/api-keys.d.ts +51 -51
  10. package/dist/effect/api-keys.js +1 -1
  11. package/dist/effect/campaigns.d.ts +269 -219
  12. package/dist/effect/campaigns.js +1 -1
  13. package/dist/effect/categories.d.ts +6 -6
  14. package/dist/effect/categories.js +1 -1
  15. package/dist/effect/client.js +1 -1
  16. package/dist/effect/contacts.d.ts +225 -225
  17. package/dist/effect/contacts.js +1 -1
  18. package/dist/effect/conversations.d.ts +308 -293
  19. package/dist/effect/conversations.js +1 -1
  20. package/dist/effect/design.d.ts +76 -76
  21. package/dist/effect/design.js +1 -1
  22. package/dist/effect/email.d.ts +923 -213
  23. package/dist/effect/email.js +27 -3
  24. package/dist/effect/generated-metadata.d.ts +4 -0
  25. package/dist/effect/generated.d.ts +14948 -10919
  26. package/dist/effect/index.js +2 -2
  27. package/dist/effect/internal/client.d.ts +1 -1
  28. package/dist/effect/internal/operation.d.ts +31 -20
  29. package/dist/effect/media.d.ts +12 -12
  30. package/dist/effect/media.js +1 -1
  31. package/dist/effect/messages.d.ts +243 -61
  32. package/dist/effect/messages.js +5 -3
  33. package/dist/effect/operations.d.ts +17 -17
  34. package/dist/effect/operations.js +1 -1
  35. package/dist/effect/organizations.d.ts +162 -162
  36. package/dist/effect/organizations.js +1 -1
  37. package/dist/effect/retry.js +1 -1
  38. package/dist/effect/runtime.d.ts +0 -2
  39. package/dist/effect/scheduled-messages.d.ts +375 -277
  40. package/dist/effect/scheduled-messages.js +5 -3
  41. package/dist/effect/templates.d.ts +1383 -1554
  42. package/dist/effect/templates.js +40 -30
  43. package/dist/effect/webhooks.d.ts +81 -47
  44. package/dist/effect/webhooks.js +2 -2
  45. package/dist/index.js +2 -2
  46. package/dist/{normalize-BKFjbR9t.js → normalize-BiIJnycv.js} +2 -3
  47. package/dist/{operation-C2Q4cFJL.js → operation-B4FjN6wq.js} +113 -38
  48. package/dist/promises/errors.gen.d.ts +21 -2
  49. package/dist/promises/index.d.ts +11 -8
  50. package/dist/promises/index.js +2 -2
  51. package/dist/promises/types.gen.d.ts +1 -1
  52. package/dist/{promises-oiy7mOyu.js → promises-CP_nxUus.js} +828 -306
  53. package/dist/service-map.d.ts +136 -44
  54. package/package.json +13 -14
package/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ required.
6
6
 
7
7
  Effect applications should import Pascal-cased domain modules from focused subpaths such as
8
8
  `samva/effect/email` and provide `Client.layerFetch` from `samva/effect/client`. Install the optional
9
- peer `effect@4.0.0-rc.111` when using those entrypoints. Keep that exact release candidate pinned. Tagged API
9
+ peer `effect@4.0.0-rc.112` when using those entrypoints. Keep that exact release candidate pinned. Tagged API
10
10
  failures remain in the Effect error channel and can be handled with `Effect.catchTag`.
11
11
 
12
12
  Treat exported request and response types as the API contract. Do not import package-internal files
package/README.md CHANGED
@@ -65,7 +65,7 @@ const messages = await client.messages.list({
65
65
  Install `effect` next to `samva` when using the Effect entrypoint:
66
66
 
67
67
  ```bash
68
- bun add samva effect@4.0.0-rc.111
68
+ bun add samva effect@4.0.0-rc.112
69
69
  ```
70
70
 
71
71
  ```typescript
@@ -114,6 +114,10 @@ const client = createClient({
114
114
 
115
115
  For terminal workflows (`samva login`, `samva org use`, `samva email send --dry-run`), see the [`@samva/cli` README](https://github.com/AryaLabsHQ/samva/tree/main/packages/cli).
116
116
 
117
+ The Promise and Effect clients identify their public SDK surface and package version with the
118
+ advisory `x-samva-client` request header. Supply your own value in `headers`, or set the header to
119
+ `null` in Promise request options or `undefined` in Effect client configuration to omit it.
120
+
117
121
  ## Service Surface
118
122
 
119
123
  The Promise client exposes:
@@ -30,6 +30,10 @@ const SamvaErrorMetadata = {
30
30
  categories: ["transient"],
31
31
  retryable: true
32
32
  },
33
+ OnboardingReviewRequiredError: {
34
+ categories: ["validation"],
35
+ retryable: false
36
+ },
33
37
  PaymentRequiredError: {
34
38
  categories: ["billing"],
35
39
  retryable: false
@@ -140,4 +144,4 @@ const catchTransient = (handler) => (effect) => Effect.catchIf(effect, (error) =
140
144
  //#endregion
141
145
  export { isTransient as _, catchNotFoundError as a, catchValidationError as c, isAuthError as d, isBillingError as f, isThrottlingError as g, isRetryable as h, catchConflictError as i, categoriesOf as l, isNotFoundError as m, catchBillingError as n, catchThrottlingError as o, isConflictError as p, catchCategory as r, catchTransient as s, catchAuthError as t, hasCategory as u, isValidationError as v };
142
146
 
143
- //# sourceMappingURL=categories-CsUa8ojo.js.map
147
+ //# sourceMappingURL=categories-B9Nw2v_F.js.map