@armoyu/core 1.0.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/dist/api/ApiClient.d.ts +16 -0
- package/dist/api/ApiClient.d.ts.map +1 -0
- package/dist/api/ApiClient.js +50 -0
- package/dist/api/ApiClient.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/models/auth/Role.d.ts +14 -0
- package/dist/models/auth/Role.d.ts.map +1 -0
- package/dist/models/auth/Role.js +28 -0
- package/dist/models/auth/Role.js.map +1 -0
- package/dist/models/auth/Session.d.ts +23 -0
- package/dist/models/auth/Session.d.ts.map +1 -0
- package/dist/models/auth/Session.js +43 -0
- package/dist/models/auth/Session.js.map +1 -0
- package/dist/models/auth/User.d.ts +52 -0
- package/dist/models/auth/User.d.ts.map +1 -0
- package/dist/models/auth/User.js +98 -0
- package/dist/models/auth/User.js.map +1 -0
- package/dist/models/community/Classroom.d.ts +18 -0
- package/dist/models/community/Classroom.d.ts.map +1 -0
- package/dist/models/community/Classroom.js +35 -0
- package/dist/models/community/Classroom.js.map +1 -0
- package/dist/models/community/Event.d.ts +26 -0
- package/dist/models/community/Event.d.ts.map +1 -0
- package/dist/models/community/Event.js +34 -0
- package/dist/models/community/Event.js.map +1 -0
- package/dist/models/community/Faculty.d.ts +16 -0
- package/dist/models/community/Faculty.d.ts.map +1 -0
- package/dist/models/community/Faculty.js +31 -0
- package/dist/models/community/Faculty.js.map +1 -0
- package/dist/models/community/Forum.d.ts +25 -0
- package/dist/models/community/Forum.d.ts.map +1 -0
- package/dist/models/community/Forum.js +37 -0
- package/dist/models/community/Forum.js.map +1 -0
- package/dist/models/community/Giveaway.d.ts +21 -0
- package/dist/models/community/Giveaway.d.ts.map +1 -0
- package/dist/models/community/Giveaway.js +40 -0
- package/dist/models/community/Giveaway.js.map +1 -0
- package/dist/models/community/Group.d.ts +37 -0
- package/dist/models/community/Group.d.ts.map +1 -0
- package/dist/models/community/Group.js +77 -0
- package/dist/models/community/Group.js.map +1 -0
- package/dist/models/community/School.d.ts +27 -0
- package/dist/models/community/School.d.ts.map +1 -0
- package/dist/models/community/School.js +50 -0
- package/dist/models/community/School.js.map +1 -0
- package/dist/models/community/SchoolTeam.d.ts +26 -0
- package/dist/models/community/SchoolTeam.d.ts.map +1 -0
- package/dist/models/community/SchoolTeam.js +43 -0
- package/dist/models/community/SchoolTeam.js.map +1 -0
- package/dist/models/community/Station.d.ts +68 -0
- package/dist/models/community/Station.d.ts.map +1 -0
- package/dist/models/community/Station.js +130 -0
- package/dist/models/community/Station.js.map +1 -0
- package/dist/models/community/Survey.d.ts +26 -0
- package/dist/models/community/Survey.d.ts.map +1 -0
- package/dist/models/community/Survey.js +53 -0
- package/dist/models/community/Survey.js.map +1 -0
- package/dist/models/community/SurveyAnswer.d.ts +14 -0
- package/dist/models/community/SurveyAnswer.d.ts.map +1 -0
- package/dist/models/community/SurveyAnswer.js +28 -0
- package/dist/models/community/SurveyAnswer.js.map +1 -0
- package/dist/models/community/Team.d.ts +12 -0
- package/dist/models/community/Team.d.ts.map +1 -0
- package/dist/models/community/Team.js +26 -0
- package/dist/models/community/Team.js.map +1 -0
- package/dist/models/community/Workplace.d.ts +17 -0
- package/dist/models/community/Workplace.d.ts.map +1 -0
- package/dist/models/community/Workplace.js +34 -0
- package/dist/models/community/Workplace.js.map +1 -0
- package/dist/models/content/Game.d.ts +18 -0
- package/dist/models/content/Game.d.ts.map +1 -0
- package/dist/models/content/Game.js +41 -0
- package/dist/models/content/Game.js.map +1 -0
- package/dist/models/content/Media.d.ts +16 -0
- package/dist/models/content/Media.d.ts.map +1 -0
- package/dist/models/content/Media.js +32 -0
- package/dist/models/content/Media.js.map +1 -0
- package/dist/models/content/Mod.d.ts +20 -0
- package/dist/models/content/Mod.d.ts.map +1 -0
- package/dist/models/content/Mod.js +39 -0
- package/dist/models/content/Mod.js.map +1 -0
- package/dist/models/content/News.d.ts +23 -0
- package/dist/models/content/News.d.ts.map +1 -0
- package/dist/models/content/News.js +43 -0
- package/dist/models/content/News.js.map +1 -0
- package/dist/models/content/Project.d.ts +26 -0
- package/dist/models/content/Project.d.ts.map +1 -0
- package/dist/models/content/Project.js +45 -0
- package/dist/models/content/Project.js.map +1 -0
- package/dist/models/core/PlatformStats.d.ts +41 -0
- package/dist/models/core/PlatformStats.d.ts.map +1 -0
- package/dist/models/core/PlatformStats.js +61 -0
- package/dist/models/core/PlatformStats.js.map +1 -0
- package/dist/models/core/SystemSettings.d.ts +33 -0
- package/dist/models/core/SystemSettings.d.ts.map +1 -0
- package/dist/models/core/SystemSettings.js +42 -0
- package/dist/models/core/SystemSettings.js.map +1 -0
- package/dist/models/index.d.ts +37 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +53 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/shop/CartItem.d.ts +13 -0
- package/dist/models/shop/CartItem.d.ts.map +1 -0
- package/dist/models/shop/CartItem.js +27 -0
- package/dist/models/shop/CartItem.js.map +1 -0
- package/dist/models/shop/Order.d.ts +19 -0
- package/dist/models/shop/Order.d.ts.map +1 -0
- package/dist/models/shop/Order.js +40 -0
- package/dist/models/shop/Order.js.map +1 -0
- package/dist/models/shop/Product.d.ts +19 -0
- package/dist/models/shop/Product.d.ts.map +1 -0
- package/dist/models/shop/Product.js +52 -0
- package/dist/models/shop/Product.js.map +1 -0
- package/dist/models/social/Chat.d.ts +25 -0
- package/dist/models/social/Chat.d.ts.map +1 -0
- package/dist/models/social/Chat.js +48 -0
- package/dist/models/social/Chat.js.map +1 -0
- package/dist/models/social/ChatMessage.d.ts +16 -0
- package/dist/models/social/ChatMessage.d.ts.map +1 -0
- package/dist/models/social/ChatMessage.js +31 -0
- package/dist/models/social/ChatMessage.js.map +1 -0
- package/dist/models/social/Comment.d.ts +20 -0
- package/dist/models/social/Comment.d.ts.map +1 -0
- package/dist/models/social/Comment.js +38 -0
- package/dist/models/social/Comment.js.map +1 -0
- package/dist/models/social/Group.d.ts +30 -0
- package/dist/models/social/Group.d.ts.map +1 -0
- package/dist/models/social/Group.js +66 -0
- package/dist/models/social/Group.js.map +1 -0
- package/dist/models/social/Leaderboard.d.ts +24 -0
- package/dist/models/social/Leaderboard.d.ts.map +1 -0
- package/dist/models/social/Leaderboard.js +56 -0
- package/dist/models/social/Leaderboard.js.map +1 -0
- package/dist/models/social/Note.d.ts +15 -0
- package/dist/models/social/Note.d.ts.map +1 -0
- package/dist/models/social/Note.js +29 -0
- package/dist/models/social/Note.js.map +1 -0
- package/dist/models/social/Notification.d.ts +30 -0
- package/dist/models/social/Notification.d.ts.map +1 -0
- package/dist/models/social/Notification.js +88 -0
- package/dist/models/social/Notification.js.map +1 -0
- package/dist/models/social/NotificationSender.d.ts +18 -0
- package/dist/models/social/NotificationSender.d.ts.map +1 -0
- package/dist/models/social/NotificationSender.js +27 -0
- package/dist/models/social/NotificationSender.js.map +1 -0
- package/dist/models/social/Post.d.ts +41 -0
- package/dist/models/social/Post.d.ts.map +1 -0
- package/dist/models/social/Post.js +53 -0
- package/dist/models/social/Post.js.map +1 -0
- package/dist/models/social/Story.d.ts +16 -0
- package/dist/models/social/Story.d.ts.map +1 -0
- package/dist/models/social/Story.js +31 -0
- package/dist/models/social/Story.js.map +1 -0
- package/dist/models/social/SupportTicket.d.ts +20 -0
- package/dist/models/social/SupportTicket.d.ts.map +1 -0
- package/dist/models/social/SupportTicket.js +38 -0
- package/dist/models/social/SupportTicket.js.map +1 -0
- package/dist/models/store/StoreItem.d.ts +17 -0
- package/dist/models/store/StoreItem.d.ts.map +1 -0
- package/dist/models/store/StoreItem.js +34 -0
- package/dist/models/store/StoreItem.js.map +1 -0
- package/dist/services/AuthService.d.ts +30 -0
- package/dist/services/AuthService.d.ts.map +1 -0
- package/dist/services/AuthService.js +88 -0
- package/dist/services/AuthService.js.map +1 -0
- package/dist/services/SocialService.d.ts +28 -0
- package/dist/services/SocialService.d.ts.map +1 -0
- package/dist/services/SocialService.js +91 -0
- package/dist/services/SocialService.js.map +1 -0
- package/dist/services/SocketService.d.ts +20 -0
- package/dist/services/SocketService.d.ts.map +1 -0
- package/dist/services/SocketService.js +122 -0
- package/dist/services/SocketService.js.map +1 -0
- package/dist/services/UserService.d.ts +23 -0
- package/dist/services/UserService.d.ts.map +1 -0
- package/dist/services/UserService.js +73 -0
- package/dist/services/UserService.js.map +1 -0
- package/dist/types/stats.d.ts +17 -0
- package/dist/types/stats.d.ts.map +1 -0
- package/dist/types/stats.js +2 -0
- package/dist/types/stats.js.map +1 -0
- package/package.json +21 -0
- package/src/api/ApiClient.ts +57 -0
- package/src/index.ts +24 -0
- package/src/models/auth/Role.ts +26 -0
- package/src/models/auth/Session.ts +50 -0
- package/src/models/auth/User.ts +111 -0
- package/src/models/community/Classroom.ts +34 -0
- package/src/models/community/Event.ts +32 -0
- package/src/models/community/Faculty.ts +30 -0
- package/src/models/community/Forum.ts +42 -0
- package/src/models/community/Giveaway.ts +39 -0
- package/src/models/community/Group.ts +78 -0
- package/src/models/community/School.ts +51 -0
- package/src/models/community/SchoolTeam.ts +49 -0
- package/src/models/community/Station.ts +145 -0
- package/src/models/community/Survey.ts +53 -0
- package/src/models/community/SurveyAnswer.ts +26 -0
- package/src/models/community/Team.ts +24 -0
- package/src/models/community/Workplace.ts +32 -0
- package/src/models/content/Game.ts +39 -0
- package/src/models/content/Media.ts +30 -0
- package/src/models/content/Mod.ts +38 -0
- package/src/models/content/News.ts +43 -0
- package/src/models/content/Project.ts +49 -0
- package/src/models/core/PlatformStats.ts +74 -0
- package/src/models/core/SystemSettings.ts +59 -0
- package/src/models/index.ts +37 -0
- package/src/models/shop/CartItem.ts +31 -0
- package/src/models/shop/Order.ts +48 -0
- package/src/models/shop/Product.ts +61 -0
- package/src/models/social/Chat.ts +47 -0
- package/src/models/social/ChatMessage.ts +30 -0
- package/src/models/social/Comment.ts +38 -0
- package/src/models/social/Group.ts +63 -0
- package/src/models/social/Leaderboard.ts +57 -0
- package/src/models/social/Note.ts +28 -0
- package/src/models/social/Notification.ts +99 -0
- package/src/models/social/NotificationSender.ts +36 -0
- package/src/models/social/Post.ts +75 -0
- package/src/models/social/Story.ts +30 -0
- package/src/models/social/SupportTicket.ts +38 -0
- package/src/models/store/StoreItem.ts +32 -0
- package/src/services/AuthService.ts +91 -0
- package/src/services/SocialService.ts +92 -0
- package/src/services/SocketService.ts +112 -0
- package/src/services/UserService.ts +69 -0
- package/src/types/stats.ts +17 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Forum.d.ts","sourceRoot":"","sources":["../../../src/models/community/Forum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,KAAK;IAChB,EAAE,EAAE,MAAM,CAAM;IAChB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;IAClB,UAAU,EAAE,MAAM,CAAK;IACvB,SAAS,EAAE,MAAM,CAAK;IACtB,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;gBAEU,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;IAIhC;;OAEG;IACH,MAAM,IAAI,MAAM;IAIhB;;OAEG;IAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK;CAUlD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Forum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Forum Board (Forum Bölümü) in the aramizdakioyuncu.com platform.
|
|
6
|
+
*/
|
|
7
|
+
class Forum {
|
|
8
|
+
constructor(data) {
|
|
9
|
+
this.id = '';
|
|
10
|
+
this.name = '';
|
|
11
|
+
this.desc = '';
|
|
12
|
+
this.topicCount = 0;
|
|
13
|
+
this.postCount = 0;
|
|
14
|
+
Object.assign(this, data);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the absolute URL to the forum board.
|
|
18
|
+
*/
|
|
19
|
+
getUrl() {
|
|
20
|
+
return `/forum/${this.id}`;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Instantiates a Forum object from a JSON object.
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
|
+
static fromJSON(json) {
|
|
27
|
+
return new Forum({
|
|
28
|
+
id: json.id || '',
|
|
29
|
+
name: json.name || json.title || '',
|
|
30
|
+
desc: json.desc || json.description || '',
|
|
31
|
+
topicCount: json.topicCount || 0,
|
|
32
|
+
postCount: json.postCount || 0,
|
|
33
|
+
lastPost: json.lastPost || null,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Forum = Forum;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Forum.js","sourceRoot":"","sources":["../../../src/models/community/Forum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,KAAK;IAChB,EAAE,GAAW,EAAE,CAAC;IAChB,IAAI,GAAW,EAAE,CAAC;IAClB,IAAI,GAAW,EAAE,CAAC;IAClB,UAAU,GAAW,CAAC,CAAC;IACvB,SAAS,GAAW,CAAC,CAAC;IACtB,QAAQ,CAKN;IAEF,YAAY,IAAoB;QAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,UAAU,IAAI,CAAC,EAAE,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAyB;QACvC,OAAO,IAAI,KAAK,CAAC;YACf,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE;YACnC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,IAAI,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC;YAChC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,CAAC;YAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;SAChC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a Giveaway (Çekiliş) in the aramizdakioyuncu.com platform.
|
|
3
|
+
*/
|
|
4
|
+
export declare class Giveaway {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
prize: string;
|
|
8
|
+
status: 'active' | 'ended';
|
|
9
|
+
participants: number;
|
|
10
|
+
timeLeft: string;
|
|
11
|
+
image: string;
|
|
12
|
+
constructor(data: Partial<Giveaway>);
|
|
13
|
+
/**
|
|
14
|
+
* Returns true if the giveaway is currently active.
|
|
15
|
+
*/
|
|
16
|
+
isActive(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Instantiates a Giveaway object from a JSON object.
|
|
19
|
+
*/
|
|
20
|
+
static fromJSON(json: Record<string, any>): Giveaway;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Giveaway.d.ts","sourceRoot":"","sources":["../../../src/models/community/Giveaway.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAQ;IACnB,EAAE,EAAE,MAAM,CAAM;IAChB,KAAK,EAAE,MAAM,CAAM;IACnB,KAAK,EAAE,MAAM,CAAM;IACnB,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAY;IACtC,YAAY,EAAE,MAAM,CAAK;IACzB,QAAQ,EAAE,MAAM,CAAM;IACtB,KAAK,EAAE,MAAM,CAAM;gBAEP,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC;IAInC;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,QAAQ;CAWrD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Giveaway = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Giveaway (Çekiliş) in the aramizdakioyuncu.com platform.
|
|
6
|
+
*/
|
|
7
|
+
class Giveaway {
|
|
8
|
+
constructor(data) {
|
|
9
|
+
this.id = '';
|
|
10
|
+
this.title = '';
|
|
11
|
+
this.prize = '';
|
|
12
|
+
this.status = 'active';
|
|
13
|
+
this.participants = 0;
|
|
14
|
+
this.timeLeft = '';
|
|
15
|
+
this.image = '';
|
|
16
|
+
Object.assign(this, data);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns true if the giveaway is currently active.
|
|
20
|
+
*/
|
|
21
|
+
isActive() {
|
|
22
|
+
return this.status === 'active';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Instantiates a Giveaway object from a JSON object.
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
static fromJSON(json) {
|
|
29
|
+
return new Giveaway({
|
|
30
|
+
id: json.id || '',
|
|
31
|
+
title: json.title || '',
|
|
32
|
+
prize: json.prize || '',
|
|
33
|
+
status: json.status || 'active',
|
|
34
|
+
participants: json.participants || 0,
|
|
35
|
+
timeLeft: json.timeLeft || json.time_left || '',
|
|
36
|
+
image: json.image || '',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Giveaway = Giveaway;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Giveaway.js","sourceRoot":"","sources":["../../../src/models/community/Giveaway.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,QAAQ;IACnB,EAAE,GAAW,EAAE,CAAC;IAChB,KAAK,GAAW,EAAE,CAAC;IACnB,KAAK,GAAW,EAAE,CAAC;IACnB,MAAM,GAAuB,QAAQ,CAAC;IACtC,YAAY,GAAW,CAAC,CAAC;IACzB,QAAQ,GAAW,EAAE,CAAC;IACtB,KAAK,GAAW,EAAE,CAAC;IAEnB,YAAY,IAAuB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAyB;QACvC,OAAO,IAAI,QAAQ,CAAC;YAClB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,QAAQ;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,CAAC;YACpC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,IAAI,EAAE;YAC/C,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { User } from '../auth/User';
|
|
2
|
+
import { NotificationSender } from '../social/NotificationSender';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a Group (Grup) in the aramizdakioyuncu.com platform.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Group {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
shortName: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
description: string;
|
|
12
|
+
category: string;
|
|
13
|
+
tag: string;
|
|
14
|
+
banner: string;
|
|
15
|
+
logo: string;
|
|
16
|
+
recruitment: string;
|
|
17
|
+
date: string;
|
|
18
|
+
memberCount: number;
|
|
19
|
+
isPrivate: boolean;
|
|
20
|
+
owner: User | null;
|
|
21
|
+
moderators: User[];
|
|
22
|
+
members: User[];
|
|
23
|
+
permissions: string[];
|
|
24
|
+
constructor(data: Partial<Group>);
|
|
25
|
+
/**
|
|
26
|
+
* Returns the absolute URL to the group's page.
|
|
27
|
+
*/
|
|
28
|
+
getGroupUrl(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Converts the group to a standardized notification sender.
|
|
31
|
+
*/
|
|
32
|
+
toNotificationSender(): NotificationSender;
|
|
33
|
+
/**
|
|
34
|
+
* Instantiates a Group object from a JSON object.
|
|
35
|
+
*/
|
|
36
|
+
static fromJSON(json: Record<string, any>): Group;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/models/community/Group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE;;GAEG;AACH,qBAAa,KAAK;IAChB,EAAE,EAAE,MAAM,CAAM;IAChB,IAAI,EAAE,MAAM,CAAM;IAClB,SAAS,EAAE,MAAM,CAAM;IACvB,IAAI,EAAE,MAAM,CAAM;IAClB,WAAW,EAAE,MAAM,CAAM;IACzB,QAAQ,EAAE,MAAM,CAAM;IACtB,GAAG,EAAE,MAAM,CAAM;IACjB,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,EAAE,MAAM,CAAM;IAClB,WAAW,EAAE,MAAM,CAAU;IAC7B,IAAI,EAAE,MAAM,CAAM;IAClB,WAAW,EAAE,MAAM,CAAK;IACxB,SAAS,EAAE,OAAO,CAAS;IAC3B,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC1B,UAAU,EAAE,IAAI,EAAE,CAAM;IACxB,OAAO,EAAE,IAAI,EAAE,CAAM;IACrB,WAAW,EAAE,MAAM,EAAE,CAAM;gBAEf,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;IAOhC;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;OAEG;IACH,oBAAoB,IAAI,kBAAkB;IAU1C;;OAEG;IAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK;CAqBlD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Group = void 0;
|
|
4
|
+
const User_1 = require("../auth/User");
|
|
5
|
+
const NotificationSender_1 = require("../social/NotificationSender");
|
|
6
|
+
/**
|
|
7
|
+
* Represents a Group (Grup) in the aramizdakioyuncu.com platform.
|
|
8
|
+
*/
|
|
9
|
+
class Group {
|
|
10
|
+
constructor(data) {
|
|
11
|
+
this.id = '';
|
|
12
|
+
this.name = '';
|
|
13
|
+
this.shortName = '';
|
|
14
|
+
this.slug = '';
|
|
15
|
+
this.description = '';
|
|
16
|
+
this.category = '';
|
|
17
|
+
this.tag = '';
|
|
18
|
+
this.banner = '';
|
|
19
|
+
this.logo = '';
|
|
20
|
+
this.recruitment = 'Açık';
|
|
21
|
+
this.date = '';
|
|
22
|
+
this.memberCount = 0;
|
|
23
|
+
this.isPrivate = false;
|
|
24
|
+
this.owner = null;
|
|
25
|
+
this.moderators = [];
|
|
26
|
+
this.members = [];
|
|
27
|
+
this.permissions = [];
|
|
28
|
+
Object.assign(this, data);
|
|
29
|
+
if (!this.slug && this.name) {
|
|
30
|
+
this.slug = this.name.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns the absolute URL to the group's page.
|
|
35
|
+
*/
|
|
36
|
+
getGroupUrl() {
|
|
37
|
+
return `/gruplar/${this.slug || this.name.toLowerCase().replace(/\s+/g, '-')}`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Converts the group to a standardized notification sender.
|
|
41
|
+
*/
|
|
42
|
+
toNotificationSender() {
|
|
43
|
+
return new NotificationSender_1.NotificationSender({
|
|
44
|
+
id: this.id,
|
|
45
|
+
name: this.name,
|
|
46
|
+
avatar: this.logo,
|
|
47
|
+
type: 'GROUP',
|
|
48
|
+
url: this.getGroupUrl()
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Instantiates a Group object from a JSON object.
|
|
53
|
+
*/
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
+
static fromJSON(json) {
|
|
56
|
+
return new Group({
|
|
57
|
+
id: json.id || '',
|
|
58
|
+
name: json.name || '',
|
|
59
|
+
shortName: json.shortName || json.name_short || '',
|
|
60
|
+
slug: json.slug || '',
|
|
61
|
+
description: json.description || '',
|
|
62
|
+
category: json.category || '',
|
|
63
|
+
tag: json.tag || '',
|
|
64
|
+
banner: json.banner || json.banner_url || '',
|
|
65
|
+
logo: json.logo || json.logo_url || '',
|
|
66
|
+
recruitment: json.recruitment || 'Açık',
|
|
67
|
+
date: json.date || json.created_at || '',
|
|
68
|
+
memberCount: json.memberCount || json.member_count || 0,
|
|
69
|
+
isPrivate: json.isPrivate || json.is_private || false,
|
|
70
|
+
owner: json.owner ? User_1.User.fromJSON(json.owner) : null,
|
|
71
|
+
moderators: Array.isArray(json.moderators) ? json.moderators.map((m) => User_1.User.fromJSON(m)) : [],
|
|
72
|
+
members: Array.isArray(json.members) ? json.members.map((m) => User_1.User.fromJSON(m)) : [],
|
|
73
|
+
permissions: Array.isArray(json.permissions) ? json.permissions : [],
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Group = Group;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../src/models/community/Group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,KAAK;IAChB,EAAE,GAAW,EAAE,CAAC;IAChB,IAAI,GAAW,EAAE,CAAC;IAClB,SAAS,GAAW,EAAE,CAAC;IACvB,IAAI,GAAW,EAAE,CAAC;IAClB,WAAW,GAAW,EAAE,CAAC;IACzB,QAAQ,GAAW,EAAE,CAAC;IACtB,GAAG,GAAW,EAAE,CAAC;IACjB,MAAM,GAAW,EAAE,CAAC;IACpB,IAAI,GAAW,EAAE,CAAC;IAClB,WAAW,GAAW,MAAM,CAAC;IAC7B,IAAI,GAAW,EAAE,CAAC;IAClB,WAAW,GAAW,CAAC,CAAC;IACxB,SAAS,GAAY,KAAK,CAAC;IAC3B,KAAK,GAAgB,IAAI,CAAC;IAC1B,UAAU,GAAW,EAAE,CAAC;IACxB,OAAO,GAAW,EAAE,CAAC;IACrB,WAAW,GAAa,EAAE,CAAC;IAE3B,YAAY,IAAoB;QAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IAED;;OAEG;IAC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CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,IAAI,KAAK;YACrD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;YACpD,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACnG,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YAC1F,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;SACrE,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { User } from '../auth/User';
|
|
2
|
+
import { Faculty } from './Faculty';
|
|
3
|
+
import { Classroom } from './Classroom';
|
|
4
|
+
import { SchoolTeam } from './SchoolTeam';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a School (Okul/Üniversite) in the ARMOYU education ecosystem.
|
|
7
|
+
*/
|
|
8
|
+
export declare class School {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
logo: string;
|
|
13
|
+
background?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
representative: User | null;
|
|
16
|
+
faculties: Faculty[];
|
|
17
|
+
teams: SchoolTeam[];
|
|
18
|
+
classrooms: Classroom[];
|
|
19
|
+
joinPassword?: string;
|
|
20
|
+
isSocialFeedEnabled: boolean;
|
|
21
|
+
memberCount: number;
|
|
22
|
+
constructor(data: Partial<School>);
|
|
23
|
+
/**
|
|
24
|
+
* Instantiates a School object from a JSON object.
|
|
25
|
+
*/
|
|
26
|
+
static fromJSON(json: Record<string, any>): School;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"School.d.ts","sourceRoot":"","sources":["../../../src/models/community/School.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,qBAAa,MAAM;IACjB,EAAE,EAAE,MAAM,CAAM;IAChB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;IAClB,UAAU,CAAC,EAAE,MAAM,CAAM;IACzB,WAAW,CAAC,EAAE,MAAM,CAAM;IAE1B,cAAc,EAAE,IAAI,GAAG,IAAI,CAAQ;IACnC,SAAS,EAAE,OAAO,EAAE,CAAM;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAM;IACzB,UAAU,EAAE,SAAS,EAAE,CAAM;IAE7B,YAAY,CAAC,EAAE,MAAM,CAAM;IAC3B,mBAAmB,EAAE,OAAO,CAAQ;IACpC,WAAW,EAAE,MAAM,CAAK;gBAEZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;IAIjC;;OAEG;IAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;CAiBnD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.School = void 0;
|
|
4
|
+
const User_1 = require("../auth/User");
|
|
5
|
+
const Faculty_1 = require("./Faculty");
|
|
6
|
+
const Classroom_1 = require("./Classroom");
|
|
7
|
+
const SchoolTeam_1 = require("./SchoolTeam");
|
|
8
|
+
/**
|
|
9
|
+
* Represents a School (Okul/Üniversite) in the ARMOYU education ecosystem.
|
|
10
|
+
*/
|
|
11
|
+
class School {
|
|
12
|
+
constructor(data) {
|
|
13
|
+
this.id = '';
|
|
14
|
+
this.name = '';
|
|
15
|
+
this.slug = '';
|
|
16
|
+
this.logo = '';
|
|
17
|
+
this.background = '';
|
|
18
|
+
this.description = '';
|
|
19
|
+
this.representative = null;
|
|
20
|
+
this.faculties = [];
|
|
21
|
+
this.teams = [];
|
|
22
|
+
this.classrooms = [];
|
|
23
|
+
this.joinPassword = '';
|
|
24
|
+
this.isSocialFeedEnabled = true;
|
|
25
|
+
this.memberCount = 0;
|
|
26
|
+
Object.assign(this, data);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Instantiates a School object from a JSON object.
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
+
static fromJSON(json) {
|
|
33
|
+
return new School({
|
|
34
|
+
id: json.id || '',
|
|
35
|
+
name: json.name || '',
|
|
36
|
+
slug: json.slug || '',
|
|
37
|
+
logo: json.logo || '',
|
|
38
|
+
background: json.background || '',
|
|
39
|
+
description: json.description || '',
|
|
40
|
+
representative: json.representative ? User_1.User.fromJSON(json.representative) : null,
|
|
41
|
+
faculties: Array.isArray(json.faculties) ? json.faculties.map(Faculty_1.Faculty.fromJSON) : [],
|
|
42
|
+
teams: Array.isArray(json.teams) ? json.teams.map(SchoolTeam_1.SchoolTeam.fromJSON) : [],
|
|
43
|
+
classrooms: Array.isArray(json.classrooms) ? json.classrooms.map(Classroom_1.Classroom.fromJSON) : [],
|
|
44
|
+
joinPassword: json.joinPassword || '',
|
|
45
|
+
isSocialFeedEnabled: json.isSocialFeedEnabled !== undefined ? json.isSocialFeedEnabled : true,
|
|
46
|
+
memberCount: json.memberCount || 0
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.School = School;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"School.js","sourceRoot":"","sources":["../../../src/models/community/School.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,EAAE,GAAW,EAAE,CAAC;IAChB,IAAI,GAAW,EAAE,CAAC;IAClB,IAAI,GAAW,EAAE,CAAC;IAClB,IAAI,GAAW,EAAE,CAAC;IAClB,UAAU,GAAY,EAAE,CAAC;IACzB,WAAW,GAAY,EAAE,CAAC;IAE1B,cAAc,GAAgB,IAAI,CAAC;IACnC,SAAS,GAAc,EAAE,CAAC;IAC1B,KAAK,GAAiB,EAAE,CAAC;IACzB,UAAU,GAAgB,EAAE,CAAC;IAE7B,YAAY,GAAY,EAAE,CAAC;IAC3B,mBAAmB,GAAY,IAAI,CAAC;IACpC,WAAW,GAAW,CAAC,CAAC;IAExB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAyB;QACvC,OAAO,IAAI,MAAM,CAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI,I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
/**
|
|
7
|
+
* Represents a School Team (Okul Takımı) for specific games or sports.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SchoolTeam {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
gameOrSport: string;
|
|
13
|
+
type: TeamType;
|
|
14
|
+
logo?: string;
|
|
15
|
+
schoolId: string;
|
|
16
|
+
captain: User | null;
|
|
17
|
+
coach: User | null;
|
|
18
|
+
members: User[];
|
|
19
|
+
memberCount: number;
|
|
20
|
+
achievements: string[];
|
|
21
|
+
constructor(data: Partial<SchoolTeam>);
|
|
22
|
+
/**
|
|
23
|
+
* Instantiates a SchoolTeam object from a JSON object.
|
|
24
|
+
*/
|
|
25
|
+
static fromJSON(json: Record<string, any>): SchoolTeam;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchoolTeam.d.ts","sourceRoot":"","sources":["../../../src/models/community/SchoolTeam.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,UAAU;IACrB,EAAE,EAAE,MAAM,CAAM;IAChB,IAAI,EAAE,MAAM,CAAM;IAClB,WAAW,EAAE,MAAM,CAAM;IACzB,IAAI,EAAE,QAAQ,CAAa;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAM;IAEnB,QAAQ,EAAE,MAAM,CAAM;IACtB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC5B,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC1B,OAAO,EAAE,IAAI,EAAE,CAAM;IACrB,WAAW,EAAE,MAAM,CAAK;IAExB,YAAY,EAAE,MAAM,EAAE,CAAM;gBAEhB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;IAIrC;;OAEG;IAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,UAAU;CAevD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchoolTeam = void 0;
|
|
4
|
+
const User_1 = require("../auth/User");
|
|
5
|
+
/**
|
|
6
|
+
* Represents a School Team (Okul Takımı) for specific games or sports.
|
|
7
|
+
*/
|
|
8
|
+
class SchoolTeam {
|
|
9
|
+
constructor(data) {
|
|
10
|
+
this.id = '';
|
|
11
|
+
this.name = ''; // e.g., "UAV FB", "ARMOYU CS2"
|
|
12
|
+
this.gameOrSport = ''; // e.g., "Football", "Volleyball", "Counter-Strike 2"
|
|
13
|
+
this.type = 'ESPORTS';
|
|
14
|
+
this.logo = '';
|
|
15
|
+
this.schoolId = '';
|
|
16
|
+
this.captain = null;
|
|
17
|
+
this.coach = null;
|
|
18
|
+
this.members = [];
|
|
19
|
+
this.memberCount = 0;
|
|
20
|
+
this.achievements = [];
|
|
21
|
+
Object.assign(this, data);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Instantiates a SchoolTeam object from a JSON object.
|
|
25
|
+
*/
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
static fromJSON(json) {
|
|
28
|
+
return new SchoolTeam({
|
|
29
|
+
id: json.id || '',
|
|
30
|
+
name: json.name || '',
|
|
31
|
+
gameOrSport: json.gameOrSport || json.game_or_sport || '',
|
|
32
|
+
type: json.type || 'ESPORTS',
|
|
33
|
+
logo: json.logo || '',
|
|
34
|
+
schoolId: json.schoolId || '',
|
|
35
|
+
captain: json.captain ? User_1.User.fromJSON(json.captain) : null,
|
|
36
|
+
coach: json.coach ? User_1.User.fromJSON(json.coach) : null,
|
|
37
|
+
members: Array.isArray(json.members) ? json.members.map(User_1.User.fromJSON) : [],
|
|
38
|
+
memberCount: json.memberCount || 0,
|
|
39
|
+
achievements: json.achievements || []
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.SchoolTeam = SchoolTeam;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchoolTeam.js","sourceRoot":"","sources":["../../../src/models/community/SchoolTeam.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOpC;;GAEG;AACH,MAAM,OAAO,UAAU;IACrB,EAAE,GAAW,EAAE,CAAC;IAChB,IAAI,GAAW,EAAE,CAAC,CAAC,+BAA+B;IAClD,WAAW,GAAW,EAAE,CAAC,CAAC,qDAAqD;IAC/E,IAAI,GAAa,SAAS,CAAC;IAC3B,IAAI,GAAY,EAAE,CAAC;IAEnB,QAAQ,GAAW,EAAE,CAAC;IACtB,OAAO,GAAgB,IAAI,CAAC;IAC5B,KAAK,GAAgB,IAAI,CAAC;IAC1B,OAAO,GAAW,EAAE,CAAC;IACrB,WAAW,GAAW,CAAC,CAAC;IAExB,YAAY,GAAa,EAAE,CAAC;IAE5B,YAAY,IAAyB;QACnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAyB;QACvC,OAAO,IAAI,UAAU,CAAC;YACpB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa,IAAI,EAAE;YACzD,IAAI,EAAG,IAAI,CAAC,IAAiB,IAAI,SAAS;YAC1C,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YAC1D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;YACpD,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3E,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC;YAClC,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { User } from '../auth/User';
|
|
2
|
+
export type StationType = 'YEMEK' | 'INTERNET_KAFE' | 'HALI_SAHA' | 'SPOR_KOMPLEKSI';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a menu item or a product in a station.
|
|
5
|
+
*/
|
|
6
|
+
export declare class StationProduct {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
price: number;
|
|
10
|
+
category: string;
|
|
11
|
+
image?: string;
|
|
12
|
+
isDeal?: boolean;
|
|
13
|
+
discountRate?: string;
|
|
14
|
+
constructor(data: Partial<StationProduct>);
|
|
15
|
+
static fromJSON(json: Record<string, any>): StationProduct;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Represents detailed hardware/equipment in a workstation setup.
|
|
19
|
+
*/
|
|
20
|
+
export declare class WorkstationEquipment {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
cpu: string;
|
|
24
|
+
gpu: string;
|
|
25
|
+
ram: string;
|
|
26
|
+
monitor: string;
|
|
27
|
+
keyboard: string;
|
|
28
|
+
mouse: string;
|
|
29
|
+
isAvailable?: boolean;
|
|
30
|
+
constructor(data: Partial<WorkstationEquipment>);
|
|
31
|
+
static fromJSON(json: Record<string, any>): WorkstationEquipment;
|
|
32
|
+
}
|
|
33
|
+
export interface StationPricing {
|
|
34
|
+
label: string;
|
|
35
|
+
price: number;
|
|
36
|
+
unit: string;
|
|
37
|
+
}
|
|
38
|
+
export declare class StationCoupon {
|
|
39
|
+
code: string;
|
|
40
|
+
discount: string;
|
|
41
|
+
expiryDate: string;
|
|
42
|
+
description: string;
|
|
43
|
+
constructor(data: Partial<StationCoupon>);
|
|
44
|
+
static fromJSON(json: Record<string, any>): StationCoupon;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Represents a Station (İstasyon) in the aramizdakioyuncu.com platform.
|
|
48
|
+
*/
|
|
49
|
+
export declare class Station {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
slug: string;
|
|
53
|
+
type: StationType;
|
|
54
|
+
description: string;
|
|
55
|
+
location: string;
|
|
56
|
+
logo: string;
|
|
57
|
+
banner: string;
|
|
58
|
+
rating: number;
|
|
59
|
+
reviewCount: number;
|
|
60
|
+
owner: User | null;
|
|
61
|
+
products?: StationProduct[];
|
|
62
|
+
equipment?: WorkstationEquipment[];
|
|
63
|
+
pricing?: StationPricing[];
|
|
64
|
+
coupons?: StationCoupon[];
|
|
65
|
+
facilities?: string[];
|
|
66
|
+
constructor(data: Partial<Station>);
|
|
67
|
+
static fromJSON(json: Record<string, any>): Station;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Station.d.ts","sourceRoot":"","sources":["../../../src/models/community/Station.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,eAAe,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAErF;;GAEG;AACH,qBAAa,cAAc;IACzB,EAAE,EAAE,MAAM,CAAM;IAChB,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ClB,EAAE,EAAE,MAAM,CAAM;IAChB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,WAAW,CAAW;IAC5B,WAAW,EAAE,MAAM,CAAM;IACzB,QAAQ,EAAE,MAAM,CAAM;IACtB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,MAAM,EAAE,MAAM,CAAK;IACnB,WAAW,EAAE,MAAM,CAAK;IACxB,KAAK,EAAE,IAAI,GAAG,IAAI,CAAQ;IAG1B,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAM;IACjC,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAM;IACxC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAM;IAChC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAM;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAM;gBAEf,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC;IASlC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO;CAoBpD"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Station = exports.StationCoupon = exports.WorkstationEquipment = exports.StationProduct = void 0;
|
|
4
|
+
const User_1 = require("../auth/User");
|
|
5
|
+
/**
|
|
6
|
+
* Represents a menu item or a product in a station.
|
|
7
|
+
*/
|
|
8
|
+
class StationProduct {
|
|
9
|
+
constructor(data) {
|
|
10
|
+
this.id = '';
|
|
11
|
+
this.name = '';
|
|
12
|
+
this.price = 0;
|
|
13
|
+
this.category = '';
|
|
14
|
+
Object.assign(this, data);
|
|
15
|
+
}
|
|
16
|
+
static fromJSON(json) {
|
|
17
|
+
return new StationProduct({
|
|
18
|
+
id: json.id || '',
|
|
19
|
+
name: json.name || '',
|
|
20
|
+
price: json.price || 0,
|
|
21
|
+
category: json.category || '',
|
|
22
|
+
image: json.image,
|
|
23
|
+
isDeal: json.isDeal,
|
|
24
|
+
discountRate: json.discountRate,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.StationProduct = StationProduct;
|
|
29
|
+
/**
|
|
30
|
+
* Represents detailed hardware/equipment in a workstation setup.
|
|
31
|
+
*/
|
|
32
|
+
class WorkstationEquipment {
|
|
33
|
+
constructor(data) {
|
|
34
|
+
this.id = '';
|
|
35
|
+
this.name = 'Standart Masa'; // e.g., "VIP Oda #1"
|
|
36
|
+
this.cpu = '';
|
|
37
|
+
this.gpu = '';
|
|
38
|
+
this.ram = '';
|
|
39
|
+
this.monitor = '';
|
|
40
|
+
this.keyboard = '';
|
|
41
|
+
this.mouse = '';
|
|
42
|
+
this.isAvailable = true;
|
|
43
|
+
Object.assign(this, data);
|
|
44
|
+
}
|
|
45
|
+
static fromJSON(json) {
|
|
46
|
+
var _a;
|
|
47
|
+
return new WorkstationEquipment({
|
|
48
|
+
id: json.id || '',
|
|
49
|
+
name: json.name || '',
|
|
50
|
+
cpu: json.cpu || '',
|
|
51
|
+
gpu: json.gpu || '',
|
|
52
|
+
ram: json.ram || '',
|
|
53
|
+
monitor: json.monitor || '',
|
|
54
|
+
keyboard: json.keyboard || '',
|
|
55
|
+
mouse: json.mouse || '',
|
|
56
|
+
isAvailable: (_a = json.isAvailable) !== null && _a !== void 0 ? _a : true,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.WorkstationEquipment = WorkstationEquipment;
|
|
61
|
+
class StationCoupon {
|
|
62
|
+
constructor(data) {
|
|
63
|
+
this.code = '';
|
|
64
|
+
this.discount = '';
|
|
65
|
+
this.expiryDate = '';
|
|
66
|
+
this.description = '';
|
|
67
|
+
Object.assign(this, data);
|
|
68
|
+
}
|
|
69
|
+
static fromJSON(json) {
|
|
70
|
+
return new StationCoupon({
|
|
71
|
+
code: json.code || '',
|
|
72
|
+
discount: json.discount || '',
|
|
73
|
+
expiryDate: json.expiryDate || '',
|
|
74
|
+
description: json.description || '',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.StationCoupon = StationCoupon;
|
|
79
|
+
/**
|
|
80
|
+
* Represents a Station (İstasyon) in the aramizdakioyuncu.com platform.
|
|
81
|
+
*/
|
|
82
|
+
class Station {
|
|
83
|
+
constructor(data) {
|
|
84
|
+
this.id = '';
|
|
85
|
+
this.name = '';
|
|
86
|
+
this.slug = '';
|
|
87
|
+
this.type = 'YEMEK';
|
|
88
|
+
this.description = '';
|
|
89
|
+
this.location = '';
|
|
90
|
+
this.logo = '';
|
|
91
|
+
this.banner = '';
|
|
92
|
+
this.rating = 0;
|
|
93
|
+
this.reviewCount = 0;
|
|
94
|
+
this.owner = null;
|
|
95
|
+
// Refactored to unified classes
|
|
96
|
+
this.products = [];
|
|
97
|
+
this.equipment = [];
|
|
98
|
+
this.pricing = [];
|
|
99
|
+
this.coupons = [];
|
|
100
|
+
this.facilities = [];
|
|
101
|
+
Object.assign(this, data);
|
|
102
|
+
if (!this.slug && this.name) {
|
|
103
|
+
this.slug = this.name.toLowerCase()
|
|
104
|
+
.replace(/\s+/g, '-')
|
|
105
|
+
.replace(/[^a-z0-9-]/g, '');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
static fromJSON(json) {
|
|
109
|
+
var _a, _b, _c;
|
|
110
|
+
return new Station({
|
|
111
|
+
id: json.id || '',
|
|
112
|
+
name: json.name || '',
|
|
113
|
+
slug: json.slug || '',
|
|
114
|
+
type: json.type || 'YEMEK',
|
|
115
|
+
description: json.description || '',
|
|
116
|
+
location: json.location || '',
|
|
117
|
+
logo: json.logo || '',
|
|
118
|
+
banner: json.banner || '',
|
|
119
|
+
rating: json.rating || 0,
|
|
120
|
+
reviewCount: json.reviewCount || 0,
|
|
121
|
+
owner: json.owner ? User_1.User.fromJSON(json.owner) : null,
|
|
122
|
+
products: ((_a = json.products) === null || _a === void 0 ? void 0 : _a.map((p) => StationProduct.fromJSON(p))) || [],
|
|
123
|
+
equipment: ((_b = json.equipment) === null || _b === void 0 ? void 0 : _b.map((e) => WorkstationEquipment.fromJSON(e))) || [],
|
|
124
|
+
pricing: json.pricing,
|
|
125
|
+
coupons: ((_c = json.coupons) === null || _c === void 0 ? void 0 : _c.map((c) => StationCoupon.fromJSON(c))) || [],
|
|
126
|
+
facilities: json.facilities,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.Station = Station;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Station.js","sourceRoot":"","sources":["../../../src/models/community/Station.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,EAAE,GAAW,EAAE,CAAC;IAChB,IAAI,GAAW,EAAE,CAAC;IAClB,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IACtB,KAAK,CAAU;IACf,MAAM,CAAW;IACjB,YAAY,CAAU;IAEtB,YAAY,IAA6B;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAyB;QACvC,OAAO,IAAI,cAAc,CAAC;YACxB,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;YACtB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;GAEG;A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4
|
+
* Represents a community Survey (Anket) in the aramizdakioyuncu.com platform.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Survey {
|
|
7
|
+
id: string;
|
|
8
|
+
question: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
options: SurveyAnswer[];
|
|
11
|
+
author: User | null;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
expiresAt?: string;
|
|
14
|
+
totalVotes: number;
|
|
15
|
+
hasVoted: boolean;
|
|
16
|
+
myVoteId?: string;
|
|
17
|
+
constructor(data: Partial<Survey>);
|
|
18
|
+
/**
|
|
19
|
+
* Helper to get percentage for a specific option.
|
|
20
|
+
*/
|
|
21
|
+
getOptionPercentage(optionId: string): number;
|
|
22
|
+
/**
|
|
23
|
+
* Instantiates a Survey object from a JSON object.
|
|
24
|
+
*/
|
|
25
|
+
static fromJSON(json: Record<string, any>): Survey;
|
|
26
|
+
}
|