cyc-type-def 2.0.0 → 2.1.1

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/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Usage
2
+
3
+ Run these commands to use the package:
4
+
5
+ ```bash
6
+ npm run build
7
+ npm publish --access public
8
+ ```
9
+ ---
10
+ # TypeScript Package Setup Guide
11
+
12
+ This guide outlines how to set up a simple TypeScript package with build and test scripts.
13
+
14
+ ## 1. Initialize Your Package
15
+
16
+ ```bash
17
+ npm init -y
18
+ ```
19
+
20
+ ## 2. Install TypeScript and Essential Dependencies
21
+
22
+ ```bash
23
+ npm install typescript @types/node tsup --save-dev
24
+ ```
25
+
26
+ ## 3. Set Up TypeScript Configuration
27
+
28
+ ```bash
29
+ npx tsc --init
30
+ ```
31
+
32
+ ## 4. Create Package Structure
33
+
34
+ ```
35
+ my-ts-package/
36
+ ├── src/
37
+ │ ├── index.ts # Main exports
38
+ │ ├── utils.ts # Utility functions
39
+ │ └── types.ts # Type definitions
40
+ ├── test/ # Tests
41
+ ├── dist/ # Compiled output
42
+ ├── package.json
43
+ └── tsconfig.json
44
+ ```
45
+
46
+ ## 5. Example Package Code
47
+
48
+ ### `src/index.ts`
49
+
50
+ ```ts
51
+ export * from './utils';
52
+ export * from './types';
53
+ ```
54
+
55
+ ### `src/utils.ts`
56
+
57
+ ```ts
58
+ export function greet(name: string): string {
59
+ return `Hello, ${name}!`;
60
+ }
61
+
62
+ export function sum(a: number, b: number): number {
63
+ return a + b;
64
+ }
65
+ ```
66
+
67
+ ### `src/types.ts`
68
+
69
+ ```ts
70
+ export interface User {
71
+ id: string;
72
+ name: string;
73
+ email: string;
74
+ }
75
+ ```
76
+
77
+ ## 6. `package.json` Scripts
78
+
79
+ ```json
80
+ "scripts": {
81
+ "build": "tsup src/index.ts --format cjs,esm --dts",
82
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
83
+ "test": "jest",
84
+ "prepublishOnly": "npm run build"
85
+ }
86
+ ```
package/dist/index.cjs CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AppUser: () => AppUser,
24
+ AssignedCG: () => AssignedCG,
24
25
  AttSheep: () => AttSheep,
25
26
  Attendance: () => Attendance,
26
27
  BackupAttendance: () => BackupAttendance,
@@ -489,6 +490,13 @@ var SmallTeam = class {
489
490
  }
490
491
  };
491
492
 
493
+ // src/classes/user-management/AssignedCG.ts
494
+ var AssignedCG = class {
495
+ constructor(cg) {
496
+ this.cg = cg;
497
+ }
498
+ };
499
+
492
500
  // src/classes/AppUser.ts
493
501
  var AppUser = class {
494
502
  constructor(id, name, phoneNum, permission) {
@@ -523,6 +531,9 @@ var ClickAction = /* @__PURE__ */ ((ClickAction2) => {
523
531
  ClickAction2[ClickAction2["F_ClickEditSheep"] = 7] = "F_ClickEditSheep";
524
532
  ClickAction2[ClickAction2["F_EditSheep"] = 8] = "F_EditSheep";
525
533
  ClickAction2[ClickAction2["F_VerticalViewAttendance"] = 9] = "F_VerticalViewAttendance";
534
+ ClickAction2[ClickAction2["F_ExportAttRpt"] = 10] = "F_ExportAttRpt";
535
+ ClickAction2[ClickAction2["F_ExportVerticalView"] = 11] = "F_ExportVerticalView";
536
+ ClickAction2[ClickAction2["P_BIRTHDAY"] = 12] = "P_BIRTHDAY";
526
537
  return ClickAction2;
527
538
  })(ClickAction || {});
528
539
 
@@ -541,6 +552,7 @@ var PERMISSION = {
541
552
  // Annotate the CommonJS export names for ESM import in node:
542
553
  0 && (module.exports = {
543
554
  AppUser,
555
+ AssignedCG,
544
556
  AttSheep,
545
557
  Attendance,
546
558
  BackupAttendance,
package/dist/index.d.cts CHANGED
@@ -295,6 +295,11 @@ declare class SmallTeam implements Base {
295
295
  constructor(id: string, name: string, cluster: string, deleted: boolean);
296
296
  }
297
297
 
298
+ declare class AssignedCG {
299
+ cg: string;
300
+ constructor(cg: string);
301
+ }
302
+
298
303
  /** Navigation List Item */
299
304
  interface AppPage {
300
305
  /** Title shown in navigation list */
@@ -327,6 +332,7 @@ declare class AppUser {
327
332
  permission: string;
328
333
  pastoral_team?: PastoralTeam;
329
334
  permissions?: string[];
335
+ assigned_cg?: AssignedCG[];
330
336
  constructor(id: string, name: string, phoneNum: string, permission: string);
331
337
  }
332
338
 
@@ -344,7 +350,10 @@ declare enum ClickAction {
344
350
  F_ExportWeekAttendance = 6,
345
351
  F_ClickEditSheep = 7,
346
352
  F_EditSheep = 8,
347
- F_VerticalViewAttendance = 9
353
+ F_VerticalViewAttendance = 9,
354
+ F_ExportAttRpt = 10,
355
+ F_ExportVerticalView = 11,
356
+ P_BIRTHDAY = 12
348
357
  }
349
358
 
350
359
  declare class Click {
@@ -383,4 +392,4 @@ declare const PERMISSION: {
383
392
 
384
393
  declare const LIST_STATUS: string[];
385
394
 
386
- export { type AppPage, AppUser, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance };
395
+ export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance };
package/dist/index.d.ts CHANGED
@@ -295,6 +295,11 @@ declare class SmallTeam implements Base {
295
295
  constructor(id: string, name: string, cluster: string, deleted: boolean);
296
296
  }
297
297
 
298
+ declare class AssignedCG {
299
+ cg: string;
300
+ constructor(cg: string);
301
+ }
302
+
298
303
  /** Navigation List Item */
299
304
  interface AppPage {
300
305
  /** Title shown in navigation list */
@@ -327,6 +332,7 @@ declare class AppUser {
327
332
  permission: string;
328
333
  pastoral_team?: PastoralTeam;
329
334
  permissions?: string[];
335
+ assigned_cg?: AssignedCG[];
330
336
  constructor(id: string, name: string, phoneNum: string, permission: string);
331
337
  }
332
338
 
@@ -344,7 +350,10 @@ declare enum ClickAction {
344
350
  F_ExportWeekAttendance = 6,
345
351
  F_ClickEditSheep = 7,
346
352
  F_EditSheep = 8,
347
- F_VerticalViewAttendance = 9
353
+ F_VerticalViewAttendance = 9,
354
+ F_ExportAttRpt = 10,
355
+ F_ExportVerticalView = 11,
356
+ P_BIRTHDAY = 12
348
357
  }
349
358
 
350
359
  declare class Click {
@@ -383,4 +392,4 @@ declare const PERMISSION: {
383
392
 
384
393
  declare const LIST_STATUS: string[];
385
394
 
386
- export { type AppPage, AppUser, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance };
395
+ export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance };
package/dist/index.js CHANGED
@@ -443,6 +443,13 @@ var SmallTeam = class {
443
443
  }
444
444
  };
445
445
 
446
+ // src/classes/user-management/AssignedCG.ts
447
+ var AssignedCG = class {
448
+ constructor(cg) {
449
+ this.cg = cg;
450
+ }
451
+ };
452
+
446
453
  // src/classes/AppUser.ts
447
454
  var AppUser = class {
448
455
  constructor(id, name, phoneNum, permission) {
@@ -477,6 +484,9 @@ var ClickAction = /* @__PURE__ */ ((ClickAction2) => {
477
484
  ClickAction2[ClickAction2["F_ClickEditSheep"] = 7] = "F_ClickEditSheep";
478
485
  ClickAction2[ClickAction2["F_EditSheep"] = 8] = "F_EditSheep";
479
486
  ClickAction2[ClickAction2["F_VerticalViewAttendance"] = 9] = "F_VerticalViewAttendance";
487
+ ClickAction2[ClickAction2["F_ExportAttRpt"] = 10] = "F_ExportAttRpt";
488
+ ClickAction2[ClickAction2["F_ExportVerticalView"] = 11] = "F_ExportVerticalView";
489
+ ClickAction2[ClickAction2["P_BIRTHDAY"] = 12] = "P_BIRTHDAY";
480
490
  return ClickAction2;
481
491
  })(ClickAction || {});
482
492
 
@@ -494,6 +504,7 @@ var PERMISSION = {
494
504
  };
495
505
  export {
496
506
  AppUser,
507
+ AssignedCG,
497
508
  AttSheep,
498
509
  Attendance,
499
510
  BackupAttendance,
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "name": "cyc-type-def",
3
- "version": "2.0.0",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "type": "module",
7
- "files": [
8
- "dist"
9
- ],
10
- "scripts": {
11
- "build": "tsup src/index.ts --format cjs,esm --dts",
12
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
13
- "test": "jest",
14
- "prepublishOnly": "npm run build"
15
- },
16
- "keywords": [],
17
- "author": "",
18
- "license": "ISC",
19
- "description": "",
20
- "devDependencies": {
21
- "@types/jest": "^30.0.0",
22
- "@types/node": "^24.0.13",
23
- "jest": "^29.7.0",
24
- "ts-jest": "^29.4.0",
25
- "ts-node": "^10.9.2",
26
- "tsup": "^8.5.0",
27
- "typescript": "^5.8.3"
28
- }
29
- }
1
+ {
2
+ "name": "cyc-type-def",
3
+ "version": "2.1.1",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsup src/index.ts --format cjs,esm --dts",
12
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
13
+ "test": "jest",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": [],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "description": "",
20
+ "devDependencies": {
21
+ "@types/jest": "^30.0.0",
22
+ "@types/node": "^24.0.13",
23
+ "jest": "^29.7.0",
24
+ "ts-jest": "^29.4.0",
25
+ "ts-node": "^10.9.2",
26
+ "tsup": "^8.5.0",
27
+ "typescript": "^5.8.3"
28
+ }
29
+ }