@goweekdays/core 2.1.3 → 2.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 2.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 4f0a0c3: Fix role management
8
+
3
9
  ## 2.1.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -379,6 +379,7 @@ type TOrg = {
379
379
  type?: string;
380
380
  email?: string;
381
381
  contact?: string;
382
+ createdBy: string | ObjectId;
382
383
  status?: string;
383
384
  createdAt?: string | Date;
384
385
  updatedAt?: string | Date;
@@ -474,29 +475,17 @@ type TRole = {
474
475
  description?: string;
475
476
  permissions?: Array<string>;
476
477
  type?: string;
478
+ org?: string | ObjectId;
477
479
  status?: string;
478
480
  default?: boolean;
479
481
  createdBy?: string | ObjectId;
480
- createdAt?: string;
481
- updatedAt?: string;
482
- deletedAt?: string;
482
+ createdAt?: string | Date;
483
+ updatedAt?: string | Date;
484
+ deletedAt?: string | Date;
483
485
  };
484
486
  type TMiniRole = Pick<TRole, "name" | "permissions">;
485
- declare class MRole implements TRole {
486
- _id: ObjectId;
487
- id: string | ObjectId;
488
- name?: string;
489
- description?: string;
490
- permissions?: Array<string>;
491
- type?: string;
492
- status?: string;
493
- default?: boolean;
494
- createdBy?: string | ObjectId;
495
- createdAt?: string;
496
- updatedAt?: string;
497
- deletedAt?: string;
498
- constructor(value: TRole);
499
- }
487
+ declare const schemaRole: Joi.ObjectSchema<any>;
488
+ declare function modelRole(value: TRole): TRole;
500
489
 
501
490
  declare function useRoleRepo(): {
502
491
  createIndex: () => Promise<void>;
@@ -827,6 +816,7 @@ declare function useAppRepo(): {
827
816
  };
828
817
 
829
818
  declare function useAppService(): {
819
+ addDefaultApps: () => Promise<void>;
830
820
  deleteById: (id: string) => Promise<string>;
831
821
  };
832
822
 
@@ -842,6 +832,7 @@ type TPermission = {
842
832
  _id?: ObjectId;
843
833
  app: string;
844
834
  key: string;
835
+ name: string;
845
836
  group: string;
846
837
  description: string;
847
838
  deprecated?: boolean;
@@ -974,4 +965,4 @@ declare const XENDIT_SECRET_KEY: string;
974
965
  declare const XENDIT_BASE_URL: string;
975
966
  declare const DOMAIN: string;
976
967
 
977
- export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MRole, MUser, MUserRole, MVerification, OrgTypes, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TMiniRole, TOrg, TPSGC, TPermission, TPermissionGroup, TRole, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelApp, modelPSGC, modelPermission, modelPermissionGroup, schemaApp, schemaAppUpdate, schemaBuilding, schemaBuildingUnit, schemaOrg, schemaPSGC, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaUpdateOptions, transactionSchema, useAddressController, useAddressRepo, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePSGCController, usePSGCRepo, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, useRoleController, useRoleRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
968
+ export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MBuilding, MBuildingUnit, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MUser, MUserRole, MVerification, OrgTypes, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REFRESH_TOKEN_EXPIRY, REFRESH_TOKEN_SECRET, SECRET_KEY, SPACES_ACCESS_KEY, SPACES_BUCKET, SPACES_ENDPOINT, SPACES_REGION, SPACES_SECRET_KEY, TAddress, TApp, TBuilding, TBuildingUnit, TCounter, TFile, TMember, TMiniRole, TOrg, TPSGC, TPermission, TPermissionGroup, TRole, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelApp, modelPSGC, modelPermission, modelPermissionGroup, modelRole, schemaApp, schemaAppUpdate, schemaBuilding, schemaBuildingUnit, schemaOrg, schemaPSGC, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaRole, schemaUpdateOptions, transactionSchema, useAddressController, useAddressRepo, useAppController, useAppRepo, useAppService, useAuthController, useAuthService, useBuildingController, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePSGCController, usePSGCRepo, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, useRoleController, useRoleRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };