@inai-dev/types 1.2.0 → 1.4.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/README.md +2 -2
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ import type {
|
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
43
|
import type {
|
|
44
|
-
InAIAuthConfig, // Client config (publishableKey, tenantId)
|
|
44
|
+
InAIAuthConfig, // Client config (publishableKey, tenantId, jwksUrl)
|
|
45
45
|
InAIMiddlewareConfig, // Middleware config (publicRoutes, signInUrl, beforeAuth, afterAuth)
|
|
46
46
|
InAIAuthSDKConfig, // SDK-wide config (signInUrl, signUpUrl, afterSignInUrl, publishableKey)
|
|
47
47
|
} from "@inai-dev/types";
|
|
@@ -78,7 +78,7 @@ import type {
|
|
|
78
78
|
| `ApplicationStats` | Resource | Application statistics |
|
|
79
79
|
| `ApiKeyResource` | Resource | API key data |
|
|
80
80
|
| `PaginatedResult<T>` | Resource | Paginated response |
|
|
81
|
-
| `InAIAuthConfig` | Config | Client configuration |
|
|
81
|
+
| `InAIAuthConfig` | Config | Client configuration (`publishableKey`, `apiUrl`, `tenantId`, `jwksUrl`) |
|
|
82
82
|
| `InAIMiddlewareConfig` | Config | Middleware configuration |
|
|
83
83
|
| `InAIAuthSDKConfig` | Config | SDK global configuration |
|
|
84
84
|
| `LoginParams` | Result | Login request parameters |
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,8 @@ interface AuthObject {
|
|
|
6
6
|
orgId: string | null;
|
|
7
7
|
orgRole: string | null;
|
|
8
8
|
sessionId: string | null;
|
|
9
|
+
roles: string[];
|
|
10
|
+
permissions: string[];
|
|
9
11
|
getToken: () => Promise<string | null>;
|
|
10
12
|
has: (params: {
|
|
11
13
|
role?: string;
|
|
@@ -30,6 +32,8 @@ interface ProtectedAuthObject {
|
|
|
30
32
|
orgId: string | null;
|
|
31
33
|
orgRole: string | null;
|
|
32
34
|
sessionId: string | null;
|
|
35
|
+
roles: string[];
|
|
36
|
+
permissions: string[];
|
|
33
37
|
isSignedIn: true;
|
|
34
38
|
getToken: () => Promise<string>;
|
|
35
39
|
has: (params: {
|
|
@@ -153,6 +157,7 @@ interface InAIAuthConfig {
|
|
|
153
157
|
apiUrl?: string;
|
|
154
158
|
publishableKey?: string;
|
|
155
159
|
tenantId?: string;
|
|
160
|
+
jwksUrl?: string;
|
|
156
161
|
}
|
|
157
162
|
interface InAIMiddlewareConfig {
|
|
158
163
|
publicRoutes?: string[] | ((req: unknown) => boolean);
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ interface AuthObject {
|
|
|
6
6
|
orgId: string | null;
|
|
7
7
|
orgRole: string | null;
|
|
8
8
|
sessionId: string | null;
|
|
9
|
+
roles: string[];
|
|
10
|
+
permissions: string[];
|
|
9
11
|
getToken: () => Promise<string | null>;
|
|
10
12
|
has: (params: {
|
|
11
13
|
role?: string;
|
|
@@ -30,6 +32,8 @@ interface ProtectedAuthObject {
|
|
|
30
32
|
orgId: string | null;
|
|
31
33
|
orgRole: string | null;
|
|
32
34
|
sessionId: string | null;
|
|
35
|
+
roles: string[];
|
|
36
|
+
permissions: string[];
|
|
33
37
|
isSignedIn: true;
|
|
34
38
|
getToken: () => Promise<string>;
|
|
35
39
|
has: (params: {
|
|
@@ -153,6 +157,7 @@ interface InAIAuthConfig {
|
|
|
153
157
|
apiUrl?: string;
|
|
154
158
|
publishableKey?: string;
|
|
155
159
|
tenantId?: string;
|
|
160
|
+
jwksUrl?: string;
|
|
156
161
|
}
|
|
157
162
|
interface InAIMiddlewareConfig {
|
|
158
163
|
publicRoutes?: string[] | ((req: unknown) => boolean);
|