@syzy/apphost 1.0.1 → 1.0.2
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/App.js +83 -0
- package/dist/AppHostProvider.js +4 -0
- package/dist/AppHostRoutes.js +7 -0
- package/dist/api/image-api.js +45 -0
- package/dist/api/mapping-api.js +427 -0
- package/dist/bookingModule/components/AmenityForm.js +19 -0
- package/dist/bookingModule/components/BillingManagement.js +17 -0
- package/dist/bookingModule/components/CreateRoomForm.js +19 -0
- package/dist/bookingModule/components/ExtraRequirementForm.js +19 -0
- package/dist/bookingModule/components/ReservationForm.js +18 -0
- package/dist/bookingModule/components/RoomCategoryForm.js +19 -0
- package/dist/bookingModule/components/RoomCategoryPriceForm.js +20 -0
- package/dist/bookingModule/components/RoomExtraRequirementCapture.js +18 -0
- package/dist/bookingModule/components/RoomFacilityForm.js +19 -0
- package/dist/bookingModule/components/RoomReservationAction.js +18 -0
- package/dist/components/Home/Home.js +14 -0
- package/dist/components/Loader/Loader.js +5 -0
- package/dist/components/Login/Login.js +149 -0
- package/dist/components/Login/loginSchema.js +41 -0
- package/dist/components/Mappings/BranchMapping/Branch.js +135 -0
- package/dist/components/Mappings/BranchMapping/BranchTableColumns.js +21 -0
- package/dist/components/Mappings/BranchMapping/MappingFormBranchUser.js +150 -0
- package/dist/components/Mappings/BranchMapping/MappingTableColumns.js +29 -0
- package/dist/components/Mappings/BranchMapping/branchSchema.js +34 -0
- package/dist/components/Mappings/ComponentMapping/ComponentRoleMapping.js +98 -0
- package/dist/components/Mappings/ComponentMapping/componentRoleColumns.js +29 -0
- package/dist/components/Mappings/MappingForm/MappingForm.js +142 -0
- package/dist/components/Mappings/MappingForm/mappingSchema.js +32 -0
- package/dist/components/Mappings/RoleMapping/MappingFormUserRole.js +194 -0
- package/dist/components/Mappings/RoleMapping/UserRoleTableColumns.js +33 -0
- package/dist/components/NavBar/Sidebar.js +56 -0
- package/dist/components/ProfileForm/ProfileForm.js +190 -0
- package/dist/components/ProfileForm/ProfileList.js +33 -0
- package/dist/components/ProfileForm/profileColumns.js +67 -0
- package/dist/components/ProfileForm/profileSchema.js +50 -0
- package/dist/components/SettingsPage/SettingsPage.js +240 -0
- package/dist/components/api/settings-api.js +131 -0
- package/dist/components/common/Form/FormActionButtons.js +6 -0
- package/dist/components/common/Form/FormLabel.js +6 -0
- package/dist/components/common/ListTable/ListHeader.js +5 -0
- package/dist/components/common/ListTable/ListTable.js +31 -0
- package/dist/components/common/Modal/Modal.js +6 -0
- package/dist/config/EnvConfig.js +13 -0
- package/dist/config/amplifyConfig.js +45 -0
- package/dist/configureAppHost.js +5 -0
- package/dist/customGraphQL/customMutations.js +53 -0
- package/dist/customGraphQL/customQueries.js +104 -0
- package/dist/domain/input/input-types.js +1 -0
- package/dist/domain/model/BranchDto.js +8 -0
- package/dist/domain/model/ComponentMappingDto.js +19 -0
- package/dist/domain/model/MappingDto.js +16 -0
- package/dist/domain/model/PrefixDescriptionDto.js +13 -0
- package/dist/domain/model/ProfileDto.js +20 -0
- package/dist/domain/model/RoleMappingDto.js +19 -0
- package/dist/domain/model/SettingsDto.js +7 -0
- package/dist/domain/model/UserMappingDto.js +28 -0
- package/dist/domain/model/imageDto.js +1 -0
- package/dist/domain/type/EntityTypes.js +6 -0
- package/dist/domain/type/MappingOptions.js +1 -0
- package/dist/domain/type/MappingTypes.js +7 -0
- package/dist/domain/type/Nullable.js +1 -0
- package/dist/domain/type/ResettingPeriodOptions.js +8 -0
- package/dist/domain/type/RolesEnum.js +7 -0
- package/dist/domain/type/SelectType.js +1 -0
- package/dist/domain/type/StatusEnum.js +6 -0
- package/dist/domain/type/signUpOptions.js +4 -0
- package/dist/domain/type/statusOptions.js +4 -0
- package/dist/graphql/profileQueries.js +89 -0
- package/dist/hoc/withSyzyAuth.js +87 -0
- package/dist/hooks/useCurrentUser.js +6 -0
- package/dist/hooks/useDispatch.js +7 -0
- package/dist/hooks/usePermission.js +7 -0
- package/dist/index.js +3 -15
- package/dist/main.js +60 -0
- package/dist/services/Client.Service.js +96 -0
- package/dist/services/Storage-service.js +26 -0
- package/dist/services/navigationMenu.js +9 -0
- package/dist/static/constants.js +34 -0
- package/dist/store/AppAction.js +5 -0
- package/dist/store/AppContext.js +3 -0
- package/dist/store/AppContextType.js +6 -0
- package/dist/store/AppProvider.js +32 -0
- package/dist/store/HostedInContainerContext.js +11 -0
- package/dist/store/SesssionReducer.js +16 -0
- package/dist/types/App.d.ts +4 -0
- package/dist/types/AppHostProvider.d.ts +6 -0
- package/dist/types/AppHostRoutes.d.ts +1 -0
- package/dist/types/api/image-api.d.ts +8 -0
- package/dist/types/api/mapping-api.d.ts +80 -0
- package/dist/types/bookingModule/components/AmenityForm.d.ts +3 -0
- package/dist/types/bookingModule/components/BillingManagement.d.ts +3 -0
- package/dist/types/bookingModule/components/CreateRoomForm.d.ts +3 -0
- package/dist/types/bookingModule/components/ExtraRequirementForm.d.ts +3 -0
- package/dist/types/bookingModule/components/ReservationForm.d.ts +3 -0
- package/dist/types/bookingModule/components/RoomCategoryForm.d.ts +3 -0
- package/dist/types/bookingModule/components/RoomCategoryPriceForm.d.ts +3 -0
- package/dist/types/bookingModule/components/RoomExtraRequirementCapture.d.ts +3 -0
- package/dist/types/bookingModule/components/RoomFacilityForm.d.ts +3 -0
- package/dist/types/bookingModule/components/RoomReservationAction.d.ts +3 -0
- package/dist/types/components/Home/Home.d.ts +3 -0
- package/dist/types/components/Loader/Loader.d.ts +2 -0
- package/dist/types/components/Login/Login.d.ts +7 -0
- package/dist/types/components/Login/loginSchema.d.ts +27 -0
- package/dist/types/components/Mappings/BranchMapping/Branch.d.ts +5 -0
- package/dist/types/components/Mappings/BranchMapping/BranchTableColumns.d.ts +10 -0
- package/dist/types/components/Mappings/BranchMapping/MappingFormBranchUser.d.ts +3 -0
- package/dist/types/components/Mappings/BranchMapping/MappingTableColumns.d.ts +14 -0
- package/dist/types/components/Mappings/BranchMapping/branchSchema.d.ts +37 -0
- package/dist/types/components/Mappings/ComponentMapping/ComponentRoleMapping.d.ts +3 -0
- package/dist/types/components/Mappings/ComponentMapping/componentRoleColumns.d.ts +3 -0
- package/dist/types/components/Mappings/MappingForm/MappingForm.d.ts +35 -0
- package/dist/types/components/Mappings/MappingForm/mappingSchema.d.ts +23 -0
- package/dist/types/components/Mappings/RoleMapping/MappingFormUserRole.d.ts +5 -0
- package/dist/types/components/Mappings/RoleMapping/UserRoleTableColumns.d.ts +3 -0
- package/dist/types/components/NavBar/Sidebar.d.ts +4 -0
- package/dist/types/components/ProfileForm/ProfileForm.d.ts +3 -0
- package/dist/types/components/ProfileForm/ProfileList.d.ts +3 -0
- package/dist/types/components/ProfileForm/profileColumns.d.ts +3 -0
- package/dist/types/components/ProfileForm/profileSchema.d.ts +52 -0
- package/dist/types/components/SettingsPage/SettingsPage.d.ts +3 -0
- package/dist/types/components/api/settings-api.d.ts +26 -0
- package/dist/types/components/common/Form/FormActionButtons.d.ts +11 -0
- package/dist/types/components/common/Form/FormLabel.d.ts +8 -0
- package/dist/types/components/common/ListTable/ListHeader.d.ts +8 -0
- package/dist/types/components/common/ListTable/ListTable.d.ts +17 -0
- package/dist/types/components/common/Modal/Modal.d.ts +11 -0
- package/dist/types/config/EnvConfig.d.ts +13 -0
- package/dist/types/config/amplifyConfig.d.ts +1 -0
- package/dist/types/configureAppHost.d.ts +6 -0
- package/dist/types/customGraphQL/customMutations.d.ts +3 -0
- package/dist/types/customGraphQL/customQueries.d.ts +7 -0
- package/dist/types/domain/input/input-types.d.ts +47 -0
- package/dist/types/domain/model/BranchDto.d.ts +9 -0
- package/dist/types/domain/model/ComponentMappingDto.d.ts +24 -0
- package/dist/types/domain/model/MappingDto.d.ts +30 -0
- package/dist/types/domain/model/PrefixDescriptionDto.d.ts +16 -0
- package/dist/types/domain/model/ProfileDto.d.ts +21 -0
- package/dist/types/domain/model/RoleMappingDto.d.ts +14 -0
- package/dist/types/domain/model/SettingsDto.d.ts +8 -0
- package/dist/types/domain/model/UserMappingDto.d.ts +14 -0
- package/dist/types/domain/model/imageDto.d.ts +4 -0
- package/dist/types/domain/type/EntityTypes.d.ts +5 -0
- package/dist/types/domain/type/MappingOptions.d.ts +5 -0
- package/dist/types/domain/type/MappingTypes.d.ts +6 -0
- package/dist/types/domain/type/Nullable.d.ts +13 -0
- package/dist/types/domain/type/ResettingPeriodOptions.d.ts +2 -0
- package/dist/types/domain/type/RolesEnum.d.ts +6 -0
- package/dist/types/domain/type/SelectType.d.ts +16 -0
- package/dist/types/domain/type/StatusEnum.d.ts +5 -0
- package/dist/types/domain/type/signUpOptions.d.ts +2 -0
- package/dist/types/domain/type/statusOptions.d.ts +2 -0
- package/dist/types/graphql/profileQueries.d.ts +4 -0
- package/dist/types/hoc/withSyzyAuth.d.ts +2 -0
- package/dist/types/hooks/useCurrentUser.d.ts +3 -0
- package/dist/types/hooks/useDispatch.d.ts +3 -0
- package/dist/types/hooks/usePermission.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/main.d.ts +4 -0
- package/dist/types/services/Client.Service.d.ts +12 -0
- package/dist/types/services/Storage-service.d.ts +2 -0
- package/dist/types/services/navigationMenu.d.ts +1 -0
- package/dist/types/static/constants.d.ts +34 -0
- package/dist/types/store/AppAction.d.ts +11 -0
- package/dist/types/store/AppContext.d.ts +3 -0
- package/dist/types/store/AppContextType.d.ts +12 -0
- package/dist/types/store/AppProvider.d.ts +7 -0
- package/dist/types/store/HostedInContainerContext.d.ts +5 -0
- package/dist/types/store/SesssionReducer.d.ts +4 -0
- package/dist/types/types.d.ts +26 -0
- package/dist/types/util/AuthUtils.d.ts +1 -0
- package/dist/types/util/LogEnum.d.ts +6 -0
- package/dist/types/util/Logger.d.ts +6 -0
- package/dist/types/util/SyzyDate.d.ts +69 -0
- package/dist/types/util/dateUtils.d.ts +10 -0
- package/dist/types/util/hostedinContainer.d.ts +1 -0
- package/dist/types/util/model-types.d.ts +96 -0
- package/dist/types/util/prefixAndResettingValidation.d.ts +9 -0
- package/dist/types/util/transformToData.d.ts +1 -0
- package/dist/types.js +14 -0
- package/dist/util/AuthUtils.js +10 -0
- package/dist/util/LogEnum.js +7 -0
- package/dist/util/Logger.js +18 -0
- package/dist/util/SyzyDate.js +265 -0
- package/dist/util/dateUtils.js +24 -0
- package/dist/util/hostedinContainer.js +9 -0
- package/dist/util/model-types.js +18 -0
- package/dist/util/prefixAndResettingValidation.js +54 -0
- package/dist/util/transformToData.js +9 -0
- package/package.json +14 -9
- package/dist/__federation_shared_@tanstack/react-query-DHuUsaNz.js +0 -2517
- package/dist/__federation_shared_react-CikWE6qG.js +0 -7
- package/dist/__federation_shared_react-bootstrap-BKlZRvMR.js +0 -7516
- package/dist/__federation_shared_react-dom-vrQ70Ay8.js +0 -372
- package/dist/__federation_shared_react-router-dom-BKminmS4.js +0 -10448
- package/dist/__federation_shared_react-select-B6kehBDI.js +0 -4056
- package/dist/__federation_shared_react-toastify-B0S0UGr3.js +0 -412
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/_virtual___federation_fn_import-XZCKozko.js +0 -217
- package/dist/favicon.ico +0 -0
- package/dist/index-DgtWMtjZ.js +0 -184
- package/dist/index-eZknuYwc.js +0 -1219
- package/dist/jsx-runtime-D_t4bG-_.js +0 -264
- package/dist/manifest.webmanifest +0 -1
- package/dist/pwa/Hotel-icon.jpg +0 -0
- package/dist/pwa/apple-touch-icon-180x180.png +0 -0
- package/dist/pwa/favicon.ico +0 -0
- package/dist/pwa/maskable-icon-512x512.png +0 -0
- package/dist/pwa/pwa-192x192.png +0 -0
- package/dist/pwa/pwa-512x512.png +0 -0
- package/dist/pwa/pwa-64x64.png +0 -0
- package/dist/registerSW.js +0 -1
- package/dist/sw.js +0 -1
- package/dist/workbox-1ef09536.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface UserMappingDto {
|
|
2
|
+
pk: string;
|
|
3
|
+
sk: string;
|
|
4
|
+
entity: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
userName: string;
|
|
7
|
+
roleId: string;
|
|
8
|
+
roleName: string;
|
|
9
|
+
disabledDt: string;
|
|
10
|
+
createdDt: string;
|
|
11
|
+
status: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const initUserMappingDto: UserMappingDto;
|
|
14
|
+
export declare const transformtoUserMappingDto: (userData: any) => UserMappingDto;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SelectOptionNumber, SelectOptionStr, SelectOptNumber } from "./SelectType";
|
|
2
|
+
export type UndefinedDate = Date | undefined;
|
|
3
|
+
export type UndefinedString = string | undefined;
|
|
4
|
+
export type UndefinedNumber = number | undefined;
|
|
5
|
+
export type UndefinedBoolean = boolean | undefined;
|
|
6
|
+
export type NullableFile = File | null;
|
|
7
|
+
export type NullableDate = Date | null;
|
|
8
|
+
export type NullableNumber = number | null;
|
|
9
|
+
export type NullableFilterInput<T> = T | undefined | null;
|
|
10
|
+
export type NullableSelectOptNumber = SelectOptNumber | null;
|
|
11
|
+
export type NullableSelectOptionStr = SelectOptionStr | null;
|
|
12
|
+
export type NullableSelectOptionNumber = SelectOptionNumber | null;
|
|
13
|
+
export type ColumnDataType = string | number | boolean | string[] | Date | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SelectOptionStr extends SelectOption<string> {
|
|
2
|
+
}
|
|
3
|
+
export interface SelectOptionBool extends SelectOption<boolean> {
|
|
4
|
+
}
|
|
5
|
+
export interface SelectOptNumber extends SelectOption<number> {
|
|
6
|
+
}
|
|
7
|
+
export interface SelectOption<T> {
|
|
8
|
+
value: T;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SelectOptionNumber extends SelectOptionType<number> {
|
|
12
|
+
}
|
|
13
|
+
export interface SelectOptionType<T> {
|
|
14
|
+
value: string;
|
|
15
|
+
label: T;
|
|
16
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const createProfile = "\n mutation CreateProfile($input: ProfileInput!) {\n createProfile(input: $input) {\n pk\n sk\n name\n email\n phoneNumber\n address\n dob\n contactRelation\n contactPersonName\n contactPersonNumber\n aadhaarNumber\n aadhaarFile\n isAdmin\n status\n createdDt\n createdBy\n }\n }\n";
|
|
2
|
+
export declare const updateProfile = "\n mutation UpdateProfile($input: ProfileInput!) {\n updateProfile(input: $input) {\n pk\n sk\n name\n email\n phoneNumber\n address\n dob\n contactRelation\n contactPersonName\n contactPersonNumber\n aadhaarNumber\n aadhaarFile\n isAdmin\n status\n createdDt\n createdBy\n }\n }\n";
|
|
3
|
+
export declare const listProfiles = "\n query ListProfiles {\n listProfiles {\n pk\n sk\n name\n email\n phoneNumber\n address\n dob\n contactRelation\n contactPersonName\n contactPersonNumber\n aadhaarNumber\n aadhaarFile\n isAdmin\n status\n createdDt\n createdBy\n }\n }\n";
|
|
4
|
+
export declare const getProfile = "\n query GetProfile($pk: ID!) {\n getProfile(pk: $pk) {\n pk\n sk\n name\n email\n phoneNumber\n address\n dob\n contactRelation\n contactPersonName\n contactPersonNumber\n aadhaarNumber\n aadhaarFile\n isAdmin\n status\n createdDt\n createdBy\n }\n }\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AmIPermitted(componentName: string): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { V6Client } from '@aws-amplify/api-graphql';
|
|
2
|
+
import { GraphQLClient } from "graphql-request";
|
|
3
|
+
type UndefinedString = string | undefined;
|
|
4
|
+
export declare class Client {
|
|
5
|
+
static client: any;
|
|
6
|
+
static subClient: any;
|
|
7
|
+
static getToken(): Promise<UndefinedString>;
|
|
8
|
+
static getClient(forceRefresh?: boolean): Promise<V6Client>;
|
|
9
|
+
static getCustomGraphqlClient(endPoint: string): Promise<GraphQLClient>;
|
|
10
|
+
static startClientResetScheduler(): () => void;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getSidebarMenu: () => Promise<unknown>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const VITE_API_AUTHMODE = "userPool";
|
|
2
|
+
export declare const INVOICE_PREFIX_FORMAT = "invoice-prefix-format-settings";
|
|
3
|
+
export declare const INVOICE_RESETTING_PERIOD = "invoice-resetting-period";
|
|
4
|
+
export declare const INVOICE_SEQUENCE_PADDING = "invoice-sequence-padding";
|
|
5
|
+
export declare const INVOICE_SERIES_NUMBER = "invoice-series-number-setting";
|
|
6
|
+
export declare const BOOKING_RECEIPT_PREFIX_FORMAT = "booking-receipt-prefix-format-settings";
|
|
7
|
+
export declare const BOOKING_RECEIPT_RESETTING_PERIOD = "booking-receipt-resetting-period";
|
|
8
|
+
export declare const BOOKING_RECEIPT_SEQUENCE_PADDING = "booking-receipt-sequence-padding";
|
|
9
|
+
export declare const BOOKING_RECEIPT_SERIES_NUMBER = "booking-receipt-series-number-setting";
|
|
10
|
+
export declare const PURCHASE_ORDER_PREFIX_FORMAT = "purchase-order-prefix-format-settings";
|
|
11
|
+
export declare const PURCHASE_ORDER_RESETTING_PERIOD = "purchase-order-resetting-period";
|
|
12
|
+
export declare const PURCHASE_ORDER_SEQUENCE_PADDING = "purchase-order-sequence-padding";
|
|
13
|
+
export declare const PREFIX_CONSTANT_FY = "{FY}";
|
|
14
|
+
export declare const PREFIX_CONSTANT_fy = "{fy}";
|
|
15
|
+
export declare const PREFIX_CONSTANT_FYPLUS1 = "{FYPLUS1}";
|
|
16
|
+
export declare const PREFIX_CONSTANT_fyplus1 = "{fyplus1}";
|
|
17
|
+
export declare const PREFIX_CONSTANT_FYMINUS1 = "{FYMINUS1}";
|
|
18
|
+
export declare const PREFIX_CONSTANT_fyminus1 = "{fyminus1}";
|
|
19
|
+
export declare const PREFIX_CONSTANT_Y = "{Y}";
|
|
20
|
+
export declare const PREFIX_CONSTANT_y = "{y}";
|
|
21
|
+
export declare const PREFIX_CONSTANT_M = "{M}";
|
|
22
|
+
export declare const PREFIX_CONSTANT_D = "{D}";
|
|
23
|
+
export declare const FINANCIAL_YEARLY = "FINANCIAL YEARLY";
|
|
24
|
+
export declare const YEARLY = "YEARLY";
|
|
25
|
+
export declare const MONTHLY = "MONTHLY";
|
|
26
|
+
export declare const DAILY = "DAILY";
|
|
27
|
+
export declare const NEVER = "NEVER";
|
|
28
|
+
export declare const RESERVATION_PREFIX_FORMAT = "reservation-prefix-format";
|
|
29
|
+
export declare const RESERVATION_RESETTING_PERIOD = "reservation-resetting-period";
|
|
30
|
+
export declare const RESERVATION_SEQUENCE_PADDING = "reservation-sequence-padding";
|
|
31
|
+
export declare const ALL = "All";
|
|
32
|
+
export declare const HIDE_SIGN_UP = "hide-sign-up";
|
|
33
|
+
export declare const HIDE_SIGN_UP_IS_YES = "Yes";
|
|
34
|
+
export declare const HIDE_SIGN_UP_IS_NO = "No";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppAction } from "./AppAction";
|
|
2
|
+
export interface AppSession {
|
|
3
|
+
userName: string;
|
|
4
|
+
branchId?: string;
|
|
5
|
+
roles: string[];
|
|
6
|
+
allowedComponents?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const defaultSession: AppSession;
|
|
9
|
+
export interface AppContextProps {
|
|
10
|
+
user: AppSession;
|
|
11
|
+
dispatch: React.Dispatch<AppAction>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Reducer, Dispatch } from 'react';
|
|
2
|
+
import { AppSession } from './AppContextType';
|
|
3
|
+
export declare const APPHOSTSESSION_KEY = "AppHostSession";
|
|
4
|
+
export declare const useSessionReducer: <T extends AppSession, A>(reducer: Reducer<T, A>, initialState: T, storageKey: string) => [T, Dispatch<A>];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface Route {
|
|
2
|
+
path: string;
|
|
3
|
+
component: React.ComponentType<any>;
|
|
4
|
+
title: string;
|
|
5
|
+
requiredComponent?: string;
|
|
6
|
+
exact?: boolean;
|
|
7
|
+
acl?: {
|
|
8
|
+
[key in Role]: {
|
|
9
|
+
type: DecisionType;
|
|
10
|
+
meta?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
props?: any;
|
|
14
|
+
}
|
|
15
|
+
export declare enum Role {
|
|
16
|
+
GUEST = "GUEST",
|
|
17
|
+
MEMBER = "MEMBER",
|
|
18
|
+
CHAPTERADMIN = "CHAPTERADMIN",
|
|
19
|
+
SUPPORTADMIN = "SUPPORTADMIN",
|
|
20
|
+
SUPERADMIN = "SUPERADMIN"
|
|
21
|
+
}
|
|
22
|
+
export declare enum DecisionType {
|
|
23
|
+
ALLOW = "allow",
|
|
24
|
+
DENY = "deny",
|
|
25
|
+
REDIRECT = "redirect"
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSignedIn(): Promise<boolean>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare class SyzyDate extends Date {
|
|
2
|
+
static months: string[];
|
|
3
|
+
addDays: (days: number) => Date;
|
|
4
|
+
reduceDays: (days: number) => Date;
|
|
5
|
+
isSameDate: (date: Date) => boolean;
|
|
6
|
+
isToday: () => boolean;
|
|
7
|
+
clone: () => Date;
|
|
8
|
+
isAnotherMonth: (date: Date) => boolean;
|
|
9
|
+
isWeekend: () => boolean;
|
|
10
|
+
toISODate: () => string;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @returns Current Date as ISO string with T between date and time
|
|
14
|
+
*/
|
|
15
|
+
toISODateTime: () => string;
|
|
16
|
+
toISODateString(): string;
|
|
17
|
+
/***
|
|
18
|
+
* To Given Format
|
|
19
|
+
* DD- Date
|
|
20
|
+
* MM- Month in 2 digits
|
|
21
|
+
* Mon- Month in 3 letters
|
|
22
|
+
* mm- Minutes
|
|
23
|
+
* HH- Hours in 24 hour format
|
|
24
|
+
* hh- Hours in 12 hour format
|
|
25
|
+
* ss- Seconds
|
|
26
|
+
* YYYY- Year in 4 digits
|
|
27
|
+
* YY- Year in 2 digits
|
|
28
|
+
*/
|
|
29
|
+
toDateFormatString(format: string): string;
|
|
30
|
+
getCurrentISODate: () => string;
|
|
31
|
+
toDate: () => Date;
|
|
32
|
+
getCurrentDate: () => SyzyDate;
|
|
33
|
+
currentWeek: () => number;
|
|
34
|
+
currentTerm: () => number;
|
|
35
|
+
currentQuarter: () => number;
|
|
36
|
+
getCurrentYrAndMonAndQuarterAndTerm: () => {
|
|
37
|
+
currentYr: number;
|
|
38
|
+
currentMon: number;
|
|
39
|
+
currTerm: number;
|
|
40
|
+
currentQuarter: number;
|
|
41
|
+
};
|
|
42
|
+
getWeekNo: () => number;
|
|
43
|
+
getcurrentTerm: () => number;
|
|
44
|
+
getCurrentQuarter: () => number;
|
|
45
|
+
getCurrentMonthStartAndEnd: () => {
|
|
46
|
+
startOfMonth: Date;
|
|
47
|
+
endOfMonth: Date;
|
|
48
|
+
};
|
|
49
|
+
getCurrentTermStartAndEnd: () => {
|
|
50
|
+
startOfTerm: Date;
|
|
51
|
+
endDateOfTerm: Date;
|
|
52
|
+
};
|
|
53
|
+
getCurrentYearStartAndEnd: () => {
|
|
54
|
+
startOfYear: Date;
|
|
55
|
+
endOfYear: Date;
|
|
56
|
+
};
|
|
57
|
+
getCurrentQuarterStartAndEnd: () => {
|
|
58
|
+
startDateOfQuarter: Date;
|
|
59
|
+
endDateOfQuarter: Date;
|
|
60
|
+
};
|
|
61
|
+
getCurrentWeekStartAndEnd: () => {
|
|
62
|
+
startDateOfWeek: Date;
|
|
63
|
+
endDateOfWeek: Date;
|
|
64
|
+
};
|
|
65
|
+
getSelectedMonthStartAndEnd: (month: number) => {
|
|
66
|
+
startOfSelectedMonth: Date;
|
|
67
|
+
endOfSelectedMonth: Date;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SyzyDate } from "./SyzyDate";
|
|
2
|
+
export declare const DATE_FORMAT_ISO_DD_MON_YYYY = "DD-Mon-YYYY";
|
|
3
|
+
export declare const DATE_FORMAT_ISO_YYYY_MM_DD = "YYYY-MM-DD";
|
|
4
|
+
export declare const DATE_FORMAT_DD_MM_YYYY = "DD-MM-YYYY";
|
|
5
|
+
export declare const DATE_FORMAT_ISO_YYYY_MM_DD_HH_MM = "YYYY-MM-DD HH:mm";
|
|
6
|
+
export declare const DATE_FORMAT_ISO_YYYY_MM_DD_HH_MM_SS = "YYYY-MM-DD HH:mm:ss";
|
|
7
|
+
export declare const DATE_FORMAT_ISO_DD_MON_YYYY_HH_MM = "DD-Mon-YYYY HH:mm";
|
|
8
|
+
export declare const DATE_FORMAT_ISO_DD_MON_YYYY_HH_MM_SS = "DD-Mon-YYYY HH:mm:ss";
|
|
9
|
+
export declare const formatDateWithShortMonth: (isoDateString: string) => string;
|
|
10
|
+
export declare const compareDate: (date1: SyzyDate, date2: SyzyDate) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isHostedInContainer: () => boolean;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export type ModelStringKeyConditionInput = {
|
|
2
|
+
eq?: string | null;
|
|
3
|
+
le?: string | null;
|
|
4
|
+
lt?: string | null;
|
|
5
|
+
ge?: string | null;
|
|
6
|
+
gt?: string | null;
|
|
7
|
+
between?: Array<string | null> | null;
|
|
8
|
+
beginsWith?: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare enum ModelSortDirection {
|
|
11
|
+
ASC = "ASC",
|
|
12
|
+
DESC = "DESC"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ModelAttributeTypes {
|
|
15
|
+
binary = "binary",
|
|
16
|
+
binarySet = "binarySet",
|
|
17
|
+
bool = "bool",
|
|
18
|
+
list = "list",
|
|
19
|
+
map = "map",
|
|
20
|
+
number = "number",
|
|
21
|
+
numberSet = "numberSet",
|
|
22
|
+
string = "string",
|
|
23
|
+
stringSet = "stringSet",
|
|
24
|
+
_null = "_null"
|
|
25
|
+
}
|
|
26
|
+
export type ModelSizeInput = {
|
|
27
|
+
ne?: number | null;
|
|
28
|
+
eq?: number | null;
|
|
29
|
+
le?: number | null;
|
|
30
|
+
lt?: number | null;
|
|
31
|
+
ge?: number | null;
|
|
32
|
+
gt?: number | null;
|
|
33
|
+
between?: Array<number | null> | null;
|
|
34
|
+
};
|
|
35
|
+
export type ModelIDInput = {
|
|
36
|
+
ne?: string | null;
|
|
37
|
+
eq?: string | null;
|
|
38
|
+
le?: string | null;
|
|
39
|
+
lt?: string | null;
|
|
40
|
+
ge?: string | null;
|
|
41
|
+
gt?: string | null;
|
|
42
|
+
contains?: string | null;
|
|
43
|
+
notContains?: string | null;
|
|
44
|
+
between?: Array<string | null> | null;
|
|
45
|
+
in?: Array<string | null> | null;
|
|
46
|
+
beginsWith?: string | null;
|
|
47
|
+
attributeExists?: boolean | null;
|
|
48
|
+
attributeType?: ModelAttributeTypes | null;
|
|
49
|
+
size?: ModelSizeInput | null;
|
|
50
|
+
};
|
|
51
|
+
export type ModelStringInput = {
|
|
52
|
+
ne?: string | null;
|
|
53
|
+
eq?: string | null;
|
|
54
|
+
le?: string | null;
|
|
55
|
+
lt?: string | null;
|
|
56
|
+
ge?: string | null;
|
|
57
|
+
gt?: string | null;
|
|
58
|
+
contains?: string | null;
|
|
59
|
+
notContains?: string | null;
|
|
60
|
+
between?: Array<string | null> | null;
|
|
61
|
+
in?: Array<string | null> | null;
|
|
62
|
+
beginsWith?: string | null;
|
|
63
|
+
attributeExists?: boolean | null;
|
|
64
|
+
attributeType?: ModelAttributeTypes | null;
|
|
65
|
+
size?: ModelSizeInput | null;
|
|
66
|
+
};
|
|
67
|
+
export type ModelIntInput = {
|
|
68
|
+
ne?: number | null;
|
|
69
|
+
eq?: number | null;
|
|
70
|
+
le?: number | null;
|
|
71
|
+
lt?: number | null;
|
|
72
|
+
ge?: number | null;
|
|
73
|
+
gt?: number | null;
|
|
74
|
+
between?: Array<number | null> | null;
|
|
75
|
+
in?: Array<number | null> | null;
|
|
76
|
+
attributeExists?: boolean | null;
|
|
77
|
+
attributeType?: ModelAttributeTypes | null;
|
|
78
|
+
};
|
|
79
|
+
export type ModelFloatInput = {
|
|
80
|
+
ne?: number | null;
|
|
81
|
+
eq?: number | null;
|
|
82
|
+
le?: number | null;
|
|
83
|
+
lt?: number | null;
|
|
84
|
+
ge?: number | null;
|
|
85
|
+
gt?: number | null;
|
|
86
|
+
between?: Array<number | null> | null;
|
|
87
|
+
in?: Array<number | null> | null;
|
|
88
|
+
attributeExists?: boolean | null;
|
|
89
|
+
attributeType?: ModelAttributeTypes | null;
|
|
90
|
+
};
|
|
91
|
+
export type ModelBooleanInput = {
|
|
92
|
+
ne?: boolean | null;
|
|
93
|
+
eq?: boolean | null;
|
|
94
|
+
attributeExists?: boolean | null;
|
|
95
|
+
attributeType?: ModelAttributeTypes | null;
|
|
96
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const validateFullWrapper: (val: string) => string | undefined;
|
|
2
|
+
export declare const validateFirstOccurance: (val: string) => {
|
|
3
|
+
firstWrapper: string | null;
|
|
4
|
+
validTokens: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare const resettingOptions: (prefix: string) => {
|
|
7
|
+
index: number;
|
|
8
|
+
periods: string[];
|
|
9
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const transformToData: <T>(data: any) => T;
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export var Role;
|
|
2
|
+
(function (Role) {
|
|
3
|
+
Role["GUEST"] = "GUEST";
|
|
4
|
+
Role["MEMBER"] = "MEMBER";
|
|
5
|
+
Role["CHAPTERADMIN"] = "CHAPTERADMIN";
|
|
6
|
+
Role["SUPPORTADMIN"] = "SUPPORTADMIN";
|
|
7
|
+
Role["SUPERADMIN"] = "SUPERADMIN";
|
|
8
|
+
})(Role || (Role = {}));
|
|
9
|
+
export var DecisionType;
|
|
10
|
+
(function (DecisionType) {
|
|
11
|
+
DecisionType["ALLOW"] = "allow";
|
|
12
|
+
DecisionType["DENY"] = "deny";
|
|
13
|
+
DecisionType["REDIRECT"] = "redirect";
|
|
14
|
+
})(DecisionType || (DecisionType = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getCurrentUser } from "aws-amplify/auth";
|
|
2
|
+
export async function isSignedIn() {
|
|
3
|
+
try {
|
|
4
|
+
const session = await getCurrentUser();
|
|
5
|
+
return session !== null && session !== undefined && session.userId !== undefined;
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const levels = {
|
|
2
|
+
debug: 1,
|
|
3
|
+
info: 2,
|
|
4
|
+
warn: 3,
|
|
5
|
+
error: 4,
|
|
6
|
+
none: 5,
|
|
7
|
+
};
|
|
8
|
+
// Current log level (from env)
|
|
9
|
+
const currentLevel = (import.meta.env.VITE_LOG_LEVEL || 'info');
|
|
10
|
+
function shouldLog(level) {
|
|
11
|
+
return levels[level] >= levels[currentLevel];
|
|
12
|
+
}
|
|
13
|
+
export const logger = {
|
|
14
|
+
debug: (...args) => shouldLog('debug') && console.debug('[DEBUG]', ...args),
|
|
15
|
+
info: (...args) => shouldLog('info') && console.info('[INFO]', ...args),
|
|
16
|
+
warn: (...args) => shouldLog('warn') && console.warn('[WARN]', ...args),
|
|
17
|
+
error: (...args) => shouldLog('error') && console.error('[ERROR]', ...args),
|
|
18
|
+
};
|