samva 0.54.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/README.md +1 -0
- package/dist/_virtual/_rolldown/runtime.js +4 -4
- package/dist/agent/index.js +1 -1
- package/dist/client/client/client.gen.js +1 -2
- package/dist/client/client/utils.gen.js +1 -1
- package/dist/client/client.gen.js +1 -1
- package/dist/client/sdk.gen.d.ts +57 -3
- package/dist/client/sdk.gen.js +184 -8
- package/dist/client/types.gen.d.ts +420 -1
- package/dist/client-attribution.js +1 -1
- package/dist/effect/agents.js +1 -1
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.js +1 -1
- package/dist/effect/approval-requests.js +1 -1
- package/dist/effect/attachments.js +1 -1
- package/dist/effect/brands.js +2 -2
- package/dist/effect/campaigns.d.ts +66 -56
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.js +6 -6
- package/dist/effect/contact-groups.js +1 -1
- package/dist/effect/contacts.js +1 -1
- package/dist/effect/conversations.js +1 -1
- package/dist/effect/custom-fields.js +1 -1
- package/dist/effect/descriptors/phone-numbers.d.ts +49 -0
- package/dist/effect/descriptors/phone-numbers.js +47 -0
- package/dist/effect/descriptors/topics.d.ts +1 -1
- package/dist/effect/descriptors/topics.js +1 -1
- package/dist/effect/email.js +1 -1
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/events.js +2 -2
- package/dist/effect/feedback.js +2 -2
- package/dist/effect/generated/accounts.d.ts +12 -1
- package/dist/effect/generated/accounts.js +2 -1
- package/dist/effect/generated/agents.js +7 -7
- package/dist/effect/generated/analytics.js +16 -16
- package/dist/effect/generated/api-keys.js +5 -5
- package/dist/effect/generated/approval-requests.js +1 -1
- package/dist/effect/generated/attachments.js +4 -4
- package/dist/effect/generated/brands.js +1 -1
- package/dist/effect/generated/campaigns.d.ts +17 -1
- package/dist/effect/generated/campaigns.js +15 -14
- package/dist/effect/generated/contact-events.js +1 -1
- package/dist/effect/generated/contact-groups.js +12 -12
- package/dist/effect/generated/contacts.js +50 -50
- package/dist/effect/generated/conversations.js +7 -7
- package/dist/effect/generated/custom-fields.js +6 -6
- package/dist/effect/generated/email.js +48 -48
- package/dist/effect/generated/events.js +5 -5
- package/dist/effect/generated/feedback.js +1 -1
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/integrations-catalog.d.ts +16 -0
- package/dist/effect/generated/integrations-catalog.js +10 -6
- package/dist/effect/generated/integrations.js +5 -5
- package/dist/effect/generated/journeys.d.ts +38 -1
- package/dist/effect/generated/journeys.js +16 -14
- package/dist/effect/generated/logs.js +2 -2
- package/dist/effect/generated/mailboxes.d.ts +41 -3
- package/dist/effect/generated/mailboxes.js +48 -50
- package/dist/effect/generated/media.js +1 -1
- package/dist/effect/generated/messages.js +5 -5
- package/dist/effect/generated/namespaces.d.ts +9 -9
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/newsletter-domains.js +1 -1
- package/dist/effect/generated/newsletter-issues.js +69 -69
- package/dist/effect/generated/newsletters.js +1 -1
- package/dist/effect/generated/operations.js +1 -1
- package/dist/effect/generated/organizations.d.ts +3 -0
- package/dist/effect/generated/organizations.js +2 -1
- package/dist/effect/generated/phone-numbers.d.ts +817 -0
- package/dist/effect/generated/phone-numbers.js +230 -0
- package/dist/effect/generated/policies.js +2 -2
- package/dist/effect/generated/scheduled-messages.js +1 -1
- package/dist/effect/generated/shared.d.ts +31 -10
- package/dist/effect/generated/shared.js +34 -13
- package/dist/effect/generated/subscriptions.js +1 -1
- package/dist/effect/generated/template-registrations.js +1 -1
- package/dist/effect/generated/template-share-links.js +9 -9
- package/dist/effect/generated/templates.js +119 -119
- package/dist/effect/generated/topic-forms.js +1 -1
- package/dist/effect/generated/topics.d.ts +10 -0
- package/dist/effect/generated/topics.js +20 -13
- package/dist/effect/generated/webhooks.js +18 -18
- package/dist/effect/generated/whats-app-flows.js +5 -5
- package/dist/effect/generated/whats-app-setup-links.js +1 -1
- package/dist/effect/generated/whats-app.d.ts +75 -0
- package/dist/effect/generated/whats-app.js +43 -18
- package/dist/effect/generated/whoami.js +1 -1
- package/dist/effect/generated-metadata.d.ts +35 -1
- package/dist/effect/generated-metadata.js +173 -146
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +6 -5
- package/dist/effect/integrations-catalog.js +1 -1
- package/dist/effect/integrations.js +1 -1
- package/dist/effect/internal/client.js +6 -6
- package/dist/effect/internal/email-sender.js +3 -3
- package/dist/effect/internal/log-events.js +2 -2
- package/dist/effect/internal/mailbox-events.js +1 -1
- package/dist/effect/internal/operation.js +2 -2
- package/dist/effect/internal/send.js +4 -4
- package/dist/effect/journeys.d.ts +10 -0
- package/dist/effect/journeys.js +1 -1
- package/dist/effect/logs.js +1 -1
- package/dist/effect/mailboxes.d.ts +191 -191
- package/dist/effect/mailboxes.js +3 -3
- package/dist/effect/media.js +2 -2
- package/dist/effect/messages.js +2 -2
- package/dist/effect/namespaces.d.ts +2 -2
- package/dist/effect/namespaces.js +1 -1
- package/dist/effect/newsletter-domains.js +1 -1
- package/dist/effect/newsletter-issues.js +1 -1
- package/dist/effect/newsletters.js +1 -1
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/phone-numbers.d.ts +22 -0
- package/dist/effect/phone-numbers.js +21 -0
- package/dist/effect/policies.js +1 -1
- package/dist/effect/retry.js +3 -3
- package/dist/effect/scheduled-messages.d.ts +350 -350
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/subscriptions.js +1 -1
- package/dist/effect/template-registrations.js +1 -1
- package/dist/effect/template-share-links.js +1 -1
- package/dist/effect/templates.js +2 -2
- package/dist/effect/topic-forms.js +1 -1
- package/dist/effect/topics.d.ts +70 -2
- package/dist/effect/topics.js +1 -1
- package/dist/effect/webhooks.js +2 -2
- package/dist/effect/whatsapp-flows.js +1 -1
- package/dist/effect/whatsapp-setup-links.js +1 -1
- package/dist/effect/whatsapp.d.ts +10 -0
- package/dist/effect/whatsapp.js +1 -1
- package/dist/effect/whoami.js +1 -1
- package/dist/index.js +2 -2
- package/dist/package.json.js +5 -0
- package/dist/promises/client.d.ts +3 -1
- package/dist/promises/client.js +7 -5
- package/dist/promises/errors.gen.d.ts +16 -2
- package/dist/promises/errors.gen.js +48 -11
- package/dist/promises/index.js +3 -3
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/request-policy.js +1 -1
- package/dist/service-map.d.ts +25 -0
- package/package.json +9 -5
- package/dist/package.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NonEmptySensitiveString, SensitiveString } from "../runtime.js";
|
|
2
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
3
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
3
|
import * as Schema from "effect/Schema";
|
|
4
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, CampaignId, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JourneyId, MalformedRequestError, MessageDeliveryId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
5
5
|
// src/effect/generated/whats-app.ts
|
|
6
6
|
const WhatsAppServiceWindowId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wasw_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
7
7
|
expected: "a string matching the RegExp ^wasw_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
@@ -34,10 +34,10 @@ const WhatsAppTemplateStatsRow = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
34
34
|
Schema.Literal("authentication")
|
|
35
35
|
]), Schema.Null]),
|
|
36
36
|
source: WhatsAppTemplateStatsSource,
|
|
37
|
-
sent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
38
|
-
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
39
|
-
read: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
40
|
-
failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
37
|
+
sent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
38
|
+
delivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
39
|
+
read: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
40
|
+
failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
41
41
|
estimatedProviderCosts: Schema.Array(MoneyAmount)
|
|
42
42
|
}).annotate({ identifier: "WhatsAppTemplateStatsRow" }))();
|
|
43
43
|
const WhatsAppTemplateStats = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Array(WhatsAppTemplateStatsRow) }).annotate({ identifier: "WhatsAppTemplateStats" }))();
|
|
@@ -59,6 +59,7 @@ const WhatsappListBusinessAccounts200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
59
59
|
organizationId: Schema.String,
|
|
60
60
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
61
61
|
phoneNumber: Schema.String,
|
|
62
|
+
phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
|
|
62
63
|
phoneNumberId: Schema.String,
|
|
63
64
|
displayName: Schema.String,
|
|
64
65
|
whatsappBusinessAccountId: Schema.String,
|
|
@@ -69,6 +70,10 @@ const WhatsappListBusinessAccounts200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
69
70
|
Schema.Literal("suspended")
|
|
70
71
|
]),
|
|
71
72
|
credentialStatus: Schema.Union([Schema.Literal("active"), Schema.Literal("reconnect_required")]),
|
|
73
|
+
sendingLock: Schema.Union([Schema.Struct({
|
|
74
|
+
lockedAt: Schema.String,
|
|
75
|
+
reason: Schema.String
|
|
76
|
+
}), Schema.Null]).annotate({ description: "The account lock reported by Meta when sending, or null. A later successful message status clears it." }),
|
|
72
77
|
tokenExpiresAt: Schema.Union([Schema.String, Schema.Null]),
|
|
73
78
|
isDefault: Schema.Boolean,
|
|
74
79
|
webhookUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -79,7 +84,7 @@ const WhatsappListBusinessAccounts200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
79
84
|
Schema.Literal("unknown")
|
|
80
85
|
]),
|
|
81
86
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
82
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
87
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
83
88
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
84
89
|
businessAppConnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
85
90
|
businessAppDisconnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -124,6 +129,7 @@ const WhatsappConnectBusinessAccount201 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
124
129
|
organizationId: Schema.String,
|
|
125
130
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
126
131
|
phoneNumber: Schema.String,
|
|
132
|
+
phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
|
|
127
133
|
phoneNumberId: Schema.String,
|
|
128
134
|
displayName: Schema.String,
|
|
129
135
|
whatsappBusinessAccountId: Schema.String,
|
|
@@ -134,6 +140,10 @@ const WhatsappConnectBusinessAccount201 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
134
140
|
Schema.Literal("suspended")
|
|
135
141
|
]),
|
|
136
142
|
credentialStatus: Schema.Union([Schema.Literal("active"), Schema.Literal("reconnect_required")]),
|
|
143
|
+
sendingLock: Schema.Union([Schema.Struct({
|
|
144
|
+
lockedAt: Schema.String,
|
|
145
|
+
reason: Schema.String
|
|
146
|
+
}), Schema.Null]).annotate({ description: "The account lock reported by Meta when sending, or null. A later successful message status clears it." }),
|
|
137
147
|
tokenExpiresAt: Schema.Union([Schema.String, Schema.Null]),
|
|
138
148
|
isDefault: Schema.Boolean,
|
|
139
149
|
webhookUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -144,7 +154,7 @@ const WhatsappConnectBusinessAccount201 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
144
154
|
Schema.Literal("unknown")
|
|
145
155
|
]),
|
|
146
156
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
147
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
157
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
148
158
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
149
159
|
businessAppConnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
150
160
|
businessAppDisconnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -186,6 +196,7 @@ const WhatsappGetBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
186
196
|
organizationId: Schema.String,
|
|
187
197
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
188
198
|
phoneNumber: Schema.String,
|
|
199
|
+
phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
|
|
189
200
|
phoneNumberId: Schema.String,
|
|
190
201
|
displayName: Schema.String,
|
|
191
202
|
whatsappBusinessAccountId: Schema.String,
|
|
@@ -196,6 +207,10 @@ const WhatsappGetBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
196
207
|
Schema.Literal("suspended")
|
|
197
208
|
]),
|
|
198
209
|
credentialStatus: Schema.Union([Schema.Literal("active"), Schema.Literal("reconnect_required")]),
|
|
210
|
+
sendingLock: Schema.Union([Schema.Struct({
|
|
211
|
+
lockedAt: Schema.String,
|
|
212
|
+
reason: Schema.String
|
|
213
|
+
}), Schema.Null]).annotate({ description: "The account lock reported by Meta when sending, or null. A later successful message status clears it." }),
|
|
199
214
|
tokenExpiresAt: Schema.Union([Schema.String, Schema.Null]),
|
|
200
215
|
isDefault: Schema.Boolean,
|
|
201
216
|
webhookUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -206,7 +221,7 @@ const WhatsappGetBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
206
221
|
Schema.Literal("unknown")
|
|
207
222
|
]),
|
|
208
223
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
209
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
224
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
210
225
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
211
226
|
businessAppConnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
212
227
|
businessAppDisconnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -258,6 +273,7 @@ const WhatsappUpdateBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
258
273
|
organizationId: Schema.String,
|
|
259
274
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
260
275
|
phoneNumber: Schema.String,
|
|
276
|
+
phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
|
|
261
277
|
phoneNumberId: Schema.String,
|
|
262
278
|
displayName: Schema.String,
|
|
263
279
|
whatsappBusinessAccountId: Schema.String,
|
|
@@ -268,6 +284,10 @@ const WhatsappUpdateBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
268
284
|
Schema.Literal("suspended")
|
|
269
285
|
]),
|
|
270
286
|
credentialStatus: Schema.Union([Schema.Literal("active"), Schema.Literal("reconnect_required")]),
|
|
287
|
+
sendingLock: Schema.Union([Schema.Struct({
|
|
288
|
+
lockedAt: Schema.String,
|
|
289
|
+
reason: Schema.String
|
|
290
|
+
}), Schema.Null]).annotate({ description: "The account lock reported by Meta when sending, or null. A later successful message status clears it." }),
|
|
271
291
|
tokenExpiresAt: Schema.Union([Schema.String, Schema.Null]),
|
|
272
292
|
isDefault: Schema.Boolean,
|
|
273
293
|
webhookUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -278,7 +298,7 @@ const WhatsappUpdateBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
278
298
|
Schema.Literal("unknown")
|
|
279
299
|
]),
|
|
280
300
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
281
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
301
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
282
302
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
283
303
|
businessAppConnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
284
304
|
businessAppDisconnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -317,6 +337,7 @@ const WhatsappSetDefaultBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struc
|
|
|
317
337
|
organizationId: Schema.String,
|
|
318
338
|
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
319
339
|
phoneNumber: Schema.String,
|
|
340
|
+
phoneNumberDisplay: Schema.String.annotate({ description: "The phone number formatted for display in international form." }),
|
|
320
341
|
phoneNumberId: Schema.String,
|
|
321
342
|
displayName: Schema.String,
|
|
322
343
|
whatsappBusinessAccountId: Schema.String,
|
|
@@ -327,6 +348,10 @@ const WhatsappSetDefaultBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struc
|
|
|
327
348
|
Schema.Literal("suspended")
|
|
328
349
|
]),
|
|
329
350
|
credentialStatus: Schema.Union([Schema.Literal("active"), Schema.Literal("reconnect_required")]),
|
|
351
|
+
sendingLock: Schema.Union([Schema.Struct({
|
|
352
|
+
lockedAt: Schema.String,
|
|
353
|
+
reason: Schema.String
|
|
354
|
+
}), Schema.Null]).annotate({ description: "The account lock reported by Meta when sending, or null. A later successful message status clears it." }),
|
|
330
355
|
tokenExpiresAt: Schema.Union([Schema.String, Schema.Null]),
|
|
331
356
|
isDefault: Schema.Boolean,
|
|
332
357
|
webhookUrl: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -337,7 +362,7 @@ const WhatsappSetDefaultBusinessAccount200 = /* @__PURE__ */ (() => Schema.Struc
|
|
|
337
362
|
Schema.Literal("unknown")
|
|
338
363
|
]),
|
|
339
364
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
340
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
365
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
341
366
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
342
367
|
businessAppConnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
343
368
|
businessAppDisconnectedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -380,7 +405,7 @@ const WhatsappSyncAccountStatus200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
380
405
|
Schema.Literal("unknown")
|
|
381
406
|
]),
|
|
382
407
|
messagingLimit: Schema.Union([Schema.String, Schema.Null]),
|
|
383
|
-
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
408
|
+
currentLimit: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
384
409
|
businessPortfolioId: Schema.Union([Schema.String, Schema.Null]),
|
|
385
410
|
verificationStatus: Schema.Union([
|
|
386
411
|
Schema.Literal("pending"),
|
|
@@ -412,9 +437,9 @@ const WhatsappGetMediaDownloadUrl500 = InternalError;
|
|
|
412
437
|
const WhatsappGetMediaDownloadUrl504 = GatewayTimeoutError;
|
|
413
438
|
const WhatsappGetServiceWindowBillingQuery = /* @__PURE__ */ (() => Schema.Struct({ serviceWindowId: WhatsAppServiceWindowId }))();
|
|
414
439
|
const WhatsappGetServiceWindowBilling200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
415
|
-
totalMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
416
|
-
totalFreeMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
417
|
-
totalPaidMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
440
|
+
totalMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
441
|
+
totalFreeMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
442
|
+
totalPaidMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
418
443
|
estimatedProviderCosts: Schema.Array(MoneyAmount)
|
|
419
444
|
}))();
|
|
420
445
|
const WhatsappGetServiceWindowBilling400 = MalformedRequestError;
|
|
@@ -447,10 +472,10 @@ const WhatsappGetStatsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
447
472
|
endDate: Schema.optionalKey(Schema.String)
|
|
448
473
|
}))();
|
|
449
474
|
const WhatsappGetStats200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
450
|
-
totalSent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
451
|
-
totalDelivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
452
|
-
totalRead: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
453
|
-
totalFailed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
475
|
+
totalSent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
476
|
+
totalDelivered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
477
|
+
totalRead: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
478
|
+
totalFailed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
454
479
|
deliveryRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
455
480
|
readRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
456
481
|
failureRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
1
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
2
|
import * as Schema from "effect/Schema";
|
|
3
|
+
import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
4
4
|
// src/effect/generated/whoami.ts
|
|
5
5
|
const WhoamiUser = /* @__PURE__ */ (() => Schema.Struct({
|
|
6
6
|
id: Schema.String,
|
|
@@ -109,6 +109,10 @@ export declare const SamvaErrorMetadata: {
|
|
|
109
109
|
readonly categories: readonly ["billing"];
|
|
110
110
|
readonly retryable: false;
|
|
111
111
|
};
|
|
112
|
+
readonly PhoneNumberProvisioningError: {
|
|
113
|
+
readonly categories: readonly [];
|
|
114
|
+
readonly retryable: false;
|
|
115
|
+
};
|
|
112
116
|
readonly RateLimitedError: {
|
|
113
117
|
readonly categories: readonly ["throttling", "transient"];
|
|
114
118
|
readonly retryable: true;
|
|
@@ -2388,6 +2392,36 @@ export declare const SamvaOperations: {
|
|
|
2388
2392
|
readonly idempotent: false;
|
|
2389
2393
|
readonly paginated: false;
|
|
2390
2394
|
};
|
|
2395
|
+
readonly phoneNumbersListPhoneNumbers: {
|
|
2396
|
+
readonly group: "Phone numbers";
|
|
2397
|
+
readonly method: "GET";
|
|
2398
|
+
readonly idempotent: false;
|
|
2399
|
+
readonly paginated: false;
|
|
2400
|
+
};
|
|
2401
|
+
readonly phoneNumbersPurchaseNumber: {
|
|
2402
|
+
readonly group: "Phone numbers";
|
|
2403
|
+
readonly method: "POST";
|
|
2404
|
+
readonly idempotent: false;
|
|
2405
|
+
readonly paginated: false;
|
|
2406
|
+
};
|
|
2407
|
+
readonly phoneNumbersGetPhoneNumber: {
|
|
2408
|
+
readonly group: "Phone numbers";
|
|
2409
|
+
readonly method: "GET";
|
|
2410
|
+
readonly idempotent: false;
|
|
2411
|
+
readonly paginated: false;
|
|
2412
|
+
};
|
|
2413
|
+
readonly phoneNumbersReleasePhoneNumber: {
|
|
2414
|
+
readonly group: "Phone numbers";
|
|
2415
|
+
readonly method: "DELETE";
|
|
2416
|
+
readonly idempotent: false;
|
|
2417
|
+
readonly paginated: false;
|
|
2418
|
+
};
|
|
2419
|
+
readonly phoneNumbersSearchAvailableNumbers: {
|
|
2420
|
+
readonly group: "Phone numbers";
|
|
2421
|
+
readonly method: "GET";
|
|
2422
|
+
readonly idempotent: false;
|
|
2423
|
+
readonly paginated: false;
|
|
2424
|
+
};
|
|
2391
2425
|
readonly policiesGetPolicy: {
|
|
2392
2426
|
readonly group: "Policies";
|
|
2393
2427
|
readonly method: "GET";
|
|
@@ -2686,7 +2720,7 @@ export declare const SamvaOperations: {
|
|
|
2686
2720
|
readonly group: "Topics";
|
|
2687
2721
|
readonly method: "GET";
|
|
2688
2722
|
readonly idempotent: false;
|
|
2689
|
-
readonly paginated:
|
|
2723
|
+
readonly paginated: true;
|
|
2690
2724
|
};
|
|
2691
2725
|
readonly topicsCreate: {
|
|
2692
2726
|
readonly group: "Topics";
|