@samva/webhooks 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/dist/effect.js +3 -3
- package/dist/{json-schemas.gen-Ck8UIxoX.js → json-schemas.gen-t9dUV5my.js} +23 -23
- package/dist/promise.js +2 -2
- package/dist/{protocol-DwRceAlj.js → protocol-CwGXBskp.js} +4 -4
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.js +13 -13
- package/package.json +3 -3
package/dist/effect.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-DwRceAlj.js";
|
|
2
|
-
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-Ck8UIxoX.js";
|
|
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
1
|
import { Clock, Effect } from "effect";
|
|
2
|
+
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-CwGXBskp.js";
|
|
3
|
+
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-t9dUV5my.js";
|
|
4
|
+
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";
|
|
5
5
|
// src/effect.ts
|
|
6
6
|
/**
|
|
7
7
|
* Fails with the verification errors `verifyWebhookAt` rejects with. Any other rejection, such as
|
|
@@ -2795,28 +2795,28 @@ const WebhookEventJsonSchemas = {
|
|
|
2795
2795
|
observed: { type: "boolean" },
|
|
2796
2796
|
total: {
|
|
2797
2797
|
type: "integer",
|
|
2798
|
-
minimum: -
|
|
2799
|
-
maximum:
|
|
2798
|
+
minimum: -0x1fffffffffffff,
|
|
2799
|
+
maximum: 0x1fffffffffffff
|
|
2800
2800
|
},
|
|
2801
2801
|
satisfied: {
|
|
2802
2802
|
type: "integer",
|
|
2803
|
-
minimum: -
|
|
2804
|
-
maximum:
|
|
2803
|
+
minimum: -0x1fffffffffffff,
|
|
2804
|
+
maximum: 0x1fffffffffffff
|
|
2805
2805
|
},
|
|
2806
2806
|
missing: {
|
|
2807
2807
|
type: "integer",
|
|
2808
|
-
minimum: -
|
|
2809
|
-
maximum:
|
|
2808
|
+
minimum: -0x1fffffffffffff,
|
|
2809
|
+
maximum: 0x1fffffffffffff
|
|
2810
2810
|
},
|
|
2811
2811
|
mismatch: {
|
|
2812
2812
|
type: "integer",
|
|
2813
|
-
minimum: -
|
|
2814
|
-
maximum:
|
|
2813
|
+
minimum: -0x1fffffffffffff,
|
|
2814
|
+
maximum: 0x1fffffffffffff
|
|
2815
2815
|
},
|
|
2816
2816
|
unknown: {
|
|
2817
2817
|
type: "integer",
|
|
2818
|
-
minimum: -
|
|
2819
|
-
maximum:
|
|
2818
|
+
minimum: -0x1fffffffffffff,
|
|
2819
|
+
maximum: 0x1fffffffffffff
|
|
2820
2820
|
}
|
|
2821
2821
|
},
|
|
2822
2822
|
required: [
|
|
@@ -3250,8 +3250,8 @@ const WebhookEventJsonSchemas = {
|
|
|
3250
3250
|
},
|
|
3251
3251
|
versionNumber: {
|
|
3252
3252
|
type: "integer",
|
|
3253
|
-
minimum: -
|
|
3254
|
-
maximum:
|
|
3253
|
+
minimum: -0x1fffffffffffff,
|
|
3254
|
+
maximum: 0x1fffffffffffff
|
|
3255
3255
|
},
|
|
3256
3256
|
wabaId: { type: "string" },
|
|
3257
3257
|
providerFlowId: { anyOf: [{ type: "string" }, { type: "null" }] },
|
|
@@ -3276,13 +3276,13 @@ const WebhookEventJsonSchemas = {
|
|
|
3276
3276
|
path: { type: "string" },
|
|
3277
3277
|
line: {
|
|
3278
3278
|
type: "integer",
|
|
3279
|
-
minimum: -
|
|
3280
|
-
maximum:
|
|
3279
|
+
minimum: -0x1fffffffffffff,
|
|
3280
|
+
maximum: 0x1fffffffffffff
|
|
3281
3281
|
},
|
|
3282
3282
|
column: {
|
|
3283
3283
|
type: "integer",
|
|
3284
|
-
minimum: -
|
|
3285
|
-
maximum:
|
|
3284
|
+
minimum: -0x1fffffffffffff,
|
|
3285
|
+
maximum: 0x1fffffffffffff
|
|
3286
3286
|
}
|
|
3287
3287
|
},
|
|
3288
3288
|
required: ["error", "message"],
|
|
@@ -3811,7 +3811,7 @@ const WebhookEventJsonSchemas = {
|
|
|
3811
3811
|
},
|
|
3812
3812
|
reviewRound: {
|
|
3813
3813
|
type: "integer",
|
|
3814
|
-
maximum:
|
|
3814
|
+
maximum: 0x1fffffffffffff,
|
|
3815
3815
|
exclusiveMinimum: 0
|
|
3816
3816
|
},
|
|
3817
3817
|
state: {
|
|
@@ -3828,7 +3828,7 @@ const WebhookEventJsonSchemas = {
|
|
|
3828
3828
|
},
|
|
3829
3829
|
reviewRound: {
|
|
3830
3830
|
type: "integer",
|
|
3831
|
-
maximum:
|
|
3831
|
+
maximum: 0x1fffffffffffff,
|
|
3832
3832
|
exclusiveMinimum: 0
|
|
3833
3833
|
},
|
|
3834
3834
|
requirement: {
|
|
@@ -3912,7 +3912,7 @@ const WebhookEventJsonSchemas = {
|
|
|
3912
3912
|
index: {
|
|
3913
3913
|
type: "integer",
|
|
3914
3914
|
minimum: 0,
|
|
3915
|
-
maximum:
|
|
3915
|
+
maximum: 0x1fffffffffffff
|
|
3916
3916
|
}
|
|
3917
3917
|
},
|
|
3918
3918
|
required: ["scope", "index"],
|
|
@@ -4148,7 +4148,7 @@ const WebhookEventJsonSchemas = {
|
|
|
4148
4148
|
},
|
|
4149
4149
|
reviewRound: {
|
|
4150
4150
|
type: "integer",
|
|
4151
|
-
maximum:
|
|
4151
|
+
maximum: 0x1fffffffffffff,
|
|
4152
4152
|
exclusiveMinimum: 0
|
|
4153
4153
|
},
|
|
4154
4154
|
threadId: { anyOf: [{
|
|
@@ -4779,8 +4779,8 @@ const WebhookEventJsonSchemas = {
|
|
|
4779
4779
|
},
|
|
4780
4780
|
journeyVersion: {
|
|
4781
4781
|
type: "integer",
|
|
4782
|
-
minimum: -
|
|
4783
|
-
maximum:
|
|
4782
|
+
minimum: -0x1fffffffffffff,
|
|
4783
|
+
maximum: 0x1fffffffffffff
|
|
4784
4784
|
},
|
|
4785
4785
|
runId: {
|
|
4786
4786
|
type: "string",
|
|
@@ -4828,4 +4828,4 @@ const WebhookEventJsonSchemas = {
|
|
|
4828
4828
|
};
|
|
4829
4829
|
export { WebhookEventJsonSchemas as t };
|
|
4830
4830
|
|
|
4831
|
-
//# sourceMappingURL=json-schemas.gen-
|
|
4831
|
+
//# sourceMappingURL=json-schemas.gen-t9dUV5my.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-CwGXBskp.js";
|
|
2
|
+
import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-t9dUV5my.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
|
|
@@ -210,7 +210,7 @@ const validate1303 = (value) => isObject(value) && isObject(value) && Object.has
|
|
|
210
210
|
const validate1304 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
211
211
|
const validate1307 = (value) => typeof value === "string" && (value === "dns-setup" || value === "provisioning" || value === "verifying" || value === "ready" || value === "degraded" || value === "failed");
|
|
212
212
|
const validate1309 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "observed") && Object.hasOwn(value, "total") && Object.hasOwn(value, "satisfied") && Object.hasOwn(value, "missing") && Object.hasOwn(value, "mismatch") && Object.hasOwn(value, "unknown") && (!Object.hasOwn(value, "observed") || validate37(value["observed"])) && (!Object.hasOwn(value, "total") || validate1311(value["total"])) && (!Object.hasOwn(value, "satisfied") || validate1311(value["satisfied"])) && (!Object.hasOwn(value, "missing") || validate1311(value["missing"])) && (!Object.hasOwn(value, "mismatch") || validate1311(value["mismatch"])) && (!Object.hasOwn(value, "unknown") || validate1311(value["unknown"]));
|
|
213
|
-
const validate1311 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= -
|
|
213
|
+
const validate1311 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= -0x1fffffffffffff && typeof value === "number" && value <= 0x1fffffffffffff;
|
|
214
214
|
const validate1316 = (value) => validate1317(value) || validate6(value);
|
|
215
215
|
const validate1317 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "identity") && (!Object.hasOwn(value, "identity") || validate1318(value["identity"])) && (!Object.hasOwn(value, "dkim") || validate1319(value["dkim"])) && (!Object.hasOwn(value, "mailFrom") || validate1319(value["mailFrom"]));
|
|
216
216
|
const validate1318 = (value) => typeof value === "string" && (value === "pending" || value === "verified" || value === "failed" || value === "unknown");
|
|
@@ -293,7 +293,7 @@ const validate1596 = (value) => typeof value === "string" && value === "mailbox.
|
|
|
293
293
|
const validate1598 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "mailboxId") && Object.hasOwn(value, "namespaceId") && Object.hasOwn(value, "action") && Object.hasOwn(value, "draft") && (!Object.hasOwn(value, "mailboxId") || validate5(value["mailboxId"])) && (!Object.hasOwn(value, "namespaceId") || validate1371(value["namespaceId"])) && (!Object.hasOwn(value, "action") || validate1603(value["action"])) && (!Object.hasOwn(value, "draft") || validate1673(value["draft"])) && (!Object.hasOwn(value, "tool") || validate1683(value["tool"]));
|
|
294
294
|
const validate1603 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "type") && Object.hasOwn(value, "reviewRound") && Object.hasOwn(value, "decision") && Object.hasOwn(value, "threadId") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "proposedBy") && Object.hasOwn(value, "createdAt") && (!Object.hasOwn(value, "id") || validate1550(value["id"])) && (!Object.hasOwn(value, "type") || validate1605(value["type"])) && (!Object.hasOwn(value, "reviewRound") || validate1606(value["reviewRound"])) && (!Object.hasOwn(value, "state") || validate1607(value["state"])) && (!Object.hasOwn(value, "decision") || validate1608(value["decision"])) && (!Object.hasOwn(value, "threadId") || validate1659(value["threadId"])) && (!Object.hasOwn(value, "reason") || validate8(value["reason"])) && (!Object.hasOwn(value, "proposedBy") || validate1553(value["proposedBy"])) && (!Object.hasOwn(value, "createdAt") || validate2(value["createdAt"]));
|
|
295
295
|
const validate1605 = (value) => typeof value === "string" && (value === "sendMessage" || value === "reply" || value === "updateDraft" || value === "createNote" || value === "assignThread" || value === "changeThreadState" || value === "call" || value === "extensionRequest" || value === "toolCall" || value === "handoff");
|
|
296
|
-
const validate1606 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value <=
|
|
296
|
+
const validate1606 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value <= 0x1fffffffffffff && typeof value === "number" && value > 0;
|
|
297
297
|
const validate1607 = (value) => typeof value === "string" && value === "approvalRequired";
|
|
298
298
|
const validate1608 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "id") && Object.hasOwn(value, "reviewRound") && Object.hasOwn(value, "requirement") && Object.hasOwn(value, "decider") && Object.hasOwn(value, "outcome") && Object.hasOwn(value, "reason") && Object.hasOwn(value, "scopes") && (!Object.hasOwn(value, "id") || validate1609(value["id"])) && (!Object.hasOwn(value, "reviewRound") || validate1606(value["reviewRound"])) && (!Object.hasOwn(value, "requirement") || validate1611(value["requirement"])) && (!Object.hasOwn(value, "decider") || validate1612(value["decider"])) && (!Object.hasOwn(value, "outcome") || validate1613(value["outcome"])) && (!Object.hasOwn(value, "reason") || validate1614(value["reason"])) && (!Object.hasOwn(value, "scopes") || validate1615(value["scopes"])) && (!Object.hasOwn(value, "rule") || validate1619(value["rule"])) && (!Object.hasOwn(value, "guard") || validate1626(value["guard"])) && (!Object.hasOwn(value, "guardReason") || validate1626(value["guardReason"])) && (!Object.hasOwn(value, "resolution") || validate1632(value["resolution"]));
|
|
299
299
|
const validate1609 = (value) => typeof value === "string" && typeof value === "string" && (/* @__PURE__ */ new RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).test(value);
|
|
@@ -306,7 +306,7 @@ const validate1616 = (value) => isObject(value) && isObject(value) && Object.has
|
|
|
306
306
|
const validate1617 = (value) => typeof value === "string" && (value === "organization" || value === "integration" || value === "mailbox" || value === "agent" || value === "apiKey");
|
|
307
307
|
const validate1619 = (value) => validate1620(value) || validate6(value);
|
|
308
308
|
const validate1620 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "scope") && Object.hasOwn(value, "index") && (!Object.hasOwn(value, "scope") || validate1616(value["scope"])) && (!Object.hasOwn(value, "index") || validate1624(value["index"]));
|
|
309
|
-
const validate1624 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= 0 && typeof value === "number" && value <=
|
|
309
|
+
const validate1624 = (value) => typeof value === "number" && Number.isInteger(value) && typeof value === "number" && value >= 0 && typeof value === "number" && value <= 0x1fffffffffffff;
|
|
310
310
|
const validate1626 = (value) => validate1614(value) || validate6(value);
|
|
311
311
|
const validate1632 = (value) => validate1633(value) || validate6(value);
|
|
312
312
|
const validate1633 = (value) => isObject(value) && isObject(value) && Object.hasOwn(value, "by") && Object.hasOwn(value, "at") && Object.hasOwn(value, "as") && (!Object.hasOwn(value, "by") || validate1634(value["by"])) && (!Object.hasOwn(value, "at") || validate2(value["at"])) && (!Object.hasOwn(value, "as") || validate1636(value["as"])) && (!Object.hasOwn(value, "diff") || validate1637(value["diff"]));
|
|
@@ -730,4 +730,4 @@ const readWebhookHeaders = (headers) => requireHeaders({
|
|
|
730
730
|
});
|
|
731
731
|
export { generateWebhookSecret as a, verifyWebhookAt as c, MalformedWebhookPayloadError as d, WebhookCryptoError as f, isKnownEvent as g, WebhookVerificationError as h, WEBHOOK_TIMESTAMP_HEADER as i, InvalidWebhookHeadersError as l, WebhookTimestampError as m, WEBHOOK_ID_HEADER as n, readWebhookHeaders as o, WebhookSignatureError as p, WEBHOOK_SIGNATURE_HEADER as r, signWebhook as s, DEFAULT_TOLERANCE_SECONDS as t, InvalidWebhookSecretError as u };
|
|
732
732
|
|
|
733
|
-
//# sourceMappingURL=protocol-
|
|
733
|
+
//# sourceMappingURL=protocol-CwGXBskp.js.map
|
package/dist/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-
|
|
1
|
+
export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-CwGXBskp.js";
|
package/dist/schemas.gen.js
CHANGED
|
@@ -1112,11 +1112,11 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1112
1112
|
]),
|
|
1113
1113
|
dns: Schema.StructWithRest(Schema.Struct({
|
|
1114
1114
|
observed: Schema.Boolean,
|
|
1115
|
-
total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1116
|
-
satisfied: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1117
|
-
missing: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1118
|
-
mismatch: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1119
|
-
unknown: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1115
|
+
total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1116
|
+
satisfied: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1117
|
+
missing: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1118
|
+
mismatch: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1119
|
+
unknown: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
1120
1120
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1121
1121
|
provider: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1122
1122
|
identity: Schema.Literals([
|
|
@@ -1274,7 +1274,7 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1274
1274
|
id: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1275
1275
|
flowId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1276
1276
|
versionId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1277
|
-
versionNumber: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1277
|
+
versionNumber: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1278
1278
|
wabaId: Schema.String,
|
|
1279
1279
|
providerFlowId: Schema.Union([Schema.String, Schema.Null]),
|
|
1280
1280
|
name: Schema.String,
|
|
@@ -1289,8 +1289,8 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1289
1289
|
error: Schema.String,
|
|
1290
1290
|
message: Schema.String,
|
|
1291
1291
|
path: Schema.optionalKey(Schema.String),
|
|
1292
|
-
line: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1293
|
-
column: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1292
|
+
line: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
|
|
1293
|
+
column: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })))
|
|
1294
1294
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
1295
1295
|
endpointAlerts: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1296
1296
|
kind: Schema.String,
|
|
@@ -1462,11 +1462,11 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1462
1462
|
"toolCall",
|
|
1463
1463
|
"handoff"
|
|
1464
1464
|
]),
|
|
1465
|
-
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(
|
|
1465
|
+
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
|
|
1466
1466
|
state: Schema.optionalKey(Schema.Literal("approvalRequired").annotate({ description: "Deliveries recorded before this field existed omit it." })),
|
|
1467
1467
|
decision: Schema.StructWithRest(Schema.Struct({
|
|
1468
1468
|
id: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^pdec_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1469
|
-
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(
|
|
1469
|
+
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
|
|
1470
1470
|
requirement: Schema.Literals([
|
|
1471
1471
|
"run",
|
|
1472
1472
|
"model",
|
|
@@ -1506,7 +1506,7 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1506
1506
|
]),
|
|
1507
1507
|
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
1508
1508
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1509
|
-
index: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(
|
|
1509
|
+
index: Schema.Int.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" }))
|
|
1510
1510
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
1511
1511
|
guard: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1512
1512
|
guardReason: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
@@ -1587,7 +1587,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1587
1587
|
"toolCall",
|
|
1588
1588
|
"handoff"
|
|
1589
1589
|
]),
|
|
1590
|
-
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(
|
|
1590
|
+
reviewRound: Schema.Int.check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
|
|
1591
1591
|
threadId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
1592
1592
|
proposedBy: Schema.StructWithRest(Schema.Struct({
|
|
1593
1593
|
kind: Schema.Literals([
|
|
@@ -1800,7 +1800,7 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1800
1800
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1801
1801
|
organizationId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1802
1802
|
journeyId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrny_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1803
|
-
journeyVersion: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-
|
|
1803
|
+
journeyVersion: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-0x1fffffffffffff).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(0x1fffffffffffff).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1804
1804
|
runId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrun_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1805
1805
|
nodeId: Schema.String,
|
|
1806
1806
|
contact: Schema.StructWithRest(Schema.Struct({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/webhooks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "Runtime-neutral verification for Samva webhook deliveries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"samva",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"test:bundle": "slot --all 'bun run build && bun run scripts/check-bundle.ts \"$@\"'"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@effect/tsgo": "0.
|
|
69
|
+
"@effect/tsgo": "0.74.1",
|
|
70
70
|
"@effect/vitest": "^4.1.4",
|
|
71
71
|
"@samva/openapi": "0.0.0",
|
|
72
72
|
"ajv": "^8.20.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"effect": "^4.1.4",
|
|
75
75
|
"tsdown": "0.23.7",
|
|
76
76
|
"typescript": "^7.0.2",
|
|
77
|
-
"vitest": "5.1.
|
|
77
|
+
"vitest": "5.1.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"effect": "^4.0.4"
|