@bitblit/ratchet-common 4.0.183-alpha → 4.0.184-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/2d/line-2d.d.ts +5 -0
- package/lib/2d/plane-2d.d.ts +6 -0
- package/lib/2d/point-2d.d.ts +4 -0
- package/lib/2d/poly-line-2d.d.ts +4 -0
- package/lib/2d/ratchet-2d.d.ts +37 -0
- package/lib/2d/ratchet-2d.spec.d.ts +1 -0
- package/lib/build/build-information.d.ts +8 -0
- package/lib/build/ratchet-common-info.d.ts +5 -0
- package/lib/histogram/histogram-entry.d.ts +4 -0
- package/lib/histogram/histogram.d.ts +12 -0
- package/lib/histogram/histogram.spec.d.ts +1 -0
- package/lib/index.mjs +1 -1
- package/lib/jwt/common-jwt-token.d.ts +6 -0
- package/lib/jwt/expired-jwt-handling.d.ts +5 -0
- package/lib/jwt/jwt-ratchet-like.d.ts +15 -0
- package/lib/jwt/jwt-ratchet.d.ts +30 -0
- package/lib/jwt/jwt-ratchet.spec.d.ts +1 -0
- package/lib/jwt/jwt-token-base.d.ts +9 -0
- package/lib/lang/array-ratchet.d.ts +14 -0
- package/lib/lang/array-ratchet.spec.d.ts +1 -0
- package/lib/lang/base64-ratchet.d.ts +10 -0
- package/lib/lang/base64-ratchet.spec.d.ts +1 -0
- package/lib/lang/boolean-ratchet.d.ts +7 -0
- package/lib/lang/boolean-ratchet.spec.d.ts +1 -0
- package/lib/lang/composite-last-success-provider.d.ts +7 -0
- package/lib/lang/composite-last-success-provider.spec.d.ts +1 -0
- package/lib/lang/date-ratchet.d.ts +11 -0
- package/lib/lang/date-ratchet.spec.d.ts +1 -0
- package/lib/lang/duration-ratchet.d.ts +7 -0
- package/lib/lang/duration-ratchet.spec.d.ts +1 -0
- package/lib/lang/enum-ratchet.d.ts +5 -0
- package/lib/lang/enum-ratchet.spec.d.ts +5 -0
- package/lib/lang/error-ratchet.d.ts +6 -0
- package/lib/lang/error-ratchet.spec.d.ts +1 -0
- package/lib/lang/esm-ratchet.d.ts +4 -0
- package/lib/lang/expiring-object.d.ts +20 -0
- package/lib/lang/expiring-object.spec.d.ts +1 -0
- package/lib/lang/geolocation-ratchet.d.ts +40 -0
- package/lib/lang/geolocation-ratchet.spec.d.ts +1 -0
- package/lib/lang/global-ratchet.d.ts +6 -0
- package/lib/lang/global-ratchet.spec.d.ts +1 -0
- package/lib/lang/key-value.d.ts +4 -0
- package/lib/lang/last-success-provider.d.ts +3 -0
- package/lib/lang/map-ratchet.d.ts +15 -0
- package/lib/lang/map-ratchet.spec.d.ts +1 -0
- package/lib/lang/no.d.ts +3 -0
- package/lib/lang/no.spec.d.ts +1 -0
- package/lib/lang/number-ratchet.d.ts +20 -0
- package/lib/lang/number-ratchet.spec.d.ts +1 -0
- package/lib/lang/parsed-url.d.ts +10 -0
- package/lib/lang/promise-ratchet.d.ts +18 -0
- package/lib/lang/promise-ratchet.spec.d.ts +1 -0
- package/lib/lang/require-ratchet.d.ts +11 -0
- package/lib/lang/require-ratchet.spec.d.ts +3 -0
- package/lib/lang/stop-watch.d.ts +17 -0
- package/lib/lang/string-ratchet.d.ts +28 -0
- package/lib/lang/string-ratchet.spec.d.ts +1 -0
- package/lib/lang/time-zone-ratchet.d.ts +19 -0
- package/lib/lang/time-zone-ratchet.spec.d.ts +1 -0
- package/lib/lang/timeout-token.d.ts +9 -0
- package/lib/lang/timeout-token.spec.d.ts +1 -0
- package/lib/logger/classic-single-line-log-message-formatter.d.ts +6 -0
- package/lib/logger/log-message-builder.d.ts +14 -0
- package/lib/logger/log-message-format-type.d.ts +5 -0
- package/lib/logger/log-message-formatter.d.ts +5 -0
- package/lib/logger/log-message-processor.d.ts +5 -0
- package/lib/logger/log-message.d.ts +8 -0
- package/lib/logger/log-snapshot.d.ts +5 -0
- package/lib/logger/logger-instance.d.ts +46 -0
- package/lib/logger/logger-level-name.d.ts +8 -0
- package/lib/logger/logger-meta.d.ts +6 -0
- package/lib/logger/logger-options.d.ts +13 -0
- package/lib/logger/logger-output-function.d.ts +5 -0
- package/lib/logger/logger-ring-buffer.d.ts +18 -0
- package/lib/logger/logger-util.d.ts +8 -0
- package/lib/logger/logger-util.spec.d.ts +1 -0
- package/lib/logger/logger.d.ts +43 -0
- package/lib/logger/logger.spec.d.ts +1 -0
- package/lib/logger/none-log-message-formatter.d.ts +6 -0
- package/lib/logger/structured-json-log-message-formatter.d.ts +6 -0
- package/lib/network/browser-local-ip-provider.d.ts +7 -0
- package/lib/network/browser-local-ip-provider.spec.d.ts +1 -0
- package/lib/network/fixed-local-ip-provider.d.ts +6 -0
- package/lib/network/local-ip-provider.d.ts +3 -0
- package/lib/network/network-ratchet.d.ts +9 -0
- package/lib/network/network-ratchet.spec.d.ts +1 -0
- package/lib/stream/buffer-writable.d.ts +9 -0
- package/lib/stream/multi-stream.d.ts +7 -0
- package/lib/stream/stream-ratchet.d.ts +12 -0
- package/lib/stream/stream-ratchet.spec.d.ts +1 -0
- package/lib/stream/string-writable.d.ts +8 -0
- package/lib/stream/string-writable.spec.d.ts +1 -0
- package/lib/template/ratchet-template-renderer.d.ts +4 -0
- package/lib/third-party/google/google-recaptcha-ratchet.d.ts +4 -0
- package/lib/third-party/google/google-recaptcha-ratchet.spec.d.ts +1 -0
- package/lib/third-party/twilio/twilio-ratchet.d.ts +11 -0
- package/lib/transform/built-in-transforms.d.ts +18 -0
- package/lib/transform/transform-ratchet.d.ts +7 -0
- package/lib/transform/transform-ratchet.spec.d.ts +1 -0
- package/lib/transform/transform-rule.d.ts +3 -0
- package/lib/tx/transaction-configuration.d.ts +7 -0
- package/lib/tx/transaction-final-state.d.ts +5 -0
- package/lib/tx/transaction-ratchet.d.ts +6 -0
- package/lib/tx/transaction-ratchet.spec.d.ts +1 -0
- package/lib/tx/transaction-result.d.ts +9 -0
- package/lib/tx/transaction-step.d.ts +5 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class TwilioRatchet {
|
|
2
|
+
private accountSid;
|
|
3
|
+
private authToken;
|
|
4
|
+
private outBoundNumber;
|
|
5
|
+
static readonly TWILLIO_BASE_API_URL: string;
|
|
6
|
+
constructor(accountSid: string, authToken: string, outBoundNumber: string);
|
|
7
|
+
static sendMessageDirect(accountSid: string, authToken: string, outBoundNumber: string, recipientPhoneNumbers: string[], message: string): Promise<any[]>;
|
|
8
|
+
static generateTwilioBasicAuth(sid: string, authToken: string): string;
|
|
9
|
+
sendMessage(recipientPhoneNumbers: string[], message: string): Promise<any[]>;
|
|
10
|
+
static isValidE164Number(num: string): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TransformRule } from './transform-rule.js';
|
|
2
|
+
export declare class BuiltInTransforms {
|
|
3
|
+
static keysOnly(rule: TransformRule): TransformRule;
|
|
4
|
+
static valuesOnly(rule: TransformRule): TransformRule;
|
|
5
|
+
static stringReplaceTransform(input: string, output: string): TransformRule;
|
|
6
|
+
static stripStringTransform(input: string): TransformRule;
|
|
7
|
+
static retainAll(input: string[]): TransformRule;
|
|
8
|
+
static removeAll(input: string[]): TransformRule;
|
|
9
|
+
static snakeToCamelCase(): TransformRule;
|
|
10
|
+
static stringToNumber(): TransformRule;
|
|
11
|
+
static camelToSnakeCase(): TransformRule;
|
|
12
|
+
static concatenateToNewField(newFieldName: string, oldFieldNamesInOrder: string[], abortIfFieldMissing?: boolean): TransformRule;
|
|
13
|
+
static numberToBool(fieldNames: string[]): TransformRule;
|
|
14
|
+
static boolToNumber(fieldNames: string[]): TransformRule;
|
|
15
|
+
static makeDuplicateField(oldName: string, newName: string): TransformRule;
|
|
16
|
+
static addField(name: string, valueToAdd: string): TransformRule;
|
|
17
|
+
static reformatDateFields(fieldNames: string[], oldFormat: string, newFormat: string): TransformRule;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformRule } from './transform-rule.js';
|
|
2
|
+
export declare class TransformRatchet {
|
|
3
|
+
static transform(toTransform: any, rules?: TransformRule[]): any;
|
|
4
|
+
private static transformGeneric;
|
|
5
|
+
private static applyTransformToObject;
|
|
6
|
+
private static applyTransformToPrimitive;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransactionResult } from './transaction-result.js';
|
|
2
|
+
import { LoggerLevelName } from '../logger/logger-level-name.js';
|
|
3
|
+
export interface TransactionConfiguration<T> {
|
|
4
|
+
stepLogLevel?: LoggerLevelName;
|
|
5
|
+
executeAfterRollback?(result: TransactionResult<T>): Promise<void>;
|
|
6
|
+
executeAfterRollbackFailure?(result: TransactionResult<T>): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransactionStep } from './transaction-step.js';
|
|
2
|
+
import { TransactionResult } from './transaction-result.js';
|
|
3
|
+
import { TransactionConfiguration } from './transaction-configuration.js';
|
|
4
|
+
export declare class TransactionRatchet {
|
|
5
|
+
static execute<T>(steps: TransactionStep<T>[], initialContext: T, inConfiguration?: TransactionConfiguration<T>): Promise<TransactionResult<T>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitblit/ratchet-common",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.184-alpha",
|
|
4
4
|
"description": "Common tools for general use",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
|
-
"lib
|
|
8
|
-
"bin
|
|
7
|
+
"lib/**",
|
|
8
|
+
"bin/**"
|
|
9
9
|
],
|
|
10
10
|
"module": "./lib/index.mjs",
|
|
11
11
|
"types": "./lib/index.d.ts",
|