@goweekdays/core 1.3.1 → 1.3.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +84 -1
- package/dist/index.js +773 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +780 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2305,6 +2305,89 @@ declare function usePropertyController(): {
|
|
|
2305
2305
|
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2306
2306
|
};
|
|
2307
2307
|
|
|
2308
|
+
type TUnitType = {
|
|
2309
|
+
_id?: ObjectId;
|
|
2310
|
+
unitName: string;
|
|
2311
|
+
unitDescription: string;
|
|
2312
|
+
maxOccupants: number;
|
|
2313
|
+
amenities?: Array<string>;
|
|
2314
|
+
pricePerNight: string;
|
|
2315
|
+
pricePerMonth: string;
|
|
2316
|
+
imageGallery: Array<object>;
|
|
2317
|
+
propertyId: ObjectId;
|
|
2318
|
+
status?: string;
|
|
2319
|
+
createdAt?: Date;
|
|
2320
|
+
updatedAt?: Date;
|
|
2321
|
+
deletedAt?: Date;
|
|
2322
|
+
};
|
|
2323
|
+
declare const schemaUnitType: Joi.ObjectSchema<any>;
|
|
2324
|
+
declare const schemaUnitTypeUpdate: Joi.ObjectSchema<any>;
|
|
2325
|
+
declare function modelUnitType(value: TUnitType): TUnitType;
|
|
2326
|
+
|
|
2327
|
+
declare function useUnitTypeRepo(): {
|
|
2328
|
+
createIndex: () => Promise<void>;
|
|
2329
|
+
add: (value: TUnitType, session?: ClientSession) => Promise<ObjectId>;
|
|
2330
|
+
getAll: ({ page, limit, status, search, }?: {
|
|
2331
|
+
page?: number | undefined;
|
|
2332
|
+
limit?: number | undefined;
|
|
2333
|
+
status?: string | undefined;
|
|
2334
|
+
search?: string | undefined;
|
|
2335
|
+
}) => Promise<{}>;
|
|
2336
|
+
getById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | TUnitType>;
|
|
2337
|
+
getByPropertyId: (propertyId: string) => Promise<mongodb.WithId<bson.Document>[]>;
|
|
2338
|
+
deleteById: (_id: string | ObjectId) => Promise<mongodb.DeleteResult>;
|
|
2339
|
+
updateById: (_id: string | ObjectId, value: TUnitType, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
declare function useUnitTypeController(): {
|
|
2343
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2344
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2345
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2346
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2347
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2348
|
+
getByPropertyId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2349
|
+
};
|
|
2350
|
+
|
|
2351
|
+
type TInventory = {
|
|
2352
|
+
_id?: ObjectId;
|
|
2353
|
+
unitNumber: string;
|
|
2354
|
+
floorNumber: string;
|
|
2355
|
+
propertyId: ObjectId;
|
|
2356
|
+
unitTypeId: ObjectId;
|
|
2357
|
+
ownerId: string;
|
|
2358
|
+
pricePerNight?: string;
|
|
2359
|
+
pricePerMonth?: string;
|
|
2360
|
+
status?: string;
|
|
2361
|
+
availableDays: Array<string>;
|
|
2362
|
+
createdAt?: Date;
|
|
2363
|
+
updatedAt?: Date;
|
|
2364
|
+
deletedAt?: Date;
|
|
2365
|
+
};
|
|
2366
|
+
declare const schemaInventory: Joi.ObjectSchema<any>;
|
|
2367
|
+
declare function modelInventory(value: TInventory): TInventory;
|
|
2368
|
+
|
|
2369
|
+
declare function useInventoryRepo(): {
|
|
2370
|
+
createIndex: () => Promise<void>;
|
|
2371
|
+
add: (value: TInventory, session?: ClientSession) => Promise<ObjectId>;
|
|
2372
|
+
getAll: ({ page, limit, status, search, }?: {
|
|
2373
|
+
page?: number | undefined;
|
|
2374
|
+
limit?: number | undefined;
|
|
2375
|
+
status?: string | undefined;
|
|
2376
|
+
search?: string | undefined;
|
|
2377
|
+
}) => Promise<{}>;
|
|
2378
|
+
getById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document> | TInventory>;
|
|
2379
|
+
deleteById: (_id: string | ObjectId) => Promise<mongodb.DeleteResult>;
|
|
2380
|
+
updateById: (_id: string | ObjectId, value: TInventory, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
declare function useInventoryController(): {
|
|
2384
|
+
add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2385
|
+
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2386
|
+
getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2387
|
+
updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2388
|
+
deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2308
2391
|
declare function usePaypalService(): {
|
|
2309
2392
|
createInvoice: (data: {
|
|
2310
2393
|
invoiceNumber?: string | undefined;
|
|
@@ -2363,4 +2446,4 @@ declare const XENDIT_SECRET_KEY: string;
|
|
|
2363
2446
|
declare const XENDIT_BASE_URL: string;
|
|
2364
2447
|
declare const DOMAIN: string;
|
|
2365
2448
|
|
|
2366
|
-
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRole, MSubscription, MToken, MUser, MUserRole, MVerification, 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, TBillingRecipient, TCounter, TEntity, TFile, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPrice, TPriceType, TPromoCode, TPromoTier, TProperty, TRole, TSubscription, TToken, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelProperty, schema, schemaProperty, schemaPropertyUpdate, useAddressController, useAddressRepo, useAuthController, useAuthService, useCounterModel, useCounterRepo, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, usePropertyController, usePropertyRepo, useRoleController, useRoleRepo, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
|
|
2449
|
+
export { ACCESS_TOKEN_EXPIRY, ACCESS_TOKEN_SECRET, APP_ACCOUNT, APP_MAIN, CardPayment, CardPaymentSchema, DEFAULT_USER_EMAIL, DEFAULT_USER_FIRST_NAME, DEFAULT_USER_LAST_NAME, DEFAULT_USER_PASSWORD, DOMAIN, DirectDebit, DirectDebitSchema, EWalletPayment, EWalletPaymentSchema, MAILER_EMAIL, MAILER_PASSWORD, MAILER_TRANSPORT_HOST, MAILER_TRANSPORT_PORT, MAILER_TRANSPORT_SECURE, MAddress, MEntity, MFile, MMember, MONGO_DB, MONGO_URI, MOrder, MOrg, MPaymentMethod, MPromoCode, MRole, MSubscription, MToken, MUser, MUserRole, MVerification, 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, TBillingRecipient, TCounter, TEntity, TFile, TInventory, TInvoice, TMember, TMiniRole, TOrder, TOrderMetadata, TOrg, TPayment, TPaymentMethod$1 as TPaymentMethod, TPaymentMethodType, TPrice, TPriceType, TPromoCode, TPromoTier, TProperty, TRole, TSubscription, TToken, TUnitType, TUser, TUserRole, TVerification, TVerificationMetadata, VERIFICATION_FORGET_PASSWORD_DURATION, VERIFICATION_USER_INVITE_DURATION, XENDIT_BASE_URL, XENDIT_SECRET_KEY, addressSchema, isDev, modelInventory, modelProperty, modelUnitType, schema, schemaInventory, schemaProperty, schemaPropertyUpdate, schemaUnitType, schemaUnitTypeUpdate, useAddressController, useAddressRepo, useAuthController, useAuthService, useCounterModel, useCounterRepo, useEntityController, useEntityRepo, useFileController, useFileRepo, useFileService, useInventoryController, useInventoryRepo, useInvoiceController, useInvoiceModel, useInvoiceRepo, useInvoiceService, useMemberController, useMemberRepo, useOrderController, useOrderRepo, useOrgController, useOrgRepo, useOrgService, usePaymentController, usePaymentMethodController, usePaymentMethodRepo, usePaymentMethodService, usePaymentModel, usePaymentRepo, usePaypalService, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, usePropertyController, usePropertyRepo, useRoleController, useRoleRepo, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useTokenRepo, useUnitTypeController, useUnitTypeRepo, useUserController, useUserRepo, useUserService, useUtilController, useVerificationController, useVerificationRepo, useVerificationService, useXenditService, validateCardPayment, validateDirectDebit, validateEWalletPayment };
|