monorise 1.5.0 → 1.8.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.
- package/dist/base/index.d.ts +5 -0
- package/dist/base/index.js.map +1 -1
- package/dist/cli/cli.js +157 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/core/index.d.ts +135 -5
- package/dist/core/index.js +1135 -16
- package/dist/core/index.js.map +1 -1
- package/dist/react/bowser-RUCNDTEX.js +2822 -0
- package/dist/react/bowser-RUCNDTEX.js.map +1 -0
- package/dist/react/chunk-2U2REJF4.js +138 -0
- package/dist/react/chunk-2U2REJF4.js.map +1 -0
- package/dist/react/chunk-5CPIG7AN.js +449 -0
- package/dist/react/chunk-5CPIG7AN.js.map +1 -0
- package/dist/react/chunk-7BSJSLIL.js +528 -0
- package/dist/react/chunk-7BSJSLIL.js.map +1 -0
- package/dist/react/chunk-7MNBSDJI.js +3362 -0
- package/dist/react/chunk-7MNBSDJI.js.map +1 -0
- package/dist/react/chunk-JXBFOCBM.js +2929 -0
- package/dist/react/chunk-JXBFOCBM.js.map +1 -0
- package/dist/react/chunk-MIXAYX55.js +147 -0
- package/dist/react/chunk-MIXAYX55.js.map +1 -0
- package/dist/react/chunk-Q26JGAFF.js +47 -0
- package/dist/react/chunk-Q26JGAFF.js.map +1 -0
- package/dist/react/chunk-QZSEUOCY.js +2298 -0
- package/dist/react/chunk-QZSEUOCY.js.map +1 -0
- package/dist/react/chunk-W6S3JWZV.js +1045 -0
- package/dist/react/chunk-W6S3JWZV.js.map +1 -0
- package/dist/react/chunk-WUOPYF3V.js +127 -0
- package/dist/react/chunk-WUOPYF3V.js.map +1 -0
- package/dist/react/chunk-Z45ECZFO.js +995 -0
- package/dist/react/chunk-Z45ECZFO.js.map +1 -0
- package/dist/react/dist-es-2P6AKQM3.js +325 -0
- package/dist/react/dist-es-2P6AKQM3.js.map +1 -0
- package/dist/react/dist-es-CEMZ6HT6.js +294 -0
- package/dist/react/dist-es-CEMZ6HT6.js.map +1 -0
- package/dist/react/dist-es-NZWWHEBR.js +89 -0
- package/dist/react/dist-es-NZWWHEBR.js.map +1 -0
- package/dist/react/dist-es-QVQ2CPIM.js +376 -0
- package/dist/react/dist-es-QVQ2CPIM.js.map +1 -0
- package/dist/react/dist-es-VBWII54H.js +70 -0
- package/dist/react/dist-es-VBWII54H.js.map +1 -0
- package/dist/react/dist-es-VXN7IC3J.js +23 -0
- package/dist/react/dist-es-VXN7IC3J.js.map +1 -0
- package/dist/react/dist-es-YKVDPOOB.js +221 -0
- package/dist/react/dist-es-YKVDPOOB.js.map +1 -0
- package/dist/react/dist-es-ZPOY2Z6R.js +178 -0
- package/dist/react/dist-es-ZPOY2Z6R.js.map +1 -0
- package/dist/react/event-streams-NBH35WQC.js +44 -0
- package/dist/react/event-streams-NBH35WQC.js.map +1 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +25670 -368
- package/dist/react/index.js.map +1 -1
- package/dist/react/loadSso-2GPAQE3H.js +583 -0
- package/dist/react/loadSso-2GPAQE3H.js.map +1 -0
- package/dist/react/services/core.service.d.ts +8 -0
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/react/signin-HT4EDHQE.js +821 -0
- package/dist/react/signin-HT4EDHQE.js.map +1 -0
- package/dist/react/sso-oidc-WA3BK6FI.js +830 -0
- package/dist/react/sso-oidc-WA3BK6FI.js.map +1 -0
- package/dist/react/sts-V7PNNQ2L.js +1114 -0
- package/dist/react/sts-V7PNNQ2L.js.map +1 -0
- package/dist/sst/components/analytics.d.ts +52 -0
- package/dist/sst/components/analytics.d.ts.map +1 -0
- package/dist/sst/components/monorise-core.d.ts +5 -1
- package/dist/sst/components/monorise-core.d.ts.map +1 -1
- package/dist/sst/components/single-table.d.ts +3 -1
- package/dist/sst/components/single-table.d.ts.map +1 -1
- package/dist/sst/index.js +344 -7
- package/dist/sst/index.js.map +1 -1
- package/package.json +4 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -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
8
|
import httpStatus8 from 'http-status';
|
|
9
9
|
import { unmarshall, marshall } from '@aws-sdk/util-dynamodb';
|
|
10
10
|
import { EventBridgeClient } from '@aws-sdk/client-eventbridge';
|
|
11
|
+
import { FirehoseClient } from '@aws-sdk/client-firehose';
|
|
12
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
13
|
+
import { AthenaClient } from '@aws-sdk/client-athena';
|
|
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';
|
|
@@ -90,7 +93,7 @@ declare class Entity$1<T extends Entity$2> extends Item$1 {
|
|
|
90
93
|
}
|
|
91
94
|
declare class EntityRepository extends Repository {
|
|
92
95
|
private EntityConfig;
|
|
93
|
-
|
|
96
|
+
readonly TABLE_NAME: string;
|
|
94
97
|
private readonly dynamodbClient;
|
|
95
98
|
private readonly EmailAuthEnabledEntities;
|
|
96
99
|
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, TABLE_NAME: string, dynamodbClient: DynamoDB, EmailAuthEnabledEntities: Entity$2[]);
|
|
@@ -498,6 +501,11 @@ new EventBridgeClient();
|
|
|
498
501
|
|
|
499
502
|
// middlewares/general-error-handler.ts
|
|
500
503
|
createFactory();
|
|
504
|
+
new FirehoseClient();
|
|
505
|
+
new DynamoDBClient();
|
|
506
|
+
new FirehoseClient();
|
|
507
|
+
new S3Client();
|
|
508
|
+
new AthenaClient();
|
|
501
509
|
|
|
502
510
|
// ../../node_modules/zod/v3/external.js
|
|
503
511
|
var external_exports = {};
|
|
@@ -4699,6 +4707,67 @@ declare class ListTagsController {
|
|
|
4699
4707
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4700
4708
|
}
|
|
4701
4709
|
|
|
4710
|
+
type TransactionCreateEntity<T extends Entity$2 = Entity$2> = {
|
|
4711
|
+
operation: 'createEntity';
|
|
4712
|
+
entityType: T;
|
|
4713
|
+
entityId?: string;
|
|
4714
|
+
payload: EntitySchemaMap[T];
|
|
4715
|
+
};
|
|
4716
|
+
type TransactionUpdateEntity<T extends Entity$2 = Entity$2> = {
|
|
4717
|
+
operation: 'updateEntity';
|
|
4718
|
+
entityType: T;
|
|
4719
|
+
entityId: string;
|
|
4720
|
+
payload: Partial<EntitySchemaMap[T]>;
|
|
4721
|
+
condition?: string;
|
|
4722
|
+
};
|
|
4723
|
+
type TransactionAdjustEntity<T extends Entity$2 = Entity$2> = {
|
|
4724
|
+
operation: 'adjustEntity';
|
|
4725
|
+
entityType: T;
|
|
4726
|
+
entityId: string;
|
|
4727
|
+
adjustments: Record<string, number>;
|
|
4728
|
+
condition?: string;
|
|
4729
|
+
};
|
|
4730
|
+
type TransactionDeleteEntity<T extends Entity$2 = Entity$2> = {
|
|
4731
|
+
operation: 'deleteEntity';
|
|
4732
|
+
entityType: T;
|
|
4733
|
+
entityId: string;
|
|
4734
|
+
};
|
|
4735
|
+
type TransactionOperation = TransactionCreateEntity | TransactionUpdateEntity | TransactionAdjustEntity | TransactionDeleteEntity;
|
|
4736
|
+
type TransactionResultEntry = {
|
|
4737
|
+
operation: string;
|
|
4738
|
+
entityType: Entity$2;
|
|
4739
|
+
entityId: string;
|
|
4740
|
+
data?: Record<string, unknown>;
|
|
4741
|
+
};
|
|
4742
|
+
type TransactionResult = {
|
|
4743
|
+
results: TransactionResultEntry[];
|
|
4744
|
+
};
|
|
4745
|
+
|
|
4746
|
+
declare class TransactionService {
|
|
4747
|
+
private EntityConfig;
|
|
4748
|
+
private EmailAuthEnabledEntities;
|
|
4749
|
+
private entityRepository;
|
|
4750
|
+
private dynamodbClient;
|
|
4751
|
+
private publishEvent;
|
|
4752
|
+
private entityServiceLifeCycle;
|
|
4753
|
+
private eventUtils;
|
|
4754
|
+
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, EmailAuthEnabledEntities: Entity$2[], entityRepository: EntityRepository, dynamodbClient: DynamoDB, publishEvent: typeof publishEvent, entityServiceLifeCycle: EntityServiceLifeCycle, eventUtils: EventUtils);
|
|
4755
|
+
executeTransaction: (operations: TransactionOperation[], accountId?: string) => Promise<TransactionResult>;
|
|
4756
|
+
private processOperation;
|
|
4757
|
+
private buildCreateItems;
|
|
4758
|
+
private buildUpdateItem;
|
|
4759
|
+
private buildAdjustItem;
|
|
4760
|
+
private buildDeleteItem;
|
|
4761
|
+
private collectCreateEvents;
|
|
4762
|
+
private collectUpdateEvents;
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
declare class ExecuteTransactionController {
|
|
4766
|
+
private transactionService;
|
|
4767
|
+
constructor(transactionService: TransactionService);
|
|
4768
|
+
controller: hono.MiddlewareHandler<any, string, {}, any>;
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4702
4771
|
declare class DependencyContainer {
|
|
4703
4772
|
config: {
|
|
4704
4773
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4741,6 +4810,8 @@ declare class DependencyContainer {
|
|
|
4741
4810
|
get updateMutualController(): UpdateMutualController;
|
|
4742
4811
|
get deleteMutualController(): DeleteMutualController;
|
|
4743
4812
|
get listTagsController(): ListTagsController;
|
|
4813
|
+
get transactionService(): TransactionService;
|
|
4814
|
+
get executeTransactionController(): ExecuteTransactionController;
|
|
4744
4815
|
}
|
|
4745
4816
|
|
|
4746
4817
|
declare const setupCommonRoutes: (container: DependencyContainer) => Hono;
|
|
@@ -4774,7 +4845,12 @@ declare const StandardErrorCode: {
|
|
|
4774
4845
|
readonly REPLICATION_ERROR: "REPLICATION_ERROR";
|
|
4775
4846
|
readonly RETRYABLE_MUTUAL_LOCK_CONFLICT: "RETRYABLE_MUTUAL_LOCK_CONFLICT";
|
|
4776
4847
|
readonly TAG_IS_UNDEFINED: "TAG_IS_UNDEFINED";
|
|
4848
|
+
readonly TRANSACTION_EMPTY: "TRANSACTION_EMPTY";
|
|
4777
4849
|
readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
|
|
4850
|
+
readonly TRANSACTION_INVALID_OPERATION: "TRANSACTION_INVALID_OPERATION";
|
|
4851
|
+
readonly TRANSACTION_ITEM_LIMIT_EXCEEDED: "TRANSACTION_ITEM_LIMIT_EXCEEDED";
|
|
4852
|
+
readonly TRANSACTION_UNIQUE_FIELD_UPDATE: "TRANSACTION_UNIQUE_FIELD_UPDATE";
|
|
4853
|
+
readonly TRANSACTION_VALIDATION_ERROR: "TRANSACTION_VALIDATION_ERROR";
|
|
4778
4854
|
readonly UNIQUE_VALUE_EXISTS: "UNIQUE_VALUE_EXISTS";
|
|
4779
4855
|
};
|
|
4780
4856
|
type StandardErrorCode = typeof StandardErrorCode[keyof typeof StandardErrorCode];
|
|
@@ -4792,10 +4868,49 @@ declare const appHandler: (container: DependencyContainer) => ({ routes }: AppHa
|
|
|
4792
4868
|
multiValueHeaders?: undefined;
|
|
4793
4869
|
})>;
|
|
4794
4870
|
|
|
4795
|
-
declare const handler$
|
|
4871
|
+
declare const handler$7: (container: DependencyContainer) => (ev: SQSEvent) => Promise<{
|
|
4796
4872
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4797
4873
|
}>;
|
|
4798
4874
|
|
|
4875
|
+
declare const handler$6: (config: Record<Entity$2, ReturnType<typeof createEntityConfig>>) => (event: {
|
|
4876
|
+
Records: _Record[];
|
|
4877
|
+
}) => Promise<{
|
|
4878
|
+
batchItemFailures: DynamoDBBatchItemFailure[];
|
|
4879
|
+
}>;
|
|
4880
|
+
|
|
4881
|
+
type Config = Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
4882
|
+
type S3ExportEvent = {
|
|
4883
|
+
Records: {
|
|
4884
|
+
s3: {
|
|
4885
|
+
bucket: {
|
|
4886
|
+
name: string;
|
|
4887
|
+
};
|
|
4888
|
+
object: {
|
|
4889
|
+
key: string;
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
}[];
|
|
4893
|
+
};
|
|
4894
|
+
type BackfillLaunchEvent = {
|
|
4895
|
+
action: 'start' | 'reconcile';
|
|
4896
|
+
};
|
|
4897
|
+
/** Starts a consistent export after stream capture has been enabled by infrastructure. */
|
|
4898
|
+
declare function startBackfill(reconcile?: boolean): Promise<{
|
|
4899
|
+
exportArn: string | undefined;
|
|
4900
|
+
exportTime: string | undefined;
|
|
4901
|
+
started: boolean;
|
|
4902
|
+
}>;
|
|
4903
|
+
declare const handler$5: (config: Config) => (event: S3ExportEvent | BackfillLaunchEvent) => Promise<{
|
|
4904
|
+
exportArn: string | undefined;
|
|
4905
|
+
exportTime: string | undefined;
|
|
4906
|
+
started: boolean;
|
|
4907
|
+
} | {
|
|
4908
|
+
delivered: number;
|
|
4909
|
+
exportTime: string;
|
|
4910
|
+
}>;
|
|
4911
|
+
|
|
4912
|
+
declare const handler$4: () => Promise<void>;
|
|
4913
|
+
|
|
4799
4914
|
declare const handler$3: (container: DependencyContainer) => (ev: SQSEvent) => Promise<{
|
|
4800
4915
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4801
4916
|
}>;
|
|
@@ -4814,12 +4929,27 @@ declare const handler: (container: DependencyContainer) => (ev: SQSEvent) => Pro
|
|
|
4814
4929
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4815
4930
|
}>;
|
|
4816
4931
|
|
|
4932
|
+
declare const transactional: {
|
|
4933
|
+
createEntity: <T extends Entity$2>(entityType: T, payload: EntitySchemaMap[T] & {
|
|
4934
|
+
entityId?: string;
|
|
4935
|
+
}) => TransactionCreateEntity<T>;
|
|
4936
|
+
updateEntity: <T extends Entity$2>(entityType: T, entityId: string, payload: Partial<EntitySchemaMap[T]> & {
|
|
4937
|
+
$condition?: string;
|
|
4938
|
+
}) => TransactionUpdateEntity<T>;
|
|
4939
|
+
adjustEntity: <T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number> & {
|
|
4940
|
+
$condition?: string;
|
|
4941
|
+
}) => TransactionAdjustEntity<T>;
|
|
4942
|
+
deleteEntity: <T extends Entity$2>(entityType: T, entityId: string) => TransactionDeleteEntity<T>;
|
|
4943
|
+
};
|
|
4944
|
+
|
|
4817
4945
|
declare class CoreFactory {
|
|
4818
4946
|
private config;
|
|
4819
4947
|
setupCommonRoutes: ReturnType<typeof setupCommonRoutes>;
|
|
4820
4948
|
mutualProcessor: ReturnType<typeof handler$3>;
|
|
4821
4949
|
replicationProcessor: ReturnType<typeof handler$1>;
|
|
4822
|
-
createEntityProcessor: ReturnType<typeof handler$
|
|
4950
|
+
createEntityProcessor: ReturnType<typeof handler$7>;
|
|
4951
|
+
analyticsProcessor: ReturnType<typeof handler$6>;
|
|
4952
|
+
analyticsBackfillProcessor: ReturnType<typeof handler$5>;
|
|
4823
4953
|
prejoinProcessor: ReturnType<typeof handler$2>;
|
|
4824
4954
|
tagProcessor: ReturnType<typeof handler>;
|
|
4825
4955
|
appHandler: ReturnType<typeof appHandler>;
|
|
@@ -4831,4 +4961,4 @@ declare class CoreFactory {
|
|
|
4831
4961
|
});
|
|
4832
4962
|
}
|
|
4833
4963
|
|
|
4834
|
-
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository,
|
|
4964
|
+
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, TransactionService, handler$5 as analyticsBackfillProcessor, handler$4 as analyticsMaterializationProcessor, handler$6 as analyticsProcessor, appHandler, handler$7 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 };
|