@sideline/domain 0.0.0 → 0.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/ApiGroup/package.json +6 -0
- package/api/Auth/package.json +6 -0
- package/api/Invite/package.json +6 -0
- package/dist/cjs/ApiGroup.js +9 -0
- package/dist/cjs/ApiGroup.js.map +1 -0
- package/dist/cjs/api/Auth.js +85 -0
- package/dist/cjs/api/Auth.js.map +1 -0
- package/dist/cjs/api/Invite.js +61 -0
- package/dist/cjs/api/Invite.js.map +1 -0
- package/dist/cjs/index.js +17 -3
- package/dist/cjs/models/Session.js +22 -0
- package/dist/cjs/models/Session.js.map +1 -0
- package/dist/cjs/models/Team.js +19 -0
- package/dist/cjs/models/Team.js.map +1 -0
- package/dist/cjs/models/TeamInvite.js +26 -0
- package/dist/cjs/models/TeamInvite.js.map +1 -0
- package/dist/cjs/models/TeamMember.js +21 -0
- package/dist/cjs/models/TeamMember.js.map +1 -0
- package/dist/cjs/models/User.js +33 -0
- package/dist/cjs/models/User.js.map +1 -0
- package/dist/dts/ApiGroup.d.ts +3 -0
- package/dist/dts/ApiGroup.d.ts.map +1 -0
- package/dist/dts/api/Auth.d.ts +128 -0
- package/dist/dts/api/Auth.d.ts.map +1 -0
- package/dist/dts/api/Invite.d.ts +78 -0
- package/dist/dts/api/Invite.d.ts.map +1 -0
- package/dist/dts/index.d.ts +8 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/models/Session.d.ts +82 -0
- package/dist/dts/models/Session.d.ts.map +1 -0
- package/dist/dts/models/Team.d.ts +82 -0
- package/dist/dts/models/Team.d.ts.map +1 -0
- package/dist/dts/models/TeamInvite.d.ts +110 -0
- package/dist/dts/models/TeamInvite.d.ts.map +1 -0
- package/dist/dts/models/TeamMember.d.ts +86 -0
- package/dist/dts/models/TeamMember.d.ts.map +1 -0
- package/dist/dts/models/User.d.ts +227 -0
- package/dist/dts/models/User.d.ts.map +1 -0
- package/dist/esm/ApiGroup.js +2 -0
- package/dist/esm/ApiGroup.js.map +1 -0
- package/dist/esm/api/Auth.js +67 -0
- package/dist/esm/api/Auth.js.map +1 -0
- package/dist/esm/api/Invite.js +48 -0
- package/dist/esm/api/Invite.js.map +1 -0
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/Session.js +15 -0
- package/dist/esm/models/Session.js.map +1 -0
- package/dist/esm/models/Team.js +12 -0
- package/dist/esm/models/Team.js.map +1 -0
- package/dist/esm/models/TeamInvite.js +19 -0
- package/dist/esm/models/TeamInvite.js.map +1 -0
- package/dist/esm/models/TeamMember.js +14 -0
- package/dist/esm/models/TeamMember.js.map +1 -0
- package/dist/esm/models/User.js +26 -0
- package/dist/esm/models/User.js.map +1 -0
- package/models/Session/package.json +6 -0
- package/models/Team/package.json +6 -0
- package/models/TeamInvite/package.json +6 -0
- package/models/TeamMember/package.json +6 -0
- package/models/User/package.json +6 -0
- package/package.json +67 -10
- package/src/ApiGroup.ts +14 -0
- package/src/api/Auth.ts +104 -0
- package/src/api/Invite.ts +70 -0
- package/src/index.ts +14 -1
- package/src/models/Session.ts +16 -0
- package/src/models/Team.ts +14 -0
- package/src/models/TeamInvite.ts +24 -0
- package/src/models/TeamMember.ts +18 -0
- package/src/models/User.ts +36 -0
- package/TodosApi/package.json +0 -6
- package/dist/cjs/TodosApi.js +0 -39
- package/dist/cjs/TodosApi.js.map +0 -1
- package/dist/dts/TodosApi.d.ts +0 -45
- package/dist/dts/TodosApi.d.ts.map +0 -1
- package/dist/esm/TodosApi.js +0 -29
- package/dist/esm/TodosApi.js.map +0 -1
- package/src/TodosApi.ts +0 -48
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiGroup.js","names":["getEndpoint","key","group","endpoints","exports"],"sources":["../../src/ApiGroup.ts"],"sourcesContent":[null],"mappings":";;;;;;AAEO,MAAMA,WAAW,GAQpBC,GAAsB,IAEvBC,KAAmE,IAClEA,KAAK,CAACC,SAAS,CAACF,GAAG,CAAC;AAAAG,OAAA,CAAAJ,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UpdateLocaleRequest = exports.Unauthorized = exports.MIN_AGE = exports.CurrentUserContext = exports.CurrentUser = exports.CompleteProfileRequest = exports.AuthMiddleware = exports.AuthApiGroup = void 0;
|
|
7
|
+
Object.defineProperty(exports, "UserId", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _User.UserId;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _platform = require("@effect/platform");
|
|
14
|
+
var _effect = require("effect");
|
|
15
|
+
var _User = require("../models/User.js");
|
|
16
|
+
const MIN_AGE = exports.MIN_AGE = 6;
|
|
17
|
+
class CurrentUser extends /*#__PURE__*/_effect.Schema.Class('CurrentUser')({
|
|
18
|
+
id: _User.UserId,
|
|
19
|
+
discordId: _effect.Schema.String,
|
|
20
|
+
discordUsername: _effect.Schema.String,
|
|
21
|
+
discordAvatar: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.String),
|
|
22
|
+
isProfileComplete: _effect.Schema.Boolean,
|
|
23
|
+
name: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.String),
|
|
24
|
+
birthYear: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.Number),
|
|
25
|
+
gender: /*#__PURE__*/_effect.Schema.NullOr(_User.Gender),
|
|
26
|
+
jerseyNumber: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.Number),
|
|
27
|
+
position: /*#__PURE__*/_effect.Schema.NullOr(_User.Position),
|
|
28
|
+
proficiency: /*#__PURE__*/_effect.Schema.NullOr(_User.Proficiency),
|
|
29
|
+
locale: _User.Locale
|
|
30
|
+
}) {}
|
|
31
|
+
exports.CurrentUser = CurrentUser;
|
|
32
|
+
class UpdateLocaleRequest extends /*#__PURE__*/_effect.Schema.Class('UpdateLocaleRequest')({
|
|
33
|
+
locale: _User.Locale
|
|
34
|
+
}) {}
|
|
35
|
+
exports.UpdateLocaleRequest = UpdateLocaleRequest;
|
|
36
|
+
class CompleteProfileRequest extends /*#__PURE__*/_effect.Schema.Class('CompleteProfileRequest')({
|
|
37
|
+
name: _effect.Schema.String,
|
|
38
|
+
birthYear: /*#__PURE__*/_effect.Schema.Number.pipe(/*#__PURE__*/_effect.Schema.int(), /*#__PURE__*/_effect.Schema.greaterThanOrEqualTo(1900), /*#__PURE__*/_effect.Schema.filter(year => year <= new Date().getFullYear() - MIN_AGE, {
|
|
39
|
+
message: () => `Birth year must be at most ${new Date().getFullYear() - MIN_AGE}`
|
|
40
|
+
})),
|
|
41
|
+
gender: _User.Gender,
|
|
42
|
+
jerseyNumber: /*#__PURE__*/_effect.Schema.optionalWith(/*#__PURE__*/_effect.Schema.Number.pipe(/*#__PURE__*/_effect.Schema.int(), /*#__PURE__*/_effect.Schema.between(0, 99)), {
|
|
43
|
+
as: 'Option'
|
|
44
|
+
}),
|
|
45
|
+
position: _User.Position,
|
|
46
|
+
proficiency: _User.Proficiency
|
|
47
|
+
}) {}
|
|
48
|
+
exports.CompleteProfileRequest = CompleteProfileRequest;
|
|
49
|
+
class Unauthorized extends /*#__PURE__*/_effect.Schema.TaggedError()('Unauthorized', {}, /*#__PURE__*/_platform.HttpApiSchema.annotations({
|
|
50
|
+
status: 401
|
|
51
|
+
})) {}
|
|
52
|
+
exports.Unauthorized = Unauthorized;
|
|
53
|
+
class CurrentUserContext extends /*#__PURE__*/_effect.Context.Tag('CurrentUserContext')() {}
|
|
54
|
+
exports.CurrentUserContext = CurrentUserContext;
|
|
55
|
+
class AuthMiddleware extends /*#__PURE__*/_platform.HttpApiMiddleware.Tag()('AuthMiddleware', {
|
|
56
|
+
failure: Unauthorized,
|
|
57
|
+
provides: CurrentUserContext,
|
|
58
|
+
security: {
|
|
59
|
+
token: _platform.HttpApiSecurity.bearer
|
|
60
|
+
}
|
|
61
|
+
}) {}
|
|
62
|
+
exports.AuthMiddleware = AuthMiddleware;
|
|
63
|
+
class AuthApiGroup extends /*#__PURE__*/_platform.HttpApiGroup.make('auth').add(_platform.HttpApiEndpoint.get('getLogin', '/login/url').addSuccess(_effect.Schema.URL)).add(_platform.HttpApiEndpoint.get('doLogin', '/login').addSuccess(_effect.Schema.Void, {
|
|
64
|
+
status: 302
|
|
65
|
+
})).add(_platform.HttpApiEndpoint.get('callback', '/callback').addSuccess(_effect.Schema.Void, {
|
|
66
|
+
status: 302
|
|
67
|
+
}).setUrlParams(_effect.Schema.Struct({
|
|
68
|
+
code: _effect.Schema.String.pipe(_effect.Schema.optionalWith({
|
|
69
|
+
as: 'Option'
|
|
70
|
+
})),
|
|
71
|
+
state: _effect.Schema.String.pipe(_effect.Schema.optionalWith({
|
|
72
|
+
as: 'Option'
|
|
73
|
+
})),
|
|
74
|
+
error: _effect.Schema.String.pipe(_effect.Schema.optionalWith({
|
|
75
|
+
as: 'Option'
|
|
76
|
+
}))
|
|
77
|
+
}))).add(_platform.HttpApiEndpoint.get('me', '/me').addSuccess(CurrentUser).addError(Unauthorized, {
|
|
78
|
+
status: 401
|
|
79
|
+
}).middleware(AuthMiddleware)).add(_platform.HttpApiEndpoint.post('completeProfile', '/profile').addSuccess(CurrentUser).addError(Unauthorized, {
|
|
80
|
+
status: 401
|
|
81
|
+
}).setPayload(CompleteProfileRequest).middleware(AuthMiddleware)).add(_platform.HttpApiEndpoint.patch('updateLocale', '/me/locale').addSuccess(CurrentUser).addError(Unauthorized, {
|
|
82
|
+
status: 401
|
|
83
|
+
}).setPayload(UpdateLocaleRequest).middleware(AuthMiddleware)).prefix('/auth') {}
|
|
84
|
+
exports.AuthApiGroup = AuthApiGroup;
|
|
85
|
+
//# sourceMappingURL=Auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth.js","names":["_platform","require","_effect","_User","MIN_AGE","exports","CurrentUser","Schema","Class","id","UserId","discordId","String","discordUsername","discordAvatar","NullOr","isProfileComplete","Boolean","name","birthYear","Number","gender","Gender","jerseyNumber","position","Position","proficiency","Proficiency","locale","Locale","UpdateLocaleRequest","CompleteProfileRequest","pipe","int","greaterThanOrEqualTo","filter","year","Date","getFullYear","message","optionalWith","between","as","Unauthorized","TaggedError","HttpApiSchema","annotations","status","CurrentUserContext","Context","Tag","AuthMiddleware","HttpApiMiddleware","failure","provides","security","token","HttpApiSecurity","bearer","AuthApiGroup","HttpApiGroup","make","add","HttpApiEndpoint","get","addSuccess","URL","Void","setUrlParams","Struct","code","state","error","addError","middleware","post","setPayload","patch","prefix"],"sources":["../../../src/api/Auth.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAOA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAIO,MAAMG,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,CAAC;AAElB,MAAOE,WAAY,sBAAQC,cAAM,CAACC,KAAK,CAAc,aAAa,CAAC,CAAC;EACxEC,EAAE,EAAEC,YAAM;EACVC,SAAS,EAAEJ,cAAM,CAACK,MAAM;EACxBC,eAAe,EAAEN,cAAM,CAACK,MAAM;EAC9BE,aAAa,eAAEP,cAAM,CAACQ,MAAM,CAACR,cAAM,CAACK,MAAM,CAAC;EAC3CI,iBAAiB,EAAET,cAAM,CAACU,OAAO;EACjCC,IAAI,eAAEX,cAAM,CAACQ,MAAM,CAACR,cAAM,CAACK,MAAM,CAAC;EAClCO,SAAS,eAAEZ,cAAM,CAACQ,MAAM,CAACR,cAAM,CAACa,MAAM,CAAC;EACvCC,MAAM,eAAEd,cAAM,CAACQ,MAAM,CAACO,YAAM,CAAC;EAC7BC,YAAY,eAAEhB,cAAM,CAACQ,MAAM,CAACR,cAAM,CAACa,MAAM,CAAC;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ACoB,IAAI,CAACzB,cAAM,CAACiC,YAAY,CAAC;IAAEE,EAAE,EAAE;EAAQ,CAAE,CAAC,CAAC;EAChE8B,KAAK,EAAEjE,cAAM,CAACK,MAAM,CAACoB,IAAI,CAACzB,cAAM,CAACiC,YAAY,CAAC;IAAEE,EAAE,EAAE;EAAQ,CAAE,CAAC;CAChE,CAAC,CACH,CACJ,CACAoB,GAAG,CACFC,yBAAe,CAACC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAC7BC,UAAU,CAAC3D,WAAW,CAAC,CACvBmE,QAAQ,CAAC9B,YAAY,EAAE;EAAEI,MAAM,EAAE;AAAG,CAAE,CAAC,CACvC2B,UAAU,CAACvB,cAAc,CAAC,CAC9B,CACAW,GAAG,CACFC,yBAAe,CAACY,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAChDV,UAAU,CAAC3D,WAAW,CAAC,CACvBmE,QAAQ,CAAC9B,YAAY,EAAE;EAAEI,MAAM,EAAE;AAAG,CAAE,CAAC,CACvC6B,UAAU,CAAC7C,sBAAsB,CAAC,CAClC2C,UAAU,CAACvB,cAAc,CAAC,CAC9B,CACAW,GAAG,CACFC,yBAAe,CAACc,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAChDZ,UAAU,CAAC3D,WAAW,CAAC,CACvBmE,QAAQ,CAAC9B,YAAY,EAAE;EAAEI,MAAM,EAAE;AAAG,CAAE,CAAC,CACvC6B,UAAU,CAAC9C,mBAAmB,CAAC,CAC/B4C,UAAU,CAACvB,cAAc,CAAC,CAC9B,CACA2B,MAAM,CAAC,OAAO,CAAC;AAAAzE,OAAA,CAAAsD,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.JoinResult = exports.InviteNotFound = exports.InviteInfo = exports.InviteCode = exports.InviteApiGroup = exports.Forbidden = exports.AlreadyMember = void 0;
|
|
7
|
+
var _platform = require("@effect/platform");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
var _Team = require("../models/Team.js");
|
|
10
|
+
var _TeamMember = require("../models/TeamMember.js");
|
|
11
|
+
var _Auth = require("./Auth.js");
|
|
12
|
+
class InviteInfo extends /*#__PURE__*/_effect.Schema.Class('InviteInfo')({
|
|
13
|
+
teamName: _effect.Schema.String,
|
|
14
|
+
teamId: _Team.TeamId,
|
|
15
|
+
code: _effect.Schema.String
|
|
16
|
+
}) {}
|
|
17
|
+
exports.InviteInfo = InviteInfo;
|
|
18
|
+
class JoinResult extends /*#__PURE__*/_effect.Schema.Class('JoinResult')({
|
|
19
|
+
teamId: _Team.TeamId,
|
|
20
|
+
role: _TeamMember.TeamRole,
|
|
21
|
+
isProfileComplete: _effect.Schema.Boolean
|
|
22
|
+
}) {}
|
|
23
|
+
exports.JoinResult = JoinResult;
|
|
24
|
+
class InviteCode extends /*#__PURE__*/_effect.Schema.Class('InviteCode')({
|
|
25
|
+
code: _effect.Schema.String,
|
|
26
|
+
active: _effect.Schema.Boolean
|
|
27
|
+
}) {}
|
|
28
|
+
exports.InviteCode = InviteCode;
|
|
29
|
+
class InviteNotFound extends /*#__PURE__*/_effect.Schema.TaggedError()('InviteNotFound', {}, /*#__PURE__*/_platform.HttpApiSchema.annotations({
|
|
30
|
+
status: 404
|
|
31
|
+
})) {}
|
|
32
|
+
exports.InviteNotFound = InviteNotFound;
|
|
33
|
+
class AlreadyMember extends /*#__PURE__*/_effect.Schema.TaggedError()('AlreadyMember', {}, /*#__PURE__*/_platform.HttpApiSchema.annotations({
|
|
34
|
+
status: 409
|
|
35
|
+
})) {}
|
|
36
|
+
exports.AlreadyMember = AlreadyMember;
|
|
37
|
+
class Forbidden extends /*#__PURE__*/_effect.Schema.TaggedError()('Forbidden', {}, /*#__PURE__*/_platform.HttpApiSchema.annotations({
|
|
38
|
+
status: 403
|
|
39
|
+
})) {}
|
|
40
|
+
exports.Forbidden = Forbidden;
|
|
41
|
+
class InviteApiGroup extends /*#__PURE__*/_platform.HttpApiGroup.make('invite').add(_platform.HttpApiEndpoint.get('getInvite', '/invite/:code').addSuccess(InviteInfo).addError(InviteNotFound, {
|
|
42
|
+
status: 404
|
|
43
|
+
}).setPath(_effect.Schema.Struct({
|
|
44
|
+
code: _effect.Schema.String
|
|
45
|
+
}))).add(_platform.HttpApiEndpoint.post('joinViaInvite', '/invite/:code/join').addSuccess(JoinResult).addError(InviteNotFound, {
|
|
46
|
+
status: 404
|
|
47
|
+
}).addError(AlreadyMember, {
|
|
48
|
+
status: 409
|
|
49
|
+
}).setPath(_effect.Schema.Struct({
|
|
50
|
+
code: _effect.Schema.String
|
|
51
|
+
})).middleware(_Auth.AuthMiddleware)).add(_platform.HttpApiEndpoint.post('regenerateInvite', '/teams/:teamId/invite/regenerate').addSuccess(InviteCode).addError(Forbidden, {
|
|
52
|
+
status: 403
|
|
53
|
+
}).setPath(_effect.Schema.Struct({
|
|
54
|
+
teamId: _Team.TeamId
|
|
55
|
+
})).middleware(_Auth.AuthMiddleware)).add(/*#__PURE__*/_platform.HttpApiEndpoint.del('disableInvite', '/teams/:teamId/invite').addSuccess(_effect.Schema.Void).addError(Forbidden, {
|
|
56
|
+
status: 403
|
|
57
|
+
}).setPath(_effect.Schema.Struct({
|
|
58
|
+
teamId: _Team.TeamId
|
|
59
|
+
})).middleware(_Auth.AuthMiddleware)) {}
|
|
60
|
+
exports.InviteApiGroup = InviteApiGroup;
|
|
61
|
+
//# sourceMappingURL=Invite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invite.js","names":["_platform","require","_effect","_Team","_TeamMember","_Auth","InviteInfo","Schema","Class","teamName","String","teamId","TeamId","code","exports","JoinResult","role","TeamRole","isProfileComplete","Boolean","InviteCode","active","InviteNotFound","TaggedError","HttpApiSchema","annotations","status","AlreadyMember","Forbidden","InviteApiGroup","HttpApiGroup","make","add","HttpApiEndpoint","get","addSuccess","addError","setPath","Struct","post","middleware","AuthMiddleware","del","Void"],"sources":["../../../src/api/Invite.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAEM,MAAOK,UAAW,sBAAQC,cAAM,CAACC,KAAK,CAAa,YAAY,CAAC,CAAC;EACrEC,QAAQ,EAAEF,cAAM,CAACG,MAAM;EACvBC,MAAM,EAAEC,YAAM;EACdC,IAAI,EAAEN,cAAM,CAACG;CACd,CAAC;AAAAI,OAAA,CAAAR,UAAA,GAAAA,UAAA;AAEI,MAAOS,UAAW,sBAAQR,cAAM,CAACC,KAAK,CAAa,YAAY,CAAC,CAAC;EACrEG,MAAM,EAAEC,YAAM;EACdI,IAAI,EAAEC,oBAAQ;EACdC,iBAAiB,EAAEX,cAAM,CAACY;CAC3B,CAAC;AAAAL,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAEI,MAAOK,UAAW,sBAAQb,cAAM,CAACC,KAAK,CAAa,YAAY,CAAC,CAAC;EACrEK,IAAI,EAAEN,cAAM,CAACG,MAAM;EACnBW,MAAM,EAAEd,cAAM,CAACY;CAChB,CAAC;AAAAL,OAAA,CAAAM,UAAA,GAAAA,UAAA;AAEI,MAAOE,cAAe,sBAAQf,cAAM,CAACgB,WAAW,EAAkB,CACtE,gBAAgB,EAChB,EAAE,eACFC,uBAAa,CAACC,WAAW,CAAC;EAAEC,MAAM,EAAE;AAAG,CAAE,CAAC,CAC3C;AAAAZ,OAAA,CAAAQ,cAAA,GAAAA,cAAA;AAEK,MAAOK,aAAc,sBAAQpB,cAAM,CAACgB,WAAW,EAAiB,CACpE,eAAe,EACf,EAAE,eACFC,uBAAa,CAACC,WAAW,CAAC;EAAEC,MAAM,EAAE;A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AE3B,MAAM,EAAEC;AAAM,CAAE,CAAC,CAAC,CAC1C4B,UAAU,CAACC,oBAAc,CAAC,CAC9B,CACAT,GAAG,cACFC,yBAAe,CAACS,GAAG,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAC1DP,UAAU,CAAC5B,cAAM,CAACoC,IAAI,CAAC,CACvBP,QAAQ,CAACR,SAAS,EAAE;EAAEF,MAAM,EAAE;AAAG,CAAE,CAAC,CACpCW,OAAO,CAAC9B,cAAM,CAAC+B,MAAM,CAAC;EAAE3B,MAAM,EAAEC;AAAM,CAAE,CAAC,CAAC,CAC1C4B,UAAU,CAACC,oBAAc,CAAC,CAC9B;AAAA3B,OAAA,CAAAe,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,8 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var
|
|
8
|
-
exports.
|
|
6
|
+
exports.User = exports.TeamMember = exports.TeamInvite = exports.Team = exports.Session = exports.Invite = exports.Auth = exports.ApiGroup = void 0;
|
|
7
|
+
var _ApiGroup = _interopRequireWildcard(require("./ApiGroup.js"));
|
|
8
|
+
exports.ApiGroup = _ApiGroup;
|
|
9
|
+
var _Auth = _interopRequireWildcard(require("./api/Auth.js"));
|
|
10
|
+
exports.Auth = _Auth;
|
|
11
|
+
var _Invite = _interopRequireWildcard(require("./api/Invite.js"));
|
|
12
|
+
exports.Invite = _Invite;
|
|
13
|
+
var _Session = _interopRequireWildcard(require("./models/Session.js"));
|
|
14
|
+
exports.Session = _Session;
|
|
15
|
+
var _Team = _interopRequireWildcard(require("./models/Team.js"));
|
|
16
|
+
exports.Team = _Team;
|
|
17
|
+
var _TeamInvite = _interopRequireWildcard(require("./models/TeamInvite.js"));
|
|
18
|
+
exports.TeamInvite = _TeamInvite;
|
|
19
|
+
var _TeamMember = _interopRequireWildcard(require("./models/TeamMember.js"));
|
|
20
|
+
exports.TeamMember = _TeamMember;
|
|
21
|
+
var _User = _interopRequireWildcard(require("./models/User.js"));
|
|
22
|
+
exports.User = _User;
|
|
9
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Session = void 0;
|
|
7
|
+
var _sql = require("@effect/sql");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
var _User = require("./User.js");
|
|
10
|
+
const DateTimeFromDate = /*#__PURE__*/_effect.Schema.transform(_effect.Schema.DateFromSelf, _effect.Schema.DateTimeUtcFromSelf, {
|
|
11
|
+
decode: date => _effect.DateTime.unsafeFromDate(date),
|
|
12
|
+
encode: dt => new Date(_effect.DateTime.toEpochMillis(dt))
|
|
13
|
+
});
|
|
14
|
+
class Session extends /*#__PURE__*/_sql.Model.Class('Session')({
|
|
15
|
+
id: /*#__PURE__*/_sql.Model.Generated(_effect.Schema.String),
|
|
16
|
+
user_id: _User.UserId,
|
|
17
|
+
token: _effect.Schema.String,
|
|
18
|
+
expires_at: DateTimeFromDate,
|
|
19
|
+
created_at: _sql.Model.DateTimeInsertFromDate
|
|
20
|
+
}) {}
|
|
21
|
+
exports.Session = Session;
|
|
22
|
+
//# sourceMappingURL=Session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.js","names":["_sql","require","_effect","_User","DateTimeFromDate","Schema","transform","DateFromSelf","DateTimeUtcFromSelf","decode","date","DateTime","unsafeFromDate","encode","dt","Date","toEpochMillis","Session","Model","Class","id","Generated","String","user_id","UserId","token","expires_at","created_at","DateTimeInsertFromDate","exports"],"sources":["../../../src/models/Session.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,MAAMG,gBAAgB,gBAAGC,cAAM,CAACC,SAAS,CAACD,cAAM,CAACE,YAAY,EAAEF,cAAM,CAACG,mBAAmB,EAAE;EACzFC,MAAM,EAAGC,IAAI,IAAKC,gBAAQ,CAACC,cAAc,CAACF,IAAI,CAAC;EAC/CG,MAAM,EAAGC,EAAE,IAAK,IAAIC,IAAI,CAACJ,gBAAQ,CAACK,aAAa,CAACF,EAAE,CAAC;CACpD,CAAC;AAEI,MAAOG,OAAQ,sBAAQC,UAAK,CAACC,KAAK,CAAU,SAAS,CAAC,CAAC;EAC3DC,EAAE,eAAEF,UAAK,CAACG,SAAS,CAAChB,cAAM,CAACiB,MAAM,CAAC;EAClCC,OAAO,EAAEC,YAAM;EACfC,KAAK,EAAEpB,cAAM,CAACiB,MAAM;EACpBI,UAAU,EAAEtB,gBAAgB;EAC5BuB,UAAU,EAAET,UAAK,CAACU;CACnB,CAAC;AAAAC,OAAA,CAAAZ,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TeamId = exports.Team = void 0;
|
|
7
|
+
var _sql = require("@effect/sql");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
var _User = require("./User.js");
|
|
10
|
+
const TeamId = exports.TeamId = /*#__PURE__*/_effect.Schema.String.pipe(/*#__PURE__*/_effect.Schema.brand('TeamId'));
|
|
11
|
+
class Team extends /*#__PURE__*/_sql.Model.Class('Team')({
|
|
12
|
+
id: /*#__PURE__*/_sql.Model.Generated(TeamId),
|
|
13
|
+
name: _effect.Schema.String,
|
|
14
|
+
created_by: _User.UserId,
|
|
15
|
+
created_at: _sql.Model.DateTimeInsertFromDate,
|
|
16
|
+
updated_at: _sql.Model.DateTimeUpdateFromDate
|
|
17
|
+
}) {}
|
|
18
|
+
exports.Team = Team;
|
|
19
|
+
//# sourceMappingURL=Team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Team.js","names":["_sql","require","_effect","_User","TeamId","exports","Schema","String","pipe","brand","Team","Model","Class","id","Generated","name","created_by","UserId","created_at","DateTimeInsertFromDate","updated_at","DateTimeUpdateFromDate"],"sources":["../../../src/models/Team.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEO,MAAMG,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAGE,cAAM,CAACC,MAAM,CAACC,IAAI,cAACF,cAAM,CAACG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAG1D,MAAOC,IAAK,sBAAQC,UAAK,CAACC,KAAK,CAAO,MAAM,CAAC,CAAC;EAClDC,EAAE,eAAEF,UAAK,CAACG,SAAS,CAACV,MAAM,CAAC;EAC3BW,IAAI,EAAET,cAAM,CAACC,MAAM;EACnBS,UAAU,EAAEC,YAAM;EAClBC,UAAU,EAAEP,UAAK,CAACQ,sBAAsB;EACxCC,UAAU,EAAET,UAAK,CAACU;CACnB,CAAC;AAAAhB,OAAA,CAAAK,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TeamInviteId = exports.TeamInvite = void 0;
|
|
7
|
+
var _sql = require("@effect/sql");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
var _Team = require("./Team.js");
|
|
10
|
+
var _User = require("./User.js");
|
|
11
|
+
const TeamInviteId = exports.TeamInviteId = /*#__PURE__*/_effect.Schema.String.pipe(/*#__PURE__*/_effect.Schema.brand('TeamInviteId'));
|
|
12
|
+
const NullableDateTimeFromDate = /*#__PURE__*/_effect.Schema.NullOr(/*#__PURE__*/_effect.Schema.transform(_effect.Schema.DateFromSelf, _effect.Schema.DateTimeUtcFromSelf, {
|
|
13
|
+
decode: date => _effect.DateTime.unsafeFromDate(date),
|
|
14
|
+
encode: dt => new Date(_effect.DateTime.toEpochMillis(dt))
|
|
15
|
+
}));
|
|
16
|
+
class TeamInvite extends /*#__PURE__*/_sql.Model.Class('TeamInvite')({
|
|
17
|
+
id: /*#__PURE__*/_sql.Model.Generated(TeamInviteId),
|
|
18
|
+
team_id: _Team.TeamId,
|
|
19
|
+
code: _effect.Schema.String,
|
|
20
|
+
active: _effect.Schema.Boolean,
|
|
21
|
+
created_by: _User.UserId,
|
|
22
|
+
created_at: _sql.Model.DateTimeInsertFromDate,
|
|
23
|
+
expires_at: NullableDateTimeFromDate
|
|
24
|
+
}) {}
|
|
25
|
+
exports.TeamInvite = TeamInvite;
|
|
26
|
+
//# sourceMappingURL=TeamInvite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamInvite.js","names":["_sql","require","_effect","_Team","_User","TeamInviteId","exports","Schema","String","pipe","brand","NullableDateTimeFromDate","NullOr","transform","DateFromSelf","DateTimeUtcFromSelf","decode","date","DateTime","unsafeFromDate","encode","dt","Date","toEpochMillis","TeamInvite","Model","Class","id","Generated","team_id","TeamId","code","active","Boolean","created_by","UserId","created_at","DateTimeInsertFromDate","expires_at"],"sources":["../../../src/models/TeamInvite.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAGE,cAAM,CAACC,MAAM,CAACC,IAAI,cAACF,cAAM,CAACG,KAAK,CAAC,cAAc,CAAC,CAAC;AAG5E,MAAMC,wBAAwB,gBAAGJ,cAAM,CAACK,MAAM,cAC5CL,cAAM,CAACM,SAAS,CAACN,cAAM,CAACO,YAAY,EAAEP,cAAM,CAACQ,mBAAmB,EAAE;EAChEC,MAAM,EAAGC,IAAI,IAAKC,gBAAQ,CAACC,cAAc,CAACF,IAAI,CAAC;EAC/CG,MAAM,EAAGC,EAAE,IAAK,IAAIC,IAAI,CAACJ,gBAAQ,CAACK,aAAa,CAACF,EAAE,CAAC;CACpD,CAAC,CACH;AAEK,MAAOG,UAAW,sBAAQC,UAAK,CAACC,KAAK,CAAa,YAAY,CAAC,CAAC;EACpEC,EAAE,eAAEF,UAAK,CAACG,SAAS,CAACvB,YAAY,CAAC;EACjCwB,OAAO,EAAEC,YAAM;EACfC,IAAI,EAAExB,cAAM,CAACC,MAAM;EACnBwB,MAAM,EAAEzB,cAAM,CAAC0B,OAAO;EACtBC,UAAU,EAAEC,YAAM;EAClBC,UAAU,EAAEX,UAAK,CAACY,sBAAsB;EACxCC,UAAU,EAAE3B;CACb,CAAC;AAAAL,OAAA,CAAAkB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TeamRole = exports.TeamMemberId = exports.TeamMember = void 0;
|
|
7
|
+
var _sql = require("@effect/sql");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
var _Team = require("./Team.js");
|
|
10
|
+
var _User = require("./User.js");
|
|
11
|
+
const TeamMemberId = exports.TeamMemberId = /*#__PURE__*/_effect.Schema.String.pipe(/*#__PURE__*/_effect.Schema.brand('TeamMemberId'));
|
|
12
|
+
const TeamRole = exports.TeamRole = /*#__PURE__*/_effect.Schema.Literal('admin', 'member');
|
|
13
|
+
class TeamMember extends /*#__PURE__*/_sql.Model.Class('TeamMember')({
|
|
14
|
+
id: /*#__PURE__*/_sql.Model.Generated(TeamMemberId),
|
|
15
|
+
team_id: _Team.TeamId,
|
|
16
|
+
user_id: _User.UserId,
|
|
17
|
+
role: TeamRole,
|
|
18
|
+
joined_at: _sql.Model.DateTimeInsertFromDate
|
|
19
|
+
}) {}
|
|
20
|
+
exports.TeamMember = TeamMember;
|
|
21
|
+
//# sourceMappingURL=TeamMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamMember.js","names":["_sql","require","_effect","_Team","_User","TeamMemberId","exports","Schema","String","pipe","brand","TeamRole","Literal","TeamMember","Model","Class","id","Generated","team_id","TeamId","user_id","UserId","role","joined_at","DateTimeInsertFromDate"],"sources":["../../../src/models/TeamMember.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEO,MAAMI,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAGE,cAAM,CAACC,MAAM,CAACC,IAAI,cAACF,cAAM,CAACG,KAAK,CAAC,cAAc,CAAC,CAAC;AAGrE,MAAMC,QAAQ,GAAAL,OAAA,CAAAK,QAAA,gBAAGJ,cAAM,CAACK,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;AAGnD,MAAOC,UAAW,sBAAQC,UAAK,CAACC,KAAK,CAAa,YAAY,CAAC,CAAC;EACpEC,EAAE,eAAEF,UAAK,CAACG,SAAS,CAACZ,YAAY,CAAC;EACjCa,OAAO,EAAEC,YAAM;EACfC,OAAO,EAAEC,YAAM;EACfC,IAAI,EAAEX,QAAQ;EACdY,SAAS,EAAET,UAAK,CAACU;CAClB,CAAC;AAAAlB,OAAA,CAAAO,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UserId = exports.User = exports.Proficiency = exports.Position = exports.Locale = exports.Gender = void 0;
|
|
7
|
+
var _sql = require("@effect/sql");
|
|
8
|
+
var _effect = require("effect");
|
|
9
|
+
const UserId = exports.UserId = /*#__PURE__*/_effect.Schema.String.pipe(/*#__PURE__*/_effect.Schema.brand('UserId'));
|
|
10
|
+
const Gender = exports.Gender = /*#__PURE__*/_effect.Schema.Literal('male', 'female', 'other');
|
|
11
|
+
const Position = exports.Position = /*#__PURE__*/_effect.Schema.Literal('goalkeeper', 'defender', 'midfielder', 'forward');
|
|
12
|
+
const Proficiency = exports.Proficiency = /*#__PURE__*/_effect.Schema.Literal('beginner', 'intermediate', 'advanced', 'pro');
|
|
13
|
+
const Locale = exports.Locale = /*#__PURE__*/_effect.Schema.Literal('en', 'cs');
|
|
14
|
+
class User extends /*#__PURE__*/_sql.Model.Class('User')({
|
|
15
|
+
id: /*#__PURE__*/_sql.Model.Generated(UserId),
|
|
16
|
+
discord_id: _effect.Schema.String,
|
|
17
|
+
discord_username: _effect.Schema.String,
|
|
18
|
+
discord_avatar: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.String),
|
|
19
|
+
discord_access_token: /*#__PURE__*/_sql.Model.Sensitive(_effect.Schema.String),
|
|
20
|
+
discord_refresh_token: /*#__PURE__*/_sql.Model.Sensitive(/*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.String)),
|
|
21
|
+
name: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.String),
|
|
22
|
+
birth_year: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.Number),
|
|
23
|
+
gender: /*#__PURE__*/_effect.Schema.NullOr(Gender),
|
|
24
|
+
jersey_number: /*#__PURE__*/_effect.Schema.NullOr(_effect.Schema.Number),
|
|
25
|
+
position: /*#__PURE__*/_effect.Schema.NullOr(Position),
|
|
26
|
+
proficiency: /*#__PURE__*/_effect.Schema.NullOr(Proficiency),
|
|
27
|
+
locale: Locale,
|
|
28
|
+
created_at: _sql.Model.DateTimeInsertFromDate,
|
|
29
|
+
is_profile_complete: _effect.Schema.Boolean,
|
|
30
|
+
updated_at: _sql.Model.DateTimeUpdateFromDate
|
|
31
|
+
}) {}
|
|
32
|
+
exports.User = User;
|
|
33
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","names":["_sql","require","_effect","UserId","exports","Schema","String","pipe","brand","Gender","Literal","Position","Proficiency","Locale","User","Model","Class","id","Generated","discord_id","discord_username","discord_avatar","NullOr","discord_access_token","Sensitive","discord_refresh_token","name","birth_year","Number","gender","jersey_number","position","proficiency","locale","created_at","DateTimeInsertFromDate","is_profile_complete","Boolean","updated_at","DateTimeUpdateFromDate"],"sources":["../../../src/models/User.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEO,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAGE,cAAM,CAACC,MAAM,CAACC,IAAI,cAACF,cAAM,CAACG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAGzD,MAAMC,MAAM,GAAAL,OAAA,CAAAK,MAAA,gBAAGJ,cAAM,CAACK,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AAGxD,MA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AEpB,MAAM;EACdqB,UAAU,EAAEnB,UAAK,CAACoB,sBAAsB;EACxCC,mBAAmB,EAAE/B,cAAM,CAACgC,OAAO;EACnCC,UAAU,EAAEvB,UAAK,CAACwB;CACnB,CAAC;AAAAnC,OAAA,CAAAU,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HttpApiEndpoint, HttpApiError, HttpApiGroup } from '@effect/platform';
|
|
2
|
+
export declare const getEndpoint: <Id extends string, Endpoints extends HttpApiEndpoint.HttpApiEndpoint.Any = never, Error = HttpApiError.HttpApiDecodeError, R = never, TopLevel extends true | false = false>(key: Endpoints["name"]) => (group: HttpApiGroup.HttpApiGroup<Id, Endpoints, Error, R, TopLevel>) => Endpoints;
|
|
3
|
+
//# sourceMappingURL=ApiGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiGroup.d.ts","sourceRoot":"","sources":["../../src/ApiGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpF,eAAO,MAAM,WAAW,GAEpB,EAAE,SAAS,MAAM,EACjB,SAAS,SAAS,eAAe,CAAC,eAAe,CAAC,GAAG,GAAG,KAAK,EAC7D,KAAK,GAAG,YAAY,CAAC,kBAAkB,EACvC,CAAC,GAAG,KAAK,EACT,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,KAAK,EAErC,KAAK,SAAS,CAAC,MAAM,CAAC,MAEvB,OAAO,YAAY,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,cAC9C,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSecurity } from '@effect/platform';
|
|
2
|
+
import { Context, Schema } from 'effect';
|
|
3
|
+
export { UserId } from '../models/User.js';
|
|
4
|
+
export declare const MIN_AGE = 6;
|
|
5
|
+
declare const CurrentUser_base: Schema.Class<CurrentUser, {
|
|
6
|
+
id: Schema.brand<typeof Schema.String, "UserId">;
|
|
7
|
+
discordId: typeof Schema.String;
|
|
8
|
+
discordUsername: typeof Schema.String;
|
|
9
|
+
discordAvatar: Schema.NullOr<typeof Schema.String>;
|
|
10
|
+
isProfileComplete: typeof Schema.Boolean;
|
|
11
|
+
name: Schema.NullOr<typeof Schema.String>;
|
|
12
|
+
birthYear: Schema.NullOr<typeof Schema.Number>;
|
|
13
|
+
gender: Schema.NullOr<Schema.Literal<["male", "female", "other"]>>;
|
|
14
|
+
jerseyNumber: Schema.NullOr<typeof Schema.Number>;
|
|
15
|
+
position: Schema.NullOr<Schema.Literal<["goalkeeper", "defender", "midfielder", "forward"]>>;
|
|
16
|
+
proficiency: Schema.NullOr<Schema.Literal<["beginner", "intermediate", "advanced", "pro"]>>;
|
|
17
|
+
locale: Schema.Literal<["en", "cs"]>;
|
|
18
|
+
}, Schema.Struct.Encoded<{
|
|
19
|
+
id: Schema.brand<typeof Schema.String, "UserId">;
|
|
20
|
+
discordId: typeof Schema.String;
|
|
21
|
+
discordUsername: typeof Schema.String;
|
|
22
|
+
discordAvatar: Schema.NullOr<typeof Schema.String>;
|
|
23
|
+
isProfileComplete: typeof Schema.Boolean;
|
|
24
|
+
name: Schema.NullOr<typeof Schema.String>;
|
|
25
|
+
birthYear: Schema.NullOr<typeof Schema.Number>;
|
|
26
|
+
gender: Schema.NullOr<Schema.Literal<["male", "female", "other"]>>;
|
|
27
|
+
jerseyNumber: Schema.NullOr<typeof Schema.Number>;
|
|
28
|
+
position: Schema.NullOr<Schema.Literal<["goalkeeper", "defender", "midfielder", "forward"]>>;
|
|
29
|
+
proficiency: Schema.NullOr<Schema.Literal<["beginner", "intermediate", "advanced", "pro"]>>;
|
|
30
|
+
locale: Schema.Literal<["en", "cs"]>;
|
|
31
|
+
}>, never, {
|
|
32
|
+
readonly name: string | null;
|
|
33
|
+
} & {
|
|
34
|
+
readonly id: string & import("effect/Brand").Brand<"UserId">;
|
|
35
|
+
} & {
|
|
36
|
+
readonly gender: "male" | "female" | "other" | null;
|
|
37
|
+
} & {
|
|
38
|
+
readonly position: "goalkeeper" | "defender" | "midfielder" | "forward" | null;
|
|
39
|
+
} & {
|
|
40
|
+
readonly proficiency: "beginner" | "intermediate" | "advanced" | "pro" | null;
|
|
41
|
+
} & {
|
|
42
|
+
readonly locale: "en" | "cs";
|
|
43
|
+
} & {
|
|
44
|
+
readonly discordId: string;
|
|
45
|
+
} & {
|
|
46
|
+
readonly discordUsername: string;
|
|
47
|
+
} & {
|
|
48
|
+
readonly isProfileComplete: boolean;
|
|
49
|
+
} & {
|
|
50
|
+
readonly discordAvatar: string | null;
|
|
51
|
+
} & {
|
|
52
|
+
readonly birthYear: number | null;
|
|
53
|
+
} & {
|
|
54
|
+
readonly jerseyNumber: number | null;
|
|
55
|
+
}, {}, {}>;
|
|
56
|
+
export declare class CurrentUser extends CurrentUser_base {
|
|
57
|
+
}
|
|
58
|
+
declare const UpdateLocaleRequest_base: Schema.Class<UpdateLocaleRequest, {
|
|
59
|
+
locale: Schema.Literal<["en", "cs"]>;
|
|
60
|
+
}, Schema.Struct.Encoded<{
|
|
61
|
+
locale: Schema.Literal<["en", "cs"]>;
|
|
62
|
+
}>, never, {
|
|
63
|
+
readonly locale: "en" | "cs";
|
|
64
|
+
}, {}, {}>;
|
|
65
|
+
export declare class UpdateLocaleRequest extends UpdateLocaleRequest_base {
|
|
66
|
+
}
|
|
67
|
+
declare const CompleteProfileRequest_base: Schema.Class<CompleteProfileRequest, {
|
|
68
|
+
name: typeof Schema.String;
|
|
69
|
+
birthYear: Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
70
|
+
gender: Schema.Literal<["male", "female", "other"]>;
|
|
71
|
+
jerseyNumber: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
|
|
72
|
+
as: "Option";
|
|
73
|
+
}>;
|
|
74
|
+
position: Schema.Literal<["goalkeeper", "defender", "midfielder", "forward"]>;
|
|
75
|
+
proficiency: Schema.Literal<["beginner", "intermediate", "advanced", "pro"]>;
|
|
76
|
+
}, Schema.Struct.Encoded<{
|
|
77
|
+
name: typeof Schema.String;
|
|
78
|
+
birthYear: Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
79
|
+
gender: Schema.Literal<["male", "female", "other"]>;
|
|
80
|
+
jerseyNumber: Schema.optionalWith<Schema.filter<Schema.filter<typeof Schema.Number>>, {
|
|
81
|
+
as: "Option";
|
|
82
|
+
}>;
|
|
83
|
+
position: Schema.Literal<["goalkeeper", "defender", "midfielder", "forward"]>;
|
|
84
|
+
proficiency: Schema.Literal<["beginner", "intermediate", "advanced", "pro"]>;
|
|
85
|
+
}>, never, {
|
|
86
|
+
readonly name: string;
|
|
87
|
+
} & {
|
|
88
|
+
readonly gender: "male" | "female" | "other";
|
|
89
|
+
} & {
|
|
90
|
+
readonly position: "goalkeeper" | "defender" | "midfielder" | "forward";
|
|
91
|
+
} & {
|
|
92
|
+
readonly proficiency: "beginner" | "intermediate" | "advanced" | "pro";
|
|
93
|
+
} & {
|
|
94
|
+
readonly birthYear: number;
|
|
95
|
+
} & {
|
|
96
|
+
readonly jerseyNumber: import("effect/Option").Option<number>;
|
|
97
|
+
}, {}, {}>;
|
|
98
|
+
export declare class CompleteProfileRequest extends CompleteProfileRequest_base {
|
|
99
|
+
}
|
|
100
|
+
declare const Unauthorized_base: Schema.TaggedErrorClass<Unauthorized, "Unauthorized", {
|
|
101
|
+
readonly _tag: Schema.tag<"Unauthorized">;
|
|
102
|
+
}>;
|
|
103
|
+
export declare class Unauthorized extends Unauthorized_base {
|
|
104
|
+
}
|
|
105
|
+
declare const CurrentUserContext_base: Context.TagClass<CurrentUserContext, "CurrentUserContext", CurrentUser>;
|
|
106
|
+
export declare class CurrentUserContext extends CurrentUserContext_base {
|
|
107
|
+
}
|
|
108
|
+
declare const AuthMiddleware_base: HttpApiMiddleware.TagClass.BaseSecurity<AuthMiddleware, "AuthMiddleware", {
|
|
109
|
+
readonly failure: typeof Unauthorized;
|
|
110
|
+
readonly provides: typeof CurrentUserContext;
|
|
111
|
+
readonly security: {
|
|
112
|
+
readonly token: HttpApiSecurity.Bearer;
|
|
113
|
+
};
|
|
114
|
+
}, {
|
|
115
|
+
readonly token: (_: import("effect/Redacted").Redacted<string>) => import("effect/Effect").Effect<CurrentUser, Unauthorized, import("@effect/platform/HttpRouter").HttpRouter.Provided>;
|
|
116
|
+
}, {
|
|
117
|
+
readonly token: HttpApiSecurity.Bearer;
|
|
118
|
+
}>;
|
|
119
|
+
export declare class AuthMiddleware extends AuthMiddleware_base {
|
|
120
|
+
}
|
|
121
|
+
declare const AuthApiGroup_base: HttpApiGroup.HttpApiGroup<"auth", HttpApiEndpoint.HttpApiEndpoint<"getLogin", "GET", never, never, never, never, URL, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"doLogin", "GET", never, never, never, never, void, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"callback", "GET", never, {
|
|
122
|
+
readonly code: import("effect/Option").Option<string>;
|
|
123
|
+
readonly state: import("effect/Option").Option<string>;
|
|
124
|
+
readonly error: import("effect/Option").Option<string>;
|
|
125
|
+
}, never, never, void, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"me", "GET", never, never, never, never, CurrentUser, Unauthorized, AuthMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"completeProfile", "POST", never, never, CompleteProfileRequest, never, CurrentUser, Unauthorized, AuthMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"updateLocale", "PATCH", never, never, UpdateLocaleRequest, never, CurrentUser, Unauthorized, AuthMiddleware, never>, never, never, false>;
|
|
126
|
+
export declare class AuthApiGroup extends AuthApiGroup_base {
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=Auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../../src/api/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EAEjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,eAAO,MAAM,OAAO,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,qBAAa,WAAY,SAAQ,gBAa/B;CAAG;;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAEvC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,sBAAuB,SAAQ,2BAiB1C;CAAG;;;;AAEL,qBAAa,YAAa,SAAQ,iBAIjC;CAAG;;AAEJ,qBAAa,kBAAmB,SAAQ,uBAGrC;CAAG;;;;;;;;;;;;AAEN,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAkChB;CAAG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { HttpApiEndpoint, HttpApiGroup } from '@effect/platform';
|
|
2
|
+
import { Schema } from 'effect';
|
|
3
|
+
import { AuthMiddleware } from './Auth.js';
|
|
4
|
+
declare const InviteInfo_base: Schema.Class<InviteInfo, {
|
|
5
|
+
teamName: typeof Schema.String;
|
|
6
|
+
teamId: Schema.brand<typeof Schema.String, "TeamId">;
|
|
7
|
+
code: typeof Schema.String;
|
|
8
|
+
}, Schema.Struct.Encoded<{
|
|
9
|
+
teamName: typeof Schema.String;
|
|
10
|
+
teamId: Schema.brand<typeof Schema.String, "TeamId">;
|
|
11
|
+
code: typeof Schema.String;
|
|
12
|
+
}>, never, {
|
|
13
|
+
readonly code: string;
|
|
14
|
+
} & {
|
|
15
|
+
readonly teamName: string;
|
|
16
|
+
} & {
|
|
17
|
+
readonly teamId: string & import("effect/Brand").Brand<"TeamId">;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export declare class InviteInfo extends InviteInfo_base {
|
|
20
|
+
}
|
|
21
|
+
declare const JoinResult_base: Schema.Class<JoinResult, {
|
|
22
|
+
teamId: Schema.brand<typeof Schema.String, "TeamId">;
|
|
23
|
+
role: Schema.Literal<["admin", "member"]>;
|
|
24
|
+
isProfileComplete: typeof Schema.Boolean;
|
|
25
|
+
}, Schema.Struct.Encoded<{
|
|
26
|
+
teamId: Schema.brand<typeof Schema.String, "TeamId">;
|
|
27
|
+
role: Schema.Literal<["admin", "member"]>;
|
|
28
|
+
isProfileComplete: typeof Schema.Boolean;
|
|
29
|
+
}>, never, {
|
|
30
|
+
readonly isProfileComplete: boolean;
|
|
31
|
+
} & {
|
|
32
|
+
readonly role: "admin" | "member";
|
|
33
|
+
} & {
|
|
34
|
+
readonly teamId: string & import("effect/Brand").Brand<"TeamId">;
|
|
35
|
+
}, {}, {}>;
|
|
36
|
+
export declare class JoinResult extends JoinResult_base {
|
|
37
|
+
}
|
|
38
|
+
declare const InviteCode_base: Schema.Class<InviteCode, {
|
|
39
|
+
code: typeof Schema.String;
|
|
40
|
+
active: typeof Schema.Boolean;
|
|
41
|
+
}, Schema.Struct.Encoded<{
|
|
42
|
+
code: typeof Schema.String;
|
|
43
|
+
active: typeof Schema.Boolean;
|
|
44
|
+
}>, never, {
|
|
45
|
+
readonly code: string;
|
|
46
|
+
} & {
|
|
47
|
+
readonly active: boolean;
|
|
48
|
+
}, {}, {}>;
|
|
49
|
+
export declare class InviteCode extends InviteCode_base {
|
|
50
|
+
}
|
|
51
|
+
declare const InviteNotFound_base: Schema.TaggedErrorClass<InviteNotFound, "InviteNotFound", {
|
|
52
|
+
readonly _tag: Schema.tag<"InviteNotFound">;
|
|
53
|
+
}>;
|
|
54
|
+
export declare class InviteNotFound extends InviteNotFound_base {
|
|
55
|
+
}
|
|
56
|
+
declare const AlreadyMember_base: Schema.TaggedErrorClass<AlreadyMember, "AlreadyMember", {
|
|
57
|
+
readonly _tag: Schema.tag<"AlreadyMember">;
|
|
58
|
+
}>;
|
|
59
|
+
export declare class AlreadyMember extends AlreadyMember_base {
|
|
60
|
+
}
|
|
61
|
+
declare const Forbidden_base: Schema.TaggedErrorClass<Forbidden, "Forbidden", {
|
|
62
|
+
readonly _tag: Schema.tag<"Forbidden">;
|
|
63
|
+
}>;
|
|
64
|
+
export declare class Forbidden extends Forbidden_base {
|
|
65
|
+
}
|
|
66
|
+
declare const InviteApiGroup_base: HttpApiGroup.HttpApiGroup<"invite", HttpApiEndpoint.HttpApiEndpoint<"getInvite", "GET", {
|
|
67
|
+
readonly code: string;
|
|
68
|
+
}, never, never, never, InviteInfo, InviteNotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"joinViaInvite", "POST", {
|
|
69
|
+
readonly code: string;
|
|
70
|
+
}, never, never, never, JoinResult, import("./Auth.js").Unauthorized | InviteNotFound | AlreadyMember, AuthMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"regenerateInvite", "POST", {
|
|
71
|
+
readonly teamId: string & import("effect/Brand").Brand<"TeamId">;
|
|
72
|
+
}, never, never, never, InviteCode, import("./Auth.js").Unauthorized | Forbidden, AuthMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"disableInvite", "DELETE", {
|
|
73
|
+
readonly teamId: string & import("effect/Brand").Brand<"TeamId">;
|
|
74
|
+
}, never, never, never, void, import("./Auth.js").Unauthorized | Forbidden, AuthMiddleware, never>, never, never, false>;
|
|
75
|
+
export declare class InviteApiGroup extends InviteApiGroup_base {
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=Invite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invite.d.ts","sourceRoot":"","sources":["../../../src/api/Invite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAiB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;AAE3C,qBAAa,UAAW,SAAQ,eAI9B;CAAG;;;;;;;;;;;;;;;;AAEL,qBAAa,UAAW,SAAQ,eAI9B;CAAG;;;;;;;;;;;;AAEL,qBAAa,UAAW,SAAQ,eAG9B;CAAG;;;;AAEL,qBAAa,cAAe,SAAQ,mBAInC;CAAG;;;;AAEJ,qBAAa,aAAc,SAAQ,kBAIlC;CAAG;;;;AAEJ,qBAAa,SAAU,SAAQ,cAI9B;CAAG;;;;;;;;;;AAEJ,qBAAa,cAAe,SAAQ,mBA4BjC;CAAG"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as ApiGroup from './ApiGroup.js';
|
|
2
|
+
export * as Auth from './api/Auth.js';
|
|
3
|
+
export * as Invite from './api/Invite.js';
|
|
4
|
+
export * as Session from './models/Session.js';
|
|
5
|
+
export * as Team from './models/Team.js';
|
|
6
|
+
export * as TeamInvite from './models/TeamInvite.js';
|
|
7
|
+
export * as TeamMember from './models/TeamMember.js';
|
|
8
|
+
export * as User from './models/User.js';
|
|
2
9
|
//# sourceMappingURL=index.d.ts.map
|