@5minds/processcube_app_sdk 8.0.5 → 8.0.6

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/client.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './build/client/index';
package/common.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ import { DefaultSession, User } from 'next-auth';
2
+ import type { JWT } from 'next-auth/jwt';
3
+
4
+ export * from './build/common/index';
5
+
6
+ /**
7
+ * Module augmentations for next-auth
8
+ * These extend the default session and JWT types to include claims from the SDK
9
+ */
10
+ declare module 'next-auth' {
11
+ /**
12
+ * Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
13
+ */
14
+ interface Session {
15
+ user: {
16
+ /** The user's identity claims. */
17
+ claims?: Record<string, unknown>;
18
+ } & DefaultSession['user'] & {
19
+ [profile_property: string]: any;
20
+ };
21
+ error?: 'RefreshAccessTokenError';
22
+ }
23
+ }
24
+
25
+ declare module 'next-auth/jwt' {
26
+ /** Returned by the `jwt` callback and `getToken`, when using JWT sessions */
27
+ interface JWT {
28
+ /** OpenID Access Token */
29
+ accessToken?: string;
30
+ /** OpenID ID Token */
31
+ idToken?: string;
32
+ /** OpenID Refresh Token */
33
+ refreshToken?: string;
34
+ expiresAt: number;
35
+ error?: 'RefreshAccessTokenError';
36
+ user?: User;
37
+ }
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/processcube_app_sdk",
3
- "version": "8.0.5",
3
+ "version": "8.0.6",
4
4
  "description": "The SDK for ProcessCube Apps",
5
5
  "type": "module",
6
6
  "main": "build/common/index.cjs",
@@ -33,7 +33,7 @@
33
33
  "build": "concurrently -n=build:code,build:types,build:css \"NODE_ENV=development node build.js\" \"npm run build:types\" \"NODE_ENV=development node build-css.cjs\"",
34
34
  "build:types": "tsc -p tsconfig.common.json --emitDeclarationOnly && concurrently -n=build:types:server,build:types:client \"tsc -p tsconfig.server.json --emitDeclarationOnly\" \"tsc -p tsconfig.client.json --emitDeclarationOnly\"",
35
35
  "build:prod": "npm run clean && concurrently -n=build:prod:code,build:types,build:css \"NODE_ENV=production node build.js\" \"npm run build:types\" \"NODE_ENV=production node build-css.cjs\"",
36
- "clean": "rm -rf build && rm -f *.d.ts",
36
+ "clean": "rm -rf build",
37
37
  "format": "prettier --write .",
38
38
  "format:check": "prettier --check .",
39
39
  "prepare": "npm run build:prod",
package/server.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './build/server/index';