@bantr-sports/sdk 12.8.1 → 12.10.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/api-type/src/modules/auth/auth.factory.d.ts +4 -0
- package/api-type/src/modules/auth/auth.schema.d.ts +421 -0
- package/api-type/src/modules/auth/auth.service.d.ts +49 -0
- package/api-type/src/modules/auth/index.d.ts +3 -0
- package/api-type/src/modules/broadcast/broadcast.factory.d.ts +4 -0
- package/api-type/src/modules/broadcast/broadcast.schema.d.ts +294 -0
- package/api-type/src/modules/broadcast/broadcast.service.d.ts +98 -0
- package/api-type/src/modules/calendar/calendar-diagnostics.d.ts +10 -0
- package/api-type/src/modules/calendar/calendar-fetch-client.d.ts +108 -0
- package/api-type/src/modules/calendar/calendar-permissions.factory.d.ts +9 -0
- package/api-type/src/modules/calendar/calendar-permissions.service.d.ts +74 -0
- package/api-type/src/modules/calendar/calendar.schema.d.ts +158 -0
- package/api-type/src/modules/calendar/calendar.service.d.ts +75 -0
- package/api-type/src/modules/chat/chat.events.d.ts +26 -0
- package/api-type/src/modules/chat/chat.factory.d.ts +4 -0
- package/api-type/src/modules/chat/chat.repository.d.ts +119 -0
- package/api-type/src/modules/chat/chat.schema.d.ts +300 -0
- package/api-type/src/modules/chat/chat.service.d.ts +88 -0
- package/api-type/src/modules/compliance/compliance-reminder.service.d.ts +19 -0
- package/api-type/src/modules/csae-report/csae-report.factory.d.ts +17 -0
- package/api-type/src/modules/csae-report/csae-report.schema.d.ts +63 -0
- package/api-type/src/modules/csae-report/csae-report.service.d.ts +28 -0
- package/api-type/src/modules/csae-report/index.d.ts +9 -0
- package/api-type/src/modules/discount_code/discount_code.factory.d.ts +4 -0
- package/api-type/src/modules/discount_code/discount_code.model.d.ts +39 -0
- package/api-type/src/modules/discount_code/discount_code.schema.d.ts +317 -0
- package/api-type/src/modules/discount_code/discount_code.service.d.ts +90 -0
- package/api-type/src/modules/event/event.factory.d.ts +4 -0
- package/api-type/src/modules/event/event.schema.d.ts +42 -0
- package/api-type/src/modules/event/event.service.d.ts +8 -0
- package/api-type/src/modules/free_agent_payments/free_agent_payments.factory.d.ts +4 -0
- package/api-type/src/modules/free_agent_payments/free_agent_payments.schema.d.ts +59 -0
- package/api-type/src/modules/free_agent_payments/free_agent_payments.service.d.ts +46 -0
- package/api-type/src/modules/geolocation/geolocation.factory.d.ts +4 -0
- package/api-type/src/modules/geolocation/geolocation.schema.d.ts +49 -0
- package/api-type/src/modules/geolocation/geolocation.service.d.ts +7 -0
- package/api-type/src/modules/league/league.factory.d.ts +4 -0
- package/api-type/src/modules/league/league.schema.d.ts +66 -0
- package/api-type/src/modules/league/league.service.d.ts +37 -0
- package/api-type/src/modules/league_payments/league_payments.factory.d.ts +4 -0
- package/api-type/src/modules/league_payments/league_payments.schema.d.ts +332 -0
- package/api-type/src/modules/league_payments/league_payments.service.d.ts +47 -0
- package/api-type/src/modules/marketplace/marketplace.factory.d.ts +4 -0
- package/api-type/src/modules/marketplace/marketplace.schema.d.ts +291 -0
- package/api-type/src/modules/marketplace/marketplace.service.d.ts +75 -0
- package/api-type/src/modules/member_notification_settings/member_notification_settings.factory.d.ts +4 -0
- package/api-type/src/modules/member_notification_settings/member_notification_settings.middleware.d.ts +25 -0
- package/api-type/src/modules/member_notification_settings/member_notification_settings.schema.d.ts +99 -0
- package/api-type/src/modules/member_notification_settings/member_notification_settings.service.d.ts +30 -0
- package/api-type/src/modules/oauth/oauth.constant.d.ts +20 -0
- package/api-type/src/modules/oauth/oauth.controller.d.ts +82 -0
- package/api-type/src/modules/oauth/oauth.factory.d.ts +4 -0
- package/api-type/src/modules/oauth/oauth.schema.d.ts +36 -0
- package/api-type/src/modules/oauth/oauth.util.d.ts +12 -0
- package/api-type/src/modules/oauth/providers/apple.service.d.ts +53 -0
- package/api-type/src/modules/oauth/providers/google.service.d.ts +52 -0
- package/api-type/src/modules/oauth/providers/oauth.service.d.ts +74 -0
- package/api-type/src/modules/organization/organization.factory.d.ts +4 -0
- package/api-type/src/modules/organization/organization.schema.d.ts +45 -0
- package/api-type/src/modules/organization/organization.service.d.ts +11 -0
- package/api-type/src/modules/organization_debt/organization_debt.factory.d.ts +4 -0
- package/api-type/src/modules/organization_debt/organization_debt.schema.d.ts +64 -0
- package/api-type/src/modules/organization_debt/organization_debt.service.d.ts +87 -0
- package/api-type/src/modules/pickup_payments/pickup_payments.factory.d.ts +4 -0
- package/api-type/src/modules/pickup_payments/pickup_payments.schema.d.ts +45 -0
- package/api-type/src/modules/pickup_payments/pickup_payments.service.d.ts +32 -0
- package/api-type/src/modules/player_id_validation/player_id_validation.factory.d.ts +4 -0
- package/api-type/src/modules/player_id_validation/player_id_validation.rules.d.ts +15 -0
- package/api-type/src/modules/player_id_validation/player_id_validation.schema.d.ts +184 -0
- package/api-type/src/modules/player_id_validation/player_id_validation.service.d.ts +104 -0
- package/api-type/src/modules/product/product.factory.d.ts +4 -0
- package/api-type/src/modules/product/product.schema.d.ts +117 -0
- package/api-type/src/modules/product/product.service.d.ts +29 -0
- package/api-type/src/modules/refund_request/refund_request.factory.d.ts +4 -0
- package/api-type/src/modules/refund_request/refund_request.schema.d.ts +288 -0
- package/api-type/src/modules/refund_request/refund_request.service.d.ts +10 -0
- package/api-type/src/modules/scout_feed/pinned_scout_profile.model.d.ts +19 -0
- package/api-type/src/modules/scout_feed/scout_feed.factory.d.ts +4 -0
- package/api-type/src/modules/scout_feed/scout_feed.schema.d.ts +2218 -0
- package/api-type/src/modules/scout_feed/scout_feed.service.d.ts +152 -0
- package/api-type/src/modules/scout_feed/scout_feed_filter_hash.d.ts +6 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/soccer.scorer.d.ts +9 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/age_strategy.d.ts +9 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/availability_strategy.d.ts +9 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/distance_strategy.d.ts +11 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/gender_strategy.d.ts +9 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/position_strategy.d.ts +9 -0
- package/api-type/src/modules/scout_feed/soccer_scorer/strategies/role_strategy.d.ts +9 -0
- package/api-type/src/modules/scout_invite/scout_invite.factory.d.ts +4 -0
- package/api-type/src/modules/scout_invite/scout_invite.schema.d.ts +51 -0
- package/api-type/src/modules/scout_invite/scout_invite.service.d.ts +65 -0
- package/api-type/src/modules/scout_profile/scout_profile.factory.d.ts +4 -0
- package/api-type/src/modules/scout_profile/scout_profile.schema.d.ts +875 -0
- package/api-type/src/modules/scout_profile/scout_profile.service.d.ts +41 -0
- package/api-type/src/modules/scout_profile/scout_soccer_profile.model.d.ts +44 -0
- package/api-type/src/modules/super_admin_organizers/index.d.ts +3 -0
- package/api-type/src/modules/super_admin_organizers/super_admin_organizers.factory.d.ts +4 -0
- package/api-type/src/modules/super_admin_organizers/super_admin_organizers.schema.d.ts +253 -0
- package/api-type/src/modules/super_admin_organizers/super_admin_organizers.service.d.ts +10 -0
- package/api-type/src/modules/super_admin_stripe_settings/index.d.ts +3 -0
- package/api-type/src/modules/super_admin_stripe_settings/super_admin_stripe_settings.factory.d.ts +4 -0
- package/api-type/src/modules/super_admin_stripe_settings/super_admin_stripe_settings.schema.d.ts +162 -0
- package/api-type/src/modules/super_admin_stripe_settings/super_admin_stripe_settings.service.d.ts +6 -0
- package/api-type/src/modules/super_admin_transfers/super_admin_transfers.factory.d.ts +4 -0
- package/api-type/src/modules/super_admin_transfers/super_admin_transfers.schema.d.ts +440 -0
- package/api-type/src/modules/super_admin_transfers/super_admin_transfers.service.d.ts +28 -0
- package/api-type/src/modules/suspension/suspension.constants.d.ts +5 -0
- package/api-type/src/modules/suspension/suspension.dates.d.ts +5 -0
- package/api-type/src/modules/suspension/suspension.factory.d.ts +4 -0
- package/api-type/src/modules/suspension/suspension.hooks.d.ts +22 -0
- package/api-type/src/modules/suspension/suspension.queries.d.ts +25 -0
- package/api-type/src/modules/suspension/suspension.schema.d.ts +361 -0
- package/api-type/src/modules/suspension/suspension.scope.d.ts +22 -0
- package/api-type/src/modules/suspension/suspension.service.d.ts +201 -0
- package/api-type/src/modules/team/team.factory.d.ts +4 -0
- package/api-type/src/modules/team/team.schema.d.ts +176 -0
- package/api-type/src/modules/team/team.service.d.ts +62 -0
- package/api-type/src/modules/transaction/transaction.factory.d.ts +4 -0
- package/api-type/src/modules/transaction/transaction.schema.d.ts +100 -0
- package/api-type/src/modules/transaction/transaction.service.d.ts +206 -0
- package/api-type/src/trpcRouter/auth.router.d.ts +27 -2
- package/api-type/src/trpcRouter/broadcast.router.d.ts +178 -0
- package/api-type/src/trpcRouter/calendar.router.d.ts +4 -1
- package/api-type/src/trpcRouter/chat.router.d.ts +4 -1
- package/api-type/src/trpcRouter/csae-report.router.d.ts +4 -1
- package/api-type/src/trpcRouter/discount_code.router.d.ts +4 -1
- package/api-type/src/trpcRouter/event.router.d.ts +4 -1
- package/api-type/src/trpcRouter/free_agent_payments.router.d.ts +4 -1
- package/api-type/src/trpcRouter/geolocation.router.d.ts +19 -1
- package/api-type/src/trpcRouter/league.router.d.ts +4 -1
- package/api-type/src/trpcRouter/league_payments.router.d.ts +4 -1
- package/api-type/src/trpcRouter/marketplace.router.d.ts +4 -1
- package/api-type/src/trpcRouter/member_notification_settings.d.ts +4 -1
- package/api-type/src/trpcRouter/messaging.router.d.ts +4 -1
- package/api-type/src/trpcRouter/oauth.router.d.ts +4 -1
- package/api-type/src/trpcRouter/organization.router.d.ts +4 -1
- package/api-type/src/trpcRouter/organization_debt.router.d.ts +4 -1
- package/api-type/src/trpcRouter/pickup_payments.router.d.ts +4 -1
- package/api-type/src/trpcRouter/player_id_validation.router.d.ts +4 -1
- package/api-type/src/trpcRouter/product.router.d.ts +4 -1
- package/api-type/src/trpcRouter/refund_request.router.d.ts +4 -1
- package/api-type/src/trpcRouter/router.d.ts +1892 -146
- package/api-type/src/trpcRouter/scout_feed.router.d.ts +183 -0
- package/api-type/src/trpcRouter/scout_invite.router.d.ts +103 -0
- package/api-type/src/trpcRouter/scout_profile.router.d.ts +131 -0
- package/api-type/src/trpcRouter/super_admin_organizers.router.d.ts +4 -1
- package/api-type/src/trpcRouter/super_admin_stripe_settings.router.d.ts +4 -1
- package/api-type/src/trpcRouter/super_admin_transfers.router.d.ts +4 -1
- package/api-type/src/trpcRouter/suspension.router.d.ts +164 -0
- package/api-type/src/trpcRouter/team.d.ts +4 -1
- package/api-type/src/trpcRouter/transaction.router.d.ts +5 -1
- package/api-type/src/types/address.d.ts +22 -0
- package/api-type/src/types/auth.d.ts +106 -0
- package/api-type/src/types/base_league.d.ts +13 -0
- package/api-type/src/types/common.d.ts +26 -0
- package/api-type/src/types/dynamic_season_league_template.d.ts +52 -0
- package/api-type/src/types/email.d.ts +136 -0
- package/api-type/src/types/emoji_media_mapper.d.ts +7 -0
- package/api-type/src/types/event.d.ts +38 -0
- package/api-type/src/types/free_agent.d.ts +44 -0
- package/api-type/src/types/game_indicator.d.ts +7 -0
- package/api-type/src/types/game_stats.d.ts +235 -0
- package/api-type/src/types/geojson.d.ts +4 -0
- package/api-type/src/types/geolocation.d.ts +180 -0
- package/api-type/src/types/index.d.ts +4 -0
- package/api-type/src/types/invite.d.ts +81 -0
- package/api-type/src/types/league.d.ts +429 -0
- package/api-type/src/types/league_media.d.ts +46 -0
- package/api-type/src/types/league_schedule.d.ts +108 -0
- package/api-type/src/types/league_season_roster.d.ts +36 -0
- package/api-type/src/types/league_standing.d.ts +44 -0
- package/api-type/src/types/league_status.d.ts +12 -0
- package/api-type/src/types/league_template.d.ts +16 -0
- package/api-type/src/types/marketplace.d.ts +81 -0
- package/api-type/src/types/member.d.ts +46 -0
- package/api-type/src/types/member_notification_settings.d.ts +91 -0
- package/api-type/src/types/notification.d.ts +5 -0
- package/api-type/src/types/notifications.d.ts +3 -0
- package/api-type/src/types/onboard.d.ts +11 -0
- package/api-type/src/types/organization.d.ts +101 -0
- package/api-type/src/types/organizer.d.ts +7 -0
- package/api-type/src/types/pickup.d.ts +78 -0
- package/api-type/src/types/pickup_group.d.ts +23 -0
- package/api-type/src/types/pickup_group_members.d.ts +4 -0
- package/api-type/src/types/referee.d.ts +27 -0
- package/api-type/src/types/report.d.ts +30 -0
- package/api-type/src/types/season.d.ts +68 -0
- package/api-type/src/types/season_league_template.d.ts +38 -0
- package/api-type/src/types/support.d.ts +7 -0
- package/api-type/src/types/team.d.ts +78 -0
- package/api-type/src/types/waiver.d.ts +18 -0
- package/dist/index.d.ts +2876 -255
- package/dist/index.d.ts.map +1 -1
- package/dist/provider.d.ts +1894 -147
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +18 -3
- package/dist/query.d.ts +901 -27
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +16 -2
- package/package.json +4 -2
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const passwordSchema: z.ZodString;
|
|
3
|
+
export declare const authSetPasswordInputSchema: z.ZodEffects<z.ZodObject<{
|
|
4
|
+
newPassword: z.ZodString;
|
|
5
|
+
confirmPassword: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
newPassword: string;
|
|
8
|
+
confirmPassword: string;
|
|
9
|
+
}, {
|
|
10
|
+
newPassword: string;
|
|
11
|
+
confirmPassword: string;
|
|
12
|
+
}>, {
|
|
13
|
+
newPassword: string;
|
|
14
|
+
confirmPassword: string;
|
|
15
|
+
}, {
|
|
16
|
+
newPassword: string;
|
|
17
|
+
confirmPassword: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type authSetPasswordInputSchema = z.infer<typeof authSetPasswordInputSchema>;
|
|
20
|
+
export declare const authLoginInputSchema: z.ZodObject<{
|
|
21
|
+
email: z.ZodString;
|
|
22
|
+
password: z.ZodString;
|
|
23
|
+
inviteToken: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
email: string;
|
|
26
|
+
password: string;
|
|
27
|
+
inviteToken?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
email: string;
|
|
30
|
+
password: string;
|
|
31
|
+
inviteToken?: string | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type authLoginInputSchema = z.infer<typeof authLoginInputSchema>;
|
|
34
|
+
export declare const authRegisterInputSchemaBase: z.ZodObject<{
|
|
35
|
+
firstName: z.ZodString;
|
|
36
|
+
lastName: z.ZodString;
|
|
37
|
+
email: z.ZodString;
|
|
38
|
+
phone: z.ZodString;
|
|
39
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
|
40
|
+
birthday: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
41
|
+
gender: z.ZodEnum<["MALE", "FEMALE", "PREFER_NOT_TO_SAY"]>;
|
|
42
|
+
password: z.ZodString;
|
|
43
|
+
confirmPassword: z.ZodString;
|
|
44
|
+
avatar: z.ZodString;
|
|
45
|
+
address: z.ZodObject<{
|
|
46
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"Point">;
|
|
49
|
+
coordinates: z.ZodObject<{
|
|
50
|
+
lat: z.ZodNumber;
|
|
51
|
+
lng: z.ZodNumber;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
lng: number;
|
|
54
|
+
lat: number;
|
|
55
|
+
}, {
|
|
56
|
+
lng: number;
|
|
57
|
+
lat: number;
|
|
58
|
+
}>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
type: "Point";
|
|
61
|
+
coordinates: {
|
|
62
|
+
lng: number;
|
|
63
|
+
lat: number;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
type: "Point";
|
|
67
|
+
coordinates: {
|
|
68
|
+
lng: number;
|
|
69
|
+
lat: number;
|
|
70
|
+
};
|
|
71
|
+
}>>;
|
|
72
|
+
country: z.ZodString;
|
|
73
|
+
countryAlias: z.ZodString;
|
|
74
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
stateAlias: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
streetNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
complement: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
|
+
reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
formattedAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
location: {
|
|
86
|
+
type: "Point";
|
|
87
|
+
coordinates: {
|
|
88
|
+
lng: number;
|
|
89
|
+
lat: number;
|
|
90
|
+
};
|
|
91
|
+
} | null;
|
|
92
|
+
country: string;
|
|
93
|
+
countryAlias: string;
|
|
94
|
+
id?: number | null | undefined;
|
|
95
|
+
city?: string | null | undefined;
|
|
96
|
+
street?: string | null | undefined;
|
|
97
|
+
state?: string | null | undefined;
|
|
98
|
+
stateAlias?: string | null | undefined;
|
|
99
|
+
neighborhood?: string | null | undefined;
|
|
100
|
+
postalCode?: string | null | undefined;
|
|
101
|
+
streetNumber?: string | null | undefined;
|
|
102
|
+
complement?: string | null | undefined;
|
|
103
|
+
reference?: string | null | undefined;
|
|
104
|
+
formattedAddress?: string | null | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
location: {
|
|
107
|
+
type: "Point";
|
|
108
|
+
coordinates: {
|
|
109
|
+
lng: number;
|
|
110
|
+
lat: number;
|
|
111
|
+
};
|
|
112
|
+
} | null;
|
|
113
|
+
country: string;
|
|
114
|
+
countryAlias: string;
|
|
115
|
+
id?: number | null | undefined;
|
|
116
|
+
city?: string | null | undefined;
|
|
117
|
+
street?: string | null | undefined;
|
|
118
|
+
state?: string | null | undefined;
|
|
119
|
+
stateAlias?: string | null | undefined;
|
|
120
|
+
neighborhood?: string | null | undefined;
|
|
121
|
+
postalCode?: string | null | undefined;
|
|
122
|
+
streetNumber?: string | null | undefined;
|
|
123
|
+
complement?: string | null | undefined;
|
|
124
|
+
reference?: string | null | undefined;
|
|
125
|
+
formattedAddress?: string | null | undefined;
|
|
126
|
+
}>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
firstName: string;
|
|
129
|
+
lastName: string;
|
|
130
|
+
avatar: string;
|
|
131
|
+
birthday: string;
|
|
132
|
+
email: string;
|
|
133
|
+
password: string;
|
|
134
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
135
|
+
address: {
|
|
136
|
+
location: {
|
|
137
|
+
type: "Point";
|
|
138
|
+
coordinates: {
|
|
139
|
+
lng: number;
|
|
140
|
+
lat: number;
|
|
141
|
+
};
|
|
142
|
+
} | null;
|
|
143
|
+
country: string;
|
|
144
|
+
countryAlias: string;
|
|
145
|
+
id?: number | null | undefined;
|
|
146
|
+
city?: string | null | undefined;
|
|
147
|
+
street?: string | null | undefined;
|
|
148
|
+
state?: string | null | undefined;
|
|
149
|
+
stateAlias?: string | null | undefined;
|
|
150
|
+
neighborhood?: string | null | undefined;
|
|
151
|
+
postalCode?: string | null | undefined;
|
|
152
|
+
streetNumber?: string | null | undefined;
|
|
153
|
+
complement?: string | null | undefined;
|
|
154
|
+
reference?: string | null | undefined;
|
|
155
|
+
formattedAddress?: string | null | undefined;
|
|
156
|
+
};
|
|
157
|
+
phone: string;
|
|
158
|
+
confirmPassword: string;
|
|
159
|
+
zipCode?: string | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
firstName: string;
|
|
162
|
+
lastName: string;
|
|
163
|
+
avatar: string;
|
|
164
|
+
birthday: string;
|
|
165
|
+
email: string;
|
|
166
|
+
password: string;
|
|
167
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
168
|
+
address: {
|
|
169
|
+
location: {
|
|
170
|
+
type: "Point";
|
|
171
|
+
coordinates: {
|
|
172
|
+
lng: number;
|
|
173
|
+
lat: number;
|
|
174
|
+
};
|
|
175
|
+
} | null;
|
|
176
|
+
country: string;
|
|
177
|
+
countryAlias: string;
|
|
178
|
+
id?: number | null | undefined;
|
|
179
|
+
city?: string | null | undefined;
|
|
180
|
+
street?: string | null | undefined;
|
|
181
|
+
state?: string | null | undefined;
|
|
182
|
+
stateAlias?: string | null | undefined;
|
|
183
|
+
neighborhood?: string | null | undefined;
|
|
184
|
+
postalCode?: string | null | undefined;
|
|
185
|
+
streetNumber?: string | null | undefined;
|
|
186
|
+
complement?: string | null | undefined;
|
|
187
|
+
reference?: string | null | undefined;
|
|
188
|
+
formattedAddress?: string | null | undefined;
|
|
189
|
+
};
|
|
190
|
+
phone: string;
|
|
191
|
+
confirmPassword: string;
|
|
192
|
+
zipCode?: string | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
export type authRegisterInputSchemaBase = z.infer<typeof authRegisterInputSchemaBase>;
|
|
195
|
+
export declare const authRegisterInputSchema: z.ZodEffects<z.ZodObject<{
|
|
196
|
+
firstName: z.ZodString;
|
|
197
|
+
lastName: z.ZodString;
|
|
198
|
+
email: z.ZodString;
|
|
199
|
+
phone: z.ZodString;
|
|
200
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
|
201
|
+
birthday: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
202
|
+
gender: z.ZodEnum<["MALE", "FEMALE", "PREFER_NOT_TO_SAY"]>;
|
|
203
|
+
password: z.ZodString;
|
|
204
|
+
confirmPassword: z.ZodString;
|
|
205
|
+
avatar: z.ZodString;
|
|
206
|
+
address: z.ZodObject<{
|
|
207
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
208
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"Point">;
|
|
210
|
+
coordinates: z.ZodObject<{
|
|
211
|
+
lat: z.ZodNumber;
|
|
212
|
+
lng: z.ZodNumber;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
lng: number;
|
|
215
|
+
lat: number;
|
|
216
|
+
}, {
|
|
217
|
+
lng: number;
|
|
218
|
+
lat: number;
|
|
219
|
+
}>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
type: "Point";
|
|
222
|
+
coordinates: {
|
|
223
|
+
lng: number;
|
|
224
|
+
lat: number;
|
|
225
|
+
};
|
|
226
|
+
}, {
|
|
227
|
+
type: "Point";
|
|
228
|
+
coordinates: {
|
|
229
|
+
lng: number;
|
|
230
|
+
lat: number;
|
|
231
|
+
};
|
|
232
|
+
}>>;
|
|
233
|
+
country: z.ZodString;
|
|
234
|
+
countryAlias: z.ZodString;
|
|
235
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
|
+
stateAlias: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
|
+
neighborhood: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
|
+
streetNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
+
complement: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
formattedAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
location: {
|
|
247
|
+
type: "Point";
|
|
248
|
+
coordinates: {
|
|
249
|
+
lng: number;
|
|
250
|
+
lat: number;
|
|
251
|
+
};
|
|
252
|
+
} | null;
|
|
253
|
+
country: string;
|
|
254
|
+
countryAlias: string;
|
|
255
|
+
id?: number | null | undefined;
|
|
256
|
+
city?: string | null | undefined;
|
|
257
|
+
street?: string | null | undefined;
|
|
258
|
+
state?: string | null | undefined;
|
|
259
|
+
stateAlias?: string | null | undefined;
|
|
260
|
+
neighborhood?: string | null | undefined;
|
|
261
|
+
postalCode?: string | null | undefined;
|
|
262
|
+
streetNumber?: string | null | undefined;
|
|
263
|
+
complement?: string | null | undefined;
|
|
264
|
+
reference?: string | null | undefined;
|
|
265
|
+
formattedAddress?: string | null | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
location: {
|
|
268
|
+
type: "Point";
|
|
269
|
+
coordinates: {
|
|
270
|
+
lng: number;
|
|
271
|
+
lat: number;
|
|
272
|
+
};
|
|
273
|
+
} | null;
|
|
274
|
+
country: string;
|
|
275
|
+
countryAlias: string;
|
|
276
|
+
id?: number | null | undefined;
|
|
277
|
+
city?: string | null | undefined;
|
|
278
|
+
street?: string | null | undefined;
|
|
279
|
+
state?: string | null | undefined;
|
|
280
|
+
stateAlias?: string | null | undefined;
|
|
281
|
+
neighborhood?: string | null | undefined;
|
|
282
|
+
postalCode?: string | null | undefined;
|
|
283
|
+
streetNumber?: string | null | undefined;
|
|
284
|
+
complement?: string | null | undefined;
|
|
285
|
+
reference?: string | null | undefined;
|
|
286
|
+
formattedAddress?: string | null | undefined;
|
|
287
|
+
}>;
|
|
288
|
+
}, "strip", z.ZodTypeAny, {
|
|
289
|
+
firstName: string;
|
|
290
|
+
lastName: string;
|
|
291
|
+
avatar: string;
|
|
292
|
+
birthday: string;
|
|
293
|
+
email: string;
|
|
294
|
+
password: string;
|
|
295
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
296
|
+
address: {
|
|
297
|
+
location: {
|
|
298
|
+
type: "Point";
|
|
299
|
+
coordinates: {
|
|
300
|
+
lng: number;
|
|
301
|
+
lat: number;
|
|
302
|
+
};
|
|
303
|
+
} | null;
|
|
304
|
+
country: string;
|
|
305
|
+
countryAlias: string;
|
|
306
|
+
id?: number | null | undefined;
|
|
307
|
+
city?: string | null | undefined;
|
|
308
|
+
street?: string | null | undefined;
|
|
309
|
+
state?: string | null | undefined;
|
|
310
|
+
stateAlias?: string | null | undefined;
|
|
311
|
+
neighborhood?: string | null | undefined;
|
|
312
|
+
postalCode?: string | null | undefined;
|
|
313
|
+
streetNumber?: string | null | undefined;
|
|
314
|
+
complement?: string | null | undefined;
|
|
315
|
+
reference?: string | null | undefined;
|
|
316
|
+
formattedAddress?: string | null | undefined;
|
|
317
|
+
};
|
|
318
|
+
phone: string;
|
|
319
|
+
confirmPassword: string;
|
|
320
|
+
zipCode?: string | undefined;
|
|
321
|
+
}, {
|
|
322
|
+
firstName: string;
|
|
323
|
+
lastName: string;
|
|
324
|
+
avatar: string;
|
|
325
|
+
birthday: string;
|
|
326
|
+
email: string;
|
|
327
|
+
password: string;
|
|
328
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
329
|
+
address: {
|
|
330
|
+
location: {
|
|
331
|
+
type: "Point";
|
|
332
|
+
coordinates: {
|
|
333
|
+
lng: number;
|
|
334
|
+
lat: number;
|
|
335
|
+
};
|
|
336
|
+
} | null;
|
|
337
|
+
country: string;
|
|
338
|
+
countryAlias: string;
|
|
339
|
+
id?: number | null | undefined;
|
|
340
|
+
city?: string | null | undefined;
|
|
341
|
+
street?: string | null | undefined;
|
|
342
|
+
state?: string | null | undefined;
|
|
343
|
+
stateAlias?: string | null | undefined;
|
|
344
|
+
neighborhood?: string | null | undefined;
|
|
345
|
+
postalCode?: string | null | undefined;
|
|
346
|
+
streetNumber?: string | null | undefined;
|
|
347
|
+
complement?: string | null | undefined;
|
|
348
|
+
reference?: string | null | undefined;
|
|
349
|
+
formattedAddress?: string | null | undefined;
|
|
350
|
+
};
|
|
351
|
+
phone: string;
|
|
352
|
+
confirmPassword: string;
|
|
353
|
+
zipCode?: string | undefined;
|
|
354
|
+
}>, {
|
|
355
|
+
firstName: string;
|
|
356
|
+
lastName: string;
|
|
357
|
+
avatar: string;
|
|
358
|
+
birthday: string;
|
|
359
|
+
email: string;
|
|
360
|
+
password: string;
|
|
361
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
362
|
+
address: {
|
|
363
|
+
location: {
|
|
364
|
+
type: "Point";
|
|
365
|
+
coordinates: {
|
|
366
|
+
lng: number;
|
|
367
|
+
lat: number;
|
|
368
|
+
};
|
|
369
|
+
} | null;
|
|
370
|
+
country: string;
|
|
371
|
+
countryAlias: string;
|
|
372
|
+
id?: number | null | undefined;
|
|
373
|
+
city?: string | null | undefined;
|
|
374
|
+
street?: string | null | undefined;
|
|
375
|
+
state?: string | null | undefined;
|
|
376
|
+
stateAlias?: string | null | undefined;
|
|
377
|
+
neighborhood?: string | null | undefined;
|
|
378
|
+
postalCode?: string | null | undefined;
|
|
379
|
+
streetNumber?: string | null | undefined;
|
|
380
|
+
complement?: string | null | undefined;
|
|
381
|
+
reference?: string | null | undefined;
|
|
382
|
+
formattedAddress?: string | null | undefined;
|
|
383
|
+
};
|
|
384
|
+
phone: string;
|
|
385
|
+
confirmPassword: string;
|
|
386
|
+
zipCode?: string | undefined;
|
|
387
|
+
}, {
|
|
388
|
+
firstName: string;
|
|
389
|
+
lastName: string;
|
|
390
|
+
avatar: string;
|
|
391
|
+
birthday: string;
|
|
392
|
+
email: string;
|
|
393
|
+
password: string;
|
|
394
|
+
gender: "MALE" | "FEMALE" | "PREFER_NOT_TO_SAY";
|
|
395
|
+
address: {
|
|
396
|
+
location: {
|
|
397
|
+
type: "Point";
|
|
398
|
+
coordinates: {
|
|
399
|
+
lng: number;
|
|
400
|
+
lat: number;
|
|
401
|
+
};
|
|
402
|
+
} | null;
|
|
403
|
+
country: string;
|
|
404
|
+
countryAlias: string;
|
|
405
|
+
id?: number | null | undefined;
|
|
406
|
+
city?: string | null | undefined;
|
|
407
|
+
street?: string | null | undefined;
|
|
408
|
+
state?: string | null | undefined;
|
|
409
|
+
stateAlias?: string | null | undefined;
|
|
410
|
+
neighborhood?: string | null | undefined;
|
|
411
|
+
postalCode?: string | null | undefined;
|
|
412
|
+
streetNumber?: string | null | undefined;
|
|
413
|
+
complement?: string | null | undefined;
|
|
414
|
+
reference?: string | null | undefined;
|
|
415
|
+
formattedAddress?: string | null | undefined;
|
|
416
|
+
};
|
|
417
|
+
phone: string;
|
|
418
|
+
confirmPassword: string;
|
|
419
|
+
zipCode?: string | undefined;
|
|
420
|
+
}>;
|
|
421
|
+
export type authRegisterInputSchema = z.infer<typeof authRegisterInputSchema>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Member } from '../../models/member';
|
|
2
|
+
import { RefreshToken } from '../../models/refresh_token';
|
|
3
|
+
import { authLoginInputSchema, authSetPasswordInputSchema, authRegisterInputSchema } from './auth.schema';
|
|
4
|
+
import Store from '../../utils/store';
|
|
5
|
+
import Email from '../../emails/email';
|
|
6
|
+
export interface AutoLoginResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
member: {
|
|
9
|
+
id: number;
|
|
10
|
+
email: string;
|
|
11
|
+
firstName: string | null;
|
|
12
|
+
lastName: string | null;
|
|
13
|
+
avatar?: string | null;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface SetPasswordResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
message: string;
|
|
19
|
+
accessToken: string;
|
|
20
|
+
refreshToken: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class AuthService {
|
|
23
|
+
private readonly MemberModel;
|
|
24
|
+
private readonly RefreshTokenModel;
|
|
25
|
+
private readonly Store;
|
|
26
|
+
private readonly Email;
|
|
27
|
+
private readonly url;
|
|
28
|
+
constructor(MemberModel: typeof Member, RefreshTokenModel: typeof RefreshToken, Store: Store, Email: Email);
|
|
29
|
+
loginMember(input: authLoginInputSchema): Promise<{
|
|
30
|
+
success: boolean;
|
|
31
|
+
accessToken: string;
|
|
32
|
+
refreshToken: string;
|
|
33
|
+
user: import("../../types/auth").MemberAuthResponse;
|
|
34
|
+
}>;
|
|
35
|
+
autoLoginWithJwt(userId: number): Promise<AutoLoginResult>;
|
|
36
|
+
registerMember(input: authRegisterInputSchema): Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
message: string;
|
|
39
|
+
}>;
|
|
40
|
+
setPassword(input: authSetPasswordInputSchema, userId: number): Promise<SetPasswordResult>;
|
|
41
|
+
createVerificationLink(email: string, unhashedVerificationToken: string): Promise<string>;
|
|
42
|
+
generateWelcomeEmail(email: string, unhashedVerificationToken: string): Promise<void>;
|
|
43
|
+
private signAccessToken;
|
|
44
|
+
private signRefreshToken;
|
|
45
|
+
generateResetPasswordToken(userId: number, email: string, inviteToken?: string): string;
|
|
46
|
+
generateResetPasswordUrl(userId: number, email: string, inviteToken?: string): string;
|
|
47
|
+
private checkPassword;
|
|
48
|
+
private hashPassword;
|
|
49
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AuthService } from './auth.service';
|
|
2
|
+
export { AuthFactory } from './auth.factory';
|
|
3
|
+
export { authSetPasswordInputSchema as setPasswordInputSchema, authLoginInputSchema as loginInputSchema, authRegisterInputSchema as registerInputSchema, type authSetPasswordInputSchema as SetPasswordInput, type authLoginInputSchema as LoginInput, type authRegisterInputSchema as RegisterInput, } from './auth.schema';
|