@shisyamo4131/air-guard-v2-schemas 2.3.7 → 2.3.8-dev.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shisyamo4131/air-guard-v2-schemas",
3
- "version": "2.3.7",
3
+ "version": "2.3.8-dev.0",
4
4
  "description": "Schemas for AirGuard V2",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/src/User.js CHANGED
@@ -2,6 +2,7 @@
2
2
  * User Model
3
3
  * @version 1.1.0
4
4
  * @author shisyamo4131
5
+ * @update 2025-12-25 Added `tagSize` property.
5
6
  * @update 2025-11-24 Added `companyId`, `isAdmin`, `isTemporary` property.
6
7
  * Changed to prevent deletion of admin users.
7
8
  *
@@ -13,9 +14,11 @@
13
14
  * @prop {string} companyId - ID of the associated company.
14
15
  * @prop {boolean} isAdmin - Indicates if the user is an administrator.
15
16
  * @prop {boolean} isTemporary - Indicates if the user is temporary.
17
+ * @prop {string} tagSize - Size of the tag associated with the user.
16
18
  */
17
19
  import FireModel from "@shisyamo4131/air-firebase-v2";
18
20
  import { defField } from "./parts/fieldDefinitions.js";
21
+ import { TAG_SIZE_VALUES, TAG_SIZE_OPTIONS } from "./constants/index.js";
19
22
 
20
23
  const classProps = {
21
24
  email: defField("email", { required: true }),
@@ -37,6 +40,11 @@ const classProps = {
37
40
  companyId: defField("oneLine", { hidden: true, required: true }),
38
41
  isAdmin: defField("check", { hidden: true, default: false }),
39
42
  isTemporary: defField("check", { hidden: true, default: true }),
43
+ tagSize: defField("select", {
44
+ label: "タグサイズ",
45
+ default: TAG_SIZE_VALUES.MEDIUM.value,
46
+ options: TAG_SIZE_OPTIONS,
47
+ }),
40
48
  };
41
49
 
42
50
  export default class User extends FireModel {
@@ -52,3 +52,7 @@ export {
52
52
  VALUES as SITE_STATUS_VALUES,
53
53
  OPTIONS as SITE_STATUS_OPTIONS,
54
54
  } from "./site-status.js";
55
+ export {
56
+ VALUES as TAG_SIZE_VALUES,
57
+ OPTIONS as TAG_SIZE_OPTIONS,
58
+ } from "./tag-size.js";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file src/constants/tag-size.js
3
+ * @description Tag size constants and options.
4
+ * @author shisyamo4131
5
+ */
6
+ export const VALUES = Object.freeze({
7
+ SMALL: { value: "SMALL", title: "小" },
8
+ MEDIUM: { value: "MEDIUM", title: "中" },
9
+ LARGE: { value: "LARGE", title: "大" },
10
+ });
11
+
12
+ export const OPTIONS = [
13
+ { title: VALUES.SMALL.title, value: VALUES.SMALL.value },
14
+ { title: VALUES.MEDIUM.title, value: VALUES.MEDIUM.value },
15
+ { title: VALUES.LARGE.title, value: VALUES.LARGE.value },
16
+ ];