samva 0.56.0 → 0.56.2

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 (256) hide show
  1. package/AGENTS.md +2 -2
  2. package/README.md +9 -8
  3. package/dist/agent/index.js +0 -2
  4. package/dist/agent/runtime.js +0 -2
  5. package/dist/agent/test.js +0 -2
  6. package/dist/client/client/client.gen.js +0 -2
  7. package/dist/client/client/utils.gen.js +0 -2
  8. package/dist/client/client.gen.js +0 -2
  9. package/dist/client/core/auth.gen.js +0 -2
  10. package/dist/client/core/bodySerializer.gen.js +0 -2
  11. package/dist/client/core/params.gen.js +0 -2
  12. package/dist/client/core/pathSerializer.gen.js +0 -2
  13. package/dist/client/core/serverSentEvents.gen.js +0 -2
  14. package/dist/client/core/utils.gen.js +0 -2
  15. package/dist/client/sdk.gen.js +0 -2
  16. package/dist/client-attribution.js +0 -2
  17. package/dist/effect/accounts.js +9 -12
  18. package/dist/effect/agents.js +16 -19
  19. package/dist/effect/analytics.js +9 -12
  20. package/dist/effect/api-keys.js +11 -14
  21. package/dist/effect/approval-requests.js +7 -10
  22. package/dist/effect/attachments.js +7 -10
  23. package/dist/effect/brands.js +9 -12
  24. package/dist/effect/campaigns.js +18 -21
  25. package/dist/effect/categories.js +0 -2
  26. package/dist/effect/client.js +0 -2
  27. package/dist/effect/contact-groups.js +13 -16
  28. package/dist/effect/contacts.js +29 -32
  29. package/dist/effect/conversations.js +16 -19
  30. package/dist/effect/custom-fields.js +7 -10
  31. package/dist/effect/descriptors/accounts.d.ts +50 -52
  32. package/dist/effect/descriptors/accounts.js +50 -54
  33. package/dist/effect/descriptors/agents.d.ts +113 -115
  34. package/dist/effect/descriptors/agents.js +120 -124
  35. package/dist/effect/descriptors/analytics.d.ts +47 -49
  36. package/dist/effect/descriptors/analytics.js +42 -46
  37. package/dist/effect/descriptors/api-keys.d.ts +69 -71
  38. package/dist/effect/descriptors/api-keys.js +73 -77
  39. package/dist/effect/descriptors/approval-requests.d.ts +34 -36
  40. package/dist/effect/descriptors/approval-requests.js +36 -40
  41. package/dist/effect/descriptors/attachments.d.ts +34 -36
  42. package/dist/effect/descriptors/attachments.js +36 -40
  43. package/dist/effect/descriptors/brands.d.ts +51 -53
  44. package/dist/effect/descriptors/brands.js +53 -57
  45. package/dist/effect/descriptors/campaigns.d.ts +130 -132
  46. package/dist/effect/descriptors/campaigns.js +137 -141
  47. package/dist/effect/descriptors/contact-groups.d.ts +86 -88
  48. package/dist/effect/descriptors/contact-groups.js +90 -94
  49. package/dist/effect/descriptors/contacts.d.ts +242 -244
  50. package/dist/effect/descriptors/contacts.js +227 -231
  51. package/dist/effect/descriptors/conversations.d.ts +114 -116
  52. package/dist/effect/descriptors/conversations.js +123 -127
  53. package/dist/effect/descriptors/custom-fields.d.ts +33 -35
  54. package/dist/effect/descriptors/custom-fields.js +33 -37
  55. package/dist/effect/descriptors/email.d.ts +623 -625
  56. package/dist/effect/descriptors/email.js +562 -580
  57. package/dist/effect/descriptors/events.d.ts +15 -17
  58. package/dist/effect/descriptors/events.js +14 -18
  59. package/dist/effect/descriptors/feedback.d.ts +7 -9
  60. package/dist/effect/descriptors/feedback.js +3 -5
  61. package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
  62. package/dist/effect/descriptors/integrations-catalog.js +142 -146
  63. package/dist/effect/descriptors/integrations.d.ts +60 -62
  64. package/dist/effect/descriptors/integrations.js +63 -67
  65. package/dist/effect/descriptors/journeys.d.ts +123 -125
  66. package/dist/effect/descriptors/journeys.js +133 -137
  67. package/dist/effect/descriptors/logs.d.ts +16 -18
  68. package/dist/effect/descriptors/logs.js +16 -20
  69. package/dist/effect/descriptors/mailboxes.d.ts +780 -782
  70. package/dist/effect/descriptors/mailboxes.js +795 -799
  71. package/dist/effect/descriptors/media.d.ts +43 -45
  72. package/dist/effect/descriptors/media.js +46 -50
  73. package/dist/effect/descriptors/messages.d.ts +86 -88
  74. package/dist/effect/descriptors/messages.js +83 -94
  75. package/dist/effect/descriptors/namespaces.d.ts +96 -98
  76. package/dist/effect/descriptors/namespaces.js +107 -111
  77. package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
  78. package/dist/effect/descriptors/newsletter-domains.js +39 -43
  79. package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
  80. package/dist/effect/descriptors/newsletter-issues.js +109 -113
  81. package/dist/effect/descriptors/newsletters.d.ts +43 -45
  82. package/dist/effect/descriptors/newsletters.js +46 -50
  83. package/dist/effect/descriptors/operations.d.ts +25 -27
  84. package/dist/effect/descriptors/operations.js +26 -30
  85. package/dist/effect/descriptors/organizations.d.ts +96 -98
  86. package/dist/effect/descriptors/organizations.js +86 -90
  87. package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
  88. package/dist/effect/descriptors/phone-numbers.js +40 -44
  89. package/dist/effect/descriptors/policies.d.ts +26 -28
  90. package/dist/effect/descriptors/policies.js +29 -33
  91. package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
  92. package/dist/effect/descriptors/scheduled-messages.js +43 -47
  93. package/dist/effect/descriptors/subscriptions.d.ts +7 -9
  94. package/dist/effect/descriptors/subscriptions.js +3 -5
  95. package/dist/effect/descriptors/template-registrations.d.ts +26 -28
  96. package/dist/effect/descriptors/template-registrations.js +29 -33
  97. package/dist/effect/descriptors/template-share-links.d.ts +44 -46
  98. package/dist/effect/descriptors/template-share-links.js +49 -53
  99. package/dist/effect/descriptors/templates.d.ts +361 -363
  100. package/dist/effect/descriptors/templates.js +348 -352
  101. package/dist/effect/descriptors/topic-forms.d.ts +44 -46
  102. package/dist/effect/descriptors/topic-forms.js +49 -53
  103. package/dist/effect/descriptors/topics.d.ts +77 -79
  104. package/dist/effect/descriptors/topics.js +80 -84
  105. package/dist/effect/descriptors/webhooks.d.ts +96 -98
  106. package/dist/effect/descriptors/webhooks.js +103 -107
  107. package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
  108. package/dist/effect/descriptors/whats-app-flows.js +90 -94
  109. package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
  110. package/dist/effect/descriptors/whats-app-setup-links.js +33 -37
  111. package/dist/effect/descriptors/whats-app.d.ts +110 -112
  112. package/dist/effect/descriptors/whats-app.js +111 -115
  113. package/dist/effect/descriptors/whoami.d.ts +7 -9
  114. package/dist/effect/descriptors/whoami.js +3 -5
  115. package/dist/effect/email.js +66 -69
  116. package/dist/effect/events.js +5 -8
  117. package/dist/effect/feedback.js +4 -6
  118. package/dist/effect/generated/accounts.d.ts +144 -142
  119. package/dist/effect/generated/accounts.js +14 -11
  120. package/dist/effect/generated/agents.d.ts +1502 -1493
  121. package/dist/effect/generated/agents.js +28 -18
  122. package/dist/effect/generated/analytics.d.ts +55 -53
  123. package/dist/effect/generated/analytics.js +14 -11
  124. package/dist/effect/generated/api-keys.d.ts +216 -212
  125. package/dist/effect/generated/api-keys.js +18 -13
  126. package/dist/effect/generated/approval-requests.d.ts +60 -60
  127. package/dist/effect/generated/approval-requests.js +10 -9
  128. package/dist/effect/generated/attachments.d.ts +32 -32
  129. package/dist/effect/generated/attachments.js +10 -9
  130. package/dist/effect/generated/brands.d.ts +179 -177
  131. package/dist/effect/generated/brands.js +14 -11
  132. package/dist/effect/generated/campaigns.d.ts +1083 -1072
  133. package/dist/effect/generated/campaigns.js +32 -20
  134. package/dist/effect/generated/contact-events.d.ts +3 -6
  135. package/dist/effect/generated/contact-events.js +4 -6
  136. package/dist/effect/generated/contact-groups.d.ts +186 -180
  137. package/dist/effect/generated/contact-groups.js +22 -15
  138. package/dist/effect/generated/contacts.d.ts +1565 -1545
  139. package/dist/effect/generated/contacts.js +50 -29
  140. package/dist/effect/generated/conversations.d.ts +340 -331
  141. package/dist/effect/generated/conversations.js +28 -18
  142. package/dist/effect/generated/custom-fields.d.ts +63 -63
  143. package/dist/effect/generated/custom-fields.js +10 -9
  144. package/dist/effect/generated/email.d.ts +2731 -2671
  145. package/dist/effect/generated/email.js +130 -69
  146. package/dist/effect/generated/events.d.ts +160 -162
  147. package/dist/effect/generated/events.js +6 -7
  148. package/dist/effect/generated/feedback.d.ts +3 -6
  149. package/dist/effect/generated/feedback.js +4 -6
  150. package/dist/effect/generated/index.d.ts +174 -45
  151. package/dist/effect/generated/integrations-catalog.d.ts +459 -446
  152. package/dist/effect/generated/integrations-catalog.js +36 -22
  153. package/dist/effect/generated/integrations.d.ts +155 -152
  154. package/dist/effect/generated/integrations.js +16 -12
  155. package/dist/effect/generated/journeys.d.ts +864 -854
  156. package/dist/effect/generated/journeys.js +30 -19
  157. package/dist/effect/generated/logs.d.ts +147 -149
  158. package/dist/effect/generated/logs.js +6 -7
  159. package/dist/effect/generated/mailboxes.d.ts +7271 -7196
  160. package/dist/effect/generated/mailboxes.js +160 -84
  161. package/dist/effect/generated/media.d.ts +77 -76
  162. package/dist/effect/generated/media.js +12 -10
  163. package/dist/effect/generated/messages.d.ts +1092 -1086
  164. package/dist/effect/generated/messages.js +22 -15
  165. package/dist/effect/generated/namespaces.d.ts +184 -177
  166. package/dist/effect/generated/namespaces.js +24 -16
  167. package/dist/effect/generated/newsletter-domains.d.ts +57 -57
  168. package/dist/effect/generated/newsletter-domains.js +10 -9
  169. package/dist/effect/generated/newsletter-issues.d.ts +225 -218
  170. package/dist/effect/generated/newsletter-issues.js +24 -16
  171. package/dist/effect/generated/newsletters.d.ts +46 -45
  172. package/dist/effect/generated/newsletters.js +12 -10
  173. package/dist/effect/generated/operations.d.ts +79 -80
  174. package/dist/effect/generated/operations.js +8 -8
  175. package/dist/effect/generated/organizations.d.ts +438 -430
  176. package/dist/effect/generated/organizations.js +26 -17
  177. package/dist/effect/generated/phone-numbers.d.ts +87 -86
  178. package/dist/effect/generated/phone-numbers.js +12 -10
  179. package/dist/effect/generated/policies.d.ts +64 -65
  180. package/dist/effect/generated/policies.js +8 -8
  181. package/dist/effect/generated/scheduled-messages.d.ts +66 -65
  182. package/dist/effect/generated/scheduled-messages.js +12 -10
  183. package/dist/effect/generated/shared.d.ts +33 -33
  184. package/dist/effect/generated/shared.js +61 -63
  185. package/dist/effect/generated/subscriptions.d.ts +3 -6
  186. package/dist/effect/generated/subscriptions.js +4 -6
  187. package/dist/effect/generated/template-registrations.d.ts +135 -136
  188. package/dist/effect/generated/template-registrations.js +8 -8
  189. package/dist/effect/generated/template-share-links.d.ts +25 -24
  190. package/dist/effect/generated/template-share-links.js +12 -10
  191. package/dist/effect/generated/templates.d.ts +2678 -2645
  192. package/dist/effect/generated/templates.js +76 -42
  193. package/dist/effect/generated/topic-forms.d.ts +47 -46
  194. package/dist/effect/generated/topic-forms.js +12 -10
  195. package/dist/effect/generated/topics.d.ts +204 -199
  196. package/dist/effect/generated/topics.js +20 -14
  197. package/dist/effect/generated/webhooks.d.ts +268 -261
  198. package/dist/effect/generated/webhooks.js +24 -16
  199. package/dist/effect/generated/whats-app-flows.d.ts +250 -244
  200. package/dist/effect/generated/whats-app-flows.js +22 -15
  201. package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
  202. package/dist/effect/generated/whats-app-setup-links.js +10 -9
  203. package/dist/effect/generated/whats-app.d.ts +439 -430
  204. package/dist/effect/generated/whats-app.js +28 -18
  205. package/dist/effect/generated/whoami.d.ts +3 -6
  206. package/dist/effect/generated/whoami.js +4 -6
  207. package/dist/effect/generated-metadata.js +0 -2
  208. package/dist/effect/integrations-catalog.js +20 -23
  209. package/dist/effect/integrations.js +10 -13
  210. package/dist/effect/internal/client.d.ts +2 -1
  211. package/dist/effect/internal/client.js +3 -5
  212. package/dist/effect/internal/email-sender.js +5 -6
  213. package/dist/effect/internal/log-events.js +0 -2
  214. package/dist/effect/internal/mailbox-events.js +0 -2
  215. package/dist/effect/internal/operation.d.ts +11 -7
  216. package/dist/effect/internal/operation.js +17 -14
  217. package/dist/effect/internal/send.js +11 -10
  218. package/dist/effect/internal/timeout.js +0 -2
  219. package/dist/effect/journeys.js +17 -20
  220. package/dist/effect/logs.js +5 -8
  221. package/dist/effect/mailboxes.js +82 -85
  222. package/dist/effect/media.js +8 -11
  223. package/dist/effect/messages.js +12 -15
  224. package/dist/effect/namespaces.js +14 -17
  225. package/dist/effect/newsletter-domains.js +7 -10
  226. package/dist/effect/newsletter-issues.js +14 -17
  227. package/dist/effect/newsletters.js +8 -11
  228. package/dist/effect/operations.js +6 -9
  229. package/dist/effect/organizations.js +15 -18
  230. package/dist/effect/pagination.js +0 -2
  231. package/dist/effect/phone-numbers.js +8 -11
  232. package/dist/effect/policies.js +6 -9
  233. package/dist/effect/retry.js +0 -2
  234. package/dist/effect/runtime.js +3 -5
  235. package/dist/effect/scheduled-messages.js +8 -11
  236. package/dist/effect/subscriptions.js +4 -6
  237. package/dist/effect/template-registrations.js +6 -9
  238. package/dist/effect/template-share-links.js +8 -11
  239. package/dist/effect/templates.js +40 -43
  240. package/dist/effect/topic-forms.js +8 -11
  241. package/dist/effect/topics.js +12 -15
  242. package/dist/effect/webhooks.js +14 -17
  243. package/dist/effect/whatsapp-flows.js +13 -16
  244. package/dist/effect/whatsapp-setup-links.js +7 -10
  245. package/dist/effect/whatsapp.js +16 -19
  246. package/dist/effect/whoami.js +4 -6
  247. package/dist/inline-attachments.js +0 -2
  248. package/dist/mailbox-events.js +0 -2
  249. package/dist/normalize.js +0 -2
  250. package/dist/package.json.js +1 -3
  251. package/dist/promises/client.js +0 -2
  252. package/dist/promises/errors.gen.js +0 -2
  253. package/dist/promises/request.js +0 -2
  254. package/dist/request-id.js +0 -2
  255. package/dist/request-policy.js +0 -2
  256. 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,5 @@ 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 };
544
-
545
- //# sourceMappingURL=conversations.js.map
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 };
@@ -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,5 @@ 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 };
168
-
169
- //# sourceMappingURL=custom-fields.js.map
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 };