@samva/webhooks 0.51.0 → 0.53.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/dist/effect.js +2 -2
- package/dist/{json-schemas.gen-CE5C7st9.js → json-schemas.gen-Du5pts9S.js} +22 -2
- package/dist/promise.js +2 -2
- package/dist/{protocol-COaro8fP.js → protocol-Q3-Vd3-K.js} +386 -384
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +12 -0
- package/dist/schemas.gen.js +9 -1
- package/dist/types.gen.d.ts +10 -0
- package/package.json +1 -1
package/dist/effect.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-
|
|
2
|
-
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-
|
|
1
|
+
import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-Q3-Vd3-K.js";
|
|
2
|
+
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-Du5pts9S.js";
|
|
3
3
|
import { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema } from "./schemas.gen.js";
|
|
4
4
|
import { Clock, Effect } from "effect";
|
|
5
5
|
// src/effect.ts
|
|
@@ -579,9 +579,14 @@ const WebhookEventJsonSchemas = {
|
|
|
579
579
|
required: ["campaignId", "runId"],
|
|
580
580
|
additionalProperties: true
|
|
581
581
|
}, { type: "null" }] },
|
|
582
|
+
replyToMetadata: { type: "object" },
|
|
582
583
|
whatsapp: { anyOf: [{
|
|
583
584
|
type: "object",
|
|
584
585
|
properties: {
|
|
586
|
+
appHandlesFlowSubmission: {
|
|
587
|
+
type: "boolean",
|
|
588
|
+
enum: [true]
|
|
589
|
+
},
|
|
585
590
|
text: { anyOf: [{ type: "string" }, { type: "null" }] },
|
|
586
591
|
template: { anyOf: [{
|
|
587
592
|
type: "object",
|
|
@@ -675,7 +680,10 @@ const WebhookEventJsonSchemas = {
|
|
|
675
680
|
coupon_code: { anyOf: [{ type: "string" }, { type: "null" }] },
|
|
676
681
|
action: { anyOf: [{
|
|
677
682
|
type: "object",
|
|
678
|
-
properties: {
|
|
683
|
+
properties: {
|
|
684
|
+
flow_token: { type: "string" },
|
|
685
|
+
flow_action_data: { type: "object" }
|
|
686
|
+
},
|
|
679
687
|
required: ["flow_token"],
|
|
680
688
|
additionalProperties: true
|
|
681
689
|
}, { type: "null" }] }
|
|
@@ -1354,6 +1362,10 @@ const WebhookEventJsonSchemas = {
|
|
|
1354
1362
|
type: "object",
|
|
1355
1363
|
properties: {
|
|
1356
1364
|
flowToken: { anyOf: [{ type: "string" }, { type: "null" }] },
|
|
1365
|
+
submissionHandler: {
|
|
1366
|
+
type: "string",
|
|
1367
|
+
enum: ["app"]
|
|
1368
|
+
},
|
|
1357
1369
|
response: { type: "object" },
|
|
1358
1370
|
body: { type: "string" }
|
|
1359
1371
|
},
|
|
@@ -3246,6 +3258,10 @@ const WebhookEventJsonSchemas = {
|
|
|
3246
3258
|
message: {
|
|
3247
3259
|
type: "object",
|
|
3248
3260
|
properties: {
|
|
3261
|
+
flowSubmissionHandledBy: {
|
|
3262
|
+
type: "string",
|
|
3263
|
+
enum: ["app"]
|
|
3264
|
+
},
|
|
3249
3265
|
id: {
|
|
3250
3266
|
type: "string",
|
|
3251
3267
|
pattern: "^msg_[0-9a-hjkmnp-tv-z]{16,24}$"
|
|
@@ -3444,6 +3460,10 @@ const WebhookEventJsonSchemas = {
|
|
|
3444
3460
|
message: {
|
|
3445
3461
|
type: "object",
|
|
3446
3462
|
properties: {
|
|
3463
|
+
flowSubmissionHandledBy: {
|
|
3464
|
+
type: "string",
|
|
3465
|
+
enum: ["app"]
|
|
3466
|
+
},
|
|
3447
3467
|
id: {
|
|
3448
3468
|
type: "string",
|
|
3449
3469
|
pattern: "^msg_[0-9a-hjkmnp-tv-z]{16,24}$"
|
|
@@ -4612,4 +4632,4 @@ const WebhookEventJsonSchemas = {
|
|
|
4612
4632
|
};
|
|
4613
4633
|
export { WebhookEventJsonSchemas as t };
|
|
4614
4634
|
|
|
4615
|
-
//# sourceMappingURL=json-schemas.gen-
|
|
4635
|
+
//# sourceMappingURL=json-schemas.gen-Du5pts9S.js.map
|
package/dist/promise.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, o as readWebhookHeaders, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-
|
|
2
|
-
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-
|
|
1
|
+
import { a as generateWebhookSecret, c as verifyWebhookAt, d as MalformedWebhookPayloadError, f as WebhookCryptoError, g as isKnownEvent, h as WebhookVerificationError, i as WEBHOOK_TIMESTAMP_HEADER, l as InvalidWebhookHeadersError, m as WebhookTimestampError, n as WEBHOOK_ID_HEADER, o as readWebhookHeaders, p as WebhookSignatureError, r as WEBHOOK_SIGNATURE_HEADER, s as signWebhook, t as DEFAULT_TOLERANCE_SECONDS, u as InvalidWebhookSecretError } from "./protocol-Q3-Vd3-K.js";
|
|
2
|
+
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-Du5pts9S.js";
|
|
3
3
|
// src/promise.ts
|
|
4
4
|
/**
|
|
5
5
|
* Verifies a Samva webhook delivery from its body and header values, then returns its ID and
|