@injistack/react-inji-verify-sdk 0.18.0-beta.3 → 0.18.0-beta.30

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.
@@ -1,7 +1,15 @@
1
- import { PresentationDefinition } from "../components/openid4vp-verification/OpenID4VPVerification.types";
1
+ import { PresentationDefinition, VPVerificationRequest } from "../components/openid4vp-verification/OpenID4VPVerification.types";
2
+ import { VCVerificationV2Request, VCVerificationV2Response } from "../components/qrcode-verification/QRCodeVerification.types";
2
3
  import { QrData } from "../types/OVPSchemeQrData";
3
- export declare const vcVerification: (credential: unknown, url: string) => Promise<any>;
4
+ export declare const vcVerificationV2: (credential: unknown, url: string, config?: VCVerificationV2Request) => Promise<VCVerificationV2Response>;
4
5
  export declare const vcSubmission: (credential: unknown, url: string, txnId?: string) => Promise<any>;
5
6
  export declare const vpRequest: (url: string, clientId: string, txnId?: string, presentationDefinitionId?: string, presentationDefinition?: PresentationDefinition, acceptVPWithoutHolderProof?: boolean) => Promise<QrData>;
6
7
  export declare const vpRequestStatus: (url: string, reqId: string, abortSignal?: boolean) => Promise<any>;
7
- export declare const vpResult: (url: string, txnId: string) => Promise<any>;
8
+ export declare const vpSessionRequest: (url: string, clientId: string, txnId?: string, presentationDefinitionId?: string, presentationDefinition?: PresentationDefinition, acceptVPWithoutHolderProof?: boolean, responseCodeValidationRequired?: boolean) => Promise<QrData>;
9
+ /**
10
+ * Public helper that calls the new `/vp-session-results` endpoint.
11
+ *
12
+ * This is the primary endpoint used by UI/SDK to fetch VP (and VC submission)
13
+ * verification results for a session bound via the `transaction_id` HttpOnly cookie.
14
+ */
15
+ export declare const vpSessionResults: (url: string, responseCode?: string | null, config?: VPVerificationRequest) => Promise<any>;
@@ -1 +1,6 @@
1
+ import { CredentialResult, VCVerificationV2Response } from "../components/qrcode-verification/QRCodeVerification.types";
1
2
  export declare const isSdJwt: (vpToken: string) => boolean;
3
+ export declare const normalizeVp: (vp: any) => Record<string, unknown>;
4
+ export declare const clearUrl: (params?: string[]) => void;
5
+ export declare const summariseVCResult: (response: VCVerificationV2Response) => "SUCCESS" | "INVALID" | "EXPIRED" | "REVOKED";
6
+ export declare const summariseVPResult: (cred: CredentialResult) => "SUCCESS" | "INVALID" | "EXPIRED" | "REVOKED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@injistack/react-inji-verify-sdk",
3
- "version": "0.18.0-beta.3",
3
+ "version": "0.18.0-beta.30",
4
4
  "description": "A react component library to perform Inji verify tasks, such as OpenId4VP sharing, Reading VC QR codes",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -12,8 +12,10 @@
12
12
  "dist"
13
13
  ],
14
14
  "scripts": {
15
+ "prebuild": "npm run test",
15
16
  "build": "webpack --config webpack.config.js && tsc --declaration --emitDeclarationOnly --outDir dist",
16
- "test": "jest test --coverage",
17
+ "test:runner": "jest test --coverage --watchman=false",
18
+ "test": "npm install --prefix node_modules/.peer-test react@18.2.0 react-dom@18.2.0 --no-package-lock --no-save && cross-env NODE_PATH=node_modules/.peer-test/node_modules npm run test:runner",
17
19
  "verify": "npm run build",
18
20
  "localPublish": "npm version patch && npm run build && npm publish --access public --registry http://localhost:4873"
19
21
  },
@@ -57,7 +59,7 @@
57
59
  "style-loader": "^4.0.0",
58
60
  "ts-loader": "^9.5.2",
59
61
  "typescript": "^4.9.5",
60
- "webpack": "^5.99.5",
62
+ "webpack": "^5.105.0",
61
63
  "webpack-cli": "^6.0.1"
62
64
  },
63
65
  "peerDependencies": {