@casual-simulation/aux-records 3.3.6 → 3.3.7-alpha.9747723960
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/AIController.d.ts +126 -0
- package/AIController.js +177 -7
- package/AIController.js.map +1 -1
- package/AISloydInterface.d.ts +154 -0
- package/AISloydInterface.js +2 -0
- package/AISloydInterface.js.map +1 -0
- package/AuthController.js +165 -0
- package/AuthController.js.map +1 -1
- package/BlockadeLabsGenerateSkyboxInterface.js +28 -0
- package/BlockadeLabsGenerateSkyboxInterface.js.map +1 -1
- package/DataRecordsController.js +39 -0
- package/DataRecordsController.js.map +1 -1
- package/EventRecordsController.js +33 -0
- package/EventRecordsController.js.map +1 -1
- package/FileRecordsController.js +54 -0
- package/FileRecordsController.js.map +1 -1
- package/GoogleAIChatInterface.js +28 -0
- package/GoogleAIChatInterface.js.map +1 -1
- package/LivekitController.js +15 -0
- package/LivekitController.js.map +1 -1
- package/LoomController.js +15 -0
- package/LoomController.js.map +1 -1
- package/MemoryStore.d.ts +6 -1
- package/MemoryStore.js +41 -0
- package/MemoryStore.js.map +1 -1
- package/MetricsStore.d.ts +65 -0
- package/ModerationController.js +15 -0
- package/ModerationController.js.map +1 -1
- package/OpenAIChatInterface.js +25 -0
- package/OpenAIChatInterface.js.map +1 -1
- package/OpenAIImageInterface.js +19 -0
- package/OpenAIImageInterface.js.map +1 -1
- package/PolicyController.d.ts +26 -1
- package/PolicyController.js +126 -0
- package/PolicyController.js.map +1 -1
- package/PrivoClient.js +40 -0
- package/PrivoClient.js.map +1 -1
- package/RateLimitController.js +15 -0
- package/RateLimitController.js.map +1 -1
- package/RecordsController.js +114 -0
- package/RecordsController.js.map +1 -1
- package/RecordsServer.d.ts +49 -10
- package/RecordsServer.js +152 -4
- package/RecordsServer.js.map +1 -1
- package/SloydInterface.d.ts +16 -0
- package/SloydInterface.js +109 -0
- package/SloydInterface.js.map +1 -0
- package/StabilityAIImageInterface.js +11 -0
- package/StabilityAIImageInterface.js.map +1 -1
- package/SubscriptionConfiguration.d.ts +304 -0
- package/SubscriptionConfiguration.js +33 -0
- package/SubscriptionConfiguration.js.map +1 -1
- package/SubscriptionController.js +35 -0
- package/SubscriptionController.js.map +1 -1
- package/package.json +7 -4
- package/tracing/TracingDecorators.d.ts +18 -0
- package/tracing/TracingDecorators.js +138 -0
- package/tracing/TracingDecorators.js.map +1 -0
- package/websockets/WebsocketController.js +83 -0
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"AISloydInterface.js","sourceRoot":"","sources":["AISloydInterface.ts"],"names":[],"mappings":""}
|
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,
|
|
@@ -1590,6 +1644,9 @@ export class AuthController {
|
|
|
1590
1644
|
};
|
|
1591
1645
|
}
|
|
1592
1646
|
catch (err) {
|
|
1647
|
+
const span = trace.getActiveSpan();
|
|
1648
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
1649
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1593
1650
|
console.error('[AuthController] Error ocurred while revoking session', err);
|
|
1594
1651
|
return {
|
|
1595
1652
|
success: false,
|
|
@@ -1638,6 +1695,9 @@ export class AuthController {
|
|
|
1638
1695
|
};
|
|
1639
1696
|
}
|
|
1640
1697
|
catch (err) {
|
|
1698
|
+
const span = trace.getActiveSpan();
|
|
1699
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
1700
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1641
1701
|
console.error('[AuthController] Error ocurred while revoking all sessions', err);
|
|
1642
1702
|
return {
|
|
1643
1703
|
success: false,
|
|
@@ -1719,6 +1779,9 @@ export class AuthController {
|
|
|
1719
1779
|
};
|
|
1720
1780
|
}
|
|
1721
1781
|
catch (err) {
|
|
1782
|
+
const span = trace.getActiveSpan();
|
|
1783
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
1784
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1722
1785
|
console.error('[AuthController] Error ocurred while replacing session', err);
|
|
1723
1786
|
return {
|
|
1724
1787
|
success: false,
|
|
@@ -1794,6 +1857,9 @@ export class AuthController {
|
|
|
1794
1857
|
};
|
|
1795
1858
|
}
|
|
1796
1859
|
catch (err) {
|
|
1860
|
+
const span = trace.getActiveSpan();
|
|
1861
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
1862
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1797
1863
|
console.error('[AuthController] Error ocurred while listing sessions', err);
|
|
1798
1864
|
return {
|
|
1799
1865
|
success: false,
|
|
@@ -1893,6 +1959,9 @@ export class AuthController {
|
|
|
1893
1959
|
};
|
|
1894
1960
|
}
|
|
1895
1961
|
catch (err) {
|
|
1962
|
+
const span = trace.getActiveSpan();
|
|
1963
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
1964
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1896
1965
|
console.error('[AuthController] Error ocurred while getting user info', err);
|
|
1897
1966
|
return {
|
|
1898
1967
|
success: false,
|
|
@@ -1940,6 +2009,9 @@ export class AuthController {
|
|
|
1940
2009
|
};
|
|
1941
2010
|
}
|
|
1942
2011
|
catch (err) {
|
|
2012
|
+
const span = trace.getActiveSpan();
|
|
2013
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2014
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1943
2015
|
console.error('[AuthController] Error ocurred while getting user info', err);
|
|
1944
2016
|
return {
|
|
1945
2017
|
success: false,
|
|
@@ -2045,6 +2117,9 @@ export class AuthController {
|
|
|
2045
2117
|
};
|
|
2046
2118
|
}
|
|
2047
2119
|
catch (err) {
|
|
2120
|
+
const span = trace.getActiveSpan();
|
|
2121
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2122
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
2048
2123
|
console.error('[AuthController] Error ocurred while getting user info', err);
|
|
2049
2124
|
return {
|
|
2050
2125
|
success: false,
|
|
@@ -2067,6 +2142,9 @@ export class AuthController {
|
|
|
2067
2142
|
};
|
|
2068
2143
|
}
|
|
2069
2144
|
catch (err) {
|
|
2145
|
+
const span = trace.getActiveSpan();
|
|
2146
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2147
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
2070
2148
|
console.error('[AuthController] Error ocurred while listing email rules', err);
|
|
2071
2149
|
return {
|
|
2072
2150
|
success: false,
|
|
@@ -2089,6 +2167,9 @@ export class AuthController {
|
|
|
2089
2167
|
};
|
|
2090
2168
|
}
|
|
2091
2169
|
catch (err) {
|
|
2170
|
+
const span = trace.getActiveSpan();
|
|
2171
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2172
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
2092
2173
|
console.error('[AuthController] Error ocurred while listing email rules', err);
|
|
2093
2174
|
return {
|
|
2094
2175
|
success: false,
|
|
@@ -2127,6 +2208,9 @@ export class AuthController {
|
|
|
2127
2208
|
};
|
|
2128
2209
|
}
|
|
2129
2210
|
catch (err) {
|
|
2211
|
+
const span = trace.getActiveSpan();
|
|
2212
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2213
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
2130
2214
|
console.error('[AuthController] Error ocurred while checking if email address is valid', err);
|
|
2131
2215
|
return {
|
|
2132
2216
|
success: false,
|
|
@@ -2171,6 +2255,9 @@ export class AuthController {
|
|
|
2171
2255
|
};
|
|
2172
2256
|
}
|
|
2173
2257
|
catch (err) {
|
|
2258
|
+
const span = trace.getActiveSpan();
|
|
2259
|
+
span === null || span === void 0 ? void 0 : span.recordException(err);
|
|
2260
|
+
span === null || span === void 0 ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR });
|
|
2174
2261
|
console.error('[AuthController] Error ocurred while checking if display name is valid', err);
|
|
2175
2262
|
return {
|
|
2176
2263
|
success: false,
|
|
@@ -2181,6 +2268,84 @@ export class AuthController {
|
|
|
2181
2268
|
});
|
|
2182
2269
|
}
|
|
2183
2270
|
}
|
|
2271
|
+
__decorate([
|
|
2272
|
+
traced(TRACE_NAME)
|
|
2273
|
+
], AuthController.prototype, "createAccount", null);
|
|
2274
|
+
__decorate([
|
|
2275
|
+
traced(TRACE_NAME)
|
|
2276
|
+
], AuthController.prototype, "requestLogin", null);
|
|
2277
|
+
__decorate([
|
|
2278
|
+
traced(TRACE_NAME)
|
|
2279
|
+
], AuthController.prototype, "completeLogin", null);
|
|
2280
|
+
__decorate([
|
|
2281
|
+
traced(TRACE_NAME)
|
|
2282
|
+
], AuthController.prototype, "requestOpenIDLogin", null);
|
|
2283
|
+
__decorate([
|
|
2284
|
+
traced(TRACE_NAME)
|
|
2285
|
+
], AuthController.prototype, "processOpenIDAuthorizationCode", null);
|
|
2286
|
+
__decorate([
|
|
2287
|
+
traced(TRACE_NAME)
|
|
2288
|
+
], AuthController.prototype, "completeOpenIDLogin", null);
|
|
2289
|
+
__decorate([
|
|
2290
|
+
traced(TRACE_NAME)
|
|
2291
|
+
], AuthController.prototype, "requestPrivoSignUp", null);
|
|
2292
|
+
__decorate([
|
|
2293
|
+
traced(TRACE_NAME)
|
|
2294
|
+
], AuthController.prototype, "requestWebAuthnRegistration", null);
|
|
2295
|
+
__decorate([
|
|
2296
|
+
traced(TRACE_NAME)
|
|
2297
|
+
], AuthController.prototype, "completeWebAuthnRegistration", null);
|
|
2298
|
+
__decorate([
|
|
2299
|
+
traced(TRACE_NAME)
|
|
2300
|
+
], AuthController.prototype, "requestWebAuthnLogin", null);
|
|
2301
|
+
__decorate([
|
|
2302
|
+
traced(TRACE_NAME)
|
|
2303
|
+
], AuthController.prototype, "completeWebAuthnLogin", null);
|
|
2304
|
+
__decorate([
|
|
2305
|
+
traced(TRACE_NAME)
|
|
2306
|
+
], AuthController.prototype, "listUserAuthenticators", null);
|
|
2307
|
+
__decorate([
|
|
2308
|
+
traced(TRACE_NAME)
|
|
2309
|
+
], AuthController.prototype, "deleteUserAuthenticator", null);
|
|
2310
|
+
__decorate([
|
|
2311
|
+
traced(TRACE_NAME)
|
|
2312
|
+
], AuthController.prototype, "validateSessionKey", null);
|
|
2313
|
+
__decorate([
|
|
2314
|
+
traced(TRACE_NAME)
|
|
2315
|
+
], AuthController.prototype, "validateConnectionToken", null);
|
|
2316
|
+
__decorate([
|
|
2317
|
+
traced(TRACE_NAME)
|
|
2318
|
+
], AuthController.prototype, "revokeSession", null);
|
|
2319
|
+
__decorate([
|
|
2320
|
+
traced(TRACE_NAME)
|
|
2321
|
+
], AuthController.prototype, "revokeAllSessions", null);
|
|
2322
|
+
__decorate([
|
|
2323
|
+
traced(TRACE_NAME)
|
|
2324
|
+
], AuthController.prototype, "replaceSession", null);
|
|
2325
|
+
__decorate([
|
|
2326
|
+
traced(TRACE_NAME)
|
|
2327
|
+
], AuthController.prototype, "listSessions", null);
|
|
2328
|
+
__decorate([
|
|
2329
|
+
traced(TRACE_NAME)
|
|
2330
|
+
], AuthController.prototype, "getUserInfo", null);
|
|
2331
|
+
__decorate([
|
|
2332
|
+
traced(TRACE_NAME)
|
|
2333
|
+
], AuthController.prototype, "getPublicUserInfo", null);
|
|
2334
|
+
__decorate([
|
|
2335
|
+
traced(TRACE_NAME)
|
|
2336
|
+
], AuthController.prototype, "updateUserInfo", null);
|
|
2337
|
+
__decorate([
|
|
2338
|
+
traced(TRACE_NAME)
|
|
2339
|
+
], AuthController.prototype, "listEmailRules", null);
|
|
2340
|
+
__decorate([
|
|
2341
|
+
traced(TRACE_NAME)
|
|
2342
|
+
], AuthController.prototype, "listSmsRules", null);
|
|
2343
|
+
__decorate([
|
|
2344
|
+
traced(TRACE_NAME)
|
|
2345
|
+
], AuthController.prototype, "isValidEmailAddress", null);
|
|
2346
|
+
__decorate([
|
|
2347
|
+
traced(TRACE_NAME)
|
|
2348
|
+
], AuthController.prototype, "isValidDisplayName", null);
|
|
2184
2349
|
export function getPrivacyFeaturesFromPermissions(featureIds, permissions) {
|
|
2185
2350
|
const publishData = permissions.some((p) => p.on && p.featureId === featureIds.projectDevelopment);
|
|
2186
2351
|
const allowPublicData = publishData &&
|