samva 0.16.0 → 0.17.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 (127) hide show
  1. package/AGENTS.md +4 -1
  2. package/README.md +44 -1
  3. package/dist/analytics-CaqPRsry.js +207 -0
  4. package/dist/api-keys-Ce1Y4_Ip.js +274 -0
  5. package/dist/attachments-DYqVIraC.js +140 -0
  6. package/dist/brands-ZwuOGIWO.js +175 -0
  7. package/dist/campaigns-DZlz1E9E.js +522 -0
  8. package/dist/categories-CA4XIQAb.js +1011 -0
  9. package/dist/client/sdk.gen.d.ts +174 -3
  10. package/dist/client/types.gen.d.ts +1126 -11
  11. package/dist/client-DOzUrdTE.js +1115 -0
  12. package/dist/contact-groups-BLbFXnjq.js +446 -0
  13. package/dist/contacts-BbsoXXB4.js +787 -0
  14. package/dist/conversations-_sRHueML.js +494 -0
  15. package/dist/custom-fields-BHWbwlKn.js +176 -0
  16. package/dist/effect/analytics.js +2 -21
  17. package/dist/effect/api-keys.d.ts +1 -1
  18. package/dist/effect/api-keys.js +2 -28
  19. package/dist/effect/attachments.js +2 -17
  20. package/dist/effect/brands.d.ts +1 -1
  21. package/dist/effect/brands.js +3 -24
  22. package/dist/effect/campaigns.js +2 -33
  23. package/dist/effect/categories.js +1 -1
  24. package/dist/effect/client.d.ts +1 -1
  25. package/dist/effect/client.js +3 -4
  26. package/dist/effect/contact-groups.js +2 -29
  27. package/dist/effect/contacts.d.ts +52 -0
  28. package/dist/effect/contacts.js +2 -47
  29. package/dist/effect/conversations.js +2 -35
  30. package/dist/effect/custom-fields.js +2 -17
  31. package/dist/effect/email.d.ts +3 -2
  32. package/dist/effect/email.js +2 -137
  33. package/dist/effect/events.d.ts +121 -0
  34. package/dist/effect/events.js +3 -0
  35. package/dist/effect/extension-installations.js +2 -27
  36. package/dist/effect/extensions.js +2 -19
  37. package/dist/effect/feedback.d.ts +1 -1
  38. package/dist/effect/feedback.js +3 -13
  39. package/dist/effect/generated/analytics.d.ts +715 -0
  40. package/dist/effect/generated/api-keys.d.ts +1627 -0
  41. package/dist/effect/generated/attachments.d.ts +554 -0
  42. package/dist/effect/generated/brands.d.ts +1118 -0
  43. package/dist/effect/generated/campaigns.d.ts +3783 -0
  44. package/dist/effect/generated/contact-events.d.ts +158 -0
  45. package/dist/effect/generated/contact-groups.d.ts +1445 -0
  46. package/dist/effect/generated/contacts.d.ts +3789 -0
  47. package/dist/effect/generated/conversations.d.ts +2870 -0
  48. package/dist/effect/generated/custom-fields.d.ts +562 -0
  49. package/dist/effect/generated/email.d.ts +10622 -0
  50. package/dist/effect/generated/events.d.ts +463 -0
  51. package/dist/effect/generated/extension-installations.d.ts +1786 -0
  52. package/dist/effect/generated/extensions.d.ts +927 -0
  53. package/dist/effect/generated/feedback.d.ts +116 -0
  54. package/dist/effect/generated/index.d.ts +61 -0
  55. package/dist/effect/generated/journeys.d.ts +6135 -0
  56. package/dist/effect/generated/mailboxes.d.ts +13641 -0
  57. package/dist/effect/generated/media.d.ts +741 -0
  58. package/dist/effect/generated/messages.d.ts +2355 -0
  59. package/dist/effect/generated/namespaces.d.ts +654 -0
  60. package/dist/effect/generated/operations.d.ts +514 -0
  61. package/dist/effect/generated/organizations.d.ts +1111 -0
  62. package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
  63. package/dist/effect/generated/shared.d.ts +3250 -0
  64. package/dist/effect/generated/subscriptions.d.ts +188 -0
  65. package/dist/effect/generated/templates.d.ts +8177 -0
  66. package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
  67. package/dist/effect/generated/webhooks.d.ts +1697 -0
  68. package/dist/effect/generated/whoami.d.ts +291 -0
  69. package/dist/effect/generated-metadata.d.ts +1627 -0
  70. package/dist/effect/index.d.ts +3 -1
  71. package/dist/effect/index.js +29 -27
  72. package/dist/effect/internal/client.d.ts +10 -7
  73. package/dist/effect/internal/email-sender.d.ts +17 -0
  74. package/dist/effect/internal/operation.d.ts +12 -72
  75. package/dist/effect/internal/send.d.ts +60 -0
  76. package/dist/effect/journeys.d.ts +2153 -0
  77. package/dist/effect/journeys.js +2 -0
  78. package/dist/effect/mailboxes.d.ts +112 -112
  79. package/dist/effect/mailboxes.js +1 -1
  80. package/dist/effect/media.js +3 -1
  81. package/dist/effect/messages.d.ts +2 -2
  82. package/dist/effect/messages.js +3 -1
  83. package/dist/effect/namespaces.js +2 -19
  84. package/dist/effect/operations.js +2 -15
  85. package/dist/effect/organizations.js +2 -23
  86. package/dist/effect/retry.js +1 -1
  87. package/dist/effect/scheduled-messages.js +2 -19
  88. package/dist/effect/subscriptions.js +2 -9
  89. package/dist/effect/templates.d.ts +1 -1
  90. package/dist/effect/templates.js +3 -78
  91. package/dist/effect/unsubscribe-groups.js +2 -27
  92. package/dist/effect/webhooks.d.ts +9 -9
  93. package/dist/effect/webhooks.js +3 -33
  94. package/dist/effect/whoami.d.ts +8 -8
  95. package/dist/effect/whoami.js +2 -9
  96. package/dist/email-R0NAA9PW.js +2498 -0
  97. package/dist/events-CxbTUHYT.js +82 -0
  98. package/dist/extension-installations-CD94LPmk.js +407 -0
  99. package/dist/extensions-BKyNQLvu.js +220 -0
  100. package/dist/feedback-Bpa09JOS.js +52 -0
  101. package/dist/index.js +2 -2
  102. package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments-Bi1hDltp.js} +2 -2
  103. package/dist/journeys-CARo_BJT.js +499 -0
  104. package/dist/mailboxes-BRDn7BIK.js +2470 -0
  105. package/dist/media-VrrtNnft.js +181 -0
  106. package/dist/namespaces-CcvEbG-y.js +152 -0
  107. package/dist/{operation-BTXjPrwf.js → operation-n_IYgNVK.js} +75 -90
  108. package/dist/operations-CmB3FHwf.js +93 -0
  109. package/dist/organizations-A-plufWc.js +252 -0
  110. package/dist/promises/index.d.ts +7 -3
  111. package/dist/promises/index.js +2 -2
  112. package/dist/promises/types.gen.d.ts +1 -1
  113. package/dist/{promises-KrA2nSLg.js → promises---Kbh-7z.js} +467 -3
  114. package/dist/runtime-P0l1_2-C.js +25 -0
  115. package/dist/scheduled-messages-DkKZRRaN.js +207 -0
  116. package/dist/send-Bxc0XfGE.js +722 -0
  117. package/dist/service-map.d.ts +85 -0
  118. package/dist/subscriptions-DEXYtMXg.js +67 -0
  119. package/dist/templates-DZomxsG7.js +2289 -0
  120. package/dist/unsubscribe-groups-Iqk4Isf9.js +291 -0
  121. package/dist/webhooks-CPXuu8Xf.js +530 -0
  122. package/dist/whoami-Ccz0jwlt.js +59 -0
  123. package/package.json +13 -3
  124. package/dist/categories-DV51kr2H.js +0 -187
  125. package/dist/client-BMUew5Wp.js +0 -13794
  126. package/dist/effect/generated.d.ts +0 -64004
  127. package/dist/mailboxes-Thp5z0oX.js +0 -161
@@ -82,6 +82,7 @@ export declare const SDK_SERVICE_OPERATIONS: {
82
82
  readonly export: "contactsExport";
83
83
  readonly getActivityTimeline: "contactsGetActivityTimeline";
84
84
  readonly getGroupMemberships: "contactsGetGroupMemberships";
85
+ readonly listEvents: "contactEventsListEvents";
85
86
  };
86
87
  readonly conversations: {
87
88
  readonly list: "conversationsList";
@@ -169,9 +170,29 @@ export declare const SDK_SERVICE_OPERATIONS: {
169
170
  readonly updateForwardingRule: "emailUpdateForwardingRule";
170
171
  readonly getForwardingLog: "emailGetForwardingLog";
171
172
  };
173
+ readonly events: {
174
+ readonly create: "eventsCreate";
175
+ readonly batch: "eventsBatch";
176
+ };
172
177
  readonly feedback: {
173
178
  readonly send: "feedbackSend";
174
179
  };
180
+ readonly journeys: {
181
+ readonly list: "journeysList";
182
+ readonly create: "journeysCreate";
183
+ readonly get: "journeysGet";
184
+ readonly update: "journeysUpdate";
185
+ readonly remove: "journeysRemove";
186
+ readonly replaceDraft: "journeysReplaceDraft";
187
+ readonly publish: "journeysPublish";
188
+ readonly pause: "journeysPause";
189
+ readonly resume: "journeysResume";
190
+ readonly archive: "journeysArchive";
191
+ readonly getVersion: "journeysGetVersion";
192
+ readonly stats: "journeysStats";
193
+ readonly listRuns: "journeysListRuns";
194
+ readonly getRun: "journeysGetRun";
195
+ };
175
196
  readonly messages: {
176
197
  readonly list: "messagesList";
177
198
  readonly send: "messagesSend";
@@ -793,6 +814,70 @@ export declare const SDK_OPERATION_CALLS: {
793
814
  readonly kind: "pathPayload";
794
815
  readonly paths: readonly ["id"];
795
816
  };
817
+ readonly journeysList: {
818
+ readonly kind: "params";
819
+ };
820
+ readonly journeysCreate: {
821
+ readonly kind: "payload";
822
+ };
823
+ readonly journeysGet: {
824
+ readonly kind: "path";
825
+ readonly paths: readonly ["id"];
826
+ };
827
+ readonly journeysUpdate: {
828
+ readonly kind: "pathPayload";
829
+ readonly paths: readonly ["id"];
830
+ };
831
+ readonly journeysRemove: {
832
+ readonly kind: "path";
833
+ readonly paths: readonly ["id"];
834
+ };
835
+ readonly journeysReplaceDraft: {
836
+ readonly kind: "pathPayload";
837
+ readonly paths: readonly ["id"];
838
+ };
839
+ readonly journeysPublish: {
840
+ readonly kind: "pathPayload";
841
+ readonly paths: readonly ["id"];
842
+ };
843
+ readonly journeysPause: {
844
+ readonly kind: "path";
845
+ readonly paths: readonly ["id"];
846
+ };
847
+ readonly journeysResume: {
848
+ readonly kind: "path";
849
+ readonly paths: readonly ["id"];
850
+ };
851
+ readonly journeysArchive: {
852
+ readonly kind: "path";
853
+ readonly paths: readonly ["id"];
854
+ };
855
+ readonly journeysGetVersion: {
856
+ readonly kind: "path";
857
+ readonly paths: readonly ["id", "version"];
858
+ };
859
+ readonly journeysStats: {
860
+ readonly kind: "pathParams";
861
+ readonly paths: readonly ["id"];
862
+ };
863
+ readonly journeysListRuns: {
864
+ readonly kind: "pathParams";
865
+ readonly paths: readonly ["id"];
866
+ };
867
+ readonly journeysGetRun: {
868
+ readonly kind: "path";
869
+ readonly paths: readonly ["id", "runId"];
870
+ };
871
+ readonly eventsCreate: {
872
+ readonly kind: "payload";
873
+ };
874
+ readonly eventsBatch: {
875
+ readonly kind: "payload";
876
+ };
877
+ readonly contactEventsListEvents: {
878
+ readonly kind: "pathParams";
879
+ readonly paths: readonly ["id"];
880
+ };
796
881
  readonly contactsList: {
797
882
  readonly kind: "params";
798
883
  };
@@ -0,0 +1,67 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { G as FlagDisabledError, Jt as UnauthorizedError, K as ForbiddenError, Lt as ResourceNotFoundError, Nt as PaymentRequiredError, O as DeliveryUnavailableError, Ot as OnboardingReviewRequiredError, Pt as RateLimitedError, U as ExternalServiceError, Y as InternalError, Yt as UnsubscribeId, _ as ContactGroupId, en as ValidationError, l as BillingProviderError, m as ConflictError, p as CampaignFooterRequiredError, q as GatewayTimeoutError, s as ApiKeySecurityMiddleware, u as BrandAddressRequiredError, zt as SenderNotReadyError } from "./client-DOzUrdTE.js";
3
+ import { n as forGroup } from "./operation-n_IYgNVK.js";
4
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
5
+ import * as Schema from "effect/Schema";
6
+ //#region src/effect/generated/subscriptions.ts
7
+ const SubscribeResult = /* @__PURE__ */ Schema.Struct({
8
+ success: Schema.Boolean,
9
+ expiresAt: Schema.String
10
+ }).annotate({ identifier: "SubscribeResult" });
11
+ const SubscriptionsSubscribeRequestJson = /* @__PURE__ */ Schema.Struct({
12
+ email: Schema.String.annotate({ description: "The recipient email address; confirmation proves consent for this address." }).check(Schema.isMaxCodePoints(320).annotate({ expected: "a string with at most 320 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })).check(Schema.isMaxLength(320).annotate({ expected: "a value with a length of at most 320" })),
13
+ contactGroupId: ContactGroupId,
14
+ from: Schema.Struct({
15
+ email: Schema.String,
16
+ name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
17
+ }).annotate({ description: "Your verified email sender. The ordinary send pipeline selects its domain and customer brand." }),
18
+ unsubscribeGroupId: Schema.optionalKey(Schema.Union([UnsubscribeId, Schema.Null]).annotate({ description: "Clear this unsubscribe group after confirmation; all other opt-outs remain." })),
19
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "A published email template slug receiving confirmUrl. Omit it to send the default confirmation email." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
20
+ consentIp: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The recipient IP recorded by your server when they requested subscription." }).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
21
+ consentSource: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The signup page or source recorded by your server when consent was requested." }).check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null]))
22
+ });
23
+ const SubscriptionsSubscribe200 = SubscribeResult;
24
+ const SubscriptionsSubscribe401 = UnauthorizedError;
25
+ const SubscriptionsSubscribe402 = PaymentRequiredError;
26
+ const SubscriptionsSubscribe403 = /* @__PURE__ */ Schema.Union([
27
+ ForbiddenError,
28
+ OnboardingReviewRequiredError,
29
+ FlagDisabledError
30
+ ]);
31
+ const SubscriptionsSubscribe404 = ResourceNotFoundError;
32
+ const SubscriptionsSubscribe409 = ConflictError;
33
+ const SubscriptionsSubscribe422 = /* @__PURE__ */ Schema.Union([
34
+ ValidationError,
35
+ BrandAddressRequiredError,
36
+ CampaignFooterRequiredError
37
+ ]);
38
+ const SubscriptionsSubscribe429 = RateLimitedError;
39
+ const SubscriptionsSubscribe500 = InternalError;
40
+ const SubscriptionsSubscribe502 = /* @__PURE__ */ Schema.Union([BillingProviderError, ExternalServiceError]);
41
+ const SubscriptionsSubscribe503 = /* @__PURE__ */ Schema.Union([SenderNotReadyError, DeliveryUnavailableError]);
42
+ const SubscriptionsSubscribe504 = GatewayTimeoutError;
43
+ var SubscriptionsGroup = class extends HttpApiGroup.make("Subscriptions").add(HttpApiEndpoint.post("subscriptionsSubscribe", "/v1/subscriptions", {
44
+ payload: SubscriptionsSubscribeRequestJson,
45
+ success: SubscriptionsSubscribe200,
46
+ error: [
47
+ SubscriptionsSubscribe401.pipe(HttpApiSchema.status(401)),
48
+ SubscriptionsSubscribe402.pipe(HttpApiSchema.status(402)),
49
+ SubscriptionsSubscribe403.pipe(HttpApiSchema.status(403)),
50
+ SubscriptionsSubscribe404.pipe(HttpApiSchema.status(404)),
51
+ SubscriptionsSubscribe409.pipe(HttpApiSchema.status(409)),
52
+ SubscriptionsSubscribe422.pipe(HttpApiSchema.status(422)),
53
+ SubscriptionsSubscribe429.pipe(HttpApiSchema.status(429)),
54
+ SubscriptionsSubscribe500,
55
+ SubscriptionsSubscribe502.pipe(HttpApiSchema.status(502)),
56
+ SubscriptionsSubscribe503.pipe(HttpApiSchema.status(503)),
57
+ SubscriptionsSubscribe504.pipe(HttpApiSchema.status(504))
58
+ ]
59
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "subscriptions.subscribe").annotate(OpenApi.Summary, "Request subscription confirmation").annotate(OpenApi.Description, "Sends a confirmation email from your sender. Only the recipient's explicit confirmation adds them to the active static contact group and clears the optional unsubscribe group. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the optional unsubscribe preference change.")).annotate(OpenApi.Description, "Recipient-confirmed contact list subscriptions") {};
60
+ //#endregion
61
+ //#region src/effect/subscriptions.ts
62
+ var subscriptions_exports = /* @__PURE__ */ __exportAll({ subscribe: () => subscribe });
63
+ const subscribe = forGroup(SubscriptionsGroup)("subscriptionsSubscribe");
64
+ //#endregion
65
+ export { subscriptions_exports as n, subscribe as t };
66
+
67
+ //# sourceMappingURL=subscriptions-DEXYtMXg.js.map