@samva/webhooks 0.31.0 → 0.33.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-Bqz0To0S.js → json-schemas.gen-eaxxbAJh.js} +70 -22
- package/dist/promise.js +2 -2
- package/dist/{protocol-Dxbwh-ml.js → protocol-Di63Knu8.js} +240 -241
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +42 -42
- package/dist/schemas.gen.js +69 -21
- package/package.json +1 -1
package/dist/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DEFAULT_TOLERANCE_SECONDS, f as InvalidWebhookHeadersError, p as InvalidWebhookSecretError, m as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, h as WebhookCryptoError, g as WebhookSignatureError, _ as WebhookTimestampError, v as WebhookVerificationError, a as encodeWebhookSignature, o as generateWebhookSecret, y as isKnownEvent, s as readWebhookHeaders, c as signWebhook, l as verifyWebhookAt, u as verifyWebhookAtWithPublicKeys, d as webhookSignedContent } from "./protocol-
|
|
1
|
+
export { t as DEFAULT_TOLERANCE_SECONDS, f as InvalidWebhookHeadersError, p as InvalidWebhookSecretError, m as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, h as WebhookCryptoError, g as WebhookSignatureError, _ as WebhookTimestampError, v as WebhookVerificationError, a as encodeWebhookSignature, o as generateWebhookSecret, y as isKnownEvent, s as readWebhookHeaders, c as signWebhook, l as verifyWebhookAt, u as verifyWebhookAtWithPublicKeys, d as webhookSignedContent } from "./protocol-Di63Knu8.js";
|
package/dist/schemas.gen.d.ts
CHANGED
|
@@ -525,14 +525,14 @@ export declare const ContactCreatedEventSchema: Schema.StructWithRest<Schema.Str
|
|
|
525
525
|
readonly contactId: Schema.String;
|
|
526
526
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
527
527
|
readonly name: Schema.String;
|
|
528
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
528
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
529
529
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
530
530
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
531
531
|
readonly identifier: Schema.String;
|
|
532
532
|
readonly verified: Schema.Boolean;
|
|
533
533
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
534
534
|
readonly tags: Schema.$Array<Schema.String>;
|
|
535
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
535
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
536
536
|
readonly createdAt: Schema.String;
|
|
537
537
|
readonly updatedAt: Schema.String;
|
|
538
538
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -544,14 +544,14 @@ export declare const ContactUpdatedEventSchema: Schema.StructWithRest<Schema.Str
|
|
|
544
544
|
readonly contactId: Schema.String;
|
|
545
545
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
546
546
|
readonly name: Schema.String;
|
|
547
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
547
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
548
548
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
549
549
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
550
550
|
readonly identifier: Schema.String;
|
|
551
551
|
readonly verified: Schema.Boolean;
|
|
552
552
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
553
553
|
readonly tags: Schema.$Array<Schema.String>;
|
|
554
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
554
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
555
555
|
readonly createdAt: Schema.String;
|
|
556
556
|
readonly updatedAt: Schema.String;
|
|
557
557
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -563,14 +563,14 @@ export declare const ContactDeletedEventSchema: Schema.StructWithRest<Schema.Str
|
|
|
563
563
|
readonly contactId: Schema.String;
|
|
564
564
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
565
565
|
readonly name: Schema.String;
|
|
566
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
566
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
567
567
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
568
568
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
569
569
|
readonly identifier: Schema.String;
|
|
570
570
|
readonly verified: Schema.Boolean;
|
|
571
571
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
572
572
|
readonly tags: Schema.$Array<Schema.String>;
|
|
573
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
573
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
574
574
|
readonly createdAt: Schema.String;
|
|
575
575
|
readonly updatedAt: Schema.String;
|
|
576
576
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -665,11 +665,11 @@ export declare const ConversationCreatedEventSchema: Schema.StructWithRest<Schem
|
|
|
665
665
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
666
666
|
readonly conversationId: Schema.String;
|
|
667
667
|
readonly organizationId: Schema.String;
|
|
668
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
668
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
669
669
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
670
670
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
671
671
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
672
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
672
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
673
673
|
readonly createdAt: Schema.String;
|
|
674
674
|
readonly updatedAt: Schema.String;
|
|
675
675
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -680,11 +680,11 @@ export declare const ConversationUpdatedEventSchema: Schema.StructWithRest<Schem
|
|
|
680
680
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
681
681
|
readonly conversationId: Schema.String;
|
|
682
682
|
readonly organizationId: Schema.String;
|
|
683
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
683
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
684
684
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
685
685
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
686
686
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
687
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
687
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
688
688
|
readonly createdAt: Schema.String;
|
|
689
689
|
readonly updatedAt: Schema.String;
|
|
690
690
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -695,11 +695,11 @@ export declare const ConversationArchivedEventSchema: Schema.StructWithRest<Sche
|
|
|
695
695
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
696
696
|
readonly conversationId: Schema.String;
|
|
697
697
|
readonly organizationId: Schema.String;
|
|
698
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
698
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
699
699
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
700
700
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
701
701
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
702
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
702
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
703
703
|
readonly createdAt: Schema.String;
|
|
704
704
|
readonly updatedAt: Schema.String;
|
|
705
705
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -765,11 +765,11 @@ export declare const DomainUpdatedEventSchema: Schema.StructWithRest<Schema.Stru
|
|
|
765
765
|
readonly phase: Schema.Literals<readonly ["dns-setup", "provisioning", "verifying", "ready", "degraded", "failed"]>;
|
|
766
766
|
readonly dns: Schema.StructWithRest<Schema.Struct<{
|
|
767
767
|
readonly observed: Schema.Boolean;
|
|
768
|
-
readonly total: Schema.
|
|
769
|
-
readonly satisfied: Schema.
|
|
770
|
-
readonly missing: Schema.
|
|
771
|
-
readonly mismatch: Schema.
|
|
772
|
-
readonly unknown: Schema.
|
|
768
|
+
readonly total: Schema.Int;
|
|
769
|
+
readonly satisfied: Schema.Int;
|
|
770
|
+
readonly missing: Schema.Int;
|
|
771
|
+
readonly mismatch: Schema.Int;
|
|
772
|
+
readonly unknown: Schema.Int;
|
|
773
773
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
774
774
|
readonly provider: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
775
775
|
readonly identity: Schema.Literals<readonly ["pending", "verified", "failed", "unknown"]>;
|
|
@@ -847,7 +847,7 @@ export declare const FlowRegistrationUpdatedEventSchema: Schema.StructWithRest<S
|
|
|
847
847
|
readonly id: Schema.String;
|
|
848
848
|
readonly flowId: Schema.String;
|
|
849
849
|
readonly versionId: Schema.String;
|
|
850
|
-
readonly versionNumber: Schema.
|
|
850
|
+
readonly versionNumber: Schema.Int;
|
|
851
851
|
readonly wabaId: Schema.String;
|
|
852
852
|
readonly providerFlowId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
853
853
|
readonly name: Schema.String;
|
|
@@ -856,8 +856,8 @@ export declare const FlowRegistrationUpdatedEventSchema: Schema.StructWithRest<S
|
|
|
856
856
|
readonly error: Schema.String;
|
|
857
857
|
readonly message: Schema.String;
|
|
858
858
|
readonly path: Schema.optionalKey<Schema.String>;
|
|
859
|
-
readonly line: Schema.optionalKey<Schema.
|
|
860
|
-
readonly column: Schema.optionalKey<Schema.
|
|
859
|
+
readonly line: Schema.optionalKey<Schema.Int>;
|
|
860
|
+
readonly column: Schema.optionalKey<Schema.Int>;
|
|
861
861
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
862
862
|
readonly endpointAlerts: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
863
863
|
readonly kind: Schema.String;
|
|
@@ -1190,7 +1190,7 @@ export declare const JourneyWebhookEventSchema: Schema.StructWithRest<Schema.Str
|
|
|
1190
1190
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
1191
1191
|
readonly organizationId: Schema.String;
|
|
1192
1192
|
readonly journeyId: Schema.String;
|
|
1193
|
-
readonly journeyVersion: Schema.
|
|
1193
|
+
readonly journeyVersion: Schema.Int;
|
|
1194
1194
|
readonly runId: Schema.String;
|
|
1195
1195
|
readonly nodeId: Schema.String;
|
|
1196
1196
|
readonly contact: Schema.StructWithRest<Schema.Struct<{
|
|
@@ -1718,14 +1718,14 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1718
1718
|
readonly contactId: Schema.String;
|
|
1719
1719
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
1720
1720
|
readonly name: Schema.String;
|
|
1721
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1721
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1722
1722
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
1723
1723
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
1724
1724
|
readonly identifier: Schema.String;
|
|
1725
1725
|
readonly verified: Schema.Boolean;
|
|
1726
1726
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1727
1727
|
readonly tags: Schema.$Array<Schema.String>;
|
|
1728
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1728
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1729
1729
|
readonly createdAt: Schema.String;
|
|
1730
1730
|
readonly updatedAt: Schema.String;
|
|
1731
1731
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1736,14 +1736,14 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1736
1736
|
readonly contactId: Schema.String;
|
|
1737
1737
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
1738
1738
|
readonly name: Schema.String;
|
|
1739
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1739
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1740
1740
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
1741
1741
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
1742
1742
|
readonly identifier: Schema.String;
|
|
1743
1743
|
readonly verified: Schema.Boolean;
|
|
1744
1744
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1745
1745
|
readonly tags: Schema.$Array<Schema.String>;
|
|
1746
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1746
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1747
1747
|
readonly createdAt: Schema.String;
|
|
1748
1748
|
readonly updatedAt: Schema.String;
|
|
1749
1749
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1754,14 +1754,14 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1754
1754
|
readonly contactId: Schema.String;
|
|
1755
1755
|
readonly status: Schema.Literals<readonly ["active", "paused", "blocked", "archived"]>;
|
|
1756
1756
|
readonly name: Schema.String;
|
|
1757
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1757
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1758
1758
|
readonly identities: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
1759
1759
|
readonly type: Schema.Literals<readonly ["email", "phone"]>;
|
|
1760
1760
|
readonly identifier: Schema.String;
|
|
1761
1761
|
readonly verified: Schema.Boolean;
|
|
1762
1762
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1763
1763
|
readonly tags: Schema.$Array<Schema.String>;
|
|
1764
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1764
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1765
1765
|
readonly createdAt: Schema.String;
|
|
1766
1766
|
readonly updatedAt: Schema.String;
|
|
1767
1767
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1851,11 +1851,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1851
1851
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
1852
1852
|
readonly conversationId: Schema.String;
|
|
1853
1853
|
readonly organizationId: Schema.String;
|
|
1854
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1854
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1855
1855
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
1856
1856
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
1857
1857
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
1858
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1858
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1859
1859
|
readonly createdAt: Schema.String;
|
|
1860
1860
|
readonly updatedAt: Schema.String;
|
|
1861
1861
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1865,11 +1865,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1865
1865
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
1866
1866
|
readonly conversationId: Schema.String;
|
|
1867
1867
|
readonly organizationId: Schema.String;
|
|
1868
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1868
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1869
1869
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
1870
1870
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
1871
1871
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
1872
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1872
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1873
1873
|
readonly createdAt: Schema.String;
|
|
1874
1874
|
readonly updatedAt: Schema.String;
|
|
1875
1875
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1879,11 +1879,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1879
1879
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
1880
1880
|
readonly conversationId: Schema.String;
|
|
1881
1881
|
readonly organizationId: Schema.String;
|
|
1882
|
-
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1882
|
+
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1883
1883
|
readonly channels: Schema.$Array<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
|
|
1884
1884
|
readonly primaryChannel: Schema.Literals<readonly ["sms", "whatsapp", "email"]>;
|
|
1885
1885
|
readonly status: Schema.Literals<readonly ["active", "waiting", "resolved", "escalated", "archived"]>;
|
|
1886
|
-
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1886
|
+
readonly primaryContactId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null, Schema.Null]>>;
|
|
1887
1887
|
readonly createdAt: Schema.String;
|
|
1888
1888
|
readonly updatedAt: Schema.String;
|
|
1889
1889
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
@@ -1944,11 +1944,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1944
1944
|
readonly phase: Schema.Literals<readonly ["dns-setup", "provisioning", "verifying", "ready", "degraded", "failed"]>;
|
|
1945
1945
|
readonly dns: Schema.StructWithRest<Schema.Struct<{
|
|
1946
1946
|
readonly observed: Schema.Boolean;
|
|
1947
|
-
readonly total: Schema.
|
|
1948
|
-
readonly satisfied: Schema.
|
|
1949
|
-
readonly missing: Schema.
|
|
1950
|
-
readonly mismatch: Schema.
|
|
1951
|
-
readonly unknown: Schema.
|
|
1947
|
+
readonly total: Schema.Int;
|
|
1948
|
+
readonly satisfied: Schema.Int;
|
|
1949
|
+
readonly missing: Schema.Int;
|
|
1950
|
+
readonly mismatch: Schema.Int;
|
|
1951
|
+
readonly unknown: Schema.Int;
|
|
1952
1952
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
1953
1953
|
readonly provider: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
1954
1954
|
readonly identity: Schema.Literals<readonly ["pending", "verified", "failed", "unknown"]>;
|
|
@@ -2023,7 +2023,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
2023
2023
|
readonly id: Schema.String;
|
|
2024
2024
|
readonly flowId: Schema.String;
|
|
2025
2025
|
readonly versionId: Schema.String;
|
|
2026
|
-
readonly versionNumber: Schema.
|
|
2026
|
+
readonly versionNumber: Schema.Int;
|
|
2027
2027
|
readonly wabaId: Schema.String;
|
|
2028
2028
|
readonly providerFlowId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2029
2029
|
readonly name: Schema.String;
|
|
@@ -2032,8 +2032,8 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
2032
2032
|
readonly error: Schema.String;
|
|
2033
2033
|
readonly message: Schema.String;
|
|
2034
2034
|
readonly path: Schema.optionalKey<Schema.String>;
|
|
2035
|
-
readonly line: Schema.optionalKey<Schema.
|
|
2036
|
-
readonly column: Schema.optionalKey<Schema.
|
|
2035
|
+
readonly line: Schema.optionalKey<Schema.Int>;
|
|
2036
|
+
readonly column: Schema.optionalKey<Schema.Int>;
|
|
2037
2037
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
2038
2038
|
readonly endpointAlerts: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
2039
2039
|
readonly kind: Schema.String;
|
|
@@ -2354,7 +2354,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
2354
2354
|
readonly data: Schema.StructWithRest<Schema.Struct<{
|
|
2355
2355
|
readonly organizationId: Schema.String;
|
|
2356
2356
|
readonly journeyId: Schema.String;
|
|
2357
|
-
readonly journeyVersion: Schema.
|
|
2357
|
+
readonly journeyVersion: Schema.Int;
|
|
2358
2358
|
readonly runId: Schema.String;
|
|
2359
2359
|
readonly nodeId: Schema.String;
|
|
2360
2360
|
readonly contact: Schema.StructWithRest<Schema.Struct<{
|
package/dist/schemas.gen.js
CHANGED
|
@@ -651,14 +651,22 @@ const ContactCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
651
651
|
"archived"
|
|
652
652
|
]),
|
|
653
653
|
name: Schema.String,
|
|
654
|
-
displayName: Schema.optionalKey(Schema.Union([
|
|
654
|
+
displayName: Schema.optionalKey(Schema.Union([
|
|
655
|
+
Schema.String,
|
|
656
|
+
Schema.Null,
|
|
657
|
+
Schema.Null
|
|
658
|
+
])),
|
|
655
659
|
identities: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
656
660
|
type: Schema.Literals(["email", "phone"]),
|
|
657
661
|
identifier: Schema.String,
|
|
658
662
|
verified: Schema.Boolean
|
|
659
663
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
660
664
|
tags: Schema.Array(Schema.String),
|
|
661
|
-
externalId: Schema.optionalKey(Schema.Union([
|
|
665
|
+
externalId: Schema.optionalKey(Schema.Union([
|
|
666
|
+
Schema.String,
|
|
667
|
+
Schema.Null,
|
|
668
|
+
Schema.Null
|
|
669
|
+
])),
|
|
662
670
|
createdAt: Schema.String,
|
|
663
671
|
updatedAt: Schema.String
|
|
664
672
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -675,14 +683,22 @@ const ContactUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
675
683
|
"archived"
|
|
676
684
|
]),
|
|
677
685
|
name: Schema.String,
|
|
678
|
-
displayName: Schema.optionalKey(Schema.Union([
|
|
686
|
+
displayName: Schema.optionalKey(Schema.Union([
|
|
687
|
+
Schema.String,
|
|
688
|
+
Schema.Null,
|
|
689
|
+
Schema.Null
|
|
690
|
+
])),
|
|
679
691
|
identities: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
680
692
|
type: Schema.Literals(["email", "phone"]),
|
|
681
693
|
identifier: Schema.String,
|
|
682
694
|
verified: Schema.Boolean
|
|
683
695
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
684
696
|
tags: Schema.Array(Schema.String),
|
|
685
|
-
externalId: Schema.optionalKey(Schema.Union([
|
|
697
|
+
externalId: Schema.optionalKey(Schema.Union([
|
|
698
|
+
Schema.String,
|
|
699
|
+
Schema.Null,
|
|
700
|
+
Schema.Null
|
|
701
|
+
])),
|
|
686
702
|
createdAt: Schema.String,
|
|
687
703
|
updatedAt: Schema.String
|
|
688
704
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -699,14 +715,22 @@ const ContactDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
699
715
|
"archived"
|
|
700
716
|
]),
|
|
701
717
|
name: Schema.String,
|
|
702
|
-
displayName: Schema.optionalKey(Schema.Union([
|
|
718
|
+
displayName: Schema.optionalKey(Schema.Union([
|
|
719
|
+
Schema.String,
|
|
720
|
+
Schema.Null,
|
|
721
|
+
Schema.Null
|
|
722
|
+
])),
|
|
703
723
|
identities: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
704
724
|
type: Schema.Literals(["email", "phone"]),
|
|
705
725
|
identifier: Schema.String,
|
|
706
726
|
verified: Schema.Boolean
|
|
707
727
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
708
728
|
tags: Schema.Array(Schema.String),
|
|
709
|
-
externalId: Schema.optionalKey(Schema.Union([
|
|
729
|
+
externalId: Schema.optionalKey(Schema.Union([
|
|
730
|
+
Schema.String,
|
|
731
|
+
Schema.Null,
|
|
732
|
+
Schema.Null
|
|
733
|
+
])),
|
|
710
734
|
createdAt: Schema.String,
|
|
711
735
|
updatedAt: Schema.String
|
|
712
736
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -817,7 +841,11 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
817
841
|
data: Schema.StructWithRest(Schema.Struct({
|
|
818
842
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
819
843
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
820
|
-
title: Schema.optionalKey(Schema.Union([
|
|
844
|
+
title: Schema.optionalKey(Schema.Union([
|
|
845
|
+
Schema.String,
|
|
846
|
+
Schema.Null,
|
|
847
|
+
Schema.Null
|
|
848
|
+
])),
|
|
821
849
|
channels: Schema.Array(Schema.Literals([
|
|
822
850
|
"sms",
|
|
823
851
|
"whatsapp",
|
|
@@ -835,7 +863,11 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
835
863
|
"escalated",
|
|
836
864
|
"archived"
|
|
837
865
|
]),
|
|
838
|
-
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
866
|
+
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
867
|
+
Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
868
|
+
Schema.Null,
|
|
869
|
+
Schema.Null
|
|
870
|
+
])),
|
|
839
871
|
createdAt: Schema.String,
|
|
840
872
|
updatedAt: Schema.String
|
|
841
873
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -846,7 +878,11 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
846
878
|
data: Schema.StructWithRest(Schema.Struct({
|
|
847
879
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
848
880
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
849
|
-
title: Schema.optionalKey(Schema.Union([
|
|
881
|
+
title: Schema.optionalKey(Schema.Union([
|
|
882
|
+
Schema.String,
|
|
883
|
+
Schema.Null,
|
|
884
|
+
Schema.Null
|
|
885
|
+
])),
|
|
850
886
|
channels: Schema.Array(Schema.Literals([
|
|
851
887
|
"sms",
|
|
852
888
|
"whatsapp",
|
|
@@ -864,7 +900,11 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
864
900
|
"escalated",
|
|
865
901
|
"archived"
|
|
866
902
|
]),
|
|
867
|
-
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
903
|
+
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
904
|
+
Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
905
|
+
Schema.Null,
|
|
906
|
+
Schema.Null
|
|
907
|
+
])),
|
|
868
908
|
createdAt: Schema.String,
|
|
869
909
|
updatedAt: Schema.String
|
|
870
910
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -875,7 +915,11 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
875
915
|
data: Schema.StructWithRest(Schema.Struct({
|
|
876
916
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
877
917
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
878
|
-
title: Schema.optionalKey(Schema.Union([
|
|
918
|
+
title: Schema.optionalKey(Schema.Union([
|
|
919
|
+
Schema.String,
|
|
920
|
+
Schema.Null,
|
|
921
|
+
Schema.Null
|
|
922
|
+
])),
|
|
879
923
|
channels: Schema.Array(Schema.Literals([
|
|
880
924
|
"sms",
|
|
881
925
|
"whatsapp",
|
|
@@ -893,7 +937,11 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
893
937
|
"escalated",
|
|
894
938
|
"archived"
|
|
895
939
|
]),
|
|
896
|
-
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
940
|
+
primaryContactId: Schema.optionalKey(Schema.Union([
|
|
941
|
+
Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
942
|
+
Schema.Null,
|
|
943
|
+
Schema.Null
|
|
944
|
+
])),
|
|
897
945
|
createdAt: Schema.String,
|
|
898
946
|
updatedAt: Schema.String
|
|
899
947
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -973,11 +1021,11 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
973
1021
|
]),
|
|
974
1022
|
dns: Schema.StructWithRest(Schema.Struct({
|
|
975
1023
|
observed: Schema.Boolean,
|
|
976
|
-
total: Schema.
|
|
977
|
-
satisfied: Schema.
|
|
978
|
-
missing: Schema.
|
|
979
|
-
mismatch: Schema.
|
|
980
|
-
unknown: Schema.
|
|
1024
|
+
total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1025
|
+
satisfied: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1026
|
+
missing: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1027
|
+
mismatch: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1028
|
+
unknown: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
981
1029
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
982
1030
|
provider: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
983
1031
|
identity: Schema.Literals([
|
|
@@ -1113,7 +1161,7 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1113
1161
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1114
1162
|
flowId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1115
1163
|
versionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1116
|
-
versionNumber: Schema.
|
|
1164
|
+
versionNumber: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1117
1165
|
wabaId: Schema.String,
|
|
1118
1166
|
providerFlowId: Schema.Union([Schema.String, Schema.Null]),
|
|
1119
1167
|
name: Schema.String,
|
|
@@ -1128,8 +1176,8 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1128
1176
|
error: Schema.String,
|
|
1129
1177
|
message: Schema.String,
|
|
1130
1178
|
path: Schema.optionalKey(Schema.String),
|
|
1131
|
-
line: Schema.optionalKey(Schema.
|
|
1132
|
-
column: Schema.optionalKey(Schema.
|
|
1179
|
+
line: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))),
|
|
1180
|
+
column: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })))
|
|
1133
1181
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
1134
1182
|
endpointAlerts: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1135
1183
|
kind: Schema.String,
|
|
@@ -1637,7 +1685,7 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1637
1685
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1638
1686
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1639
1687
|
journeyId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1640
|
-
journeyVersion: Schema.
|
|
1688
|
+
journeyVersion: Schema.Int.check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
1641
1689
|
runId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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}$" })),
|
|
1642
1690
|
nodeId: Schema.String,
|
|
1643
1691
|
contact: Schema.StructWithRest(Schema.Struct({
|