@polaris-auth/client 0.0.0-stage → 0.7.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.
- package/LICENSE +21 -0
- package/README.md +114 -2
- package/dist/admin.d.ts +9532 -0
- package/dist/admin.js +63 -0
- package/dist/anonymous.d.ts +513 -0
- package/dist/anonymous.js +9 -0
- package/dist/audit.d.ts +944 -0
- package/dist/audit.js +11 -0
- package/dist/challenge.d.ts +17 -0
- package/dist/challenge.js +59 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +58 -0
- package/dist/multi-session.d.ts +1104 -0
- package/dist/multi-session.js +13 -0
- package/dist/namespace.d.ts +15 -0
- package/dist/namespace.js +1 -0
- package/dist/passwordless.d.ts +3353 -0
- package/dist/passwordless.js +31 -0
- package/dist/scim.d.ts +6656 -0
- package/dist/scim.js +49 -0
- package/dist/sentinel.d.ts +1564 -0
- package/dist/sentinel.js +15 -0
- package/dist/sso.d.ts +6455 -0
- package/dist/sso.js +45 -0
- package/dist/username.d.ts +674 -0
- package/dist/username.js +9 -0
- package/openapi.json +17093 -0
- package/package.json +70 -5
- package/src/admin.ts +70 -0
- package/src/anonymous.ts +16 -0
- package/src/audit.ts +18 -0
- package/src/challenge.ts +80 -0
- package/src/index.ts +111 -0
- package/src/multi-session.ts +20 -0
- package/src/namespace.ts +13 -0
- package/src/passwordless.ts +38 -0
- package/src/schema.d.ts +12248 -0
- package/src/scim.ts +56 -0
- package/src/sentinel.ts +22 -0
- package/src/sso.ts +52 -0
- package/src/username.ts +16 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The `multi-session` plugin's routes as methods of `client.multiSession`. */
|
|
2
|
+
export function multiSession(client) {
|
|
3
|
+
return {
|
|
4
|
+
/** GET /multi-session/last-method: Read the device's last sign-in method */
|
|
5
|
+
lastMethod: (...init) => client.GET("/multi-session/last-method", ...init),
|
|
6
|
+
/** GET /multi-session/list: List the accounts signed in on this device */
|
|
7
|
+
list: (...init) => client.GET("/multi-session/list", ...init),
|
|
8
|
+
/** DELETE /multi-session/{sessionId}: Sign one account out of this device */
|
|
9
|
+
revoke: (...init) => client.DELETE("/multi-session/{sessionId}", ...init),
|
|
10
|
+
/** POST /multi-session/switch: Switch to another account signed in on this device */
|
|
11
|
+
switch: (...init) => client.POST("/multi-session/switch", ...init),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaybeOptionalInit } from "openapi-fetch";
|
|
2
|
+
import type { paths } from "./schema.js";
|
|
3
|
+
type RequiredKeysOf<T> = {
|
|
4
|
+
[K in keyof T]-?: object extends Pick<T, K> ? never : K;
|
|
5
|
+
}[keyof T];
|
|
6
|
+
/**
|
|
7
|
+
* The argument list of a namespaced method: `openapi-fetch`'s init for the route, required when the
|
|
8
|
+
* route has required params or a body, optional otherwise (the same rule as `client.GET(url, init)`).
|
|
9
|
+
*/
|
|
10
|
+
export type Init<Path extends keyof paths, Method extends keyof paths[Path]> = RequiredKeysOf<MaybeOptionalInit<paths[Path], Method>> extends never ? [(MaybeOptionalInit<paths[Path], Method> & {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
})?] : [MaybeOptionalInit<paths[Path], Method> & {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|