@genesislcap/foundation-comms 14.185.0 → 14.186.1-alpha-1d915d4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/dts/connect/connect.d.ts +1 -0
  2. package/dist/dts/connect/connect.d.ts.map +1 -1
  3. package/dist/dts/connect/connect.events.d.ts +28 -2
  4. package/dist/dts/connect/connect.events.d.ts.map +1 -1
  5. package/dist/dts/connect/connect.types.d.ts +1 -1
  6. package/dist/dts/connect/connect.types.d.ts.map +1 -1
  7. package/dist/dts/connect/http.connect.d.ts.map +1 -1
  8. package/dist/dts/connect/index.d.ts +1 -0
  9. package/dist/dts/connect/index.d.ts.map +1 -1
  10. package/dist/dts/connect/message.d.ts +6 -2
  11. package/dist/dts/connect/message.d.ts.map +1 -1
  12. package/dist/dts/connect/socket.d.ts +3 -56
  13. package/dist/dts/connect/socket.d.ts.map +1 -1
  14. package/dist/dts/connect/socket.types.d.ts +57 -0
  15. package/dist/dts/connect/socket.types.d.ts.map +1 -0
  16. package/dist/dts/networkMonitor/service.d.ts.map +1 -1
  17. package/dist/esm/connect/connect.events.js +21 -2
  18. package/dist/esm/connect/connect.js +16 -4
  19. package/dist/esm/connect/http.connect.js +1 -0
  20. package/dist/esm/connect/index.js +1 -0
  21. package/dist/esm/connect/message.js +3 -2
  22. package/dist/esm/connect/socket.js +10 -5
  23. package/dist/esm/connect/socket.types.js +1 -0
  24. package/dist/esm/networkMonitor/service.js +18 -8
  25. package/dist/foundation-comms.api.json +342 -8
  26. package/dist/foundation-comms.d.ts +38 -4
  27. package/docs/api/foundation-comms.connectevents.addstreamlistener.md +2 -1
  28. package/docs/api/foundation-comms.connectevents.md +1 -1
  29. package/docs/api/foundation-comms.connecteventsemitter.md +1 -0
  30. package/docs/api/foundation-comms.connecteventsemitter.onstreamerrorevent.md +26 -0
  31. package/docs/api/foundation-comms.defaultconnectevents.addstreamlistener.md +2 -1
  32. package/docs/api/foundation-comms.defaultconnectevents.md +2 -1
  33. package/docs/api/foundation-comms.defaultconnectevents.onstreamerrorevent.md +26 -0
  34. package/docs/api/foundation-comms.md +3 -0
  35. package/docs/api/foundation-comms.pingmessage.md +1 -1
  36. package/docs/api/foundation-comms.streamerrorevent.md +14 -0
  37. package/docs/api/foundation-comms.streamerroreventdetail.md +16 -0
  38. package/docs/api/foundation-comms.streamerroreventtype.md +12 -0
  39. package/docs/api-report.md +23 -5
  40. package/package.json +12 -12
@@ -2402,7 +2402,7 @@
2402
2402
  {
2403
2403
  "kind": "MethodSignature",
2404
2404
  "canonicalReference": "@genesislcap/foundation-comms!ConnectEvents#addStreamListener:member(1)",
2405
- "docComment": "/**\n * Add a stream listener.\n *\n * @param listener - A listener callback function.\n *\n * @param complete - A complete listener callback function.\n */\n",
2405
+ "docComment": "/**\n * Add a stream listener.\n *\n * @param listener - A listener callback function.\n *\n * @param complete - A complete listener callback function.\n *\n * @param error - A error listener callback function.\n */\n",
2406
2406
  "excerptTokens": [
2407
2407
  {
2408
2408
  "kind": "Content",
@@ -2448,6 +2448,28 @@
2448
2448
  "kind": "Content",
2449
2449
  "text": ">"
2450
2450
  },
2451
+ {
2452
+ "kind": "Content",
2453
+ "text": ", error: "
2454
+ },
2455
+ {
2456
+ "kind": "Reference",
2457
+ "text": "Listener",
2458
+ "canonicalReference": "@genesislcap/foundation-utils!Listener:type"
2459
+ },
2460
+ {
2461
+ "kind": "Content",
2462
+ "text": "<"
2463
+ },
2464
+ {
2465
+ "kind": "Reference",
2466
+ "text": "StreamErrorEvent",
2467
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEvent:type"
2468
+ },
2469
+ {
2470
+ "kind": "Content",
2471
+ "text": ">"
2472
+ },
2451
2473
  {
2452
2474
  "kind": "Content",
2453
2475
  "text": "): "
@@ -2463,8 +2485,8 @@
2463
2485
  ],
2464
2486
  "isOptional": false,
2465
2487
  "returnTypeTokenRange": {
2466
- "startIndex": 11,
2467
- "endIndex": 12
2488
+ "startIndex": 16,
2489
+ "endIndex": 17
2468
2490
  },
2469
2491
  "releaseTag": "Public",
2470
2492
  "overloadIndex": 1,
@@ -2484,6 +2506,14 @@
2484
2506
  "endIndex": 10
2485
2507
  },
2486
2508
  "isOptional": false
2509
+ },
2510
+ {
2511
+ "parameterName": "error",
2512
+ "parameterTypeTokenRange": {
2513
+ "startIndex": 11,
2514
+ "endIndex": 15
2515
+ },
2516
+ "isOptional": false
2487
2517
  }
2488
2518
  ],
2489
2519
  "name": "addStreamListener"
@@ -2734,6 +2764,88 @@
2734
2764
  ],
2735
2765
  "name": "onStreamCompleteEvent"
2736
2766
  },
2767
+ {
2768
+ "kind": "MethodSignature",
2769
+ "canonicalReference": "@genesislcap/foundation-comms!ConnectEventsEmitter#onStreamErrorEvent:member(1)",
2770
+ "docComment": "/**\n * Called by Connect.\n *\n * @param resourceName - The name of the resource.\n *\n * @param stream - The actual stream itself.\n *\n * @param error - The error that occurred.\n */\n",
2771
+ "excerptTokens": [
2772
+ {
2773
+ "kind": "Content",
2774
+ "text": "onStreamErrorEvent(resourceName: "
2775
+ },
2776
+ {
2777
+ "kind": "Content",
2778
+ "text": "string"
2779
+ },
2780
+ {
2781
+ "kind": "Content",
2782
+ "text": ", stream: "
2783
+ },
2784
+ {
2785
+ "kind": "Reference",
2786
+ "text": "SocketObservable",
2787
+ "canonicalReference": "@genesislcap/foundation-comms!SocketObservable:class"
2788
+ },
2789
+ {
2790
+ "kind": "Content",
2791
+ "text": "<any>"
2792
+ },
2793
+ {
2794
+ "kind": "Content",
2795
+ "text": ", error: "
2796
+ },
2797
+ {
2798
+ "kind": "Content",
2799
+ "text": "any"
2800
+ },
2801
+ {
2802
+ "kind": "Content",
2803
+ "text": "): "
2804
+ },
2805
+ {
2806
+ "kind": "Content",
2807
+ "text": "void"
2808
+ },
2809
+ {
2810
+ "kind": "Content",
2811
+ "text": ";"
2812
+ }
2813
+ ],
2814
+ "isOptional": false,
2815
+ "returnTypeTokenRange": {
2816
+ "startIndex": 8,
2817
+ "endIndex": 9
2818
+ },
2819
+ "releaseTag": "Public",
2820
+ "overloadIndex": 1,
2821
+ "parameters": [
2822
+ {
2823
+ "parameterName": "resourceName",
2824
+ "parameterTypeTokenRange": {
2825
+ "startIndex": 1,
2826
+ "endIndex": 2
2827
+ },
2828
+ "isOptional": false
2829
+ },
2830
+ {
2831
+ "parameterName": "stream",
2832
+ "parameterTypeTokenRange": {
2833
+ "startIndex": 3,
2834
+ "endIndex": 5
2835
+ },
2836
+ "isOptional": false
2837
+ },
2838
+ {
2839
+ "parameterName": "error",
2840
+ "parameterTypeTokenRange": {
2841
+ "startIndex": 6,
2842
+ "endIndex": 7
2843
+ },
2844
+ "isOptional": false
2845
+ }
2846
+ ],
2847
+ "name": "onStreamErrorEvent"
2848
+ },
2737
2849
  {
2738
2850
  "kind": "MethodSignature",
2739
2851
  "canonicalReference": "@genesislcap/foundation-comms!ConnectEventsEmitter#onStreamEvent:member(1)",
@@ -8478,6 +8590,28 @@
8478
8590
  "kind": "Content",
8479
8591
  "text": ">"
8480
8592
  },
8593
+ {
8594
+ "kind": "Content",
8595
+ "text": ", error: "
8596
+ },
8597
+ {
8598
+ "kind": "Reference",
8599
+ "text": "Listener",
8600
+ "canonicalReference": "@genesislcap/foundation-utils!Listener:type"
8601
+ },
8602
+ {
8603
+ "kind": "Content",
8604
+ "text": "<"
8605
+ },
8606
+ {
8607
+ "kind": "Reference",
8608
+ "text": "StreamErrorEvent",
8609
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEvent:type"
8610
+ },
8611
+ {
8612
+ "kind": "Content",
8613
+ "text": ">"
8614
+ },
8481
8615
  {
8482
8616
  "kind": "Content",
8483
8617
  "text": "): "
@@ -8493,8 +8627,8 @@
8493
8627
  ],
8494
8628
  "isStatic": false,
8495
8629
  "returnTypeTokenRange": {
8496
- "startIndex": 11,
8497
- "endIndex": 12
8630
+ "startIndex": 16,
8631
+ "endIndex": 17
8498
8632
  },
8499
8633
  "releaseTag": "Public",
8500
8634
  "isProtected": false,
@@ -8515,6 +8649,14 @@
8515
8649
  "endIndex": 10
8516
8650
  },
8517
8651
  "isOptional": false
8652
+ },
8653
+ {
8654
+ "parameterName": "error",
8655
+ "parameterTypeTokenRange": {
8656
+ "startIndex": 11,
8657
+ "endIndex": 15
8658
+ },
8659
+ "isOptional": false
8518
8660
  }
8519
8661
  ],
8520
8662
  "isOptional": false,
@@ -8749,6 +8891,91 @@
8749
8891
  "isAbstract": false,
8750
8892
  "name": "onStreamCompleteEvent"
8751
8893
  },
8894
+ {
8895
+ "kind": "Method",
8896
+ "canonicalReference": "@genesislcap/foundation-comms!DefaultConnectEvents#onStreamErrorEvent:member(1)",
8897
+ "docComment": "/**\n * {@inheritDoc ConnectEventsEmitter.onStreamErrorEvent}\n */\n",
8898
+ "excerptTokens": [
8899
+ {
8900
+ "kind": "Content",
8901
+ "text": "onStreamErrorEvent(resourceName: "
8902
+ },
8903
+ {
8904
+ "kind": "Content",
8905
+ "text": "string"
8906
+ },
8907
+ {
8908
+ "kind": "Content",
8909
+ "text": ", stream: "
8910
+ },
8911
+ {
8912
+ "kind": "Reference",
8913
+ "text": "SocketObservable",
8914
+ "canonicalReference": "@genesislcap/foundation-comms!SocketObservable:class"
8915
+ },
8916
+ {
8917
+ "kind": "Content",
8918
+ "text": "<any>"
8919
+ },
8920
+ {
8921
+ "kind": "Content",
8922
+ "text": ", error: "
8923
+ },
8924
+ {
8925
+ "kind": "Content",
8926
+ "text": "any"
8927
+ },
8928
+ {
8929
+ "kind": "Content",
8930
+ "text": "): "
8931
+ },
8932
+ {
8933
+ "kind": "Content",
8934
+ "text": "void"
8935
+ },
8936
+ {
8937
+ "kind": "Content",
8938
+ "text": ";"
8939
+ }
8940
+ ],
8941
+ "isStatic": false,
8942
+ "returnTypeTokenRange": {
8943
+ "startIndex": 8,
8944
+ "endIndex": 9
8945
+ },
8946
+ "releaseTag": "Public",
8947
+ "isProtected": false,
8948
+ "overloadIndex": 1,
8949
+ "parameters": [
8950
+ {
8951
+ "parameterName": "resourceName",
8952
+ "parameterTypeTokenRange": {
8953
+ "startIndex": 1,
8954
+ "endIndex": 2
8955
+ },
8956
+ "isOptional": false
8957
+ },
8958
+ {
8959
+ "parameterName": "stream",
8960
+ "parameterTypeTokenRange": {
8961
+ "startIndex": 3,
8962
+ "endIndex": 5
8963
+ },
8964
+ "isOptional": false
8965
+ },
8966
+ {
8967
+ "parameterName": "error",
8968
+ "parameterTypeTokenRange": {
8969
+ "startIndex": 6,
8970
+ "endIndex": 7
8971
+ },
8972
+ "isOptional": false
8973
+ }
8974
+ ],
8975
+ "isOptional": false,
8976
+ "isAbstract": false,
8977
+ "name": "onStreamErrorEvent"
8978
+ },
8752
8979
  {
8753
8980
  "kind": "Method",
8754
8981
  "canonicalReference": "@genesislcap/foundation-comms!DefaultConnectEvents#onStreamEvent:member(1)",
@@ -21040,7 +21267,7 @@
21040
21267
  {
21041
21268
  "kind": "Variable",
21042
21269
  "canonicalReference": "@genesislcap/foundation-comms!messageHasErrorCode:var",
21043
- "docComment": "/**\n * Check if the message contains an error code.\n *\n * @param message - The message object.\n *\n * @param code - The error code.\n *\n * @public\n */\n",
21270
+ "docComment": "/**\n * Check if the message contains an error code.\n *\n * @param message - The message object.\n *\n * @param code - The error code. Either a {@link http-status-codes#StatusCodes | StatusCodes} number or an entire status code string.\n *\n * @public\n */\n",
21044
21271
  "excerptTokens": [
21045
21272
  {
21046
21273
  "kind": "Content",
@@ -22917,7 +23144,7 @@
22917
23144
  },
22918
23145
  {
22919
23146
  "kind": "Content",
22920
- "text": ", 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS'> & {\n VERBOSE?: boolean;\n [key: string]: any;\n}"
23147
+ "text": ", 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS' | 'SESSION_AUTH_TOKEN'> & {\n VERBOSE?: boolean;\n [key: string]: any;\n}"
22921
23148
  },
22922
23149
  {
22923
23150
  "kind": "Content",
@@ -25202,7 +25429,7 @@
25202
25429
  "text": ";"
25203
25430
  }
25204
25431
  ],
25205
- "fileUrlPath": "src/connect/socket.ts",
25432
+ "fileUrlPath": "src/connect/socket.types.ts",
25206
25433
  "releaseTag": "Public",
25207
25434
  "name": "SocketConnectOptions",
25208
25435
  "typeTokenRange": {
@@ -26060,6 +26287,113 @@
26060
26287
  "endIndex": 0
26061
26288
  }
26062
26289
  },
26290
+ {
26291
+ "kind": "TypeAlias",
26292
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEvent:type",
26293
+ "docComment": "/**\n * @public\n */\n",
26294
+ "excerptTokens": [
26295
+ {
26296
+ "kind": "Content",
26297
+ "text": "export type StreamErrorEvent = "
26298
+ },
26299
+ {
26300
+ "kind": "Reference",
26301
+ "text": "CustomEvent",
26302
+ "canonicalReference": "!CustomEvent:interface"
26303
+ },
26304
+ {
26305
+ "kind": "Content",
26306
+ "text": "<"
26307
+ },
26308
+ {
26309
+ "kind": "Reference",
26310
+ "text": "StreamErrorEventDetail",
26311
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEventDetail:type"
26312
+ },
26313
+ {
26314
+ "kind": "Content",
26315
+ "text": ">"
26316
+ },
26317
+ {
26318
+ "kind": "Content",
26319
+ "text": ";"
26320
+ }
26321
+ ],
26322
+ "fileUrlPath": "src/connect/connect.events.ts",
26323
+ "releaseTag": "Public",
26324
+ "name": "StreamErrorEvent",
26325
+ "typeTokenRange": {
26326
+ "startIndex": 1,
26327
+ "endIndex": 5
26328
+ }
26329
+ },
26330
+ {
26331
+ "kind": "TypeAlias",
26332
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEventDetail:type",
26333
+ "docComment": "/**\n * @public\n */\n",
26334
+ "excerptTokens": [
26335
+ {
26336
+ "kind": "Content",
26337
+ "text": "export type StreamErrorEventDetail = "
26338
+ },
26339
+ {
26340
+ "kind": "Reference",
26341
+ "text": "Pick",
26342
+ "canonicalReference": "!Pick:type"
26343
+ },
26344
+ {
26345
+ "kind": "Content",
26346
+ "text": "<"
26347
+ },
26348
+ {
26349
+ "kind": "Reference",
26350
+ "text": "StreamEventDetail",
26351
+ "canonicalReference": "@genesislcap/foundation-comms!StreamEventDetail:type"
26352
+ },
26353
+ {
26354
+ "kind": "Content",
26355
+ "text": ", 'resourceName' | 'stream'> & {\n error: any;\n}"
26356
+ },
26357
+ {
26358
+ "kind": "Content",
26359
+ "text": ";"
26360
+ }
26361
+ ],
26362
+ "fileUrlPath": "src/connect/connect.events.ts",
26363
+ "releaseTag": "Public",
26364
+ "name": "StreamErrorEventDetail",
26365
+ "typeTokenRange": {
26366
+ "startIndex": 1,
26367
+ "endIndex": 5
26368
+ }
26369
+ },
26370
+ {
26371
+ "kind": "Variable",
26372
+ "canonicalReference": "@genesislcap/foundation-comms!StreamErrorEventType:var",
26373
+ "docComment": "/**\n * @public\n */\n",
26374
+ "excerptTokens": [
26375
+ {
26376
+ "kind": "Content",
26377
+ "text": "StreamErrorEventType = "
26378
+ },
26379
+ {
26380
+ "kind": "Content",
26381
+ "text": "\"connect-stream-error-event\""
26382
+ }
26383
+ ],
26384
+ "fileUrlPath": "src/connect/connect.events.ts",
26385
+ "initializerTokenRange": {
26386
+ "startIndex": 1,
26387
+ "endIndex": 2
26388
+ },
26389
+ "isReadonly": true,
26390
+ "releaseTag": "Public",
26391
+ "name": "StreamErrorEventType",
26392
+ "variableTypeTokenRange": {
26393
+ "startIndex": 0,
26394
+ "endIndex": 0
26395
+ }
26396
+ },
26063
26397
  {
26064
26398
  "kind": "TypeAlias",
26065
26399
  "canonicalReference": "@genesislcap/foundation-comms!StreamEvent:type",
@@ -270,6 +270,7 @@ export declare interface Connect {
270
270
  streamState(resourceName: string, onMessage: Function, onError: Function, params?: any, initialState?: any[]): Observable<any[]>;
271
271
  /**
272
272
  * Starts listening for updates on the specified resource without auto-teardown.
273
+ * @deprecated - Use `stream` instead. Will be removed in v15.
273
274
  * @alpha
274
275
  * @param resourceName - The name of the resource to listen for updates on.
275
276
  * @param onMessage - A callback function to handle received messages.
@@ -379,8 +380,9 @@ export declare interface ConnectEvents {
379
380
  * Add a stream listener.
380
381
  * @param listener - A listener callback function.
381
382
  * @param complete - A complete listener callback function.
383
+ * @param error - A error listener callback function.
382
384
  */
383
- addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
385
+ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
384
386
  /**
385
387
  * Add a commit listener.
386
388
  * @param listener - A listener callback function.
@@ -417,6 +419,13 @@ export declare interface ConnectEventsEmitter extends ConnectEvents {
417
419
  * @param functions - Any functions provided.
418
420
  */
419
421
  onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
422
+ /**
423
+ * Called by Connect.
424
+ * @param resourceName - The name of the resource.
425
+ * @param stream - The actual stream itself.
426
+ * @param error - The error that occurred.
427
+ */
428
+ onStreamErrorEvent(resourceName: string, stream: SocketObservable<any>, error: any): void;
420
429
  /**
421
430
  * Called by Connect.
422
431
  * @param resourceName - The name of the resource.
@@ -1195,10 +1204,14 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter {
1195
1204
  protected streamListeners: Observer<StreamEvent>;
1196
1205
  /** @internal */
1197
1206
  protected streamCompleteListeners: Observer<StreamCompleteEvent>;
1207
+ /** @internal */
1208
+ protected streamErrorListeners: Observer<StreamErrorEvent>;
1198
1209
  /** {@inheritDoc ConnectEvents.addStreamListener} */
1199
- addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
1210
+ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
1200
1211
  /** {@inheritDoc ConnectEventsEmitter.onStreamEvent} */
1201
1212
  onStreamEvent(resourceName: string, message: Message<MessageDetails.DataserverRequest>, stream: SocketObservable<any>, functions: StreamEventFunctions): void;
1213
+ /** {@inheritDoc ConnectEventsEmitter.onStreamErrorEvent} */
1214
+ onStreamErrorEvent(resourceName: string, stream: SocketObservable<any>, error: any): void;
1202
1215
  /** {@inheritDoc ConnectEventsEmitter.onStreamCompleteEvent} */
1203
1216
  onStreamCompleteEvent(resourceName: string, stream: SocketObservable<any>): void;
1204
1217
  /** @internal */
@@ -2548,6 +2561,10 @@ export declare type Message<T = void | any> = {
2548
2561
 
2549
2562
  /**
2550
2563
  * A utility class for building different types of messages.
2564
+ *
2565
+ * @privateRemarks
2566
+ * The SESSION_AUTH_TOKEN etc in messages should probably be removed with the move to cookies.
2567
+ *
2551
2568
  * @public
2552
2569
  */
2553
2570
  export declare interface MessageBuilder {
@@ -2861,7 +2878,7 @@ export declare type MessageError = {
2861
2878
  /**
2862
2879
  * Check if the message contains an error code.
2863
2880
  * @param message - The message object.
2864
- * @param code - The error code.
2881
+ * @param code - The error code. Either a {@link http-status-codes#StatusCodes | StatusCodes} number or an entire status code string.
2865
2882
  * @public
2866
2883
  */
2867
2884
  export declare const messageHasErrorCode: (message: Message, code: string | number) => boolean;
@@ -3149,7 +3166,7 @@ export declare function normaliseCriteria(criteria: string, delimiter?: string):
3149
3166
  /**
3150
3167
  * @public
3151
3168
  */
3152
- export declare type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS'> & {
3169
+ export declare type PingMessage = Pick<Message, 'MESSAGE_TYPE' | 'SOURCE_REF' | 'DETAILS' | 'SESSION_AUTH_TOKEN'> & {
3153
3170
  VERBOSE?: boolean;
3154
3171
  [key: string]: any;
3155
3172
  };
@@ -3779,6 +3796,23 @@ export declare type StreamCompleteEventDetail = Pick<StreamEventDetail, 'resourc
3779
3796
  */
3780
3797
  export declare const StreamCompleteEventType = "connect-stream-complete-event";
3781
3798
 
3799
+ /**
3800
+ * @public
3801
+ */
3802
+ export declare type StreamErrorEvent = CustomEvent<StreamErrorEventDetail>;
3803
+
3804
+ /**
3805
+ * @public
3806
+ */
3807
+ export declare type StreamErrorEventDetail = Pick<StreamEventDetail, 'resourceName' | 'stream'> & {
3808
+ error: any;
3809
+ };
3810
+
3811
+ /**
3812
+ * @public
3813
+ */
3814
+ export declare const StreamErrorEventType = "connect-stream-error-event";
3815
+
3782
3816
  /**
3783
3817
  * @public
3784
3818
  */
@@ -9,7 +9,7 @@ Add a stream listener.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
12
+ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -18,6 +18,7 @@ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamComp
18
18
  | --- | --- | --- |
19
19
  | listener | Listener&lt;[StreamEvent](./foundation-comms.streamevent.md)<!-- -->&gt; | A listener callback function. |
20
20
  | complete | Listener&lt;[StreamCompleteEvent](./foundation-comms.streamcompleteevent.md)<!-- -->&gt; | A complete listener callback function. |
21
+ | error | Listener&lt;[StreamErrorEvent](./foundation-comms.streamerrorevent.md)<!-- -->&gt; | A error listener callback function. |
21
22
 
22
23
  **Returns:**
23
24
 
@@ -18,5 +18,5 @@ export interface ConnectEvents
18
18
  | --- | --- |
19
19
  | [addCommitListener(listener)](./foundation-comms.connectevents.addcommitlistener.md) | Add a commit listener. |
20
20
  | [addMetadataListener(listener)](./foundation-comms.connectevents.addmetadatalistener.md) | Add a metadata listener. |
21
- | [addStreamListener(listener, complete)](./foundation-comms.connectevents.addstreamlistener.md) | Add a stream listener. |
21
+ | [addStreamListener(listener, complete, error)](./foundation-comms.connectevents.addstreamlistener.md) | Add a stream listener. |
22
22
 
@@ -20,5 +20,6 @@ export interface ConnectEventsEmitter extends ConnectEvents
20
20
  | [onCommitEvent(eventName, message)](./foundation-comms.connecteventsemitter.oncommitevent.md) | Called by Connect. |
21
21
  | [onMetadataEvent(resourceName, message, error)](./foundation-comms.connecteventsemitter.onmetadataevent.md) | Called by Connect. |
22
22
  | [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.connecteventsemitter.onstreamcompleteevent.md) | Called by Connect. |
23
+ | [onStreamErrorEvent(resourceName, stream, error)](./foundation-comms.connecteventsemitter.onstreamerrorevent.md) | Called by Connect. |
23
24
  | [onStreamEvent(resourceName, message, stream, functions)](./foundation-comms.connecteventsemitter.onstreamevent.md) | Called by Connect. |
24
25
 
@@ -0,0 +1,26 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [ConnectEventsEmitter](./foundation-comms.connecteventsemitter.md) &gt; [onStreamErrorEvent](./foundation-comms.connecteventsemitter.onstreamerrorevent.md)
4
+
5
+ ## ConnectEventsEmitter.onStreamErrorEvent() method
6
+
7
+ Called by Connect.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ onStreamErrorEvent(resourceName: string, stream: SocketObservable<any>, error: any): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | resourceName | string | The name of the resource. |
20
+ | stream | [SocketObservable](./foundation-comms.socketobservable.md)<!-- -->&lt;any&gt; | The actual stream itself. |
21
+ | error | any | The error that occurred. |
22
+
23
+ **Returns:**
24
+
25
+ void
26
+
@@ -9,7 +9,7 @@ Add a stream listener.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>): () => void;
12
+ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamCompleteEvent>, error: Listener<StreamErrorEvent>): () => void;
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -18,6 +18,7 @@ addStreamListener(listener: Listener<StreamEvent>, complete: Listener<StreamComp
18
18
  | --- | --- | --- |
19
19
  | listener | Listener&lt;[StreamEvent](./foundation-comms.streamevent.md)<!-- -->&gt; | A listener callback function. |
20
20
  | complete | Listener&lt;[StreamCompleteEvent](./foundation-comms.streamcompleteevent.md)<!-- -->&gt; | A complete listener callback function. |
21
+ | error | Listener&lt;[StreamErrorEvent](./foundation-comms.streamerrorevent.md)<!-- -->&gt; | A error listener callback function. |
21
22
 
22
23
  **Returns:**
23
24
 
@@ -19,9 +19,10 @@ export declare class DefaultConnectEvents implements ConnectEventsEmitter
19
19
  | --- | --- | --- |
20
20
  | [addCommitListener(listener)](./foundation-comms.defaultconnectevents.addcommitlistener.md) | | Add a commit listener. |
21
21
  | [addMetadataListener(listener)](./foundation-comms.defaultconnectevents.addmetadatalistener.md) | | Add a metadata listener. |
22
- | [addStreamListener(listener, complete)](./foundation-comms.defaultconnectevents.addstreamlistener.md) | | Add a stream listener. |
22
+ | [addStreamListener(listener, complete, error)](./foundation-comms.defaultconnectevents.addstreamlistener.md) | | Add a stream listener. |
23
23
  | [onCommitEvent(eventName, message)](./foundation-comms.defaultconnectevents.oncommitevent.md) | | Called by Connect. |
24
24
  | [onMetadataEvent(resourceName, message, error)](./foundation-comms.defaultconnectevents.onmetadataevent.md) | | Called by Connect. |
25
25
  | [onStreamCompleteEvent(resourceName, stream)](./foundation-comms.defaultconnectevents.onstreamcompleteevent.md) | | Called by Connect. |
26
+ | [onStreamErrorEvent(resourceName, stream, error)](./foundation-comms.defaultconnectevents.onstreamerrorevent.md) | | Called by Connect. |
26
27
  | [onStreamEvent(resourceName, message, stream, functions)](./foundation-comms.defaultconnectevents.onstreamevent.md) | | Called by Connect. |
27
28
 
@@ -0,0 +1,26 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-comms](./foundation-comms.md) &gt; [DefaultConnectEvents](./foundation-comms.defaultconnectevents.md) &gt; [onStreamErrorEvent](./foundation-comms.defaultconnectevents.onstreamerrorevent.md)
4
+
5
+ ## DefaultConnectEvents.onStreamErrorEvent() method
6
+
7
+ Called by Connect.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ onStreamErrorEvent(resourceName: string, stream: SocketObservable<any>, error: any): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | resourceName | string | The name of the resource. |
20
+ | stream | [SocketObservable](./foundation-comms.socketobservable.md)<!-- -->&lt;any&gt; | The actual stream itself. |
21
+ | error | any | The error that occurred. |
22
+
23
+ **Returns:**
24
+
25
+ void
26
+
@@ -122,6 +122,7 @@
122
122
  | [networkLogger](./foundation-comms.networklogger.md) | |
123
123
  | [retryInterval](./foundation-comms.retryinterval.md) | Generate reconnect interval based on scheduler |
124
124
  | [StreamCompleteEventType](./foundation-comms.streamcompleteeventtype.md) | |
125
+ | [StreamErrorEventType](./foundation-comms.streamerroreventtype.md) | |
125
126
  | [StreamEventType](./foundation-comms.streameventtype.md) | |
126
127
  | [SystemHealthChanged](./foundation-comms.systemhealthchanged.md) | SystemHealthChanged. |
127
128
  | [toFieldMetadata](./foundation-comms.tofieldmetadata.md) | Converts the field definitions to field metadata. |
@@ -175,6 +176,8 @@
175
176
  | [StorageType](./foundation-comms.storagetype.md) | The available browser storage types. |
176
177
  | [StreamCompleteEvent](./foundation-comms.streamcompleteevent.md) | |
177
178
  | [StreamCompleteEventDetail](./foundation-comms.streamcompleteeventdetail.md) | |
179
+ | [StreamErrorEvent](./foundation-comms.streamerrorevent.md) | |
180
+ | [StreamErrorEventDetail](./foundation-comms.streamerroreventdetail.md) | |
178
181
  | [StreamEvent](./foundation-comms.streamevent.md) | |
179
182
  | [StreamEventDetail](./foundation-comms.streameventdetail.md) | |
180
183
  | [StreamEventFunctions](./foundation-comms.streameventfunctions.md) | |