@splitin/verification-cli 0.1.0-beta.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.
@@ -0,0 +1,40 @@
1
+ -- Seed tenant `default` and sandbox examples. No active production route.
2
+
3
+ INSERT INTO verification.tenants (tenant_key, display_name, continuation_destinations)
4
+ VALUES ('default', 'Default tenant', ARRAY['verification.resume', 'application.home'])
5
+ ON CONFLICT (tenant_key) DO NOTHING;
6
+
7
+ INSERT INTO verification.policy_versions (
8
+ tenant_key, id, version, environment, lifecycle, reason,
9
+ proposed_by_actor_id, approved_by_actor_id, approved_at, activated_at
10
+ ) VALUES (
11
+ 'default', 'pol_sandbox_example', 'sandbox-example-1', 'sandbox', 'active',
12
+ 'Seeded sandbox example policy',
13
+ 'system:seed', 'system:seed-approver', now(), now()
14
+ ) ON CONFLICT (tenant_key, id) DO NOTHING;
15
+
16
+ INSERT INTO verification.policy_versions (
17
+ tenant_key, id, version, environment, lifecycle, reason, proposed_by_actor_id
18
+ ) VALUES (
19
+ 'default', 'pol_production_unactivated', 'production-unactivated', 'production', 'draft',
20
+ 'Seeded production policy is never auto-activated', 'system:seed'
21
+ ) ON CONFLICT (tenant_key, id) DO NOTHING;
22
+
23
+ INSERT INTO verification.configuration_revisions (
24
+ tenant_key, id, provider, environment, revision, configuration_digest, lifecycle,
25
+ proposed_by_actor_id, approved_by_actor_id, approved_at
26
+ ) VALUES (
27
+ 'default', 'cfg_sandbox_example', 'test_fake', 'sandbox', 1,
28
+ 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
29
+ 'approved', 'system:seed', 'system:seed-approver', now()
30
+ ) ON CONFLICT (tenant_key, id) DO NOTHING;
31
+
32
+ INSERT INTO verification.routes (
33
+ tenant_key, id, provider, environment, package_code, country_code, priority,
34
+ configuration_revision_id, policy_version_id, lifecycle,
35
+ proposed_by_actor_id, approved_by_actor_id, approved_at, activated_at
36
+ ) VALUES (
37
+ 'default', 'rte_sandbox_example_human_idv', 'test_fake', 'sandbox', 'human_idv', 'US', 100,
38
+ 'cfg_sandbox_example', 'pol_sandbox_example', 'active',
39
+ 'system:seed', 'system:seed-approver', now(), now()
40
+ ) ON CONFLICT (tenant_key, id) DO NOTHING;
@@ -0,0 +1,8 @@
1
+ ALTER TABLE verification.policy_versions
2
+ DROP CONSTRAINT IF EXISTS production_retention_complete;
3
+
4
+ ALTER TABLE verification.policy_versions
5
+ DROP COLUMN IF EXISTS legal_hold,
6
+ DROP COLUMN IF EXISTS appeal_hold_days,
7
+ DROP COLUMN IF EXISTS provider_redaction_delay_days,
8
+ DROP COLUMN IF EXISTS decision_retention_days;
@@ -0,0 +1,28 @@
1
+ ALTER TABLE verification.policy_versions
2
+ ADD COLUMN IF NOT EXISTS decision_retention_days integer,
3
+ ADD COLUMN IF NOT EXISTS provider_redaction_delay_days integer,
4
+ ADD COLUMN IF NOT EXISTS appeal_hold_days integer,
5
+ ADD COLUMN IF NOT EXISTS legal_hold boolean NOT NULL DEFAULT false;
6
+
7
+ ALTER TABLE verification.policy_versions
8
+ DROP CONSTRAINT IF EXISTS production_retention_complete;
9
+
10
+ ALTER TABLE verification.policy_versions
11
+ ADD CONSTRAINT production_retention_complete CHECK (
12
+ environment <> 'production'
13
+ OR lifecycle <> 'active'
14
+ OR (
15
+ decision_retention_days IS NOT NULL
16
+ AND provider_redaction_delay_days IS NOT NULL
17
+ AND appeal_hold_days IS NOT NULL
18
+ )
19
+ );
20
+
21
+ COMMENT ON COLUMN verification.policy_versions.decision_retention_days IS
22
+ 'Adopter-selected verified-decision retention in days. Required before production activation.';
23
+ COMMENT ON COLUMN verification.policy_versions.provider_redaction_delay_days IS
24
+ 'Delay before provider redaction after a terminal decision. Required before production activation.';
25
+ COMMENT ON COLUMN verification.policy_versions.appeal_hold_days IS
26
+ 'Appeal hold window that delays redaction. Required before production activation.';
27
+ COMMENT ON COLUMN verification.policy_versions.legal_hold IS
28
+ 'When true, redaction jobs remain scheduled until the hold is cleared.';
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@splitin/verification-cli",
3
+ "version": "0.1.0-beta.0",
4
+ "description": "CLI for initializing, validating, diagnosing, and certifying self-hosted verification adapters.",
5
+ "license": "MIT",
6
+ "author": "SplitInTech, @ojchavan",
7
+ "homepage": "https://github.com/splitintech/open-internal-tools/tree/main/verification-adapter-sdk/packages/verification-cli#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/splitintech/open-internal-tools.git",
11
+ "directory": "verification-adapter-sdk/packages/verification-cli"
12
+ },
13
+ "type": "module",
14
+ "sideEffects": false,
15
+ "engines": { "node": ">=20" },
16
+ "bin": {
17
+ "splitin-verification": "./dist/cli.js"
18
+ },
19
+ "main": "./dist/cli.cjs",
20
+ "module": "./dist/cli.js",
21
+ "types": "./dist/cli.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/cli.d.ts",
25
+ "import": "./dist/cli.js",
26
+ "require": "./dist/cli.cjs"
27
+ }
28
+ },
29
+ "files": ["dist", "migrations", "LICENSE", "NOTICE", "README.md", "package.json"],
30
+ "publishConfig": { "access": "public" },
31
+ "scripts": {
32
+ "build": "tsup",
33
+ "test": "vitest run",
34
+ "typecheck": "tsc --noEmit -p tsconfig.json"
35
+ },
36
+ "dependencies": {
37
+ "@splitin/verification-adapter-sdk": "0.1.0-beta.0"
38
+ },
39
+ "devDependencies": {
40
+ "tsup": "^8.5.0",
41
+ "typescript": "^5.8.3",
42
+ "vitest": "^3.2.4"
43
+ }
44
+ }