@arbidocs/client 0.3.16 → 0.3.18
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/README.md +8 -8
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -2
- package/dist/index.d.ts +82 -2
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -67,6 +67,26 @@ interface paths {
|
|
|
67
67
|
patch?: never;
|
|
68
68
|
trace?: never;
|
|
69
69
|
};
|
|
70
|
+
'/v1/user/sso-config': {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: never;
|
|
74
|
+
path?: never;
|
|
75
|
+
cookie?: never;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Get Sso Config
|
|
79
|
+
* @description Return public SSO configuration for device-flow / CLI login.
|
|
80
|
+
*/
|
|
81
|
+
get: operations['get_sso_config'];
|
|
82
|
+
put?: never;
|
|
83
|
+
post?: never;
|
|
84
|
+
delete?: never;
|
|
85
|
+
options?: never;
|
|
86
|
+
head?: never;
|
|
87
|
+
patch?: never;
|
|
88
|
+
trace?: never;
|
|
89
|
+
};
|
|
70
90
|
'/v1/user/sso-status': {
|
|
71
91
|
parameters: {
|
|
72
92
|
query?: never;
|
|
@@ -164,7 +184,7 @@ interface paths {
|
|
|
164
184
|
put?: never;
|
|
165
185
|
/**
|
|
166
186
|
* Logout
|
|
167
|
-
* @description Log out the current user
|
|
187
|
+
* @description Log out the current user. Pass ?all_sessions=true to log out from all devices.
|
|
168
188
|
*/
|
|
169
189
|
post: operations['logout'];
|
|
170
190
|
delete?: never;
|
|
@@ -5005,6 +5025,34 @@ interface components {
|
|
|
5005
5025
|
detail_evaluation?: components['schemas']['EvaluationDetail'] | null;
|
|
5006
5026
|
detail_tool_progress?: components['schemas']['ToolProgressDetail'] | null;
|
|
5007
5027
|
};
|
|
5028
|
+
/**
|
|
5029
|
+
* SSOConfigResponse
|
|
5030
|
+
* @description Public SSO configuration for device flow / CLI login.
|
|
5031
|
+
*/
|
|
5032
|
+
SSOConfigResponse: {
|
|
5033
|
+
/** Sso Enabled */
|
|
5034
|
+
sso_enabled: boolean;
|
|
5035
|
+
/**
|
|
5036
|
+
* Domain
|
|
5037
|
+
* @default
|
|
5038
|
+
*/
|
|
5039
|
+
domain: string;
|
|
5040
|
+
/**
|
|
5041
|
+
* Client Id
|
|
5042
|
+
* @default
|
|
5043
|
+
*/
|
|
5044
|
+
client_id: string;
|
|
5045
|
+
/**
|
|
5046
|
+
* Cli Client Id
|
|
5047
|
+
* @default
|
|
5048
|
+
*/
|
|
5049
|
+
cli_client_id: string;
|
|
5050
|
+
/**
|
|
5051
|
+
* Audience
|
|
5052
|
+
* @default
|
|
5053
|
+
*/
|
|
5054
|
+
audience: string;
|
|
5055
|
+
};
|
|
5008
5056
|
/** SSOSendVerificationEmailRequest */
|
|
5009
5057
|
SSOSendVerificationEmailRequest: {
|
|
5010
5058
|
/** Auth0 Id */
|
|
@@ -6353,6 +6401,26 @@ interface operations {
|
|
|
6353
6401
|
};
|
|
6354
6402
|
};
|
|
6355
6403
|
};
|
|
6404
|
+
get_sso_config: {
|
|
6405
|
+
parameters: {
|
|
6406
|
+
query?: never;
|
|
6407
|
+
header?: never;
|
|
6408
|
+
path?: never;
|
|
6409
|
+
cookie?: never;
|
|
6410
|
+
};
|
|
6411
|
+
requestBody?: never;
|
|
6412
|
+
responses: {
|
|
6413
|
+
/** @description Successful Response */
|
|
6414
|
+
200: {
|
|
6415
|
+
headers: {
|
|
6416
|
+
[name: string]: unknown;
|
|
6417
|
+
};
|
|
6418
|
+
content: {
|
|
6419
|
+
'application/json': components['schemas']['SSOConfigResponse'];
|
|
6420
|
+
};
|
|
6421
|
+
};
|
|
6422
|
+
};
|
|
6423
|
+
};
|
|
6356
6424
|
sso_status: {
|
|
6357
6425
|
parameters: {
|
|
6358
6426
|
query?: never;
|
|
@@ -6454,7 +6522,10 @@ interface operations {
|
|
|
6454
6522
|
};
|
|
6455
6523
|
logout: {
|
|
6456
6524
|
parameters: {
|
|
6457
|
-
query?:
|
|
6525
|
+
query?: {
|
|
6526
|
+
/** @description If true, log out from all sessions (all devices) */
|
|
6527
|
+
all_sessions?: boolean;
|
|
6528
|
+
};
|
|
6458
6529
|
header?: never;
|
|
6459
6530
|
path?: never;
|
|
6460
6531
|
cookie?: never;
|
|
@@ -6470,6 +6541,15 @@ interface operations {
|
|
|
6470
6541
|
'application/json': components['schemas']['LogoutResponse'];
|
|
6471
6542
|
};
|
|
6472
6543
|
};
|
|
6544
|
+
/** @description Validation Error */
|
|
6545
|
+
422: {
|
|
6546
|
+
headers: {
|
|
6547
|
+
[name: string]: unknown;
|
|
6548
|
+
};
|
|
6549
|
+
content: {
|
|
6550
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
6551
|
+
};
|
|
6552
|
+
};
|
|
6473
6553
|
};
|
|
6474
6554
|
};
|
|
6475
6555
|
change_password: {
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,26 @@ interface paths {
|
|
|
67
67
|
patch?: never;
|
|
68
68
|
trace?: never;
|
|
69
69
|
};
|
|
70
|
+
'/v1/user/sso-config': {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: never;
|
|
74
|
+
path?: never;
|
|
75
|
+
cookie?: never;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Get Sso Config
|
|
79
|
+
* @description Return public SSO configuration for device-flow / CLI login.
|
|
80
|
+
*/
|
|
81
|
+
get: operations['get_sso_config'];
|
|
82
|
+
put?: never;
|
|
83
|
+
post?: never;
|
|
84
|
+
delete?: never;
|
|
85
|
+
options?: never;
|
|
86
|
+
head?: never;
|
|
87
|
+
patch?: never;
|
|
88
|
+
trace?: never;
|
|
89
|
+
};
|
|
70
90
|
'/v1/user/sso-status': {
|
|
71
91
|
parameters: {
|
|
72
92
|
query?: never;
|
|
@@ -164,7 +184,7 @@ interface paths {
|
|
|
164
184
|
put?: never;
|
|
165
185
|
/**
|
|
166
186
|
* Logout
|
|
167
|
-
* @description Log out the current user
|
|
187
|
+
* @description Log out the current user. Pass ?all_sessions=true to log out from all devices.
|
|
168
188
|
*/
|
|
169
189
|
post: operations['logout'];
|
|
170
190
|
delete?: never;
|
|
@@ -5005,6 +5025,34 @@ interface components {
|
|
|
5005
5025
|
detail_evaluation?: components['schemas']['EvaluationDetail'] | null;
|
|
5006
5026
|
detail_tool_progress?: components['schemas']['ToolProgressDetail'] | null;
|
|
5007
5027
|
};
|
|
5028
|
+
/**
|
|
5029
|
+
* SSOConfigResponse
|
|
5030
|
+
* @description Public SSO configuration for device flow / CLI login.
|
|
5031
|
+
*/
|
|
5032
|
+
SSOConfigResponse: {
|
|
5033
|
+
/** Sso Enabled */
|
|
5034
|
+
sso_enabled: boolean;
|
|
5035
|
+
/**
|
|
5036
|
+
* Domain
|
|
5037
|
+
* @default
|
|
5038
|
+
*/
|
|
5039
|
+
domain: string;
|
|
5040
|
+
/**
|
|
5041
|
+
* Client Id
|
|
5042
|
+
* @default
|
|
5043
|
+
*/
|
|
5044
|
+
client_id: string;
|
|
5045
|
+
/**
|
|
5046
|
+
* Cli Client Id
|
|
5047
|
+
* @default
|
|
5048
|
+
*/
|
|
5049
|
+
cli_client_id: string;
|
|
5050
|
+
/**
|
|
5051
|
+
* Audience
|
|
5052
|
+
* @default
|
|
5053
|
+
*/
|
|
5054
|
+
audience: string;
|
|
5055
|
+
};
|
|
5008
5056
|
/** SSOSendVerificationEmailRequest */
|
|
5009
5057
|
SSOSendVerificationEmailRequest: {
|
|
5010
5058
|
/** Auth0 Id */
|
|
@@ -6353,6 +6401,26 @@ interface operations {
|
|
|
6353
6401
|
};
|
|
6354
6402
|
};
|
|
6355
6403
|
};
|
|
6404
|
+
get_sso_config: {
|
|
6405
|
+
parameters: {
|
|
6406
|
+
query?: never;
|
|
6407
|
+
header?: never;
|
|
6408
|
+
path?: never;
|
|
6409
|
+
cookie?: never;
|
|
6410
|
+
};
|
|
6411
|
+
requestBody?: never;
|
|
6412
|
+
responses: {
|
|
6413
|
+
/** @description Successful Response */
|
|
6414
|
+
200: {
|
|
6415
|
+
headers: {
|
|
6416
|
+
[name: string]: unknown;
|
|
6417
|
+
};
|
|
6418
|
+
content: {
|
|
6419
|
+
'application/json': components['schemas']['SSOConfigResponse'];
|
|
6420
|
+
};
|
|
6421
|
+
};
|
|
6422
|
+
};
|
|
6423
|
+
};
|
|
6356
6424
|
sso_status: {
|
|
6357
6425
|
parameters: {
|
|
6358
6426
|
query?: never;
|
|
@@ -6454,7 +6522,10 @@ interface operations {
|
|
|
6454
6522
|
};
|
|
6455
6523
|
logout: {
|
|
6456
6524
|
parameters: {
|
|
6457
|
-
query?:
|
|
6525
|
+
query?: {
|
|
6526
|
+
/** @description If true, log out from all sessions (all devices) */
|
|
6527
|
+
all_sessions?: boolean;
|
|
6528
|
+
};
|
|
6458
6529
|
header?: never;
|
|
6459
6530
|
path?: never;
|
|
6460
6531
|
cookie?: never;
|
|
@@ -6470,6 +6541,15 @@ interface operations {
|
|
|
6470
6541
|
'application/json': components['schemas']['LogoutResponse'];
|
|
6471
6542
|
};
|
|
6472
6543
|
};
|
|
6544
|
+
/** @description Validation Error */
|
|
6545
|
+
422: {
|
|
6546
|
+
headers: {
|
|
6547
|
+
[name: string]: unknown;
|
|
6548
|
+
};
|
|
6549
|
+
content: {
|
|
6550
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
6551
|
+
};
|
|
6552
|
+
};
|
|
6473
6553
|
};
|
|
6474
6554
|
};
|
|
6475
6555
|
change_password: {
|
package/dist/index.js
CHANGED
|
@@ -611,6 +611,14 @@ async function getOrCreateWrappingKey() {
|
|
|
611
611
|
if (result?.key) {
|
|
612
612
|
resolve(result.key);
|
|
613
613
|
} else {
|
|
614
|
+
if (!crypto?.subtle) {
|
|
615
|
+
reject(
|
|
616
|
+
new Error(
|
|
617
|
+
"Web Crypto API not available. Ensure the page is served over HTTPS or localhost."
|
|
618
|
+
)
|
|
619
|
+
);
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
614
622
|
crypto.subtle.generateKey(
|
|
615
623
|
{
|
|
616
624
|
name: "AES-GCM",
|
|
@@ -677,6 +685,9 @@ async function decryptWithWrappingKey(ciphertext, iv) {
|
|
|
677
685
|
return new Uint8Array(decrypted);
|
|
678
686
|
}
|
|
679
687
|
async function saveSession(sessionData) {
|
|
688
|
+
if (!crypto?.subtle) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
680
691
|
await ensureDatabase();
|
|
681
692
|
if (!db) {
|
|
682
693
|
throw new Error("Database not initialized");
|
|
@@ -718,6 +729,9 @@ async function saveSession(sessionData) {
|
|
|
718
729
|
}
|
|
719
730
|
}
|
|
720
731
|
async function getSession() {
|
|
732
|
+
if (!crypto?.subtle) {
|
|
733
|
+
return null;
|
|
734
|
+
}
|
|
721
735
|
await ensureDatabase();
|
|
722
736
|
if (!db) {
|
|
723
737
|
throw new Error("Database not initialized");
|
|
@@ -826,6 +840,9 @@ async function clearWrappingKey() {
|
|
|
826
840
|
});
|
|
827
841
|
}
|
|
828
842
|
async function clearAllData() {
|
|
843
|
+
if (!crypto?.subtle) {
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
829
846
|
await clearSession();
|
|
830
847
|
await clearWrappingKey();
|
|
831
848
|
}
|