cyc-type-def 2.0.0 → 2.1.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/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) {
@@ -541,6 +549,7 @@ var PERMISSION = {
541
549
  // Annotate the CommonJS export names for ESM import in node:
542
550
  0 && (module.exports = {
543
551
  AppUser,
552
+ AssignedCG,
544
553
  AttSheep,
545
554
  Attendance,
546
555
  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
 
@@ -383,4 +389,4 @@ declare const PERMISSION: {
383
389
 
384
390
  declare const LIST_STATUS: string[];
385
391
 
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 };
392
+ 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
 
@@ -383,4 +389,4 @@ declare const PERMISSION: {
383
389
 
384
390
  declare const LIST_STATUS: string[];
385
391
 
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 };
392
+ 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) {
@@ -494,6 +501,7 @@ var PERMISSION = {
494
501
  };
495
502
  export {
496
503
  AppUser,
504
+ AssignedCG,
497
505
  AttSheep,
498
506
  Attendance,
499
507
  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.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
+ }