prividium 1.5.0 → 1.6.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 +3 -0
- package/dist/sdk/admin-api/schemas.d.ts +0 -4
- package/dist/sdk/admin-api/schemas.js +2 -4
- package/dist/sdk/admin-api/types.d.ts +0 -4
- package/dist/sdk/popup-auth.d.ts +1 -0
- package/dist/sdk/popup-auth.js +3 -0
- package/dist/sdk/prividium-chain.js +1 -0
- package/dist/sdk/types.d.ts +7 -0
- package/dist/tsconfig.cli.tsbuildinfo +1 -1
- package/dist/tsconfig.sdk.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,6 +269,9 @@ interface PrividiumConfig {
|
|
|
269
269
|
authBaseUrl: string; // Authorization service base URL
|
|
270
270
|
prividiumApiBaseUrl: string; // Permissions API service base URL
|
|
271
271
|
redirectUrl: string; // OAuth redirect URL
|
|
272
|
+
org?: string; // Local development/testing only: selects an organization so the auth popup shows that
|
|
273
|
+
// org's branding and routes login to its identity provider. In production the organization is
|
|
274
|
+
// determined by the deployment address (subdomain) and this value is ignored. (optional)
|
|
272
275
|
storage?: Storage; // Custom storage implementation (optional)
|
|
273
276
|
onAuthExpiry?: () => void; // Called when authentication expires (optional)
|
|
274
277
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const adminUserSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
|
-
oidcSub: z.ZodNullable<z.ZodString>;
|
|
5
|
-
oidcIssuer: z.ZodNullable<z.ZodString>;
|
|
6
4
|
displayName: z.ZodString;
|
|
7
5
|
source: z.ZodEnum<{
|
|
8
6
|
oidc: "oidc";
|
|
@@ -11,8 +9,6 @@ export declare const adminUserSchema: z.ZodObject<{
|
|
|
11
9
|
crypto_native: "crypto_native";
|
|
12
10
|
m2m_app: "m2m_app";
|
|
13
11
|
}>;
|
|
14
|
-
organizationId: z.ZodNullable<z.ZodString>;
|
|
15
|
-
walletToken: z.ZodNullable<z.ZodString>;
|
|
16
12
|
createdAt: z.ZodString;
|
|
17
13
|
updatedAt: z.ZodString;
|
|
18
14
|
organization: z.ZodNullable<z.ZodObject<{
|
|
@@ -34,14 +34,12 @@ const userOrganizationSchema = z.object({
|
|
|
34
34
|
name: z.string()
|
|
35
35
|
});
|
|
36
36
|
const userSourceSchema = z.enum(['oidc', 'adminPanel', 'tenant', 'crypto_native', 'm2m_app']);
|
|
37
|
+
// Mirrors the permissions-api user response, which omits server-owned secrets (walletToken) and
|
|
38
|
+
// external IdP identity (oidcSub/oidcIssuer); organizationId is redundant with `organization`.
|
|
37
39
|
export const adminUserSchema = z.object({
|
|
38
40
|
id: z.string(),
|
|
39
|
-
oidcSub: z.string().nullable(),
|
|
40
|
-
oidcIssuer: z.string().nullable(),
|
|
41
41
|
displayName: z.string(),
|
|
42
42
|
source: userSourceSchema,
|
|
43
|
-
organizationId: z.string().nullable(),
|
|
44
|
-
walletToken: z.string().nullable(),
|
|
45
43
|
createdAt: z.string(),
|
|
46
44
|
updatedAt: z.string(),
|
|
47
45
|
organization: userOrganizationSchema.nullable(),
|
|
@@ -20,12 +20,8 @@ export interface AdminUserOrganization {
|
|
|
20
20
|
}
|
|
21
21
|
export interface AdminUser {
|
|
22
22
|
id: string;
|
|
23
|
-
oidcSub: string | null;
|
|
24
|
-
oidcIssuer: string | null;
|
|
25
23
|
displayName: string;
|
|
26
24
|
source: AdminUserSource;
|
|
27
|
-
organizationId: string | null;
|
|
28
|
-
walletToken: string | null;
|
|
29
25
|
createdAt: string;
|
|
30
26
|
updatedAt: string;
|
|
31
27
|
organization: AdminUserOrganization | null;
|
package/dist/sdk/popup-auth.d.ts
CHANGED
package/dist/sdk/popup-auth.js
CHANGED
|
@@ -123,6 +123,9 @@ export class PopupAuth {
|
|
|
123
123
|
url.searchParams.set('redirect_uri', this.config.redirectUri);
|
|
124
124
|
url.searchParams.set('state', state);
|
|
125
125
|
url.searchParams.set('response_type', 'token');
|
|
126
|
+
if (this.config.org) {
|
|
127
|
+
url.searchParams.set('org', this.config.org);
|
|
128
|
+
}
|
|
126
129
|
if (scopes?.length) {
|
|
127
130
|
for (const scope of scopes) {
|
|
128
131
|
url.searchParams.append('scope', scope);
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -11,6 +11,13 @@ export interface PrividiumConfig {
|
|
|
11
11
|
chain: Omit<Chain, 'rpcUrls'>;
|
|
12
12
|
authBaseUrl: string;
|
|
13
13
|
redirectUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* Local development/testing only. Selects an organization so the auth popup shows that
|
|
16
|
+
* organization's branding and routes login to its identity provider (forwarded to the User
|
|
17
|
+
* Panel as `?org=<id>`). In production the organization is determined by the deployment
|
|
18
|
+
* address (subdomain) and this value is ignored.
|
|
19
|
+
*/
|
|
20
|
+
org?: string;
|
|
14
21
|
/**
|
|
15
22
|
* @deprecated use the `prividiumApiBaseUrl` field instead
|
|
16
23
|
*/
|