@bitblit/ratchet-epsilon-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.
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
@@ -1,26 +0,0 @@
1
- import { FilterFunction } from '../../config/http/filter-function.js';
2
- import { FilterChainContext } from '../../config/http/filter-chain-context.js';
3
- export declare class BuiltInFilters {
4
- static readonly MAXIMUM_LAMBDA_BODY_SIZE_BYTES: number;
5
- static combineFilters(fCtx: FilterChainContext, filters: FilterFunction[]): Promise<boolean>;
6
- static applyGzipIfPossible(fCtx: FilterChainContext): Promise<boolean>;
7
- static addConstantHeaders(fCtx: FilterChainContext, headers: Record<string, string>): Promise<boolean>;
8
- static addAWSRequestIdHeader(fCtx: FilterChainContext, headerName?: string): Promise<boolean>;
9
- static addAllowEverythingCORSHeaders(fCtx: FilterChainContext): Promise<boolean>;
10
- static addAllowReflectionCORSHeaders(fCtx: FilterChainContext): Promise<boolean>;
11
- static uriDecodeQueryParams(fCtx: FilterChainContext): Promise<boolean>;
12
- private static decodeUriComponentAndReplacePlus;
13
- static fixStillEncodedQueryParams(fCtx: FilterChainContext): Promise<boolean>;
14
- static disallowStringNullAsPathParameter(fCtx: FilterChainContext): Promise<boolean>;
15
- static disallowStringNullAsQueryStringParameter(fCtx: FilterChainContext): Promise<boolean>;
16
- static ensureEventMaps(fCtx: FilterChainContext): Promise<boolean>;
17
- static parseJsonBodyToObject(fCtx: FilterChainContext): Promise<boolean>;
18
- static checkMaximumLambdaBodySize(fCtx: FilterChainContext): Promise<boolean>;
19
- static validateInboundBody(fCtx: FilterChainContext): Promise<boolean>;
20
- static validateInboundQueryParams(fCtx: FilterChainContext): Promise<boolean>;
21
- static validateInboundPathParams(fCtx: FilterChainContext): Promise<boolean>;
22
- static validateOutboundResponse(fCtx: FilterChainContext): Promise<boolean>;
23
- static autoRespondToOptionsRequestWithCors(fCtx: FilterChainContext): Promise<boolean>;
24
- static autoRespond(fCtx: FilterChainContext, inBody: any): Promise<boolean>;
25
- static secureOutboundServerErrorForProduction(fCtx: FilterChainContext, errorMessage: string, errCode: number): Promise<boolean>;
26
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { APIGatewayEvent, Context } from 'aws-lambda';
2
- import { ExtendedAPIGatewayEvent } from '../../config/http/extended-api-gateway-event.js';
3
- import { EpsilonRouter } from '../../http/route/epsilon-router.js';
4
- export declare class BuiltInHandlers {
5
- static expectedHandledByFilter(evt: ExtendedAPIGatewayEvent, flag?: string): Promise<any>;
6
- static handleNotImplemented(evt: ExtendedAPIGatewayEvent, flag?: string): Promise<any>;
7
- static sample(evt: ExtendedAPIGatewayEvent, flag?: string, context?: Context): Promise<any>;
8
- static defaultErrorProcessor(event: APIGatewayEvent, err: Error, cfg: EpsilonRouter): Promise<void>;
9
- }
@@ -1,6 +0,0 @@
1
- import { FilterChainContext } from '../../config/http/filter-chain-context.js';
2
- export declare class LogLevelManipulationFilter {
3
- private static LOG_LEVEL_BEFORE_CHANGE;
4
- static setLogLevelForTransaction(fCtx: FilterChainContext): Promise<boolean>;
5
- static clearLogLevelForTransaction(fCtx: FilterChainContext): Promise<boolean>;
6
- }
@@ -1,12 +0,0 @@
1
- import { Context } from 'aws-lambda';
2
- import { ExtendedAPIGatewayEvent } from '../../config/http/extended-api-gateway-event.js';
3
- import { RouteAndParse } from '../../http/web-handler.js';
4
- import { NullReturnedObjectHandling } from '../../config/http/null-returned-object-handling.js';
5
- import { FilterFunction } from '../../config/http/filter-function.js';
6
- import { FilterChainContext } from '../../config/http/filter-chain-context.js';
7
- export declare class RunHandlerAsFilter {
8
- static runHandler(fCtx: FilterChainContext, rm: RouteAndParse): Promise<boolean>;
9
- static applyNullReturnedObjectHandling(result: any, handling: NullReturnedObjectHandling): any;
10
- static findHandler(rm: RouteAndParse, event: ExtendedAPIGatewayEvent, context: Context, add404OnMissing?: boolean): Promise<any>;
11
- static addRunHandlerAsFilterToList(filters: FilterFunction[], rm: RouteAndParse): void;
12
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { AbstractRatchetCliHandler } from '@bitblit/ratchet-node-only';
2
- import { BuildInformation } from '@bitblit/ratchet-common';
3
- export declare class RatchetCliHandler extends AbstractRatchetCliHandler {
4
- fetchHandlerMap(): Record<string, any>;
5
- fetchVersionInfo(): BuildInformation;
6
- }
@@ -1,3 +0,0 @@
1
- export declare class RunBackgroundProcessFromCommandLine {
2
- static runFromCliArgs(args: string[]): Promise<void>;
3
- }
@@ -1,7 +0,0 @@
1
- export interface BackgroundAwsConfig {
2
- queueUrl: string;
3
- notificationArn: string;
4
- sendNotificationOnBackgroundError?: boolean;
5
- sendNotificationOnBackgroundValidationFailure?: boolean;
6
- backgroundProcessFailureSnsArn?: string;
7
- }
@@ -1,14 +0,0 @@
1
- import { BackgroundProcessor } from './background-processor.js';
2
- import { BackgroundErrorProcessor } from './background-error-processor.js';
3
- import { BackgroundExecutionListener } from '../../background/background-execution-listener.js';
4
- import { BackgroundTransactionLogger } from './background-transaction-logger.js';
5
- export interface BackgroundConfig {
6
- transactionLogger?: BackgroundTransactionLogger;
7
- errorProcessor?: BackgroundErrorProcessor;
8
- httpStatusEndpoint?: string;
9
- httpMetaEndpoint?: string;
10
- httpSubmissionPath: string;
11
- implyTypeFromPathSuffix: boolean;
12
- processors: BackgroundProcessor<any>[];
13
- executionListeners?: BackgroundExecutionListener<any>[];
14
- }
@@ -1,4 +0,0 @@
1
- import { InternalBackgroundEntry } from '../../background/internal-background-entry.js';
2
- export interface BackgroundErrorProcessor {
3
- handleError(submission: InternalBackgroundEntry<any>, error: Error): Promise<void>;
4
- }
@@ -1,6 +0,0 @@
1
- import { BackgroundManagerLike } from '../../background/manager/background-manager-like.js';
2
- export interface BackgroundProcessor<T> {
3
- typeName: string;
4
- dataSchemaName?: string;
5
- handleEvent(data: T, mgr: BackgroundManagerLike): Promise<any>;
6
- }
@@ -1,8 +0,0 @@
1
- import { InternalBackgroundEntry } from '../../background/internal-background-entry.js';
2
- export interface BackgroundTransactionLog {
3
- request: InternalBackgroundEntry<any>;
4
- running: boolean;
5
- runtimeMS?: number;
6
- result?: any;
7
- error?: any;
8
- }
@@ -1,5 +0,0 @@
1
- import { BackgroundTransactionLog } from './background-transaction-log.js';
2
- export interface BackgroundTransactionLogger {
3
- logTransaction(txLog: BackgroundTransactionLog): Promise<void>;
4
- readTransactionLog(txGuid: string): Promise<BackgroundTransactionLog>;
5
- }
@@ -1,12 +0,0 @@
1
- export interface AbstractCronEntry {
2
- name?: string;
3
- eventFilter?: RegExp;
4
- minuteFilter?: number[];
5
- hourFilter?: number[];
6
- dayOfWeekFilter?: number[];
7
- dayOfMonthFilter?: number[];
8
- monthOfYearFilter?: number[];
9
- contextMatchFilter?: RegExp;
10
- contextNoMatchFilter?: RegExp;
11
- overrideTimezone?: string;
12
- }
@@ -1,6 +0,0 @@
1
- import { AbstractCronEntry } from './abstract-cron-entry.js';
2
- export interface CronBackgroundEntry extends AbstractCronEntry {
3
- backgroundTaskType: string;
4
- fireImmediate: boolean;
5
- data?: any;
6
- }
@@ -1,6 +0,0 @@
1
- import { CronBackgroundEntry } from './cron-background-entry.js';
2
- export interface CronConfig {
3
- timezone: string;
4
- context: string;
5
- entries: CronBackgroundEntry[];
6
- }
@@ -1,5 +0,0 @@
1
- import { GenericAwsEventHandlerFunction } from './generic-aws-event-handler-function.js';
2
- import { DynamoDBStreamEvent } from 'aws-lambda';
3
- export interface DynamoDbConfig {
4
- handlers: Map<string, GenericAwsEventHandlerFunction<DynamoDBStreamEvent>>;
5
- }
@@ -1,24 +0,0 @@
1
- import { HttpConfig } from './http/http-config.js';
2
- import { BackgroundConfig } from './background/background-config.js';
3
- import { CronConfig } from './cron/cron-config.js';
4
- import { DynamoDbConfig } from './dynamo-db-config.js';
5
- import { S3Config } from './s3-config.js';
6
- import { SnsConfig } from './sns-config.js';
7
- import { EpsilonLoggerConfig } from './epsilon-logger-config.js';
8
- import { InterApiConfig } from './inter-api/inter-api-config.js';
9
- import { SqsConfig } from './sqs-config';
10
- export interface EpsilonConfig {
11
- label?: string;
12
- disableLastResortTimeout?: boolean;
13
- throwErrorIfNoSuitableEventHandlers?: boolean;
14
- openApiYamlString: string;
15
- httpConfig?: HttpConfig;
16
- backgroundConfig?: BackgroundConfig;
17
- interApiConfig?: InterApiConfig;
18
- cron?: CronConfig;
19
- dynamoDb?: DynamoDbConfig;
20
- s3?: S3Config;
21
- sns?: SnsConfig;
22
- sqs?: SqsConfig;
23
- loggerConfig?: EpsilonLoggerConfig;
24
- }
@@ -1,7 +0,0 @@
1
- import { Context, ProxyResult } from 'aws-lambda';
2
- export interface EpsilonLambdaEventHandler<T> {
3
- handlesEvent(evt: any): boolean;
4
- extractLabel(evt: T, context: Context): string;
5
- processEvent(evt: T, context: Context): Promise<ProxyResult>;
6
- processUncaughtError?(evt: T, context: Context, err: Error): Promise<ProxyResult>;
7
- }
@@ -1,13 +0,0 @@
1
- import { LoggerLevelName } from '@bitblit/ratchet-common';
2
- import { LogMessageFormatType } from '@bitblit/ratchet-common';
3
- import { LoggingTraceIdGenerator } from './logging-trace-id-generator.js';
4
- export interface EpsilonLoggerConfig {
5
- envParamLogLevelName?: string;
6
- queryParamLogLevelName?: string;
7
- queryParamTracePrefixName?: string;
8
- traceIdGenerator?: LoggingTraceIdGenerator;
9
- logMessageFormatType?: LogMessageFormatType;
10
- traceHeaderName?: string;
11
- traceDepthHeaderName?: string;
12
- epsilonStartEndMessageLogLevel?: LoggerLevelName;
13
- }
@@ -1,3 +0,0 @@
1
- export interface GenericAwsEventHandlerFunction<T> {
2
- (event: T): Promise<void>;
3
- }
@@ -1,6 +0,0 @@
1
- import { RouteMapping } from '../../http/route/route-mapping.js';
2
- import { EpsilonAuthorizationContext } from './epsilon-authorization-context.js';
3
- import { ExtendedAPIGatewayEvent } from './extended-api-gateway-event.js';
4
- export interface AuthorizerFunction {
5
- (authData: EpsilonAuthorizationContext<any>, event?: ExtendedAPIGatewayEvent, route?: RouteMapping): Promise<boolean>;
6
- }
@@ -1,5 +0,0 @@
1
- export interface EpsilonAuthorizationContext<T> {
2
- raw: string;
3
- auth: T;
4
- error: string;
5
- }
@@ -1,7 +0,0 @@
1
- import { APIGatewayEvent } from 'aws-lambda';
2
- import { EpsilonAuthorizationContext } from './epsilon-authorization-context.js';
3
- export interface ExtendedAPIGatewayEvent extends APIGatewayEvent {
4
- parsedBody: any;
5
- authorization: EpsilonAuthorizationContext<any>;
6
- convertedFromV2Event: boolean;
7
- }
@@ -1,14 +0,0 @@
1
- import { Context, ProxyResult } from 'aws-lambda';
2
- import { ExtendedAPIGatewayEvent } from './extended-api-gateway-event.js';
3
- import { RouteAndParse } from '../../http/web-handler.js';
4
- import { ModelValidator } from '@bitblit/ratchet-misc';
5
- import { AuthorizerFunction } from './authorizer-function.js';
6
- export interface FilterChainContext {
7
- event: ExtendedAPIGatewayEvent;
8
- context: Context;
9
- rawResult: any;
10
- result: ProxyResult;
11
- routeAndParse: RouteAndParse;
12
- modelValidator: ModelValidator;
13
- authenticators: Map<string, AuthorizerFunction>;
14
- }
@@ -1,4 +0,0 @@
1
- import { FilterChainContext } from './filter-chain-context.js';
2
- export interface FilterFunction {
3
- (fCtx: FilterChainContext): Promise<boolean>;
4
- }
@@ -1,5 +0,0 @@
1
- import { Context } from 'aws-lambda';
2
- import { ExtendedAPIGatewayEvent } from './extended-api-gateway-event.js';
3
- export interface HandlerFunction<T> {
4
- (event: ExtendedAPIGatewayEvent, context?: Context): Promise<T>;
5
- }
@@ -1,15 +0,0 @@
1
- import { HandlerFunction } from './handler-function.js';
2
- import { AuthorizerFunction } from './authorizer-function.js';
3
- import { HttpProcessingConfig } from './http-processing-config.js';
4
- import { ModelValidator } from '@bitblit/ratchet-misc';
5
- import { MappedHttpProcessingConfig } from './mapped-http-processing-config.js';
6
- export interface HttpConfig {
7
- defaultMetaHandling: HttpProcessingConfig;
8
- overrideMetaHandling?: MappedHttpProcessingConfig[];
9
- handlers: Map<string, HandlerFunction<any>>;
10
- authorizers?: Map<string, AuthorizerFunction>;
11
- staticContentRoutes?: Record<string, string>;
12
- prefixesToStripBeforeRouteMatch?: string[];
13
- overrideModelValidator?: ModelValidator;
14
- filterHandledRouteMatches?: string[];
15
- }
@@ -1,11 +0,0 @@
1
- import { NullReturnedObjectHandling } from './null-returned-object-handling.js';
2
- import { FilterFunction } from './filter-function.js';
3
- export interface HttpProcessingConfig {
4
- configName?: string;
5
- timeoutMS: number;
6
- overrideAuthorizerName?: string;
7
- preFilters?: FilterFunction[];
8
- postFilters?: FilterFunction[];
9
- errorFilters?: FilterFunction[];
10
- nullReturnedObjectHandling?: NullReturnedObjectHandling;
11
- }
@@ -1,7 +0,0 @@
1
- import { HttpProcessingConfig } from './http-processing-config.js';
2
- export interface MappedHttpProcessingConfig {
3
- methods?: string[];
4
- pathRegex: string;
5
- invertPathMatching?: boolean;
6
- config: HttpProcessingConfig;
7
- }
@@ -1,6 +0,0 @@
1
- export declare const NullReturnedObjectHandling: {
2
- Error: string;
3
- ConvertToEmptyString: string;
4
- Return404NotFoundResponse: string;
5
- };
6
- export type NullReturnedObjectHandling = (typeof NullReturnedObjectHandling)[keyof typeof NullReturnedObjectHandling];
@@ -1,5 +0,0 @@
1
- export interface InterApiAwsConfig {
2
- localMode: boolean;
3
- source: string;
4
- snsArn: string;
5
- }
@@ -1,6 +0,0 @@
1
- import { InterApiAwsConfig } from './inter-api-aws-config.js';
2
- import { InterApiProcessMapping } from './inter-api-process-mapping.js';
3
- export interface InterApiConfig {
4
- aws: InterApiAwsConfig;
5
- processMappings: InterApiProcessMapping[];
6
- }
@@ -1,6 +0,0 @@
1
- export interface InterApiProcessMapping {
2
- sourceRegex: string;
3
- typeRegex: string;
4
- disabled: boolean;
5
- backgroundProcessTypes: string[];
6
- }
@@ -1,4 +0,0 @@
1
- import { Context } from 'aws-lambda';
2
- export interface LoggingTraceIdGenerator {
3
- (event?: any, context?: Context): string;
4
- }
@@ -1,3 +0,0 @@
1
- export declare class NoHandlersFoundError extends Error {
2
- constructor(msg?: string);
3
- }
@@ -1,4 +0,0 @@
1
- export interface OpenApiDocumentComponents {
2
- securitySchemes: any[];
3
- schemas: any[];
4
- }
@@ -1,2 +0,0 @@
1
- export interface OpenApiDocumentPath {
2
- }
@@ -1,6 +0,0 @@
1
- import { OpenApiDocumentComponents } from './open-api-document-components.js';
2
- import { OpenApiDocumentPath } from './open-api-document-path.js';
3
- export interface OpenApiDocument {
4
- components: OpenApiDocumentComponents;
5
- paths: OpenApiDocumentPath[];
6
- }
@@ -1,6 +0,0 @@
1
- import { GenericAwsEventHandlerFunction } from './generic-aws-event-handler-function.js';
2
- import { S3Event } from 'aws-lambda';
3
- export interface S3Config {
4
- createHandlers: Map<string, GenericAwsEventHandlerFunction<S3Event>>;
5
- removeHandlers: Map<string, GenericAwsEventHandlerFunction<S3Event>>;
6
- }
@@ -1,5 +0,0 @@
1
- import { GenericAwsEventHandlerFunction } from './generic-aws-event-handler-function.js';
2
- import { SNSEvent } from 'aws-lambda';
3
- export interface SnsConfig {
4
- handlers: Map<string, GenericAwsEventHandlerFunction<SNSEvent>>;
5
- }
@@ -1,5 +0,0 @@
1
- import { GenericAwsEventHandlerFunction } from './generic-aws-event-handler-function';
2
- import { SQSEvent } from 'aws-lambda';
3
- export interface SqsConfig {
4
- handlers: Map<string, GenericAwsEventHandlerFunction<SQSEvent>>;
5
- }
@@ -1,9 +0,0 @@
1
- export declare class EpsilonBuildProperties {
2
- private constructor();
3
- static get buildVersion(): string;
4
- static get buildHash(): string;
5
- static get buildBranch(): string;
6
- static get buildTag(): string;
7
- static get buildBranchOrTag(): string;
8
- static get buildTime(): string;
9
- }
@@ -1,16 +0,0 @@
1
- import { EpsilonGlobalHandler } from './epsilon-global-handler.js';
2
- export declare class EpsilonConstants {
3
- static readonly EPSILON_FINDER_DYNAMIC_IMPORT_PATH_ENV_NAME = "EPSILON_FINDER_DYNAMIC_IMPORT_PATH";
4
- static readonly EPSILON_FINDER_FUNCTION_NAME_ENV_NAME = "EPSILON_FINDER_FUNCTION_NAME";
5
- static readonly DEFAULT_EPSILON_FINDER_DYNAMIC_IMPORT_PATH = "epsilon-global-handler-provider.js";
6
- static readonly DEFAULT_EPSILON_FINDER_FUNCTION_NAME = "findEpsilonGlobalHandler";
7
- static readonly AUTH_HEADER_PREFIX: string;
8
- static readonly AUTH_HEADER_NAME: string;
9
- static readonly BACKGROUND_SQS_TYPE_FIELD = "BACKGROUND_TYPE";
10
- static readonly BACKGROUND_SNS_START_MARKER = "BACKGROUND_START_MARKER";
11
- static readonly BACKGROUND_SNS_IMMEDIATE_RUN_FLAG = "BACKGROUND_IMMEDIATE_RUN_FLAG";
12
- static readonly INTER_API_SNS_EVENT = "EPSILON_INTER_API_EVENT";
13
- private static load;
14
- static findDynamicImportEpsilonGlobalHandlerProvider(): Promise<EpsilonGlobalHandler>;
15
- private constructor();
16
- }
@@ -1,20 +0,0 @@
1
- import { Context, ProxyResult } from 'aws-lambda';
2
- import { LoggerOptions } from '@bitblit/ratchet-common';
3
- import { BackgroundEntry } from './background/background-entry.js';
4
- import { EpsilonInstance } from './epsilon-instance.js';
5
- export declare class EpsilonGlobalHandler {
6
- private _epsilon;
7
- private static LOGGER_CONFIGURED;
8
- private static GLOBAL_INSTANCE_PROVIDER;
9
- static set globalInstanceProvider(input: () => Promise<EpsilonGlobalHandler>);
10
- static get globalInstanceProvider(): () => Promise<EpsilonGlobalHandler>;
11
- private handlers;
12
- constructor(_epsilon: EpsilonInstance);
13
- static configureDefaultLogger(overrides?: LoggerOptions): void;
14
- get epsilon(): EpsilonInstance;
15
- processSingleBackgroundByParts<T>(type: string, data?: T, overrideTraceId?: string, overrideTraceDepth?: number): Promise<boolean>;
16
- processSingleBackgroundEntry(e: BackgroundEntry<any>, overrideTraceId?: string, overrideTraceDepth?: number): Promise<boolean>;
17
- lambdaHandler(event: any, context: Context): Promise<any>;
18
- innerLambdaHandler(event: any, context: Context): Promise<any>;
19
- static defaultProcessUncaughtError(event: any, context: Context, err: any): Promise<ProxyResult>;
20
- }
@@ -1,14 +0,0 @@
1
- import { EpsilonConfig } from './config/epsilon-config.js';
2
- import { WebHandler } from './http/web-handler.js';
3
- import { BackgroundHandler } from './background/background-handler.js';
4
- import { OpenApiDocument } from './config/open-api/open-api-document.js';
5
- import { ModelValidator } from '@bitblit/ratchet-misc';
6
- import { BackgroundManagerLike } from './background/manager/background-manager-like.js';
7
- export interface EpsilonInstance {
8
- config: EpsilonConfig;
9
- parsedOpenApiDoc: OpenApiDocument;
10
- modelValidator: ModelValidator;
11
- webHandler: WebHandler;
12
- backgroundHandler: BackgroundHandler;
13
- backgroundManager: BackgroundManagerLike;
14
- }
@@ -1,6 +0,0 @@
1
- import { LogMessage } from '@bitblit/ratchet-common';
2
- import { LogMessageProcessor } from '@bitblit/ratchet-common';
3
- export declare class EpsilonLoggingExtensionProcessor implements LogMessageProcessor {
4
- process(msg: LogMessage): LogMessage;
5
- label(): string;
6
- }
@@ -1,8 +0,0 @@
1
- import { Callback, Context, CustomAuthorizerEvent } from 'aws-lambda';
2
- export declare class ApiGatewayAdapterAuthenticationHandler {
3
- private webTokenManipulator;
4
- constructor(issuer: string, encryptionKeys: string);
5
- lambdaHandler(event: CustomAuthorizerEvent, context: Context, callback: Callback): void;
6
- private createPolicy;
7
- static extractTokenStringFromAuthorizerEvent(event: CustomAuthorizerEvent): string;
8
- }
@@ -1,13 +0,0 @@
1
- import { JwtTokenBase } from '@bitblit/ratchet-common';
2
- import { WebTokenManipulator } from './web-token-manipulator.js';
3
- export declare class Auth0WebTokenManipulator implements WebTokenManipulator<JwtTokenBase> {
4
- private clientId;
5
- private jwksUri;
6
- private issuer;
7
- private jwksClient;
8
- constructor(clientId: string, jwksUri: string, issuer: string);
9
- extractTokenFromAuthorizationHeader<T>(authHeader: string): Promise<JwtTokenBase>;
10
- parseAndValidateAuth0Token<T>(auth0Token: string, allowExpired?: boolean): Promise<JwtTokenBase>;
11
- private fetchSigningKey;
12
- private fetchJwksClient;
13
- }
@@ -1,4 +0,0 @@
1
- export interface BasicAuthToken {
2
- username: string;
3
- password: string;
4
- }
@@ -1,14 +0,0 @@
1
- import { WebTokenManipulator } from './web-token-manipulator.js';
2
- import { JwtTokenBase } from '@bitblit/ratchet-common';
3
- export declare class GoogleWebTokenManipulator implements WebTokenManipulator<JwtTokenBase> {
4
- private clientId;
5
- private static readonly GOOGLE_DISCOVERY_DOCUMENT;
6
- private cacheGoogleDiscoveryDocument;
7
- private jwksClient;
8
- constructor(clientId: string);
9
- extractTokenFromAuthorizationHeader<T extends JwtTokenBase>(authHeader: string): Promise<JwtTokenBase>;
10
- parseAndValidateGoogleToken<T extends JwtTokenBase>(googleToken: string, allowExpired?: boolean): Promise<JwtTokenBase>;
11
- private fetchSigningKey;
12
- private fetchJwksClient;
13
- private fetchGoogleDiscoveryDocument;
14
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { WebTokenManipulator } from './web-token-manipulator.js';
2
- import { JwtTokenBase } from '@bitblit/ratchet-common';
3
- import { JwtRatchetLike } from '@bitblit/ratchet-common';
4
- export declare class JwtRatchetLocalWebTokenManipulator<T extends JwtTokenBase> implements WebTokenManipulator<T> {
5
- private _jwtRatchet;
6
- private _issuer;
7
- constructor(_jwtRatchet: JwtRatchetLike, _issuer: string);
8
- get jwtRatchet(): JwtRatchetLike;
9
- get issuer(): string;
10
- extractTokenFromAuthorizationHeader<T>(header: string): Promise<T>;
11
- }
@@ -1,19 +0,0 @@
1
- import { WebTokenManipulator } from './web-token-manipulator.js';
2
- import { LoggerLevelName } from '@bitblit/ratchet-common';
3
- import { JwtTokenBase } from '@bitblit/ratchet-common';
4
- import { JwtRatchet } from '@bitblit/ratchet-common';
5
- export declare class LocalWebTokenManipulator<T extends JwtTokenBase> implements WebTokenManipulator<T> {
6
- private encryptionKeys;
7
- private issuer;
8
- private _ratchet;
9
- constructor(encryptionKeys: string[], issuer: string);
10
- withExtraDecryptionKeys(keys: string[]): LocalWebTokenManipulator<T>;
11
- withParseFailureLogLevel(logLevel: LoggerLevelName): LocalWebTokenManipulator<T>;
12
- withOldKeyUseLogLevel(logLevel: LoggerLevelName): LocalWebTokenManipulator<T>;
13
- get jwtRatchet(): JwtRatchet;
14
- get selectRandomEncryptionKey(): Promise<string>;
15
- createRefreshedJWTString(tokenString: string, expirationSeconds: number, allowExpired?: boolean): Promise<string>;
16
- parseAndValidateJWTStringAsync<T extends JwtTokenBase>(tokenString: string): Promise<T>;
17
- createJWTStringAsync<T>(principal: string, userObject: T, roles?: string[], expirationSeconds?: number, proxyUser?: T): Promise<string>;
18
- extractTokenFromAuthorizationHeader<T extends JwtTokenBase>(header: string): Promise<T>;
19
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { JwtTokenBase } from '@bitblit/ratchet-common';
2
- export interface WebTokenManipulator<T extends JwtTokenBase> {
3
- extractTokenFromAuthorizationHeader(header: string): Promise<T>;
4
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class BadGateway<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class BadRequestError<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class ConflictError<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class ForbiddenError<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class GatewayTimeout<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class MethodNotAllowedError<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }
@@ -1,5 +0,0 @@
1
- import { RestfulApiHttpError } from '@bitblit/ratchet-common';
2
- export declare class MisconfiguredError<T = void> extends RestfulApiHttpError<T> {
3
- static readonly HTTP_CODE: number;
4
- constructor(...errors: string[]);
5
- }