monorise 1.1.0-dev.8 → 1.1.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 +54 -162
- package/dist/base/index.js +1 -51
- package/dist/base/index.js.map +1 -1
- package/dist/cli/cli.js +2 -8
- package/dist/cli/cli.js.map +1 -1
- package/dist/core/index.d.ts +60 -147
- package/dist/core/index.js +294 -1761
- package/dist/core/index.js.map +1 -1
- package/dist/react/actions/core.action.d.ts.map +1 -1
- package/dist/react/index.d.ts +4 -53
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +39 -586
- package/dist/react/index.js.map +1 -1
- package/dist/react/services/core.service.d.ts +1 -11
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/sst/components/monorise-core.d.ts +1 -12
- package/dist/sst/components/monorise-core.d.ts.map +1 -1
- package/dist/sst/components/single-table.d.ts +7 -1
- package/dist/sst/components/single-table.d.ts.map +1 -1
- package/dist/sst/index.js +16 -79
- package/dist/sst/index.js.map +1 -1
- package/package.json +6 -11
- package/dist/core/chunk-QV4Q5377.js +0 -76
- package/dist/core/chunk-QV4Q5377.js.map +0 -1
- package/dist/core/service.config-ZJEZ6EKA.js +0 -13
- package/dist/core/service.config-ZJEZ6EKA.js.map +0 -1
- package/dist/proxy/index.d.ts +0 -35
- package/dist/proxy/index.js +0 -75
- package/dist/proxy/index.js.map +0 -1
- package/dist/react/actions/websocket.action.d.ts +0 -71
- package/dist/react/actions/websocket.action.d.ts.map +0 -1
- package/dist/react/chunk-BIXAYYE4.js +0 -432
- package/dist/react/chunk-BIXAYYE4.js.map +0 -1
- package/dist/react/websocket/WebSocketManager.d.ts +0 -68
- package/dist/react/websocket/WebSocketManager.d.ts.map +0 -1
- package/dist/react/websocket/index.d.ts +0 -3
- package/dist/react/websocket/index.d.ts.map +0 -1
- package/dist/react/websocket/optimistic.d.ts +0 -51
- package/dist/react/websocket/optimistic.d.ts.map +0 -1
- package/dist/react/websocket-7MZ3ENOC.js +0 -9
- package/dist/react/websocket-7MZ3ENOC.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig
|
|
2
|
-
export { transactional } from '../base/index';
|
|
1
|
+
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig } from '../base/index';
|
|
3
2
|
import * as hono from 'hono';
|
|
4
3
|
import { Hono } from 'hono';
|
|
5
4
|
import { DynamoDB, TransactWriteItemsInput, AttributeValue, TransactWriteItem, UpdateItemCommandInput } from '@aws-sdk/client-dynamodb';
|
|
@@ -10,7 +9,7 @@ import httpStatus8 from 'http-status';
|
|
|
10
9
|
import { unmarshall, marshall } from '@aws-sdk/util-dynamodb';
|
|
11
10
|
import { EventBridgeClient } from '@aws-sdk/client-eventbridge';
|
|
12
11
|
import * as hono_aws_lambda from 'hono/aws-lambda';
|
|
13
|
-
import { SQSEvent, SQSBatchItemFailure, DynamoDBBatchItemFailure
|
|
12
|
+
import { SQSEvent, SQSBatchItemFailure, DynamoDBBatchItemFailure } from 'aws-lambda';
|
|
14
13
|
import { _Record } from '@aws-sdk/client-dynamodb-streams';
|
|
15
14
|
|
|
16
15
|
type EventDetail = {
|
|
@@ -75,8 +74,9 @@ declare class Entity$1<T extends Entity$2> extends Item$1 {
|
|
|
75
74
|
data: Partial<EntitySchemaMap[T]>;
|
|
76
75
|
private _createdAt?;
|
|
77
76
|
private _updatedAt?;
|
|
77
|
+
private _expiresAt?;
|
|
78
78
|
fullId: string;
|
|
79
|
-
constructor(entityType: T, entityId?: string | undefined, data?: Partial<EntitySchemaMap[T]>, _createdAt?: Date | undefined, _updatedAt?: Date | undefined);
|
|
79
|
+
constructor(entityType: T, entityId?: string | undefined, data?: Partial<EntitySchemaMap[T]>, _createdAt?: Date | undefined, _updatedAt?: Date | undefined, _expiresAt?: Date | undefined);
|
|
80
80
|
static fromItem<T extends Entity$2>(item?: Record<string, AttributeValue>): Entity$1<T>;
|
|
81
81
|
get pk(): string;
|
|
82
82
|
get sk(): string;
|
|
@@ -84,15 +84,23 @@ declare class Entity$1<T extends Entity$2> extends Item$1 {
|
|
|
84
84
|
get emailKeys(): Record<string, AttributeValue>;
|
|
85
85
|
get createdAt(): string | undefined;
|
|
86
86
|
get updatedAt(): string | undefined;
|
|
87
|
+
get expiresAt(): number | undefined;
|
|
87
88
|
toItem(): Record<string, AttributeValue>;
|
|
88
89
|
toJSON(): Record<string, unknown>;
|
|
89
90
|
}
|
|
90
91
|
declare class EntityRepository extends Repository {
|
|
91
92
|
private EntityConfig;
|
|
92
|
-
readonly TABLE_NAME
|
|
93
|
+
private readonly TABLE_NAME;
|
|
93
94
|
private readonly dynamodbClient;
|
|
94
95
|
private readonly EmailAuthEnabledEntities;
|
|
95
96
|
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, TABLE_NAME: string, dynamodbClient: DynamoDB, EmailAuthEnabledEntities: Entity$2[]);
|
|
97
|
+
/**
|
|
98
|
+
* Computes the `expiresAt` Date for an entity via its `ttl.processor` config, if any.
|
|
99
|
+
* When `mergeWithExisting` is true, the processor receives the previous entity's data
|
|
100
|
+
* merged with `incomingData` (falls back to `incomingData` alone if no previous entity
|
|
101
|
+
* exists yet, eg. an upsert-as-create).
|
|
102
|
+
*/
|
|
103
|
+
private computeExpiresAt;
|
|
96
104
|
listEntities<T extends Entity$2>({ entityType, limit, // if this is not set, it will return all items
|
|
97
105
|
between, options, }: {
|
|
98
106
|
entityType: T;
|
|
@@ -124,7 +132,7 @@ declare class EntityRepository extends Repository {
|
|
|
124
132
|
mutualId?: string;
|
|
125
133
|
}): Promise<Entity$1<T>>;
|
|
126
134
|
upsertEntity<T extends Entity$2>(entityType: T, entityId: string, payload: Partial<EntitySchemaMap[T]>): Promise<Entity$1<T>>;
|
|
127
|
-
updateEntityTransactItems<T extends Entity$2>(entity: Entity$1<T>, updateParams: UpdateItemCommandInput, previousUniqueFieldValues: Record<string, string>, previousEntity: Entity$1<T
|
|
135
|
+
updateEntityTransactItems<T extends Entity$2>(entity: Entity$1<T>, updateParams: UpdateItemCommandInput, previousUniqueFieldValues: Record<string, string>, previousEntity: Entity$1<T>, expiresAt?: Date): TransactWriteItem[];
|
|
128
136
|
updateEntity<T extends Entity$2>(entityType: T, entityId: string, toUpdate: {
|
|
129
137
|
data: Partial<EntitySchemaMap[T]>;
|
|
130
138
|
updatedAt?: string;
|
|
@@ -133,10 +141,11 @@ declare class EntityRepository extends Repository {
|
|
|
133
141
|
ExpressionAttributeNames?: Record<string, string>;
|
|
134
142
|
ExpressionAttributeValues?: Record<string, AttributeValue>;
|
|
135
143
|
}): Promise<Entity$1<T>>;
|
|
136
|
-
adjustEntity<T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number>,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
adjustEntity<T extends Entity$2>(entityType: T, entityId: string, adjustments: Record<string, number>, constraints?: {
|
|
145
|
+
[field: string]: {
|
|
146
|
+
min?: number;
|
|
147
|
+
max?: number;
|
|
148
|
+
};
|
|
140
149
|
}): Promise<Entity$1<T>>;
|
|
141
150
|
deleteEntity<T extends Entity$2>(entityType: T, entityId: string): Promise<void>;
|
|
142
151
|
queryEntities<T extends Entity$2>(entityType: T, query: string): Promise<{
|
|
@@ -182,7 +191,7 @@ declare class Mutual<B extends Entity$2, T extends Entity$2, M extends Record<st
|
|
|
182
191
|
get createdAt(): string | undefined;
|
|
183
192
|
get updatedAt(): string | undefined;
|
|
184
193
|
get mutualUpdatedAt(): string | undefined;
|
|
185
|
-
get expiresAt():
|
|
194
|
+
get expiresAt(): number | undefined;
|
|
186
195
|
toItem(): Record<string, AttributeValue>;
|
|
187
196
|
toReversedItem(): Record<string, AttributeValue>;
|
|
188
197
|
toJSON(): Record<string, unknown>;
|
|
@@ -317,47 +326,6 @@ declare class TagRepository extends Repository {
|
|
|
317
326
|
}): Promise<void>;
|
|
318
327
|
}
|
|
319
328
|
|
|
320
|
-
interface ConnectionRecord {
|
|
321
|
-
connectionId: string;
|
|
322
|
-
entityType?: string;
|
|
323
|
-
entityId?: string;
|
|
324
|
-
connectedAt?: string;
|
|
325
|
-
expiresAt?: number;
|
|
326
|
-
}
|
|
327
|
-
interface SubscriptionRecord {
|
|
328
|
-
PK: string;
|
|
329
|
-
SK: string;
|
|
330
|
-
connectionId: string;
|
|
331
|
-
subscriptionType: string;
|
|
332
|
-
feedTypes?: string[];
|
|
333
|
-
[key: string]: unknown;
|
|
334
|
-
}
|
|
335
|
-
interface TicketData {
|
|
336
|
-
entityType: string;
|
|
337
|
-
entityId: string;
|
|
338
|
-
feedTypes: string[];
|
|
339
|
-
}
|
|
340
|
-
declare class WebSocketRepository extends Repository {
|
|
341
|
-
private tableName;
|
|
342
|
-
private dynamodbClient;
|
|
343
|
-
private docClient;
|
|
344
|
-
constructor(tableName: string, dynamodbClient: DynamoDB);
|
|
345
|
-
createConnection(connectionId: string, metadata: Record<string, unknown>, expiresAt: number): Promise<void>;
|
|
346
|
-
getConnection(connectionId: string): Promise<ConnectionRecord | undefined>;
|
|
347
|
-
deleteConnection(connectionId: string): Promise<void>;
|
|
348
|
-
createSubscription(subKey: string, connectionId: string, data: Record<string, unknown>): Promise<void>;
|
|
349
|
-
deleteSubscription(subKey: string, connectionId: string): Promise<void>;
|
|
350
|
-
querySubscriptionsByKey(subKey: string): Promise<SubscriptionRecord[]>;
|
|
351
|
-
querySubscriptionsByConnectionId(connectionId: string): Promise<SubscriptionRecord[]>;
|
|
352
|
-
createTicket(ticket: string, entityType: string, entityId: string, feedTypes: string[], expiresAt: number): Promise<void>;
|
|
353
|
-
consumeTicket(ticket: string): Promise<TicketData | null>;
|
|
354
|
-
queryMutualConnections(byEntityType: string, byEntityId: string): Promise<{
|
|
355
|
-
entityType: string;
|
|
356
|
-
entityId: string;
|
|
357
|
-
}[]>;
|
|
358
|
-
queryFeedSubscriptions(entityType: string, entityId: string): Promise<SubscriptionRecord[]>;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
329
|
var __defProp = Object.defineProperty;
|
|
362
330
|
var __defProps = Object.defineProperties;
|
|
363
331
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -402,10 +370,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
402
370
|
});
|
|
403
371
|
};
|
|
404
372
|
|
|
405
|
-
// configs/service.config.ts
|
|
406
|
-
process.env.CORE_TABLE || "";
|
|
407
|
-
process.env.CORE_EVENT_BUS || "";
|
|
408
|
-
|
|
409
373
|
// errors/standard-error.ts
|
|
410
374
|
var StandardError$1 = class StandardError extends Error {
|
|
411
375
|
constructor(errorCode, message, lastError, context) {
|
|
@@ -438,13 +402,14 @@ var Item = class {
|
|
|
438
402
|
|
|
439
403
|
// data/Entity.ts
|
|
440
404
|
var Entity = class _Entity extends Item {
|
|
441
|
-
constructor(entityType, entityId, data = {}, _createdAt, _updatedAt) {
|
|
405
|
+
constructor(entityType, entityId, data = {}, _createdAt, _updatedAt, _expiresAt) {
|
|
442
406
|
super();
|
|
443
407
|
this.entityType = entityType;
|
|
444
408
|
this.entityId = entityId;
|
|
445
409
|
this.data = data;
|
|
446
410
|
this._createdAt = _createdAt;
|
|
447
411
|
this._updatedAt = _updatedAt;
|
|
412
|
+
this._expiresAt = _expiresAt;
|
|
448
413
|
this.fullId = this.pk;
|
|
449
414
|
}
|
|
450
415
|
static fromItem(item) {
|
|
@@ -459,7 +424,9 @@ var Entity = class _Entity extends Item {
|
|
|
459
424
|
parsedItem.entityId,
|
|
460
425
|
parsedItem.data,
|
|
461
426
|
parsedItem.createdAt ? new Date(parsedItem.createdAt) : void 0,
|
|
462
|
-
parsedItem.updatedAt ? new Date(parsedItem.updatedAt) : void 0
|
|
427
|
+
parsedItem.updatedAt ? new Date(parsedItem.updatedAt) : void 0,
|
|
428
|
+
// expiresAt is stored as epoch seconds (DynamoDB TTL requires type N)
|
|
429
|
+
parsedItem.expiresAt ? new Date(parsedItem.expiresAt * 1e3) : void 0
|
|
463
430
|
);
|
|
464
431
|
}
|
|
465
432
|
get pk() {
|
|
@@ -489,6 +456,9 @@ var Entity = class _Entity extends Item {
|
|
|
489
456
|
var _a;
|
|
490
457
|
return (_a = this._updatedAt) == null ? void 0 : _a.toISOString();
|
|
491
458
|
}
|
|
459
|
+
get expiresAt() {
|
|
460
|
+
return this._expiresAt ? Math.floor(this._expiresAt.getTime() / 1e3) : void 0;
|
|
461
|
+
}
|
|
492
462
|
toItem() {
|
|
493
463
|
return __spreadValues(__spreadValues({}, marshall(this.toJSON(), { removeUndefinedValues: true })), this.keys());
|
|
494
464
|
}
|
|
@@ -498,7 +468,8 @@ var Entity = class _Entity extends Item {
|
|
|
498
468
|
entityId: this.entityId,
|
|
499
469
|
data: this.data,
|
|
500
470
|
createdAt: this.createdAt,
|
|
501
|
-
updatedAt: this.updatedAt
|
|
471
|
+
updatedAt: this.updatedAt,
|
|
472
|
+
expiresAt: this.expiresAt
|
|
502
473
|
};
|
|
503
474
|
}
|
|
504
475
|
};
|
|
@@ -519,6 +490,10 @@ factory.createMiddleware((c, next) => __async(null, null, function* () {
|
|
|
519
490
|
return yield next();
|
|
520
491
|
}));
|
|
521
492
|
|
|
493
|
+
// configs/service.config.ts
|
|
494
|
+
process.env.CORE_TABLE || "";
|
|
495
|
+
process.env.CORE_EVENT_BUS || "";
|
|
496
|
+
|
|
522
497
|
// helpers/event.ts
|
|
523
498
|
new EventBridgeClient();
|
|
524
499
|
|
|
@@ -4487,6 +4462,26 @@ external_exports.object({
|
|
|
4487
4462
|
lastKey: external_exports.string().optional()
|
|
4488
4463
|
});
|
|
4489
4464
|
|
|
4465
|
+
type WhereOperator = {
|
|
4466
|
+
$eq: string | number | boolean;
|
|
4467
|
+
} | {
|
|
4468
|
+
$ne: string | number | boolean;
|
|
4469
|
+
} | {
|
|
4470
|
+
$gt: number;
|
|
4471
|
+
} | {
|
|
4472
|
+
$lt: number;
|
|
4473
|
+
} | {
|
|
4474
|
+
$gte: number;
|
|
4475
|
+
} | {
|
|
4476
|
+
$lte: number;
|
|
4477
|
+
} | {
|
|
4478
|
+
$exists: boolean;
|
|
4479
|
+
} | {
|
|
4480
|
+
$beginsWith: string;
|
|
4481
|
+
};
|
|
4482
|
+
type WhereClause = WhereOperator | string | number | boolean;
|
|
4483
|
+
type WhereConditions = Record<string, WhereClause>;
|
|
4484
|
+
|
|
4490
4485
|
declare class EntityServiceLifeCycle {
|
|
4491
4486
|
private EntityConfig;
|
|
4492
4487
|
private publishEvent;
|
|
@@ -4512,24 +4507,19 @@ declare class EntityService {
|
|
|
4512
4507
|
mutualId?: string;
|
|
4513
4508
|
};
|
|
4514
4509
|
}) => Promise<Entity<T>>;
|
|
4515
|
-
adjustEntity: <T extends Entity$2>({ entityType, entityId, adjustments, accountId,
|
|
4510
|
+
adjustEntity: <T extends Entity$2>({ entityType, entityId, adjustments, accountId, }: {
|
|
4516
4511
|
entityType: T;
|
|
4517
4512
|
entityId: string;
|
|
4518
4513
|
adjustments: Record<string, number>;
|
|
4519
4514
|
accountId?: string;
|
|
4520
|
-
condition?: string;
|
|
4521
4515
|
}) => Promise<Entity<T>>;
|
|
4522
|
-
updateEntity: <T extends Entity$2>({ entityType, entityId, entityPayload, accountId,
|
|
4516
|
+
updateEntity: <T extends Entity$2>({ entityType, entityId, entityPayload, accountId, where, }: {
|
|
4523
4517
|
entityType: T;
|
|
4524
4518
|
entityId: string;
|
|
4525
4519
|
entityPayload: Partial<EntitySchemaMap[T]>;
|
|
4526
4520
|
accountId?: string | string[];
|
|
4527
|
-
condition?: string;
|
|
4528
|
-
/** @deprecated Use `condition` (named condition) instead of raw `where`. */
|
|
4529
4521
|
where?: WhereConditions;
|
|
4530
4522
|
}) => Promise<Entity<T>>;
|
|
4531
|
-
/** @deprecated Converts legacy adjustmentConstraints to condition expression opts. */
|
|
4532
|
-
private buildLegacyAdjustCondition;
|
|
4533
4523
|
deleteEntity: <T extends Entity$2>({ entityType, entityId, accountId, }: {
|
|
4534
4524
|
entityType: T;
|
|
4535
4525
|
entityId: string;
|
|
@@ -4609,14 +4599,12 @@ declare class UpsertEntityController {
|
|
|
4609
4599
|
}
|
|
4610
4600
|
|
|
4611
4601
|
declare class MutualService {
|
|
4612
|
-
private EntityConfig;
|
|
4613
4602
|
private entityRepository;
|
|
4614
4603
|
private mutualRepository;
|
|
4615
4604
|
private publishEvent;
|
|
4616
4605
|
private ddbUtils;
|
|
4617
4606
|
private entityServiceLifeCycle;
|
|
4618
|
-
constructor(
|
|
4619
|
-
private getMutualDataSchema;
|
|
4607
|
+
constructor(entityRepository: EntityRepository, mutualRepository: MutualRepository, publishEvent: typeof publishEvent, ddbUtils: DbUtils, entityServiceLifeCycle: EntityServiceLifeCycle);
|
|
4620
4608
|
createMutual: <B extends Entity$2, T extends Entity$2, A extends Entity$2>({ byEntityType, byEntityId, entityType, entityId, mutualPayload, accountId, options, }: {
|
|
4621
4609
|
byEntityType: B;
|
|
4622
4610
|
byEntityId: string;
|
|
@@ -4635,17 +4623,13 @@ declare class MutualService {
|
|
|
4635
4623
|
ExpressionAttributeValues?: Record<string, AttributeValue>;
|
|
4636
4624
|
};
|
|
4637
4625
|
}) => Promise<{
|
|
4638
|
-
mutual: Mutual<B, T,
|
|
4639
|
-
[x: string]: any;
|
|
4640
|
-
}>;
|
|
4626
|
+
mutual: Mutual<B, T, Record<string, any>>;
|
|
4641
4627
|
eventPayload: {
|
|
4642
4628
|
byEntityType: B;
|
|
4643
4629
|
byEntityId: string;
|
|
4644
4630
|
entityType: T;
|
|
4645
4631
|
entityId: string;
|
|
4646
|
-
parsedMutualPayload:
|
|
4647
|
-
[x: string]: any;
|
|
4648
|
-
};
|
|
4632
|
+
parsedMutualPayload: Record<string, any>;
|
|
4649
4633
|
accountId: string | string[] | undefined;
|
|
4650
4634
|
publishedAt: string;
|
|
4651
4635
|
};
|
|
@@ -4725,40 +4709,6 @@ declare class ListTagsController {
|
|
|
4725
4709
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4726
4710
|
}
|
|
4727
4711
|
|
|
4728
|
-
declare class TransactionService {
|
|
4729
|
-
private EntityConfig;
|
|
4730
|
-
private EmailAuthEnabledEntities;
|
|
4731
|
-
private entityRepository;
|
|
4732
|
-
private dynamodbClient;
|
|
4733
|
-
private publishEvent;
|
|
4734
|
-
private entityServiceLifeCycle;
|
|
4735
|
-
private eventUtils;
|
|
4736
|
-
constructor(EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>, EmailAuthEnabledEntities: Entity$2[], entityRepository: EntityRepository, dynamodbClient: DynamoDB, publishEvent: typeof publishEvent, entityServiceLifeCycle: EntityServiceLifeCycle, eventUtils: EventUtils);
|
|
4737
|
-
executeTransaction: (operations: TransactionOperation[], accountId?: string) => Promise<TransactionResult>;
|
|
4738
|
-
private buildCreateItems;
|
|
4739
|
-
private buildUpdateItem;
|
|
4740
|
-
private buildAdjustItem;
|
|
4741
|
-
private buildDeleteItem;
|
|
4742
|
-
private collectCreateEvents;
|
|
4743
|
-
private collectUpdateEvents;
|
|
4744
|
-
}
|
|
4745
|
-
|
|
4746
|
-
declare class ExecuteTransactionController {
|
|
4747
|
-
private transactionService;
|
|
4748
|
-
constructor(transactionService: TransactionService);
|
|
4749
|
-
controller: hono.MiddlewareHandler<any, string, {}, any>;
|
|
4750
|
-
}
|
|
4751
|
-
|
|
4752
|
-
declare class CreateTicketController {
|
|
4753
|
-
private container;
|
|
4754
|
-
constructor(container: DependencyContainer);
|
|
4755
|
-
controller: hono.MiddlewareHandler<any, string, {}, Response & hono.TypedResponse<{
|
|
4756
|
-
ticket: string;
|
|
4757
|
-
wsUrl: string;
|
|
4758
|
-
expiresIn: number;
|
|
4759
|
-
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
4760
|
-
}
|
|
4761
|
-
|
|
4762
4712
|
declare class DependencyContainer {
|
|
4763
4713
|
config: {
|
|
4764
4714
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4787,7 +4737,6 @@ declare class DependencyContainer {
|
|
|
4787
4737
|
get entityService(): EntityService;
|
|
4788
4738
|
get mutualService(): MutualService;
|
|
4789
4739
|
get tagRepository(): TagRepository;
|
|
4790
|
-
get websocketRepository(): WebSocketRepository;
|
|
4791
4740
|
get getEntityController(): GetEntityController;
|
|
4792
4741
|
get getEntityByUniqueFieldController(): GetEntityByUniqueFieldValueController;
|
|
4793
4742
|
get listEntitiesController(): ListEntitiesController;
|
|
@@ -4802,9 +4751,6 @@ declare class DependencyContainer {
|
|
|
4802
4751
|
get updateMutualController(): UpdateMutualController;
|
|
4803
4752
|
get deleteMutualController(): DeleteMutualController;
|
|
4804
4753
|
get listTagsController(): ListTagsController;
|
|
4805
|
-
get transactionService(): TransactionService;
|
|
4806
|
-
get executeTransactionController(): ExecuteTransactionController;
|
|
4807
|
-
get createTicketController(): CreateTicketController;
|
|
4808
4754
|
}
|
|
4809
4755
|
|
|
4810
4756
|
declare const setupCommonRoutes: (container: DependencyContainer) => Hono;
|
|
@@ -4825,7 +4771,6 @@ declare const StandardErrorCode: {
|
|
|
4825
4771
|
readonly ENTITY_ID_IS_UNDEFINED: "ENTITY_ID_IS_UNDEFINED";
|
|
4826
4772
|
readonly ENTITY_IS_UNDEFINED: "ENTITY_IS_UNDEFINED";
|
|
4827
4773
|
readonly ENTITY_NOT_FOUND: "ENTITY_NOT_FOUND";
|
|
4828
|
-
readonly INVALID_CONDITION: "INVALID_CONDITION";
|
|
4829
4774
|
readonly INVALID_ENTITY_TYPE: "INVALID_ENTITY_TYPE";
|
|
4830
4775
|
readonly INVALID_MUTUAL: "INVALID_MUTUAL";
|
|
4831
4776
|
readonly INVALID_QUERY: "INVALID_QUERY";
|
|
@@ -4838,10 +4783,7 @@ declare const StandardErrorCode: {
|
|
|
4838
4783
|
readonly REPLICATION_ERROR: "REPLICATION_ERROR";
|
|
4839
4784
|
readonly RETRYABLE_MUTUAL_LOCK_CONFLICT: "RETRYABLE_MUTUAL_LOCK_CONFLICT";
|
|
4840
4785
|
readonly TAG_IS_UNDEFINED: "TAG_IS_UNDEFINED";
|
|
4841
|
-
readonly TRANSACTION_EMPTY: "TRANSACTION_EMPTY";
|
|
4842
4786
|
readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
|
|
4843
|
-
readonly TRANSACTION_ITEM_LIMIT_EXCEEDED: "TRANSACTION_ITEM_LIMIT_EXCEEDED";
|
|
4844
|
-
readonly TRANSACTION_UNIQUE_FIELD_UPDATE: "TRANSACTION_UNIQUE_FIELD_UPDATE";
|
|
4845
4787
|
readonly UNIQUE_VALUE_EXISTS: "UNIQUE_VALUE_EXISTS";
|
|
4846
4788
|
};
|
|
4847
4789
|
type StandardErrorCode = typeof StandardErrorCode[keyof typeof StandardErrorCode];
|
|
@@ -4881,31 +4823,6 @@ declare const handler: (container: DependencyContainer) => (ev: SQSEvent) => Pro
|
|
|
4881
4823
|
batchItemFailures: SQSBatchItemFailure[];
|
|
4882
4824
|
}>;
|
|
4883
4825
|
|
|
4884
|
-
type WebSocketConnectEvent = APIGatewayProxyWebsocketEventV2 & {
|
|
4885
|
-
queryStringParameters?: Record<string, string | undefined>;
|
|
4886
|
-
headers?: Record<string, string | undefined>;
|
|
4887
|
-
};
|
|
4888
|
-
/**
|
|
4889
|
-
* $connect handler
|
|
4890
|
-
* Supports two auth modes:
|
|
4891
|
-
* - ticket: ?ticket=abc123 (issued via /ws/ticket/:entityType/:entityId)
|
|
4892
|
-
* - token: ?token=userId (simplified direct auth)
|
|
4893
|
-
*/
|
|
4894
|
-
declare const connect: (container: DependencyContainer) => (event: WebSocketConnectEvent) => Promise<APIGatewayProxyResultV2>;
|
|
4895
|
-
/**
|
|
4896
|
-
* $disconnect handler
|
|
4897
|
-
* Cleans up connection record and all associated subscription records.
|
|
4898
|
-
*/
|
|
4899
|
-
declare const disconnect: (container: DependencyContainer) => (event: APIGatewayProxyWebsocketEventV2) => Promise<APIGatewayProxyResultV2>;
|
|
4900
|
-
/**
|
|
4901
|
-
* $default handler - route messages
|
|
4902
|
-
*/
|
|
4903
|
-
declare const $default: (container: DependencyContainer) => (event: APIGatewayProxyWebsocketEventV2) => Promise<APIGatewayProxyResultV2>;
|
|
4904
|
-
/**
|
|
4905
|
-
* Broadcast handler - triggered by DynamoDB Streams
|
|
4906
|
-
*/
|
|
4907
|
-
declare const broadcast: (container: DependencyContainer) => (event: DynamoDBStreamEvent) => Promise<void>;
|
|
4908
|
-
|
|
4909
4826
|
declare class CoreFactory {
|
|
4910
4827
|
private config;
|
|
4911
4828
|
setupCommonRoutes: ReturnType<typeof setupCommonRoutes>;
|
|
@@ -4915,10 +4832,6 @@ declare class CoreFactory {
|
|
|
4915
4832
|
prejoinProcessor: ReturnType<typeof handler$2>;
|
|
4916
4833
|
tagProcessor: ReturnType<typeof handler>;
|
|
4917
4834
|
appHandler: ReturnType<typeof appHandler>;
|
|
4918
|
-
wsConnect: ReturnType<typeof connect>;
|
|
4919
|
-
wsDisconnect: ReturnType<typeof disconnect>;
|
|
4920
|
-
wsDefault: ReturnType<typeof $default>;
|
|
4921
|
-
wsBroadcast: ReturnType<typeof broadcast>;
|
|
4922
4835
|
dependencyContainer: DependencyContainer;
|
|
4923
4836
|
constructor(config: {
|
|
4924
4837
|
EntityConfig: Record<Entity$2, ReturnType<typeof createEntityConfig>>;
|
|
@@ -4927,4 +4840,4 @@ declare class CoreFactory {
|
|
|
4927
4840
|
});
|
|
4928
4841
|
}
|
|
4929
4842
|
|
|
4930
|
-
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository,
|
|
4843
|
+
export { DependencyContainer, Entity$1 as Entity, EntityRepository, EntityService, Mutual, MutualRepository, MutualService, PROJECTION_EXPRESSION, StandardError, StandardErrorCode, TagRepository, appHandler, handler$4 as createEntityProcessor, CoreFactory as default, handler$3 as mutualProcessor, handler$2 as prejoinProcessor, handler$1 as replicationProcessor, setupCommonRoutes, handler as tagProcessor };
|