@eeplatform/core 1.8.9 → 1.8.10
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 +6 -0
- package/dist/index.d.ts +21 -30
- package/dist/index.js +1328 -1099
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1154 -927
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -441,59 +441,49 @@ declare function useFileController(): {
|
|
|
441
441
|
type TRole = {
|
|
442
442
|
_id?: ObjectId;
|
|
443
443
|
id?: string | ObjectId;
|
|
444
|
-
name
|
|
444
|
+
name: string;
|
|
445
445
|
description?: string;
|
|
446
446
|
permissions?: Array<string>;
|
|
447
|
-
|
|
447
|
+
org?: string | ObjectId;
|
|
448
|
+
app: string;
|
|
448
449
|
status?: string;
|
|
449
|
-
default?: boolean;
|
|
450
450
|
createdBy?: string | ObjectId;
|
|
451
|
-
createdAt?: string;
|
|
452
|
-
updatedAt?: string;
|
|
453
|
-
deletedAt?: string;
|
|
451
|
+
createdAt?: string | Date;
|
|
452
|
+
updatedAt?: string | Date;
|
|
453
|
+
deletedAt?: string | Date;
|
|
454
454
|
};
|
|
455
|
-
|
|
456
|
-
declare
|
|
457
|
-
|
|
458
|
-
id: string | ObjectId;
|
|
459
|
-
name?: string;
|
|
460
|
-
description?: string;
|
|
461
|
-
permissions?: Array<string>;
|
|
462
|
-
type?: string;
|
|
463
|
-
status?: string;
|
|
464
|
-
default?: boolean;
|
|
465
|
-
createdBy?: string | ObjectId;
|
|
466
|
-
createdAt?: string;
|
|
467
|
-
updatedAt?: string;
|
|
468
|
-
deletedAt?: string;
|
|
469
|
-
constructor(value: TRole);
|
|
470
|
-
}
|
|
455
|
+
declare const schemaRole: Joi.ObjectSchema<any>;
|
|
456
|
+
declare const schemaRoleUpdate: Joi.ObjectSchema<any>;
|
|
457
|
+
declare function modelRole(value: TRole): TRole;
|
|
471
458
|
|
|
472
459
|
declare function useRoleRepo(): {
|
|
473
460
|
createIndexes: () => Promise<void>;
|
|
474
|
-
createUniqueIndex: () => Promise<void>;
|
|
475
461
|
addRole: (value: TRole, session?: ClientSession, clearCache?: boolean) => Promise<ObjectId>;
|
|
476
|
-
getRoles: ({ search, page, limit, sort,
|
|
462
|
+
getRoles: ({ search, page, limit, sort, app, org, }?: {
|
|
477
463
|
search?: string;
|
|
478
464
|
page?: number;
|
|
479
465
|
limit?: number;
|
|
480
466
|
sort?: any;
|
|
481
|
-
|
|
482
|
-
|
|
467
|
+
app?: string;
|
|
468
|
+
org?: string | ObjectId;
|
|
483
469
|
}) => Promise<{
|
|
484
470
|
items: any[];
|
|
485
471
|
pages: number;
|
|
486
472
|
pageRange: string;
|
|
487
473
|
} | TRole[]>;
|
|
488
474
|
getRoleByUserId: (value: ObjectId | string) => Promise<TRole | null>;
|
|
489
|
-
|
|
475
|
+
getById: (_id: ObjectId | string) => Promise<mongodb.WithId<bson.Document> | TRole | null>;
|
|
490
476
|
getRoleByName: (name: string) => Promise<mongodb.WithId<bson.Document> | TRole | null>;
|
|
491
|
-
updateRole: (_id: string | ObjectId, value:
|
|
492
|
-
|
|
477
|
+
updateRole: (_id: string | ObjectId, value: Pick<TRole, "name" | "permissions" | "description">, session?: ClientSession) => Promise<string>;
|
|
478
|
+
deleteById: (_id: ObjectId | string, session?: ClientSession) => Promise<string>;
|
|
493
479
|
updatePermissionsById: (_id: string | ObjectId, permissions: TRole["permissions"], session?: ClientSession) => Promise<string>;
|
|
494
480
|
delCachedData: () => void;
|
|
495
481
|
};
|
|
496
482
|
|
|
483
|
+
declare function useRoleService(): {
|
|
484
|
+
deleteById: (id: string) => Promise<void>;
|
|
485
|
+
};
|
|
486
|
+
|
|
497
487
|
declare function useRoleController(): {
|
|
498
488
|
createRole: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
499
489
|
getRoles: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -649,6 +639,7 @@ declare function useMemberRepo(): {
|
|
|
649
639
|
createIndexes: () => Promise<void>;
|
|
650
640
|
add: (value: TMember, session?: ClientSession) => Promise<string>;
|
|
651
641
|
getById: (_id: string | ObjectId) => Promise<TMember | null>;
|
|
642
|
+
getByRole: (role: string | ObjectId) => Promise<TMember | null>;
|
|
652
643
|
getByOrg: (org: string | ObjectId) => Promise<TMember | null>;
|
|
653
644
|
getAll: ({ search, limit, page, user, org, type, status }?: {
|
|
654
645
|
search: string;
|
|
@@ -969,4 +960,4 @@ declare const GEMINI_API_KEY: string;
|
|
|
969
960
|
declare const ASSEMBLY_AI_API_KEY: string;
|
|
970
961
|
declare const DOMAIN: string;
|
|
971
962
|
|
|
972
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, ASSEMBLY_AI_API_KEY, AudioFileData, AudioTranscriptionOptions, AudioTranscriptionResult, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, GEMINI_API_KEY, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MFile, MMember, MONGO_DB, MONGO_URI, MOrg,
|
|
963
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, ASSEMBLY_AI_API_KEY, AudioFileData, AudioTranscriptionOptions, AudioTranscriptionResult, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, GEMINI_API_KEY, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MFile, MMember, MONGO_DB, MONGO_URI, MOrg, MToken, MUser, MUserRole, MVerification, PAYPAL_API_URL, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PORT, PhonemeMatchOptions, PhonemeMatchResult, 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, TCounter, TFile, TMember, TOrg, TPSGC, TPermission, TPermissionGroup, TRole, TToken, 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, schemaOrg, schemaPSGC, schemaPermission, schemaPermissionGroup, schemaPermissionGroupUpdate, schemaPermissionUpdate, schemaRole, schemaRoleUpdate, transactionSchema, useAddressController, useAddressRepo, useAppController, useAppRepo, useAppService, useAudioTranscriptionController, useAuthController, useAuthService, useCounterModel, useCounterRepo, useFileController, useFileRepo, useFileService, useGeminiAiService, useGitHubService, useMemberController, useMemberRepo, useOrgController, useOrgRepo, useOrgService, usePSGCController, usePSGCRepo, usePermissionController, usePermissionGroupController, usePermissionGroupRepo, usePermissionGroupService, usePermissionRepo, usePermissionService, useRoleController, useRoleRepo, useRoleService, useTokenRepo, useTranscribeService, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService };
|