samva 0.12.0 → 0.13.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 (57) hide show
  1. package/dist/{categories-DvsHUJtX.js → categories-Bcwq5jPV.js} +5 -1
  2. package/dist/client/sdk.gen.d.ts +26 -15
  3. package/dist/client/types.gen.d.ts +206 -63
  4. package/dist/{client-Cj1bqIEe.js → client-DYPNDvVU.js} +212 -63
  5. package/dist/effect/analytics.js +1 -1
  6. package/dist/effect/api-keys.js +1 -1
  7. package/dist/effect/attachments.js +1 -1
  8. package/dist/effect/brands.js +2 -2
  9. package/dist/effect/campaigns.d.ts +1 -1
  10. package/dist/effect/campaigns.js +1 -1
  11. package/dist/effect/categories.js +1 -1
  12. package/dist/effect/client.js +1 -1
  13. package/dist/effect/contact-groups.d.ts +0 -3
  14. package/dist/effect/contact-groups.js +1 -1
  15. package/dist/effect/contacts.d.ts +40 -8
  16. package/dist/effect/contacts.js +1 -1
  17. package/dist/effect/conversations.js +1 -1
  18. package/dist/effect/custom-fields.js +1 -1
  19. package/dist/effect/email.d.ts +1 -1
  20. package/dist/effect/email.js +2 -2
  21. package/dist/effect/extension-installations.d.ts +66 -0
  22. package/dist/effect/extension-installations.js +5 -3
  23. package/dist/effect/extensions.js +1 -1
  24. package/dist/effect/feedback.js +2 -2
  25. package/dist/effect/generated-metadata.d.ts +4 -0
  26. package/dist/effect/generated.d.ts +964 -309
  27. package/dist/effect/index.d.ts +1 -0
  28. package/dist/effect/index.js +5 -4
  29. package/dist/effect/internal/client.d.ts +14 -0
  30. package/dist/effect/internal/operation.d.ts +5 -2
  31. package/dist/effect/mailboxes.d.ts +6 -6
  32. package/dist/effect/mailboxes.js +1 -1
  33. package/dist/effect/media.js +1 -1
  34. package/dist/effect/messages.d.ts +2 -2
  35. package/dist/effect/messages.js +1 -1
  36. package/dist/effect/namespaces.js +1 -1
  37. package/dist/effect/operations.js +1 -1
  38. package/dist/effect/organizations.js +1 -1
  39. package/dist/effect/retry.js +1 -1
  40. package/dist/effect/scheduled-messages.d.ts +1 -1
  41. package/dist/effect/scheduled-messages.js +1 -1
  42. package/dist/effect/templates.js +2 -2
  43. package/dist/effect/unsubscribe-groups.js +1 -1
  44. package/dist/effect/webhooks.js +2 -2
  45. package/dist/index.js +3 -2
  46. package/dist/inline-attachments-B56eS0MF.js +121 -0
  47. package/dist/inline-attachments.d.ts +65 -0
  48. package/dist/{mailboxes-BtcktcNB.js → mailboxes-D3Kx7elM.js} +3 -3
  49. package/dist/{operation-BEghYyLu.js → operation-B_Ty1LG-.js} +37 -3
  50. package/dist/promises/errors.gen.d.ts +14 -2
  51. package/dist/promises/index.d.ts +1 -0
  52. package/dist/promises/index.js +3 -2
  53. package/dist/promises/types.gen.d.ts +1 -1
  54. package/dist/{promises-BzrwhHEW.js → promises-D9FJyU0q.js} +132 -14
  55. package/dist/service-map.d.ts +5 -0
  56. package/package.json +2 -2
  57. package/dist/client-attribution-BTWYSXxo.js +0 -9
@@ -1042,7 +1042,7 @@ export declare const scheduleRun: (input: {
1042
1042
  readonly memberRole: string;
1043
1043
  readonly createdAt: string;
1044
1044
  readonly updatedAt: string;
1045
- }, import("./generated").BrandAddressRequiredError | import("./generated").CampaignFooterRequiredError | import("./generated").ConflictError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1045
+ }, import("./generated").BrandAddressRequiredError | import("./generated").CampaignFooterRequiredError | import("./generated").ConflictError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").SenderNotReadyError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
1046
1046
  export declare const getRun: (input: {
1047
1047
  readonly id: string;
1048
1048
  readonly runId: string;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/campaigns.ts
4
4
  var campaigns_exports = /* @__PURE__ */ __exportAll({
5
5
  archive: () => archive,
@@ -1,2 +1,2 @@
1
- import { _ as isTransient, a as catchNotFoundError, c as catchValidationError, d as isAuthError, f as isBillingError, g as isThrottlingError, h as isRetryable, i as catchConflictError, l as categoriesOf, m as isNotFoundError, n as catchBillingError, o as catchThrottlingError, p as isConflictError, r as catchCategory, s as catchTransient, t as catchAuthError, u as hasCategory, v as isValidationError } from "../categories-DvsHUJtX.js";
1
+ import { _ as isTransient, a as catchNotFoundError, c as catchValidationError, d as isAuthError, f as isBillingError, g as isThrottlingError, h as isRetryable, i as catchConflictError, l as categoriesOf, m as isNotFoundError, n as catchBillingError, o as catchThrottlingError, p as isConflictError, r as catchCategory, s as catchTransient, t as catchAuthError, u as hasCategory, v as isValidationError } from "../categories-Bcwq5jPV.js";
2
2
  export { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { i as raw, n as layer, r as layerFetch, t as Service } from "../client-Cj1bqIEe.js";
2
+ import { i as raw, n as layer, r as layerFetch, t as Service } from "../client-DYPNDvVU.js";
3
3
  //#region src/effect/client.ts
4
4
  var client_exports = /* @__PURE__ */ __exportAll({
5
5
  Service: () => Service,
@@ -208,8 +208,6 @@ export declare const remove: (input: {
208
208
  }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
209
209
  export declare const preview: (input: {
210
210
  readonly criteria: {
211
- readonly contactTypes?: readonly string[] | null | undefined;
212
- readonly capabilities?: readonly string[] | null | undefined;
213
211
  readonly tags?: readonly string[] | null | undefined;
214
212
  readonly channels?: readonly string[] | null | undefined;
215
213
  readonly match?: string | null | undefined;
@@ -246,7 +244,6 @@ export declare const preview: (input: {
246
244
  readonly sample: readonly {
247
245
  readonly id: string & import("effect/Brand").Brand<"ContactId">;
248
246
  readonly name: string;
249
- readonly type: string;
250
247
  readonly status: string;
251
248
  }[];
252
249
  }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/contact-groups.ts
4
4
  var contact_groups_exports = /* @__PURE__ */ __exportAll({
5
5
  addMembers: () => addMembers,
@@ -691,14 +691,46 @@ export declare const getEngagement: (input: {
691
691
  export declare const bulkImport: (input: {
692
692
  readonly contacts: readonly {
693
693
  readonly name: string;
694
- readonly email?: string | null | undefined;
695
- readonly phone?: string | null | undefined;
694
+ readonly displayName?: string | null | undefined;
695
+ readonly avatar?: string | null | undefined;
696
+ readonly identities?: readonly {
697
+ readonly channel: string;
698
+ readonly identifier: string;
699
+ readonly verified?: boolean | null | undefined;
700
+ }[] | null | undefined;
701
+ readonly profile?: {
702
+ readonly firstName?: string | null | undefined;
703
+ readonly lastName?: string | null | undefined;
704
+ readonly company?: string | null | undefined;
705
+ readonly jobTitle?: string | null | undefined;
706
+ readonly location?: {
707
+ readonly country: string;
708
+ readonly state: string;
709
+ readonly city: string;
710
+ readonly timezone: string;
711
+ } | null | undefined;
712
+ readonly customFields?: {
713
+ readonly [x: string]: string | number | boolean | null | undefined;
714
+ } | null | undefined;
715
+ readonly source?: string | null | undefined;
716
+ } | null | undefined;
717
+ readonly preferences?: {
718
+ readonly preferredChannels?: readonly string[] | null | undefined;
719
+ readonly language?: string | null | undefined;
720
+ readonly timezone?: string | null | undefined;
721
+ readonly notifications?: {
722
+ readonly email?: boolean | null | undefined;
723
+ readonly quiet_hours?: {
724
+ readonly start: string;
725
+ readonly end: string;
726
+ } | null | undefined;
727
+ } | null | undefined;
728
+ } | null | undefined;
696
729
  readonly tags?: readonly string[] | null | undefined;
697
- readonly firstName?: string | null | undefined;
698
- readonly lastName?: string | null | undefined;
699
- readonly company?: string | null | undefined;
700
- readonly jobTitle?: string | null | undefined;
701
- readonly customFields?: {
730
+ readonly status?: string | null | undefined;
731
+ readonly statusReason?: string | null | undefined;
732
+ readonly externalId?: string | null | undefined;
733
+ readonly metadata?: {
702
734
  readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
703
735
  readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
704
736
  } | null)[] | {
@@ -724,7 +756,7 @@ export declare const bulkImport: (input: {
724
756
  } | null | undefined;
725
757
  } | null | undefined;
726
758
  }[];
727
- readonly upsertByEmail?: boolean | null | undefined;
759
+ readonly onConflict?: string | null | undefined;
728
760
  }) => import("effect/Effect").Effect<{
729
761
  readonly total: number;
730
762
  readonly created: number;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/contacts.ts
4
4
  var contacts_exports = /* @__PURE__ */ __exportAll({
5
5
  addIdentity: () => addIdentity,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/conversations.ts
4
4
  var conversations_exports = /* @__PURE__ */ __exportAll({
5
5
  addCategories: () => addCategories,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/custom-fields.ts
4
4
  var custom_fields_exports = /* @__PURE__ */ __exportAll({
5
5
  create: () => create,
@@ -12,7 +12,7 @@ export declare const send: (input: EmailSendInput, options?: SendOptions | undef
12
12
  readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
13
13
  }[];
14
14
  readonly createdAt: string;
15
- }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").DeliveryUnavailableError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").OnboardingReviewRequiredError | import("./generated").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
15
+ }, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").DeliveryUnavailableError | import("./generated").ExternalServiceError | import("./generated").FlagDisabledError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("..").MediaUploadError | import("./generated").OnboardingReviewRequiredError | import("./generated").PaymentRequiredError | import("./generated").RateLimitedError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").SenderNotReadyError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
16
16
  export declare const getTrackingDefaults: (_?: never) => import("effect/Effect").Effect<{
17
17
  readonly opens: boolean;
18
18
  readonly clicks: boolean;
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make, r as sendEmail, t as addEmailSender } from "../operation-BEghYyLu.js";
3
- import { D as TrackingRecipientEmail } from "../client-Cj1bqIEe.js";
2
+ import { n as make, r as sendEmail, t as addEmailSender } from "../operation-B_Ty1LG-.js";
3
+ import { D as TrackingRecipientEmail } from "../client-DYPNDvVU.js";
4
4
  //#region src/effect/email.ts
5
5
  var email_exports = /* @__PURE__ */ __exportAll({
6
6
  TrackingRecipientEmail: () => TrackingRecipientEmail,
@@ -99,6 +99,72 @@ export declare const install: (input: {
99
99
  readonly webhookSecret: import("effect/Redacted").Redacted<string>;
100
100
  } | null;
101
101
  }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
102
+ export declare const upgrade: (input: {
103
+ readonly id: string;
104
+ readonly version?: string | null | undefined;
105
+ readonly acceptPermissions?: readonly string[] | null | undefined;
106
+ readonly dryRun?: boolean | null | undefined;
107
+ }) => import("effect/Effect").Effect<{
108
+ readonly installation: {
109
+ readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
110
+ readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
111
+ readonly name: string;
112
+ readonly displayName: string;
113
+ readonly version: {
114
+ readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
115
+ readonly version: string;
116
+ };
117
+ readonly runtime: "hosted" | "webhook";
118
+ readonly status: "active" | "disabled";
119
+ readonly createdAt: string;
120
+ readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
121
+ readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
122
+ readonly sendMode: "approval" | "send";
123
+ readonly scope: {
124
+ readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
125
+ readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
126
+ };
127
+ readonly webhook: {
128
+ readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
129
+ readonly url: string;
130
+ } | null;
131
+ readonly updatedAt: string;
132
+ readonly disabledAt: string | null;
133
+ };
134
+ readonly fromVersion: {
135
+ readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
136
+ readonly version: string;
137
+ };
138
+ readonly toVersion: {
139
+ readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
140
+ readonly version: string;
141
+ };
142
+ readonly permissionDiff: {
143
+ readonly added: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
144
+ readonly removed: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
145
+ };
146
+ readonly dryRun: boolean;
147
+ readonly versionChange: {
148
+ readonly id: string;
149
+ readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
150
+ readonly installationId: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
151
+ readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
152
+ readonly fromVersion: {
153
+ readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
154
+ readonly version: string;
155
+ };
156
+ readonly toVersion: {
157
+ readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
158
+ readonly version: string;
159
+ };
160
+ readonly permissionDiff: {
161
+ readonly added: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
162
+ readonly removed: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
163
+ };
164
+ readonly changedBy: string & import("effect/Brand").Brand<"UserId">;
165
+ readonly changedAt: string;
166
+ } | null;
167
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
102
168
  export declare const get: (input: {
103
169
  readonly id: string;
104
170
  }) => import("effect/Effect").Effect<{
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/extension-installations.ts
4
4
  var extension_installations_exports = /* @__PURE__ */ __exportAll({
5
5
  disable: () => disable,
@@ -9,10 +9,12 @@ var extension_installations_exports = /* @__PURE__ */ __exportAll({
9
9
  install: () => install,
10
10
  list: () => list,
11
11
  listRuns: () => listRuns,
12
- uninstall: () => uninstall
12
+ uninstall: () => uninstall,
13
+ upgrade: () => upgrade
13
14
  });
14
15
  const list = make("extensionInstallationsList");
15
16
  const install = make("extensionInstallationsInstall");
17
+ const upgrade = make("extensionInstallationsUpgrade");
16
18
  const get = make("extensionInstallationsGet");
17
19
  const uninstall = make("extensionInstallationsUninstall");
18
20
  const disable = make("extensionInstallationsDisable");
@@ -20,6 +22,6 @@ const enable = make("extensionInstallationsEnable");
20
22
  const listRuns = make("extensionInstallationsListRuns");
21
23
  const getRun = make("extensionInstallationsGetRun");
22
24
  //#endregion
23
- export { disable, enable, get, getRun, install, list, listRuns, extension_installations_exports as t, uninstall };
25
+ export { disable, enable, get, getRun, install, list, listRuns, extension_installations_exports as t, uninstall, upgrade };
24
26
 
25
27
  //# sourceMappingURL=extension-installations.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
3
  //#region src/effect/extensions.ts
4
4
  var extensions_exports = /* @__PURE__ */ __exportAll({
5
5
  get: () => get,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-BEghYyLu.js";
3
- import { T as SendFeedback } from "../client-Cj1bqIEe.js";
2
+ import { n as make } from "../operation-B_Ty1LG-.js";
3
+ import { T as SendFeedback } from "../client-DYPNDvVU.js";
4
4
  //#region src/effect/feedback.ts
5
5
  var feedback_exports = /* @__PURE__ */ __exportAll({
6
6
  SendPayload: () => SendFeedback,
@@ -63,6 +63,10 @@ export declare const SamvaErrorMetadata: {
63
63
  readonly categories: readonly ["notFound"];
64
64
  readonly retryable: false;
65
65
  };
66
+ readonly SenderNotReadyError: {
67
+ readonly categories: readonly ["transient"];
68
+ readonly retryable: true;
69
+ };
66
70
  readonly UnauthorizedError: {
67
71
  readonly categories: readonly ["auth"];
68
72
  readonly retryable: false;