samva 0.28.1 → 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 (63) hide show
  1. package/AGENTS.md +8 -0
  2. package/dist/client/sdk.gen.d.ts +156 -1
  3. package/dist/client/sdk.gen.js +475 -1
  4. package/dist/client/types.gen.d.ts +1653 -183
  5. package/dist/effect/campaigns.d.ts +32 -0
  6. package/dist/effect/generated/agents.js +36 -36
  7. package/dist/effect/generated/analytics.js +24 -24
  8. package/dist/effect/generated/api-keys.js +29 -29
  9. package/dist/effect/generated/attachments.js +13 -13
  10. package/dist/effect/generated/brands.js +13 -13
  11. package/dist/effect/generated/campaigns.d.ts +178 -60
  12. package/dist/effect/generated/campaigns.js +92 -104
  13. package/dist/effect/generated/contact-events.js +5 -5
  14. package/dist/effect/generated/contact-groups.js +38 -38
  15. package/dist/effect/generated/contacts.js +93 -93
  16. package/dist/effect/generated/conversations.js +38 -38
  17. package/dist/effect/generated/custom-fields.js +15 -15
  18. package/dist/effect/generated/email.js +225 -225
  19. package/dist/effect/generated/events.js +5 -5
  20. package/dist/effect/generated/extension-installations.js +35 -35
  21. package/dist/effect/generated/extensions.js +24 -24
  22. package/dist/effect/generated/feedback.js +6 -6
  23. package/dist/effect/generated/index.d.ts +5 -1
  24. package/dist/effect/generated/journeys.js +67 -67
  25. package/dist/effect/generated/mailboxes.js +286 -286
  26. package/dist/effect/generated/media.js +16 -16
  27. package/dist/effect/generated/messages.js +65 -65
  28. package/dist/effect/generated/namespaces.js +27 -27
  29. package/dist/effect/generated/operations.js +6 -6
  30. package/dist/effect/generated/organizations.js +19 -19
  31. package/dist/effect/generated/publication-domains.d.ts +548 -0
  32. package/dist/effect/generated/publication-domains.js +163 -0
  33. package/dist/effect/generated/scheduled-messages.js +25 -25
  34. package/dist/effect/generated/shared.d.ts +142 -30
  35. package/dist/effect/generated/shared.js +356 -328
  36. package/dist/effect/generated/subscriptions.js +10 -10
  37. package/dist/effect/generated/templates.d.ts +172 -15
  38. package/dist/effect/generated/templates.js +207 -162
  39. package/dist/effect/generated/topic-forms.js +21 -21
  40. package/dist/effect/generated/topic-issues.d.ts +2995 -0
  41. package/dist/effect/generated/topic-issues.js +985 -0
  42. package/dist/effect/generated/topics.d.ts +61 -1
  43. package/dist/effect/generated/topics.js +39 -31
  44. package/dist/effect/generated/webhooks.js +50 -50
  45. package/dist/effect/generated/whoami.js +10 -10
  46. package/dist/effect/generated-metadata.d.ts +70 -0
  47. package/dist/effect/generated-metadata.js +57 -13
  48. package/dist/effect/index.d.ts +2 -0
  49. package/dist/effect/index.js +3 -1
  50. package/dist/effect/journeys.d.ts +112 -112
  51. package/dist/effect/mailboxes.d.ts +78 -78
  52. package/dist/effect/publication-domains.d.ts +14 -0
  53. package/dist/effect/publication-domains.js +17 -0
  54. package/dist/effect/topic-issues.d.ts +57 -0
  55. package/dist/effect/topic-issues.js +33 -0
  56. package/dist/effect/topics.d.ts +6 -2
  57. package/dist/package.js +1 -1
  58. package/dist/promises/index.d.ts +5 -1
  59. package/dist/promises/index.js +5 -1
  60. package/dist/promises/types.gen.d.ts +1 -1
  61. package/dist/service-map.d.ts +74 -0
  62. package/dist/service-map.js +56 -0
  63. package/package.json +11 -3
@@ -2,24 +2,24 @@ import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactG
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/contacts.ts
5
- const ContactCustomFields = /* @__PURE__ */ Schema.Record(Schema.String, Schema.Union([
5
+ const ContactCustomFields = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.Union([
6
6
  Schema.String,
7
7
  Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
8
8
  Schema.Boolean,
9
9
  Schema.Null
10
- ])).annotate({ identifier: "ContactCustomFields" });
11
- const ContactIdentityInput = /* @__PURE__ */ Schema.Struct({
10
+ ])).annotate({ identifier: "ContactCustomFields" }))();
11
+ const ContactIdentityInput = /* @__PURE__ */ (() => Schema.Struct({
12
12
  type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
13
13
  identifier: Schema.String,
14
14
  verified: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
15
- }).annotate({ identifier: "ContactIdentityInput" });
16
- const ContactLocation = /* @__PURE__ */ Schema.Struct({
15
+ }).annotate({ identifier: "ContactIdentityInput" }))();
16
+ const ContactLocation = /* @__PURE__ */ (() => Schema.Struct({
17
17
  country: Schema.String,
18
18
  state: Schema.String,
19
19
  city: Schema.String,
20
20
  timezone: Schema.String
21
- }).annotate({ identifier: "ContactLocation" });
22
- const ContactPreferences = /* @__PURE__ */ Schema.Struct({
21
+ }).annotate({ identifier: "ContactLocation" }))();
22
+ const ContactPreferences = /* @__PURE__ */ (() => Schema.Struct({
23
23
  preferredChannels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")), Schema.Null])),
24
24
  language: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25
25
  timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -30,16 +30,16 @@ const ContactPreferences = /* @__PURE__ */ Schema.Struct({
30
30
  end: Schema.String
31
31
  }), Schema.Null]))
32
32
  }), Schema.Null]))
33
- }).annotate({ identifier: "ContactPreferences" });
34
- const ContactImportJobId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cimport_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
33
+ }).annotate({ identifier: "ContactPreferences" }))();
34
+ const ContactImportJobId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cimport_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
35
35
  expected: "a string matching the RegExp ^cimport_[0-9a-hjkmnp-tv-z]{16,24}$",
36
36
  identifier: "ContactImportJobId"
37
- })).pipe(Schema.brand("ContactImportJobId"));
38
- const BulkUpdateResult = /* @__PURE__ */ Schema.Struct({
37
+ })).pipe(Schema.brand("ContactImportJobId")))();
38
+ const BulkUpdateResult = /* @__PURE__ */ (() => Schema.Struct({
39
39
  updated: 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" })),
40
40
  failed: 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" }))
41
- }).annotate({ identifier: "BulkUpdateResult" });
42
- const ContactLookup = /* @__PURE__ */ Schema.Union([
41
+ }).annotate({ identifier: "BulkUpdateResult" }))();
42
+ const ContactLookup = /* @__PURE__ */ (() => Schema.Union([
43
43
  Schema.Struct({
44
44
  type: Schema.Literal("email"),
45
45
  value: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
@@ -52,8 +52,8 @@ const ContactLookup = /* @__PURE__ */ Schema.Union([
52
52
  type: Schema.Literal("externalId"),
53
53
  value: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
54
54
  })
55
- ]).annotate({ identifier: "ContactLookup" });
56
- const ContactActivityPage = /* @__PURE__ */ Schema.Struct({
55
+ ]).annotate({ identifier: "ContactLookup" }))();
56
+ const ContactActivityPage = /* @__PURE__ */ (() => Schema.Struct({
57
57
  items: Schema.Array(Schema.Struct({
58
58
  id: MessageId,
59
59
  channel: Schema.String,
@@ -65,8 +65,8 @@ const ContactActivityPage = /* @__PURE__ */ Schema.Struct({
65
65
  conversationId: Schema.Union([ConversationId, Schema.Null])
66
66
  })),
67
67
  nextCursor: Schema.Union([Schema.String, Schema.Null])
68
- }).annotate({ identifier: "ContactActivityPage" });
69
- const ContactListMembership = /* @__PURE__ */ Schema.Struct({
68
+ }).annotate({ identifier: "ContactActivityPage" }))();
69
+ const ContactListMembership = /* @__PURE__ */ (() => Schema.Struct({
70
70
  id: ContactGroupId,
71
71
  name: Schema.String,
72
72
  color: Schema.Union([Schema.Union([
@@ -77,8 +77,8 @@ const ContactListMembership = /* @__PURE__ */ Schema.Struct({
77
77
  Schema.Literal("plum"),
78
78
  Schema.Literal("rose")
79
79
  ]), Schema.Null])
80
- }).annotate({ identifier: "ContactListMembership" });
81
- const ContactGroupMembershipPage = /* @__PURE__ */ Schema.Struct({
80
+ }).annotate({ identifier: "ContactListMembership" }))();
81
+ const ContactGroupMembershipPage = /* @__PURE__ */ (() => Schema.Struct({
82
82
  items: Schema.Array(Schema.Struct({
83
83
  id: ContactGroupId,
84
84
  name: Schema.String,
@@ -95,8 +95,8 @@ const ContactGroupMembershipPage = /* @__PURE__ */ Schema.Struct({
95
95
  joinedAt: Schema.String
96
96
  })),
97
97
  nextCursor: Schema.Union([Schema.String, Schema.Null])
98
- }).annotate({ identifier: "ContactGroupMembershipPage" });
99
- const ContactProfile = /* @__PURE__ */ Schema.Struct({
98
+ }).annotate({ identifier: "ContactGroupMembershipPage" }))();
99
+ const ContactProfile = /* @__PURE__ */ (() => Schema.Struct({
100
100
  firstName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
101
101
  lastName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
102
102
  company: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -109,16 +109,16 @@ const ContactProfile = /* @__PURE__ */ Schema.Struct({
109
109
  Schema.Literal("manual"),
110
110
  Schema.Literal("form")
111
111
  ]), Schema.Null]))
112
- }).annotate({ identifier: "ContactProfile" });
113
- const ContactProfileUpdate = /* @__PURE__ */ Schema.Struct({
112
+ }).annotate({ identifier: "ContactProfile" }))();
113
+ const ContactProfileUpdate = /* @__PURE__ */ (() => Schema.Struct({
114
114
  firstName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
115
115
  lastName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
116
116
  company: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
117
117
  jobTitle: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
118
118
  location: Schema.optionalKey(Schema.Union([Schema.Union([ContactLocation, Schema.Null]), Schema.Null])),
119
119
  customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null]))
120
- }).annotate({ identifier: "ContactProfileUpdate" });
121
- const ContactSummary = /* @__PURE__ */ Schema.Struct({
120
+ }).annotate({ identifier: "ContactProfileUpdate" }))();
121
+ const ContactSummary = /* @__PURE__ */ (() => Schema.Struct({
122
122
  id: ContactId,
123
123
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
124
124
  name: Schema.String,
@@ -136,12 +136,12 @@ const ContactSummary = /* @__PURE__ */ Schema.Struct({
136
136
  customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null])),
137
137
  lastActiveAt: Schema.Union([Schema.String, Schema.Null]),
138
138
  createdAt: Schema.String
139
- }).annotate({ identifier: "ContactSummary" });
140
- const ContactPage = /* @__PURE__ */ Schema.Struct({
139
+ }).annotate({ identifier: "ContactSummary" }))();
140
+ const ContactPage = /* @__PURE__ */ (() => Schema.Struct({
141
141
  items: Schema.Array(ContactSummary),
142
142
  nextCursor: Schema.Union([Schema.String, Schema.Null])
143
- }).annotate({ identifier: "ContactPage" });
144
- const Contact = /* @__PURE__ */ Schema.Struct({
143
+ }).annotate({ identifier: "ContactPage" }))();
144
+ const Contact = /* @__PURE__ */ (() => Schema.Struct({
145
145
  id: ContactId,
146
146
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
147
147
  name: Schema.String,
@@ -236,8 +236,8 @@ const Contact = /* @__PURE__ */ Schema.Struct({
236
236
  }), Schema.Null]),
237
237
  createdAt: Schema.String,
238
238
  updatedAt: Schema.String
239
- }).annotate({ identifier: "Contact" });
240
- const ContactsListQuery = /* @__PURE__ */ Schema.Struct({
239
+ }).annotate({ identifier: "Contact" }))();
240
+ const ContactsListQuery = /* @__PURE__ */ (() => Schema.Struct({
241
241
  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])),
242
242
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
243
243
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
@@ -253,14 +253,14 @@ const ContactsListQuery = /* @__PURE__ */ Schema.Struct({
253
253
  customFieldValue: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
254
254
  after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
255
255
  before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
256
- });
256
+ }))();
257
257
  const ContactsList200 = ContactPage;
258
258
  const ContactsList401 = UnauthorizedError;
259
259
  const ContactsList403 = ForbiddenError;
260
260
  const ContactsList422 = ValidationError;
261
261
  const ContactsList500 = InternalError;
262
262
  const ContactsList504 = GatewayTimeoutError;
263
- const ContactsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
263
+ const ContactsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
264
264
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
265
265
  name: Schema.String,
266
266
  displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
@@ -278,7 +278,7 @@ const ContactsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
278
278
  statusReason: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
279
279
  externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
280
280
  metadata: Schema.optionalKey(Schema.Union([Schema.Union([JsonObject, Schema.Null]), Schema.Null]))
281
- });
281
+ }))();
282
282
  const ContactsCreate201 = Contact;
283
283
  const ContactsCreate401 = UnauthorizedError;
284
284
  const ContactsCreate402 = PaymentRequiredError;
@@ -289,7 +289,7 @@ const ContactsCreate422 = ValidationError;
289
289
  const ContactsCreate500 = InternalError;
290
290
  const ContactsCreate502 = BillingProviderError;
291
291
  const ContactsCreate504 = GatewayTimeoutError;
292
- const ContactsGetPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
292
+ const ContactsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
293
293
  const ContactsGet200 = Contact;
294
294
  const ContactsGet401 = UnauthorizedError;
295
295
  const ContactsGet403 = ForbiddenError;
@@ -297,8 +297,8 @@ const ContactsGet404 = ResourceNotFoundError;
297
297
  const ContactsGet422 = ValidationError;
298
298
  const ContactsGet500 = InternalError;
299
299
  const ContactsGet504 = GatewayTimeoutError;
300
- const ContactsRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
301
- const ContactsRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
300
+ const ContactsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
301
+ const ContactsRemove200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
302
302
  const ContactsRemove401 = UnauthorizedError;
303
303
  const ContactsRemove403 = ForbiddenError;
304
304
  const ContactsRemove404 = ResourceNotFoundError;
@@ -306,8 +306,8 @@ const ContactsRemove422 = ValidationError;
306
306
  const ContactsRemove500 = InternalError;
307
307
  const ContactsRemove502 = BillingProviderError;
308
308
  const ContactsRemove504 = GatewayTimeoutError;
309
- const ContactsUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
310
- const ContactsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
309
+ const ContactsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
310
+ const ContactsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
311
311
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
312
312
  displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
313
313
  avatar: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
@@ -322,7 +322,7 @@ const ContactsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
322
322
  statusReason: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
323
323
  externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
324
324
  metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
325
- });
325
+ }))();
326
326
  const ContactsUpdate200 = Contact;
327
327
  const ContactsUpdate401 = UnauthorizedError;
328
328
  const ContactsUpdate402 = PaymentRequiredError;
@@ -332,12 +332,12 @@ const ContactsUpdate422 = ValidationError;
332
332
  const ContactsUpdate500 = InternalError;
333
333
  const ContactsUpdate502 = BillingProviderError;
334
334
  const ContactsUpdate504 = GatewayTimeoutError;
335
- const ContactsGetActivityTimelinePathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
336
- const ContactsGetActivityTimelineQuery = /* @__PURE__ */ Schema.Struct({
335
+ const ContactsGetActivityTimelinePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
336
+ const ContactsGetActivityTimelineQuery = /* @__PURE__ */ (() => Schema.Struct({
337
337
  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])),
338
338
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
339
339
  channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null]))
340
- });
340
+ }))();
341
341
  const ContactsGetActivityTimeline200 = ContactActivityPage;
342
342
  const ContactsGetActivityTimeline401 = UnauthorizedError;
343
343
  const ContactsGetActivityTimeline403 = ForbiddenError;
@@ -345,26 +345,26 @@ const ContactsGetActivityTimeline404 = ResourceNotFoundError;
345
345
  const ContactsGetActivityTimeline422 = ValidationError;
346
346
  const ContactsGetActivityTimeline500 = InternalError;
347
347
  const ContactsGetActivityTimeline504 = GatewayTimeoutError;
348
- const ContactsGetEngagementPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
349
- const ContactsGetEngagement200 = /* @__PURE__ */ Schema.Struct({
348
+ const ContactsGetEngagementPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
349
+ const ContactsGetEngagement200 = /* @__PURE__ */ (() => Schema.Struct({
350
350
  totalMessages: 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" })),
351
351
  messagesSent: 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" })),
352
352
  messagesReceived: 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" })),
353
353
  activeConversations: 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" })),
354
354
  lastActivityAt: Schema.Union([Schema.String, Schema.Null]),
355
355
  channelsUsed: Schema.Record(Schema.String, 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" })))
356
- });
356
+ }))();
357
357
  const ContactsGetEngagement401 = UnauthorizedError;
358
358
  const ContactsGetEngagement403 = ForbiddenError;
359
359
  const ContactsGetEngagement404 = ResourceNotFoundError;
360
360
  const ContactsGetEngagement422 = ValidationError;
361
361
  const ContactsGetEngagement500 = InternalError;
362
362
  const ContactsGetEngagement504 = GatewayTimeoutError;
363
- const ContactsGetGroupMembershipsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
364
- const ContactsGetGroupMembershipsQuery = /* @__PURE__ */ Schema.Struct({
363
+ const ContactsGetGroupMembershipsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
364
+ const ContactsGetGroupMembershipsQuery = /* @__PURE__ */ (() => Schema.Struct({
365
365
  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])),
366
366
  cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
367
- });
367
+ }))();
368
368
  const ContactsGetGroupMemberships200 = ContactGroupMembershipPage;
369
369
  const ContactsGetGroupMemberships401 = UnauthorizedError;
370
370
  const ContactsGetGroupMemberships403 = ForbiddenError;
@@ -372,12 +372,12 @@ const ContactsGetGroupMemberships404 = ResourceNotFoundError;
372
372
  const ContactsGetGroupMemberships422 = ValidationError;
373
373
  const ContactsGetGroupMemberships500 = InternalError;
374
374
  const ContactsGetGroupMemberships504 = GatewayTimeoutError;
375
- const ContactsAddIdentityPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
376
- const ContactsAddIdentityRequestJson = /* @__PURE__ */ Schema.Struct({
375
+ const ContactsAddIdentityPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
376
+ const ContactsAddIdentityRequestJson = /* @__PURE__ */ (() => Schema.Struct({
377
377
  type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
378
378
  identifier: Schema.String,
379
379
  verified: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
380
- });
380
+ }))();
381
381
  const ContactsAddIdentity200 = Contact;
382
382
  const ContactsAddIdentity401 = UnauthorizedError;
383
383
  const ContactsAddIdentity403 = ForbiddenError;
@@ -386,10 +386,10 @@ const ContactsAddIdentity409 = ConflictError;
386
386
  const ContactsAddIdentity422 = ValidationError;
387
387
  const ContactsAddIdentity500 = InternalError;
388
388
  const ContactsAddIdentity504 = GatewayTimeoutError;
389
- const ContactsRemoveIdentityPathParams = /* @__PURE__ */ Schema.Struct({
389
+ const ContactsRemoveIdentityPathParams = /* @__PURE__ */ (() => Schema.Struct({
390
390
  id: ContactId,
391
391
  identityId: ContactIdentityId
392
- });
392
+ }))();
393
393
  const ContactsRemoveIdentity200 = Contact;
394
394
  const ContactsRemoveIdentity401 = UnauthorizedError;
395
395
  const ContactsRemoveIdentity403 = ForbiddenError;
@@ -397,17 +397,17 @@ const ContactsRemoveIdentity404 = ResourceNotFoundError;
397
397
  const ContactsRemoveIdentity422 = ValidationError;
398
398
  const ContactsRemoveIdentity500 = InternalError;
399
399
  const ContactsRemoveIdentity504 = GatewayTimeoutError;
400
- const ContactsSetConsentPathParams = /* @__PURE__ */ Schema.Struct({
400
+ const ContactsSetConsentPathParams = /* @__PURE__ */ (() => Schema.Struct({
401
401
  id: ContactId,
402
402
  identityId: ContactIdentityId,
403
403
  channel: Schema.Literal("email")
404
- });
405
- const ContactsSetConsentRequestJson = /* @__PURE__ */ Schema.Struct({
404
+ }))();
405
+ const ContactsSetConsentRequestJson = /* @__PURE__ */ (() => Schema.Struct({
406
406
  status: Schema.Union([Schema.Literal("opted_in"), Schema.Literal("opted_out")]),
407
407
  source: Schema.String.annotate({ description: "Where the consent was captured, such as a form URL or a checkout step." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
408
408
  capturedAt: Schema.String,
409
409
  proof: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
410
- });
410
+ }))();
411
411
  const ContactsSetConsent200 = Contact;
412
412
  const ContactsSetConsent401 = UnauthorizedError;
413
413
  const ContactsSetConsent403 = ForbiddenError;
@@ -415,8 +415,8 @@ const ContactsSetConsent404 = ResourceNotFoundError;
415
415
  const ContactsSetConsent422 = ValidationError;
416
416
  const ContactsSetConsent500 = InternalError;
417
417
  const ContactsSetConsent504 = GatewayTimeoutError;
418
- const ContactsAddTagsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
419
- const ContactsAddTagsRequestJson = /* @__PURE__ */ Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) });
418
+ const ContactsAddTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
419
+ const ContactsAddTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
420
420
  const ContactsAddTags200 = Contact;
421
421
  const ContactsAddTags401 = UnauthorizedError;
422
422
  const ContactsAddTags403 = ForbiddenError;
@@ -424,8 +424,8 @@ const ContactsAddTags404 = ResourceNotFoundError;
424
424
  const ContactsAddTags422 = ValidationError;
425
425
  const ContactsAddTags500 = InternalError;
426
426
  const ContactsAddTags504 = GatewayTimeoutError;
427
- const ContactsRemoveTagsPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactId });
428
- const ContactsRemoveTagsRequestJson = /* @__PURE__ */ Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) });
427
+ const ContactsRemoveTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
428
+ const ContactsRemoveTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
429
429
  const ContactsRemoveTags200 = Contact;
430
430
  const ContactsRemoveTags401 = UnauthorizedError;
431
431
  const ContactsRemoveTags403 = ForbiddenError;
@@ -433,18 +433,18 @@ const ContactsRemoveTags404 = ResourceNotFoundError;
433
433
  const ContactsRemoveTags422 = ValidationError;
434
434
  const ContactsRemoveTags500 = InternalError;
435
435
  const ContactsRemoveTags504 = GatewayTimeoutError;
436
- const ContactsBulkDeleteRequestJson = /* @__PURE__ */ Schema.Struct({ ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) });
437
- const ContactsBulkDelete200 = /* @__PURE__ */ Schema.Struct({
436
+ const ContactsBulkDeleteRequestJson = /* @__PURE__ */ (() => Schema.Struct({ ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) }))();
437
+ const ContactsBulkDelete200 = /* @__PURE__ */ (() => Schema.Struct({
438
438
  deleted: 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" })),
439
439
  failed: 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" }))
440
- });
440
+ }))();
441
441
  const ContactsBulkDelete401 = UnauthorizedError;
442
442
  const ContactsBulkDelete403 = ForbiddenError;
443
443
  const ContactsBulkDelete422 = ValidationError;
444
444
  const ContactsBulkDelete500 = InternalError;
445
445
  const ContactsBulkDelete502 = BillingProviderError;
446
446
  const ContactsBulkDelete504 = GatewayTimeoutError;
447
- const ContactsBulkUpdateStatusRequestJson = /* @__PURE__ */ Schema.Struct({
447
+ const ContactsBulkUpdateStatusRequestJson = /* @__PURE__ */ (() => Schema.Struct({
448
448
  ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })),
449
449
  status: Schema.Union([
450
450
  Schema.Literal("active"),
@@ -452,7 +452,7 @@ const ContactsBulkUpdateStatusRequestJson = /* @__PURE__ */ Schema.Struct({
452
452
  Schema.Literal("blocked"),
453
453
  Schema.Literal("archived")
454
454
  ])
455
- });
455
+ }))();
456
456
  const ContactsBulkUpdateStatus200 = BulkUpdateResult;
457
457
  const ContactsBulkUpdateStatus401 = UnauthorizedError;
458
458
  const ContactsBulkUpdateStatus402 = PaymentRequiredError;
@@ -461,7 +461,7 @@ const ContactsBulkUpdateStatus422 = ValidationError;
461
461
  const ContactsBulkUpdateStatus500 = InternalError;
462
462
  const ContactsBulkUpdateStatus502 = BillingProviderError;
463
463
  const ContactsBulkUpdateStatus504 = GatewayTimeoutError;
464
- const ContactsBulkUpdateTagsRequestJson = /* @__PURE__ */ Schema.Struct({
464
+ const ContactsBulkUpdateTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({
465
465
  ids: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })),
466
466
  operation: Schema.Union([
467
467
  Schema.Literal("add"),
@@ -469,14 +469,14 @@ const ContactsBulkUpdateTagsRequestJson = /* @__PURE__ */ Schema.Struct({
469
469
  Schema.Literal("set")
470
470
  ]),
471
471
  tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String])
472
- });
472
+ }))();
473
473
  const ContactsBulkUpdateTags200 = BulkUpdateResult;
474
474
  const ContactsBulkUpdateTags401 = UnauthorizedError;
475
475
  const ContactsBulkUpdateTags403 = ForbiddenError;
476
476
  const ContactsBulkUpdateTags422 = ValidationError;
477
477
  const ContactsBulkUpdateTags500 = InternalError;
478
478
  const ContactsBulkUpdateTags504 = GatewayTimeoutError;
479
- const ContactsExportRequestJson = /* @__PURE__ */ Schema.Struct({
479
+ const ContactsExportRequestJson = /* @__PURE__ */ (() => Schema.Struct({
480
480
  ids: Schema.optionalKey(Schema.Union([Schema.Array(ContactId).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })), Schema.Null])),
481
481
  format: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("json"), Schema.Literal("csv")]), Schema.Null])),
482
482
  filters: Schema.optionalKey(Schema.Union([Schema.Struct({
@@ -489,24 +489,24 @@ const ContactsExportRequestJson = /* @__PURE__ */ Schema.Struct({
489
489
  tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
490
490
  }), Schema.Null])),
491
491
  fields: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]))
492
- });
493
- const ContactsExport200 = /* @__PURE__ */ Schema.Struct({
492
+ }))();
493
+ const ContactsExport200 = /* @__PURE__ */ (() => Schema.Struct({
494
494
  data: Schema.String,
495
495
  format: Schema.Union([Schema.Literal("json"), Schema.Literal("csv")]),
496
496
  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" }))
497
- });
497
+ }))();
498
498
  const ContactsExport401 = UnauthorizedError;
499
499
  const ContactsExport403 = ForbiddenError;
500
500
  const ContactsExport422 = ValidationError;
501
501
  const ContactsExport500 = InternalError;
502
502
  const ContactsExport504 = GatewayTimeoutError;
503
- const ContactsFindRequestJson = /* @__PURE__ */ Schema.Struct({
503
+ const ContactsFindRequestJson = /* @__PURE__ */ (() => Schema.Struct({
504
504
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
505
505
  email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
506
506
  phone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
507
507
  externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
508
- });
509
- const ContactsFind200 = /* @__PURE__ */ Schema.Union([Contact, Schema.Null]);
508
+ }))();
509
+ const ContactsFind200 = /* @__PURE__ */ (() => Schema.Union([Contact, Schema.Null]))();
510
510
  const ContactsFind401 = UnauthorizedError;
511
511
  const ContactsFind403 = ForbiddenError;
512
512
  const ContactsFind404 = ResourceNotFoundError;
@@ -514,7 +514,7 @@ const ContactsFind409 = ConflictError;
514
514
  const ContactsFind422 = ValidationError;
515
515
  const ContactsFind500 = InternalError;
516
516
  const ContactsFind504 = GatewayTimeoutError;
517
- const ContactsFindOrCreateRequestJson = /* @__PURE__ */ Schema.Struct({
517
+ const ContactsFindOrCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
518
518
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
519
519
  lookup: ContactLookup,
520
520
  create: Schema.optionalKey(Schema.Union([Schema.Struct({
@@ -525,11 +525,11 @@ const ContactsFindOrCreateRequestJson = /* @__PURE__ */ Schema.Struct({
525
525
  profile: Schema.optionalKey(Schema.Union([Schema.Union([ContactProfile, Schema.Null]), Schema.Null])),
526
526
  externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
527
527
  }), Schema.Null]))
528
- });
529
- const ContactsFindOrCreate200 = /* @__PURE__ */ Schema.Struct({
528
+ }))();
529
+ const ContactsFindOrCreate200 = /* @__PURE__ */ (() => Schema.Struct({
530
530
  contact: Contact,
531
531
  created: Schema.Boolean
532
- });
532
+ }))();
533
533
  const ContactsFindOrCreate401 = UnauthorizedError;
534
534
  const ContactsFindOrCreate402 = PaymentRequiredError;
535
535
  const ContactsFindOrCreate403 = ForbiddenError;
@@ -539,7 +539,7 @@ const ContactsFindOrCreate422 = ValidationError;
539
539
  const ContactsFindOrCreate500 = InternalError;
540
540
  const ContactsFindOrCreate502 = BillingProviderError;
541
541
  const ContactsFindOrCreate504 = GatewayTimeoutError;
542
- const ContactsStartImportRequestJson = /* @__PURE__ */ Schema.Union([Schema.Struct({
542
+ const ContactsStartImportRequestJson = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
543
543
  mode: Schema.Literal("new"),
544
544
  input: Schema.Struct({
545
545
  preset: Schema.Union([
@@ -584,8 +584,8 @@ const ContactsStartImportRequestJson = /* @__PURE__ */ Schema.Union([Schema.Stru
584
584
  mode: Schema.Literal("resume"),
585
585
  jobId: ContactImportJobId,
586
586
  expectedGeneration: 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" }))
587
- })]);
588
- const ContactsStartImport202 = /* @__PURE__ */ Schema.Struct({
587
+ })]))();
588
+ const ContactsStartImport202 = /* @__PURE__ */ (() => Schema.Struct({
589
589
  id: ContactImportJobId,
590
590
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
591
591
  topicId: TopicId,
@@ -626,18 +626,18 @@ const ContactsStartImport202 = /* @__PURE__ */ Schema.Struct({
626
626
  retryable: Schema.Boolean
627
627
  }), Schema.Null]),
628
628
  resumable: Schema.Boolean
629
- });
629
+ }))();
630
630
  const ContactsStartImport401 = UnauthorizedError;
631
631
  const ContactsStartImport402 = PaymentRequiredError;
632
- const ContactsStartImport403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
632
+ const ContactsStartImport403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
633
633
  const ContactsStartImport404 = ResourceNotFoundError;
634
634
  const ContactsStartImport409 = ConflictError;
635
635
  const ContactsStartImport422 = ValidationError;
636
636
  const ContactsStartImport500 = InternalError;
637
637
  const ContactsStartImport502 = BillingProviderError;
638
638
  const ContactsStartImport504 = GatewayTimeoutError;
639
- const ContactsGetImportJobPathParams = /* @__PURE__ */ Schema.Struct({ id: ContactImportJobId });
640
- const ContactsGetImportJob200 = /* @__PURE__ */ Schema.Struct({
639
+ const ContactsGetImportJobPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactImportJobId }))();
640
+ const ContactsGetImportJob200 = /* @__PURE__ */ (() => Schema.Struct({
641
641
  id: ContactImportJobId,
642
642
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
643
643
  topicId: TopicId,
@@ -678,14 +678,14 @@ const ContactsGetImportJob200 = /* @__PURE__ */ Schema.Struct({
678
678
  retryable: Schema.Boolean
679
679
  }), Schema.Null]),
680
680
  resumable: Schema.Boolean
681
- });
681
+ }))();
682
682
  const ContactsGetImportJob401 = UnauthorizedError;
683
683
  const ContactsGetImportJob403 = ForbiddenError;
684
684
  const ContactsGetImportJob404 = ResourceNotFoundError;
685
685
  const ContactsGetImportJob422 = ValidationError;
686
686
  const ContactsGetImportJob500 = InternalError;
687
687
  const ContactsGetImportJob504 = GatewayTimeoutError;
688
- const ContactsPlanImportRequestJson = /* @__PURE__ */ Schema.Struct({
688
+ const ContactsPlanImportRequestJson = /* @__PURE__ */ (() => Schema.Struct({
689
689
  preset: Schema.Union([
690
690
  Schema.Literal("beehiiv"),
691
691
  Schema.Literal("substack"),
@@ -721,8 +721,8 @@ const ContactsPlanImportRequestJson = /* @__PURE__ */ Schema.Struct({
721
721
  })]),
722
722
  suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
723
723
  })]).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" }))
724
- });
725
- const ContactsPlanImport200 = /* @__PURE__ */ Schema.Struct({
724
+ }))();
725
+ const ContactsPlanImport200 = /* @__PURE__ */ (() => Schema.Struct({
726
726
  planHash: Schema.String,
727
727
  presetVersion: Schema.String,
728
728
  namespaceId: Schema.Union([NamespaceId, Schema.Null]),
@@ -747,9 +747,9 @@ const ContactsPlanImport200 = /* @__PURE__ */ Schema.Struct({
747
747
  email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
748
748
  })),
749
749
  diagnosticsTruncated: Schema.Boolean
750
- });
750
+ }))();
751
751
  const ContactsPlanImport401 = UnauthorizedError;
752
- const ContactsPlanImport403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
752
+ const ContactsPlanImport403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
753
753
  const ContactsPlanImport404 = ResourceNotFoundError;
754
754
  const ContactsPlanImport422 = ValidationError;
755
755
  const ContactsPlanImport500 = InternalError;