cyc-type-def 1.0.0 → 1.0.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/dist/index.d.mts CHANGED
@@ -1,3 +1,391 @@
1
+ interface Base {
2
+ id: string;
3
+ deleted: boolean;
4
+ createdAt?: number;
5
+ createdBy?: string;
6
+ updatedAt?: number;
7
+ updatedBy?: string;
8
+ remark?: string;
9
+ }
10
+
11
+ declare class CG implements Base {
12
+ id: string;
13
+ deleted: boolean;
14
+ name: string;
15
+ /** small team id */
16
+ st: string;
17
+ /** cluster id */
18
+ cluster: string;
19
+ cglCnt?: number;
20
+ sglCnt?: number;
21
+ cglName?: string;
22
+ constructor(id: string, name: string, st: string, cluster: string, deleted: boolean);
23
+ }
24
+
25
+ declare class Sheep implements Base {
26
+ name: string;
27
+ st: string;
28
+ cluster: string;
29
+ cg: string;
30
+ status: string;
31
+ discipler?: string;
32
+ age?: number;
33
+ show: boolean;
34
+ birthday?: number;
35
+ isBaptised?: boolean;
36
+ dtBaptism?: number;
37
+ attCnt: number;
38
+ hideAtt?: boolean;
39
+ id: string;
40
+ deleted: boolean;
41
+ createdAt?: number;
42
+ createdBy?: string;
43
+ updatedAt?: number;
44
+ updatedBy?: string;
45
+ remark?: string;
46
+ arrFlwUpCnt?: number[];
47
+ constructor(id: string, name: string, status: string, cg: string, st: string, cluster: string, deleted: boolean, show: boolean, attCnt: number);
48
+ }
49
+
50
+ interface Session extends Base {
51
+ code: string;
52
+ desc: string;
53
+ seq: number;
54
+ type: string;
55
+ needAbsReason: boolean;
56
+ }
57
+ /** Session object indicating session of title */
58
+ declare class Session implements Session {
59
+ constructor();
60
+ }
61
+
62
+ interface SessionAttendance extends Session {
63
+ /** array of attendance sheep (AttSheep) */
64
+ arrSheep: AttSheep[];
65
+ input: string;
66
+ sky: DisplayAttendance;
67
+ ground: DisplayAttendance;
68
+ total: DisplayAttendance;
69
+ cntAbs: number;
70
+ desAbs: string;
71
+ }
72
+ /**
73
+ * attendance of a session
74
+ *
75
+ * @extends
76
+ * Session
77
+ */
78
+ declare class SessionAttendance implements SessionAttendance {
79
+ constructor();
80
+ constructor(session: Session);
81
+ sortedArrAttSheep(): AttSheep[];
82
+ get arrFilteredSheep(): AttSheep[];
83
+ getCnt(status: string, attType: string): number;
84
+ getAbsCnt(): number;
85
+ getDesc(status: string, attType: string): string;
86
+ getAbsDesc(): string;
87
+ calc(): void;
88
+ /** generate count of OM, NB, AC, NF, RNF */
89
+ calcFigure(): void;
90
+ /** generate description of OM, NB, AC, NF, RNF */
91
+ calcDesc(): void;
92
+ /**
93
+ * reset all display attendance figure to zero
94
+ */
95
+ resetDisplayAttendance(): void;
96
+ /**
97
+ * Sums CG's sessionAttendance into total sessionAttendance.
98
+ * @param sessionAttendance
99
+ */
100
+ sum(sessionAttendance: SessionAttendance): void;
101
+ }
102
+ interface AttSheep {
103
+ idSheep: string;
104
+ name: string;
105
+ status: string;
106
+ attended: boolean;
107
+ absReason: string;
108
+ method: string;
109
+ }
110
+ /** represents a single member in a SessionAttendance. */
111
+ declare class AttSheep implements AttSheep {
112
+ /**
113
+ * initialize AttSheep object from Sheep object
114
+ * @param sheep
115
+ */
116
+ constructor(sheep: Sheep);
117
+ copyAtt(attSheep: AttSheep): void;
118
+ }
119
+ /**
120
+ * Contains a SessionAttendance data, to display.
121
+ * Ground/Sky/Total
122
+ */
123
+ declare class DisplayAttendance {
124
+ [key: string]: any;
125
+ cntOM: number;
126
+ cntNB: number;
127
+ cntAC: number;
128
+ cntNF: number;
129
+ cntRNF: number;
130
+ desOM: string;
131
+ desNB: string;
132
+ desAC: string;
133
+ desNF: string;
134
+ desRNF: string;
135
+ total: number;
136
+ calcTotal(): void;
137
+ }
138
+
139
+ interface Title extends Base {
140
+ startDt: number;
141
+ endDt: number;
142
+ code: string;
143
+ arrSession: Session[];
144
+ }
145
+ /** represents a week */
146
+ declare class Title implements Title {
147
+ getKey(): string;
148
+ }
149
+
150
+ interface Attendance extends Title {
151
+ idTitle: string;
152
+ idCg: string;
153
+ idSt: string;
154
+ idCluster: string;
155
+ timestamp: number;
156
+ arrSessionAttendance: SessionAttendance[];
157
+ }
158
+ /**
159
+ * attendance of week
160
+ *
161
+ * @extends Title
162
+ */
163
+ declare class Attendance implements Attendance {
164
+ constructor();
165
+ constructor(attendance: Attendance);
166
+ getSessionAttendance(session: Session): void;
167
+ setSessionAttendance(arrSession: Session[]): void;
168
+ deepCopySessionAttendance(arrSessionAttendance: SessionAttendance[]): SessionAttendance[];
169
+ clearArrAttSheep(idCG: string, arrSheepForRef: {
170
+ [key: string]: Sheep;
171
+ }): void;
172
+ setArrAttSheep(arrSheep: Sheep[]): void;
173
+ addSheep(sheep: Sheep): void;
174
+ setCG(cg: CG): void;
175
+ /**
176
+ * remove sheep where attended=false from arrSheep to submit attendance,
177
+ * won't remove OM
178
+ */
179
+ removeNotAttendForSubmission(): void;
180
+ /** calculate session attendance's figure & description */
181
+ calc(): void;
182
+ /** Reset all display attendance figure to zero. */
183
+ resetDisplayAttendance(): void;
184
+ getSessionAttendanceByCode(code: string): SessionAttendance;
185
+ /**
186
+ * copy attendance to the writing panel
187
+ * @param attendance
188
+ */
189
+ copy(attendance: Attendance): void;
190
+ }
191
+
192
+ interface BackupAttendance {
193
+ attendance: Attendance;
194
+ timestamp: number;
195
+ }
196
+ declare class BackupAttendance implements BackupAttendance {
197
+ }
198
+
199
+ declare class TitleAttendance {
200
+ cgAtt: AttSheep;
201
+ serviceAtt: AttSheep;
202
+ title: Title;
203
+ constructor(cgAtt: AttSheep, serviceAtt: AttSheep, title: Title);
204
+ }
205
+
206
+ declare class ReportSheep extends Sheep {
207
+ attMap: {
208
+ [key: string]: TitleAttendance;
209
+ };
210
+ constructor(sheep: Sheep);
211
+ }
212
+
213
+ interface MsjClassType extends Base {
214
+ title: string;
215
+ seq?: number;
216
+ defaultMinAtt?: number;
217
+ }
218
+
219
+ interface MsjClassBatch extends Base {
220
+ idMsjClassType: string;
221
+ yearTimestamp: number;
222
+ monthTimestamp: number;
223
+ msjClassType?: MsjClassType;
224
+ numOfClass: number;
225
+ dt?: Date;
226
+ minAtt?: number;
227
+ }
228
+
229
+ interface MsjClassTime extends Base {
230
+ idMsjClassBatch: string;
231
+ time: number;
232
+ msjClassBatch?: MsjClassBatch;
233
+ classNo: number;
234
+ backtracked?: boolean;
235
+ }
236
+
237
+ interface MsjStudClass {
238
+ idClass?: string;
239
+ attended: boolean;
240
+ classNo: number;
241
+ replaced?: boolean;
242
+ absReason?: string;
243
+ markBy?: string;
244
+ markAt?: number;
245
+ provedAbsent?: boolean;
246
+ isWatchedRecording?: boolean;
247
+ markByName?: string;
248
+ }
249
+
250
+ interface MsjStudBatch extends Base {
251
+ idSheep: string;
252
+ idBatch: string;
253
+ completed?: boolean;
254
+ proceed?: boolean;
255
+ attendance?: MsjStudClass[];
256
+ status?: string;
257
+ }
258
+
259
+ declare class FollowUpStatus {
260
+ id: string;
261
+ method: string;
262
+ st: string;
263
+ cluster: string;
264
+ cg: string;
265
+ sheep: string;
266
+ in_list: boolean;
267
+ status: string;
268
+ timeStamp: string;
269
+ date: string;
270
+ discipler: string;
271
+ user?: string;
272
+ constructor();
273
+ }
274
+
275
+ declare class Cluster implements Base {
276
+ id: string;
277
+ deleted: boolean;
278
+ name: string;
279
+ createdAt?: number;
280
+ createdBy: string | undefined;
281
+ updatedAt?: number;
282
+ updatedBy: string | undefined;
283
+ remark?: string;
284
+ constructor(id: string, name: string, deleted: boolean);
285
+ }
286
+
287
+ declare class SmallTeam implements Base {
288
+ id: string;
289
+ name: string;
290
+ /** cluster id */
291
+ cluster: string;
292
+ deleted: boolean;
293
+ constructor(id: string, name: string, cluster: string, deleted: boolean);
294
+ }
295
+
296
+ /** Navigation List Item */
297
+ interface AppPage {
298
+ /** Title shown in navigation list */
299
+ title: string;
300
+ /** redirect target */
301
+ url: string;
302
+ /** Ionic icon name */
303
+ icon: string;
304
+ /** control whether show in navigation list or not */
305
+ canAccess: boolean;
306
+ category: string;
307
+ /** Angular Material icon name */
308
+ matIcon: string;
309
+ /** user need sign in to view */
310
+ isSecure: boolean;
311
+ /** Permissions need to view. Blank indicates everyone can view. */
312
+ permissions: string[];
313
+ }
314
+
315
+ interface PastoralTeam {
316
+ cg?: string;
317
+ cluster?: string;
318
+ st?: string;
319
+ }
320
+ declare class AppUser {
321
+ id: string;
322
+ name: string;
323
+ /** Login id: phone number/email */
324
+ phoneNum: string;
325
+ permission: string;
326
+ pastoral_team?: PastoralTeam;
327
+ permissions?: string[];
328
+ constructor(id: string, name: string, phoneNum: string, permission: string);
329
+ }
330
+
331
+ interface BaseDialog {
332
+ close(): void;
333
+ }
334
+
335
+ declare enum ClickAction {
336
+ P_WeeklyAttendance = 0,
337
+ P_AttendanceReport = 1,
338
+ P_CGNameList = 2,
339
+ F_CopyAttendance = 3,
340
+ F_CheckAttendanceHistory = 4,
341
+ F_AttendanceReminder = 5,
342
+ F_ExportWeekAttendance = 6,
343
+ F_ClickEditSheep = 7,
344
+ F_EditSheep = 8,
345
+ F_VerticalViewAttendance = 9
346
+ }
347
+
348
+ declare class Click {
349
+ action: ClickAction;
350
+ timeStamp: number;
351
+ userId?: string;
352
+ }
353
+
354
+ declare const METHOD: {
355
+ SKY: string;
356
+ GROUND: string;
357
+ TOTAL: string;
358
+ };
359
+
360
+ declare const PERMISSION: {
361
+ SUPER_USER: string;
362
+ TL: string;
363
+ SCGL: string;
364
+ CGL: string;
365
+ FL: string;
366
+ WM: string;
367
+ NOT_VERIFIED: string;
368
+ PASTORAL_ADMIN: string;
369
+ ST_ADMIN: string;
370
+ };
371
+ declare const PERMISSION_TYPE: {
372
+ USER_MANAGEMENT: string[];
373
+ WEEKLY_ATT: string[];
374
+ ATT_RPT: string[];
375
+ TITLE: string[];
376
+ CLICKS: string[];
377
+ monthlyReport: string[];
378
+ read: string[];
379
+ msjStudentRecord: string[];
380
+ msjProgress: string[];
381
+ msjToAttend: string[];
382
+ addSheep: string[];
383
+ addCG: string[];
384
+ oprAddSheep: string[];
385
+ };
386
+
387
+ declare const LIST_STATUS: string[];
388
+
1
389
  declare function greet(name: string): string;
2
390
  declare function sum(a: number, b: number): number;
3
391
 
@@ -7,4 +395,4 @@ interface User {
7
395
  email: string;
8
396
  }
9
397
 
10
- export { type User, greet, sum };
398
+ export { type AppPage, AppUser, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, Click, ClickAction, Cluster, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, type MsjStudBatch, type MsjStudClass, PERMISSION, PERMISSION_TYPE, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, type User, greet, sum };