samva 0.55.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 (235) hide show
  1. package/AGENTS.md +2 -2
  2. package/README.md +9 -8
  3. package/dist/client/sdk.gen.d.ts +13 -4
  4. package/dist/client/sdk.gen.js +32 -1
  5. package/dist/client/types.gen.d.ts +66 -6
  6. package/dist/effect/accounts.js +9 -10
  7. package/dist/effect/agents.js +16 -17
  8. package/dist/effect/analytics.js +9 -10
  9. package/dist/effect/api-keys.js +11 -12
  10. package/dist/effect/approval-requests.js +7 -8
  11. package/dist/effect/attachments.js +7 -8
  12. package/dist/effect/brands.js +9 -10
  13. package/dist/effect/campaigns.js +18 -19
  14. package/dist/effect/contact-groups.js +13 -14
  15. package/dist/effect/contacts.js +29 -30
  16. package/dist/effect/conversations.js +16 -17
  17. package/dist/effect/custom-fields.js +7 -8
  18. package/dist/effect/descriptors/accounts.d.ts +50 -52
  19. package/dist/effect/descriptors/accounts.js +50 -52
  20. package/dist/effect/descriptors/agents.d.ts +113 -115
  21. package/dist/effect/descriptors/agents.js +120 -122
  22. package/dist/effect/descriptors/analytics.d.ts +47 -49
  23. package/dist/effect/descriptors/analytics.js +42 -44
  24. package/dist/effect/descriptors/api-keys.d.ts +69 -71
  25. package/dist/effect/descriptors/api-keys.js +73 -75
  26. package/dist/effect/descriptors/approval-requests.d.ts +34 -36
  27. package/dist/effect/descriptors/approval-requests.js +36 -38
  28. package/dist/effect/descriptors/attachments.d.ts +34 -36
  29. package/dist/effect/descriptors/attachments.js +36 -38
  30. package/dist/effect/descriptors/brands.d.ts +51 -53
  31. package/dist/effect/descriptors/brands.js +53 -55
  32. package/dist/effect/descriptors/campaigns.d.ts +130 -132
  33. package/dist/effect/descriptors/campaigns.js +137 -139
  34. package/dist/effect/descriptors/contact-groups.d.ts +86 -88
  35. package/dist/effect/descriptors/contact-groups.js +90 -92
  36. package/dist/effect/descriptors/contacts.d.ts +242 -244
  37. package/dist/effect/descriptors/contacts.js +227 -229
  38. package/dist/effect/descriptors/conversations.d.ts +114 -116
  39. package/dist/effect/descriptors/conversations.js +123 -125
  40. package/dist/effect/descriptors/custom-fields.d.ts +33 -35
  41. package/dist/effect/descriptors/custom-fields.js +33 -35
  42. package/dist/effect/descriptors/email.d.ts +623 -625
  43. package/dist/effect/descriptors/email.js +562 -578
  44. package/dist/effect/descriptors/events.d.ts +15 -17
  45. package/dist/effect/descriptors/events.js +14 -16
  46. package/dist/effect/descriptors/feedback.d.ts +7 -9
  47. package/dist/effect/descriptors/feedback.js +3 -3
  48. package/dist/effect/descriptors/integrations-catalog.d.ts +159 -161
  49. package/dist/effect/descriptors/integrations-catalog.js +142 -144
  50. package/dist/effect/descriptors/integrations.d.ts +60 -62
  51. package/dist/effect/descriptors/integrations.js +63 -65
  52. package/dist/effect/descriptors/journeys.d.ts +123 -125
  53. package/dist/effect/descriptors/journeys.js +133 -135
  54. package/dist/effect/descriptors/logs.d.ts +16 -18
  55. package/dist/effect/descriptors/logs.js +16 -18
  56. package/dist/effect/descriptors/mailboxes.d.ts +780 -782
  57. package/dist/effect/descriptors/mailboxes.js +795 -797
  58. package/dist/effect/descriptors/media.d.ts +43 -45
  59. package/dist/effect/descriptors/media.js +46 -48
  60. package/dist/effect/descriptors/messages.d.ts +86 -88
  61. package/dist/effect/descriptors/messages.js +83 -92
  62. package/dist/effect/descriptors/namespaces.d.ts +96 -98
  63. package/dist/effect/descriptors/namespaces.js +107 -109
  64. package/dist/effect/descriptors/newsletter-domains.d.ts +35 -37
  65. package/dist/effect/descriptors/newsletter-domains.js +39 -41
  66. package/dist/effect/descriptors/newsletter-issues.d.ts +98 -100
  67. package/dist/effect/descriptors/newsletter-issues.js +109 -111
  68. package/dist/effect/descriptors/newsletters.d.ts +43 -45
  69. package/dist/effect/descriptors/newsletters.js +46 -48
  70. package/dist/effect/descriptors/operations.d.ts +25 -27
  71. package/dist/effect/descriptors/operations.js +26 -28
  72. package/dist/effect/descriptors/organizations.d.ts +96 -98
  73. package/dist/effect/descriptors/organizations.js +86 -88
  74. package/dist/effect/descriptors/phone-numbers.d.ts +41 -43
  75. package/dist/effect/descriptors/phone-numbers.js +40 -42
  76. package/dist/effect/descriptors/policies.d.ts +26 -28
  77. package/dist/effect/descriptors/policies.js +29 -31
  78. package/dist/effect/descriptors/scheduled-messages.d.ts +42 -44
  79. package/dist/effect/descriptors/scheduled-messages.js +43 -45
  80. package/dist/effect/descriptors/subscriptions.d.ts +7 -9
  81. package/dist/effect/descriptors/subscriptions.js +3 -3
  82. package/dist/effect/descriptors/template-registrations.d.ts +26 -28
  83. package/dist/effect/descriptors/template-registrations.js +29 -31
  84. package/dist/effect/descriptors/template-share-links.d.ts +44 -46
  85. package/dist/effect/descriptors/template-share-links.js +49 -51
  86. package/dist/effect/descriptors/templates.d.ts +361 -363
  87. package/dist/effect/descriptors/templates.js +348 -350
  88. package/dist/effect/descriptors/topic-forms.d.ts +44 -46
  89. package/dist/effect/descriptors/topic-forms.js +49 -51
  90. package/dist/effect/descriptors/topics.d.ts +77 -79
  91. package/dist/effect/descriptors/topics.js +80 -82
  92. package/dist/effect/descriptors/webhooks.d.ts +96 -98
  93. package/dist/effect/descriptors/webhooks.js +103 -105
  94. package/dist/effect/descriptors/whats-app-flows.d.ts +86 -88
  95. package/dist/effect/descriptors/whats-app-flows.js +90 -92
  96. package/dist/effect/descriptors/whats-app-setup-links.d.ts +33 -35
  97. package/dist/effect/descriptors/whats-app-setup-links.js +33 -35
  98. package/dist/effect/descriptors/whats-app.d.ts +111 -103
  99. package/dist/effect/descriptors/whats-app.js +111 -103
  100. package/dist/effect/descriptors/whoami.d.ts +7 -9
  101. package/dist/effect/descriptors/whoami.js +3 -3
  102. package/dist/effect/email.js +66 -67
  103. package/dist/effect/events.js +5 -6
  104. package/dist/effect/feedback.js +4 -4
  105. package/dist/effect/generated/accounts.d.ts +144 -142
  106. package/dist/effect/generated/accounts.js +14 -9
  107. package/dist/effect/generated/agents.d.ts +1502 -1493
  108. package/dist/effect/generated/agents.js +28 -16
  109. package/dist/effect/generated/analytics.d.ts +55 -53
  110. package/dist/effect/generated/analytics.js +14 -9
  111. package/dist/effect/generated/api-keys.d.ts +216 -212
  112. package/dist/effect/generated/api-keys.js +18 -11
  113. package/dist/effect/generated/approval-requests.d.ts +60 -60
  114. package/dist/effect/generated/approval-requests.js +10 -7
  115. package/dist/effect/generated/attachments.d.ts +32 -32
  116. package/dist/effect/generated/attachments.js +10 -7
  117. package/dist/effect/generated/brands.d.ts +179 -177
  118. package/dist/effect/generated/brands.js +14 -9
  119. package/dist/effect/generated/campaigns.d.ts +1083 -1072
  120. package/dist/effect/generated/campaigns.js +32 -18
  121. package/dist/effect/generated/contact-events.d.ts +3 -6
  122. package/dist/effect/generated/contact-events.js +4 -4
  123. package/dist/effect/generated/contact-groups.d.ts +186 -180
  124. package/dist/effect/generated/contact-groups.js +22 -13
  125. package/dist/effect/generated/contacts.d.ts +1565 -1545
  126. package/dist/effect/generated/contacts.js +50 -27
  127. package/dist/effect/generated/conversations.d.ts +340 -331
  128. package/dist/effect/generated/conversations.js +28 -16
  129. package/dist/effect/generated/custom-fields.d.ts +63 -63
  130. package/dist/effect/generated/custom-fields.js +10 -7
  131. package/dist/effect/generated/email.d.ts +2731 -2671
  132. package/dist/effect/generated/email.js +130 -67
  133. package/dist/effect/generated/events.d.ts +160 -162
  134. package/dist/effect/generated/events.js +6 -5
  135. package/dist/effect/generated/feedback.d.ts +3 -6
  136. package/dist/effect/generated/feedback.js +4 -4
  137. package/dist/effect/generated/index.d.ts +174 -45
  138. package/dist/effect/generated/integrations-catalog.d.ts +459 -446
  139. package/dist/effect/generated/integrations-catalog.js +36 -20
  140. package/dist/effect/generated/integrations.d.ts +155 -152
  141. package/dist/effect/generated/integrations.js +16 -10
  142. package/dist/effect/generated/journeys.d.ts +864 -854
  143. package/dist/effect/generated/journeys.js +30 -17
  144. package/dist/effect/generated/logs.d.ts +147 -149
  145. package/dist/effect/generated/logs.js +6 -5
  146. package/dist/effect/generated/mailboxes.d.ts +7271 -7196
  147. package/dist/effect/generated/mailboxes.js +160 -82
  148. package/dist/effect/generated/media.d.ts +77 -76
  149. package/dist/effect/generated/media.js +12 -8
  150. package/dist/effect/generated/messages.d.ts +1092 -1086
  151. package/dist/effect/generated/messages.js +22 -13
  152. package/dist/effect/generated/namespaces.d.ts +184 -177
  153. package/dist/effect/generated/namespaces.js +24 -14
  154. package/dist/effect/generated/newsletter-domains.d.ts +57 -57
  155. package/dist/effect/generated/newsletter-domains.js +10 -7
  156. package/dist/effect/generated/newsletter-issues.d.ts +225 -218
  157. package/dist/effect/generated/newsletter-issues.js +24 -14
  158. package/dist/effect/generated/newsletters.d.ts +46 -45
  159. package/dist/effect/generated/newsletters.js +12 -8
  160. package/dist/effect/generated/operations.d.ts +79 -80
  161. package/dist/effect/generated/operations.js +8 -6
  162. package/dist/effect/generated/organizations.d.ts +438 -430
  163. package/dist/effect/generated/organizations.js +26 -15
  164. package/dist/effect/generated/phone-numbers.d.ts +87 -86
  165. package/dist/effect/generated/phone-numbers.js +12 -8
  166. package/dist/effect/generated/policies.d.ts +64 -65
  167. package/dist/effect/generated/policies.js +8 -6
  168. package/dist/effect/generated/scheduled-messages.d.ts +66 -65
  169. package/dist/effect/generated/scheduled-messages.js +12 -8
  170. package/dist/effect/generated/shared.d.ts +37 -37
  171. package/dist/effect/generated/shared.js +63 -61
  172. package/dist/effect/generated/subscriptions.d.ts +3 -6
  173. package/dist/effect/generated/subscriptions.js +4 -4
  174. package/dist/effect/generated/template-registrations.d.ts +142 -134
  175. package/dist/effect/generated/template-registrations.js +9 -6
  176. package/dist/effect/generated/template-share-links.d.ts +25 -24
  177. package/dist/effect/generated/template-share-links.js +12 -8
  178. package/dist/effect/generated/templates.d.ts +2678 -2645
  179. package/dist/effect/generated/templates.js +76 -40
  180. package/dist/effect/generated/topic-forms.d.ts +47 -46
  181. package/dist/effect/generated/topic-forms.js +12 -8
  182. package/dist/effect/generated/topics.d.ts +204 -199
  183. package/dist/effect/generated/topics.js +20 -12
  184. package/dist/effect/generated/webhooks.d.ts +284 -277
  185. package/dist/effect/generated/webhooks.js +28 -14
  186. package/dist/effect/generated/whats-app-flows.d.ts +250 -244
  187. package/dist/effect/generated/whats-app-flows.js +22 -13
  188. package/dist/effect/generated/whats-app-setup-links.d.ts +107 -107
  189. package/dist/effect/generated/whats-app-setup-links.js +10 -7
  190. package/dist/effect/generated/whats-app.d.ts +482 -298
  191. package/dist/effect/generated/whats-app.js +58 -16
  192. package/dist/effect/generated/whoami.d.ts +3 -6
  193. package/dist/effect/generated/whoami.js +4 -4
  194. package/dist/effect/generated-metadata.d.ts +6 -0
  195. package/dist/effect/generated-metadata.js +1 -0
  196. package/dist/effect/integrations-catalog.js +20 -21
  197. package/dist/effect/integrations.js +10 -11
  198. package/dist/effect/internal/client.d.ts +2 -1
  199. package/dist/effect/internal/client.js +3 -3
  200. package/dist/effect/internal/email-sender.js +5 -4
  201. package/dist/effect/internal/operation.d.ts +11 -7
  202. package/dist/effect/internal/operation.js +17 -12
  203. package/dist/effect/internal/send.js +11 -8
  204. package/dist/effect/journeys.js +17 -18
  205. package/dist/effect/logs.js +5 -6
  206. package/dist/effect/mailboxes.js +82 -83
  207. package/dist/effect/media.js +8 -9
  208. package/dist/effect/messages.js +12 -13
  209. package/dist/effect/namespaces.js +14 -15
  210. package/dist/effect/newsletter-domains.js +7 -8
  211. package/dist/effect/newsletter-issues.js +14 -15
  212. package/dist/effect/newsletters.js +8 -9
  213. package/dist/effect/operations.js +6 -7
  214. package/dist/effect/organizations.js +15 -16
  215. package/dist/effect/phone-numbers.js +8 -9
  216. package/dist/effect/policies.js +6 -7
  217. package/dist/effect/runtime.js +3 -3
  218. package/dist/effect/scheduled-messages.js +8 -9
  219. package/dist/effect/subscriptions.js +4 -4
  220. package/dist/effect/template-registrations.js +6 -7
  221. package/dist/effect/template-share-links.js +8 -9
  222. package/dist/effect/templates.js +40 -41
  223. package/dist/effect/topic-forms.js +8 -9
  224. package/dist/effect/topics.js +12 -13
  225. package/dist/effect/webhooks.d.ts +4 -4
  226. package/dist/effect/webhooks.js +14 -15
  227. package/dist/effect/whatsapp-flows.js +13 -14
  228. package/dist/effect/whatsapp-setup-links.js +7 -8
  229. package/dist/effect/whatsapp.d.ts +6 -0
  230. package/dist/effect/whatsapp.js +18 -17
  231. package/dist/effect/whoami.js +4 -4
  232. package/dist/package.json.js +1 -1
  233. package/dist/promises/types.gen.d.ts +1 -1
  234. package/dist/service-map.d.ts +5 -0
  235. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
1
+ import { HttpApiEndpoint } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
3
  import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
4
4
  export type WhatsAppRegistrationTarget = {
@@ -42,6 +42,7 @@ export type TemplateRegistration = {
42
42
  readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
43
43
  readonly providerTemplateId: string | null;
44
44
  readonly reason: string | null;
45
+ readonly targetReleasedAt?: string;
45
46
  readonly submittedAt: string | null;
46
47
  readonly statusChangedAt: string;
47
48
  readonly createdAt: string;
@@ -68,6 +69,7 @@ export declare const TemplateRegistration: Schema.Struct<{
68
69
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
69
70
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
70
71
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
72
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
71
73
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
72
74
  readonly statusChangedAt: Schema.String;
73
75
  readonly createdAt: Schema.String;
@@ -98,6 +100,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
98
100
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
99
101
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
100
102
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
103
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
101
104
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
102
105
  readonly statusChangedAt: Schema.String;
103
106
  readonly createdAt: Schema.String;
@@ -133,6 +136,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
133
136
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
134
137
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
135
138
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
139
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
136
140
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
137
141
  readonly statusChangedAt: Schema.String;
138
142
  readonly createdAt: Schema.String;
@@ -196,6 +200,7 @@ export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
196
200
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
197
201
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
198
202
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
203
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
199
204
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
200
205
  readonly statusChangedAt: Schema.String;
201
206
  readonly createdAt: Schema.String;
@@ -251,6 +256,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
251
256
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
252
257
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
253
258
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
259
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
254
260
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
255
261
  readonly statusChangedAt: Schema.String;
256
262
  readonly createdAt: Schema.String;
@@ -270,34 +276,36 @@ export type TemplateRegistrationsGet500 = InternalError;
270
276
  export declare const TemplateRegistrationsGet500: typeof InternalError;
271
277
  export type TemplateRegistrationsGet504 = GatewayTimeoutError;
272
278
  export declare const TemplateRegistrationsGet504: typeof GatewayTimeoutError;
273
- declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Template registrations", HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsGet", "GET", "/v1/templates/:id/registrations/:registrationId", Schema.toCodecStringTree<Schema.Struct<{
279
+ export declare const TemplateRegistrationsListEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsList", "GET", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
274
280
  readonly id: Schema.brand<Schema.String, "TemplateId">;
275
- readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
276
281
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
277
- readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
278
- readonly templateId: Schema.brand<Schema.String, "TemplateId">;
279
- readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
280
- readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
281
- readonly target: Schema.Union<readonly [Schema.Struct<{
282
- readonly provider: Schema.Literal<"whatsapp">;
283
- readonly wabaId: Schema.String;
284
- }>, Schema.Struct<{
285
- readonly provider: Schema.Literal<"dlt">;
286
- readonly entityId: Schema.String;
287
- readonly headerId: Schema.String;
288
- }>]>;
289
- readonly name: Schema.String;
290
- readonly language: Schema.String;
291
- readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
292
- readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
293
- readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
294
- readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
295
- readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
296
- readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
297
- readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
298
- readonly statusChangedAt: Schema.String;
299
- readonly createdAt: Schema.String;
300
- readonly updatedAt: Schema.String;
282
+ readonly data: Schema.$Array<Schema.Struct<{
283
+ readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
284
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
285
+ readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
286
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
287
+ readonly target: Schema.Union<readonly [Schema.Struct<{
288
+ readonly provider: Schema.Literal<"whatsapp">;
289
+ readonly wabaId: Schema.String;
290
+ }>, Schema.Struct<{
291
+ readonly provider: Schema.Literal<"dlt">;
292
+ readonly entityId: Schema.String;
293
+ readonly headerId: Schema.String;
294
+ }>]>;
295
+ readonly name: Schema.String;
296
+ readonly language: Schema.String;
297
+ readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
298
+ readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
299
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
300
+ readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
301
+ readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
302
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
303
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
304
+ readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
305
+ readonly statusChangedAt: Schema.String;
306
+ readonly createdAt: Schema.String;
307
+ readonly updatedAt: Schema.String;
308
+ }>>;
301
309
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
302
310
  readonly _tag: "ForbiddenError";
303
311
  readonly message: string;
@@ -398,36 +406,65 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
398
406
  readonly _tag: Schema.tag<"ValidationError">;
399
407
  readonly message: Schema.String;
400
408
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
401
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsList", "GET", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
409
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
410
+ export declare const TemplateRegistrationsSubmitEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsSubmit", "POST", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
402
411
  readonly id: Schema.brand<Schema.String, "TemplateId">;
403
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
404
- readonly data: Schema.$Array<Schema.Struct<{
405
- readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
406
- readonly templateId: Schema.brand<Schema.String, "TemplateId">;
412
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
413
+ readonly provider: Schema.Literal<"whatsapp">;
414
+ readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
415
+ readonly approval: Schema.optionalKey<Schema.Struct<{
407
416
  readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
408
- readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
409
- readonly target: Schema.Union<readonly [Schema.Struct<{
410
- readonly provider: Schema.Literal<"whatsapp">;
411
- readonly wabaId: Schema.String;
412
- }>, Schema.Struct<{
413
- readonly provider: Schema.Literal<"dlt">;
414
- readonly entityId: Schema.String;
415
- readonly headerId: Schema.String;
416
- }>]>;
417
- readonly name: Schema.String;
418
- readonly language: Schema.String;
419
- readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
420
- readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
421
- readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
422
- readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
423
- readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
424
- readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
425
- readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
426
- readonly statusChangedAt: Schema.String;
427
- readonly createdAt: Schema.String;
428
- readonly updatedAt: Schema.String;
417
+ readonly businessAccountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
418
+ readonly expectedWabaId: Schema.String;
419
+ readonly expectedWorkspaceRevision: Schema.String;
429
420
  }>>;
430
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
421
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
422
+ readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
423
+ readonly templateId: Schema.brand<Schema.String, "TemplateId">;
424
+ readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
425
+ readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
426
+ readonly target: Schema.Union<readonly [Schema.Struct<{
427
+ readonly provider: Schema.Literal<"whatsapp">;
428
+ readonly wabaId: Schema.String;
429
+ }>, Schema.Struct<{
430
+ readonly provider: Schema.Literal<"dlt">;
431
+ readonly entityId: Schema.String;
432
+ readonly headerId: Schema.String;
433
+ }>]>;
434
+ readonly name: Schema.String;
435
+ readonly language: Schema.String;
436
+ readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
437
+ readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
438
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
439
+ readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
440
+ readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
441
+ readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
442
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
443
+ readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
444
+ readonly statusChangedAt: Schema.String;
445
+ readonly createdAt: Schema.String;
446
+ readonly updatedAt: Schema.String;
447
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
448
+ readonly _tag: "ConflictError";
449
+ readonly message: string;
450
+ readonly resource: string;
451
+ readonly id?: string | null;
452
+ }, readonly [Schema.Struct<{
453
+ readonly _tag: Schema.tag<"ConflictError">;
454
+ readonly message: Schema.String;
455
+ readonly resource: Schema.String;
456
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
457
+ }>], {
458
+ readonly _tag: "ConflictError";
459
+ readonly message: string;
460
+ readonly resource: string;
461
+ readonly id?: string | null;
462
+ }>, Schema.Struct<{
463
+ readonly _tag: Schema.tag<"ConflictError">;
464
+ readonly message: Schema.String;
465
+ readonly resource: Schema.String;
466
+ readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
467
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
431
468
  readonly _tag: "ForbiddenError";
432
469
  readonly message: string;
433
470
  }, readonly [Schema.Struct<{
@@ -495,6 +532,22 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
495
532
  readonly resource: Schema.String;
496
533
  readonly id: Schema.String;
497
534
  readonly message: Schema.String;
535
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
536
+ readonly _tag: "ServiceUnavailableError";
537
+ readonly message: string;
538
+ readonly retryAfterSeconds: number;
539
+ }, readonly [Schema.Struct<{
540
+ readonly _tag: Schema.tag<"ServiceUnavailableError">;
541
+ readonly message: Schema.String;
542
+ readonly retryAfterSeconds: Schema.Finite;
543
+ }>], {
544
+ readonly _tag: "ServiceUnavailableError";
545
+ readonly message: string;
546
+ readonly retryAfterSeconds: number;
547
+ }>, Schema.Struct<{
548
+ readonly _tag: Schema.tag<"ServiceUnavailableError">;
549
+ readonly message: Schema.String;
550
+ readonly retryAfterSeconds: Schema.Finite;
498
551
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
499
552
  readonly _tag: "UnauthorizedError";
500
553
  readonly message: string;
@@ -527,18 +580,39 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
527
580
  readonly _tag: Schema.tag<"ValidationError">;
528
581
  readonly message: Schema.String;
529
582
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
530
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsSubmit", "POST", "/v1/templates/:id/registrations", Schema.toCodecStringTree<Schema.Struct<{
583
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<WhatsAppChannelError, {
584
+ readonly _tag: "WhatsAppChannelError";
585
+ readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
586
+ readonly message: string;
587
+ readonly provider: string;
588
+ readonly providerCode?: string | null;
589
+ readonly statusCode?: number | null;
590
+ }, readonly [Schema.Struct<{
591
+ readonly _tag: Schema.tag<"WhatsAppChannelError">;
592
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
593
+ readonly message: Schema.String;
594
+ readonly provider: Schema.String;
595
+ readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
596
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
597
+ }>], {
598
+ readonly _tag: "WhatsAppChannelError";
599
+ readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
600
+ readonly message: string;
601
+ readonly provider: string;
602
+ readonly providerCode?: string | null;
603
+ readonly statusCode?: number | null;
604
+ }>, Schema.Struct<{
605
+ readonly _tag: Schema.tag<"WhatsAppChannelError">;
606
+ readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
607
+ readonly message: Schema.String;
608
+ readonly provider: Schema.String;
609
+ readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
610
+ readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
611
+ }>, never, never>>, ApiKeySecurityMiddleware, never>;
612
+ export declare const TemplateRegistrationsGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateRegistrationsGet", "GET", "/v1/templates/:id/registrations/:registrationId", Schema.toCodecStringTree<Schema.Struct<{
531
613
  readonly id: Schema.brand<Schema.String, "TemplateId">;
532
- }>>, never, Schema.toCodecJson<Schema.Struct<{
533
- readonly provider: Schema.Literal<"whatsapp">;
534
- readonly businessAccountId: Schema.optionalKey<Schema.brand<Schema.String, "WhatsAppBusinessAccountId">>;
535
- readonly approval: Schema.optionalKey<Schema.Struct<{
536
- readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
537
- readonly businessAccountId: Schema.brand<Schema.String, "WhatsAppBusinessAccountId">;
538
- readonly expectedWabaId: Schema.String;
539
- readonly expectedWorkspaceRevision: Schema.String;
540
- }>>;
541
- }>>, never, Schema.toCodecJson<Schema.Struct<{
614
+ readonly registrationId: Schema.brand<Schema.String, "TemplateRegistrationId">;
615
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
542
616
  readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
543
617
  readonly templateId: Schema.brand<Schema.String, "TemplateId">;
544
618
  readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
@@ -559,31 +633,12 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
559
633
  readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
560
634
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
561
635
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
636
+ readonly targetReleasedAt: Schema.optionalKey<Schema.String>;
562
637
  readonly submittedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
563
638
  readonly statusChangedAt: Schema.String;
564
639
  readonly createdAt: Schema.String;
565
640
  readonly updatedAt: Schema.String;
566
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
567
- readonly _tag: "ConflictError";
568
- readonly message: string;
569
- readonly resource: string;
570
- readonly id?: string | null;
571
- }, readonly [Schema.Struct<{
572
- readonly _tag: Schema.tag<"ConflictError">;
573
- readonly message: Schema.String;
574
- readonly resource: Schema.String;
575
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
576
- }>], {
577
- readonly _tag: "ConflictError";
578
- readonly message: string;
579
- readonly resource: string;
580
- readonly id?: string | null;
581
- }>, Schema.Struct<{
582
- readonly _tag: Schema.tag<"ConflictError">;
583
- readonly message: Schema.String;
584
- readonly resource: Schema.String;
585
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
586
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
641
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
587
642
  readonly _tag: "ForbiddenError";
588
643
  readonly message: string;
589
644
  }, readonly [Schema.Struct<{
@@ -651,22 +706,6 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
651
706
  readonly resource: Schema.String;
652
707
  readonly id: Schema.String;
653
708
  readonly message: Schema.String;
654
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
655
- readonly _tag: "ServiceUnavailableError";
656
- readonly message: string;
657
- readonly retryAfterSeconds: number;
658
- }, readonly [Schema.Struct<{
659
- readonly _tag: Schema.tag<"ServiceUnavailableError">;
660
- readonly message: Schema.String;
661
- readonly retryAfterSeconds: Schema.Finite;
662
- }>], {
663
- readonly _tag: "ServiceUnavailableError";
664
- readonly message: string;
665
- readonly retryAfterSeconds: number;
666
- }>, Schema.Struct<{
667
- readonly _tag: Schema.tag<"ServiceUnavailableError">;
668
- readonly message: Schema.String;
669
- readonly retryAfterSeconds: Schema.Finite;
670
709
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
671
710
  readonly _tag: "UnauthorizedError";
672
711
  readonly message: string;
@@ -699,35 +738,4 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
699
738
  readonly _tag: Schema.tag<"ValidationError">;
700
739
  readonly message: Schema.String;
701
740
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
702
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<WhatsAppChannelError, {
703
- readonly _tag: "WhatsAppChannelError";
704
- readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
705
- readonly message: string;
706
- readonly provider: string;
707
- readonly providerCode?: string | null;
708
- readonly statusCode?: number | null;
709
- }, readonly [Schema.Struct<{
710
- readonly _tag: Schema.tag<"WhatsAppChannelError">;
711
- readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
712
- readonly message: Schema.String;
713
- readonly provider: Schema.String;
714
- readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
715
- readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
716
- }>], {
717
- readonly _tag: "WhatsAppChannelError";
718
- readonly reason: "auth" | "rate_limited" | "rejected" | "transport" | "unsupported";
719
- readonly message: string;
720
- readonly provider: string;
721
- readonly providerCode?: string | null;
722
- readonly statusCode?: number | null;
723
- }>, Schema.Struct<{
724
- readonly _tag: Schema.tag<"WhatsAppChannelError">;
725
- readonly reason: Schema.Union<readonly [Schema.Literal<"transport">, Schema.Literal<"rejected">, Schema.Literal<"rate_limited">, Schema.Literal<"auth">, Schema.Literal<"unsupported">]>;
726
- readonly message: Schema.String;
727
- readonly provider: Schema.String;
728
- readonly providerCode: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
729
- readonly statusCode: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
730
- }>, never, never>>, ApiKeySecurityMiddleware, never>, false>;
731
- export declare class TemplateRegistrationsGroup extends TemplateRegistrationsGroup_base {
732
- }
733
- export {};
741
+ }>, 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, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
4
4
  // src/effect/generated/template-registrations.ts
@@ -49,6 +49,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
49
49
  ]), Schema.Null]),
50
50
  providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
51
51
  reason: Schema.Union([Schema.String, Schema.Null]),
52
+ targetReleasedAt: Schema.optionalKey(Schema.String),
52
53
  submittedAt: Schema.Union([Schema.String, Schema.Null]),
53
54
  statusChangedAt: Schema.String,
54
55
  createdAt: Schema.String,
@@ -96,7 +97,7 @@ const TemplateRegistrationsGet404 = ResourceNotFoundError;
96
97
  const TemplateRegistrationsGet422 = ValidationError;
97
98
  const TemplateRegistrationsGet500 = InternalError;
98
99
  const TemplateRegistrationsGet504 = GatewayTimeoutError;
99
- var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template registrations").add(HttpApiEndpoint.get("templateRegistrationsList", "/v1/templates/:id/registrations", {
100
+ const TemplateRegistrationsListEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsList", "/v1/templates/:id/registrations", {
100
101
  params: TemplateRegistrationsListPathParams,
101
102
  success: TemplateRegistrationsList200,
102
103
  error: [
@@ -108,7 +109,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
108
109
  TemplateRegistrationsList500,
109
110
  TemplateRegistrationsList504.pipe(HttpApiSchema.status(504))
110
111
  ]
111
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted."), HttpApiEndpoint.post("templateRegistrationsSubmit", "/v1/templates/:id/registrations", {
112
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.list").annotate(OpenApi.Summary, "List a template's registrations").annotate(OpenApi.Description, "Returns every provider registration of the template, newest first, with its review status and the publication it last submitted."))();
113
+ const TemplateRegistrationsSubmitEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.post("templateRegistrationsSubmit", "/v1/templates/:id/registrations", {
112
114
  params: TemplateRegistrationsSubmitPathParams,
113
115
  payload: TemplateRegistrationsSubmitRequestJson,
114
116
  success: TemplateRegistrationsSubmit201.pipe(HttpApiSchema.status(201)),
@@ -124,7 +126,8 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
124
126
  TemplateRegistrationsSubmit503.pipe(HttpApiSchema.status(503)),
125
127
  TemplateRegistrationsSubmit504.pipe(HttpApiSchema.status(504))
126
128
  ]
127
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A first submission creates the provider template. A later one resubmits through the same registration."), HttpApiEndpoint.get("templateRegistrationsGet", "/v1/templates/:id/registrations/:registrationId", {
129
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.submit").annotate(OpenApi.Summary, "Submit a template registration").annotate(OpenApi.Description, "Submits the template's current publication for review on a WhatsApp business account. Pass approval to bind a reviewed submission to the exact publication, workspace revision, connected number and Meta business account. A changed selection returns a conflict. An immediate submission uses the named or default number. A submission updates the existing provider template while it exists. When Meta confirms a deletion, you can submit the same handle again once Meta frees its name."))();
130
+ const TemplateRegistrationsGetEndpoint = /* @__PURE__ */ (() => HttpApiEndpoint.get("templateRegistrationsGet", "/v1/templates/:id/registrations/:registrationId", {
128
131
  params: TemplateRegistrationsGetPathParams,
129
132
  success: TemplateRegistrationsGet200,
130
133
  error: [
@@ -136,7 +139,7 @@ var TemplateRegistrationsGroup = class extends HttpApiGroup.make("Template regis
136
139
  TemplateRegistrationsGet500,
137
140
  TemplateRegistrationsGet504.pipe(HttpApiSchema.status(504))
138
141
  ]
139
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it.")).annotate(OpenApi.Description, "Provider review of template content: submission, status, and category.") {};
140
- export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetPathParams, TemplateRegistrationsGroup, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit503, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
142
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "templateRegistrations.get").annotate(OpenApi.Summary, "Get a template registration").annotate(OpenApi.Description, "Returns one registration: its status, the category the provider assigned, and why the provider rejected, paused, or disabled it."))();
143
+ export { DltRegistrationTarget, TemplateRegistration, TemplateRegistrationList, TemplateRegistrationTarget, TemplateRegistrationsGet200, TemplateRegistrationsGet400, TemplateRegistrationsGet401, TemplateRegistrationsGet403, TemplateRegistrationsGet404, TemplateRegistrationsGet422, TemplateRegistrationsGet500, TemplateRegistrationsGet504, TemplateRegistrationsGetEndpoint, TemplateRegistrationsGetPathParams, TemplateRegistrationsList200, TemplateRegistrationsList400, TemplateRegistrationsList401, TemplateRegistrationsList403, TemplateRegistrationsList404, TemplateRegistrationsList422, TemplateRegistrationsList500, TemplateRegistrationsList504, TemplateRegistrationsListEndpoint, TemplateRegistrationsListPathParams, TemplateRegistrationsSubmit201, TemplateRegistrationsSubmit400, TemplateRegistrationsSubmit401, TemplateRegistrationsSubmit403, TemplateRegistrationsSubmit404, TemplateRegistrationsSubmit409, TemplateRegistrationsSubmit422, TemplateRegistrationsSubmit500, TemplateRegistrationsSubmit502, TemplateRegistrationsSubmit503, TemplateRegistrationsSubmit504, TemplateRegistrationsSubmitEndpoint, TemplateRegistrationsSubmitPathParams, TemplateRegistrationsSubmitRequestJson, WhatsAppRegistrationTarget };
141
144
 
142
145
  //# sourceMappingURL=template-registrations.js.map
@@ -1,4 +1,4 @@
1
- import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
1
+ import { HttpApiEndpoint } from "effect/http-api";
2
2
  import * as Schema from "effect/Schema";
3
3
  import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, SlugTaken, TemplateProjectId, TemplateSourceError, UnauthorizedError, ValidationError } from "./shared.js";
4
4
  export type TemplateShareLinksGetPathParams = {
@@ -203,18 +203,16 @@ export type TemplateShareLinksUpdate503 = ServiceUnavailableError;
203
203
  export declare const TemplateShareLinksUpdate503: typeof ServiceUnavailableError;
204
204
  export type TemplateShareLinksUpdate504 = GatewayTimeoutError;
205
205
  export declare const TemplateShareLinksUpdate504: typeof GatewayTimeoutError;
206
- declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template share links", HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksCreate", "POST", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
206
+ export declare const TemplateShareLinksGetEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksGet", "GET", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
207
207
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
208
- }>>, never, Schema.toCodecJson<Schema.Struct<{
209
- readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
210
- }>>, never, Schema.toCodecJson<Schema.Struct<{
208
+ }>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
211
209
  readonly slug: Schema.String;
212
210
  readonly url: Schema.String;
213
211
  readonly canonicalPath: Schema.String;
214
212
  readonly views: Schema.Finite;
215
213
  readonly opens: Schema.Finite;
216
214
  readonly updatedAt: Schema.String;
217
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
215
+ }>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
218
216
  readonly _tag: "ForbiddenError";
219
217
  readonly message: string;
220
218
  }, readonly [Schema.Struct<{
@@ -310,10 +308,18 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
310
308
  }>, Schema.Struct<{
311
309
  readonly _tag: Schema.tag<"UnauthorizedError">;
312
310
  readonly message: Schema.String;
313
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksDelete", "DELETE", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
311
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
312
+ export declare const TemplateShareLinksCreateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksCreate", "POST", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
314
313
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
315
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
316
- readonly deleted: Schema.Boolean;
314
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
315
+ readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
316
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
317
+ readonly slug: Schema.String;
318
+ readonly url: Schema.String;
319
+ readonly canonicalPath: Schema.String;
320
+ readonly views: Schema.Finite;
321
+ readonly opens: Schema.Finite;
322
+ readonly updatedAt: Schema.String;
317
323
  }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
318
324
  readonly _tag: "ForbiddenError";
319
325
  readonly message: string;
@@ -410,16 +416,12 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
410
416
  }>, Schema.Struct<{
411
417
  readonly _tag: Schema.tag<"UnauthorizedError">;
412
418
  readonly message: Schema.String;
413
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksGet", "GET", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
419
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
420
+ export declare const TemplateShareLinksDeleteEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksDelete", "DELETE", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
414
421
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
415
- }>>, never, never, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
416
- readonly slug: Schema.String;
417
- readonly url: Schema.String;
418
- readonly canonicalPath: Schema.String;
419
- readonly views: Schema.Finite;
420
- readonly opens: Schema.Finite;
421
- readonly updatedAt: Schema.String;
422
- }>, Schema.Null]>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
422
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
423
+ readonly deleted: Schema.Boolean;
424
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof TemplateSourceError]> | Schema.Union<readonly [typeof ConflictError, typeof SlugTaken]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
423
425
  readonly _tag: "ForbiddenError";
424
426
  readonly message: string;
425
427
  }, readonly [Schema.Struct<{
@@ -515,7 +517,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
515
517
  }>, Schema.Struct<{
516
518
  readonly _tag: Schema.tag<"UnauthorizedError">;
517
519
  readonly message: Schema.String;
518
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksRename", "PATCH", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
520
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
521
+ export declare const TemplateShareLinksRenameEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksRename", "PATCH", "/v1/template-projects/:projectId/share-link", Schema.toCodecStringTree<Schema.Struct<{
519
522
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
520
523
  }>>, never, Schema.toCodecJson<Schema.Struct<{
521
524
  readonly slug: Schema.String;
@@ -622,7 +625,8 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
622
625
  }>, Schema.Struct<{
623
626
  readonly _tag: Schema.tag<"UnauthorizedError">;
624
627
  readonly message: Schema.String;
625
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksUpdate", "POST", "/v1/template-projects/:projectId/share-link/update", Schema.toCodecStringTree<Schema.Struct<{
628
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;
629
+ export declare const TemplateShareLinksUpdateEndpoint: HttpApiEndpoint.HttpApiEndpoint<"templateShareLinksUpdate", "POST", "/v1/template-projects/:projectId/share-link/update", Schema.toCodecStringTree<Schema.Struct<{
626
630
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
627
631
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
628
632
  readonly slug: Schema.String;
@@ -727,7 +731,4 @@ declare const TemplateShareLinksGroup_base: HttpApiGroup.HttpApiGroup<"Template
727
731
  }>, Schema.Struct<{
728
732
  readonly _tag: Schema.tag<"UnauthorizedError">;
729
733
  readonly message: Schema.String;
730
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
731
- export declare class TemplateShareLinksGroup extends TemplateShareLinksGroup_base {
732
- }
733
- export {};
734
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>;