@crvouga/mockingbird-service-twilio 3.3.0 → 3.4.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/CHANGELOG.md +12 -4
- package/dist/{chunk-55BRX56F.js → chunk-D73EZLNL.js} +203 -22
- package/dist/chunk-D73EZLNL.js.map +7 -0
- package/dist/chunk-P7VJRYMF.js +4852 -0
- package/dist/chunk-P7VJRYMF.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +15 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +31 -2
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-55BRX56F.js.map +0 -7
- package/dist/chunk-PTLAPOYJ.js +0 -1044
- package/dist/chunk-PTLAPOYJ.js.map +0 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -642,6 +642,8 @@ type SnapshotDocument = {
|
|
|
642
642
|
faults?: unknown;
|
|
643
643
|
latency?: unknown;
|
|
644
644
|
virtualTime?: boolean;
|
|
645
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
646
|
+
webhooks?: unknown;
|
|
645
647
|
};
|
|
646
648
|
/** Controls for one namespace. */
|
|
647
649
|
type NamespaceControls = {
|
|
@@ -855,6 +857,8 @@ type CredentialRegistry = {
|
|
|
855
857
|
}[];
|
|
856
858
|
};
|
|
857
859
|
|
|
860
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
861
|
+
|
|
858
862
|
/**
|
|
859
863
|
* A point-in-time copy of everything a service namespace holds.
|
|
860
864
|
*
|
|
@@ -972,8 +976,16 @@ type PublishInput = {
|
|
|
972
976
|
id?: string;
|
|
973
977
|
};
|
|
974
978
|
type WebhookHub = {
|
|
979
|
+
observeDeliveries(listener: (event: {
|
|
980
|
+
namespace: string;
|
|
981
|
+
state: string;
|
|
982
|
+
deliveryId: string;
|
|
983
|
+
}) => void): () => void;
|
|
984
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
975
985
|
pending(namespace: string): number;
|
|
976
986
|
snapshot(namespace: string): unknown;
|
|
987
|
+
exportSnapshot(handle: unknown): unknown;
|
|
988
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
977
989
|
restore(namespace: string, snapshot: unknown): void;
|
|
978
990
|
publish(input: PublishInput): WebhookMessage;
|
|
979
991
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -986,7 +998,7 @@ type WebhookHub = {
|
|
|
986
998
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
987
999
|
flush(): Promise<void>;
|
|
988
1000
|
/** Resolve once nothing is in flight. */
|
|
989
|
-
idle(): Promise<void>;
|
|
1001
|
+
idle(namespace?: string): Promise<void>;
|
|
990
1002
|
fault(namespace: string, fault: WebhookFault): void;
|
|
991
1003
|
clear(namespace?: string): void;
|
|
992
1004
|
};
|
|
@@ -1030,6 +1042,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
|
|
|
1030
1042
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
1031
1043
|
fleetSnapshot(namespace: string): object;
|
|
1032
1044
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
1045
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
1046
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
1033
1047
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
1034
1048
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
1035
1049
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -445,6 +445,8 @@ type SnapshotDocument$1 = {
|
|
|
445
445
|
faults?: unknown;
|
|
446
446
|
latency?: unknown;
|
|
447
447
|
virtualTime?: boolean;
|
|
448
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
449
|
+
webhooks?: unknown;
|
|
448
450
|
};
|
|
449
451
|
/** Controls for one namespace. */
|
|
450
452
|
type NamespaceControls$1 = {
|
|
@@ -658,6 +660,8 @@ type CredentialRegistry$1 = {
|
|
|
658
660
|
}[];
|
|
659
661
|
};
|
|
660
662
|
|
|
663
|
+
type OwnedTransport$1 = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
664
|
+
|
|
661
665
|
/**
|
|
662
666
|
* A point-in-time copy of everything a service namespace holds.
|
|
663
667
|
*
|
|
@@ -775,8 +779,16 @@ type PublishInput$1 = {
|
|
|
775
779
|
id?: string;
|
|
776
780
|
};
|
|
777
781
|
type WebhookHub$1 = {
|
|
782
|
+
observeDeliveries(listener: (event: {
|
|
783
|
+
namespace: string;
|
|
784
|
+
state: string;
|
|
785
|
+
deliveryId: string;
|
|
786
|
+
}) => void): () => void;
|
|
787
|
+
setTransportPolicy(policy: OwnedTransport$1): void;
|
|
778
788
|
pending(namespace: string): number;
|
|
779
789
|
snapshot(namespace: string): unknown;
|
|
790
|
+
exportSnapshot(handle: unknown): unknown;
|
|
791
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
780
792
|
restore(namespace: string, snapshot: unknown): void;
|
|
781
793
|
publish(input: PublishInput$1): WebhookMessage$1;
|
|
782
794
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -789,7 +801,7 @@ type WebhookHub$1 = {
|
|
|
789
801
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
790
802
|
flush(): Promise<void>;
|
|
791
803
|
/** Resolve once nothing is in flight. */
|
|
792
|
-
idle(): Promise<void>;
|
|
804
|
+
idle(namespace?: string): Promise<void>;
|
|
793
805
|
fault(namespace: string, fault: WebhookFault$1): void;
|
|
794
806
|
clear(namespace?: string): void;
|
|
795
807
|
};
|
|
@@ -833,6 +845,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$2 & {
|
|
|
833
845
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
834
846
|
fleetSnapshot(namespace: string): object;
|
|
835
847
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
848
|
+
fleetExport(snapshot: unknown): SnapshotDocument$1;
|
|
849
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
836
850
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
837
851
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule$1>): FaultRule$1[];
|
|
838
852
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
|
@@ -925,6 +939,7 @@ type CommonServeOptions = {
|
|
|
925
939
|
* `serveTarget`, which is also how `serve --config` finds services by name.
|
|
926
940
|
*/
|
|
927
941
|
type ServeTarget = {
|
|
942
|
+
packageVersion?: string;
|
|
928
943
|
name: string;
|
|
929
944
|
defaultPort: number;
|
|
930
945
|
/** Serve flags beyond the common ones. */
|
|
@@ -1435,6 +1450,8 @@ type SnapshotDocument = {
|
|
|
1435
1450
|
faults?: unknown;
|
|
1436
1451
|
latency?: unknown;
|
|
1437
1452
|
virtualTime?: boolean;
|
|
1453
|
+
/** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
|
|
1454
|
+
webhooks?: unknown;
|
|
1438
1455
|
};
|
|
1439
1456
|
/** Controls for one namespace. */
|
|
1440
1457
|
type NamespaceControls = {
|
|
@@ -1648,6 +1665,8 @@ type CredentialRegistry = {
|
|
|
1648
1665
|
}[];
|
|
1649
1666
|
};
|
|
1650
1667
|
|
|
1668
|
+
type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
|
|
1669
|
+
|
|
1651
1670
|
/**
|
|
1652
1671
|
* A point-in-time copy of everything a service namespace holds.
|
|
1653
1672
|
*
|
|
@@ -1765,8 +1784,16 @@ type PublishInput = {
|
|
|
1765
1784
|
id?: string;
|
|
1766
1785
|
};
|
|
1767
1786
|
type WebhookHub = {
|
|
1787
|
+
observeDeliveries(listener: (event: {
|
|
1788
|
+
namespace: string;
|
|
1789
|
+
state: string;
|
|
1790
|
+
deliveryId: string;
|
|
1791
|
+
}) => void): () => void;
|
|
1792
|
+
setTransportPolicy(policy: OwnedTransport): void;
|
|
1768
1793
|
pending(namespace: string): number;
|
|
1769
1794
|
snapshot(namespace: string): unknown;
|
|
1795
|
+
exportSnapshot(handle: unknown): unknown;
|
|
1796
|
+
importSnapshot(namespace: string, document: unknown): unknown;
|
|
1770
1797
|
restore(namespace: string, snapshot: unknown): void;
|
|
1771
1798
|
publish(input: PublishInput): WebhookMessage;
|
|
1772
1799
|
/** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
|
|
@@ -1779,7 +1806,7 @@ type WebhookHub = {
|
|
|
1779
1806
|
/** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
|
|
1780
1807
|
flush(): Promise<void>;
|
|
1781
1808
|
/** Resolve once nothing is in flight. */
|
|
1782
|
-
idle(): Promise<void>;
|
|
1809
|
+
idle(namespace?: string): Promise<void>;
|
|
1783
1810
|
fault(namespace: string, fault: WebhookFault): void;
|
|
1784
1811
|
clear(namespace?: string): void;
|
|
1785
1812
|
};
|
|
@@ -1823,6 +1850,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI$1 & {
|
|
|
1823
1850
|
/** Opaque in-process checkpoint including records, controls and webhook history. */
|
|
1824
1851
|
fleetSnapshot(namespace: string): object;
|
|
1825
1852
|
fleetRestore(snapshot: unknown, namespace: string): void;
|
|
1853
|
+
fleetExport(snapshot: unknown): SnapshotDocument;
|
|
1854
|
+
fleetImport(namespace: string, document: unknown): object;
|
|
1826
1855
|
/** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
|
|
1827
1856
|
applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
|
|
1828
1857
|
/** The instance behind `namespace` (the default one when omitted), created on first use. */
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-twilio",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Stateful emulator of Twilio Verify, Lookup v2, Messaging and Recordings on one port, with signed inbound SMS and voice webhooks (Mockingbird service contract).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|