@genesislcap/foundation-comms 14.493.1-alpha-8ff3328.0 → 14.495.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.
@@ -0,0 +1,48 @@
1
+ import type { Connect } from './connect';
2
+ import type { CommitParams, Message } from './message';
3
+ /**
4
+ * Wire-shaped event message: PAL `MESSAGE_TYPE` plus DETAILS.
5
+ * @public
6
+ */
7
+ export interface GenesisEventContract<E extends string = string, D extends object = Record<string, unknown>> {
8
+ readonly MESSAGE_TYPE: E;
9
+ readonly DETAILS: D;
10
+ }
11
+ /**
12
+ * Base class for generated per-handler events. Subclasses declare `MESSAGE_TYPE`;
13
+ * `DETAILS` is typed by the generated `*Details` interface.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * export class EventFoo extends GenesisEvent<'EVENT_FOO', FooInputDetails> {
18
+ * readonly MESSAGE_TYPE = 'EVENT_FOO' as const;
19
+ * constructor(details: FooInputDetails) {
20
+ * super(details);
21
+ * }
22
+ * }
23
+ * ```
24
+ *
25
+ * @public
26
+ */
27
+ export declare abstract class GenesisEvent<E extends string, D extends object> implements GenesisEventContract<E, D> {
28
+ readonly DETAILS: D;
29
+ abstract readonly MESSAGE_TYPE: E;
30
+ constructor(DETAILS: D);
31
+ }
32
+ /**
33
+ * Commit options excluding `DETAILS` and `MESSAGE_TYPE`.
34
+ * @public
35
+ */
36
+ export type GenesisEventCommitOptions = Omit<CommitParams, 'DETAILS' | 'MESSAGE_TYPE'>;
37
+ /**
38
+ * Commit a generated event instance (or any `GenesisEventContract`).
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * await commitGenesisEvent(connect, new EventAqsCounterpartyInsert({ COUNTERPARTY_ID: '1' }));
43
+ * ```
44
+ *
45
+ * @public
46
+ */
47
+ export declare function commitGenesisEvent<E extends string, D extends object>(connect: Connect, message: GenesisEventContract<E, D>, options?: GenesisEventCommitOptions): Promise<Message>;
48
+ //# sourceMappingURL=genesisEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genesisEvent.d.ts","sourceRoot":"","sources":["../../../src/connect/genesisEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB,CACnC,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1C,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,YAAY,CAChC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAChB,YAAW,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC;aAGT,OAAO,EAAE,CAAC;IAFtC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;gBAEN,OAAO,EAAE,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,cAAc,CAAC,CAAC;AAEvF;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EACnE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,EACnC,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,OAAO,CAAC,CAElB"}
@@ -1,3 +1,4 @@
1
+ export * from './genesisEvent';
1
2
  export * from './connect';
2
3
  export * from './connect.events';
3
4
  export * from './connect.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Base class for generated per-handler events. Subclasses declare `MESSAGE_TYPE`;
3
+ * `DETAILS` is typed by the generated `*Details` interface.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * export class EventFoo extends GenesisEvent<'EVENT_FOO', FooInputDetails> {
8
+ * readonly MESSAGE_TYPE = 'EVENT_FOO' as const;
9
+ * constructor(details: FooInputDetails) {
10
+ * super(details);
11
+ * }
12
+ * }
13
+ * ```
14
+ *
15
+ * @public
16
+ */
17
+ export class GenesisEvent {
18
+ constructor(DETAILS) {
19
+ this.DETAILS = DETAILS;
20
+ }
21
+ }
22
+ /**
23
+ * Commit a generated event instance (or any `GenesisEventContract`).
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * await commitGenesisEvent(connect, new EventAqsCounterpartyInsert({ COUNTERPARTY_ID: '1' }));
28
+ * ```
29
+ *
30
+ * @public
31
+ */
32
+ export function commitGenesisEvent(connect, message, options) {
33
+ return connect.commitEvent(message.MESSAGE_TYPE, Object.assign(Object.assign({}, options), { DETAILS: message.DETAILS }));
34
+ }
@@ -1,3 +1,4 @@
1
+ export * from './genesisEvent';
1
2
  export * from './connect';
2
3
  export * from './connect.events';
3
4
  export * from './connect.types';
@@ -1234,6 +1234,144 @@
1234
1234
  "endIndex": 0
1235
1235
  }
1236
1236
  },
1237
+ {
1238
+ "kind": "Function",
1239
+ "canonicalReference": "@genesislcap/foundation-comms!commitGenesisEvent:function(1)",
1240
+ "docComment": "/**\n * Commit a generated event instance (or any `GenesisEventContract`).\n *\n * @example\n * ```ts\n * await commitGenesisEvent(connect, new EventAqsCounterpartyInsert({ COUNTERPARTY_ID: '1' }));\n * ```\n *\n * @public\n */\n",
1241
+ "excerptTokens": [
1242
+ {
1243
+ "kind": "Content",
1244
+ "text": "export declare function commitGenesisEvent<E extends "
1245
+ },
1246
+ {
1247
+ "kind": "Content",
1248
+ "text": "string"
1249
+ },
1250
+ {
1251
+ "kind": "Content",
1252
+ "text": ", D extends "
1253
+ },
1254
+ {
1255
+ "kind": "Content",
1256
+ "text": "object"
1257
+ },
1258
+ {
1259
+ "kind": "Content",
1260
+ "text": ">(connect: "
1261
+ },
1262
+ {
1263
+ "kind": "Reference",
1264
+ "text": "Connect",
1265
+ "canonicalReference": "@genesislcap/foundation-comms!Connect:interface"
1266
+ },
1267
+ {
1268
+ "kind": "Content",
1269
+ "text": ", message: "
1270
+ },
1271
+ {
1272
+ "kind": "Reference",
1273
+ "text": "GenesisEventContract",
1274
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventContract:interface"
1275
+ },
1276
+ {
1277
+ "kind": "Content",
1278
+ "text": "<E, D>"
1279
+ },
1280
+ {
1281
+ "kind": "Content",
1282
+ "text": ", options?: "
1283
+ },
1284
+ {
1285
+ "kind": "Reference",
1286
+ "text": "GenesisEventCommitOptions",
1287
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventCommitOptions:type"
1288
+ },
1289
+ {
1290
+ "kind": "Content",
1291
+ "text": "): "
1292
+ },
1293
+ {
1294
+ "kind": "Reference",
1295
+ "text": "Promise",
1296
+ "canonicalReference": "!Promise:interface"
1297
+ },
1298
+ {
1299
+ "kind": "Content",
1300
+ "text": "<"
1301
+ },
1302
+ {
1303
+ "kind": "Reference",
1304
+ "text": "Message",
1305
+ "canonicalReference": "@genesislcap/foundation-comms!Message:type"
1306
+ },
1307
+ {
1308
+ "kind": "Content",
1309
+ "text": ">"
1310
+ },
1311
+ {
1312
+ "kind": "Content",
1313
+ "text": ";"
1314
+ }
1315
+ ],
1316
+ "fileUrlPath": "src/connect/genesisEvent.ts",
1317
+ "returnTypeTokenRange": {
1318
+ "startIndex": 12,
1319
+ "endIndex": 16
1320
+ },
1321
+ "releaseTag": "Public",
1322
+ "overloadIndex": 1,
1323
+ "parameters": [
1324
+ {
1325
+ "parameterName": "connect",
1326
+ "parameterTypeTokenRange": {
1327
+ "startIndex": 5,
1328
+ "endIndex": 6
1329
+ },
1330
+ "isOptional": false
1331
+ },
1332
+ {
1333
+ "parameterName": "message",
1334
+ "parameterTypeTokenRange": {
1335
+ "startIndex": 7,
1336
+ "endIndex": 9
1337
+ },
1338
+ "isOptional": false
1339
+ },
1340
+ {
1341
+ "parameterName": "options",
1342
+ "parameterTypeTokenRange": {
1343
+ "startIndex": 10,
1344
+ "endIndex": 11
1345
+ },
1346
+ "isOptional": true
1347
+ }
1348
+ ],
1349
+ "typeParameters": [
1350
+ {
1351
+ "typeParameterName": "E",
1352
+ "constraintTokenRange": {
1353
+ "startIndex": 1,
1354
+ "endIndex": 2
1355
+ },
1356
+ "defaultTypeTokenRange": {
1357
+ "startIndex": 0,
1358
+ "endIndex": 0
1359
+ }
1360
+ },
1361
+ {
1362
+ "typeParameterName": "D",
1363
+ "constraintTokenRange": {
1364
+ "startIndex": 3,
1365
+ "endIndex": 4
1366
+ },
1367
+ "defaultTypeTokenRange": {
1368
+ "startIndex": 0,
1369
+ "endIndex": 0
1370
+ }
1371
+ }
1372
+ ],
1373
+ "name": "commitGenesisEvent"
1374
+ },
1237
1375
  {
1238
1376
  "kind": "TypeAlias",
1239
1377
  "canonicalReference": "@genesislcap/foundation-comms!CommitParams:type",
@@ -25979,6 +26117,348 @@
25979
26117
  "endIndex": 2
25980
26118
  }
25981
26119
  },
26120
+ {
26121
+ "kind": "Class",
26122
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEvent:class",
26123
+ "docComment": "/**\n * Base class for generated per-handler events. Subclasses declare `MESSAGE_TYPE`; `DETAILS` is typed by the generated `*Details` interface.\n *\n * @example\n * ```ts\n * export class EventFoo extends GenesisEvent<'EVENT_FOO', FooInputDetails> {\n * readonly MESSAGE_TYPE = 'EVENT_FOO' as const;\n * constructor(details: FooInputDetails) {\n * super(details);\n * }\n * }\n * ```\n *\n * @public\n */\n",
26124
+ "excerptTokens": [
26125
+ {
26126
+ "kind": "Content",
26127
+ "text": "export declare abstract class GenesisEvent<E extends "
26128
+ },
26129
+ {
26130
+ "kind": "Content",
26131
+ "text": "string"
26132
+ },
26133
+ {
26134
+ "kind": "Content",
26135
+ "text": ", D extends "
26136
+ },
26137
+ {
26138
+ "kind": "Content",
26139
+ "text": "object"
26140
+ },
26141
+ {
26142
+ "kind": "Content",
26143
+ "text": "> implements "
26144
+ },
26145
+ {
26146
+ "kind": "Reference",
26147
+ "text": "GenesisEventContract",
26148
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventContract:interface"
26149
+ },
26150
+ {
26151
+ "kind": "Content",
26152
+ "text": "<E, D>"
26153
+ },
26154
+ {
26155
+ "kind": "Content",
26156
+ "text": " "
26157
+ }
26158
+ ],
26159
+ "fileUrlPath": "src/connect/genesisEvent.ts",
26160
+ "releaseTag": "Public",
26161
+ "typeParameters": [
26162
+ {
26163
+ "typeParameterName": "E",
26164
+ "constraintTokenRange": {
26165
+ "startIndex": 1,
26166
+ "endIndex": 2
26167
+ },
26168
+ "defaultTypeTokenRange": {
26169
+ "startIndex": 0,
26170
+ "endIndex": 0
26171
+ }
26172
+ },
26173
+ {
26174
+ "typeParameterName": "D",
26175
+ "constraintTokenRange": {
26176
+ "startIndex": 3,
26177
+ "endIndex": 4
26178
+ },
26179
+ "defaultTypeTokenRange": {
26180
+ "startIndex": 0,
26181
+ "endIndex": 0
26182
+ }
26183
+ }
26184
+ ],
26185
+ "isAbstract": true,
26186
+ "name": "GenesisEvent",
26187
+ "preserveMemberOrder": false,
26188
+ "members": [
26189
+ {
26190
+ "kind": "Constructor",
26191
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEvent:constructor(1)",
26192
+ "docComment": "/**\n * Constructs a new instance of the `GenesisEvent` class\n */\n",
26193
+ "excerptTokens": [
26194
+ {
26195
+ "kind": "Content",
26196
+ "text": "constructor(DETAILS: "
26197
+ },
26198
+ {
26199
+ "kind": "Content",
26200
+ "text": "D"
26201
+ },
26202
+ {
26203
+ "kind": "Content",
26204
+ "text": ");"
26205
+ }
26206
+ ],
26207
+ "releaseTag": "Public",
26208
+ "isProtected": false,
26209
+ "overloadIndex": 1,
26210
+ "parameters": [
26211
+ {
26212
+ "parameterName": "DETAILS",
26213
+ "parameterTypeTokenRange": {
26214
+ "startIndex": 1,
26215
+ "endIndex": 2
26216
+ },
26217
+ "isOptional": false
26218
+ }
26219
+ ]
26220
+ },
26221
+ {
26222
+ "kind": "Property",
26223
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEvent#DETAILS:member",
26224
+ "docComment": "",
26225
+ "excerptTokens": [
26226
+ {
26227
+ "kind": "Content",
26228
+ "text": "readonly DETAILS: "
26229
+ },
26230
+ {
26231
+ "kind": "Content",
26232
+ "text": "D"
26233
+ },
26234
+ {
26235
+ "kind": "Content",
26236
+ "text": ";"
26237
+ }
26238
+ ],
26239
+ "isReadonly": true,
26240
+ "isOptional": false,
26241
+ "releaseTag": "Public",
26242
+ "name": "DETAILS",
26243
+ "propertyTypeTokenRange": {
26244
+ "startIndex": 1,
26245
+ "endIndex": 2
26246
+ },
26247
+ "isStatic": false,
26248
+ "isProtected": false,
26249
+ "isAbstract": false
26250
+ },
26251
+ {
26252
+ "kind": "Property",
26253
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEvent#MESSAGE_TYPE:member",
26254
+ "docComment": "",
26255
+ "excerptTokens": [
26256
+ {
26257
+ "kind": "Content",
26258
+ "text": "abstract readonly MESSAGE_TYPE: "
26259
+ },
26260
+ {
26261
+ "kind": "Content",
26262
+ "text": "E"
26263
+ },
26264
+ {
26265
+ "kind": "Content",
26266
+ "text": ";"
26267
+ }
26268
+ ],
26269
+ "isReadonly": true,
26270
+ "isOptional": false,
26271
+ "releaseTag": "Public",
26272
+ "name": "MESSAGE_TYPE",
26273
+ "propertyTypeTokenRange": {
26274
+ "startIndex": 1,
26275
+ "endIndex": 2
26276
+ },
26277
+ "isStatic": false,
26278
+ "isProtected": false,
26279
+ "isAbstract": true
26280
+ }
26281
+ ],
26282
+ "implementsTokenRanges": [
26283
+ {
26284
+ "startIndex": 5,
26285
+ "endIndex": 7
26286
+ }
26287
+ ]
26288
+ },
26289
+ {
26290
+ "kind": "TypeAlias",
26291
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventCommitOptions:type",
26292
+ "docComment": "/**\n * Commit options excluding `DETAILS` and `MESSAGE_TYPE`.\n *\n * @public\n */\n",
26293
+ "excerptTokens": [
26294
+ {
26295
+ "kind": "Content",
26296
+ "text": "export type GenesisEventCommitOptions = "
26297
+ },
26298
+ {
26299
+ "kind": "Reference",
26300
+ "text": "Omit",
26301
+ "canonicalReference": "!Omit:type"
26302
+ },
26303
+ {
26304
+ "kind": "Content",
26305
+ "text": "<"
26306
+ },
26307
+ {
26308
+ "kind": "Reference",
26309
+ "text": "CommitParams",
26310
+ "canonicalReference": "@genesislcap/foundation-comms!CommitParams:type"
26311
+ },
26312
+ {
26313
+ "kind": "Content",
26314
+ "text": ", 'DETAILS' | 'MESSAGE_TYPE'>"
26315
+ },
26316
+ {
26317
+ "kind": "Content",
26318
+ "text": ";"
26319
+ }
26320
+ ],
26321
+ "fileUrlPath": "src/connect/genesisEvent.ts",
26322
+ "releaseTag": "Public",
26323
+ "name": "GenesisEventCommitOptions",
26324
+ "typeTokenRange": {
26325
+ "startIndex": 1,
26326
+ "endIndex": 5
26327
+ }
26328
+ },
26329
+ {
26330
+ "kind": "Interface",
26331
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventContract:interface",
26332
+ "docComment": "/**\n * Wire-shaped event message: PAL `MESSAGE_TYPE` plus DETAILS.\n *\n * @public\n */\n",
26333
+ "excerptTokens": [
26334
+ {
26335
+ "kind": "Content",
26336
+ "text": "export interface GenesisEventContract<E extends "
26337
+ },
26338
+ {
26339
+ "kind": "Content",
26340
+ "text": "string"
26341
+ },
26342
+ {
26343
+ "kind": "Content",
26344
+ "text": " = "
26345
+ },
26346
+ {
26347
+ "kind": "Content",
26348
+ "text": "string"
26349
+ },
26350
+ {
26351
+ "kind": "Content",
26352
+ "text": ", D extends "
26353
+ },
26354
+ {
26355
+ "kind": "Content",
26356
+ "text": "object"
26357
+ },
26358
+ {
26359
+ "kind": "Content",
26360
+ "text": " = "
26361
+ },
26362
+ {
26363
+ "kind": "Reference",
26364
+ "text": "Record",
26365
+ "canonicalReference": "!Record:type"
26366
+ },
26367
+ {
26368
+ "kind": "Content",
26369
+ "text": "<string, unknown>"
26370
+ },
26371
+ {
26372
+ "kind": "Content",
26373
+ "text": "> "
26374
+ }
26375
+ ],
26376
+ "fileUrlPath": "src/connect/genesisEvent.ts",
26377
+ "releaseTag": "Public",
26378
+ "typeParameters": [
26379
+ {
26380
+ "typeParameterName": "E",
26381
+ "constraintTokenRange": {
26382
+ "startIndex": 1,
26383
+ "endIndex": 2
26384
+ },
26385
+ "defaultTypeTokenRange": {
26386
+ "startIndex": 3,
26387
+ "endIndex": 4
26388
+ }
26389
+ },
26390
+ {
26391
+ "typeParameterName": "D",
26392
+ "constraintTokenRange": {
26393
+ "startIndex": 5,
26394
+ "endIndex": 6
26395
+ },
26396
+ "defaultTypeTokenRange": {
26397
+ "startIndex": 7,
26398
+ "endIndex": 9
26399
+ }
26400
+ }
26401
+ ],
26402
+ "name": "GenesisEventContract",
26403
+ "preserveMemberOrder": false,
26404
+ "members": [
26405
+ {
26406
+ "kind": "PropertySignature",
26407
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventContract#DETAILS:member",
26408
+ "docComment": "",
26409
+ "excerptTokens": [
26410
+ {
26411
+ "kind": "Content",
26412
+ "text": "readonly DETAILS: "
26413
+ },
26414
+ {
26415
+ "kind": "Content",
26416
+ "text": "D"
26417
+ },
26418
+ {
26419
+ "kind": "Content",
26420
+ "text": ";"
26421
+ }
26422
+ ],
26423
+ "isReadonly": true,
26424
+ "isOptional": false,
26425
+ "releaseTag": "Public",
26426
+ "name": "DETAILS",
26427
+ "propertyTypeTokenRange": {
26428
+ "startIndex": 1,
26429
+ "endIndex": 2
26430
+ }
26431
+ },
26432
+ {
26433
+ "kind": "PropertySignature",
26434
+ "canonicalReference": "@genesislcap/foundation-comms!GenesisEventContract#MESSAGE_TYPE:member",
26435
+ "docComment": "",
26436
+ "excerptTokens": [
26437
+ {
26438
+ "kind": "Content",
26439
+ "text": "readonly MESSAGE_TYPE: "
26440
+ },
26441
+ {
26442
+ "kind": "Content",
26443
+ "text": "E"
26444
+ },
26445
+ {
26446
+ "kind": "Content",
26447
+ "text": ";"
26448
+ }
26449
+ ],
26450
+ "isReadonly": true,
26451
+ "isOptional": false,
26452
+ "releaseTag": "Public",
26453
+ "name": "MESSAGE_TYPE",
26454
+ "propertyTypeTokenRange": {
26455
+ "startIndex": 1,
26456
+ "endIndex": 2
26457
+ }
26458
+ }
26459
+ ],
26460
+ "extendsTokenRanges": []
26461
+ },
25982
26462
  {
25983
26463
  "kind": "Interface",
25984
26464
  "canonicalReference": "@genesislcap/foundation-comms!GenesisResources:interface",
@@ -214,6 +214,18 @@ declare type CommitEventDetail_2 = {
214
214
  */
215
215
  export declare const CommitEventType = "connect-commit-event";
216
216
 
217
+ /**
218
+ * Commit a generated event instance (or any `GenesisEventContract`).
219
+ *
220
+ * @example
221
+ * ```ts
222
+ * await commitGenesisEvent(connect, new EventAqsCounterpartyInsert({ COUNTERPARTY_ID: '1' }));
223
+ * ```
224
+ *
225
+ * @public
226
+ */
227
+ export declare function commitGenesisEvent<E extends string, D extends object>(connect: Connect, message: GenesisEventContract<E, D>, options?: GenesisEventCommitOptions): Promise<Message>;
228
+
217
229
  /**
218
230
  * Parameters for a COMMIT message
219
231
  * @public
@@ -2924,6 +2936,43 @@ export declare enum FoundationAnalyticsEventType {
2924
2936
  */
2925
2937
  export declare type GenesisConnectEvents = 'stream' | 'commit';
2926
2938
 
2939
+ /**
2940
+ * Base class for generated per-handler events. Subclasses declare `MESSAGE_TYPE`;
2941
+ * `DETAILS` is typed by the generated `*Details` interface.
2942
+ *
2943
+ * @example
2944
+ * ```ts
2945
+ * export class EventFoo extends GenesisEvent<'EVENT_FOO', FooInputDetails> {
2946
+ * readonly MESSAGE_TYPE = 'EVENT_FOO' as const;
2947
+ * constructor(details: FooInputDetails) {
2948
+ * super(details);
2949
+ * }
2950
+ * }
2951
+ * ```
2952
+ *
2953
+ * @public
2954
+ */
2955
+ export declare abstract class GenesisEvent<E extends string, D extends object> implements GenesisEventContract<E, D> {
2956
+ readonly DETAILS: D;
2957
+ abstract readonly MESSAGE_TYPE: E;
2958
+ constructor(DETAILS: D);
2959
+ }
2960
+
2961
+ /**
2962
+ * Commit options excluding `DETAILS` and `MESSAGE_TYPE`.
2963
+ * @public
2964
+ */
2965
+ export declare type GenesisEventCommitOptions = Omit<CommitParams, 'DETAILS' | 'MESSAGE_TYPE'>;
2966
+
2967
+ /**
2968
+ * Wire-shaped event message: PAL `MESSAGE_TYPE` plus DETAILS.
2969
+ * @public
2970
+ */
2971
+ export declare interface GenesisEventContract<E extends string = string, D extends object = Record<string, unknown>> {
2972
+ readonly MESSAGE_TYPE: E;
2973
+ readonly DETAILS: D;
2974
+ }
2975
+
2927
2976
  /**
2928
2977
  * GenesisResources DI interface.
2929
2978
  * @remarks
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-comms",
3
3
  "description": "Genesis Foundation UI Comms",
4
- "version": "14.493.1-alpha-8ff3328.0",
4
+ "version": "14.495.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -77,24 +77,24 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@genesislcap/foundation-testing": "14.493.1-alpha-8ff3328.0",
81
- "@genesislcap/genx": "14.493.1-alpha-8ff3328.0",
82
- "@genesislcap/rollup-builder": "14.493.1-alpha-8ff3328.0",
83
- "@genesislcap/ts-builder": "14.493.1-alpha-8ff3328.0",
84
- "@genesislcap/uvu-playwright-builder": "14.493.1-alpha-8ff3328.0",
85
- "@genesislcap/vite-builder": "14.493.1-alpha-8ff3328.0",
86
- "@genesislcap/webpack-builder": "14.493.1-alpha-8ff3328.0",
80
+ "@genesislcap/foundation-testing": "14.495.0",
81
+ "@genesislcap/genx": "14.495.0",
82
+ "@genesislcap/rollup-builder": "14.495.0",
83
+ "@genesislcap/ts-builder": "14.495.0",
84
+ "@genesislcap/uvu-playwright-builder": "14.495.0",
85
+ "@genesislcap/vite-builder": "14.495.0",
86
+ "@genesislcap/webpack-builder": "14.495.0",
87
87
  "@types/js-cookie": "^3.0.2",
88
88
  "@types/json-schema": "^7.0.11",
89
89
  "@types/webappsec-credential-management": "^0.6.2",
90
90
  "sinon": "^17.0.1"
91
91
  },
92
92
  "dependencies": {
93
- "@genesislcap/foundation-broadcast-channel": "14.493.1-alpha-8ff3328.0",
94
- "@genesislcap/foundation-logger": "14.493.1-alpha-8ff3328.0",
95
- "@genesislcap/foundation-user": "14.493.1-alpha-8ff3328.0",
96
- "@genesislcap/foundation-utils": "14.493.1-alpha-8ff3328.0",
97
- "@genesislcap/web-core": "14.493.1-alpha-8ff3328.0",
93
+ "@genesislcap/foundation-broadcast-channel": "14.495.0",
94
+ "@genesislcap/foundation-logger": "14.495.0",
95
+ "@genesislcap/foundation-user": "14.495.0",
96
+ "@genesislcap/foundation-utils": "14.495.0",
97
+ "@genesislcap/web-core": "14.495.0",
98
98
  "@microsoft/fast-element": "1.14.0",
99
99
  "@microsoft/fast-foundation": "2.50.0",
100
100
  "bowser": "^2.11.0",
@@ -112,5 +112,5 @@
112
112
  "publishConfig": {
113
113
  "access": "public"
114
114
  },
115
- "gitHead": "8c565dfbaf36c06f5a28278da59043c5453c564a"
115
+ "gitHead": "24d26a75271717d40c0b6168b983bd8536a3db7f"
116
116
  }