@chainlesschain/personal-data-hub 0.4.24 → 0.4.25

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.
@@ -24,7 +24,7 @@ const COOKIES = "XMGOV_SSO=abc; tgc=xyz";
24
24
  describe("gov-ixiamen mappers", () => {
25
25
  it("name/version/capabilities", () => {
26
26
  expect(ix.NAME).toBe("gov-ixiamen");
27
- expect(ix.VERSION).toBe("0.1.0");
27
+ expect(ix.VERSION).toBe("0.2.0");
28
28
  });
29
29
  it("inferCategory: explicit wins, else keyword, else fallback", () => {
30
30
  expect(ix.inferCategory("随便", "医保")).toBe("医保");
@@ -138,7 +138,7 @@ describe("IXiamenAdapter (snapshot + cookie-api)", () => {
138
138
  const items = await collect(a.sync({ sinceWatermark: 1716000000000 }));
139
139
  expect(items).toHaveLength(1); // old one below watermark stops iteration
140
140
  expect(items[0].originalId).toBe("ixiamen:service:new");
141
- expect(seen.url).toContain("ixm.gov.cn");
141
+ expect(seen.url).toContain("buss.ixiamen.org.cn");
142
142
  });
143
143
 
144
144
  it("default fetch throws; no input throws", async () => {
@@ -4,12 +4,14 @@
4
4
  * ⚠️ BEST-EFFORT SCAFFOLD (user-requested). i 厦门 is a local-government
5
5
  * super-app (社保 / 公积金 / 医保 / 政务办事 / 预约) behind real-name gov SSO.
6
6
  * Unlike the document / shopping / travel adapters it has **no verifiable
7
- * public API** the cookie-api endpoint below is a FABRICATED placeholder
8
- * (FAMILY-23 playbook: best-effort, overridable via opts.listUrl, NOT
9
- * field-verified) and cannot actually authenticate without gov real-name
10
- * login. The reliable path is therefore **snapshot mode** (the app / a manual
11
- * export produces a JSON of the user's 办事记录). The cookie path is kept as a
12
- * seam so it can be wired once a real device confirms the endpoint + sign.
7
+ * public API**. Static APK analysis (com.xmgov.xmapp, 2026-06-16) CONFIRMED the
8
+ * real backend host (see IXIAMEN_LIST_URL), but the exact 办事记录 list sub-path
9
+ * and request/response body stay UNVERIFIED bodies are encrypted by
10
+ * libzxprotect/libijmDataEncryption, so the endpoint cannot be fully derived
11
+ * statically and cannot authenticate without gov real-name login. The reliable
12
+ * path is therefore **snapshot mode** (the app / a manual export produces a JSON
13
+ * of the user's 办事记录). The cookie path is kept as a seam (overridable via
14
+ * opts.listUrl) so it can be wired once a live capture confirms path + sign.
13
15
  *
14
16
  * Personal footprint modelled: 政务办事记录 (government-service handling). Each
15
17
  * record → an INTERACTION event ("办理: <服务名>") + a Topic for the service
@@ -42,15 +44,20 @@ const { ENTITY_TYPES, EVENT_SUBTYPES, CAPTURED_BY } = require("../../constants")
42
44
  const { CookieAuth } = require("../shopping-base");
43
45
 
44
46
  const NAME = "gov-ixiamen";
45
- const VERSION = "0.1.0";
47
+ const VERSION = "0.2.0";
46
48
  const SNAPSHOT_SCHEMA_VERSION = 1;
47
49
 
48
50
  const KIND_SERVICE = "service";
49
51
  const VALID_SNAPSHOT_KINDS = Object.freeze([KIND_SERVICE]);
50
52
 
51
- // FABRICATED best-effort handle-list endpoint NOT field-verified.
52
- // Overridable via opts.listUrl once a real device confirms the gov gateway.
53
- const IXIAMEN_LIST_URL = "https://app.ixm.gov.cn/api/v1/handle/list";
53
+ // Host CONFIRMED via static APK analysis (com.xmgov.xmapp, 2026-06-16): the real
54
+ // i厦门 backend domain is *.ixiamen.org.cn production business gateway is
55
+ // https://buss.ixiamen.org.cn/pbc/ (usercenter auth under /pbc/usercenter/;
56
+ // 市民卡/社保 under https://smk.ixiamen.org.cn/smk/). The host + /pbc/ business
57
+ // prefix are confirmed; the "/handle/list" tail is still BEST-EFFORT and the
58
+ // request/response body is UNVERIFIED (encrypted by libzxprotect — opaque to
59
+ // static analysis). Overridable via opts.listUrl once a live capture confirms it.
60
+ const IXIAMEN_LIST_URL = "https://buss.ixiamen.org.cn/pbc/handle/list";
54
61
  const PAGE_SIZE = 20;
55
62
 
56
63
  // Coarse service-category keyword map → grouping Topic name. Best-effort; the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainlesschain/personal-data-hub",
3
- "version": "0.4.24",
3
+ "version": "0.4.25",
4
4
  "description": "Personal Data Hub — UnifiedSchema + validators + KG ingest helpers for the data-back-to-the-individual middleware",
5
5
  "type": "commonjs",
6
6
  "main": "lib/index.js",