@joymerrevent/porters-connect 0.12.1 → 0.13.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.
- package/CHANGELOG.md +31 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.13.0] - 2026-09-06
|
|
9
|
+
|
|
10
|
+
**User マスタが PORTERS の全 17 項目を返すようになった版**です。破壊的変更はありませんが、
|
|
11
|
+
`field` を省略したときの既定の挙動が変わります(下記 Changed)。
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **User マスタが reference の全 17 項目を返すようになりました**([ADR-0060][adr60] D2)。
|
|
16
|
+
これまでカタログは 4 項目(`P_Id` / `P_Type` / `P_Name` / `P_Mail`)だけで、部署・電話・利用開始日・
|
|
17
|
+
登録者といった項目は**型にも存在せず、読む手段がありませんでした**。追加された 13 項目はこちらです。
|
|
18
|
+
|
|
19
|
+
`P_Department`(`System[Department]` — 入れ子で `P_Id` / `P_Name`)/ `P_Telephone` / `P_Mobile` /
|
|
20
|
+
`P_MobileMail` / `P_UserName` / `P_TimeZone` / `P_Language` / `P_StartDate` / `P_EndDate` /
|
|
21
|
+
`P_RegistrationDate` / `P_RegisteredBy` / `P_UpdateDate` / `P_UpdatedBy`
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
const page = await t.user.search();
|
|
25
|
+
page.items[0]?.P_Department; // { P_Id: number | null; P_Name: string | null } | null
|
|
26
|
+
page.items[0]?.P_StartDate; // ISO 8601("2026-04-01")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **`field` を省略した User Read が、カタログの全項目を要求するようになりました**(他のリソースと
|
|
32
|
+
同じ既定の扱い)。PORTERS は `field` 省略時に 4 項目しか返さないため、そのままでは
|
|
33
|
+
**型が約束する 13 項目が黙って `null` になる**からです。
|
|
34
|
+
|
|
35
|
+
4 項目だけで十分な場合は、`field` に必要なものだけを並べてください。
|
|
36
|
+
`field: []` は従来どおり「PORTERS 既定の 4 項目に委ねる」意味です。
|
|
37
|
+
|
|
8
38
|
## [0.12.1] - 2026-09-03
|
|
9
39
|
|
|
10
40
|
**フェイルセーフの修正 2 件**です。どちらも「黙って壊れる/安全側に倒しすぎている」場面を直したもので、
|
|
@@ -547,6 +577,7 @@
|
|
|
547
577
|
[kac]: https://keepachangelog.com/en/1.1.0/
|
|
548
578
|
[semver]: https://semver.org/
|
|
549
579
|
[unreleased]: https://github.com/Joymerrevent/porters-connect/compare/v0.12.1...HEAD
|
|
580
|
+
[0.13.0]: https://github.com/Joymerrevent/porters-connect/compare/v0.12.1...v0.13.0
|
|
550
581
|
[0.12.1]: https://github.com/Joymerrevent/porters-connect/compare/v0.12.0...v0.12.1
|
|
551
582
|
[0.12.0]: https://github.com/Joymerrevent/porters-connect/compare/v0.11.0...v0.12.0
|
|
552
583
|
[0.11.0]: https://github.com/Joymerrevent/porters-connect/compare/v0.10.0...v0.11.0
|
package/dist/index.d.ts
CHANGED
|
@@ -2041,6 +2041,19 @@ declare const FIELDS$2: {
|
|
|
2041
2041
|
readonly P_Type: "Number";
|
|
2042
2042
|
readonly P_Name: "SinglelineText";
|
|
2043
2043
|
readonly P_Mail: "Mail";
|
|
2044
|
+
readonly P_Department: "System[Department]";
|
|
2045
|
+
readonly P_Telephone: "Telephone";
|
|
2046
|
+
readonly P_Mobile: "Telephone";
|
|
2047
|
+
readonly P_MobileMail: "Mail";
|
|
2048
|
+
readonly P_UserName: "SinglelineText";
|
|
2049
|
+
readonly P_TimeZone: "SinglelineText";
|
|
2050
|
+
readonly P_Language: "SinglelineText";
|
|
2051
|
+
readonly P_StartDate: "Date";
|
|
2052
|
+
readonly P_EndDate: "Date";
|
|
2053
|
+
readonly P_RegistrationDate: "System[DateTime]";
|
|
2054
|
+
readonly P_RegisteredBy: "User";
|
|
2055
|
+
readonly P_UpdateDate: "System[DateTime]";
|
|
2056
|
+
readonly P_UpdatedBy: "User";
|
|
2044
2057
|
};
|
|
2045
2058
|
/** A decoded User (PORTERS operator). `P_Type`: 0 = standard user, 1 = system admin. */
|
|
2046
2059
|
type User = ReadRecord<typeof FIELDS$2>;
|
|
@@ -2053,7 +2066,9 @@ type UserSearchQuery = {
|
|
|
2053
2066
|
userType?: -1 | 0 | 1;
|
|
2054
2067
|
/**
|
|
2055
2068
|
* Output fields as **bare aliases** (`P_Name`); the library adds the `User.` prefix (ADR-0059).
|
|
2056
|
-
* Omit to
|
|
2069
|
+
* **Omit** to fetch every catalogued field (ADR-0020); narrow it when the extra HR fields
|
|
2070
|
+
* (department / telephone / dates) are not interesting. Pass `[]` for PORTERS' own default —
|
|
2071
|
+
* the 4 core fields it returns for a fieldless read.
|
|
2057
2072
|
*/
|
|
2058
2073
|
field?: ReadFieldAlias<typeof FIELDS$2>[];
|
|
2059
2074
|
count?: number;
|
package/dist/index.js
CHANGED
|
@@ -2062,7 +2062,24 @@ var FIELDS14 = {
|
|
|
2062
2062
|
P_Id: "System[Id]",
|
|
2063
2063
|
P_Type: "Number",
|
|
2064
2064
|
P_Name: "SinglelineText",
|
|
2065
|
-
P_Mail: "Mail"
|
|
2065
|
+
P_Mail: "Mail",
|
|
2066
|
+
// 部署は User と同じ入れ子で返る(`<Department><Department.P_Id>…` — ADR-0061 案3a)。
|
|
2067
|
+
P_Department: "System[Department]",
|
|
2068
|
+
P_Telephone: "Telephone",
|
|
2069
|
+
P_Mobile: "Telephone",
|
|
2070
|
+
P_MobileMail: "Mail",
|
|
2071
|
+
P_UserName: "SinglelineText",
|
|
2072
|
+
// タイムゾーン名(`Asia/Tokyo` 等)。PORTERS は Timezone List の名前をそのまま返す。
|
|
2073
|
+
P_TimeZone: "SinglelineText",
|
|
2074
|
+
P_Language: "SinglelineText",
|
|
2075
|
+
P_StartDate: "Date",
|
|
2076
|
+
P_EndDate: "Date",
|
|
2077
|
+
P_RegistrationDate: "System[DateTime]",
|
|
2078
|
+
// 登録者・更新者は `User` 型=汎用の組み立てが `(User.P_Id,…)` を付けて要求する。
|
|
2079
|
+
// VERIFY(live): User Read で User 型の項目を `()` 付きで要求できるかは未確認(LV-17 と同型)。
|
|
2080
|
+
P_RegisteredBy: "User",
|
|
2081
|
+
P_UpdateDate: "System[DateTime]",
|
|
2082
|
+
P_UpdatedBy: "User"
|
|
2066
2083
|
};
|
|
2067
2084
|
var USER_DESCRIPTOR = {
|
|
2068
2085
|
name: "User",
|
|
@@ -2071,15 +2088,17 @@ var USER_DESCRIPTOR = {
|
|
|
2071
2088
|
fields: FIELDS14
|
|
2072
2089
|
};
|
|
2073
2090
|
var FIELD_MAP = new Map(Object.entries(FIELDS14));
|
|
2091
|
+
var DEFAULT_FIELDS2 = Object.keys(FIELDS14);
|
|
2074
2092
|
var buildParams2 = (partition, q) => {
|
|
2075
2093
|
const p = new URLSearchParams();
|
|
2076
2094
|
p.set("partition", String(partition));
|
|
2077
2095
|
p.set("request_type", String(q.requestType ?? 1));
|
|
2078
2096
|
p.set("user_type", String(q.userType ?? -1));
|
|
2079
|
-
|
|
2097
|
+
const field = q.field ?? DEFAULT_FIELDS2;
|
|
2098
|
+
if (field.length > 0) {
|
|
2080
2099
|
p.set(
|
|
2081
2100
|
"field",
|
|
2082
|
-
qualifyReadFields(USER_DESCRIPTOR.prefix, FIELD_MAP,
|
|
2101
|
+
qualifyReadFields(USER_DESCRIPTOR.prefix, FIELD_MAP, field).join(",")
|
|
2083
2102
|
);
|
|
2084
2103
|
}
|
|
2085
2104
|
return p;
|