@bitblit/ratchet-aws 4.0.164-alpha → 4.0.183-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.
Files changed (103) hide show
  1. package/lib/index.mjs +1 -1
  2. package/package.json +12 -24
  3. package/lib/batch/aws-batch-background-processor.d.ts +0 -8
  4. package/lib/batch/aws-batch-background-processor.spec.d.ts +0 -1
  5. package/lib/batch/aws-batch-ratchet.d.ts +0 -13
  6. package/lib/batch/aws-batch-ratchet.spec.d.ts +0 -1
  7. package/lib/build/ratchet-aws-info.d.ts +0 -5
  8. package/lib/cache/dynamo-db-storage-provider.d.ts +0 -25
  9. package/lib/cache/s3-storage-provider.d.ts +0 -14
  10. package/lib/cache/simple-cache-object-wrapper.d.ts +0 -7
  11. package/lib/cache/simple-cache-read-options.d.ts +0 -5
  12. package/lib/cache/simple-cache-storage-provider.d.ts +0 -8
  13. package/lib/cache/simple-cache.d.ts +0 -14
  14. package/lib/cache/simple-cache.spec.d.ts +0 -1
  15. package/lib/cloudwatch/cloud-watch-log-group-ratchet.d.ts +0 -10
  16. package/lib/cloudwatch/cloud-watch-log-group-ratchet.spec.d.ts +0 -1
  17. package/lib/cloudwatch/cloud-watch-logs-ratchet.d.ts +0 -15
  18. package/lib/cloudwatch/cloud-watch-logs-ratchet.spec.d.ts +0 -1
  19. package/lib/cloudwatch/cloud-watch-metrics-ratchet.d.ts +0 -11
  20. package/lib/cloudwatch/cloud-watch-metrics-ratchet.spec.d.ts +0 -1
  21. package/lib/daemon/daemon-like.d.ts +0 -17
  22. package/lib/daemon/daemon-process-create-options.d.ts +0 -7
  23. package/lib/daemon/daemon-process-state-public-token.d.ts +0 -4
  24. package/lib/daemon/daemon-process-state.d.ts +0 -13
  25. package/lib/daemon/daemon-stream-data-options.d.ts +0 -3
  26. package/lib/daemon/daemon-util.d.ts +0 -19
  27. package/lib/daemon/daemon-util.spec.d.ts +0 -4
  28. package/lib/daemon/daemon.d.ts +0 -33
  29. package/lib/dao/prototype-dao-config.d.ts +0 -8
  30. package/lib/dao/prototype-dao-db.d.ts +0 -4
  31. package/lib/dao/prototype-dao-provider.d.ts +0 -5
  32. package/lib/dao/prototype-dao.d.ts +0 -15
  33. package/lib/dao/prototype-dao.spec.d.ts +0 -8
  34. package/lib/dao/s3-prototype-dao-provider.d.ts +0 -10
  35. package/lib/dao/s3-simple-dao.d.ts +0 -15
  36. package/lib/dao/simple-dao-item.d.ts +0 -5
  37. package/lib/dynamodb/dynamo-ratchet-like.d.ts +0 -27
  38. package/lib/dynamodb/dynamo-ratchet.d.ts +0 -37
  39. package/lib/dynamodb/dynamo-ratchet.spec.d.ts +0 -1
  40. package/lib/dynamodb/dynamo-table-ratchet.d.ts +0 -13
  41. package/lib/dynamodb/dynamo-table-ratchet.spec.d.ts +0 -1
  42. package/lib/dynamodb/hash-spreader.d.ts +0 -15
  43. package/lib/dynamodb/hash-spreader.spec.d.ts +0 -1
  44. package/lib/ec2/ec2-ratchet.d.ts +0 -16
  45. package/lib/ec2/ec2-ratchet.spec.d.ts +0 -1
  46. package/lib/environment/cascade-environment-service-provider.d.ts +0 -6
  47. package/lib/environment/env-var-environment-service-provider.d.ts +0 -6
  48. package/lib/environment/environment-service-config.d.ts +0 -4
  49. package/lib/environment/environment-service-provider.d.ts +0 -3
  50. package/lib/environment/environment-service.d.ts +0 -11
  51. package/lib/environment/environment-service.spec.d.ts +0 -1
  52. package/lib/environment/fixed-environment-service-provider.d.ts +0 -7
  53. package/lib/environment/s3-environment-service-provider.d.ts +0 -15
  54. package/lib/environment/ssm-environment-service-provider.d.ts +0 -8
  55. package/lib/expiring-code/dynamo-expiring-code-provider.d.ts +0 -12
  56. package/lib/expiring-code/expiring-code-params.d.ts +0 -7
  57. package/lib/expiring-code/expiring-code-provider.d.ts +0 -5
  58. package/lib/expiring-code/expiring-code-ratchet.d.ts +0 -10
  59. package/lib/expiring-code/expiring-code-ratchet.spec.d.ts +0 -1
  60. package/lib/expiring-code/expiring-code.d.ts +0 -6
  61. package/lib/expiring-code/s3-expiring-code-provider.d.ts +0 -17
  62. package/lib/expiring-code/s3-expiring-code-provider.spec.d.ts +0 -1
  63. package/lib/iam/aws-credentials-ratchet.d.ts +0 -4
  64. package/lib/lambda/lambda-event-detector.d.ts +0 -14
  65. package/lib/lambda/lambda-event-type-guards.d.ts +0 -10
  66. package/lib/model/cloud-watch-metrics-minute-level-dynamo-count-request.d.ts +0 -12
  67. package/lib/model/cloud-watch-metrics-unit.d.ts +0 -29
  68. package/lib/model/dynamo/doc-put-item-command-input.d.ts +0 -4
  69. package/lib/model/dynamo/doc-query-command-input.d.ts +0 -5
  70. package/lib/model/dynamo/doc-scan-command-input.d.ts +0 -5
  71. package/lib/model/dynamo/doc-update-item-command-input.d.ts +0 -5
  72. package/lib/model/dynamo-count-result.d.ts +0 -5
  73. package/lib/route53/route-53-ratchet.d.ts +0 -8
  74. package/lib/runtime-parameter/cached-stored-runtime-parameter.d.ts +0 -4
  75. package/lib/runtime-parameter/dynamo-runtime-parameter-provider.d.ts +0 -11
  76. package/lib/runtime-parameter/dynamo-runtime-parameter-provider.spec.d.ts +0 -1
  77. package/lib/runtime-parameter/global-variable-override-runtime-parameter-provider.d.ts +0 -17
  78. package/lib/runtime-parameter/global-variable-override-runtime-parameter-provider.spec.d.ts +0 -1
  79. package/lib/runtime-parameter/memory-runtime-parameter-provider.d.ts +0 -9
  80. package/lib/runtime-parameter/runtime-parameter-provider.d.ts +0 -6
  81. package/lib/runtime-parameter/runtime-parameter-ratchet.d.ts +0 -15
  82. package/lib/runtime-parameter/runtime-parameter-ratchet.spec.d.ts +0 -1
  83. package/lib/runtime-parameter/stored-runtime-parameter.d.ts +0 -6
  84. package/lib/s3/expanded-file-children.d.ts +0 -5
  85. package/lib/s3/s3-cache-ratchet-like.d.ts +0 -26
  86. package/lib/s3/s3-cache-ratchet.d.ts +0 -34
  87. package/lib/s3/s3-cache-ratchet.spec.d.ts +0 -1
  88. package/lib/s3/s3-location-sync-ratchet.d.ts +0 -21
  89. package/lib/s3/s3-ratchet.d.ts +0 -5
  90. package/lib/s3/s3-ratchet.spec.d.ts +0 -1
  91. package/lib/ses/email-attachment.d.ts +0 -5
  92. package/lib/ses/mailer-config.d.ts +0 -12
  93. package/lib/ses/mailer-like.d.ts +0 -11
  94. package/lib/ses/mailer.d.ts +0 -20
  95. package/lib/ses/mailer.spec.d.ts +0 -1
  96. package/lib/ses/ready-to-send-email.d.ts +0 -13
  97. package/lib/ses/resolved-ready-to-send-email.d.ts +0 -5
  98. package/lib/sns/sns-ratchet.d.ts +0 -9
  99. package/lib/sns/sns-ratchet.spec.d.ts +0 -1
  100. package/lib/sync-lock/dynamo-db-sync-lock.d.ts +0 -10
  101. package/lib/sync-lock/dynamo-db-sync-lock.spec.d.ts +0 -1
  102. package/lib/sync-lock/memory-sync-lock.d.ts +0 -8
  103. package/lib/sync-lock/sync-lock-provider.d.ts +0 -5
@@ -1,15 +0,0 @@
1
- import { CloudWatchLogsClient, GetQueryResultsCommandOutput, LogGroup, LogStream, StartQueryCommandInput, StopQueryCommandOutput } from '@aws-sdk/client-cloudwatch-logs';
2
- export declare class CloudWatchLogsRatchet {
3
- private static readonly MAX_DELETE_RETRIES;
4
- private cwLogs;
5
- constructor(cloudwatchLogs?: CloudWatchLogsClient);
6
- get cloudWatchLogsClient(): CloudWatchLogsClient;
7
- removeEmptyOrOldLogStreams(logGroupName: string, maxToRemove?: number, oldestEventEpochMS?: number): Promise<LogStream[]>;
8
- findOldestEventTimestampInGroup(logGroupName: string): Promise<number>;
9
- findStreamWithOldestEventInGroup(logGroupName: string): Promise<LogStream>;
10
- findLogGroups(prefix: string): Promise<LogGroup[]>;
11
- removeLogGroups(groups: LogGroup[]): Promise<boolean[]>;
12
- removeLogGroupsWithPrefix(prefix: string): Promise<boolean[]>;
13
- fullyExecuteInsightsQuery(sqr: StartQueryCommandInput): Promise<GetQueryResultsCommandOutput>;
14
- abortInsightsQuery(queryId: string): Promise<StopQueryCommandOutput>;
15
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { CloudWatchClient } from '@aws-sdk/client-cloudwatch';
2
- import { KeyValue } from '@bitblit/ratchet-common';
3
- import { CloudWatchMetricsUnit } from '../model/cloud-watch-metrics-unit.js';
4
- import { CloudWatchMetricsMinuteLevelDynamoCountRequest } from '../model/cloud-watch-metrics-minute-level-dynamo-count-request.js';
5
- export declare class CloudWatchMetricsRatchet {
6
- private cw;
7
- constructor(cloudWatch?: CloudWatchClient);
8
- get cloudWatchClient(): CloudWatchClient;
9
- writeSingleMetric(namespace: string, metric: string, dims: KeyValue[], unit: CloudWatchMetricsUnit, value: number, timestampDate?: Date, highResolution?: boolean): Promise<any>;
10
- writeDynamoCountAsMinuteLevelMetric(req: CloudWatchMetricsMinuteLevelDynamoCountRequest): Promise<number>;
11
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { DaemonProcessState } from './daemon-process-state.js';
3
- import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
4
- export interface DaemonLike {
5
- get defaultGroup(): string;
6
- keyToPublicToken(key: string, expirationSeconds: number): Promise<string>;
7
- start(options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
8
- clean(group?: string, olderThanSeconds?: number): Promise<DaemonProcessState[]>;
9
- listKeys(group?: string): Promise<string[]>;
10
- list(group?: string): Promise<DaemonProcessState[]>;
11
- updateMessage(id: string, newMessage: string): Promise<DaemonProcessState>;
12
- statFromPublicToken(publicToken: string): Promise<DaemonProcessState>;
13
- stat(key: string): Promise<DaemonProcessState>;
14
- abort(id: string): Promise<DaemonProcessState>;
15
- error(id: string, error: string): Promise<DaemonProcessState>;
16
- finalize(id: string, contents: Buffer): Promise<DaemonProcessState>;
17
- }
@@ -1,7 +0,0 @@
1
- export interface DaemonProcessCreateOptions {
2
- title: string;
3
- contentType: string;
4
- group: string;
5
- meta: any;
6
- targetFileName: string;
7
- }
@@ -1,4 +0,0 @@
1
- import { JwtTokenBase } from '@bitblit/ratchet-common';
2
- export interface DaemonProcessStatePublicToken extends JwtTokenBase {
3
- daemonKey: string;
4
- }
@@ -1,13 +0,0 @@
1
- export interface DaemonProcessState {
2
- id: string;
3
- title: string;
4
- targetFileName: string;
5
- lastUpdatedEpochMS: number;
6
- lastUpdatedMessage: string;
7
- startedEpochMS: number;
8
- completedEpochMS: number;
9
- meta: any;
10
- error: string;
11
- link: string;
12
- contentType: string;
13
- }
@@ -1,3 +0,0 @@
1
- export interface DaemonStreamDataOptions {
2
- overrideTargetFileName?: string;
3
- }
@@ -1,19 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { DaemonProcessState } from './daemon-process-state.js';
4
- import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
5
- import { Readable } from 'stream';
6
- import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
7
- import { DaemonStreamDataOptions } from './daemon-stream-data-options.js';
8
- export declare class DaemonUtil {
9
- static DEFAULT_CONTENT: Buffer;
10
- static DAEMON_METADATA_KEY: string;
11
- static start(cache: S3CacheRatchetLike, id: string, s3Key: string, options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
12
- static writeState(cache: S3CacheRatchetLike, s3Key: string, newState: DaemonProcessState, contents: Buffer): Promise<DaemonProcessState>;
13
- static streamDataAndFinish(cache: S3CacheRatchetLike, s3Key: string, data: Readable, options?: DaemonStreamDataOptions): Promise<DaemonProcessState>;
14
- static updateMessage(cache: S3CacheRatchetLike, s3Key: string, newMessage: string): Promise<DaemonProcessState>;
15
- static stat(s3Cache: S3CacheRatchetLike, path: string): Promise<DaemonProcessState>;
16
- static abort(s3Cache: S3CacheRatchetLike, path: string): Promise<DaemonProcessState>;
17
- static error(s3Cache: S3CacheRatchetLike, path: string, error: string): Promise<DaemonProcessState>;
18
- static finalize(s3Cache: S3CacheRatchetLike, path: string, contents: Buffer): Promise<DaemonProcessState>;
19
- }
@@ -1,4 +0,0 @@
1
- export interface TestItem {
2
- a: number;
3
- b: string;
4
- }
@@ -1,33 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { JwtRatchetLike } from '@bitblit/ratchet-common';
3
- import { DaemonProcessState } from './daemon-process-state.js';
4
- import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
5
- import { DaemonLike } from './daemon-like.js';
6
- import { S3Client } from '@aws-sdk/client-s3';
7
- export declare class Daemon implements DaemonLike {
8
- private s3;
9
- private bucket;
10
- private prefix;
11
- private _defaultGroup;
12
- private jwtRatchet?;
13
- static DEFAULT_DEFAULT_GROUP: string;
14
- private cache;
15
- constructor(s3: S3Client, bucket: string, prefix?: string, _defaultGroup?: string, jwtRatchet?: JwtRatchetLike);
16
- get defaultGroup(): string;
17
- keyToPublicToken(key: string, expirationSeconds: number): Promise<string>;
18
- private keyToPath;
19
- private pathToKey;
20
- private generatePath;
21
- private generatePrefix;
22
- start(options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
23
- private writeState;
24
- clean(group?: string, olderThanSeconds?: number): Promise<DaemonProcessState[]>;
25
- listKeys(group?: string): Promise<string[]>;
26
- list(group?: string): Promise<DaemonProcessState[]>;
27
- updateMessage(id: string, newMessage: string): Promise<DaemonProcessState>;
28
- stat(key: string): Promise<DaemonProcessState>;
29
- statFromPublicToken(publicToken: string): Promise<DaemonProcessState>;
30
- abort(id: string): Promise<DaemonProcessState>;
31
- error(id: string, error: string): Promise<DaemonProcessState>;
32
- finalize(id: string, contents: Buffer): Promise<DaemonProcessState>;
33
- }
@@ -1,8 +0,0 @@
1
- export interface PrototypeDaoConfig {
2
- guidCreateFunction: () => string;
3
- guidFieldName: string;
4
- createdEpochMSFieldName?: string;
5
- updatedEpochMSFieldName?: string;
6
- createdUtcTimestampFieldName?: string;
7
- updatedUtcTimestampFieldName?: string;
8
- }
@@ -1,4 +0,0 @@
1
- export interface PrototypeDaoDb<T> {
2
- items: T[];
3
- lastModifiedEpochMS: number;
4
- }
@@ -1,5 +0,0 @@
1
- import { PrototypeDaoDb } from './prototype-dao-db.js';
2
- export interface PrototypeDaoProvider<T> {
3
- storeDatabase(db: PrototypeDaoDb<T>): Promise<boolean>;
4
- loadDatabase(): Promise<PrototypeDaoDb<T>>;
5
- }
@@ -1,15 +0,0 @@
1
- import { PrototypeDaoProvider } from './prototype-dao-provider.js';
2
- import { PrototypeDaoConfig } from './prototype-dao-config.js';
3
- export declare class PrototypeDao<T> {
4
- private provider;
5
- private cfg;
6
- static defaultDaoConfig(): PrototypeDaoConfig;
7
- constructor(provider: PrototypeDaoProvider<T>, cfg?: PrototypeDaoConfig);
8
- fetchAll(): Promise<T[]>;
9
- resetDatabase(): Promise<void>;
10
- removeItems(guids: string[]): Promise<T[]>;
11
- store(value: T): Promise<T>;
12
- fetchById(guid: string): Promise<T>;
13
- searchByField<R>(fieldDotPath: string, fieldValue: R): Promise<T[]>;
14
- searchByFieldMap(input: Record<string, any>): Promise<T[]>;
15
- }
@@ -1,8 +0,0 @@
1
- export interface TestPrototypeItem {
2
- fieldA: number;
3
- fieldB: string;
4
- type: string;
5
- createdEpochMS?: number;
6
- updatedEpochMS?: number;
7
- guid?: string;
8
- }
@@ -1,10 +0,0 @@
1
- import { PrototypeDaoProvider } from './prototype-dao-provider.js';
2
- import { PrototypeDaoDb } from './prototype-dao-db.js';
3
- import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
4
- export declare class S3PrototypeDaoProvider<T> implements PrototypeDaoProvider<T> {
5
- private s3CacheRatchet;
6
- private keyName;
7
- constructor(s3CacheRatchet: S3CacheRatchetLike, keyName: string);
8
- storeDatabase(inDb: PrototypeDaoDb<T>): Promise<boolean>;
9
- loadDatabase(): Promise<PrototypeDaoDb<T>>;
10
- }
@@ -1,15 +0,0 @@
1
- import { SimpleDaoItem } from './simple-dao-item.js';
2
- import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
3
- export declare class S3SimpleDao<T extends SimpleDaoItem> {
4
- private cache;
5
- private prefix?;
6
- constructor(cache: S3CacheRatchetLike, prefix?: string);
7
- buildPathPrefix(path: string): string;
8
- buildFullPath(id: string, path?: string): string;
9
- exists(id: string, path?: string): Promise<boolean>;
10
- fetch(id: string, path?: string): Promise<T>;
11
- store(item: T, path?: string): Promise<T>;
12
- listItems(path?: string): Promise<string[]>;
13
- fetchItemsInPath(path?: string): Promise<T[]>;
14
- delete(id: string, path?: string): Promise<boolean>;
15
- }
@@ -1,5 +0,0 @@
1
- export interface SimpleDaoItem {
2
- id: string;
3
- path: string;
4
- lastModifiedEpochMS: number;
5
- }
@@ -1,27 +0,0 @@
1
- import { DynamoCountResult } from '../model/dynamo-count-result.js';
2
- import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
3
- import { DeleteItemCommandOutput, PutItemOutput } from '@aws-sdk/client-dynamodb';
4
- import { DocQueryCommandInput } from '../model/dynamo/doc-query-command-input.js';
5
- import { DocScanCommandInput } from '../model/dynamo/doc-scan-command-input.js';
6
- export interface DynamoRatchetLike {
7
- getDDB(): DynamoDBDocumentClient;
8
- tableIsEmpty(tableName: string): Promise<boolean>;
9
- throughputSafeScanOrQuery<T, R>(proc: (T: any) => Promise<R>, input: T, maxTries?: number, inCurrentTry?: number): Promise<R>;
10
- fullyExecuteQueryCount(qry: DocQueryCommandInput, delayMS?: number): Promise<DynamoCountResult>;
11
- fullyExecuteQuery<T>(qry: DocQueryCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
12
- fullyExecuteProcessOverQuery<T>(qry: DocQueryCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
13
- fullyExecuteScanCount(scan: DocScanCommandInput, delayMS?: number): Promise<DynamoCountResult>;
14
- fullyExecuteScan<T>(scan: DocScanCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
15
- fullyExecuteProcessOverScan<T>(scan: DocScanCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
16
- writeAllInBatches<T>(tableName: string, elements: T[], batchSize: number): Promise<number>;
17
- fetchFullObjectsMatchingKeysOnlyIndexQuery<T>(qry: DocQueryCommandInput, keyNames: string[], batchSize?: number): Promise<T[]>;
18
- fetchAllInBatches<T>(tableName: string, inKeys: any[], batchSize: number): Promise<T[]>;
19
- deleteAllInBatches(tableName: string, keys: any[], batchSize: number): Promise<number>;
20
- simplePut(tableName: string, value: any, autoRetryCount?: number): Promise<PutItemOutput>;
21
- simplePutOnlyIfFieldIsNullOrUndefined(tableName: string, value: any, fieldName: string): Promise<boolean>;
22
- simplePutWithCollisionAvoidance<T>(tableName: string, value: T, keyNames: string[], adjustFunction: (val: T) => T, maxAdjusts?: number, autoRetryCount?: number): Promise<T>;
23
- simpleGet<T>(tableName: string, keys: any, autoRetryCount?: number): Promise<T>;
24
- simpleGetWithCounterDecrement<T>(tableName: string, keys: any, counterAttributeName: string, deleteOnZero: boolean, autoRetryCount?: number): Promise<T>;
25
- simpleDelete(tableName: string, keys: any): Promise<DeleteItemCommandOutput>;
26
- atomicCounter(tableName: string, keys: any, counterFieldName: string, increment?: number): Promise<number>;
27
- }
@@ -1,37 +0,0 @@
1
- import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
2
- import { DynamoCountResult } from '../model/dynamo-count-result.js';
3
- import { DynamoRatchetLike } from './dynamo-ratchet-like.js';
4
- import { DeleteItemCommandOutput, PutItemCommandOutput, QueryCommandOutput, ScanCommandOutput } from '@aws-sdk/client-dynamodb';
5
- import { DocScanCommandInput } from '../model/dynamo/doc-scan-command-input.js';
6
- import { DocQueryCommandInput } from '../model/dynamo/doc-query-command-input.js';
7
- export declare class DynamoRatchet implements DynamoRatchetLike {
8
- private awsDDB;
9
- constructor(awsDDB: DynamoDBDocumentClient);
10
- get dynamoDBDocumentClient(): DynamoDBDocumentClient;
11
- getDDB(): DynamoDBDocumentClient;
12
- tableIsEmpty(tableName: string): Promise<boolean>;
13
- scanPromise(input: DocScanCommandInput): Promise<ScanCommandOutput>;
14
- queryPromise(input: DocQueryCommandInput): Promise<QueryCommandOutput>;
15
- throughputSafeScanOrQuery<T, R>(proc: (T: any) => Promise<R>, input: T, maxTries?: number, inCurrentTry?: number): Promise<R>;
16
- fullyExecuteQueryCount(qry: DocQueryCommandInput, delayMS?: number): Promise<DynamoCountResult>;
17
- fullyExecuteQuery<T>(qry: DocQueryCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
18
- fullyExecuteProcessOverQuery<T>(qry: DocQueryCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
19
- fullyExecuteScanCount(scan: DocScanCommandInput, delayMS?: number): Promise<DynamoCountResult>;
20
- fullyExecuteScan<T>(scan: DocScanCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
21
- fullyExecuteProcessOverScan<T>(scan: DocScanCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
22
- writeAllInBatches<T>(tableName: string, elements: T[], batchSize: number): Promise<number>;
23
- fetchFullObjectsMatchingKeysOnlyIndexQuery<T>(qry: DocQueryCommandInput, keyNames: string[], batchSize?: number): Promise<T[]>;
24
- fetchAllInBatches<T>(tableName: string, inKeys: Record<string, any>[], batchSize: number): Promise<T[]>;
25
- deleteAllInBatches(tableName: string, keys: Record<string, any>[], batchSize: number): Promise<number>;
26
- simplePut(tableName: string, value: Record<string, any>, autoRetryCount?: number): Promise<PutItemCommandOutput>;
27
- simplePutOnlyIfFieldIsNullOrUndefined(tableName: string, value: Record<string, any>, fieldName: string): Promise<boolean>;
28
- simplePutWithCollisionAvoidance<T>(tableName: string, value: T, keyNames: string[], adjustFunction: (val: T) => T, maxAdjusts?: number, autoRetryCount?: number): Promise<T>;
29
- simpleGet<T>(tableName: string, keys: Record<string, any>, autoRetryCount?: number): Promise<T>;
30
- static objectIsErrorWithProvisionedThroughputExceededExceptionCode(err: Record<string, any>): boolean;
31
- simpleGetWithCounterDecrement<T>(tableName: string, keys: Record<string, any>, counterAttributeName: string, deleteOnZero: boolean, autoRetryCount?: number): Promise<T>;
32
- simpleDelete(tableName: string, keys: Record<string, any>): Promise<DeleteItemCommandOutput>;
33
- atomicCounter(tableName: string, keys: Record<string, any>, counterFieldName: string, increment?: number): Promise<number>;
34
- static cleanObject(ob: Record<string, any>): void;
35
- static stripToKeysOnly(input: Record<string, any>, keysNames: string[]): Record<string, any>;
36
- static stripAllToKeysOnly(input: Record<string, any>[], keys: string[]): Record<string, any>[];
37
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- import { CreateTableCommandInput, CreateTableCommandOutput, DeleteTableCommandOutput, DescribeTableCommandOutput, DynamoDBClient } from '@aws-sdk/client-dynamodb';
2
- export declare class DynamoTableRatchet {
3
- private awsDDB;
4
- constructor(awsDDB: DynamoDBClient);
5
- deleteTable(tableName: string, waitForDelete?: boolean): Promise<DeleteTableCommandOutput>;
6
- createTable(input: CreateTableCommandInput, waitForReady?: boolean, replaceIfExists?: boolean): Promise<CreateTableCommandOutput>;
7
- waitForTableReady(tableName: string): Promise<boolean>;
8
- waitForTableDelete(tableName: string): Promise<void>;
9
- tableExists(tableName: string): Promise<boolean>;
10
- listAllTables(): Promise<string[]>;
11
- safeDescribeTable(tableName: string): Promise<DescribeTableCommandOutput>;
12
- copyTable(srcTableName: string, dstTableName: string, overrides?: CreateTableCommandInput, copyData?: boolean): Promise<CreateTableCommandOutput>;
13
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- export declare class HashSpreader {
2
- private spots;
3
- private buckets;
4
- private separator;
5
- private alphabet;
6
- private _allSlots;
7
- constructor(spots?: number, buckets?: number, separator?: string, alphabet?: string);
8
- get allBuckets(): string[];
9
- get randomBucket(): string;
10
- allSpreadValues(input: string): string[];
11
- allSpreadValuesForArray(inputs: string[]): string[];
12
- addSpreader(input: string): string;
13
- extractBucket(input: string): string;
14
- removeBucket(input: string): string;
15
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import { EC2Client, Instance } from '@aws-sdk/client-ec2';
2
- import { EC2InstanceConnectClient, SendSSHPublicKeyCommandOutput } from '@aws-sdk/client-ec2-instance-connect';
3
- export declare class Ec2Ratchet {
4
- private region;
5
- private availabilityZone;
6
- private ec2;
7
- private ec2InstanceConnect;
8
- constructor(region?: string, availabilityZone?: string);
9
- get eC2Client(): EC2Client;
10
- get eC2InstanceConnectClient(): EC2InstanceConnectClient;
11
- stopInstance(instanceId: string, maxWaitForShutdownMS?: number): Promise<boolean>;
12
- launchInstance(instanceId: string, maxWaitForStartupMS?: number): Promise<boolean>;
13
- describeInstance(instanceId: string): Promise<Instance>;
14
- listAllInstances(instanceIds?: string[]): Promise<Instance[]>;
15
- sendPublicKeyToEc2Instance(instanceId: string, publicKeyString: string, instanceOsUser?: string): Promise<SendSSHPublicKeyCommandOutput>;
16
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- export declare class CascadeEnvironmentServiceProvider<T> implements EnvironmentServiceProvider<T> {
3
- private providers;
4
- constructor(providers: EnvironmentServiceProvider<T>[]);
5
- fetchConfig(name: string): Promise<T>;
6
- }
@@ -1,6 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- export declare class EnvVarEnvironmentServiceProvider<T> implements EnvironmentServiceProvider<T> {
3
- private envVarName;
4
- constructor(envVarName: string);
5
- fetchConfig(): Promise<T>;
6
- }
@@ -1,4 +0,0 @@
1
- export interface EnvironmentServiceConfig {
2
- maxRetries: number;
3
- backoffMultiplierMS: number;
4
- }
@@ -1,3 +0,0 @@
1
- export interface EnvironmentServiceProvider<T> {
2
- fetchConfig(name: string): Promise<T>;
3
- }
@@ -1,11 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- import { EnvironmentServiceConfig } from './environment-service-config.js';
3
- export declare class EnvironmentService<T> {
4
- private provider;
5
- private cfg;
6
- private readPromiseCache;
7
- static defaultEnvironmentServiceConfig(): EnvironmentServiceConfig;
8
- constructor(provider: EnvironmentServiceProvider<T>, cfg?: EnvironmentServiceConfig);
9
- getConfig(name: string): Promise<T>;
10
- private getConfigUncached;
11
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- export declare class FixedEnvironmentServiceProvider<T> implements EnvironmentServiceProvider<T> {
3
- private value;
4
- constructor(value: Map<string, T>);
5
- static fromRecord<T>(record: Record<string, T>): FixedEnvironmentServiceProvider<T>;
6
- fetchConfig(name: string): Promise<T>;
7
- }
@@ -1,15 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- import { S3Client } from '@aws-sdk/client-s3';
3
- export declare class S3EnvironmentServiceProvider<T> implements EnvironmentServiceProvider<T> {
4
- private cfg;
5
- private ratchet;
6
- constructor(cfg: S3EnvironmentServiceProviderConfig);
7
- fetchConfig(name: string): Promise<T>;
8
- }
9
- export interface S3EnvironmentServiceProviderConfig {
10
- s3Override?: S3Client;
11
- bucketName: string;
12
- region?: string;
13
- pathPrefix?: string;
14
- pathSuffix?: string;
15
- }
@@ -1,8 +0,0 @@
1
- import { EnvironmentServiceProvider } from './environment-service-provider.js';
2
- export declare class SsmEnvironmentServiceProvider<T> implements EnvironmentServiceProvider<T> {
3
- private region;
4
- private ssmEncrypted;
5
- private ssm;
6
- constructor(region?: string, ssmEncrypted?: boolean);
7
- fetchConfig(name: string): Promise<T>;
8
- }
@@ -1,12 +0,0 @@
1
- import { ExpiringCodeProvider } from './expiring-code-provider.js';
2
- import { DynamoRatchet } from '../dynamodb/dynamo-ratchet.js';
3
- import { ExpiringCode } from './expiring-code.js';
4
- import { DynamoTableRatchet } from '../dynamodb/dynamo-table-ratchet.js';
5
- export declare class DynamoExpiringCodeProvider implements ExpiringCodeProvider {
6
- private tableName;
7
- private dynamoRatchet;
8
- constructor(tableName: string, dynamoRatchet: DynamoRatchet);
9
- checkCode(code: string, context: string, deleteOnMatch?: boolean): Promise<boolean>;
10
- storeCode(code: ExpiringCode): Promise<boolean>;
11
- createTableIfMissing(dtr: DynamoTableRatchet): Promise<any>;
12
- }
@@ -1,7 +0,0 @@
1
- export interface ExpiringCodeParams {
2
- context: string;
3
- timeToLiveSeconds: number;
4
- tags?: string[];
5
- length: number;
6
- alphabet: string;
7
- }
@@ -1,5 +0,0 @@
1
- import { ExpiringCode } from './expiring-code.js';
2
- export interface ExpiringCodeProvider {
3
- storeCode(code: ExpiringCode): Promise<boolean>;
4
- checkCode(code: string, context: string, deleteOnMatch?: boolean): Promise<boolean>;
5
- }
@@ -1,10 +0,0 @@
1
- import { ExpiringCodeProvider } from './expiring-code-provider.js';
2
- import { ExpiringCodeParams } from './expiring-code-params.js';
3
- import { ExpiringCode } from './expiring-code.js';
4
- export declare class ExpiringCodeRatchet {
5
- private provider;
6
- constructor(provider: ExpiringCodeProvider);
7
- static generateCode(params: ExpiringCodeParams): ExpiringCode;
8
- createNewCode(params: ExpiringCodeParams): Promise<ExpiringCode>;
9
- checkCode(code: string, context: string, deleteOnMatch?: boolean): Promise<boolean>;
10
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export interface ExpiringCode {
2
- code: string;
3
- context: string;
4
- expiresEpochMS: number;
5
- tags?: string[];
6
- }
@@ -1,17 +0,0 @@
1
- import { ExpiringCodeProvider } from './expiring-code-provider.js';
2
- import { ExpiringCode } from './expiring-code.js';
3
- import { PutObjectOutput } from '@aws-sdk/client-s3';
4
- import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
5
- export declare class S3ExpiringCodeProvider implements ExpiringCodeProvider {
6
- private s3CacheRatchet;
7
- private keyName;
8
- constructor(s3CacheRatchet: S3CacheRatchetLike, keyName: string);
9
- fetchFile(): Promise<S3ExpiringCodeProviderFileWrapper>;
10
- updateFile(vals: ExpiringCode[]): Promise<PutObjectOutput>;
11
- checkCode(code: string, context: string, deleteOnMatch?: boolean): Promise<boolean>;
12
- storeCode(code: ExpiringCode): Promise<boolean>;
13
- }
14
- export interface S3ExpiringCodeProviderFileWrapper {
15
- data: ExpiringCode[];
16
- lastModifiedEpochMS: number;
17
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export declare class AwsCredentialsRatchet {
2
- private constructor();
3
- static applySetProfileEnvironmentalVariable(newProfile: string): void;
4
- }
@@ -1,14 +0,0 @@
1
- export declare class LambdaEventDetector {
2
- static isValidCronEvent(event: any): boolean;
3
- static isValidSnsEvent(event: any): boolean;
4
- static isValidDynamoDBEvent(event: any): boolean;
5
- static isValidS3Event(event: any): boolean;
6
- static isValidApiGatewayV2WithRequestContextEvent(event: any): boolean;
7
- static isValidApiGatewayEvent(event: any): boolean;
8
- static isValidApiGatewayAuthorizerEvent(event: any): boolean;
9
- static isSingleCronEvent(event: any): boolean;
10
- static isSingleSnsEvent(event: any): boolean;
11
- static isSingleDynamoDBEvent(event: any): boolean;
12
- static isSingleS3Event(event: any): boolean;
13
- static isSingleEntryEvent(event: any, entryName?: string): boolean;
14
- }
@@ -1,10 +0,0 @@
1
- import { APIGatewayEvent, APIGatewayProxyEventV2, DynamoDBStreamEvent, S3Event, ScheduledEvent, SNSEvent } from 'aws-lambda';
2
- export declare class LambdaEventTypeGuards {
3
- static isValidCronEvent(event: any): event is ScheduledEvent;
4
- static isValidSnsEvent(event: any): event is SNSEvent;
5
- static isValidDynamoDBEvent(event: any): event is DynamoDBStreamEvent;
6
- static isValidS3Event(event: any): event is S3Event;
7
- static isValidApiGatewayV2WithRequestContextEvent(event: any): event is APIGatewayProxyEventV2;
8
- static isValidApiGatewayEvent(event: any): event is APIGatewayEvent;
9
- static isValidApiGatewayAuthorizerEvent(event: any): boolean;
10
- }
@@ -1,12 +0,0 @@
1
- import { KeyValue } from '@bitblit/ratchet-common';
2
- import { DynamoRatchet } from '../dynamodb/dynamo-ratchet.js';
3
- import { QueryInput, ScanCommandInput } from '@aws-sdk/client-dynamodb';
4
- export interface CloudWatchMetricsMinuteLevelDynamoCountRequest {
5
- dynamoRatchet: DynamoRatchet;
6
- query: QueryInput;
7
- scan: ScanCommandInput;
8
- minuteUTC: string;
9
- namespace: string;
10
- metric: string;
11
- dims: KeyValue[];
12
- }
@@ -1,29 +0,0 @@
1
- export declare enum CloudWatchMetricsUnit {
2
- Seconds = "Seconds",
3
- Microseconds = "Microseconds",
4
- Milliseconds = "Milliseconds",
5
- Bytes = "Bytes",
6
- Kilobytes = "Kilobytes",
7
- Megabytes = "Megabytes",
8
- Gigabytes = "Gigabytes",
9
- Terabytes = "Terabytes",
10
- Bits = "Bits",
11
- Kilobits = "Kilobits",
12
- Megabits = "Megabits",
13
- Gigabits = "Gigabits",
14
- Terabits = "Terabits",
15
- Percent = "Percent",
16
- Count = "Count",
17
- BytesPerSecond = "Bytes/Second",
18
- KilobytesPerSecond = "Kilobytes/Second",
19
- MegabytesPerSecond = "Megabytes/Second",
20
- GigabytesPerSecond = "Gigabytes/Second",
21
- TerabytesPerSecond = "Terabytes/Second",
22
- BitsPerSecond = "Terabytes/Second",
23
- KilobitsPerSecond = "Kilobits/Second",
24
- MegabitsPerSecond = "Megabits/Second",
25
- GigabitsPerSecond = "Gigabits/Second",
26
- TerabitsPerSecond = "Terabits/Second",
27
- CountPerSecond = "Count/Second",
28
- None = "None"
29
- }
@@ -1,4 +0,0 @@
1
- import { PutItemCommandInput } from '@aws-sdk/client-dynamodb';
2
- export interface DocPutItemCommandInput extends PutItemCommandInput {
3
- Item: Record<string, any>;
4
- }
@@ -1,5 +0,0 @@
1
- import { QueryCommandInput } from '@aws-sdk/client-dynamodb';
2
- export interface DocQueryCommandInput extends QueryCommandInput {
3
- ExpressionAttributeValues?: Record<string, any>;
4
- ExpressionAttributeNames?: Record<string, any>;
5
- }
@@ -1,5 +0,0 @@
1
- import { ScanCommandInput } from '@aws-sdk/client-dynamodb';
2
- export interface DocScanCommandInput extends ScanCommandInput {
3
- ExpressionAttributeValues?: Record<string, any>;
4
- ExpressionAttributeNames?: Record<string, any>;
5
- }