samva 0.28.0 → 0.29.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 (64) hide show
  1. package/AGENTS.md +8 -0
  2. package/README.md +2 -0
  3. package/dist/client/sdk.gen.d.ts +156 -1
  4. package/dist/client/sdk.gen.js +475 -1
  5. package/dist/client/types.gen.d.ts +1653 -183
  6. package/dist/effect/campaigns.d.ts +32 -0
  7. package/dist/effect/generated/agents.js +36 -36
  8. package/dist/effect/generated/analytics.js +24 -24
  9. package/dist/effect/generated/api-keys.js +29 -29
  10. package/dist/effect/generated/attachments.js +13 -13
  11. package/dist/effect/generated/brands.js +13 -13
  12. package/dist/effect/generated/campaigns.d.ts +178 -60
  13. package/dist/effect/generated/campaigns.js +92 -104
  14. package/dist/effect/generated/contact-events.js +5 -5
  15. package/dist/effect/generated/contact-groups.js +38 -38
  16. package/dist/effect/generated/contacts.js +93 -93
  17. package/dist/effect/generated/conversations.js +38 -38
  18. package/dist/effect/generated/custom-fields.js +15 -15
  19. package/dist/effect/generated/email.js +225 -225
  20. package/dist/effect/generated/events.js +5 -5
  21. package/dist/effect/generated/extension-installations.js +35 -35
  22. package/dist/effect/generated/extensions.js +24 -24
  23. package/dist/effect/generated/feedback.js +6 -6
  24. package/dist/effect/generated/index.d.ts +5 -1
  25. package/dist/effect/generated/journeys.js +67 -67
  26. package/dist/effect/generated/mailboxes.js +286 -286
  27. package/dist/effect/generated/media.js +16 -16
  28. package/dist/effect/generated/messages.js +65 -65
  29. package/dist/effect/generated/namespaces.js +27 -27
  30. package/dist/effect/generated/operations.js +6 -6
  31. package/dist/effect/generated/organizations.js +19 -19
  32. package/dist/effect/generated/publication-domains.d.ts +548 -0
  33. package/dist/effect/generated/publication-domains.js +163 -0
  34. package/dist/effect/generated/scheduled-messages.js +25 -25
  35. package/dist/effect/generated/shared.d.ts +142 -30
  36. package/dist/effect/generated/shared.js +356 -328
  37. package/dist/effect/generated/subscriptions.js +10 -10
  38. package/dist/effect/generated/templates.d.ts +172 -15
  39. package/dist/effect/generated/templates.js +207 -162
  40. package/dist/effect/generated/topic-forms.js +21 -21
  41. package/dist/effect/generated/topic-issues.d.ts +2995 -0
  42. package/dist/effect/generated/topic-issues.js +985 -0
  43. package/dist/effect/generated/topics.d.ts +61 -1
  44. package/dist/effect/generated/topics.js +39 -31
  45. package/dist/effect/generated/webhooks.js +50 -50
  46. package/dist/effect/generated/whoami.js +10 -10
  47. package/dist/effect/generated-metadata.d.ts +70 -0
  48. package/dist/effect/generated-metadata.js +57 -13
  49. package/dist/effect/index.d.ts +2 -0
  50. package/dist/effect/index.js +3 -1
  51. package/dist/effect/journeys.d.ts +112 -112
  52. package/dist/effect/mailboxes.d.ts +78 -78
  53. package/dist/effect/publication-domains.d.ts +14 -0
  54. package/dist/effect/publication-domains.js +17 -0
  55. package/dist/effect/topic-issues.d.ts +57 -0
  56. package/dist/effect/topic-issues.js +33 -0
  57. package/dist/effect/topics.d.ts +6 -2
  58. package/dist/package.js +1 -1
  59. package/dist/promises/index.d.ts +5 -1
  60. package/dist/promises/index.js +5 -1
  61. package/dist/promises/types.gen.d.ts +1 -1
  62. package/dist/service-map.d.ts +74 -0
  63. package/dist/service-map.js +56 -0
  64. package/package.json +11 -3
@@ -2,7 +2,7 @@ import { ApiKeySecurityMiddleware, ContactGroupId, ContactId, ContactIdentity, C
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/contact-groups.ts
5
- const ContactGroupPage = /* @__PURE__ */ Schema.Struct({
5
+ const ContactGroupPage = /* @__PURE__ */ (() => Schema.Struct({
6
6
  items: Schema.Array(Schema.Struct({
7
7
  id: ContactGroupId,
8
8
  organizationId: OrganizationId,
@@ -31,8 +31,8 @@ const ContactGroupPage = /* @__PURE__ */ Schema.Struct({
31
31
  updatedAt: Schema.String
32
32
  })),
33
33
  nextCursor: Schema.Union([Schema.String, Schema.Null])
34
- }).annotate({ identifier: "ContactGroupPage" });
35
- const ContactGroupMemberPage = /* @__PURE__ */ Schema.Struct({
34
+ }).annotate({ identifier: "ContactGroupPage" }))();
35
+ const ContactGroupMemberPage = /* @__PURE__ */ (() => Schema.Struct({
36
36
  items: Schema.Array(Schema.Struct({
37
37
  id: Schema.String,
38
38
  organizationId: OrganizationId,
@@ -55,8 +55,8 @@ const ContactGroupMemberPage = /* @__PURE__ */ Schema.Struct({
55
55
  }), Schema.Null])
56
56
  })),
57
57
  nextCursor: Schema.Union([Schema.String, Schema.Null])
58
- }).annotate({ identifier: "ContactGroupMemberPage" });
59
- const ContactGroupsListQuery = /* @__PURE__ */ Schema.Struct({
58
+ }).annotate({ identifier: "ContactGroupMemberPage" }))();
59
+ const ContactGroupsListQuery = /* @__PURE__ */ (() => Schema.Struct({
60
60
  limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
61
61
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
62
62
  type: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Union([
@@ -69,14 +69,14 @@ const ContactGroupsListQuery = /* @__PURE__ */ Schema.Struct({
69
69
  Schema.Literal("smart")
70
70
  ]))]), Schema.Null])),
71
71
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
72
- });
72
+ }))();
73
73
  const ContactGroupsList200 = ContactGroupPage;
74
74
  const ContactGroupsList401 = UnauthorizedError;
75
75
  const ContactGroupsList403 = ForbiddenError;
76
76
  const ContactGroupsList422 = ValidationError;
77
77
  const ContactGroupsList500 = InternalError;
78
78
  const ContactGroupsList504 = GatewayTimeoutError;
79
- const ContactGroupsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
79
+ const ContactGroupsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
80
80
  name: Schema.String,
81
81
  description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
82
82
  type: Schema.optionalKey(Schema.Union([Schema.Union([
@@ -96,8 +96,8 @@ const ContactGroupsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
96
96
  icon: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
97
97
  parentGroupId: Schema.optionalKey(Schema.Union([Schema.Union([ContactGroupId, Schema.Null]), Schema.Null])),
98
98
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
99
- });
100
- const ContactGroupsCreate201 = /* @__PURE__ */ Schema.Struct({
99
+ }))();
100
+ const ContactGroupsCreate201 = /* @__PURE__ */ (() => Schema.Struct({
101
101
  id: ContactGroupId,
102
102
  organizationId: OrganizationId,
103
103
  name: Schema.String,
@@ -123,14 +123,14 @@ const ContactGroupsCreate201 = /* @__PURE__ */ Schema.Struct({
123
123
  isActive: Schema.Boolean,
124
124
  createdAt: Schema.String,
125
125
  updatedAt: Schema.String
126
- });
126
+ }))();
127
127
  const ContactGroupsCreate401 = UnauthorizedError;
128
128
  const ContactGroupsCreate403 = ForbiddenError;
129
129
  const ContactGroupsCreate422 = ValidationError;
130
130
  const ContactGroupsCreate500 = InternalError;
131
131
  const ContactGroupsCreate504 = GatewayTimeoutError;
132
- const ContactGroupsGetByIdPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
133
- const ContactGroupsGetById200 = /* @__PURE__ */ Schema.Struct({
132
+ const ContactGroupsGetByIdPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
133
+ const ContactGroupsGetById200 = /* @__PURE__ */ (() => Schema.Struct({
134
134
  id: ContactGroupId,
135
135
  organizationId: OrganizationId,
136
136
  name: Schema.String,
@@ -156,23 +156,23 @@ const ContactGroupsGetById200 = /* @__PURE__ */ Schema.Struct({
156
156
  isActive: Schema.Boolean,
157
157
  createdAt: Schema.String,
158
158
  updatedAt: Schema.String
159
- });
159
+ }))();
160
160
  const ContactGroupsGetById401 = UnauthorizedError;
161
161
  const ContactGroupsGetById403 = ForbiddenError;
162
162
  const ContactGroupsGetById404 = ResourceNotFoundError;
163
163
  const ContactGroupsGetById422 = ValidationError;
164
164
  const ContactGroupsGetById500 = InternalError;
165
165
  const ContactGroupsGetById504 = GatewayTimeoutError;
166
- const ContactGroupsRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
167
- const ContactGroupsRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
166
+ const ContactGroupsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
167
+ const ContactGroupsRemove200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
168
168
  const ContactGroupsRemove401 = UnauthorizedError;
169
169
  const ContactGroupsRemove403 = ForbiddenError;
170
170
  const ContactGroupsRemove404 = ResourceNotFoundError;
171
171
  const ContactGroupsRemove422 = ValidationError;
172
172
  const ContactGroupsRemove500 = InternalError;
173
173
  const ContactGroupsRemove504 = GatewayTimeoutError;
174
- const ContactGroupsUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
175
- const ContactGroupsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
174
+ const ContactGroupsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
175
+ const ContactGroupsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
176
176
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
177
177
  description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
178
178
  type: Schema.optionalKey(Schema.Union([Schema.Union([
@@ -192,8 +192,8 @@ const ContactGroupsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
192
192
  icon: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
193
193
  parentGroupId: Schema.optionalKey(Schema.Union([Schema.Union([ContactGroupId, Schema.Null]), Schema.Null])),
194
194
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
195
- });
196
- const ContactGroupsUpdate200 = /* @__PURE__ */ Schema.Struct({
195
+ }))();
196
+ const ContactGroupsUpdate200 = /* @__PURE__ */ (() => Schema.Struct({
197
197
  id: ContactGroupId,
198
198
  organizationId: OrganizationId,
199
199
  name: Schema.String,
@@ -219,30 +219,30 @@ const ContactGroupsUpdate200 = /* @__PURE__ */ Schema.Struct({
219
219
  isActive: Schema.Boolean,
220
220
  createdAt: Schema.String,
221
221
  updatedAt: Schema.String
222
- });
222
+ }))();
223
223
  const ContactGroupsUpdate401 = UnauthorizedError;
224
224
  const ContactGroupsUpdate403 = ForbiddenError;
225
225
  const ContactGroupsUpdate404 = ResourceNotFoundError;
226
226
  const ContactGroupsUpdate422 = ValidationError;
227
227
  const ContactGroupsUpdate500 = InternalError;
228
228
  const ContactGroupsUpdate504 = GatewayTimeoutError;
229
- const ContactGroupsEvaluateDynamicPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
230
- const ContactGroupsEvaluateDynamic200 = /* @__PURE__ */ Schema.Struct({
229
+ const ContactGroupsEvaluateDynamicPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
230
+ const ContactGroupsEvaluateDynamic200 = /* @__PURE__ */ (() => Schema.Struct({
231
231
  added: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
232
232
  removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
233
233
  total: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
234
- });
234
+ }))();
235
235
  const ContactGroupsEvaluateDynamic401 = UnauthorizedError;
236
236
  const ContactGroupsEvaluateDynamic403 = ForbiddenError;
237
237
  const ContactGroupsEvaluateDynamic404 = ResourceNotFoundError;
238
238
  const ContactGroupsEvaluateDynamic422 = ValidationError;
239
239
  const ContactGroupsEvaluateDynamic500 = InternalError;
240
240
  const ContactGroupsEvaluateDynamic504 = GatewayTimeoutError;
241
- const ContactGroupsGetMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
242
- const ContactGroupsGetMembersQuery = /* @__PURE__ */ Schema.Struct({
241
+ const ContactGroupsGetMembersPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
242
+ const ContactGroupsGetMembersQuery = /* @__PURE__ */ (() => Schema.Struct({
243
243
  limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
244
244
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
245
- });
245
+ }))();
246
246
  const ContactGroupsGetMembers200 = ContactGroupMemberPage;
247
247
  const ContactGroupsGetMembers401 = UnauthorizedError;
248
248
  const ContactGroupsGetMembers403 = ForbiddenError;
@@ -250,35 +250,35 @@ const ContactGroupsGetMembers404 = ResourceNotFoundError;
250
250
  const ContactGroupsGetMembers422 = ValidationError;
251
251
  const ContactGroupsGetMembers500 = InternalError;
252
252
  const ContactGroupsGetMembers504 = GatewayTimeoutError;
253
- const ContactGroupsAddMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
254
- const ContactGroupsAddMembersRequestJson = /* @__PURE__ */ Schema.Struct({
253
+ const ContactGroupsAddMembersPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
254
+ const ContactGroupsAddMembersRequestJson = /* @__PURE__ */ (() => Schema.Struct({
255
255
  contactIds: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })),
256
256
  role: Schema.optionalKey(Schema.Union([Schema.Union([
257
257
  Schema.Literal("member"),
258
258
  Schema.Literal("moderator"),
259
259
  Schema.Literal("admin")
260
260
  ]), Schema.Null]))
261
- });
262
- const ContactGroupsAddMembers200 = /* @__PURE__ */ Schema.Struct({
261
+ }))();
262
+ const ContactGroupsAddMembers200 = /* @__PURE__ */ (() => Schema.Struct({
263
263
  added: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
264
264
  skipped: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
265
- });
265
+ }))();
266
266
  const ContactGroupsAddMembers401 = UnauthorizedError;
267
267
  const ContactGroupsAddMembers403 = ForbiddenError;
268
268
  const ContactGroupsAddMembers404 = ResourceNotFoundError;
269
269
  const ContactGroupsAddMembers422 = ValidationError;
270
270
  const ContactGroupsAddMembers500 = InternalError;
271
271
  const ContactGroupsAddMembers504 = GatewayTimeoutError;
272
- const ContactGroupsRemoveMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactGroupId });
273
- const ContactGroupsRemoveMembersRequestJson = /* @__PURE__ */ Schema.Struct({ contactIds: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) });
274
- const ContactGroupsRemoveMembers200 = /* @__PURE__ */ Schema.Struct({ removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) });
272
+ const ContactGroupsRemoveMembersPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactGroupId }))();
273
+ const ContactGroupsRemoveMembersRequestJson = /* @__PURE__ */ (() => Schema.Struct({ contactIds: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) }))();
274
+ const ContactGroupsRemoveMembers200 = /* @__PURE__ */ (() => Schema.Struct({ removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) }))();
275
275
  const ContactGroupsRemoveMembers401 = UnauthorizedError;
276
276
  const ContactGroupsRemoveMembers403 = ForbiddenError;
277
277
  const ContactGroupsRemoveMembers404 = ResourceNotFoundError;
278
278
  const ContactGroupsRemoveMembers422 = ValidationError;
279
279
  const ContactGroupsRemoveMembers500 = InternalError;
280
280
  const ContactGroupsRemoveMembers504 = GatewayTimeoutError;
281
- const ContactGroupsPreviewRequestJson = /* @__PURE__ */ Schema.Struct({ criteria: Schema.Struct({
281
+ const ContactGroupsPreviewRequestJson = /* @__PURE__ */ (() => Schema.Struct({ criteria: Schema.Struct({
282
282
  tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
283
283
  channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
284
284
  match: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("all"), Schema.Literal("any")]), Schema.Null])),
@@ -287,15 +287,15 @@ const ContactGroupsPreviewRequestJson = /* @__PURE__ */ Schema.Struct({ criteria
287
287
  operator: Schema.String,
288
288
  value: JsonValue
289
289
  })), Schema.Null]))
290
- }) });
291
- const ContactGroupsPreview200 = /* @__PURE__ */ Schema.Struct({
290
+ }) }))();
291
+ const ContactGroupsPreview200 = /* @__PURE__ */ (() => Schema.Struct({
292
292
  count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
293
293
  sample: Schema.Array(Schema.Struct({
294
294
  id: ContactId,
295
295
  name: Schema.String,
296
296
  status: Schema.String
297
297
  }))
298
- });
298
+ }))();
299
299
  const ContactGroupsPreview401 = UnauthorizedError;
300
300
  const ContactGroupsPreview403 = ForbiddenError;
301
301
  const ContactGroupsPreview422 = ValidationError;