monorise 1.6.4 → 1.7.0-dev.0

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.
@@ -1,13 +1,16 @@
1
1
  import { Entity as Entity$2, EntitySchemaMap, createEntityConfig, WhereConditions } from '../base/index';
2
2
  import * as hono from 'hono';
3
3
  import { Hono } from 'hono';
4
- import { DynamoDB, TransactWriteItemsInput, AttributeValue, TransactWriteItem, UpdateItemCommandInput } from '@aws-sdk/client-dynamodb';
4
+ import { DynamoDB, TransactWriteItemsInput, AttributeValue, TransactWriteItem, UpdateItemCommandInput, DynamoDBClient } from '@aws-sdk/client-dynamodb';
5
5
  import * as hono_utils_http_status from 'hono/utils/http-status';
6
6
  import * as hono_utils_types from 'hono/utils/types';
7
7
  import { createFactory } from 'hono/factory';
8
- import httpStatus8 from 'http-status';
8
+ import httpStatus4 from 'http-status';
9
9
  import { unmarshall, marshall } from '@aws-sdk/util-dynamodb';
10
10
  import { EventBridgeClient } from '@aws-sdk/client-eventbridge';
11
+ import { AthenaClient } from '@aws-sdk/client-athena';
12
+ import { FirehoseClient } from '@aws-sdk/client-firehose';
13
+ import { S3Client } from '@aws-sdk/client-s3';
11
14
  import * as hono_aws_lambda from 'hono/aws-lambda';
12
15
  import { SQSEvent, SQSBatchItemFailure, DynamoDBBatchItemFailure } from 'aws-lambda';
13
16
  import { _Record } from '@aws-sdk/client-dynamodb-streams';
@@ -480,10 +483,10 @@ factory.createMiddleware((c, next) => __async(null, null, function* () {
480
483
  return yield next();
481
484
  }
482
485
  if (!xApiKey || Array.isArray(xApiKey) || !API_KEYS.includes(xApiKey)) {
483
- c.status(httpStatus8.UNAUTHORIZED);
486
+ c.status(httpStatus4.UNAUTHORIZED);
484
487
  return c.json({
485
- status: httpStatus8.UNAUTHORIZED,
486
- message: httpStatus8["401_MESSAGE"]
488
+ status: httpStatus4.UNAUTHORIZED,
489
+ message: httpStatus4["401_MESSAGE"]
487
490
  });
488
491
  }
489
492
  return yield next();
@@ -498,6 +501,15 @@ new EventBridgeClient();
498
501
 
499
502
  // middlewares/general-error-handler.ts
500
503
  createFactory();
504
+ new AthenaClient();
505
+ new DynamoDBClient();
506
+ new FirehoseClient();
507
+ new DynamoDBClient();
508
+ new FirehoseClient();
509
+ new S3Client();
510
+ new AthenaClient();
511
+ new AthenaClient();
512
+ new AthenaClient();
501
513
 
502
514
  // ../../node_modules/zod/v3/external.js
503
515
  var external_exports = {};
@@ -4860,10 +4872,63 @@ declare const appHandler: (container: DependencyContainer) => ({ routes }: AppHa
4860
4872
  multiValueHeaders?: undefined;
4861
4873
  })>;
4862
4874
 
4863
- declare const handler$4: (container: DependencyContainer) => (ev: SQSEvent) => Promise<{
4875
+ declare const analyticsQueryHandler: () => <L extends hono_aws_lambda.LambdaEvent>(event: L, lambdaContext?: hono_aws_lambda.LambdaContext) => Promise<hono_aws_lambda.APIGatewayProxyResult & (L extends {
4876
+ multiValueHeaders: Record<string, string[]>;
4877
+ } ? {
4878
+ headers?: undefined;
4879
+ multiValueHeaders: Record<string, string[]>;
4880
+ } : {
4881
+ headers: Record<string, string>;
4882
+ multiValueHeaders?: undefined;
4883
+ })>;
4884
+
4885
+ declare const handler$9: (container: DependencyContainer) => (ev: SQSEvent) => Promise<{
4864
4886
  batchItemFailures: SQSBatchItemFailure[];
4865
4887
  }>;
4866
4888
 
4889
+ declare const handler$8: (config: Record<Entity$2, ReturnType<typeof createEntityConfig>>) => (event: {
4890
+ Records: _Record[];
4891
+ }) => Promise<{
4892
+ batchItemFailures: DynamoDBBatchItemFailure[];
4893
+ }>;
4894
+
4895
+ type Config = Record<Entity$2, ReturnType<typeof createEntityConfig>>;
4896
+ type S3ExportEvent = {
4897
+ Records: {
4898
+ s3: {
4899
+ bucket: {
4900
+ name: string;
4901
+ };
4902
+ object: {
4903
+ key: string;
4904
+ };
4905
+ };
4906
+ }[];
4907
+ };
4908
+ type BackfillLaunchEvent = {
4909
+ action: 'start' | 'reconcile';
4910
+ };
4911
+ /** Starts a consistent export after stream capture has been enabled by infrastructure. */
4912
+ declare function startBackfill(reconcile?: boolean): Promise<{
4913
+ exportArn: string | undefined;
4914
+ exportTime: string | undefined;
4915
+ started: boolean;
4916
+ }>;
4917
+ declare const handler$7: (config: Config) => (event: S3ExportEvent | BackfillLaunchEvent) => Promise<{
4918
+ exportArn: string | undefined;
4919
+ exportTime: string | undefined;
4920
+ started: boolean;
4921
+ } | {
4922
+ delivered: number;
4923
+ exportTime: string;
4924
+ }>;
4925
+
4926
+ declare const handler$6: () => Promise<void>;
4927
+
4928
+ declare const handler$5: () => Promise<void>;
4929
+
4930
+ declare const handler$4: () => Promise<void>;
4931
+
4867
4932
  declare const handler$3: (container: DependencyContainer) => (ev: SQSEvent) => Promise<{
4868
4933
  batchItemFailures: SQSBatchItemFailure[];
4869
4934
  }>;
@@ -4900,7 +4965,9 @@ declare class CoreFactory {
4900
4965
  setupCommonRoutes: ReturnType<typeof setupCommonRoutes>;
4901
4966
  mutualProcessor: ReturnType<typeof handler$3>;
4902
4967
  replicationProcessor: ReturnType<typeof handler$1>;
4903
- createEntityProcessor: ReturnType<typeof handler$4>;
4968
+ createEntityProcessor: ReturnType<typeof handler$9>;
4969
+ analyticsProcessor: ReturnType<typeof handler$8>;
4970
+ analyticsBackfillProcessor: ReturnType<typeof handler$7>;
4904
4971
  prejoinProcessor: ReturnType<typeof handler$2>;
4905
4972
  tagProcessor: ReturnType<typeof handler>;
4906
4973
  appHandler: ReturnType<typeof appHandler>;
@@ -4912,4 +4979,4 @@ declare class CoreFactory {
4912
4979
  });
4913
4980
  }
4914
4981
 
4915
- export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, TransactionService, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor, transactional };
4982
+ export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, TransactionService, handler$7 as analyticsBackfillProcessor, handler$6 as analyticsMaterializationProcessor, handler$5 as analyticsModelProcessor, handler$8 as analyticsProcessor, analyticsQueryHandler, handler$4 as analyticsViewProcessor, appHandler, handler$9 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, startBackfill as startAnalyticsBackfill, handler as tagProcessor, transactional };