samva 0.56.0 → 0.56.1

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 (226) hide show
  1. package/AGENTS.md +2 -2
  2. package/README.md +9 -8
  3. package/dist/effect/accounts.js +9 -10
  4. package/dist/effect/agents.js +16 -17
  5. package/dist/effect/analytics.js +9 -10
  6. package/dist/effect/api-keys.js +11 -12
  7. package/dist/effect/approval-requests.js +7 -8
  8. package/dist/effect/attachments.js +7 -8
  9. package/dist/effect/brands.js +9 -10
  10. package/dist/effect/campaigns.js +18 -19
  11. package/dist/effect/contact-groups.js +13 -14
  12. package/dist/effect/contacts.js +29 -30
  13. package/dist/effect/conversations.js +16 -17
  14. package/dist/effect/custom-fields.js +7 -8
  15. package/dist/effect/descriptors/accounts.d.ts +50 -52
  16. package/dist/effect/descriptors/accounts.js +50 -52
  17. package/dist/effect/descriptors/agents.d.ts +113 -115
  18. package/dist/effect/descriptors/agents.js +120 -122
  19. package/dist/effect/descriptors/analytics.d.ts +47 -49
  20. package/dist/effect/descriptors/analytics.js +42 -44
  21. package/dist/effect/descriptors/api-keys.d.ts +69 -71
  22. package/dist/effect/descriptors/api-keys.js +73 -75
  23. package/dist/effect/descriptors/approval-requests.d.ts +34 -36
  24. package/dist/effect/descriptors/approval-requests.js +36 -38
  25. package/dist/effect/descriptors/attachments.d.ts +34 -36
  26. package/dist/effect/descriptors/attachments.js +36 -38
  27. package/dist/effect/descriptors/brands.d.ts +51 -53
  28. package/dist/effect/descriptors/brands.js +53 -55
  29. package/dist/effect/descriptors/campaigns.d.ts +130 -132
  30. package/dist/effect/descriptors/campaigns.js +137 -139
  31. package/dist/effect/descriptors/contact-groups.d.ts +86 -88
  32. package/dist/effect/descriptors/contact-groups.js +90 -92
  33. package/dist/effect/descriptors/contacts.d.ts +242 -244
  34. package/dist/effect/descriptors/contacts.js +227 -229
  35. package/dist/effect/descriptors/conversations.d.ts +114 -116
  36. package/dist/effect/descriptors/conversations.js +123 -125
  37. package/dist/effect/descriptors/custom-fields.d.ts +33 -35
  38. package/dist/effect/descriptors/custom-fields.js +33 -35
  39. package/dist/effect/descriptors/email.d.ts +623 -625
  40. package/dist/effect/descriptors/email.js +562 -578
  41. package/dist/effect/descriptors/events.d.ts +15 -17
  42. package/dist/effect/descriptors/events.js +14 -16
  43. package/dist/effect/descriptors/feedback.d.ts +7 -9
  44. package/dist/effect/descriptors/feedback.js +3 -3
  45. package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
  46. package/dist/effect/descriptors/integrations-catalog.js +142 -144
  47. package/dist/effect/descriptors/integrations.d.ts +60 -62
  48. package/dist/effect/descriptors/integrations.js +63 -65
  49. package/dist/effect/descriptors/journeys.d.ts +123 -125
  50. package/dist/effect/descriptors/journeys.js +133 -135
  51. package/dist/effect/descriptors/logs.d.ts +16 -18
  52. package/dist/effect/descriptors/logs.js +16 -18
  53. package/dist/effect/descriptors/mailboxes.d.ts +780 -782
  54. package/dist/effect/descriptors/mailboxes.js +795 -797
  55. package/dist/effect/descriptors/media.d.ts +43 -45
  56. package/dist/effect/descriptors/media.js +46 -48
  57. package/dist/effect/descriptors/messages.d.ts +86 -88
  58. package/dist/effect/descriptors/messages.js +83 -92
  59. package/dist/effect/descriptors/namespaces.d.ts +96 -98
  60. package/dist/effect/descriptors/namespaces.js +107 -109
  61. package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
  62. package/dist/effect/descriptors/newsletter-domains.js +39 -41
  63. package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
  64. package/dist/effect/descriptors/newsletter-issues.js +109 -111
  65. package/dist/effect/descriptors/newsletters.d.ts +43 -45
  66. package/dist/effect/descriptors/newsletters.js +46 -48
  67. package/dist/effect/descriptors/operations.d.ts +25 -27
  68. package/dist/effect/descriptors/operations.js +26 -28
  69. package/dist/effect/descriptors/organizations.d.ts +96 -98
  70. package/dist/effect/descriptors/organizations.js +86 -88
  71. package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
  72. package/dist/effect/descriptors/phone-numbers.js +40 -42
  73. package/dist/effect/descriptors/policies.d.ts +26 -28
  74. package/dist/effect/descriptors/policies.js +29 -31
  75. package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
  76. package/dist/effect/descriptors/scheduled-messages.js +43 -45
  77. package/dist/effect/descriptors/subscriptions.d.ts +7 -9
  78. package/dist/effect/descriptors/subscriptions.js +3 -3
  79. package/dist/effect/descriptors/template-registrations.d.ts +26 -28
  80. package/dist/effect/descriptors/template-registrations.js +29 -31
  81. package/dist/effect/descriptors/template-share-links.d.ts +44 -46
  82. package/dist/effect/descriptors/template-share-links.js +49 -51
  83. package/dist/effect/descriptors/templates.d.ts +361 -363
  84. package/dist/effect/descriptors/templates.js +348 -350
  85. package/dist/effect/descriptors/topic-forms.d.ts +44 -46
  86. package/dist/effect/descriptors/topic-forms.js +49 -51
  87. package/dist/effect/descriptors/topics.d.ts +77 -79
  88. package/dist/effect/descriptors/topics.js +80 -82
  89. package/dist/effect/descriptors/webhooks.d.ts +96 -98
  90. package/dist/effect/descriptors/webhooks.js +103 -105
  91. package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
  92. package/dist/effect/descriptors/whats-app-flows.js +90 -92
  93. package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
  94. package/dist/effect/descriptors/whats-app-setup-links.js +33 -35
  95. package/dist/effect/descriptors/whats-app.d.ts +110 -112
  96. package/dist/effect/descriptors/whats-app.js +111 -113
  97. package/dist/effect/descriptors/whoami.d.ts +7 -9
  98. package/dist/effect/descriptors/whoami.js +3 -3
  99. package/dist/effect/email.js +66 -67
  100. package/dist/effect/events.js +5 -6
  101. package/dist/effect/feedback.js +4 -4
  102. package/dist/effect/generated/accounts.d.ts +144 -142
  103. package/dist/effect/generated/accounts.js +14 -9
  104. package/dist/effect/generated/agents.d.ts +1502 -1493
  105. package/dist/effect/generated/agents.js +28 -16
  106. package/dist/effect/generated/analytics.d.ts +55 -53
  107. package/dist/effect/generated/analytics.js +14 -9
  108. package/dist/effect/generated/api-keys.d.ts +216 -212
  109. package/dist/effect/generated/api-keys.js +18 -11
  110. package/dist/effect/generated/approval-requests.d.ts +60 -60
  111. package/dist/effect/generated/approval-requests.js +10 -7
  112. package/dist/effect/generated/attachments.d.ts +32 -32
  113. package/dist/effect/generated/attachments.js +10 -7
  114. package/dist/effect/generated/brands.d.ts +179 -177
  115. package/dist/effect/generated/brands.js +14 -9
  116. package/dist/effect/generated/campaigns.d.ts +1083 -1072
  117. package/dist/effect/generated/campaigns.js +32 -18
  118. package/dist/effect/generated/contact-events.d.ts +3 -6
  119. package/dist/effect/generated/contact-events.js +4 -4
  120. package/dist/effect/generated/contact-groups.d.ts +186 -180
  121. package/dist/effect/generated/contact-groups.js +22 -13
  122. package/dist/effect/generated/contacts.d.ts +1565 -1545
  123. package/dist/effect/generated/contacts.js +50 -27
  124. package/dist/effect/generated/conversations.d.ts +340 -331
  125. package/dist/effect/generated/conversations.js +28 -16
  126. package/dist/effect/generated/custom-fields.d.ts +63 -63
  127. package/dist/effect/generated/custom-fields.js +10 -7
  128. package/dist/effect/generated/email.d.ts +2731 -2671
  129. package/dist/effect/generated/email.js +130 -67
  130. package/dist/effect/generated/events.d.ts +160 -162
  131. package/dist/effect/generated/events.js +6 -5
  132. package/dist/effect/generated/feedback.d.ts +3 -6
  133. package/dist/effect/generated/feedback.js +4 -4
  134. package/dist/effect/generated/index.d.ts +174 -45
  135. package/dist/effect/generated/integrations-catalog.d.ts +459 -446
  136. package/dist/effect/generated/integrations-catalog.js +36 -20
  137. package/dist/effect/generated/integrations.d.ts +155 -152
  138. package/dist/effect/generated/integrations.js +16 -10
  139. package/dist/effect/generated/journeys.d.ts +864 -854
  140. package/dist/effect/generated/journeys.js +30 -17
  141. package/dist/effect/generated/logs.d.ts +147 -149
  142. package/dist/effect/generated/logs.js +6 -5
  143. package/dist/effect/generated/mailboxes.d.ts +7271 -7196
  144. package/dist/effect/generated/mailboxes.js +160 -82
  145. package/dist/effect/generated/media.d.ts +77 -76
  146. package/dist/effect/generated/media.js +12 -8
  147. package/dist/effect/generated/messages.d.ts +1092 -1086
  148. package/dist/effect/generated/messages.js +22 -13
  149. package/dist/effect/generated/namespaces.d.ts +184 -177
  150. package/dist/effect/generated/namespaces.js +24 -14
  151. package/dist/effect/generated/newsletter-domains.d.ts +57 -57
  152. package/dist/effect/generated/newsletter-domains.js +10 -7
  153. package/dist/effect/generated/newsletter-issues.d.ts +225 -218
  154. package/dist/effect/generated/newsletter-issues.js +24 -14
  155. package/dist/effect/generated/newsletters.d.ts +46 -45
  156. package/dist/effect/generated/newsletters.js +12 -8
  157. package/dist/effect/generated/operations.d.ts +79 -80
  158. package/dist/effect/generated/operations.js +8 -6
  159. package/dist/effect/generated/organizations.d.ts +438 -430
  160. package/dist/effect/generated/organizations.js +26 -15
  161. package/dist/effect/generated/phone-numbers.d.ts +87 -86
  162. package/dist/effect/generated/phone-numbers.js +12 -8
  163. package/dist/effect/generated/policies.d.ts +64 -65
  164. package/dist/effect/generated/policies.js +8 -6
  165. package/dist/effect/generated/scheduled-messages.d.ts +66 -65
  166. package/dist/effect/generated/scheduled-messages.js +12 -8
  167. package/dist/effect/generated/shared.d.ts +33 -33
  168. package/dist/effect/generated/shared.js +61 -61
  169. package/dist/effect/generated/subscriptions.d.ts +3 -6
  170. package/dist/effect/generated/subscriptions.js +4 -4
  171. package/dist/effect/generated/template-registrations.d.ts +135 -136
  172. package/dist/effect/generated/template-registrations.js +8 -6
  173. package/dist/effect/generated/template-share-links.d.ts +25 -24
  174. package/dist/effect/generated/template-share-links.js +12 -8
  175. package/dist/effect/generated/templates.d.ts +2678 -2645
  176. package/dist/effect/generated/templates.js +76 -40
  177. package/dist/effect/generated/topic-forms.d.ts +47 -46
  178. package/dist/effect/generated/topic-forms.js +12 -8
  179. package/dist/effect/generated/topics.d.ts +204 -199
  180. package/dist/effect/generated/topics.js +20 -12
  181. package/dist/effect/generated/webhooks.d.ts +268 -261
  182. package/dist/effect/generated/webhooks.js +24 -14
  183. package/dist/effect/generated/whats-app-flows.d.ts +250 -244
  184. package/dist/effect/generated/whats-app-flows.js +22 -13
  185. package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
  186. package/dist/effect/generated/whats-app-setup-links.js +10 -7
  187. package/dist/effect/generated/whats-app.d.ts +439 -430
  188. package/dist/effect/generated/whats-app.js +28 -16
  189. package/dist/effect/generated/whoami.d.ts +3 -6
  190. package/dist/effect/generated/whoami.js +4 -4
  191. package/dist/effect/integrations-catalog.js +20 -21
  192. package/dist/effect/integrations.js +10 -11
  193. package/dist/effect/internal/client.d.ts +2 -1
  194. package/dist/effect/internal/client.js +3 -3
  195. package/dist/effect/internal/email-sender.js +5 -4
  196. package/dist/effect/internal/operation.d.ts +11 -7
  197. package/dist/effect/internal/operation.js +17 -12
  198. package/dist/effect/internal/send.js +11 -8
  199. package/dist/effect/journeys.js +17 -18
  200. package/dist/effect/logs.js +5 -6
  201. package/dist/effect/mailboxes.js +82 -83
  202. package/dist/effect/media.js +8 -9
  203. package/dist/effect/messages.js +12 -13
  204. package/dist/effect/namespaces.js +14 -15
  205. package/dist/effect/newsletter-domains.js +7 -8
  206. package/dist/effect/newsletter-issues.js +14 -15
  207. package/dist/effect/newsletters.js +8 -9
  208. package/dist/effect/operations.js +6 -7
  209. package/dist/effect/organizations.js +15 -16
  210. package/dist/effect/phone-numbers.js +8 -9
  211. package/dist/effect/policies.js +6 -7
  212. package/dist/effect/runtime.js +3 -3
  213. package/dist/effect/scheduled-messages.js +8 -9
  214. package/dist/effect/subscriptions.js +4 -4
  215. package/dist/effect/template-registrations.js +6 -7
  216. package/dist/effect/template-share-links.js +8 -9
  217. package/dist/effect/templates.js +40 -41
  218. package/dist/effect/topic-forms.js +8 -9
  219. package/dist/effect/topics.js +12 -13
  220. package/dist/effect/webhooks.js +14 -15
  221. package/dist/effect/whatsapp-flows.js +13 -14
  222. package/dist/effect/whatsapp-setup-links.js +7 -8
  223. package/dist/effect/whatsapp.js +16 -17
  224. package/dist/effect/whoami.js +4 -4
  225. package/dist/package.json.js +1 -1
  226. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
1
+ import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
3
  import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/conversations.ts
@@ -372,7 +372,7 @@ const ConversationsRemoveTags404 = ResourceNotFoundError;
372
372
  const ConversationsRemoveTags422 = ValidationError;
373
373
  const ConversationsRemoveTags500 = InternalError;
374
374
  const ConversationsRemoveTags504 = GatewayTimeoutError;
375
- var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(HttpApiEndpoint.get("conversationsList", "/v1/conversations", {
375
+ const ConversationsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("conversationsList", "/v1/conversations", {
376
376
  query: ConversationsListQuery,
377
377
  success: ConversationsList200,
378
378
  error: [
@@ -383,7 +383,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
383
383
  ConversationsList500,
384
384
  ConversationsList504.pipe(HttpApiSchema.status(504))
385
385
  ]
386
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."), HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
386
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."))();
387
+ const ConversationsCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
387
388
  payload: ConversationsCreateRequestJson,
388
389
  success: ConversationsCreate201.pipe(HttpApiSchema.status(201)),
389
390
  error: [
@@ -396,7 +397,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
396
397
  ConversationsCreate500,
397
398
  ConversationsCreate504.pipe(HttpApiSchema.status(504))
398
399
  ]
399
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.create").annotate(OpenApi.Summary, "Create a conversation").annotate(OpenApi.Description, "Creates a new conversation with its initial contacts and returns it with a 201 status."), HttpApiEndpoint.get("conversationsGetById", "/v1/conversations/:id", {
400
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.create").annotate(OpenApi.Summary, "Create a conversation").annotate(OpenApi.Description, "Creates a new conversation with its initial contacts and returns it with a 201 status."))();
401
+ const ConversationsGetByIdEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("conversationsGetById", "/v1/conversations/:id", {
400
402
  params: ConversationsGetByIdPathParams,
401
403
  success: ConversationsGetById200,
402
404
  error: [
@@ -408,7 +410,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
408
410
  ConversationsGetById500,
409
411
  ConversationsGetById504.pipe(HttpApiSchema.status(504))
410
412
  ]
411
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.getById").annotate(OpenApi.Summary, "Get a conversation").annotate(OpenApi.Description, "Returns a single conversation with the contacts taking part in it."), HttpApiEndpoint.patch("conversationsUpdate", "/v1/conversations/:id", {
413
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.getById").annotate(OpenApi.Summary, "Get a conversation").annotate(OpenApi.Description, "Returns a single conversation with the contacts taking part in it."))();
414
+ const ConversationsUpdateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.patch("conversationsUpdate", "/v1/conversations/:id", {
412
415
  params: ConversationsUpdatePathParams,
413
416
  payload: ConversationsUpdateRequestJson,
414
417
  success: ConversationsUpdate200,
@@ -422,7 +425,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
422
425
  ConversationsUpdate500,
423
426
  ConversationsUpdate504.pipe(HttpApiSchema.status(504))
424
427
  ]
425
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.update").annotate(OpenApi.Summary, "Update a conversation").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `primaryChannel` must be one of the conversation's channels. Tags, categories, and channels are not updated here: use `POST` and `DELETE` on `/v1/conversations/{id}/tags`, `/v1/conversations/{id}/categories`, and `/v1/conversations/{id}/channels`."), HttpApiEndpoint.post("conversationsAddCategories", "/v1/conversations/:id/categories", {
428
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.update").annotate(OpenApi.Summary, "Update a conversation").annotate(OpenApi.Description, "Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key. `primaryChannel` must be one of the conversation's channels. Tags, categories, and channels are not updated here: use `POST` and `DELETE` on `/v1/conversations/{id}/tags`, `/v1/conversations/{id}/categories`, and `/v1/conversations/{id}/channels`."))();
429
+ const ConversationsAddCategoriesEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("conversationsAddCategories", "/v1/conversations/:id/categories", {
426
430
  params: ConversationsAddCategoriesPathParams,
427
431
  payload: ConversationsAddCategoriesRequestJson,
428
432
  success: ConversationsAddCategories200,
@@ -435,7 +439,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
435
439
  ConversationsAddCategories500,
436
440
  ConversationsAddCategories504.pipe(HttpApiSchema.status(504))
437
441
  ]
438
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addCategories").annotate(OpenApi.Summary, "Add conversation categories").annotate(OpenApi.Description, "Adds the given categories to the conversation, keeping the ones it already has, and returns the conversation."), HttpApiEndpoint.delete("conversationsRemoveCategories", "/v1/conversations/:id/categories", {
442
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addCategories").annotate(OpenApi.Summary, "Add conversation categories").annotate(OpenApi.Description, "Adds the given categories to the conversation, keeping the ones it already has, and returns the conversation."))();
443
+ const ConversationsRemoveCategoriesEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("conversationsRemoveCategories", "/v1/conversations/:id/categories", {
439
444
  params: ConversationsRemoveCategoriesPathParams,
440
445
  payload: ConversationsRemoveCategoriesRequestJson,
441
446
  success: ConversationsRemoveCategories200,
@@ -448,7 +453,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
448
453
  ConversationsRemoveCategories500,
449
454
  ConversationsRemoveCategories504.pipe(HttpApiSchema.status(504))
450
455
  ]
451
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeCategories").annotate(OpenApi.Summary, "Remove conversation categories").annotate(OpenApi.Description, "Removes the given categories from the conversation and returns the conversation. A category the conversation does not have is ignored."), HttpApiEndpoint.post("conversationsAddChannels", "/v1/conversations/:id/channels", {
456
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeCategories").annotate(OpenApi.Summary, "Remove conversation categories").annotate(OpenApi.Description, "Removes the given categories from the conversation and returns the conversation. A category the conversation does not have is ignored."))();
457
+ const ConversationsAddChannelsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("conversationsAddChannels", "/v1/conversations/:id/channels", {
452
458
  params: ConversationsAddChannelsPathParams,
453
459
  payload: ConversationsAddChannelsRequestJson,
454
460
  success: ConversationsAddChannels200,
@@ -461,7 +467,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
461
467
  ConversationsAddChannels500,
462
468
  ConversationsAddChannels504.pipe(HttpApiSchema.status(504))
463
469
  ]
464
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addChannels").annotate(OpenApi.Summary, "Add conversation channels").annotate(OpenApi.Description, "Adds the given channels to the conversation, keeping the ones it already has, and returns the conversation."), HttpApiEndpoint.delete("conversationsRemoveChannels", "/v1/conversations/:id/channels", {
470
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addChannels").annotate(OpenApi.Summary, "Add conversation channels").annotate(OpenApi.Description, "Adds the given channels to the conversation, keeping the ones it already has, and returns the conversation."))();
471
+ const ConversationsRemoveChannelsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("conversationsRemoveChannels", "/v1/conversations/:id/channels", {
465
472
  params: ConversationsRemoveChannelsPathParams,
466
473
  payload: ConversationsRemoveChannelsRequestJson,
467
474
  success: ConversationsRemoveChannels200,
@@ -474,7 +481,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
474
481
  ConversationsRemoveChannels500,
475
482
  ConversationsRemoveChannels504.pipe(HttpApiSchema.status(504))
476
483
  ]
477
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeChannels").annotate(OpenApi.Summary, "Remove conversation channels").annotate(OpenApi.Description, "Removes the given channels from the conversation and returns the conversation. The primary channel cannot be removed; a channel the conversation does not have is ignored."), HttpApiEndpoint.post("conversationsAddContacts", "/v1/conversations/:id/contacts", {
484
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeChannels").annotate(OpenApi.Summary, "Remove conversation channels").annotate(OpenApi.Description, "Removes the given channels from the conversation and returns the conversation. The primary channel cannot be removed; a channel the conversation does not have is ignored."))();
485
+ const ConversationsAddContactsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("conversationsAddContacts", "/v1/conversations/:id/contacts", {
478
486
  params: ConversationsAddContactsPathParams,
479
487
  payload: ConversationsAddContactsRequestJson,
480
488
  success: ConversationsAddContacts200,
@@ -487,7 +495,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
487
495
  ConversationsAddContacts500,
488
496
  ConversationsAddContacts504.pipe(HttpApiSchema.status(504))
489
497
  ]
490
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addContacts").annotate(OpenApi.Summary, "Add contacts to a conversation").annotate(OpenApi.Description, "Attaches one or more contacts to a conversation and returns the updated conversation. One request carries at most 1000 ids."), HttpApiEndpoint.delete("conversationsRemoveContacts", "/v1/conversations/:id/contacts", {
498
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addContacts").annotate(OpenApi.Summary, "Add contacts to a conversation").annotate(OpenApi.Description, "Attaches one or more contacts to a conversation and returns the updated conversation. One request carries at most 1000 ids."))();
499
+ const ConversationsRemoveContactsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("conversationsRemoveContacts", "/v1/conversations/:id/contacts", {
491
500
  params: ConversationsRemoveContactsPathParams,
492
501
  payload: ConversationsRemoveContactsRequestJson,
493
502
  success: ConversationsRemoveContacts200,
@@ -500,7 +509,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
500
509
  ConversationsRemoveContacts500,
501
510
  ConversationsRemoveContacts504.pipe(HttpApiSchema.status(504))
502
511
  ]
503
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeContacts").annotate(OpenApi.Summary, "Remove contacts from a conversation").annotate(OpenApi.Description, "Detaches one or more contacts from a conversation and returns the updated conversation. One request carries at most 1000 ids."), HttpApiEndpoint.get("conversationsListMessages", "/v1/conversations/:id/messages", {
512
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeContacts").annotate(OpenApi.Summary, "Remove contacts from a conversation").annotate(OpenApi.Description, "Detaches one or more contacts from a conversation and returns the updated conversation. One request carries at most 1000 ids."))();
513
+ const ConversationsListMessagesEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("conversationsListMessages", "/v1/conversations/:id/messages", {
504
514
  params: ConversationsListMessagesPathParams,
505
515
  query: ConversationsListMessagesQuery,
506
516
  success: ConversationsListMessages200,
@@ -513,7 +523,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
513
523
  ConversationsListMessages500,
514
524
  ConversationsListMessages504.pipe(HttpApiSchema.status(504))
515
525
  ]
516
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.listMessages").annotate(OpenApi.Summary, "List conversation messages").annotate(OpenApi.Description, "Returns the conversation's message summaries, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a message's content with `GET /v1/messages/{id}/content`."), HttpApiEndpoint.post("conversationsAddTags", "/v1/conversations/:id/tags", {
526
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.listMessages").annotate(OpenApi.Summary, "List conversation messages").annotate(OpenApi.Description, "Returns the conversation's message summaries, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a message's content with `GET /v1/messages/{id}/content`."))();
527
+ const ConversationsAddTagsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("conversationsAddTags", "/v1/conversations/:id/tags", {
517
528
  params: ConversationsAddTagsPathParams,
518
529
  payload: ConversationsAddTagsRequestJson,
519
530
  success: ConversationsAddTags200,
@@ -526,7 +537,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
526
537
  ConversationsAddTags500,
527
538
  ConversationsAddTags504.pipe(HttpApiSchema.status(504))
528
539
  ]
529
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addTags").annotate(OpenApi.Summary, "Add conversation tags").annotate(OpenApi.Description, "Adds the given tags to the conversation, keeping the tags it already has, and returns the conversation."), HttpApiEndpoint.delete("conversationsRemoveTags", "/v1/conversations/:id/tags", {
540
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.addTags").annotate(OpenApi.Summary, "Add conversation tags").annotate(OpenApi.Description, "Adds the given tags to the conversation, keeping the tags it already has, and returns the conversation."))();
541
+ const ConversationsRemoveTagsEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("conversationsRemoveTags", "/v1/conversations/:id/tags", {
530
542
  params: ConversationsRemoveTagsPathParams,
531
543
  payload: ConversationsRemoveTagsRequestJson,
532
544
  success: ConversationsRemoveTags200,
@@ -539,7 +551,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
539
551
  ConversationsRemoveTags500,
540
552
  ConversationsRemoveTags504.pipe(HttpApiSchema.status(504))
541
553
  ]
542
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeTags").annotate(OpenApi.Summary, "Remove conversation tags").annotate(OpenApi.Description, "Removes the given tags from the conversation and returns the conversation. A tag the conversation does not have is ignored.")).annotate(OpenApi.Description, "Create, update, and list conversations with your contacts.") {};
543
- export { Conversation, ConversationContact, ConversationContext, ConversationPage, ConversationSummary, ConversationsAddCategories200, ConversationsAddCategories400, ConversationsAddCategories401, ConversationsAddCategories403, ConversationsAddCategories404, ConversationsAddCategories422, ConversationsAddCategories500, ConversationsAddCategories504, ConversationsAddCategoriesPathParams, ConversationsAddCategoriesRequestJson, ConversationsAddChannels200, ConversationsAddChannels400, ConversationsAddChannels401, ConversationsAddChannels403, ConversationsAddChannels404, ConversationsAddChannels422, ConversationsAddChannels500, ConversationsAddChannels504, ConversationsAddChannelsPathParams, ConversationsAddChannelsRequestJson, ConversationsAddContacts200, ConversationsAddContacts400, ConversationsAddContacts401, ConversationsAddContacts403, ConversationsAddContacts404, ConversationsAddContacts422, ConversationsAddContacts500, ConversationsAddContacts504, ConversationsAddContactsPathParams, ConversationsAddContactsRequestJson, ConversationsAddTags200, ConversationsAddTags400, ConversationsAddTags401, ConversationsAddTags403, ConversationsAddTags404, ConversationsAddTags422, ConversationsAddTags500, ConversationsAddTags504, ConversationsAddTagsPathParams, ConversationsAddTagsRequestJson, ConversationsCreate201, ConversationsCreate400, ConversationsCreate401, ConversationsCreate403, ConversationsCreate404, ConversationsCreate409, ConversationsCreate422, ConversationsCreate500, ConversationsCreate504, ConversationsCreateRequestJson, ConversationsGetById200, ConversationsGetById400, ConversationsGetById401, ConversationsGetById403, ConversationsGetById404, ConversationsGetById422, ConversationsGetById500, ConversationsGetById504, ConversationsGetByIdPathParams, ConversationsGroup, ConversationsList200, ConversationsList400, ConversationsList401, ConversationsList403, ConversationsList422, ConversationsList500, ConversationsList504, ConversationsListMessages200, ConversationsListMessages400, ConversationsListMessages401, ConversationsListMessages403, ConversationsListMessages404, ConversationsListMessages422, ConversationsListMessages500, ConversationsListMessages504, ConversationsListMessagesPathParams, ConversationsListMessagesQuery, ConversationsListQuery, ConversationsRemoveCategories200, ConversationsRemoveCategories400, ConversationsRemoveCategories401, ConversationsRemoveCategories403, ConversationsRemoveCategories404, ConversationsRemoveCategories422, ConversationsRemoveCategories500, ConversationsRemoveCategories504, ConversationsRemoveCategoriesPathParams, ConversationsRemoveCategoriesRequestJson, ConversationsRemoveChannels200, ConversationsRemoveChannels400, ConversationsRemoveChannels401, ConversationsRemoveChannels403, ConversationsRemoveChannels404, ConversationsRemoveChannels422, ConversationsRemoveChannels500, ConversationsRemoveChannels504, ConversationsRemoveChannelsPathParams, ConversationsRemoveChannelsRequestJson, ConversationsRemoveContacts200, ConversationsRemoveContacts400, ConversationsRemoveContacts401, ConversationsRemoveContacts403, ConversationsRemoveContacts404, ConversationsRemoveContacts422, ConversationsRemoveContacts500, ConversationsRemoveContacts504, ConversationsRemoveContactsPathParams, ConversationsRemoveContactsRequestJson, ConversationsRemoveTags200, ConversationsRemoveTags400, ConversationsRemoveTags401, ConversationsRemoveTags403, ConversationsRemoveTags404, ConversationsRemoveTags422, ConversationsRemoveTags500, ConversationsRemoveTags504, ConversationsRemoveTagsPathParams, ConversationsRemoveTagsRequestJson, ConversationsUpdate200, ConversationsUpdate400, ConversationsUpdate401, ConversationsUpdate403, ConversationsUpdate404, ConversationsUpdate409, ConversationsUpdate422, ConversationsUpdate500, ConversationsUpdate504, ConversationsUpdatePathParams, ConversationsUpdateRequestJson, UnknownRecord };
554
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeTags").annotate(OpenApi.Summary, "Remove conversation tags").annotate(OpenApi.Description, "Removes the given tags from the conversation and returns the conversation. A tag the conversation does not have is ignored."))();
555
+ export { Conversation, ConversationContact, ConversationContext, ConversationPage, ConversationSummary, ConversationsAddCategories200, ConversationsAddCategories400, ConversationsAddCategories401, ConversationsAddCategories403, ConversationsAddCategories404, ConversationsAddCategories422, ConversationsAddCategories500, ConversationsAddCategories504, ConversationsAddCategoriesEndpoint, ConversationsAddCategoriesPathParams, ConversationsAddCategoriesRequestJson, ConversationsAddChannels200, ConversationsAddChannels400, ConversationsAddChannels401, ConversationsAddChannels403, ConversationsAddChannels404, ConversationsAddChannels422, ConversationsAddChannels500, ConversationsAddChannels504, ConversationsAddChannelsEndpoint, ConversationsAddChannelsPathParams, ConversationsAddChannelsRequestJson, ConversationsAddContacts200, ConversationsAddContacts400, ConversationsAddContacts401, ConversationsAddContacts403, ConversationsAddContacts404, ConversationsAddContacts422, ConversationsAddContacts500, ConversationsAddContacts504, ConversationsAddContactsEndpoint, ConversationsAddContactsPathParams, ConversationsAddContactsRequestJson, ConversationsAddTags200, ConversationsAddTags400, ConversationsAddTags401, ConversationsAddTags403, ConversationsAddTags404, ConversationsAddTags422, ConversationsAddTags500, ConversationsAddTags504, ConversationsAddTagsEndpoint, ConversationsAddTagsPathParams, ConversationsAddTagsRequestJson, ConversationsCreate201, ConversationsCreate400, ConversationsCreate401, ConversationsCreate403, ConversationsCreate404, ConversationsCreate409, ConversationsCreate422, ConversationsCreate500, ConversationsCreate504, ConversationsCreateEndpoint, ConversationsCreateRequestJson, ConversationsGetById200, ConversationsGetById400, ConversationsGetById401, ConversationsGetById403, ConversationsGetById404, ConversationsGetById422, ConversationsGetById500, ConversationsGetById504, ConversationsGetByIdEndpoint, ConversationsGetByIdPathParams, ConversationsList200, ConversationsList400, ConversationsList401, ConversationsList403, ConversationsList422, ConversationsList500, ConversationsList504, ConversationsListEndpoint, ConversationsListMessages200, ConversationsListMessages400, ConversationsListMessages401, ConversationsListMessages403, ConversationsListMessages404, ConversationsListMessages422, ConversationsListMessages500, ConversationsListMessages504, ConversationsListMessagesEndpoint, ConversationsListMessagesPathParams, ConversationsListMessagesQuery, ConversationsListQuery, ConversationsRemoveCategories200, ConversationsRemoveCategories400, ConversationsRemoveCategories401, ConversationsRemoveCategories403, ConversationsRemoveCategories404, ConversationsRemoveCategories422, ConversationsRemoveCategories500, ConversationsRemoveCategories504, ConversationsRemoveCategoriesEndpoint, ConversationsRemoveCategoriesPathParams, ConversationsRemoveCategoriesRequestJson, ConversationsRemoveChannels200, ConversationsRemoveChannels400, ConversationsRemoveChannels401, ConversationsRemoveChannels403, ConversationsRemoveChannels404, ConversationsRemoveChannels422, ConversationsRemoveChannels500, ConversationsRemoveChannels504, ConversationsRemoveChannelsEndpoint, ConversationsRemoveChannelsPathParams, ConversationsRemoveChannelsRequestJson, ConversationsRemoveContacts200, ConversationsRemoveContacts400, ConversationsRemoveContacts401, ConversationsRemoveContacts403, ConversationsRemoveContacts404, ConversationsRemoveContacts422, ConversationsRemoveContacts500, ConversationsRemoveContacts504, ConversationsRemoveContactsEndpoint, ConversationsRemoveContactsPathParams, ConversationsRemoveContactsRequestJson, ConversationsRemoveTags200, ConversationsRemoveTags400, ConversationsRemoveTags401, ConversationsRemoveTags403, ConversationsRemoveTags404, ConversationsRemoveTags422, ConversationsRemoveTags500, ConversationsRemoveTags504, ConversationsRemoveTagsEndpoint, ConversationsRemoveTagsPathParams, ConversationsRemoveTagsRequestJson, ConversationsUpdate200, ConversationsUpdate400, ConversationsUpdate401, ConversationsUpdate403, ConversationsUpdate404, ConversationsUpdate409, ConversationsUpdate422, ConversationsUpdate500, ConversationsUpdate504, ConversationsUpdateEndpoint, ConversationsUpdatePathParams, ConversationsUpdateRequestJson, UnknownRecord };
544
556
 
545
557
  //# sourceMappingURL=conversations.js.map
@@ -1,5 +1,5 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
2
+ import { HttpApiEndpoint } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
5
5
  export type CustomFieldDefinitionId = string & EffectBrand.Brand<"CustomFieldDefinitionId">;
@@ -206,47 +206,21 @@ export type CustomFieldsUpdate500 = InternalError;
206
206
  export declare const CustomFieldsUpdate500: typeof InternalError;
207
207
  export type CustomFieldsUpdate504 = GatewayTimeoutError;
208
208
  export declare const CustomFieldsUpdate504: typeof GatewayTimeoutError;
209
- declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields", HttpApiEndpoint.HttpApiEndpoint<"customFieldsCreate", "POST", "/v1/custom-fields", never, never, Schema.toCodecJson<Schema.Struct<{
210
- readonly key: Schema.String;
211
- readonly label: Schema.String;
212
- readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
213
- readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
214
- readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
215
- readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
216
- readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
217
- }>>, never, Schema.toCodecJson<Schema.Struct<{
218
- readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
219
- readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
220
- readonly key: Schema.String;
221
- readonly label: Schema.String;
222
- readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
223
- readonly options: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
224
- readonly defaultValue: Schema.Union<readonly [Schema.String, Schema.Null]>;
225
- readonly isRequired: Schema.Boolean;
226
- readonly sortOrder: Schema.Finite;
227
- readonly createdAt: Schema.String;
228
- readonly updatedAt: Schema.String;
229
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
230
- readonly _tag: "ConflictError";
231
- readonly message: string;
232
- readonly resource: string;
233
- readonly id?: string | null;
234
- }, readonly [Schema.Struct<{
235
- readonly _tag: Schema.tag<"ConflictError">;
236
- readonly message: Schema.String;
237
- readonly resource: Schema.String;
238
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
239
- }>], {
240
- readonly _tag: "ConflictError";
241
- readonly message: string;
242
- readonly resource: string;
243
- readonly id?: string | null;
244
- }>, Schema.Struct<{
245
- readonly _tag: Schema.tag<"ConflictError">;
246
- readonly message: Schema.String;
247
- readonly resource: Schema.String;
248
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
249
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
209
+ export declare const CustomFieldsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"customFieldsList", "GET", "/v1/custom-fields", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
210
+ readonly items: Schema.$Array<Schema.Struct<{
211
+ readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
212
+ readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
213
+ readonly key: Schema.String;
214
+ readonly label: Schema.String;
215
+ readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
216
+ readonly options: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
217
+ readonly defaultValue: Schema.Union<readonly [Schema.String, Schema.Null]>;
218
+ readonly isRequired: Schema.Boolean;
219
+ readonly sortOrder: Schema.Finite;
220
+ readonly createdAt: Schema.String;
221
+ readonly updatedAt: Schema.String;
222
+ }>>;
223
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
250
224
  readonly _tag: "ForbiddenError";
251
225
  readonly message: string;
252
226
  }, readonly [Schema.Struct<{
@@ -326,21 +300,48 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
326
300
  readonly _tag: Schema.tag<"ValidationError">;
327
301
  readonly message: Schema.String;
328
302
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
329
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"customFieldsList", "GET", "/v1/custom-fields", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
330
- readonly items: Schema.$Array<Schema.Struct<{
331
- readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
332
- readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
333
- readonly key: Schema.String;
334
- readonly label: Schema.String;
335
- readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
336
- readonly options: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
337
- readonly defaultValue: Schema.Union<readonly [Schema.String, Schema.Null]>;
338
- readonly isRequired: Schema.Boolean;
339
- readonly sortOrder: Schema.Finite;
340
- readonly createdAt: Schema.String;
341
- readonly updatedAt: Schema.String;
342
- }>>;
343
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
303
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
304
+ export declare const CustomFieldsCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"customFieldsCreate", "POST", "/v1/custom-fields", never, never, Schema.toCodecJson<Schema.Struct<{
305
+ readonly key: Schema.String;
306
+ readonly label: Schema.String;
307
+ readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
308
+ readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
309
+ readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
310
+ readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
311
+ readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
312
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
313
+ readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
314
+ readonly organizationId: Schema.brand<Schema.String, "OrganizationId">;
315
+ readonly key: Schema.String;
316
+ readonly label: Schema.String;
317
+ readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
318
+ readonly options: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
319
+ readonly defaultValue: Schema.Union<readonly [Schema.String, Schema.Null]>;
320
+ readonly isRequired: Schema.Boolean;
321
+ readonly sortOrder: Schema.Finite;
322
+ readonly createdAt: Schema.String;
323
+ readonly updatedAt: Schema.String;
324
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
325
+ readonly _tag: "ConflictError";
326
+ readonly message: string;
327
+ readonly resource: string;
328
+ readonly id?: string | null;
329
+ }, readonly [Schema.Struct<{
330
+ readonly _tag: Schema.tag<"ConflictError">;
331
+ readonly message: Schema.String;
332
+ readonly resource: Schema.String;
333
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
334
+ }>], {
335
+ readonly _tag: "ConflictError";
336
+ readonly message: string;
337
+ readonly resource: string;
338
+ readonly id?: string | null;
339
+ }>, Schema.Struct<{
340
+ readonly _tag: Schema.tag<"ConflictError">;
341
+ readonly message: Schema.String;
342
+ readonly resource: Schema.String;
343
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
344
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
344
345
  readonly _tag: "ForbiddenError";
345
346
  readonly message: string;
346
347
  }, readonly [Schema.Struct<{
@@ -420,7 +421,8 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
420
421
  readonly _tag: Schema.tag<"ValidationError">;
421
422
  readonly message: Schema.String;
422
423
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
423
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"customFieldsRemove", "DELETE", "/v1/custom-fields/:id", Schema.toCodecStringTree<Schema.Struct<{
424
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
425
+ export declare const CustomFieldsRemoveEndpoint: HttpApiEndpoint.HttpApiEndpoint<"customFieldsRemove", "DELETE", "/v1/custom-fields/:id", Schema.toCodecStringTree<Schema.Struct<{
424
426
  readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
425
427
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
426
428
  readonly success: Schema.Boolean;
@@ -524,7 +526,8 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
524
526
  readonly _tag: Schema.tag<"ValidationError">;
525
527
  readonly message: Schema.String;
526
528
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
527
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"customFieldsUpdate", "PATCH", "/v1/custom-fields/:id", Schema.toCodecStringTree<Schema.Struct<{
529
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
530
+ export declare const CustomFieldsUpdateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"customFieldsUpdate", "PATCH", "/v1/custom-fields/:id", Schema.toCodecStringTree<Schema.Struct<{
528
531
  readonly id: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
529
532
  }>>, never, Schema.toCodecJson<Schema.Struct<{
530
533
  readonly label: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -644,7 +647,4 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
644
647
  readonly _tag: Schema.tag<"ValidationError">;
645
648
  readonly message: Schema.String;
646
649
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
647
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
648
- export declare class CustomFieldsGroup extends CustomFieldsGroup_base {
649
- }
650
- export {};
650
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
@@ -1,4 +1,4 @@
1
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
1
+ import { HttpApiEndpoint, HttpApiSchema, OpenApi } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
3
  import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  // src/effect/generated/custom-fields.ts
@@ -116,7 +116,7 @@ const CustomFieldsUpdate404 = ResourceNotFoundError;
116
116
  const CustomFieldsUpdate422 = ValidationError;
117
117
  const CustomFieldsUpdate500 = InternalError;
118
118
  const CustomFieldsUpdate504 = GatewayTimeoutError;
119
- var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(HttpApiEndpoint.get("customFieldsList", "/v1/custom-fields", {
119
+ const CustomFieldsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("customFieldsList", "/v1/custom-fields", {
120
120
  success: CustomFieldsList200,
121
121
  error: [
122
122
  CustomFieldsList400.pipe(HttpApiSchema.status(400)),
@@ -126,7 +126,8 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
126
126
  CustomFieldsList500,
127
127
  CustomFieldsList504.pipe(HttpApiSchema.status(504))
128
128
  ]
129
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.list").annotate(OpenApi.Summary, "List custom fields").annotate(OpenApi.Description, "Returns every custom field definition for the organization in display order. An organization defines at most 100, so the list is never paged."), HttpApiEndpoint.post("customFieldsCreate", "/v1/custom-fields", {
129
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.list").annotate(OpenApi.Summary, "List custom fields").annotate(OpenApi.Description, "Returns every custom field definition for the organization in display order. An organization defines at most 100, so the list is never paged."))();
130
+ const CustomFieldsCreateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("customFieldsCreate", "/v1/custom-fields", {
130
131
  payload: CustomFieldsCreateRequestJson,
131
132
  success: CustomFieldsCreate201.pipe(HttpApiSchema.status(201)),
132
133
  error: [
@@ -138,7 +139,8 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
138
139
  CustomFieldsCreate500,
139
140
  CustomFieldsCreate504.pipe(HttpApiSchema.status(504))
140
141
  ]
141
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.create").annotate(OpenApi.Summary, "Create a custom field").annotate(OpenApi.Description, "Creates a new custom field definition and returns it with a 201 status; the field key must be unique, and an organization defines at most 100."), HttpApiEndpoint.delete("customFieldsRemove", "/v1/custom-fields/:id", {
142
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.create").annotate(OpenApi.Summary, "Create a custom field").annotate(OpenApi.Description, "Creates a new custom field definition and returns it with a 201 status; the field key must be unique, and an organization defines at most 100."))();
143
+ const CustomFieldsRemoveEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.delete("customFieldsRemove", "/v1/custom-fields/:id", {
142
144
  params: CustomFieldsRemovePathParams,
143
145
  success: CustomFieldsRemove200,
144
146
  error: [
@@ -150,7 +152,8 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
150
152
  CustomFieldsRemove500,
151
153
  CustomFieldsRemove504.pipe(HttpApiSchema.status(504))
152
154
  ]
153
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.remove").annotate(OpenApi.Summary, "Delete a custom field").annotate(OpenApi.Description, "Permanently deletes a custom field definition by its ID."), HttpApiEndpoint.patch("customFieldsUpdate", "/v1/custom-fields/:id", {
155
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.remove").annotate(OpenApi.Summary, "Delete a custom field").annotate(OpenApi.Description, "Permanently deletes a custom field definition by its ID."))();
156
+ const CustomFieldsUpdateEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.patch("customFieldsUpdate", "/v1/custom-fields/:id", {
154
157
  params: CustomFieldsUpdatePathParams,
155
158
  payload: CustomFieldsUpdateRequestJson,
156
159
  success: CustomFieldsUpdate200,
@@ -163,7 +166,7 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
163
166
  CustomFieldsUpdate500,
164
167
  CustomFieldsUpdate504.pipe(HttpApiSchema.status(504))
165
168
  ]
166
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.update").annotate(OpenApi.Summary, "Update a custom field").annotate(OpenApi.Description, "Updates an existing custom field definition and returns the updated field.")).annotate(OpenApi.Description, "Custom field definitions for contact metadata") {};
167
- export { CustomFieldDefinitionId, CustomFieldList, CustomFieldsCreate201, CustomFieldsCreate400, CustomFieldsCreate401, CustomFieldsCreate403, CustomFieldsCreate409, CustomFieldsCreate422, CustomFieldsCreate500, CustomFieldsCreate504, CustomFieldsCreateRequestJson, CustomFieldsGroup, CustomFieldsList200, CustomFieldsList400, CustomFieldsList401, CustomFieldsList403, CustomFieldsList422, CustomFieldsList500, CustomFieldsList504, CustomFieldsRemove200, CustomFieldsRemove400, CustomFieldsRemove401, CustomFieldsRemove403, CustomFieldsRemove404, CustomFieldsRemove422, CustomFieldsRemove500, CustomFieldsRemove504, CustomFieldsRemovePathParams, CustomFieldsUpdate200, CustomFieldsUpdate400, CustomFieldsUpdate401, CustomFieldsUpdate403, CustomFieldsUpdate404, CustomFieldsUpdate422, CustomFieldsUpdate500, CustomFieldsUpdate504, CustomFieldsUpdatePathParams, CustomFieldsUpdateRequestJson };
169
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.update").annotate(OpenApi.Summary, "Update a custom field").annotate(OpenApi.Description, "Updates an existing custom field definition and returns the updated field."))();
170
+ export { CustomFieldDefinitionId, CustomFieldList, CustomFieldsCreate201, CustomFieldsCreate400, CustomFieldsCreate401, CustomFieldsCreate403, CustomFieldsCreate409, CustomFieldsCreate422, CustomFieldsCreate500, CustomFieldsCreate504, CustomFieldsCreateEndpoint, CustomFieldsCreateRequestJson, CustomFieldsList200, CustomFieldsList400, CustomFieldsList401, CustomFieldsList403, CustomFieldsList422, CustomFieldsList500, CustomFieldsList504, CustomFieldsListEndpoint, CustomFieldsRemove200, CustomFieldsRemove400, CustomFieldsRemove401, CustomFieldsRemove403, CustomFieldsRemove404, CustomFieldsRemove422, CustomFieldsRemove500, CustomFieldsRemove504, CustomFieldsRemoveEndpoint, CustomFieldsRemovePathParams, CustomFieldsUpdate200, CustomFieldsUpdate400, CustomFieldsUpdate401, CustomFieldsUpdate403, CustomFieldsUpdate404, CustomFieldsUpdate422, CustomFieldsUpdate500, CustomFieldsUpdate504, CustomFieldsUpdateEndpoint, CustomFieldsUpdatePathParams, CustomFieldsUpdateRequestJson };
168
171
 
169
172
  //# sourceMappingURL=custom-fields.js.map