@bitblit/ratchet-epsilon-common 4.0.354-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.
Files changed (160) hide show
  1. package/lib/index.mjs +1 -1
  2. package/lib/types.d.ts +1200 -0
  3. package/package.json +11 -11
  4. package/lib/background/background-dynamo-log-table-handler.d.ts +0 -11
  5. package/lib/background/background-entry.d.ts +0 -4
  6. package/lib/background/background-execution-event-type.d.ts +0 -8
  7. package/lib/background/background-execution-event.d.ts +0 -8
  8. package/lib/background/background-execution-listener.d.ts +0 -5
  9. package/lib/background/background-handler.d.ts +0 -29
  10. package/lib/background/background-http-adapter-handler.d.ts +0 -22
  11. package/lib/background/background-meta-response-internal.d.ts +0 -5
  12. package/lib/background/background-process-handling.d.ts +0 -5
  13. package/lib/background/background-process-log-table-entry.d.ts +0 -11
  14. package/lib/background/background-queue-response-internal.d.ts +0 -8
  15. package/lib/background/background-validator.d.ts +0 -17
  16. package/lib/background/epsilon-background-process-error.d.ts +0 -30
  17. package/lib/background/internal-background-entry.d.ts +0 -8
  18. package/lib/background/manager/abstract-background-manager.d.ts +0 -19
  19. package/lib/background/manager/aws-large-payload-s3-sqs-sns-background-manager.d.ts +0 -19
  20. package/lib/background/manager/aws-sqs-sns-background-manager.d.ts +0 -23
  21. package/lib/background/manager/background-manager-like.d.ts +0 -18
  22. package/lib/background/manager/background-manager.spec.d.ts +0 -1
  23. package/lib/background/manager/single-thread-local-background-manager.d.ts +0 -15
  24. package/lib/background/s3-background-transaction-logger.d.ts +0 -17
  25. package/lib/build/ratchet-epsilon-common-info.d.ts +0 -5
  26. package/lib/built-in/background/echo-processor.d.ts +0 -7
  27. package/lib/built-in/background/log-and-enqueue-echo-processor.d.ts +0 -6
  28. package/lib/built-in/background/log-message-background-error-processor.d.ts +0 -5
  29. package/lib/built-in/background/no-op-processor.d.ts +0 -6
  30. package/lib/built-in/background/retry-processor.d.ts +0 -16
  31. package/lib/built-in/background/sample-delay-processor.d.ts +0 -6
  32. package/lib/built-in/background/sample-input-validated-processor-data.d.ts +0 -4
  33. package/lib/built-in/background/sample-input-validated-processor.d.ts +0 -8
  34. package/lib/built-in/built-in-trace-id-generators.d.ts +0 -5
  35. package/lib/built-in/daemon/daemon-authorizer-function.d.ts +0 -5
  36. package/lib/built-in/daemon/daemon-config.d.ts +0 -8
  37. package/lib/built-in/daemon/daemon-group-selection-function.d.ts +0 -4
  38. package/lib/built-in/daemon/daemon-handler.d.ts +0 -16
  39. package/lib/built-in/daemon/daemon-process-state-list.d.ts +0 -5
  40. package/lib/built-in/http/apollo/apollo-util.d.ts +0 -10
  41. package/lib/built-in/http/apollo/default-epsilon-apollo-context.d.ts +0 -10
  42. package/lib/built-in/http/apollo/epsilon-apollo-cors-method.d.ts +0 -6
  43. package/lib/built-in/http/apollo/epsilon-lambda-apollo-context-function-argument.d.ts +0 -5
  44. package/lib/built-in/http/apollo/epsilon-lambda-apollo-options.d.ts +0 -10
  45. package/lib/built-in/http/apollo-filter.d.ts +0 -10
  46. package/lib/built-in/http/built-in-auth-filters.d.ts +0 -9
  47. package/lib/built-in/http/built-in-authorizers.d.ts +0 -8
  48. package/lib/built-in/http/built-in-filters.d.ts +0 -26
  49. package/lib/built-in/http/built-in-filters.spec.d.ts +0 -1
  50. package/lib/built-in/http/built-in-handlers.d.ts +0 -9
  51. package/lib/built-in/http/log-level-manipulation-filter.d.ts +0 -6
  52. package/lib/built-in/http/run-handler-as-filter.d.ts +0 -12
  53. package/lib/built-in/http/run-handler-as-filter.spec.d.ts +0 -1
  54. package/lib/cli/ratchet-cli-handler.d.ts +0 -6
  55. package/lib/cli/run-background-process-from-command-line.d.ts +0 -3
  56. package/lib/config/background/background-aws-config.d.ts +0 -7
  57. package/lib/config/background/background-config.d.ts +0 -14
  58. package/lib/config/background/background-error-processor.d.ts +0 -4
  59. package/lib/config/background/background-processor.d.ts +0 -6
  60. package/lib/config/background/background-transaction-log.d.ts +0 -8
  61. package/lib/config/background/background-transaction-logger.d.ts +0 -5
  62. package/lib/config/cron/abstract-cron-entry.d.ts +0 -12
  63. package/lib/config/cron/cron-background-entry.d.ts +0 -6
  64. package/lib/config/cron/cron-config.d.ts +0 -6
  65. package/lib/config/dynamo-db-config.d.ts +0 -5
  66. package/lib/config/epsilon-config.d.ts +0 -24
  67. package/lib/config/epsilon-lambda-event-handler.d.ts +0 -7
  68. package/lib/config/epsilon-logger-config.d.ts +0 -13
  69. package/lib/config/generic-aws-event-handler-function.d.ts +0 -3
  70. package/lib/config/http/authorizer-function.d.ts +0 -6
  71. package/lib/config/http/epsilon-authorization-context.d.ts +0 -5
  72. package/lib/config/http/extended-api-gateway-event.d.ts +0 -7
  73. package/lib/config/http/filter-chain-context.d.ts +0 -14
  74. package/lib/config/http/filter-function.d.ts +0 -4
  75. package/lib/config/http/handler-function.d.ts +0 -5
  76. package/lib/config/http/http-config.d.ts +0 -15
  77. package/lib/config/http/http-processing-config.d.ts +0 -11
  78. package/lib/config/http/mapped-http-processing-config.d.ts +0 -7
  79. package/lib/config/http/null-returned-object-handling.d.ts +0 -6
  80. package/lib/config/inter-api/inter-api-aws-config.d.ts +0 -5
  81. package/lib/config/inter-api/inter-api-config.d.ts +0 -6
  82. package/lib/config/inter-api/inter-api-process-mapping.d.ts +0 -6
  83. package/lib/config/logging-trace-id-generator.d.ts +0 -4
  84. package/lib/config/no-handlers-found-error.d.ts +0 -3
  85. package/lib/config/open-api/open-api-document-components.d.ts +0 -4
  86. package/lib/config/open-api/open-api-document-path.d.ts +0 -2
  87. package/lib/config/open-api/open-api-document.d.ts +0 -6
  88. package/lib/config/s3-config.d.ts +0 -6
  89. package/lib/config/sns-config.d.ts +0 -5
  90. package/lib/config/sqs-config.d.ts +0 -5
  91. package/lib/epsilon-build-properties.d.ts +0 -9
  92. package/lib/epsilon-constants.d.ts +0 -16
  93. package/lib/epsilon-global-handler.d.ts +0 -20
  94. package/lib/epsilon-instance.d.ts +0 -14
  95. package/lib/epsilon-logging-extension-processor.d.ts +0 -6
  96. package/lib/http/auth/api-gateway-adapter-authentication-handler.d.ts +0 -8
  97. package/lib/http/auth/auth0-web-token-manipulator.d.ts +0 -13
  98. package/lib/http/auth/basic-auth-token.d.ts +0 -4
  99. package/lib/http/auth/google-web-token-manipulator.d.ts +0 -14
  100. package/lib/http/auth/google-web-token-manipulator.spec.d.ts +0 -1
  101. package/lib/http/auth/jwt-ratchet-local-web-token-manipulator.d.ts +0 -11
  102. package/lib/http/auth/local-web-token-manipulator.d.ts +0 -19
  103. package/lib/http/auth/local-web-token-manipulator.spec.d.ts +0 -1
  104. package/lib/http/auth/web-token-manipulator.d.ts +0 -4
  105. package/lib/http/error/bad-gateway.d.ts +0 -5
  106. package/lib/http/error/bad-request-error.d.ts +0 -5
  107. package/lib/http/error/conflict-error.d.ts +0 -5
  108. package/lib/http/error/forbidden-error.d.ts +0 -5
  109. package/lib/http/error/gateway-timeout.d.ts +0 -5
  110. package/lib/http/error/method-not-allowed-error.d.ts +0 -5
  111. package/lib/http/error/misconfigured-error.d.ts +0 -5
  112. package/lib/http/error/not-found-error.d.ts +0 -5
  113. package/lib/http/error/not-implemented.d.ts +0 -5
  114. package/lib/http/error/request-timeout-error.d.ts +0 -5
  115. package/lib/http/error/service-unavailable.d.ts +0 -5
  116. package/lib/http/error/too-many-requests-error.d.ts +0 -5
  117. package/lib/http/error/unauthorized-error.d.ts +0 -5
  118. package/lib/http/event-util.d.ts +0 -27
  119. package/lib/http/event-util.spec.d.ts +0 -1
  120. package/lib/http/response-util.d.ts +0 -11
  121. package/lib/http/response-util.spec.d.ts +0 -1
  122. package/lib/http/route/epsilon-router.d.ts +0 -8
  123. package/lib/http/route/extended-auth-response-context.d.ts +0 -6
  124. package/lib/http/route/route-mapping.d.ts +0 -12
  125. package/lib/http/route/route-validator-config.d.ts +0 -5
  126. package/lib/http/route/router-util.d.ts +0 -23
  127. package/lib/http/route/router-util.spec.d.ts +0 -1
  128. package/lib/http/web-handler.d.ts +0 -23
  129. package/lib/http/web-handler.spec.d.ts +0 -1
  130. package/lib/http/web-v2-handler.d.ts +0 -10
  131. package/lib/index.d.ts +0 -140
  132. package/lib/index.mjs.map +0 -1
  133. package/lib/inter-api/inter-api-entry.d.ts +0 -7
  134. package/lib/inter-api/inter-api-util.d.ts +0 -10
  135. package/lib/inter-api/inter-api-util.spec.d.ts +0 -1
  136. package/lib/inter-api-manager.d.ts +0 -14
  137. package/lib/lambda-event-handler/cron-epsilon-lambda-event-handler.d.ts +0 -14
  138. package/lib/lambda-event-handler/cron-epsilon-lambda-event-handler.spec.d.ts +0 -1
  139. package/lib/lambda-event-handler/dynamo-epsilon-lambda-event-handler.d.ts +0 -11
  140. package/lib/lambda-event-handler/generic-sns-epsilon-lambda-event-handler.d.ts +0 -10
  141. package/lib/lambda-event-handler/generic-sqs-epsilon-lambda-event-handler.d.ts +0 -11
  142. package/lib/lambda-event-handler/inter-api-epsilon-lambda-event-handler.d.ts +0 -10
  143. package/lib/lambda-event-handler/s3-epsilon-lambda-event-handler.d.ts +0 -10
  144. package/lib/local-container-server.d.ts +0 -12
  145. package/lib/local-server-cert.d.ts +0 -5
  146. package/lib/local-server.d.ts +0 -22
  147. package/lib/local-server.spec.d.ts +0 -1
  148. package/lib/open-api-util/open-api-doc-modifications.d.ts +0 -8
  149. package/lib/open-api-util/open-api-doc-modifier.d.ts +0 -7
  150. package/lib/open-api-util/open-api-doc-modifier.spec.d.ts +0 -1
  151. package/lib/open-api-util/yaml-combiner.d.ts +0 -3
  152. package/lib/open-api-util/yaml-combiner.spec.d.ts +0 -1
  153. package/lib/sample/sample-server-components.d.ts +0 -10
  154. package/lib/sample/sample-server-static-files.d.ts +0 -5
  155. package/lib/sample/test-error-server.d.ts +0 -11
  156. package/lib/util/aws-util.d.ts +0 -8
  157. package/lib/util/context-util.d.ts +0 -34
  158. package/lib/util/cron-util.d.ts +0 -11
  159. package/lib/util/cron-util.spec.d.ts +0 -1
  160. package/lib/util/epsilon-config-parser.d.ts +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitblit/ratchet-epsilon-common",
3
- "version": "4.0.354-alpha",
3
+ "version": "4.0.355-alpha",
4
4
  "description": "Tiny adapter to simplify building API gateway Lambda APIS",
5
5
  "sideEffects": false,
6
6
  "bin": {
@@ -8,14 +8,14 @@
8
8
  },
9
9
  "type": "module",
10
10
  "module": "./lib/index.mjs",
11
- "types": "./lib/index.d.ts",
11
+ "types": "./lib/types.d.ts",
12
12
  "files": [
13
13
  "lib/**",
14
14
  "bin/**"
15
15
  ],
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./lib/index.d.ts",
18
+ "types": "./lib/types.d.ts",
19
19
  "import": "./lib/index.mjs"
20
20
  }
21
21
  },
@@ -67,10 +67,10 @@
67
67
  "@aws-sdk/client-sns": "3.572.0",
68
68
  "@aws-sdk/client-sqs": "3.572.0",
69
69
  "@aws-sdk/types": "3.567.0",
70
- "@bitblit/ratchet-aws": "4.0.354-alpha",
71
- "@bitblit/ratchet-common": "4.0.354-alpha",
72
- "@bitblit/ratchet-misc": "4.0.354-alpha",
73
- "@bitblit/ratchet-node-only": "4.0.354-alpha",
70
+ "@bitblit/ratchet-aws": "4.0.355-alpha",
71
+ "@bitblit/ratchet-common": "4.0.355-alpha",
72
+ "@bitblit/ratchet-misc": "4.0.355-alpha",
73
+ "@bitblit/ratchet-node-only": "4.0.355-alpha",
74
74
  "@smithy/abort-controller": "2.2.0",
75
75
  "@smithy/smithy-client": "2.5.1",
76
76
  "@smithy/util-waiter": "2.2.0",
@@ -88,10 +88,10 @@
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@apollo/server": "^4.10.4",
91
- "@bitblit/ratchet-aws": "4.0.354-alpha",
92
- "@bitblit/ratchet-common": "4.0.354-alpha",
93
- "@bitblit/ratchet-misc": "4.0.354-alpha",
94
- "@bitblit/ratchet-node-only": "4.0.354-alpha",
91
+ "@bitblit/ratchet-aws": "4.0.355-alpha",
92
+ "@bitblit/ratchet-common": "4.0.355-alpha",
93
+ "@bitblit/ratchet-misc": "4.0.355-alpha",
94
+ "@bitblit/ratchet-node-only": "4.0.355-alpha",
95
95
  "graphql": "^16.8.1"
96
96
  },
97
97
  "peerDependenciesMeta": {
@@ -1,11 +0,0 @@
1
- import { BackgroundExecutionListener } from './background-execution-listener.js';
2
- import { BackgroundExecutionEvent } from './background-execution-event.js';
3
- import { DynamoRatchetLike } from '@bitblit/ratchet-aws';
4
- export declare class BackgroundDynamoLogTableHandler<T> implements BackgroundExecutionListener<T> {
5
- private dynamo;
6
- private tableName;
7
- private env;
8
- private backgroundQueueName;
9
- constructor(dynamo: DynamoRatchetLike, tableName: string, env: string, backgroundQueueName: string);
10
- onEvent(event: BackgroundExecutionEvent<T>): Promise<void>;
11
- }
@@ -1,4 +0,0 @@
1
- export interface BackgroundEntry<T> {
2
- type: string;
3
- data: T;
4
- }
@@ -1,8 +0,0 @@
1
- export declare const BackgroundExecutionEventType: {
2
- ProcessStarting: string;
3
- DataValidationError: string;
4
- ExecutionSuccessfullyComplete: string;
5
- ExecutionFailedError: string;
6
- NoMatchProcessorName: string;
7
- };
8
- export type BackgroundExecutionEventType = (typeof BackgroundExecutionEventType)[keyof typeof BackgroundExecutionEventType];
@@ -1,8 +0,0 @@
1
- import { BackgroundExecutionEventType } from './background-execution-event-type.js';
2
- export interface BackgroundExecutionEvent<T> {
3
- type: BackgroundExecutionEventType;
4
- guid: string;
5
- processorType: string;
6
- data: T;
7
- errors?: string[];
8
- }
@@ -1,5 +0,0 @@
1
- import { BackgroundExecutionEvent } from './background-execution-event.js';
2
- export interface BackgroundExecutionListener<T> {
3
- label?: string;
4
- onEvent(event: BackgroundExecutionEvent<T>): Promise<void>;
5
- }
@@ -1,29 +0,0 @@
1
- import { Context, ProxyResult, SNSEvent } from 'aws-lambda';
2
- import { ModelValidator } from '@bitblit/ratchet-misc';
3
- import { BackgroundConfig } from '../config/background/background-config.js';
4
- import { InternalBackgroundEntry } from './internal-background-entry.js';
5
- import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
6
- import { BackgroundManagerLike } from './manager/background-manager-like.js';
7
- export declare class BackgroundHandler implements EpsilonLambdaEventHandler<SNSEvent> {
8
- private cfg;
9
- private mgr;
10
- private modelValidator?;
11
- private processors;
12
- private validator;
13
- constructor(cfg: BackgroundConfig, mgr: BackgroundManagerLike, modelValidator?: ModelValidator);
14
- extractLabel(evt: SNSEvent, context: Context): string;
15
- handlesEvent(evt: any): boolean;
16
- isBackgroundSNSEvent(event: any): boolean;
17
- isBackgroundStartSnsEvent(event: any): boolean;
18
- isBackgroundImmediateFireEvent(event: any): boolean;
19
- parseImmediateFireBackgroundEntry(event: any): InternalBackgroundEntry<any>;
20
- processEvent(event: any, context: Context): Promise<ProxyResult>;
21
- private takeAndProcessSingleBackgroundQueueEntry;
22
- private safeWriteToLogger;
23
- private conditionallyStartTransactionLog;
24
- private conditionallyCompleteTransactionLog;
25
- private conditionallyRunErrorProcessor;
26
- private fireListenerEvent;
27
- processSingleBackgroundEntry(inE: InternalBackgroundEntry<any>): Promise<boolean>;
28
- getConfig(): BackgroundConfig;
29
- }
@@ -1,22 +0,0 @@
1
- import { Context } from 'aws-lambda';
2
- import { ExtendedAPIGatewayEvent } from '../config/http/extended-api-gateway-event.js';
3
- import { BackgroundQueueResponseInternal } from './background-queue-response-internal.js';
4
- import { BackgroundConfig } from '../config/background/background-config.js';
5
- import { ModelValidator } from '@bitblit/ratchet-misc';
6
- import { BackgroundMetaResponseInternal } from './background-meta-response-internal.js';
7
- import { BackgroundTransactionLog } from '../config/background/background-transaction-log.js';
8
- import { BackgroundManagerLike } from './manager/background-manager-like.js';
9
- export declare class BackgroundHttpAdapterHandler {
10
- private backgroundConfig;
11
- private modelValidator;
12
- private backgroundManager;
13
- private maxWaitInMsForBackgroundJobToStart;
14
- constructor(backgroundConfig: BackgroundConfig, modelValidator: ModelValidator, backgroundManager: BackgroundManagerLike, maxWaitInMsForBackgroundJobToStart?: number);
15
- get httpMetaEndpoint(): string;
16
- get httpSubmissionPath(): string;
17
- get httpStatusPath(): string;
18
- get implyTypeFromPathSuffix(): boolean;
19
- handleBackgroundStatusRequest(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundTransactionLog>;
20
- handleBackgroundMetaRequest(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundMetaResponseInternal>;
21
- handleBackgroundSubmission(evt: ExtendedAPIGatewayEvent, context: Context): Promise<BackgroundQueueResponseInternal>;
22
- }
@@ -1,5 +0,0 @@
1
- export interface BackgroundMetaResponseInternal {
2
- backgroundManagerName: string;
3
- currentQueueLength: number;
4
- validTypes: string[];
5
- }
@@ -1,5 +0,0 @@
1
- export declare const BackgroundProcessHandling: {
2
- Queued: string;
3
- Immediate: string;
4
- };
5
- export type BackgroundProcessHandling = (typeof BackgroundProcessHandling)[keyof typeof BackgroundProcessHandling];
@@ -1,11 +0,0 @@
1
- export interface BackgroundProcessLogTableEntry {
2
- env: string;
3
- backgroundQueueName: string;
4
- requestId: string;
5
- guid: string;
6
- processTypeName: string;
7
- state: string;
8
- timestampEpochMs: number;
9
- errors?: string[];
10
- params?: any;
11
- }
@@ -1,8 +0,0 @@
1
- import { BackgroundProcessHandling } from './background-process-handling.js';
2
- export interface BackgroundQueueResponseInternal {
3
- processHandling: BackgroundProcessHandling;
4
- startProcessorRequested: boolean;
5
- success: boolean;
6
- resultId: string;
7
- error: string;
8
- }
@@ -1,17 +0,0 @@
1
- import { ModelValidator } from '@bitblit/ratchet-misc';
2
- import { BackgroundConfig } from '../config/background/background-config.js';
3
- import { BackgroundEntry } from './background-entry.js';
4
- import { BackgroundProcessor } from '../config/background/background-processor.js';
5
- import { BackgroundAwsConfig } from '../config/background/background-aws-config.js';
6
- export declare class BackgroundValidator {
7
- private cfg;
8
- private modelValidator;
9
- constructor(cfg: BackgroundConfig, modelValidator: ModelValidator);
10
- findProcessor(typeName: string): BackgroundProcessor<any>;
11
- validType(type: string): boolean;
12
- validateEntry<T>(entry: BackgroundEntry<T>): string[];
13
- validateEntryAndThrowException<T>(entry: BackgroundEntry<T>): void;
14
- static validateAndMapProcessors(processorInput: BackgroundProcessor<any>[], modelValidator: ModelValidator): Map<string, BackgroundProcessor<any>>;
15
- static validateAwsConfig(cfg: BackgroundAwsConfig): string[];
16
- static validateConfig(cfg: BackgroundConfig): string[];
17
- }
@@ -1,30 +0,0 @@
1
- export declare class EpsilonBackgroundProcessError<T = void> extends Error {
2
- private static readonly EPSILON_BACKGROUND_PROCESS_ERROR_FLAG_KEY;
3
- private _errors;
4
- private _detailErrorCode;
5
- private _details;
6
- private _requestId;
7
- private _wrappedError;
8
- constructor(...errors: string[]);
9
- static combineErrorStringsWithDefault(errors: string[], defMessage?: string): string;
10
- setFormattedErrorMessage(format: string, ...input: any[]): void;
11
- withFormattedErrorMessage(format: string, ...input: any[]): EpsilonBackgroundProcessError<T>;
12
- withErrors(errors: string[]): EpsilonBackgroundProcessError<T>;
13
- withDetailErrorCode(detailErrorCode: number): EpsilonBackgroundProcessError<T>;
14
- withDetails(details: T): EpsilonBackgroundProcessError<T>;
15
- withRequestId(requestId: string): EpsilonBackgroundProcessError<T>;
16
- withWrappedError(err: Error): EpsilonBackgroundProcessError<T>;
17
- isWrappedError(): boolean;
18
- static wrapError<T = void>(err: Error): EpsilonBackgroundProcessError<T>;
19
- static objectIsEpsilonBackgroundProcessError(obj: any): boolean;
20
- set errors(value: string[]);
21
- get errors(): string[];
22
- set detailErrorCode(value: number);
23
- get detailErrorCode(): number;
24
- set details(value: T);
25
- get details(): T;
26
- set requestId(value: string);
27
- get requestId(): string;
28
- set wrappedError(value: Error);
29
- get wrappedError(): Error;
30
- }
@@ -1,8 +0,0 @@
1
- import { BackgroundEntry } from './background-entry.js';
2
- export interface InternalBackgroundEntry<T> extends BackgroundEntry<T> {
3
- guid: string;
4
- createdEpochMS: number;
5
- traceId: string;
6
- traceDepth: number;
7
- meta?: Record<string, string>;
8
- }
@@ -1,19 +0,0 @@
1
- import { BackgroundEntry } from '../background-entry.js';
2
- import { InternalBackgroundEntry } from '../internal-background-entry.js';
3
- import { BackgroundManagerLike } from './background-manager-like.js';
4
- export declare abstract class AbstractBackgroundManager implements BackgroundManagerLike {
5
- abstract addEntryToQueue<T>(entry: BackgroundEntry<T>, fireStartMessage?: boolean): Promise<string>;
6
- abstract fireImmediateProcessRequest<T>(entry: BackgroundEntry<T>): Promise<string>;
7
- abstract fireStartProcessingRequest(): Promise<string>;
8
- abstract fetchApproximateNumberOfQueueEntries(): Promise<number>;
9
- abstract get backgroundManagerName(): string;
10
- abstract takeEntryFromBackgroundQueue(): Promise<InternalBackgroundEntry<any>[]>;
11
- createEntry<T>(type: string, data?: T): BackgroundEntry<T>;
12
- wrapEntryForInternal<T>(entry: BackgroundEntry<T>, overrideTraceId?: string, overrideTraceDepth?: number): Promise<InternalBackgroundEntry<T>>;
13
- addEntryToQueueByParts<T>(type: string, data?: T, fireStartMessage?: boolean): Promise<string>;
14
- addEntriesToQueue(entries: BackgroundEntry<any>[], fireStartMessage?: boolean): Promise<string[]>;
15
- fireImmediateProcessRequestByParts<T>(type: string, data?: T): Promise<string>;
16
- static generateBackgroundGuid(targetEpochMS?: number): string;
17
- static backgroundGuidToPath(prefix: string, guid: string): string;
18
- static pathToBackgroundGuid(prefix: string, path: string): string;
19
- }
@@ -1,19 +0,0 @@
1
- import { SQSClient } from '@aws-sdk/client-sqs';
2
- import { BackgroundEntry } from '../background-entry';
3
- import { BackgroundAwsConfig } from '../../config/background/background-aws-config';
4
- import { InternalBackgroundEntry } from '../internal-background-entry';
5
- import { SNSClient } from '@aws-sdk/client-sns';
6
- import { AwsSqsSnsBackgroundManager } from './aws-sqs-sns-background-manager';
7
- import { S3CacheRatchetLike } from '@bitblit/ratchet-aws';
8
- export declare class AwsLargePayloadS3SqsSnsBackgroundManager extends AwsSqsSnsBackgroundManager {
9
- private _s3;
10
- private pathPrefix;
11
- private static readonly LARGE_MESSAGE_SIZE_THRESHOLD;
12
- private static readonly LARGE_MESSAGE_S3_PATH_META_KEY;
13
- constructor(_awsConfig: BackgroundAwsConfig, _sqs: SQSClient, _sns: SNSClient, _s3: S3CacheRatchetLike, pathPrefix?: string);
14
- get backgroundManagerName(): string;
15
- get s3(): S3CacheRatchetLike;
16
- wrapEntryForInternal<T>(entry: BackgroundEntry<T>, overrideTraceId?: string, overrideTraceDepth?: number): Promise<InternalBackgroundEntry<T>>;
17
- private writeMessageToS3;
18
- modify<T>(entry: InternalBackgroundEntry<T>): Promise<InternalBackgroundEntry<T>>;
19
- }
@@ -1,23 +0,0 @@
1
- import { GetQueueAttributesCommandOutput, SQSClient } from '@aws-sdk/client-sqs';
2
- import { BackgroundEntry } from '../background-entry.js';
3
- import { BackgroundAwsConfig } from '../../config/background/background-aws-config.js';
4
- import { InternalBackgroundEntry } from '../internal-background-entry.js';
5
- import { AbstractBackgroundManager } from './abstract-background-manager.js';
6
- import { SNSClient } from '@aws-sdk/client-sns';
7
- export declare class AwsSqsSnsBackgroundManager extends AbstractBackgroundManager {
8
- private _awsConfig;
9
- private _sqs;
10
- private _sns;
11
- constructor(_awsConfig: BackgroundAwsConfig, _sqs: SQSClient, _sns: SNSClient);
12
- get backgroundManagerName(): string;
13
- get awsConfig(): BackgroundAwsConfig;
14
- get sqs(): SQSClient;
15
- get sns(): SNSClient;
16
- addEntryToQueue<T>(entry: BackgroundEntry<T>, fireStartMessage?: boolean): Promise<string>;
17
- fireImmediateProcessRequest<T>(entry: BackgroundEntry<T>): Promise<string>;
18
- fireStartProcessingRequest(): Promise<string>;
19
- fetchApproximateNumberOfQueueEntries(): Promise<number>;
20
- fetchCurrentQueueAttributes(): Promise<GetQueueAttributesCommandOutput>;
21
- writeMessageToSnsTopic(message: string): Promise<string>;
22
- takeEntryFromBackgroundQueue(): Promise<InternalBackgroundEntry<any>[]>;
23
- }
@@ -1,18 +0,0 @@
1
- import { BackgroundEntry } from '../background-entry.js';
2
- import { InternalBackgroundEntry } from '../internal-background-entry.js';
3
- import { Subject } from 'rxjs';
4
- export interface BackgroundManagerLike {
5
- get backgroundManagerName(): string;
6
- immediateProcessQueue?(): Subject<InternalBackgroundEntry<any>>;
7
- createEntry<T>(type: string, data?: T): BackgroundEntry<T>;
8
- wrapEntryForInternal<T>(entry: BackgroundEntry<T>, overrideTraceId?: string, overrideTraceDepth?: number): Promise<InternalBackgroundEntry<T>>;
9
- addEntryToQueueByParts<T>(type: string, data?: T, fireStartMessage?: boolean): Promise<string>;
10
- addEntryToQueue<T>(entry: BackgroundEntry<T>, fireStartMessage?: boolean): Promise<string>;
11
- addEntriesToQueue(entries: BackgroundEntry<any>[], fireStartMessage?: boolean): Promise<string[]>;
12
- fireImmediateProcessRequestByParts<T>(type: string, data?: T): Promise<string>;
13
- fireImmediateProcessRequest<T>(entry: BackgroundEntry<T>): Promise<string>;
14
- fireStartProcessingRequest(): Promise<string>;
15
- fetchApproximateNumberOfQueueEntries(): Promise<number>;
16
- takeEntryFromBackgroundQueue(): Promise<InternalBackgroundEntry<any>[]>;
17
- modifyPayloadPreProcess?<T>(entry: InternalBackgroundEntry<T>): Promise<InternalBackgroundEntry<T>>;
18
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { BackgroundEntry } from '../background-entry.js';
3
- import { InternalBackgroundEntry } from '../internal-background-entry.js';
4
- import { AbstractBackgroundManager } from './abstract-background-manager.js';
5
- export declare class SingleThreadLocalBackgroundManager extends AbstractBackgroundManager {
6
- private _localBus;
7
- get backgroundManagerName(): string;
8
- constructor();
9
- immediateProcessQueue?(): Subject<InternalBackgroundEntry<any>>;
10
- addEntryToQueue<T>(entry: BackgroundEntry<T>, fireStartMessage?: boolean): Promise<string>;
11
- fireImmediateProcessRequest<T>(entry: BackgroundEntry<T>): Promise<string>;
12
- fireStartProcessingRequest(): Promise<string>;
13
- fetchApproximateNumberOfQueueEntries(): Promise<number>;
14
- takeEntryFromBackgroundQueue(): Promise<InternalBackgroundEntry<any>[]>;
15
- }
@@ -1,17 +0,0 @@
1
- import { BackgroundTransactionLogger } from '../config/background/background-transaction-logger.js';
2
- import { BackgroundTransactionLog } from '../config/background/background-transaction-log.js';
3
- import { S3Client } from '@aws-sdk/client-s3';
4
- export declare class S3BackgroundTransactionLogger implements BackgroundTransactionLogger {
5
- private cfg;
6
- private s3TransactionLogCacheRatchet;
7
- constructor(cfg: BackgroundS3TransactionLoggingConfig);
8
- logTransaction(txLog: BackgroundTransactionLog): Promise<void>;
9
- readTransactionLog(txGuid: string): Promise<BackgroundTransactionLog>;
10
- static validateConfig(cfg: BackgroundS3TransactionLoggingConfig): string[];
11
- }
12
- export interface BackgroundS3TransactionLoggingConfig {
13
- s3: S3Client;
14
- bucket: string;
15
- timeToLiveDays: number;
16
- prefix?: string;
17
- }
@@ -1,5 +0,0 @@
1
- import { BuildInformation } from '@bitblit/ratchet-common';
2
- export declare class RatchetEpsilonCommonInfo {
3
- private constructor();
4
- static buildInformation(): BuildInformation;
5
- }
@@ -1,7 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
3
- export declare class EchoProcessor implements BackgroundProcessor<any> {
4
- static TYPE_NAME: string;
5
- get typeName(): string;
6
- handleEvent(data: any, mgr?: BackgroundManagerLike): Promise<void>;
7
- }
@@ -1,6 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
3
- export declare class LogAndEnqueueEchoProcessor implements BackgroundProcessor<any> {
4
- get typeName(): string;
5
- handleEvent(data: any, cfg: BackgroundManagerLike): Promise<void>;
6
- }
@@ -1,5 +0,0 @@
1
- import { BackgroundErrorProcessor } from '../../config/background/background-error-processor.js';
2
- import { InternalBackgroundEntry } from '../../background/internal-background-entry.js';
3
- export declare class LogMessageBackgroundErrorProcessor implements BackgroundErrorProcessor {
4
- handleError(submission: InternalBackgroundEntry<any>, error: Error): Promise<void>;
5
- }
@@ -1,6 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
3
- export declare class NoOpProcessor implements BackgroundProcessor<any> {
4
- get typeName(): string;
5
- handleEvent(data: any, mgr?: BackgroundManagerLike): Promise<void>;
6
- }
@@ -1,16 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
3
- export declare class RetryProcessor implements BackgroundProcessor<any> {
4
- private delegate;
5
- private opts;
6
- private static readonly RETRY_FIELD_NAME;
7
- constructor(delegate: BackgroundProcessor<any>, opts: RetryProcessorOptions);
8
- get typeName(): string;
9
- handleEvent(data: any, mgr: BackgroundManagerLike): Promise<void>;
10
- }
11
- export interface RetryProcessorOptions {
12
- retryCount?: number;
13
- baseDelayMS?: number;
14
- typePrefix?: string;
15
- typeSuffix?: string;
16
- }
@@ -1,6 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
3
- export declare class SampleDelayProcessor implements BackgroundProcessor<any> {
4
- get typeName(): string;
5
- handleEvent(data: any, mgr?: BackgroundManagerLike): Promise<void>;
6
- }
@@ -1,4 +0,0 @@
1
- export interface SampleInputValidatedProcessorData {
2
- nameParam: string;
3
- numberParam: number;
4
- }
@@ -1,8 +0,0 @@
1
- import { BackgroundProcessor } from '../../config/background/background-processor.js';
2
- import { SampleInputValidatedProcessorData } from './sample-input-validated-processor-data.js';
3
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
4
- export declare class SampleInputValidatedProcessor implements BackgroundProcessor<SampleInputValidatedProcessorData> {
5
- get typeName(): string;
6
- handleEvent(data: SampleInputValidatedProcessorData, mgr?: BackgroundManagerLike): Promise<void>;
7
- get dataSchemaName(): string;
8
- }
@@ -1,5 +0,0 @@
1
- export declare class BuiltInTraceIdGenerators {
2
- static fullAwsRequestId(): string;
3
- static shortAwsRequestId(): string;
4
- static fixedLengthHex(length?: number): string;
5
- }
@@ -1,5 +0,0 @@
1
- import { DaemonProcessState } from '@bitblit/ratchet-aws';
2
- import { ExtendedAPIGatewayEvent } from '../../config/http/extended-api-gateway-event.js';
3
- export interface DaemonAuthorizerFunction {
4
- (evt: ExtendedAPIGatewayEvent, proc: DaemonProcessState): Promise<boolean>;
5
- }
@@ -1,8 +0,0 @@
1
- import { DaemonAuthorizerFunction } from './daemon-authorizer-function.js';
2
- import { DaemonGroupSelectionFunction } from './daemon-group-selection-function.js';
3
- export interface DaemonConfig {
4
- authorizer?: DaemonAuthorizerFunction;
5
- groupSelector?: DaemonGroupSelectionFunction;
6
- fetchDaemonStatusPathParameter?: string;
7
- fetchDaemonStatusByPublicTokenPathParameter?: string;
8
- }
@@ -1,4 +0,0 @@
1
- import { ExtendedAPIGatewayEvent } from '../../config/http/extended-api-gateway-event.js';
2
- export interface DaemonGroupSelectionFunction {
3
- (evt: ExtendedAPIGatewayEvent): Promise<string>;
4
- }
@@ -1,16 +0,0 @@
1
- import { DaemonLike } from '@bitblit/ratchet-aws';
2
- import { DaemonProcessState } from '@bitblit/ratchet-aws';
3
- import { DaemonAuthorizerFunction } from './daemon-authorizer-function.js';
4
- import { ExtendedAPIGatewayEvent } from '../../config/http/extended-api-gateway-event.js';
5
- import { DaemonProcessStateList } from './daemon-process-state-list.js';
6
- import { DaemonConfig } from './daemon-config.js';
7
- export declare class DaemonHandler {
8
- private daemon;
9
- private inConfig?;
10
- static readonly ALLOW_EVERYTHING_AUTHORIZER: DaemonAuthorizerFunction;
11
- private config;
12
- constructor(daemon: DaemonLike, inConfig?: DaemonConfig);
13
- fetchDaemonStatusByPublicToken(evt: ExtendedAPIGatewayEvent): Promise<DaemonProcessState>;
14
- fetchDaemonStatus(evt: ExtendedAPIGatewayEvent): Promise<DaemonProcessState>;
15
- listDaemonStatus(evt: ExtendedAPIGatewayEvent): Promise<DaemonProcessStateList>;
16
- }
@@ -1,5 +0,0 @@
1
- import { DaemonProcessState } from '@bitblit/ratchet-aws';
2
- export interface DaemonProcessStateList {
3
- results: DaemonProcessState[];
4
- nextToken: string;
5
- }
@@ -1,10 +0,0 @@
1
- import { BaseContext } from '@apollo/server';
2
- import { EpsilonLambdaApolloContextFunctionArgument } from './epsilon-lambda-apollo-context-function-argument.js';
3
- import { JwtRatchetLike } from '@bitblit/ratchet-common';
4
- import { DefaultEpsilonApolloContext } from './default-epsilon-apollo-context.js';
5
- export declare class ApolloUtil {
6
- private constructor();
7
- static emptyContext<T extends BaseContext>(): Promise<T>;
8
- static defaultEpsilonApolloContext(args: EpsilonLambdaApolloContextFunctionArgument, jwt?: JwtRatchetLike): Promise<DefaultEpsilonApolloContext<any>>;
9
- static nonRouteableOnlyEpsilonApolloContext(args: EpsilonLambdaApolloContextFunctionArgument, jwt?: JwtRatchetLike): Promise<DefaultEpsilonApolloContext<any>>;
10
- }
@@ -1,10 +0,0 @@
1
- import { APIGatewayEvent, Context } from 'aws-lambda';
2
- import { JwtTokenBase } from '@bitblit/ratchet-common';
3
- export interface DefaultEpsilonApolloContext<T extends JwtTokenBase> {
4
- user?: T;
5
- bearerTokenString?: string;
6
- headers: Record<string, string>;
7
- functionName: string;
8
- lambdaEvent: APIGatewayEvent;
9
- lambdaContext: Context;
10
- }
@@ -1,6 +0,0 @@
1
- export declare const EpsilonApolloCorsMethod: {
2
- None: string;
3
- All: string;
4
- Reflective: string;
5
- };
6
- export type EpsilonApolloCorsMethod = (typeof EpsilonApolloCorsMethod)[keyof typeof EpsilonApolloCorsMethod];
@@ -1,5 +0,0 @@
1
- import { APIGatewayEvent, Context } from 'aws-lambda';
2
- export interface EpsilonLambdaApolloContextFunctionArgument {
3
- lambdaEvent: APIGatewayEvent;
4
- lambdaContext: Context;
5
- }
@@ -1,10 +0,0 @@
1
- import { BaseContext, ContextFunction } from '@apollo/server';
2
- import { EpsilonLambdaApolloContextFunctionArgument } from './epsilon-lambda-apollo-context-function-argument.js';
3
- import { EpsilonApolloCorsMethod } from './epsilon-apollo-cors-method.js';
4
- import { ProxyResult } from 'aws-lambda';
5
- export interface EpsilonLambdaApolloOptions<TContext extends BaseContext> {
6
- context?: ContextFunction<[EpsilonLambdaApolloContextFunctionArgument], TContext>;
7
- timeoutMS?: number;
8
- corsMethod?: EpsilonApolloCorsMethod;
9
- debugOutputCallback?: (resp: ProxyResult) => Promise<void>;
10
- }
@@ -1,10 +0,0 @@
1
- import { APIGatewayEvent, Context, ProxyResult } from 'aws-lambda';
2
- import { FilterFunction } from '../../config/http/filter-function.js';
3
- import { FilterChainContext } from '../../config/http/filter-chain-context.js';
4
- import { ApolloServer, BaseContext } from '@apollo/server';
5
- import { EpsilonLambdaApolloOptions } from './apollo/epsilon-lambda-apollo-options.js';
6
- export declare class ApolloFilter {
7
- static handlePathWithApollo<T>(fCtx: FilterChainContext, apolloPathRegex: RegExp, apolloServer: ApolloServer<T>, options?: EpsilonLambdaApolloOptions<T>): Promise<boolean>;
8
- static processApolloRequest<T>(event: APIGatewayEvent, context: Context, apolloServer: ApolloServer<T>, options?: EpsilonLambdaApolloOptions<T>): Promise<ProxyResult>;
9
- static addApolloFilterToList(filters: FilterFunction[], apolloPathRegex: RegExp, apolloServer: ApolloServer, options?: EpsilonLambdaApolloOptions<BaseContext>): void;
10
- }
@@ -1,9 +0,0 @@
1
- import { FilterChainContext } from '../../config/http/filter-chain-context.js';
2
- import { WebTokenManipulator } from '../../http/auth/web-token-manipulator.js';
3
- import { JwtTokenBase } from '@bitblit/ratchet-common';
4
- export declare class BuiltInAuthFilters {
5
- static requireAllRolesInCommonJwt(fCtx: FilterChainContext, requiredRoleAllOf: string[]): Promise<boolean>;
6
- static requireAnyRoleInCommonJwt(fCtx: FilterChainContext, requiredRoleOneOf: string[]): Promise<boolean>;
7
- static parseAuthorizationHeader(fCtx: FilterChainContext, webTokenManipulators: WebTokenManipulator<JwtTokenBase> | WebTokenManipulator<JwtTokenBase>[]): Promise<boolean>;
8
- static applyOpenApiAuthorization(fCtx: FilterChainContext): Promise<boolean>;
9
- }
@@ -1,8 +0,0 @@
1
- import { APIGatewayEvent } from 'aws-lambda';
2
- import { RouteMapping } from '../../http/route/route-mapping.js';
3
- import { EpsilonAuthorizationContext } from '../../config/http/epsilon-authorization-context.js';
4
- export declare class BuiltInAuthorizers {
5
- static simpleNoAuthenticationLogAccess(authorizationContext: EpsilonAuthorizationContext<any>, evt: APIGatewayEvent): Promise<boolean>;
6
- static simpleLoggedInAuth(authorizationContext: EpsilonAuthorizationContext<any>, evt: APIGatewayEvent): Promise<boolean>;
7
- static simpleRoleRouteAuth(authorizationContext: EpsilonAuthorizationContext<any>, event: APIGatewayEvent, route: RouteMapping, requiredRoleOneOf?: string[], requiredRoleAllOf?: string[]): Promise<boolean>;
8
- }