@incode-sdks/incode-integrate 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +74 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,11 +16,19 @@ Apply the plan explicitly:
16
16
  npx @incode-sdks/incode-integrate --apply
17
17
  ```
18
18
 
19
- Scripted example:
19
+ ## Interactive Setup
20
20
 
21
- ```sh
22
- npx @incode-sdks/incode-integrate --version 9.14.0 --api-url demo --backend-sessions yes --sdk-config manual --idv standard-nfc --flow-handling step-by-step --apply
23
- ```
21
+ In an interactive terminal, the CLI asks for:
22
+
23
+ - Incode customer GitHub token
24
+ - React Native NPM token
25
+ - API URL: Demo, Production, or custom
26
+ - API key, if the client is embedding the key
27
+ - whether sessions are initiated on the backend, which enables the recommended no-api-key client approach
28
+ - SDK configuration mode: online dashboard flow or manual in-code flow
29
+ - manual IDV preset: Standard, Standard + NFC, or Standard + Session Recording
30
+ - flow handling: end-to-end or step-by-step
31
+ - iOS podspec source
24
32
 
25
33
  ## What It Updates
26
34
 
@@ -31,3 +39,65 @@ npx @incode-sdks/incode-integrate --version 9.14.0 --api-url demo --backend-sess
31
39
  - ignored local files such as `.env.local` and `.npmrc` when credentials are provided
32
40
 
33
41
  Secrets are not written to generated TypeScript, Gradle, Podfile, or README files.
42
+
43
+ When `--apply` receives tokens, it writes them only to ignored local files:
44
+
45
+ - `.env.local`: shell exports for `GITHUB_USERNAME`, `GITHUB_TOKEN`, `INCODE_API_URL`, optional `INCODE_API_KEY`, and optional `INCODE_SESSION_TOKEN`
46
+ - `.npmrc`: npm registry auth for the React Native SDK package
47
+
48
+ The React Native app does not automatically load `.env.local`; that file is for local shell and build tooling.
49
+
50
+ ## Backend Sessions
51
+
52
+ Use backend sessions for the recommended no-api-key client approach:
53
+
54
+ ```sh
55
+ npx @incode-sdks/incode-integrate --backend-sessions yes --apply
56
+ ```
57
+
58
+ In backend-session mode, the generated `src/IncodeExample.ts` appends `/0/` to the SDK `apiConfig.url`, for example `https://demo-api.incodesmile.com/0/`.
59
+
60
+ The client app should pass the backend-created `session_token` as `sessionToken`; the helper maps it to the React Native SDK's `sessionConfig.token`.
61
+
62
+ ## Scripted Examples
63
+
64
+ ```sh
65
+ npx @incode-sdks/incode-integrate --version 9.14.0 --pod-source https --api-url demo --backend-sessions yes --sdk-config manual --idv standard-nfc --flow-handling step-by-step
66
+ npx @incode-sdks/incode-integrate --version 9.14.0 --api-url production --backend-sessions no --sdk-config manual --idv standard-recording --flow-handling end-to-end --apply
67
+ npx @incode-sdks/incode-integrate --sdk-config online --api-url demo --dashboard-url "https://dashboard.incodesmile.com/flows/example" --configuration-id "example-config-id"
68
+ npx @incode-sdks/incode-integrate --yes
69
+ ```
70
+
71
+ ## Important Flags
72
+
73
+ - `--apply`: update files; without this flag the CLI only prints a dry-run plan
74
+ - `--yes`: use non-interactive defaults
75
+ - `--version`: SDK version, for example `9.14.0`
76
+ - `--pod-source`: `ssh` or `https`
77
+ - `--api-url`: `demo`, `production`, or a custom URL
78
+ - `--backend-sessions`: `yes` for the no-api-key client approach, `no` to use a client API key at runtime
79
+ - `--api-key`: API key for client API-key mode
80
+ - `--github-username`: GitHub username for Incode package access
81
+ - `--github-token`: Incode customer GitHub token for package access
82
+ - `--npm-token`: NPM token for React Native SDK package access
83
+ - `--sdk-config`: `online` or `manual`
84
+ - `--dashboard-url`: dashboard flow URL for online SDK configuration
85
+ - `--configuration-id`: online configuration ID when known
86
+ - `--idv`: `standard`, `standard-nfc`, or `standard-recording`
87
+ - `--flow-handling`: `end-to-end` or `step-by-step`
88
+ - `--test-mode`: default the sample app to SDK test mode
89
+ - `--no-test-mode`: default the sample app to real-device mode
90
+
91
+ ## IDV Presets
92
+
93
+ - `standard`: `IdScan`, `SelfieScan`, `FaceMatch`
94
+ - `standard-nfc`: `IdScan`, `NFCScan`, `SelfieScan`, `FaceMatch`
95
+ - `standard-recording`: `IdScan`, `SelfieScan`, `FaceMatch`, record-session config, and the Android video streaming dependency
96
+
97
+ SDK package variant is derived from `--idv`:
98
+
99
+ - `standard` installs the standard SDK package
100
+ - `standard-nfc` installs the `nfc` SDK package variant
101
+ - `standard-recording` installs the `streaming` / `vc` SDK package variant
102
+
103
+ The CLI always writes the React Native SDK dependency as an npm registry version in `package.json`; it does not use local tarballs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incode-sdks/incode-integrate",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI integration auditor and fixer for adding the Incode React Native SDK to client apps.",
5
5
  "main": "agent.js",
6
6
  "bin": {