@bitblit/ratchet-common 4.0.353-alpha → 4.0.355-alpha
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/lib/index.mjs +1 -1
- package/lib/types.d.ts +980 -0
- package/package.json +3 -3
- package/lib/2d/line-2d.d.ts +0 -5
- package/lib/2d/plane-2d.d.ts +0 -6
- package/lib/2d/point-2d.d.ts +0 -4
- package/lib/2d/poly-line-2d.d.ts +0 -4
- package/lib/2d/ratchet-2d.d.ts +0 -37
- package/lib/2d/ratchet-2d.spec.d.ts +0 -1
- package/lib/build/build-information.d.ts +0 -8
- package/lib/build/ratchet-common-info.d.ts +0 -5
- package/lib/histogram/histogram-entry.d.ts +0 -4
- package/lib/histogram/histogram.d.ts +0 -12
- package/lib/histogram/histogram.spec.d.ts +0 -1
- package/lib/index.d.ts +0 -86
- package/lib/index.mjs.map +0 -1
- package/lib/jwt/common-jwt-token.d.ts +0 -6
- package/lib/jwt/expired-jwt-handling.d.ts +0 -5
- package/lib/jwt/jwt-ratchet-like.d.ts +0 -15
- package/lib/jwt/jwt-ratchet.d.ts +0 -30
- package/lib/jwt/jwt-ratchet.spec.d.ts +0 -1
- package/lib/jwt/jwt-token-base.d.ts +0 -9
- package/lib/lang/array-ratchet.d.ts +0 -14
- package/lib/lang/array-ratchet.spec.d.ts +0 -1
- package/lib/lang/base64-ratchet.d.ts +0 -20
- package/lib/lang/base64-ratchet.spec.d.ts +0 -1
- package/lib/lang/boolean-ratchet.d.ts +0 -7
- package/lib/lang/boolean-ratchet.spec.d.ts +0 -1
- package/lib/lang/composite-last-success-provider.d.ts +0 -7
- package/lib/lang/composite-last-success-provider.spec.d.ts +0 -1
- package/lib/lang/date-ratchet.d.ts +0 -11
- package/lib/lang/date-ratchet.spec.d.ts +0 -1
- package/lib/lang/duration-ratchet.d.ts +0 -7
- package/lib/lang/duration-ratchet.spec.d.ts +0 -1
- package/lib/lang/enum-ratchet.d.ts +0 -5
- package/lib/lang/enum-ratchet.spec.d.ts +0 -5
- package/lib/lang/error-ratchet.d.ts +0 -6
- package/lib/lang/error-ratchet.spec.d.ts +0 -1
- package/lib/lang/esm-ratchet.d.ts +0 -4
- package/lib/lang/expiring-object.d.ts +0 -20
- package/lib/lang/expiring-object.spec.d.ts +0 -1
- package/lib/lang/geolocation-ratchet.d.ts +0 -40
- package/lib/lang/geolocation-ratchet.spec.d.ts +0 -1
- package/lib/lang/global-ratchet.d.ts +0 -6
- package/lib/lang/global-ratchet.spec.d.ts +0 -1
- package/lib/lang/key-value.d.ts +0 -4
- package/lib/lang/last-success-provider.d.ts +0 -3
- package/lib/lang/map-ratchet.d.ts +0 -15
- package/lib/lang/map-ratchet.spec.d.ts +0 -1
- package/lib/lang/no.d.ts +0 -3
- package/lib/lang/no.spec.d.ts +0 -1
- package/lib/lang/number-ratchet.d.ts +0 -28
- package/lib/lang/number-ratchet.spec.d.ts +0 -1
- package/lib/lang/parsed-url.d.ts +0 -10
- package/lib/lang/promise-ratchet.d.ts +0 -18
- package/lib/lang/promise-ratchet.spec.d.ts +0 -1
- package/lib/lang/require-ratchet.d.ts +0 -11
- package/lib/lang/require-ratchet.spec.d.ts +0 -3
- package/lib/lang/sort-ratchet.d.ts +0 -7
- package/lib/lang/sort-ratchet.spec.d.ts +0 -1
- package/lib/lang/stop-watch.d.ts +0 -28
- package/lib/lang/stop-watch.spec.d.ts +0 -1
- package/lib/lang/string-ratchet.d.ts +0 -37
- package/lib/lang/string-ratchet.spec.d.ts +0 -1
- package/lib/lang/time-zone-ratchet.d.ts +0 -20
- package/lib/lang/time-zone-ratchet.spec.d.ts +0 -1
- package/lib/lang/timeout-token.d.ts +0 -9
- package/lib/lang/timeout-token.spec.d.ts +0 -1
- package/lib/lang/uint-8-array-ratchet.d.ts +0 -5
- package/lib/lang/uint-8-array-ratchet.spec.d.ts +0 -1
- package/lib/lang/web-stream-ratchet.d.ts +0 -6
- package/lib/lang/web-stream-ratchet.spec.d.ts +0 -1
- package/lib/logger/classic-single-line-log-message-formatter.d.ts +0 -6
- package/lib/logger/log-message-builder.d.ts +0 -14
- package/lib/logger/log-message-format-type.d.ts +0 -6
- package/lib/logger/log-message-formatter.d.ts +0 -5
- package/lib/logger/log-message-processor.d.ts +0 -5
- package/lib/logger/log-message.d.ts +0 -8
- package/lib/logger/log-snapshot.d.ts +0 -5
- package/lib/logger/logger-instance.d.ts +0 -48
- package/lib/logger/logger-level-name.d.ts +0 -9
- package/lib/logger/logger-meta.d.ts +0 -6
- package/lib/logger/logger-options.d.ts +0 -13
- package/lib/logger/logger-output-function.d.ts +0 -6
- package/lib/logger/logger-ring-buffer.d.ts +0 -18
- package/lib/logger/logger-util.d.ts +0 -8
- package/lib/logger/logger-util.spec.d.ts +0 -1
- package/lib/logger/logger.d.ts +0 -45
- package/lib/logger/logger.spec.d.ts +0 -1
- package/lib/logger/none-log-message-formatter.d.ts +0 -6
- package/lib/logger/structured-json-log-message-formatter.d.ts +0 -6
- package/lib/mail/archive-email-result.d.ts +0 -5
- package/lib/mail/email-attachment.d.ts +0 -5
- package/lib/mail/mail-sending-provider.d.ts +0 -5
- package/lib/mail/mailer-config.d.ts +0 -11
- package/lib/mail/mailer-like.d.ts +0 -11
- package/lib/mail/mailer-util.d.ts +0 -7
- package/lib/mail/mailer.d.ts +0 -17
- package/lib/mail/mailer.spec.d.ts +0 -1
- package/lib/mail/ready-to-send-email.d.ts +0 -13
- package/lib/mail/resolved-ready-to-send-email.d.ts +0 -5
- package/lib/mail/send-email-result.d.ts +0 -12
- package/lib/mail/test-mail-sending-provider.d.ts +0 -8
- package/lib/network/browser-local-ip-provider.d.ts +0 -7
- package/lib/network/browser-local-ip-provider.spec.d.ts +0 -1
- package/lib/network/fixed-local-ip-provider.d.ts +0 -6
- package/lib/network/local-ip-provider.d.ts +0 -3
- package/lib/network/network-ratchet.d.ts +0 -9
- package/lib/network/network-ratchet.spec.d.ts +0 -1
- package/lib/network/restful-api-http-error.d.ts +0 -41
- package/lib/network/restful-api-http-error.spec.d.ts +0 -1
- package/lib/template/ratchet-template-renderer.d.ts +0 -4
- package/lib/third-party/google/google-recaptcha-ratchet.d.ts +0 -4
- package/lib/third-party/google/google-recaptcha-ratchet.spec.d.ts +0 -1
- package/lib/third-party/twilio/twilio-ratchet.d.ts +0 -11
- package/lib/third-party/twilio/twilio-verify-ratchet.d.ts +0 -23
- package/lib/transform/built-in-transforms.d.ts +0 -18
- package/lib/transform/transform-ratchet.d.ts +0 -7
- package/lib/transform/transform-ratchet.spec.d.ts +0 -1
- package/lib/transform/transform-rule.d.ts +0 -3
- package/lib/tx/transaction-configuration.d.ts +0 -7
- package/lib/tx/transaction-final-state.d.ts +0 -6
- package/lib/tx/transaction-ratchet.d.ts +0 -6
- package/lib/tx/transaction-ratchet.spec.d.ts +0 -1
- package/lib/tx/transaction-result.d.ts +0 -9
- package/lib/tx/transaction-step.d.ts +0 -5
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,980 @@
|
|
|
1
|
+
import { DurationLike } from 'luxon';
|
|
2
|
+
|
|
3
|
+
interface Point2d {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Line2d {
|
|
9
|
+
p1: Point2d;
|
|
10
|
+
p2: Point2d;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface Plane2d {
|
|
14
|
+
height: number;
|
|
15
|
+
width: number;
|
|
16
|
+
rightToLeft?: boolean;
|
|
17
|
+
topToBottom?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface PolyLine2d {
|
|
21
|
+
pts: Point2d[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class Ratchet2d {
|
|
25
|
+
private constructor();
|
|
26
|
+
static translateToOriginVector(points: Point2d[]): Point2d;
|
|
27
|
+
static minimalContainingPlane(points: Point2d[]): Plane2d;
|
|
28
|
+
static scaleVector(src: Plane2d, dst: Plane2d): Point2d;
|
|
29
|
+
static samePoint(p1: Point2d, p2: Point2d): boolean;
|
|
30
|
+
static atLeastOneDimensionShared(p1: Point2d, p2: Point2d): boolean;
|
|
31
|
+
static validPlane(plane: Plane2d): boolean;
|
|
32
|
+
static validLine(line: Line2d): boolean;
|
|
33
|
+
static validLines(lines: Line2d[]): boolean;
|
|
34
|
+
static validPolyLine(pline: PolyLine2d): boolean;
|
|
35
|
+
static polyLineToLines(pline: PolyLine2d): Line2d[];
|
|
36
|
+
static lastPointOnPolyLine(polyLine: PolyLine2d): Point2d;
|
|
37
|
+
static lineToPolyLine(line: Line2d): PolyLine2d;
|
|
38
|
+
static linesToPolyLines(lines: Line2d[]): PolyLine2d[];
|
|
39
|
+
static validPoint(pt: Point2d): boolean;
|
|
40
|
+
static validPoints(pt: Point2d[]): boolean;
|
|
41
|
+
static planeContainsPoint(pt: Point2d, plane: Plane2d): boolean;
|
|
42
|
+
static planeContainsPoints(pt: Point2d[], plane: Plane2d): boolean;
|
|
43
|
+
static linesToPoints(lines: Line2d[]): Point2d[];
|
|
44
|
+
static pointsToLines(points: Point2d[]): Line2d[];
|
|
45
|
+
static rotateRightAboutOrigin90Degrees(points: Point2d[], times?: number): Point2d[];
|
|
46
|
+
static planeContainsLines(lines: Line2d[], plane: Plane2d): boolean;
|
|
47
|
+
static planeContainsPolyLine(pline: PolyLine2d, plane: Plane2d): boolean;
|
|
48
|
+
static planeContainsLine(line: Line2d, plane: Plane2d): boolean;
|
|
49
|
+
static xToY(points: Point2d[]): Point2d[];
|
|
50
|
+
static translate(points: Point2d[], xlate: Point2d): Point2d[];
|
|
51
|
+
static mirrorPointsOnPlane(points: Point2d[], src: Plane2d, mirrorX: boolean, mirrorY: boolean): Point2d[];
|
|
52
|
+
static transformPointsToNewPlane(points: Point2d[], src: Plane2d, dst: Plane2d): Point2d[];
|
|
53
|
+
static transformPointToNewPlane(point: Point2d, src: Plane2d, dst: Plane2d): Point2d;
|
|
54
|
+
static transformLines(lines: Line2d[], src: Plane2d, dst: Plane2d): Line2d[];
|
|
55
|
+
static fitCurve(curveDef: Point2d[], inputX: number): number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface BuildInformation {
|
|
59
|
+
version?: string;
|
|
60
|
+
hash?: string;
|
|
61
|
+
branch?: string;
|
|
62
|
+
tag?: string;
|
|
63
|
+
timeBuiltISO?: string;
|
|
64
|
+
notes?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class RatchetInfo {
|
|
68
|
+
private constructor();
|
|
69
|
+
static buildInformation(): BuildInformation;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface HistogramEntry<T> {
|
|
73
|
+
item: T;
|
|
74
|
+
count: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class Histogram<T> {
|
|
78
|
+
private entries;
|
|
79
|
+
update(val: T, addValue?: number): void;
|
|
80
|
+
sort(): void;
|
|
81
|
+
sortKeys(): void;
|
|
82
|
+
reverse(): void;
|
|
83
|
+
getEntries(): HistogramEntry<T>[];
|
|
84
|
+
getTotalCount(): number;
|
|
85
|
+
countForValue(val: T): number;
|
|
86
|
+
percentForValue(val: T): number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface JwtTokenBase {
|
|
90
|
+
iss?: string;
|
|
91
|
+
sub?: string;
|
|
92
|
+
aud?: string;
|
|
93
|
+
exp?: number;
|
|
94
|
+
nbf?: number;
|
|
95
|
+
iat?: number;
|
|
96
|
+
jti?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface CommonJwtToken<T> extends JwtTokenBase {
|
|
100
|
+
user: T;
|
|
101
|
+
proxy: T;
|
|
102
|
+
roles: string[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare const enum ExpiredJwtHandling {
|
|
106
|
+
RETURN_NULL = 0,
|
|
107
|
+
THROW_EXCEPTION = 1,
|
|
108
|
+
ADD_FLAG = 2
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare const LoggerLevelName: {
|
|
112
|
+
readonly error: "error";
|
|
113
|
+
readonly warn: "warn";
|
|
114
|
+
readonly info: "info";
|
|
115
|
+
readonly verbose: "verbose";
|
|
116
|
+
readonly debug: "debug";
|
|
117
|
+
readonly silly: "silly";
|
|
118
|
+
};
|
|
119
|
+
type LoggerLevelName = (typeof LoggerLevelName)[keyof typeof LoggerLevelName];
|
|
120
|
+
|
|
121
|
+
interface JwtRatchetLike {
|
|
122
|
+
get encryptionKeyPromise(): Promise<string | string[]>;
|
|
123
|
+
get decryptKeysPromise(): Promise<string[]>;
|
|
124
|
+
get jtiGenerator(): () => string;
|
|
125
|
+
get decryptOnlyKeyUseLogLevel(): LoggerLevelName;
|
|
126
|
+
get parseFailureLogLevel(): LoggerLevelName;
|
|
127
|
+
decodeToken<T extends JwtTokenBase>(payloadString: string, expiredHandling?: ExpiredJwtHandling): Promise<T>;
|
|
128
|
+
encryptionKeyArray(): Promise<string[]>;
|
|
129
|
+
selectRandomEncryptionKey(): Promise<string>;
|
|
130
|
+
createTokenString(payload: any, expirationSeconds?: number, overrideEncryptionKey?: string): Promise<string>;
|
|
131
|
+
refreshJWTString(tokenString: string, allowExpired?: boolean, expirationSeconds?: number): Promise<string>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare class JwtRatchet implements JwtRatchetLike {
|
|
135
|
+
private _encryptionKeyPromise;
|
|
136
|
+
private _decryptKeysPromise?;
|
|
137
|
+
private _jtiGenerator;
|
|
138
|
+
private _decryptOnlyKeyUseLogLevel;
|
|
139
|
+
private _parseFailureLogLevel;
|
|
140
|
+
private static readonly EXPIRED_FLAG_NAME;
|
|
141
|
+
constructor(_encryptionKeyPromise: Promise<string | string[]>, _decryptKeysPromise?: Promise<string[]>, _jtiGenerator?: () => string, _decryptOnlyKeyUseLogLevel?: LoggerLevelName, _parseFailureLogLevel?: LoggerLevelName);
|
|
142
|
+
get encryptionKeyPromise(): Promise<string | string[]>;
|
|
143
|
+
get decryptKeysPromise(): Promise<string[]>;
|
|
144
|
+
get jtiGenerator(): () => string;
|
|
145
|
+
get decryptOnlyKeyUseLogLevel(): LoggerLevelName;
|
|
146
|
+
get parseFailureLogLevel(): LoggerLevelName;
|
|
147
|
+
static hasExpiredFlag(ob: any): boolean;
|
|
148
|
+
static invalidSafeDecode<T>(payloadString: string, decryptKey: string, logLevel?: LoggerLevelName): Promise<T>;
|
|
149
|
+
static secondsRemainingUntilExpiration(payloadString: string): Promise<number>;
|
|
150
|
+
static msRemainingUntilExpiration(payloadString: string): Promise<number>;
|
|
151
|
+
decodeToken<T extends JwtTokenBase>(payloadString: string, expiredHandling?: ExpiredJwtHandling): Promise<T>;
|
|
152
|
+
encryptionKeyArray(): Promise<string[]>;
|
|
153
|
+
selectRandomEncryptionKey(): Promise<string>;
|
|
154
|
+
createTokenString(payload: any, expirationSeconds?: number, overrideEncryptionKey?: string): Promise<string>;
|
|
155
|
+
refreshJWTString(tokenString: string, allowExpired?: boolean, expirationSeconds?: number): Promise<string>;
|
|
156
|
+
static decodeTokenNoVerify<T extends JwtTokenBase>(token: string): T;
|
|
157
|
+
static removeJwtFields(ob: any): void;
|
|
158
|
+
static removeExpiredFlag(ob: any): void;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class ArrayRatchet {
|
|
162
|
+
static wrapElementsInArray(input: any[]): any[][];
|
|
163
|
+
static compareTwoArrays<T>(ar1: T[], ar2: T[], fn: ComparisonFunction<T>): MatchReport<T>;
|
|
164
|
+
static extractSubarrayFromSortedByNumberField<T>(input: T[], fieldDotPath: string, minInclusive: number, maxExclusive: number): T[];
|
|
165
|
+
static findSplit(input: any[], fieldDotPath: string, target: number): number;
|
|
166
|
+
}
|
|
167
|
+
interface ComparisonFunction<T> {
|
|
168
|
+
(t1: T, t2: T): number;
|
|
169
|
+
}
|
|
170
|
+
interface MatchReport<T> {
|
|
171
|
+
matching: T[];
|
|
172
|
+
setOneOnly: T[];
|
|
173
|
+
setTwoOnly: T[];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class Base64Ratchet {
|
|
177
|
+
static safeObjectToBase64JSON(input: any): any;
|
|
178
|
+
static safeBase64JSONParse(input: string): any;
|
|
179
|
+
static generateBase64VersionOfBlob(blob: Blob): Promise<string>;
|
|
180
|
+
static generateBase64VersionOfString(input: string): string;
|
|
181
|
+
static generateBase64VersionOfUint8Array(input: Uint8Array): string;
|
|
182
|
+
static base64StringToUint8Array(b64encoded: string): Uint8Array;
|
|
183
|
+
static base64StringToString(input: string, encoding?: string): string;
|
|
184
|
+
private static BASE64_ABC;
|
|
185
|
+
private static BASE64_CODES;
|
|
186
|
+
static getBase64Code(charCode: number): number;
|
|
187
|
+
static uint8ArrayToBase64UrlString(bytes: Uint8Array): string;
|
|
188
|
+
static uint8ArrayToBase64String(bytes: Uint8Array): string;
|
|
189
|
+
static base64StringToBytes(str: string): Uint8Array;
|
|
190
|
+
static base64UrlStringToBytes(str: string): Uint8Array;
|
|
191
|
+
static encodeStringToBase64String(str: string, encoder?: TextEncoder): string;
|
|
192
|
+
static encodeStringToBase64UrlString(str: string, encoder?: TextEncoder): string;
|
|
193
|
+
static decodeBase64StringToString(str: string, decoder?: TextDecoder): string;
|
|
194
|
+
static decodeBase64UrlStringToString(str: string, decoder?: TextDecoder): string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare class BooleanRatchet {
|
|
198
|
+
static allTrue(vals: boolean[], emptyArraysReturn?: boolean): boolean;
|
|
199
|
+
static anyTrue(vals: boolean[], emptyArraysReturn?: boolean): boolean;
|
|
200
|
+
static parseBool(val: any): boolean;
|
|
201
|
+
static intToBool(val: any): boolean;
|
|
202
|
+
static boolToInt(val: any): number;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface LastSuccessProvider {
|
|
206
|
+
lastSuccess(): number;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare class CompositeLastSuccessProvider implements LastSuccessProvider {
|
|
210
|
+
private sources;
|
|
211
|
+
private mostRecent;
|
|
212
|
+
constructor(src: LastSuccessProvider[], mostRecentSrc?: boolean);
|
|
213
|
+
lastSuccess(): number;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare class DateRatchet {
|
|
217
|
+
static COMMON_US_DATE_FORMAT: string;
|
|
218
|
+
static DEFAULT_DATE_FORMAT: string;
|
|
219
|
+
static FULL_DATE_FORMAT: string;
|
|
220
|
+
static PACIFIC_TIME_ZONE: string;
|
|
221
|
+
static UTC_TIME_ZONE: string;
|
|
222
|
+
static formatFullDate(input: Date): string;
|
|
223
|
+
static formatDefaultDateOnly(input: Date): string;
|
|
224
|
+
static parseDefaultDate(input: string): Date;
|
|
225
|
+
static parseCommonUsDate(input: string): Date;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare class DurationRatchet {
|
|
229
|
+
static formatMsDuration(ms: number, includeMS?: boolean): string;
|
|
230
|
+
static colonFormatMsDuration(ms: number, includeMS?: boolean): string;
|
|
231
|
+
static daysBetween(d1: Date, d2: Date): number;
|
|
232
|
+
static createSteps(startEpochMS: number, endEpochMS: number, timezone: string, outputFormat: string, stepUnit: DurationLike): string[];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
declare class EnumRatchet {
|
|
236
|
+
static listEnumKeys(enumeration: any): string[];
|
|
237
|
+
static keyToEnum<T>(enumeration: any, val: string, caseSensitive?: boolean): T;
|
|
238
|
+
static parseCsvToEnumArray<T>(enumeration: any, input: string): T[];
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
declare class ErrorRatchet {
|
|
242
|
+
static safeStringifyErr(err: any, log?: boolean): string;
|
|
243
|
+
static asErr(input: any): Error;
|
|
244
|
+
static fErr(format: string, ...input: any[]): Error;
|
|
245
|
+
static throwFormattedErr(format: string, ...input: any[]): Error;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare class EsmRatchet {
|
|
249
|
+
static fetchDirName(root: string): string;
|
|
250
|
+
static fetchFileName(root: string): string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class ExpiringObject<T> {
|
|
254
|
+
private _config;
|
|
255
|
+
private _cacheObject;
|
|
256
|
+
private _lastUpdatedEpochMS;
|
|
257
|
+
private _timeRemainingMS;
|
|
258
|
+
constructor(inputConfig?: ExpiringObjectConfig<T>);
|
|
259
|
+
private defaultConfig;
|
|
260
|
+
private defaultTimeRemainingMS;
|
|
261
|
+
update(newValue: T, doNotUpdateClock?: boolean): void;
|
|
262
|
+
fetchCacheObjectTimeRemainingMS(): Promise<number>;
|
|
263
|
+
fetch(): Promise<T>;
|
|
264
|
+
}
|
|
265
|
+
declare class ExpiringObjectConfig<T> {
|
|
266
|
+
timeToLiveMS?: number;
|
|
267
|
+
generator?: () => Promise<T>;
|
|
268
|
+
initialValue?: T;
|
|
269
|
+
logLevel?: LoggerLevelName;
|
|
270
|
+
overrideTimeRemainingMS?: (lastUpdatedEpochMS: number) => Promise<number>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class GeolocationRatchet {
|
|
274
|
+
private constructor();
|
|
275
|
+
static distanceBetweenLocations(lat1: number, lon1: number, lat2: number, lon2: number, unit?: string): number;
|
|
276
|
+
static distanceBetweenRatchetGeoLocations(loc1: RatchetGeoLocation, loc2: RatchetGeoLocation, unit?: string): number;
|
|
277
|
+
static degreeOfLatLngInMiles(latitudeInDecimalDegress?: number): number;
|
|
278
|
+
static milesInDegLatLng(miles: number, latitudeInDecimalDegress?: number): number;
|
|
279
|
+
static centerOfBounds(bounds: RatchetLocationBounds): RatchetGeoLocation;
|
|
280
|
+
private static calculateSplits;
|
|
281
|
+
static clusterGeoBounds(inputVal: RatchetLocationBounds[], latSlices?: number, lngSlices?: number): RatchetLocationBounds[];
|
|
282
|
+
static canonicalizeBounds(inp: RatchetLocationBounds, allowCrossover?: boolean): RatchetLocationBounds;
|
|
283
|
+
static combineBounds(inp: RatchetLocationBounds[]): RatchetLocationBounds;
|
|
284
|
+
static roundLocation(r: RatchetGeoLocation, roundDigits: number): RatchetGeoLocation;
|
|
285
|
+
static locationToBounds(loc: RatchetGeoLocation, radiusMiles: number): RatchetLocationBounds;
|
|
286
|
+
static sameLocation(loc1: RatchetGeoLocation, loc2: RatchetGeoLocation): boolean;
|
|
287
|
+
static pointInBounds(pt: RatchetGeoLocation, bound: RatchetLocationBounds): boolean;
|
|
288
|
+
static pointInAnyBound(pt: RatchetGeoLocation, inBounds: RatchetLocationBounds[], minPointsBeforeMapping?: number): boolean;
|
|
289
|
+
static pointInRatchetLocationBoundsMap(pt: RatchetGeoLocation, mp: RatchetLocationBoundsMap): boolean;
|
|
290
|
+
static findRatchetLocationBoundsMapEntry(pt: RatchetGeoLocation, mp: RatchetLocationBoundsMap): RatchetLocationBoundsMapEntry;
|
|
291
|
+
static buildRatchetLocationBoundsMap(inBounds: RatchetLocationBounds[]): RatchetLocationBoundsMap;
|
|
292
|
+
}
|
|
293
|
+
interface RatchetGeoLocation {
|
|
294
|
+
lat: number;
|
|
295
|
+
lng: number;
|
|
296
|
+
}
|
|
297
|
+
interface RatchetLocationBounds {
|
|
298
|
+
origin: RatchetGeoLocation;
|
|
299
|
+
extent: RatchetGeoLocation;
|
|
300
|
+
}
|
|
301
|
+
interface RatchetLocationBoundsMap {
|
|
302
|
+
latOffset: number;
|
|
303
|
+
lngOffset: number;
|
|
304
|
+
maxLat: number;
|
|
305
|
+
maxLng: number;
|
|
306
|
+
mapping: RatchetLocationBoundsMapEntry[][];
|
|
307
|
+
}
|
|
308
|
+
interface RatchetLocationBoundsMapEntry {
|
|
309
|
+
lat: number;
|
|
310
|
+
lng: number;
|
|
311
|
+
bounds: RatchetLocationBounds[];
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare class GlobalRatchet {
|
|
315
|
+
private constructor();
|
|
316
|
+
static fetchGlobalRecord(returnNullOnNone?: boolean): Record<string, any>;
|
|
317
|
+
static fetchGlobalVar(envVar: string): string;
|
|
318
|
+
static setGlobalVar(envVar: string, value: string): void;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
declare class KeyValue<T> {
|
|
322
|
+
key: string;
|
|
323
|
+
value: T;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare class MapRatchet {
|
|
327
|
+
static expandNestedKeysToObjects<T>(src: any, separator?: string): T;
|
|
328
|
+
static mapByUniqueProperty<T, R>(input: T[], propName: string): Map<R, T>;
|
|
329
|
+
static groupByProperty<T, R>(input: T[], propName: string): Map<R, T[]>;
|
|
330
|
+
static findValue(toSearch: any, path: string[]): any;
|
|
331
|
+
static findValueDotPath(toSearch: any, dotPath: string): any;
|
|
332
|
+
static simpleDeepCompare(object1: any, object2: any): boolean;
|
|
333
|
+
static toKeyValueList(value: Record<string, any>): KeyValue<any>[];
|
|
334
|
+
static fromKeyValueList<T>(list: KeyValue<T>[]): Record<string, T>;
|
|
335
|
+
static cleanup<T>(obj: T, stripZero?: boolean, stripNull?: boolean, stripUndefined?: boolean, stripEmptyString?: boolean): T;
|
|
336
|
+
static extractValueFromMapIgnoreCase(src: any, key: string): any;
|
|
337
|
+
static safeCallFunction(ob: any, fnName: string): boolean;
|
|
338
|
+
static caseInsensitiveAccess<T>(ob: any, keyName: string): T;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare class No {
|
|
342
|
+
static op(...args: any[]): void;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare class NumberRatchet {
|
|
346
|
+
private static MAX_LEADING_ZEROS_FORMAT_LENGTH;
|
|
347
|
+
static readonly DEFAULT_SAFE_NUMBER_OPTIONS: SafeNumberOptions;
|
|
348
|
+
static toFixedDecimalNumber(input: number | string, placesAfterPoint: number): number;
|
|
349
|
+
static leadingZeros(val: any, size: number): string;
|
|
350
|
+
static between(inTest: number, inP1: number, inP2: number): boolean;
|
|
351
|
+
static safeNumber(input: any, ifNotNumber?: number, useDefaultForNullAndUndefined?: boolean): number;
|
|
352
|
+
static safeNumberOpt(input: any, optionPart?: Partial<SafeNumberOptions>): number;
|
|
353
|
+
static numberCSVToList(inputCSV: string): number[];
|
|
354
|
+
static fitToWindow(val: number, b1: number, b2: number): number;
|
|
355
|
+
static groupNumbersIntoContiguousRanges(inputData: number[], minRangeSize?: number): SinglesAndRanges;
|
|
356
|
+
static distributeItemsEvenly(items: number, buckets: number): number[];
|
|
357
|
+
static createRange(minInclusive: number, maxExclusive: number, step?: number): number[];
|
|
358
|
+
}
|
|
359
|
+
interface SinglesAndRanges {
|
|
360
|
+
singles: number[];
|
|
361
|
+
ranges: NumberRange[];
|
|
362
|
+
}
|
|
363
|
+
interface NumberRange {
|
|
364
|
+
min: number;
|
|
365
|
+
max: number;
|
|
366
|
+
}
|
|
367
|
+
interface SafeNumberOptions {
|
|
368
|
+
ifNotNumber: number;
|
|
369
|
+
returnValueForNull: number;
|
|
370
|
+
returnValueForUndefined: number;
|
|
371
|
+
preParseCharacterMapping: Record<string, string>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
interface ParsedUrl {
|
|
375
|
+
href: string;
|
|
376
|
+
protocol: string;
|
|
377
|
+
host: string;
|
|
378
|
+
hostname: string;
|
|
379
|
+
port: string;
|
|
380
|
+
pathname: string;
|
|
381
|
+
search: string;
|
|
382
|
+
hash: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare class TimeoutToken {
|
|
386
|
+
private title;
|
|
387
|
+
private timeoutMS;
|
|
388
|
+
private __timeoutTokenFlagField;
|
|
389
|
+
constructor(title: string, timeoutMS: number);
|
|
390
|
+
writeToLog(logLevel?: LoggerLevelName): void;
|
|
391
|
+
static isTimeoutToken(value: any): boolean;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
declare class PromiseRatchet {
|
|
395
|
+
static resolveOnEvent<T>(evtSrc: any, okEvtNames: string[], errEvtNames?: string[], rval?: T): Promise<T>;
|
|
396
|
+
static timeout<T>(srcPromise: Promise<T>, title: string, timeoutMS: number): Promise<T | TimeoutToken>;
|
|
397
|
+
static createTimeoutPromise(title: string, timeoutMS: number): Promise<TimeoutToken>;
|
|
398
|
+
static wait(time: number): Promise<void>;
|
|
399
|
+
static dumpResult(result: any, autoDebug?: boolean): void;
|
|
400
|
+
static dumpError(err: any, autoDebug?: boolean): void;
|
|
401
|
+
static logErrorAndReturnNull(err: any, autoDebug?: boolean): void;
|
|
402
|
+
static runPromiseAndDump<T>(promise: Promise<T>): void;
|
|
403
|
+
static waitFor(testFunction: (n: number) => any, expectedValue: any, intervalMS: number, maxCycles: number, label?: string, count?: number): Promise<boolean>;
|
|
404
|
+
static runBoundedParallel<T>(promiseFn: Function, params: any[][], context: any, maxConcurrent?: number, logLevel?: LoggerLevelName): Promise<T[]>;
|
|
405
|
+
static runBoundedParallelSingleParam<T>(promiseFn: Function, params: any[], context: any, maxConcurrent?: number, logLevel?: LoggerLevelName): Promise<T[]>;
|
|
406
|
+
static asyncForEachSerial(array: any[], callback: Function): Promise<void>;
|
|
407
|
+
static asyncForEachParallel(array: any[], callback: Function): Promise<void>;
|
|
408
|
+
private constructor();
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare class RequireRatchet {
|
|
412
|
+
static isNullOrUndefined(ob: any): boolean;
|
|
413
|
+
static notNullOrUndefined(ob: any, name?: string): void;
|
|
414
|
+
static notNullUndefinedOrOnlyWhitespaceString(ob: string, name?: string): void;
|
|
415
|
+
static notNullUndefinedOrEmptyArray(ob: any[], name?: string): void;
|
|
416
|
+
static equal(ob1: any, ob2: any, message?: string): void;
|
|
417
|
+
static true(ob: boolean, message?: string): void;
|
|
418
|
+
static noNullOrUndefinedValuesInArray(arr: any[], expectedLength?: number, customMsg?: string): void;
|
|
419
|
+
static noNullOrUndefinedValuesInRestArgs(expectedLength: number, ...restArgs: any[]): void;
|
|
420
|
+
static constructorArgumentsMatchLengthAndAreNonNull(): void;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
declare class SortRatchet {
|
|
424
|
+
private constructor();
|
|
425
|
+
static sortNullToTop<T>(a: T, b: T, bothNonNullSort: (c: T, d: T) => number): number;
|
|
426
|
+
static sortNullToBottom<T>(a: T, b: T, bothNonNullSort: (c: T, d: T) => number): number;
|
|
427
|
+
static nullSafeSort<T>(a: T, b: T, nullsOnTop: boolean, bothNonNullSort: (c: T, d: T) => number): number;
|
|
428
|
+
static sortNumericStringsAsNumbers(a: string | number, b: string | number, sortNonNumbersToTop?: boolean): number;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare class StopWatch {
|
|
432
|
+
get createTime(): number;
|
|
433
|
+
private starts;
|
|
434
|
+
private ends;
|
|
435
|
+
private _createTime;
|
|
436
|
+
private _label;
|
|
437
|
+
private _labelIncludedInOutput;
|
|
438
|
+
constructor();
|
|
439
|
+
withLabel(val: string): StopWatch;
|
|
440
|
+
withLabelIncludedInOutput(val: boolean): StopWatch;
|
|
441
|
+
get label(): string;
|
|
442
|
+
set label(value: string);
|
|
443
|
+
get labelIncludedInOutput(): boolean;
|
|
444
|
+
set labelIncludedInOutput(value: boolean);
|
|
445
|
+
start(name: string): number;
|
|
446
|
+
stop(name: string): number;
|
|
447
|
+
reset(name: string): void;
|
|
448
|
+
hasTimer(name: string): boolean;
|
|
449
|
+
log(name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
450
|
+
logExpected(pctComplete: number, name?: string, shortForm?: boolean, logLevel?: LoggerLevelName): void;
|
|
451
|
+
timerNames(): string[];
|
|
452
|
+
dumpAll(separator?: string, shortForm?: boolean): string;
|
|
453
|
+
dump(name?: string, shortForm?: boolean): string;
|
|
454
|
+
dumpExpected(pctComplete: number, name?: string, shortForm?: boolean): string;
|
|
455
|
+
expectedRemainingMS(pctComplete: number, name?: string): number;
|
|
456
|
+
elapsedMS(name?: string): number;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
declare class StringRatchet {
|
|
460
|
+
static readonly RFC_3986_RESERVED: string[];
|
|
461
|
+
static readonly DIGITS: string;
|
|
462
|
+
static readonly HEXITS: string;
|
|
463
|
+
static readonly UPPER_CASE_LATIN: string;
|
|
464
|
+
static readonly LOWER_CASE_LATIN: string;
|
|
465
|
+
static readonly CASE_INSENSITIVE_LATIN: string;
|
|
466
|
+
static stringIsInGivenAlphabet(input: string, alphabet: string): boolean;
|
|
467
|
+
static stringToUint8Array(val: string): Uint8Array;
|
|
468
|
+
static uint8ArrayToString(val: Uint8Array): string;
|
|
469
|
+
static attemptJsonParse(val: string): any;
|
|
470
|
+
static canParseAsJson(val: string): boolean;
|
|
471
|
+
static allUnique(input: string): boolean;
|
|
472
|
+
static allPermutationsOfLength(len: number, alphabet: string): string[];
|
|
473
|
+
static breakIntoBlocks(input: string, blockSize: number, separator: string): string;
|
|
474
|
+
static createShortUid(blockSize?: number, uniquesPerSecond?: number, radix?: number): string;
|
|
475
|
+
static createType4Guid(): string;
|
|
476
|
+
static createRandomHexString(len?: number): string;
|
|
477
|
+
static canonicalize(value: string): string;
|
|
478
|
+
static formatBytes(bytes: number, decimals?: number): string;
|
|
479
|
+
static safeString(input: any): string;
|
|
480
|
+
static stringContainsOnlyNumbers(input: string): boolean;
|
|
481
|
+
static stringContainsOnlyAlphanumeric(input: string): boolean;
|
|
482
|
+
static stringContainsOnlyHex(input: string): boolean;
|
|
483
|
+
static stringContainsOnly(inVal: string, validCharsIn: string): boolean;
|
|
484
|
+
static obscure(input: string, prefixLength?: number, suffixLength?: number): string;
|
|
485
|
+
static leadingZeros(inVal: any, size: number): string;
|
|
486
|
+
static trimToEmpty(input: string): string;
|
|
487
|
+
static trimToNull(input: string): string;
|
|
488
|
+
static trimAllStringPropertiesToNullInPlace<T>(input: T): T;
|
|
489
|
+
static trimAllStringPropertiesToEmptyInPlace<T>(input: T): T;
|
|
490
|
+
private static trimAllStringPropertiesInPlace;
|
|
491
|
+
static stripNonNumeric(input: string): string;
|
|
492
|
+
static csvSafe(input: any): string;
|
|
493
|
+
static stripNonAscii(value: string): string;
|
|
494
|
+
static replaceAll(value: string, src: string, dst: string): string;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
declare class TimeZoneRatchet {
|
|
498
|
+
private timezoneIanaName;
|
|
499
|
+
static PACIFIC: TimeZoneRatchet;
|
|
500
|
+
constructor(timezoneIanaName: string);
|
|
501
|
+
get ianaName(): string;
|
|
502
|
+
currentHour(): number;
|
|
503
|
+
private toEpochSeconds;
|
|
504
|
+
startOfTodayEpochSeconds(): number;
|
|
505
|
+
startOfMatchingDayEpochSeconds(inputTS: number): number;
|
|
506
|
+
startOfMatchingDayEpochMS(inputTS: number): number;
|
|
507
|
+
startOfCurrentHourEpochSeconds(): number;
|
|
508
|
+
startOfCurrentMinuteEpochSeconds(): number;
|
|
509
|
+
startOfCurrentSecondEpochSeconds(): number;
|
|
510
|
+
startOfTodayEpochMS(): number;
|
|
511
|
+
dailySlotCount(slotWidthMs: number): number;
|
|
512
|
+
currentTimeSlotIdx(slotWidthMs: number): number;
|
|
513
|
+
matchingTimeSlotIdx(timestamp: number, slotWidthMs: number): number;
|
|
514
|
+
startOfCurrentSlotEpochMS(slotWidthMs: number): number;
|
|
515
|
+
startOfMatchingSlotEpochMS(timestamp: number, slotWidthMs: number): number;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
declare class Uint8ArrayRatchet {
|
|
519
|
+
private constructor();
|
|
520
|
+
static mergeArrays(myArrays: Uint8Array[]): Uint8Array;
|
|
521
|
+
static deepEqual(arr1: Uint8Array, arr2: Uint8Array): boolean;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare class WebStreamRatchet {
|
|
525
|
+
private constructor();
|
|
526
|
+
static webReadableStreamToUint8Array(stream: ReadableStream): Promise<Uint8Array>;
|
|
527
|
+
static webReadableStreamToString(stream: ReadableStream): Promise<string>;
|
|
528
|
+
static stringToWebReadableStream(input: string): ReadableStream;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
interface LogMessage {
|
|
532
|
+
lvl: LoggerLevelName;
|
|
533
|
+
timestamp: number;
|
|
534
|
+
messageSource: string;
|
|
535
|
+
subsVars?: any[];
|
|
536
|
+
params?: Record<string, string | number | boolean>;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
declare const LogMessageFormatType: {
|
|
540
|
+
readonly ClassicSingleLine: "ClassicSingleLine";
|
|
541
|
+
readonly StructuredJson: "StructuredJson";
|
|
542
|
+
readonly None: "None";
|
|
543
|
+
};
|
|
544
|
+
type LogMessageFormatType = (typeof LogMessageFormatType)[keyof typeof LogMessageFormatType];
|
|
545
|
+
|
|
546
|
+
interface LogMessageProcessor {
|
|
547
|
+
label?(): string;
|
|
548
|
+
process(msg: LogMessage): LogMessage;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
declare const LoggerOutputFunction: {
|
|
552
|
+
Console: string;
|
|
553
|
+
ConsoleNoDebug: string;
|
|
554
|
+
StdOut: string;
|
|
555
|
+
};
|
|
556
|
+
type LoggerOutputFunction = (typeof LoggerOutputFunction)[keyof typeof LoggerOutputFunction];
|
|
557
|
+
|
|
558
|
+
interface LoggerOptions {
|
|
559
|
+
initialLevel?: LoggerLevelName;
|
|
560
|
+
formatType?: LogMessageFormatType;
|
|
561
|
+
trace?: string;
|
|
562
|
+
globalVars?: Record<string, string | number | boolean>;
|
|
563
|
+
outputFunction?: LoggerOutputFunction;
|
|
564
|
+
ringBufferSize?: number;
|
|
565
|
+
preProcessors?: LogMessageProcessor[];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
interface LoggerMeta {
|
|
569
|
+
options: LoggerOptions;
|
|
570
|
+
loggerInstanceName: string;
|
|
571
|
+
loggerInstanceId: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
interface LogMessageFormatter {
|
|
575
|
+
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
declare class ClassicSingleLineLogMessageFormatter implements LogMessageFormatter {
|
|
579
|
+
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
declare class LogMessageBuilder {
|
|
583
|
+
private wrapped;
|
|
584
|
+
constructor(lvl: LoggerLevelName, messageSource?: string);
|
|
585
|
+
clone(): LogMessageBuilder;
|
|
586
|
+
level(lvl: LoggerLevelName): LogMessageBuilder;
|
|
587
|
+
timestamp(val: number): LogMessageBuilder;
|
|
588
|
+
messageSource(val: string): LogMessageBuilder;
|
|
589
|
+
subVars(val: any[]): LogMessageBuilder;
|
|
590
|
+
params(val: Record<string, string | number | boolean>): LogMessageBuilder;
|
|
591
|
+
p(name: string, value: string | number | boolean): LogMessageBuilder;
|
|
592
|
+
toMessage(): LogMessage;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
interface LogSnapshot {
|
|
596
|
+
logMessagesTruncated: number;
|
|
597
|
+
messages: LogMessage[];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
declare class LoggerRingBuffer {
|
|
601
|
+
private _lastLogMessage;
|
|
602
|
+
private _buffer;
|
|
603
|
+
private _bufferIdx;
|
|
604
|
+
private _lastSnapshotIdx;
|
|
605
|
+
private _bufferSize;
|
|
606
|
+
constructor(size: number);
|
|
607
|
+
get currentIndex(): number;
|
|
608
|
+
get lastSnapshotIdx(): number;
|
|
609
|
+
set bufferSize(newSize: number);
|
|
610
|
+
getMessages(inStartFrom?: number, clear?: boolean, reverseSort?: boolean): LogMessage[];
|
|
611
|
+
takeSnapshot(): LogSnapshot;
|
|
612
|
+
getLastLogMessage(): LogMessage;
|
|
613
|
+
private clearRingBuffer;
|
|
614
|
+
addToRingBuffer(newMsg: LogMessage): void;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
declare class LoggerInstance {
|
|
618
|
+
private loggerInstanceName;
|
|
619
|
+
private _guid;
|
|
620
|
+
private _loggerMeta;
|
|
621
|
+
private _ringBuffer;
|
|
622
|
+
private _formatter;
|
|
623
|
+
private _level;
|
|
624
|
+
private _handlerFunctionMap;
|
|
625
|
+
private _options;
|
|
626
|
+
constructor(loggerInstanceName: string, inOptions: LoggerOptions);
|
|
627
|
+
addPreProcessor(proc: LogMessageProcessor): LogMessageProcessor[];
|
|
628
|
+
get ringBuffer(): LoggerRingBuffer;
|
|
629
|
+
dumpConfigurationIntoLog(): void;
|
|
630
|
+
dumpOptionsIntoLog(): void;
|
|
631
|
+
get guid(): number;
|
|
632
|
+
changeRingBufferSize(newSize: number): void;
|
|
633
|
+
updateTracePrefix(newValue: string): void;
|
|
634
|
+
get options(): LoggerOptions;
|
|
635
|
+
set options(newOpts: LoggerOptions);
|
|
636
|
+
get level(): LoggerLevelName;
|
|
637
|
+
set level(newLevel: LoggerLevelName);
|
|
638
|
+
consoleLogPassThru(level: LoggerLevelName, ...input: any[]): void;
|
|
639
|
+
createLogMessage(level: LoggerLevelName, params: Record<string, string>, format: string, ...input: any[]): LogMessage;
|
|
640
|
+
formatMessage(msg: LogMessage): string;
|
|
641
|
+
formatMessages(msgs: LogMessage[]): string[];
|
|
642
|
+
recordMessageBuilder(msgBuild: LogMessageBuilder): string;
|
|
643
|
+
recordMessage(inMsg: LogMessage): string;
|
|
644
|
+
error(format: string, ...input: any[]): string;
|
|
645
|
+
errorP(...input: any[]): void;
|
|
646
|
+
warn(format: string, ...input: any[]): string;
|
|
647
|
+
warnP(...input: any[]): void;
|
|
648
|
+
info(format: string, ...input: any[]): string;
|
|
649
|
+
infoP(...input: any[]): void;
|
|
650
|
+
verbose(format: string, ...input: any[]): string;
|
|
651
|
+
verboseP(...input: any[]): void;
|
|
652
|
+
debug(format: string, ...input: any[]): string;
|
|
653
|
+
debugP(...input: any[]): void;
|
|
654
|
+
silly(format: string, ...input: any[]): string;
|
|
655
|
+
sillyP(...input: any[]): void;
|
|
656
|
+
logByLevel(level: LoggerLevelName, format: string, ...input: any[]): void;
|
|
657
|
+
importMessages(msgs: LogMessage[], prefixIn?: string, addTimestamp?: boolean): void;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
declare class LoggerUtil {
|
|
661
|
+
private static LOG_LEVELS_IN_ORDER;
|
|
662
|
+
static handlerFunctionMap(outputFn?: LoggerOutputFunction): Map<LoggerLevelName, (...any: any[]) => void>;
|
|
663
|
+
static defaultHandlerFunction(): (...any: any[]) => void;
|
|
664
|
+
static levelIsEnabled(targetLevel: LoggerLevelName, currentEnabled: LoggerLevelName): boolean;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare class Logger {
|
|
668
|
+
private static LOGGER_INSTANCE_MAP_GLOBAL_KEY;
|
|
669
|
+
private static GLOBAL_PROVIDER;
|
|
670
|
+
private static DEFAULT_OPTIONS;
|
|
671
|
+
static applyDefaultsToOptions(input?: LoggerOptions): LoggerOptions;
|
|
672
|
+
private static loggerInstances;
|
|
673
|
+
static changeDefaultOptions(input: LoggerOptions, retroactive?: boolean): void;
|
|
674
|
+
static getLogger(loggerName?: string, inOptions?: LoggerOptions): LoggerInstance;
|
|
675
|
+
static recordMessageBuilder(msgBuild: LogMessageBuilder): string;
|
|
676
|
+
static recordMessage(msg: LogMessage): string;
|
|
677
|
+
static formatMessages(msgs: LogMessage[]): string[];
|
|
678
|
+
static updateTracePrefix(newValue: string): void;
|
|
679
|
+
static changeRingBufferSize(newValue: number): void;
|
|
680
|
+
static getRingBuffer(): LoggerRingBuffer;
|
|
681
|
+
static dumpConfigurationIntoLog(): void;
|
|
682
|
+
static dumpOptionsIntoLog(): void;
|
|
683
|
+
static getLevel(): LoggerLevelName;
|
|
684
|
+
static setLevel(newLevel: LoggerLevelName): void;
|
|
685
|
+
static getOptions(): LoggerOptions;
|
|
686
|
+
static getMessages(inStartFrom?: number, clear?: boolean, reverseSort?: boolean): LogMessage[];
|
|
687
|
+
static consoleLogPassThru(level: LoggerLevelName, ...input: any[]): void;
|
|
688
|
+
static error(format: string, ...input: any[]): string;
|
|
689
|
+
static errorP(...input: any[]): void;
|
|
690
|
+
static warn(format: string, ...input: any[]): string;
|
|
691
|
+
static warnP(...input: any[]): void;
|
|
692
|
+
static info(format: string, ...input: any[]): string;
|
|
693
|
+
static infoP(...input: any[]): void;
|
|
694
|
+
static verbose(format: string, ...input: any[]): string;
|
|
695
|
+
static verboseP(...input: any[]): void;
|
|
696
|
+
static debug(format: string, ...input: any[]): string;
|
|
697
|
+
static debugP(...input: any[]): void;
|
|
698
|
+
static silly(format: string, ...input: any[]): string;
|
|
699
|
+
static sillyP(...input: any[]): void;
|
|
700
|
+
static takeSnapshot(): LogSnapshot;
|
|
701
|
+
static logByLevel(level: LoggerLevelName, format: string, ...input: any[]): void;
|
|
702
|
+
static importMessages(msgs: LogMessage[], prefixIn?: string, addTimestamp?: boolean): void;
|
|
703
|
+
static getLastLogMessage(): LogMessage;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
declare class NoneLogMessageFormatter implements LogMessageFormatter {
|
|
707
|
+
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
declare class StructuredJsonLogMessageFormatter implements LogMessageFormatter {
|
|
711
|
+
formatMessage(msg: LogMessage, meta: LoggerMeta): string;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
interface ArchiveEmailResult<R> {
|
|
715
|
+
raw: R;
|
|
716
|
+
error: string;
|
|
717
|
+
meta: Record<string, any>;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
interface EmailAttachment {
|
|
721
|
+
filename?: string;
|
|
722
|
+
contentType?: string;
|
|
723
|
+
base64Data?: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
interface ReadyToSendEmail {
|
|
727
|
+
destinationAddresses?: Array<string>;
|
|
728
|
+
bccAddresses?: Array<string>;
|
|
729
|
+
attachments?: Array<EmailAttachment>;
|
|
730
|
+
fromAddress?: string;
|
|
731
|
+
txtMessage?: string;
|
|
732
|
+
htmlMessage?: string;
|
|
733
|
+
subject?: string;
|
|
734
|
+
fromName?: string;
|
|
735
|
+
doNotAutoBcc?: boolean;
|
|
736
|
+
doNotArchive?: boolean;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
interface ResolvedReadyToSendEmail extends ReadyToSendEmail {
|
|
740
|
+
srcDestinationAddresses?: string[];
|
|
741
|
+
srcBccAddresses?: string[];
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
interface MailSendingProvider<T, R> {
|
|
745
|
+
sendEmail(mail: ResolvedReadyToSendEmail): Promise<T>;
|
|
746
|
+
archiveEmail?(mail: ResolvedReadyToSendEmail, rawSendResult: T): Promise<R>;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
interface RatchetTemplateRenderer {
|
|
750
|
+
renderTemplate(templateName: string, context: any, layoutName?: string, partialNames?: string[]): Promise<string>;
|
|
751
|
+
renderTemplateDirect(templateValue: string, context: any, layoutName?: string): Promise<string>;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
interface MailerConfig<T, R> {
|
|
755
|
+
provider: MailSendingProvider<T, R>;
|
|
756
|
+
defaultSendingAddress?: string;
|
|
757
|
+
autoBccAddresses?: string[];
|
|
758
|
+
templateRenderer?: RatchetTemplateRenderer;
|
|
759
|
+
allowedDestinationEmails?: RegExp[];
|
|
760
|
+
maxMessageBodySizeInBytes?: number;
|
|
761
|
+
maxAttachmentSizeInBase64Bytes?: number;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
interface SendEmailResult<T, R> {
|
|
765
|
+
request: ReadyToSendEmail;
|
|
766
|
+
resolved: ResolvedReadyToSendEmail;
|
|
767
|
+
success: boolean;
|
|
768
|
+
rawResult: T;
|
|
769
|
+
error: string;
|
|
770
|
+
meta: Record<string, any>;
|
|
771
|
+
archiveResults: ArchiveEmailResult<R>;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
interface MailerLike<T, R> {
|
|
775
|
+
fillEmailBody(rts: ReadyToSendEmail, context: any, htmlTemplateName: string, txtTemplateName?: string, layoutName?: string, partialNames?: string[]): Promise<ReadyToSendEmail>;
|
|
776
|
+
fillEmailBodyAndSend(rts: ReadyToSendEmail, context: any, htmlTemplateName: string, txtTemplateName?: string, layoutName?: string, partialNames?: string[]): Promise<SendEmailResult<T, R>>;
|
|
777
|
+
filterEmailsToValid(emails: string[]): string[];
|
|
778
|
+
applyLimitsToBodySizesIfAnyInPlace(rts: ResolvedReadyToSendEmail): void;
|
|
779
|
+
applyLimitsToAttachmentSizesIfAnyInPlace(rts: ResolvedReadyToSendEmail): void;
|
|
780
|
+
sendEmail(inRts: ReadyToSendEmail): Promise<SendEmailResult<T, R>>;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
declare class MailerUtil {
|
|
784
|
+
static readonly EMAIL: RegExp;
|
|
785
|
+
constructor();
|
|
786
|
+
static convertResolvedReadyToSendEmailToRaw(rts: ResolvedReadyToSendEmail): string;
|
|
787
|
+
static validEmail(email: string): boolean;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
declare class Mailer<T, R> implements MailerLike<T, R> {
|
|
791
|
+
private config;
|
|
792
|
+
constructor(config: MailerConfig<T, R>);
|
|
793
|
+
fillEmailBody(rts: ReadyToSendEmail, context: any, htmlTemplateName: string, txtTemplateName?: string, layoutName?: string, partialNames?: string[]): Promise<ReadyToSendEmail>;
|
|
794
|
+
fillEmailBodyAndSend(rts: ReadyToSendEmail, context: any, htmlTemplateName: string, txtTemplateName?: string, layoutName?: string, partialNames?: string[]): Promise<SendEmailResult<T, R>>;
|
|
795
|
+
filterEmailsToValid(emails: string[]): string[];
|
|
796
|
+
private archiveEmailIfConfigured;
|
|
797
|
+
applyLimitsToBodySizesIfAnyInPlace(rts: ResolvedReadyToSendEmail): void;
|
|
798
|
+
applyLimitsToAttachmentSizesIfAnyInPlace(rts: ResolvedReadyToSendEmail): void;
|
|
799
|
+
sendEmail(inRts: ReadyToSendEmail): Promise<SendEmailResult<T, R>>;
|
|
800
|
+
resolveReadyToSendEmail(inRts: ReadyToSendEmail): Promise<ResolvedReadyToSendEmail>;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
declare class TestMailSendingProvider implements MailSendingProvider<string, string> {
|
|
804
|
+
failEmails: string[];
|
|
805
|
+
constructor(failEmails?: string[]);
|
|
806
|
+
sendEmail(mail: ResolvedReadyToSendEmail): Promise<string>;
|
|
807
|
+
archiveEmail(mail: ResolvedReadyToSendEmail): Promise<string>;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
interface LocalIpProvider {
|
|
811
|
+
currentLocalIpAddress(): string;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
declare class BrowserLocalIpProvider implements LocalIpProvider {
|
|
815
|
+
private currentIp;
|
|
816
|
+
constructor();
|
|
817
|
+
ready(): boolean;
|
|
818
|
+
currentLocalIpAddress(): string;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
declare class FixedLocalIpProvider implements LocalIpProvider {
|
|
822
|
+
private fixed;
|
|
823
|
+
constructor(fixed: string);
|
|
824
|
+
currentLocalIpAddress(): string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
declare class NetworkRatchet {
|
|
828
|
+
private static LOCAL_IP;
|
|
829
|
+
static findLocalIp(useCache?: boolean): Promise<string>;
|
|
830
|
+
static parseUrl(href: string): ParsedUrl;
|
|
831
|
+
private static updateLocalIP;
|
|
832
|
+
private static grepSDP;
|
|
833
|
+
private static updateAddressList;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
declare class RestfulApiHttpError<T = void> extends Error {
|
|
837
|
+
private static readonly RATCHET_RESTFUL_API_HTTP_ERROR_FLAG_KEY;
|
|
838
|
+
private _httpStatusCode;
|
|
839
|
+
private _errors;
|
|
840
|
+
private _detailErrorCode;
|
|
841
|
+
private _endUserErrors;
|
|
842
|
+
private _details;
|
|
843
|
+
private _requestId;
|
|
844
|
+
private _wrappedError;
|
|
845
|
+
constructor(...errors: string[]);
|
|
846
|
+
static combineErrorStringsWithDefault(errors: string[], defMessage?: string): string;
|
|
847
|
+
setFormattedErrorMessage(format: string, ...input: any[]): void;
|
|
848
|
+
withFormattedErrorMessage(format: string, ...input: any[]): RestfulApiHttpError<T>;
|
|
849
|
+
withHttpStatusCode(httpStatusCode: number): RestfulApiHttpError<T>;
|
|
850
|
+
withErrors(errors: string[]): RestfulApiHttpError<T>;
|
|
851
|
+
withDetailErrorCode(detailErrorCode: number): RestfulApiHttpError<T>;
|
|
852
|
+
withEndUserErrors(endUserErrors: string[]): RestfulApiHttpError<T>;
|
|
853
|
+
withDetails(details: T): RestfulApiHttpError<T>;
|
|
854
|
+
withRequestId(requestId: string): RestfulApiHttpError<T>;
|
|
855
|
+
withWrappedError(err: Error): RestfulApiHttpError<T>;
|
|
856
|
+
isWrappedError(): boolean;
|
|
857
|
+
static wrapError<T = void>(err: Error): RestfulApiHttpError<T>;
|
|
858
|
+
static objectIsRestfulApiHttpError(obj: any): boolean;
|
|
859
|
+
get httpStatusCode(): number;
|
|
860
|
+
get errors(): string[];
|
|
861
|
+
get detailErrorCode(): number;
|
|
862
|
+
get endUserErrors(): string[];
|
|
863
|
+
get details(): T;
|
|
864
|
+
get requestId(): string;
|
|
865
|
+
get wrappedError(): Error;
|
|
866
|
+
set httpStatusCode(value: number);
|
|
867
|
+
set errors(value: string[]);
|
|
868
|
+
set detailErrorCode(value: number);
|
|
869
|
+
set endUserErrors(value: string[]);
|
|
870
|
+
set details(value: T);
|
|
871
|
+
set requestId(value: string);
|
|
872
|
+
set wrappedError(value: Error);
|
|
873
|
+
static errorIsX0x(errIn: Error, xClass: number): boolean;
|
|
874
|
+
static errorIs40x(err: Error): boolean;
|
|
875
|
+
static errorIs50x(err: Error): boolean;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
declare class GoogleRecaptchaRatchet {
|
|
879
|
+
private static readonly GOOGLE_VERIFY_URL;
|
|
880
|
+
static verifyRecaptchaToken(keySecret: string, token: string, fetchFn?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>): Promise<boolean>;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
declare class TwilioRatchet {
|
|
884
|
+
private accountSid;
|
|
885
|
+
private authToken;
|
|
886
|
+
private outBoundNumber;
|
|
887
|
+
static readonly TWILLIO_BASE_API_URL: string;
|
|
888
|
+
constructor(accountSid: string, authToken: string, outBoundNumber: string);
|
|
889
|
+
static sendMessageDirect(accountSid: string, authToken: string, outBoundNumber: string, recipientPhoneNumbers: string[], message: string): Promise<any[]>;
|
|
890
|
+
static generateTwilioBasicAuth(sid: string, authToken: string): string;
|
|
891
|
+
sendMessage(recipientPhoneNumbers: string[], message: string): Promise<any[]>;
|
|
892
|
+
static isValidE164Number(num: string): boolean;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
declare class TwilioVerifyRatchet {
|
|
896
|
+
private accountSid;
|
|
897
|
+
private authToken;
|
|
898
|
+
private serviceSid;
|
|
899
|
+
static readonly TWILLIO_BASE_VERIFY_URL: string;
|
|
900
|
+
constructor(accountSid: string, authToken: string, serviceSid: string);
|
|
901
|
+
sendVerificationTokenUsingTwilioVerify(recipientPhoneNumber: string): Promise<string>;
|
|
902
|
+
simpleCheckVerificationTokenUsingTwilioVerify(recipientPhoneNumber: string, code: string): Promise<boolean>;
|
|
903
|
+
checkVerificationTokenUsingTwilioVerify(recipientPhoneNumber: string, code: string): Promise<TwilioVerifyCheckResponse>;
|
|
904
|
+
}
|
|
905
|
+
interface TwilioVerifyCheckResponse {
|
|
906
|
+
status: string;
|
|
907
|
+
payee: string;
|
|
908
|
+
date_updated: string;
|
|
909
|
+
account_sid: string;
|
|
910
|
+
to: string;
|
|
911
|
+
amount: string;
|
|
912
|
+
valid: boolean;
|
|
913
|
+
sid: string;
|
|
914
|
+
date_created: string;
|
|
915
|
+
service_sid: string;
|
|
916
|
+
channel: string;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
interface TransformRule {
|
|
920
|
+
transform(value: any, isKey: boolean, context: any): any;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
declare class BuiltInTransforms {
|
|
924
|
+
static keysOnly(rule: TransformRule): TransformRule;
|
|
925
|
+
static valuesOnly(rule: TransformRule): TransformRule;
|
|
926
|
+
static stringReplaceTransform(input: string, output: string): TransformRule;
|
|
927
|
+
static stripStringTransform(input: string): TransformRule;
|
|
928
|
+
static retainAll(input: string[]): TransformRule;
|
|
929
|
+
static removeAll(input: string[]): TransformRule;
|
|
930
|
+
static snakeToCamelCase(): TransformRule;
|
|
931
|
+
static stringToNumber(): TransformRule;
|
|
932
|
+
static camelToSnakeCase(): TransformRule;
|
|
933
|
+
static concatenateToNewField(newFieldName: string, oldFieldNamesInOrder: string[], abortIfFieldMissing?: boolean): TransformRule;
|
|
934
|
+
static numberToBool(fieldNames: string[]): TransformRule;
|
|
935
|
+
static boolToNumber(fieldNames: string[]): TransformRule;
|
|
936
|
+
static makeDuplicateField(oldName: string, newName: string): TransformRule;
|
|
937
|
+
static addField(name: string, valueToAdd: string): TransformRule;
|
|
938
|
+
static reformatDateFields(fieldNames: string[], oldFormat: string, newFormat: string): TransformRule;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
declare class TransformRatchet {
|
|
942
|
+
static transform(toTransform: any, rules?: TransformRule[]): any;
|
|
943
|
+
private static transformGeneric;
|
|
944
|
+
private static applyTransformToObject;
|
|
945
|
+
private static applyTransformToPrimitive;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare const TransactionFinalState: {
|
|
949
|
+
Success: string;
|
|
950
|
+
RolledBack: string;
|
|
951
|
+
RollbackFailed: string;
|
|
952
|
+
};
|
|
953
|
+
type TransactionFinalState = (typeof TransactionFinalState)[keyof typeof TransactionFinalState];
|
|
954
|
+
|
|
955
|
+
interface TransactionResult<T> {
|
|
956
|
+
finalContext: T;
|
|
957
|
+
finalState: TransactionFinalState;
|
|
958
|
+
error?: any;
|
|
959
|
+
rollbackError?: any;
|
|
960
|
+
errorStep?: number;
|
|
961
|
+
rollbackErrorStep?: number;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
interface TransactionConfiguration<T> {
|
|
965
|
+
stepLogLevel?: LoggerLevelName;
|
|
966
|
+
executeAfterRollback?(result: TransactionResult<T>): Promise<void>;
|
|
967
|
+
executeAfterRollbackFailure?(result: TransactionResult<T>): Promise<void>;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
interface TransactionStep<T> {
|
|
971
|
+
execute(context: T, stepNumber?: number): Promise<void>;
|
|
972
|
+
rollback?(context: T, stepNumber?: number): Promise<void>;
|
|
973
|
+
name?: string;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
declare class TransactionRatchet {
|
|
977
|
+
static execute<T>(steps: TransactionStep<T>[], initialContext: T, inConfiguration?: TransactionConfiguration<T>): Promise<TransactionResult<T>>;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export { type ArchiveEmailResult, ArrayRatchet, Base64Ratchet, BooleanRatchet, BrowserLocalIpProvider, type BuildInformation, BuiltInTransforms, ClassicSingleLineLogMessageFormatter, type CommonJwtToken, type ComparisonFunction, CompositeLastSuccessProvider, DateRatchet, DurationRatchet, type EmailAttachment, EnumRatchet, ErrorRatchet, EsmRatchet, ExpiredJwtHandling, ExpiringObject, ExpiringObjectConfig, FixedLocalIpProvider, GeolocationRatchet, GlobalRatchet, GoogleRecaptchaRatchet, Histogram, type HistogramEntry, JwtRatchet, type JwtRatchetLike, type JwtTokenBase, KeyValue, type LastSuccessProvider, type Line2d, type LocalIpProvider, type LogMessage, LogMessageBuilder, LogMessageFormatType, type LogMessageFormatter, type LogMessageProcessor, type LogSnapshot, Logger, LoggerInstance, LoggerLevelName, type LoggerMeta, type LoggerOptions, LoggerOutputFunction, LoggerRingBuffer, LoggerUtil, type MailSendingProvider, Mailer, type MailerConfig, type MailerLike, MailerUtil, MapRatchet, type MatchReport, NetworkRatchet, No, NoneLogMessageFormatter, type NumberRange, NumberRatchet, type ParsedUrl, type Plane2d, type Point2d, type PolyLine2d, PromiseRatchet, Ratchet2d, type RatchetGeoLocation, RatchetInfo, type RatchetLocationBounds, type RatchetLocationBoundsMap, type RatchetLocationBoundsMapEntry, type RatchetTemplateRenderer, type ReadyToSendEmail, RequireRatchet, type ResolvedReadyToSendEmail, RestfulApiHttpError, type SafeNumberOptions, type SendEmailResult, type SinglesAndRanges, SortRatchet, StopWatch, StringRatchet, StructuredJsonLogMessageFormatter, TestMailSendingProvider, TimeZoneRatchet, TimeoutToken, type TransactionConfiguration, TransactionFinalState, TransactionRatchet, type TransactionResult, type TransactionStep, TransformRatchet, type TransformRule, TwilioRatchet, type TwilioVerifyCheckResponse, TwilioVerifyRatchet, Uint8ArrayRatchet, WebStreamRatchet };
|