@casual-simulation/aux-records 3.3.6 → 3.3.7-alpha.9813347499

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.
Files changed (69) hide show
  1. package/AIController.d.ts +126 -0
  2. package/AIController.js +177 -7
  3. package/AIController.js.map +1 -1
  4. package/AISloydInterface.d.ts +154 -0
  5. package/AISloydInterface.js +2 -0
  6. package/AISloydInterface.js.map +1 -0
  7. package/AuthController.d.ts +4 -0
  8. package/AuthController.js +171 -0
  9. package/AuthController.js.map +1 -1
  10. package/BlockadeLabsGenerateSkyboxInterface.js +28 -0
  11. package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
  12. package/DataRecordsController.js +39 -0
  13. package/DataRecordsController.js.map +1 -1
  14. package/EventRecordsController.js +33 -0
  15. package/EventRecordsController.js.map +1 -1
  16. package/FileRecordsController.js +54 -0
  17. package/FileRecordsController.js.map +1 -1
  18. package/GoogleAIChatInterface.js +28 -0
  19. package/GoogleAIChatInterface.js.map +1 -1
  20. package/LivekitController.js +15 -0
  21. package/LivekitController.js.map +1 -1
  22. package/LoomController.js +15 -0
  23. package/LoomController.js.map +1 -1
  24. package/MemoryStore.d.ts +6 -1
  25. package/MemoryStore.js +41 -0
  26. package/MemoryStore.js.map +1 -1
  27. package/MetricsStore.d.ts +65 -0
  28. package/ModerationController.js +15 -0
  29. package/ModerationController.js.map +1 -1
  30. package/OpenAIChatInterface.js +25 -0
  31. package/OpenAIChatInterface.js.map +1 -1
  32. package/OpenAIImageInterface.js +19 -0
  33. package/OpenAIImageInterface.js.map +1 -1
  34. package/PolicyController.d.ts +26 -1
  35. package/PolicyController.js +126 -0
  36. package/PolicyController.js.map +1 -1
  37. package/PrivoClient.d.ts +6 -0
  38. package/PrivoClient.js +54 -0
  39. package/PrivoClient.js.map +1 -1
  40. package/RateLimitController.js +15 -0
  41. package/RateLimitController.js.map +1 -1
  42. package/RecordsController.js +114 -0
  43. package/RecordsController.js.map +1 -1
  44. package/RecordsServer.d.ts +49 -10
  45. package/RecordsServer.js +152 -4
  46. package/RecordsServer.js.map +1 -1
  47. package/SloydInterface.d.ts +16 -0
  48. package/SloydInterface.js +109 -0
  49. package/SloydInterface.js.map +1 -0
  50. package/StabilityAIImageInterface.js +11 -0
  51. package/StabilityAIImageInterface.js.map +1 -1
  52. package/SubscriptionConfiguration.d.ts +304 -0
  53. package/SubscriptionConfiguration.js +33 -0
  54. package/SubscriptionConfiguration.js.map +1 -1
  55. package/SubscriptionController.js +35 -0
  56. package/SubscriptionController.js.map +1 -1
  57. package/package.json +7 -4
  58. package/tracing/TracingDecorators.d.ts +18 -0
  59. package/tracing/TracingDecorators.js +138 -0
  60. package/tracing/TracingDecorators.js.map +1 -0
  61. package/websockets/MemoryTempInstRecordsStore.d.ts +2 -0
  62. package/websockets/MemoryTempInstRecordsStore.js +19 -0
  63. package/websockets/MemoryTempInstRecordsStore.js.map +1 -1
  64. package/websockets/SplitInstRecordsStore.js +1 -1
  65. package/websockets/SplitInstRecordsStore.js.map +1 -1
  66. package/websockets/TemporaryInstRecordsStore.d.ts +9 -0
  67. package/websockets/WebsocketController.d.ts +3 -1
  68. package/websockets/WebsocketController.js +117 -14
  69. package/websockets/WebsocketController.js.map +1 -1
@@ -0,0 +1,154 @@
1
+ import { ServerError } from '@casual-simulation/aux-common';
2
+ export interface AISloydInterface {
3
+ /**
4
+ * Attempts to create a new model in Sloyd.
5
+ * @param request The request to create the model.
6
+ */
7
+ createModel(request: AISloydInterfaceCreateModelRequest): Promise<AISloydInterfaceCreateModelResponse>;
8
+ /**
9
+ * Attempts to edit a model in Sloyd.
10
+ * @param request The request to edit the model.
11
+ */
12
+ editModel(request: AISloydInterfaceEditModelRequest): Promise<AISloydInterfaceEditModelResponse>;
13
+ }
14
+ /**
15
+ * The request to create a model in Sloyd.
16
+ */
17
+ export interface AISloydInterfaceCreateModelRequest {
18
+ /**
19
+ * The prompt to use for the model.
20
+ */
21
+ prompt: string;
22
+ /**
23
+ * The type of model to create.
24
+ */
25
+ modelMimeType: SloydModelMimeTypes;
26
+ /**
27
+ * The level of detail to use for the model.
28
+ * This is a number between 0.01 and 1.
29
+ * Defaults to 0.5.
30
+ */
31
+ levelOfDetail?: number;
32
+ /**
33
+ * The type of thumbnail preview to create for the model.
34
+ * If not provided, no thumbnail preview will be created.
35
+ */
36
+ thumbnailPreviewExportType?: 'image/png';
37
+ /**
38
+ * The width of the thumbnail preview to create.
39
+ */
40
+ thumbnailPreviewSizeX?: number;
41
+ /**
42
+ * The height of the thumbnail preview to create.
43
+ */
44
+ thumbnailPreviewSizeY?: number;
45
+ }
46
+ export type AISloydInterfaceCreateModelResponse = AISloydInterfaceCreateModelSuccess | AISloydInterfaceCreateModelFailure;
47
+ export interface AISloydInterfaceCreateModelSuccess {
48
+ success: true;
49
+ /**
50
+ * A reference to the generated model.
51
+ */
52
+ interactionId: string;
53
+ /**
54
+ * A basic name for the object.
55
+ */
56
+ name: string;
57
+ /**
58
+ * The generated data of the model.
59
+ */
60
+ modelData: string | Uint8Array;
61
+ /**
62
+ * A score indicating how confident the AI is that the returned object matches the text prompt.
63
+ * See [Using Confidence Score](https://doc.clickup.com/20484704/p/h/kh4k0-8035/ed114594b2af381).
64
+ */
65
+ confidenceScore: number;
66
+ /**
67
+ * The type of model to create.
68
+ */
69
+ modelMimeType: SloydModelMimeTypes;
70
+ /**
71
+ * The base64 encoded thumbnail preview image.
72
+ */
73
+ previewImage?: string;
74
+ }
75
+ export interface AISloydInterfaceCreateModelFailure {
76
+ success: false;
77
+ /**
78
+ * The error code for the failure.
79
+ */
80
+ errorCode: ServerError;
81
+ /**
82
+ * The error message for the failure.
83
+ */
84
+ errorMessage: string;
85
+ }
86
+ export type SloydModelMimeTypes = 'model/gltf+json' | 'model/gltf-binary';
87
+ /**
88
+ * The request to edit a model in Sloyd.
89
+ */
90
+ export interface AISloydInterfaceEditModelRequest {
91
+ /**
92
+ * The interaction ID of the model to edit.
93
+ */
94
+ interactionId: string;
95
+ /**
96
+ * The prompt to use for the model.
97
+ */
98
+ prompt: string;
99
+ /**
100
+ * The type of model to create.
101
+ */
102
+ modelMimeType: SloydModelMimeTypes;
103
+ /**
104
+ * The level of detail to use for the model.
105
+ * This is a number between 0.01 and 1.
106
+ * Defaults to 0.5.
107
+ */
108
+ levelOfDetail?: number;
109
+ /**
110
+ * The type of thumbnail preview to create for the model.
111
+ * If not provided, no thumbnail preview will be created.
112
+ */
113
+ thumbnailPreviewExportType?: 'image/png';
114
+ /**
115
+ * The width of the thumbnail preview to create.
116
+ */
117
+ thumbnailPreviewSizeX?: number;
118
+ /**
119
+ * The height of the thumbnail preview to create.
120
+ */
121
+ thumbnailPreviewSizeY?: number;
122
+ }
123
+ export type AISloydInterfaceEditModelResponse = AISloydInterfaceEditModelSuccess | AISloydInterfaceEditModelFailure;
124
+ export interface AISloydInterfaceEditModelSuccess {
125
+ success: true;
126
+ /**
127
+ * A reference to the generated model.
128
+ */
129
+ interactionId: string;
130
+ /**
131
+ * The model data.
132
+ */
133
+ modelData: string | Uint8Array;
134
+ /**
135
+ * The type of model to create.
136
+ */
137
+ modelMimeType: SloydModelMimeTypes;
138
+ /**
139
+ * The base64 encoded thumbnail preview image.
140
+ */
141
+ previewImage?: string;
142
+ }
143
+ export interface AISloydInterfaceEditModelFailure {
144
+ success: false;
145
+ /**
146
+ * The error code for the failure.
147
+ */
148
+ errorCode: ServerError;
149
+ /**
150
+ * The error message for the failure.
151
+ */
152
+ errorMessage: string;
153
+ }
154
+ //# sourceMappingURL=AISloydInterface.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AISloydInterface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AISloydInterface.js","sourceRoot":"","sources":["AISloydInterface.ts"],"names":[],"mappings":""}
@@ -552,6 +552,10 @@ export interface RevokeSessionRequest {
552
552
  export type RevokeSessionResult = RevokeSessionSuccess | RevokeSessionFailure;
553
553
  export interface RevokeSessionSuccess {
554
554
  success: true;
555
+ /**
556
+ * The URL that the user can be redirected to in order to logout completely.
557
+ */
558
+ logoutUrl?: string;
555
559
  }
556
560
  export interface RevokeSessionFailure {
557
561
  success: false;
package/AuthController.js CHANGED
@@ -1,3 +1,9 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
1
7
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
9
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -17,6 +23,9 @@ import { parseConnectionToken, } from '@casual-simulation/aux-common';
17
23
  import { DateTime } from 'luxon';
18
24
  import { generateAuthenticationOptions, generateRegistrationOptions, verifyAuthenticationResponse, verifyRegistrationResponse, } from '@simplewebauthn/server';
19
25
  import { base64URLStringToBuffer, bufferToBase64URLString, } from './Base64UrlUtils';
26
+ import { traced } from './tracing/TracingDecorators';
27
+ import { SpanStatusCode, trace } from '@opentelemetry/api';
28
+ const TRACE_NAME = 'AuthController';
20
29
  /**
21
30
  * The number of miliseconds that a login request should be valid for before expiration.
22
31
  */
@@ -152,6 +161,9 @@ export class AuthController {
152
161
  };
153
162
  }
154
163
  catch (err) {
164
+ const span = trace.getActiveSpan();
165
+ span === null || span === void 0 ? void 0 : span.recordException(err);
166
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
155
167
  console.error('[AuthController] Error occurred while creating account', err);
156
168
  return {
157
169
  success: false,
@@ -301,6 +313,9 @@ export class AuthController {
301
313
  }
302
314
  }
303
315
  catch (err) {
316
+ const span = trace.getActiveSpan();
317
+ span === null || span === void 0 ? void 0 : span.recordException(err);
318
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
304
319
  console.error('[AuthController] Error Occurred while Creating Login Request', err);
305
320
  return {
306
321
  success: false,
@@ -452,6 +467,9 @@ export class AuthController {
452
467
  };
453
468
  }
454
469
  catch (err) {
470
+ const span = trace.getActiveSpan();
471
+ span === null || span === void 0 ? void 0 : span.recordException(err);
472
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
455
473
  console.error('[AuthController] Error occurred while completing login request', err);
456
474
  return {
457
475
  success: false,
@@ -511,6 +529,9 @@ export class AuthController {
511
529
  };
512
530
  }
513
531
  catch (err) {
532
+ const span = trace.getActiveSpan();
533
+ span === null || span === void 0 ? void 0 : span.recordException(err);
534
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
514
535
  console.error('[AuthController] Error occurred while requesting Privo login', err);
515
536
  return {
516
537
  success: false,
@@ -581,6 +602,9 @@ export class AuthController {
581
602
  };
582
603
  }
583
604
  catch (err) {
605
+ const span = trace.getActiveSpan();
606
+ span === null || span === void 0 ? void 0 : span.recordException(err);
607
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
584
608
  console.error('[AuthController] Error occurred while processing Privo authorization code', err);
585
609
  return {
586
610
  success: false,
@@ -738,6 +762,9 @@ export class AuthController {
738
762
  };
739
763
  }
740
764
  catch (err) {
765
+ const span = trace.getActiveSpan();
766
+ span === null || span === void 0 ? void 0 : span.recordException(err);
767
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
741
768
  console.error('[AuthController] Error occurred while completing Privo login', err);
742
769
  return {
743
770
  success: false,
@@ -899,6 +926,9 @@ export class AuthController {
899
926
  };
900
927
  }
901
928
  catch (err) {
929
+ const span = trace.getActiveSpan();
930
+ span === null || span === void 0 ? void 0 : span.recordException(err);
931
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
902
932
  console.error(`[AuthController] Error occurred while requesting Privo sign up`, err);
903
933
  return {
904
934
  success: false,
@@ -960,6 +990,9 @@ export class AuthController {
960
990
  };
961
991
  }
962
992
  catch (err) {
993
+ const span = trace.getActiveSpan();
994
+ span === null || span === void 0 ? void 0 : span.recordException(err);
995
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
963
996
  console.error(`[AuthController] Error occurred while requesting WebAuthn registration options`, err);
964
997
  return {
965
998
  success: false,
@@ -1043,6 +1076,9 @@ export class AuthController {
1043
1076
  }
1044
1077
  }
1045
1078
  catch (err) {
1079
+ const span = trace.getActiveSpan();
1080
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1081
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1046
1082
  console.error(`[AuthController] Error occurred while completing WebAuthn registration`, err);
1047
1083
  return {
1048
1084
  success: false,
@@ -1092,6 +1128,9 @@ export class AuthController {
1092
1128
  };
1093
1129
  }
1094
1130
  catch (err) {
1131
+ const span = trace.getActiveSpan();
1132
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1133
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1095
1134
  console.error(`[AuthController] Error occurred while requesting WebAuthn login`, err);
1096
1135
  return {
1097
1136
  success: false,
@@ -1228,6 +1267,9 @@ export class AuthController {
1228
1267
  };
1229
1268
  }
1230
1269
  catch (err) {
1270
+ const span = trace.getActiveSpan();
1271
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1272
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1231
1273
  console.error(`[AuthController] Error occurred while requesting WebAuthn login`, err);
1232
1274
  return {
1233
1275
  success: false,
@@ -1265,6 +1307,9 @@ export class AuthController {
1265
1307
  };
1266
1308
  }
1267
1309
  catch (err) {
1310
+ const span = trace.getActiveSpan();
1311
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1312
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1268
1313
  console.error(`[AuthController] Error occurred while listing user authenticators`, err);
1269
1314
  return {
1270
1315
  success: false,
@@ -1297,6 +1342,9 @@ export class AuthController {
1297
1342
  };
1298
1343
  }
1299
1344
  catch (err) {
1345
+ const span = trace.getActiveSpan();
1346
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1347
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1300
1348
  console.error(`[AuthController] Error occurred while deleting a user authenticator`, err);
1301
1349
  return {
1302
1350
  success: false,
@@ -1406,6 +1454,9 @@ export class AuthController {
1406
1454
  };
1407
1455
  }
1408
1456
  catch (err) {
1457
+ const span = trace.getActiveSpan();
1458
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1459
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1409
1460
  console.error('[AuthController] Error ocurred while validating a session key', err);
1410
1461
  return {
1411
1462
  success: false,
@@ -1515,6 +1566,9 @@ export class AuthController {
1515
1566
  };
1516
1567
  }
1517
1568
  catch (err) {
1569
+ const span = trace.getActiveSpan();
1570
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1571
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1518
1572
  console.error('[AuthController] Error ocurred while validating a connection token', err);
1519
1573
  return {
1520
1574
  success: false,
@@ -1525,6 +1579,7 @@ export class AuthController {
1525
1579
  });
1526
1580
  }
1527
1581
  revokeSession(request) {
1582
+ var _a;
1528
1583
  return __awaiter(this, void 0, void 0, function* () {
1529
1584
  if (typeof request.userId !== 'string' || request.userId === '') {
1530
1585
  return {
@@ -1585,11 +1640,19 @@ export class AuthController {
1585
1640
  }
1586
1641
  const newSession = Object.assign(Object.assign({}, session), { revokeTimeMs: Date.now() });
1587
1642
  yield this._store.saveSession(newSession);
1643
+ let logoutUrl;
1644
+ if (session.oidProvider === PRIVO_OPEN_ID_PROVIDER) {
1645
+ logoutUrl = yield this._privoClient.generateLogoutUrl((_a = session.oidIdToken) !== null && _a !== void 0 ? _a : session.oidAccessToken);
1646
+ }
1588
1647
  return {
1589
1648
  success: true,
1649
+ logoutUrl,
1590
1650
  };
1591
1651
  }
1592
1652
  catch (err) {
1653
+ const span = trace.getActiveSpan();
1654
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1655
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1593
1656
  console.error('[AuthController] Error ocurred while revoking session', err);
1594
1657
  return {
1595
1658
  success: false,
@@ -1638,6 +1701,9 @@ export class AuthController {
1638
1701
  };
1639
1702
  }
1640
1703
  catch (err) {
1704
+ const span = trace.getActiveSpan();
1705
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1706
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1641
1707
  console.error('[AuthController] Error ocurred while revoking all sessions', err);
1642
1708
  return {
1643
1709
  success: false,
@@ -1719,6 +1785,9 @@ export class AuthController {
1719
1785
  };
1720
1786
  }
1721
1787
  catch (err) {
1788
+ const span = trace.getActiveSpan();
1789
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1790
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1722
1791
  console.error('[AuthController] Error ocurred while replacing session', err);
1723
1792
  return {
1724
1793
  success: false,
@@ -1794,6 +1863,9 @@ export class AuthController {
1794
1863
  };
1795
1864
  }
1796
1865
  catch (err) {
1866
+ const span = trace.getActiveSpan();
1867
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1868
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1797
1869
  console.error('[AuthController] Error ocurred while listing sessions', err);
1798
1870
  return {
1799
1871
  success: false,
@@ -1893,6 +1965,9 @@ export class AuthController {
1893
1965
  };
1894
1966
  }
1895
1967
  catch (err) {
1968
+ const span = trace.getActiveSpan();
1969
+ span === null || span === void 0 ? void 0 : span.recordException(err);
1970
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1896
1971
  console.error('[AuthController] Error ocurred while getting user info', err);
1897
1972
  return {
1898
1973
  success: false,
@@ -1940,6 +2015,9 @@ export class AuthController {
1940
2015
  };
1941
2016
  }
1942
2017
  catch (err) {
2018
+ const span = trace.getActiveSpan();
2019
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2020
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
1943
2021
  console.error('[AuthController] Error ocurred while getting user info', err);
1944
2022
  return {
1945
2023
  success: false,
@@ -2045,6 +2123,9 @@ export class AuthController {
2045
2123
  };
2046
2124
  }
2047
2125
  catch (err) {
2126
+ const span = trace.getActiveSpan();
2127
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2128
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
2048
2129
  console.error('[AuthController] Error ocurred while getting user info', err);
2049
2130
  return {
2050
2131
  success: false,
@@ -2067,6 +2148,9 @@ export class AuthController {
2067
2148
  };
2068
2149
  }
2069
2150
  catch (err) {
2151
+ const span = trace.getActiveSpan();
2152
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2153
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
2070
2154
  console.error('[AuthController] Error ocurred while listing email rules', err);
2071
2155
  return {
2072
2156
  success: false,
@@ -2089,6 +2173,9 @@ export class AuthController {
2089
2173
  };
2090
2174
  }
2091
2175
  catch (err) {
2176
+ const span = trace.getActiveSpan();
2177
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2178
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
2092
2179
  console.error('[AuthController] Error ocurred while listing email rules', err);
2093
2180
  return {
2094
2181
  success: false,
@@ -2127,6 +2214,9 @@ export class AuthController {
2127
2214
  };
2128
2215
  }
2129
2216
  catch (err) {
2217
+ const span = trace.getActiveSpan();
2218
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2219
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
2130
2220
  console.error('[AuthController] Error ocurred while checking if email address is valid', err);
2131
2221
  return {
2132
2222
  success: false,
@@ -2171,6 +2261,9 @@ export class AuthController {
2171
2261
  };
2172
2262
  }
2173
2263
  catch (err) {
2264
+ const span = trace.getActiveSpan();
2265
+ span === null || span === void 0 ? void 0 : span.recordException(err);
2266
+ span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
2174
2267
  console.error('[AuthController] Error ocurred while checking if display name is valid', err);
2175
2268
  return {
2176
2269
  success: false,
@@ -2181,6 +2274,84 @@ export class AuthController {
2181
2274
  });
2182
2275
  }
2183
2276
  }
2277
+ __decorate([
2278
+ traced(TRACE_NAME)
2279
+ ], AuthController.prototype, "createAccount", null);
2280
+ __decorate([
2281
+ traced(TRACE_NAME)
2282
+ ], AuthController.prototype, "requestLogin", null);
2283
+ __decorate([
2284
+ traced(TRACE_NAME)
2285
+ ], AuthController.prototype, "completeLogin", null);
2286
+ __decorate([
2287
+ traced(TRACE_NAME)
2288
+ ], AuthController.prototype, "requestOpenIDLogin", null);
2289
+ __decorate([
2290
+ traced(TRACE_NAME)
2291
+ ], AuthController.prototype, "processOpenIDAuthorizationCode", null);
2292
+ __decorate([
2293
+ traced(TRACE_NAME)
2294
+ ], AuthController.prototype, "completeOpenIDLogin", null);
2295
+ __decorate([
2296
+ traced(TRACE_NAME)
2297
+ ], AuthController.prototype, "requestPrivoSignUp", null);
2298
+ __decorate([
2299
+ traced(TRACE_NAME)
2300
+ ], AuthController.prototype, "requestWebAuthnRegistration", null);
2301
+ __decorate([
2302
+ traced(TRACE_NAME)
2303
+ ], AuthController.prototype, "completeWebAuthnRegistration", null);
2304
+ __decorate([
2305
+ traced(TRACE_NAME)
2306
+ ], AuthController.prototype, "requestWebAuthnLogin", null);
2307
+ __decorate([
2308
+ traced(TRACE_NAME)
2309
+ ], AuthController.prototype, "completeWebAuthnLogin", null);
2310
+ __decorate([
2311
+ traced(TRACE_NAME)
2312
+ ], AuthController.prototype, "listUserAuthenticators", null);
2313
+ __decorate([
2314
+ traced(TRACE_NAME)
2315
+ ], AuthController.prototype, "deleteUserAuthenticator", null);
2316
+ __decorate([
2317
+ traced(TRACE_NAME)
2318
+ ], AuthController.prototype, "validateSessionKey", null);
2319
+ __decorate([
2320
+ traced(TRACE_NAME)
2321
+ ], AuthController.prototype, "validateConnectionToken", null);
2322
+ __decorate([
2323
+ traced(TRACE_NAME)
2324
+ ], AuthController.prototype, "revokeSession", null);
2325
+ __decorate([
2326
+ traced(TRACE_NAME)
2327
+ ], AuthController.prototype, "revokeAllSessions", null);
2328
+ __decorate([
2329
+ traced(TRACE_NAME)
2330
+ ], AuthController.prototype, "replaceSession", null);
2331
+ __decorate([
2332
+ traced(TRACE_NAME)
2333
+ ], AuthController.prototype, "listSessions", null);
2334
+ __decorate([
2335
+ traced(TRACE_NAME)
2336
+ ], AuthController.prototype, "getUserInfo", null);
2337
+ __decorate([
2338
+ traced(TRACE_NAME)
2339
+ ], AuthController.prototype, "getPublicUserInfo", null);
2340
+ __decorate([
2341
+ traced(TRACE_NAME)
2342
+ ], AuthController.prototype, "updateUserInfo", null);
2343
+ __decorate([
2344
+ traced(TRACE_NAME)
2345
+ ], AuthController.prototype, "listEmailRules", null);
2346
+ __decorate([
2347
+ traced(TRACE_NAME)
2348
+ ], AuthController.prototype, "listSmsRules", null);
2349
+ __decorate([
2350
+ traced(TRACE_NAME)
2351
+ ], AuthController.prototype, "isValidEmailAddress", null);
2352
+ __decorate([
2353
+ traced(TRACE_NAME)
2354
+ ], AuthController.prototype, "isValidDisplayName", null);
2184
2355
  export function getPrivacyFeaturesFromPermissions(featureIds, permissions) {
2185
2356
  const publishData = permissions.some((p) => p.on && p.featureId === featureIds.projectDevelopment);
2186
2357
  const allowPublicData = publishData &&