storemw-core-api 1.0.142 → 1.0.144

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.
Files changed (92) hide show
  1. package/dist/app.js +1 -0
  2. package/dist/app.js.map +1 -1
  3. package/dist/controllers/index.d.ts +2 -0
  4. package/dist/controllers/index.js +13 -2
  5. package/dist/controllers/index.js.map +1 -1
  6. package/dist/controllers/subscription/account/accountSubscribeController.d.ts +9 -0
  7. package/dist/controllers/subscription/account/accountSubscribeController.js +105 -0
  8. package/dist/controllers/subscription/account/accountSubscribeController.js.map +1 -0
  9. package/dist/controllers/subscription/plan/subscribePlanController.d.ts +11 -0
  10. package/dist/controllers/subscription/plan/subscribePlanController.js +163 -0
  11. package/dist/controllers/subscription/plan/subscribePlanController.js.map +1 -0
  12. package/dist/features/auth_token/authTokenRegister.d.ts +5 -0
  13. package/dist/features/auth_token/authTokenRegister.js +11 -0
  14. package/dist/features/auth_token/authTokenRegister.js.map +1 -0
  15. package/dist/features/auth_token/authTokenRegistry.d.ts +2 -0
  16. package/dist/features/auth_token/authTokenRegistry.js +16 -0
  17. package/dist/features/auth_token/authTokenRegistry.js.map +1 -0
  18. package/dist/features/auth_token/authTokenType.d.ts +5 -0
  19. package/dist/features/auth_token/authTokenType.js +3 -0
  20. package/dist/features/auth_token/authTokenType.js.map +1 -0
  21. package/dist/features/index.d.ts +3 -0
  22. package/dist/features/index.js +5 -1
  23. package/dist/features/index.js.map +1 -1
  24. package/dist/middlewares/route/index.d.ts +2 -0
  25. package/dist/middlewares/route/index.js +13 -2
  26. package/dist/middlewares/route/index.js.map +1 -1
  27. package/dist/middlewares/route/validateSubscriptionAccount.d.ts +5 -0
  28. package/dist/middlewares/route/validateSubscriptionAccount.js +20 -0
  29. package/dist/middlewares/route/validateSubscriptionAccount.js.map +1 -0
  30. package/dist/middlewares/route/validateSubscriptionPlan.d.ts +6 -0
  31. package/dist/middlewares/route/validateSubscriptionPlan.js +24 -0
  32. package/dist/middlewares/route/validateSubscriptionPlan.js.map +1 -0
  33. package/dist/models/index.d.ts +5 -1
  34. package/dist/models/index.js +8 -2
  35. package/dist/models/index.js.map +1 -1
  36. package/dist/models/subscription/account/AccountSubscribeModel.d.ts +257 -0
  37. package/dist/models/subscription/account/AccountSubscribeModel.js +13 -0
  38. package/dist/models/subscription/account/AccountSubscribeModel.js.map +1 -0
  39. package/dist/models/subscription/plan/SubscribePlanModel.d.ts +257 -0
  40. package/dist/models/subscription/plan/SubscribePlanModel.js +13 -0
  41. package/dist/models/subscription/plan/SubscribePlanModel.js.map +1 -0
  42. package/dist/routes/index.d.ts +1 -0
  43. package/dist/routes/index.js +3 -1
  44. package/dist/routes/index.js.map +1 -1
  45. package/dist/routes/subscription/subscriptionsAccountRoutes.d.ts +2 -0
  46. package/dist/routes/subscription/subscriptionsAccountRoutes.js +15 -0
  47. package/dist/routes/subscription/subscriptionsAccountRoutes.js.map +1 -0
  48. package/dist/routes/subscription/subscriptionsAccountsRoutes.d.ts +2 -0
  49. package/dist/routes/subscription/subscriptionsAccountsRoutes.js +11 -0
  50. package/dist/routes/subscription/subscriptionsAccountsRoutes.js.map +1 -0
  51. package/dist/routes/subscription/subscriptionsPlanRoutes.d.ts +2 -0
  52. package/dist/routes/subscription/subscriptionsPlanRoutes.js +15 -0
  53. package/dist/routes/subscription/subscriptionsPlanRoutes.js.map +1 -0
  54. package/dist/routes/subscription/subscriptionsPlansRoutes.d.ts +2 -0
  55. package/dist/routes/subscription/subscriptionsPlansRoutes.js +13 -0
  56. package/dist/routes/subscription/subscriptionsPlansRoutes.js.map +1 -0
  57. package/dist/routes/subscription/subscriptionsRoutes.d.ts +2 -0
  58. package/dist/routes/subscription/subscriptionsRoutes.js +17 -0
  59. package/dist/routes/subscription/subscriptionsRoutes.js.map +1 -0
  60. package/dist/schema/middleware/route/index.d.ts +4 -0
  61. package/dist/schema/middleware/route/index.js +5 -1
  62. package/dist/schema/middleware/route/index.js.map +1 -1
  63. package/dist/schema/middleware/route/schemaSubscriptionAccount.d.ts +4 -0
  64. package/dist/schema/middleware/route/schemaSubscriptionAccount.js +10 -0
  65. package/dist/schema/middleware/route/schemaSubscriptionAccount.js.map +1 -0
  66. package/dist/schema/middleware/route/schemaSubscriptionPlan.d.ts +4 -0
  67. package/dist/schema/middleware/route/schemaSubscriptionPlan.js +10 -0
  68. package/dist/schema/middleware/route/schemaSubscriptionPlan.js.map +1 -0
  69. package/dist/schema/payload/index.d.ts +4 -0
  70. package/dist/schema/payload/index.js +9 -2
  71. package/dist/schema/payload/index.js.map +1 -1
  72. package/dist/schema/payload/subscription/schemaAccountSubscribe.d.ts +126 -0
  73. package/dist/schema/payload/subscription/schemaAccountSubscribe.js +31 -0
  74. package/dist/schema/payload/subscription/schemaAccountSubscribe.js.map +1 -0
  75. package/dist/schema/payload/subscription/schemaSubscribePlan.d.ts +259 -0
  76. package/dist/schema/payload/subscription/schemaSubscribePlan.js +41 -0
  77. package/dist/schema/payload/subscription/schemaSubscribePlan.js.map +1 -0
  78. package/dist/services/auth/AuthService.d.ts +8 -7
  79. package/dist/services/auth/AuthService.js +6 -1
  80. package/dist/services/auth/AuthService.js.map +1 -1
  81. package/dist/services/index.d.ts +5 -1
  82. package/dist/services/index.js +7 -1
  83. package/dist/services/index.js.map +1 -1
  84. package/dist/services/others/NumberDateSequenceService.d.ts +1 -1
  85. package/dist/services/subscription/account/AccountSubscribeService.d.ts +43 -0
  86. package/dist/services/subscription/account/AccountSubscribeService.js +193 -0
  87. package/dist/services/subscription/account/AccountSubscribeService.js.map +1 -0
  88. package/dist/services/subscription/plan/SubscribePlanService.d.ts +63 -0
  89. package/dist/services/subscription/plan/SubscribePlanService.js +175 -0
  90. package/dist/services/subscription/plan/SubscribePlanService.js.map +1 -0
  91. package/package.json +21 -11
  92. package/prisma/schema.prisma +40 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/payload/index.ts"],"names":[],"mappings":";;;;AAAA,0DA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AA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,gHAAA,UAAU,OAAA;AAGtH,+EAAkK;AAAzJ,0IAAA,kCAAkC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAGjH,oEAAoJ;AAA3I,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAE7G,gEAA4I;AAAnI,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAEvG,8DAAyI;AAAhI,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAGpG,4FAA4F;AAC5F,iGAAiG;AACjG,mEAAyH;AAAhH,yIAAA,kCAAkC,OAAA;AAAE,6IAAA,sCAAsC,OAAA","sourcesContent":["export { schemaAuthTokenPayload, schemaAuthTokenOptionalAccountPayload, schemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\nexport type { SchemaAuthTokenPayload, SchemaAuthTokenOptionalAccountPayload, SchemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\n\nexport { schemaAccessKeyCreatePayload, schemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\nexport type { SchemaAccessKeyCreatePayload, SchemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\n\nexport { schemaResetPasswordRequestPayload, schemaResetPasswordValidateCodePayload, schemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\nexport type { SchemaResetPasswordRequestPayload, SchemaResetPasswordValidateCodePayload, SchemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\n\nexport { schemaAccountCreatePayload, schemaAccountUpdatePayload, schemaAccountDeletePayload } from \"./account/schemaAccount\";\nexport type { SchemaAccountCreatePayload, SchemaAccountUpdatePayload, SchemaAccountDeletePayload } from \"./account/schemaAccount\";\n\nexport { schemaBusinessCreatePayload, schemaBusiness, schemaBusinessUpdatePayload, schemaBusinessDeletePayload } from \"./business/schemaBusiness\";\nexport type { SchemaBusinessCreatePayload, SchemaBusinessUpdatePayload, SchemaBusinessDeletePayload } from \"./business/schemaBusiness\";\n\nexport { schemaUserDeletePayload, schemaUserCredential } from \"./user/schemaUser\";\nexport type { SchemaUserDeletePayload } from \"./user/schemaUser\";\nexport { schemaUserMeChangePasswordPayload, schemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport type { SchemaUserMeChangePasswordPayload, SchemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport { schemaUserOperatorCreatePayload, schemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport type { SchemaUserOperatorCreatePayload, SchemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport { schemaUserCustomerCreatePayload, schemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport type { SchemaUserCustomerCreatePayload, SchemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport { schemaUserRetailerCreatePayload, schemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport type { SchemaUserRetailerCreatePayload, SchemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport { schemaUserAdministratorCreatePayload, schemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport type { SchemaUserAdministratorCreatePayload, SchemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport { schemaUserWorkerCreatePayload, schemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport type { SchemaUserWorkerCreatePayload, SchemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport { schemaUserDriverCreatePayload, schemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport type { SchemaUserDriverCreatePayload, SchemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport { schemaUserMemberCreatePayload, schemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport type { SchemaUserMemberCreatePayload, SchemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport { schemaUserAgentCreatePayload, schemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\nexport type { SchemaUserAgentCreatePayload, SchemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\n\nexport { schemaFileUploadPayload, schemaFileDeletePayload } from \"./file/schemaFile\";\nexport type { SchemaFileUploadPayload, SchemaFileDeletePayload } from \"./file/schemaFile\";\n\nexport { schemaDocumentDeletePayload, eNumDocumentTypes } from \"./document/schemaDocument\";\nexport type { SchemaDocumentDeletePayload } from \"./document/schemaDocument\";\nexport { schemaDocumentSalesOrderCreatePayload, schemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport type { SchemaDocumentSalesOrderCreatePayload, SchemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport { schemaDocumentProformaSalesCreatePayload, schemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport type { SchemaDocumentProformaSalesCreatePayload, SchemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport { schemaDocumentDeliveryOrderCreatePayload, schemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport type { SchemaDocumentDeliveryOrderCreatePayload, SchemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport { schemaDocumentReplacementDeliveryOrderCreatePayload, schemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport type { SchemaDocumentReplacementDeliveryOrderCreatePayload, SchemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport { schemaDocumentCashSalesCreatePayload, schemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport type { SchemaDocumentCashSalesCreatePayload, SchemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport { schemaDocumentTripOrderCreatePayload, schemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\nexport type { SchemaDocumentTripOrderCreatePayload, SchemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\n\nexport { schemaItemDeletePayload } from \"./item/schemaItem\";\nexport type { SchemaItemDeletePayload } from \"./item/schemaItem\";\nexport { schemaItemProductCreatePayload, schemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport type { SchemaItemProductCreatePayload, SchemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport { schemaItemItemCreatePayload, schemaItemItemUpdatePayload, schemaItemItem } from \"./item/schemaItemItem\";\nexport type { SchemaItemItemCreatePayload, SchemaItemItemUpdatePayload } from \"./item/schemaItemItem\";\nexport { schemaItemCategoryCreatePayload, schemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport type { SchemaItemCategoryCreatePayload, SchemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport { schemaItemBrandCreatePayload, schemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport type { SchemaItemBrandCreatePayload, SchemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport { schemaItemUomCreatePayload, schemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\nexport type { SchemaItemUomCreatePayload, SchemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\n\nexport { schemaLocationLocationCreatePayload, schemaLocationLocationUpdatePayload, schemaLocationLocationDeletePayload, } from \"./location/schemaLocationLocation\";\nexport type { SchemaLocationLocationCreatePayload, SchemaLocationLocationUpdatePayload, SchemaLocationLocationDeletePayload } from \"./location/schemaLocationLocation\";\nexport { schemaLocationRackCreatePayload, schemaLocationRackUpdatePayload, schemaLocationRackDeletePayload, } from \"./location/schemaLocationRack\";\nexport type { SchemaLocationRackCreatePayload, SchemaLocationRackUpdatePayload, SchemaLocationRackDeletePayload } from \"./location/schemaLocationRack\";\nexport { schemaLocationSlotCreatePayload, schemaLocationSlotUpdatePayload, schemaLocationSlotDeletePayload, schemaSlot } from \"./location/schemaLocationSlot\";\nexport type { SchemaLocationSlotCreatePayload, SchemaLocationSlotUpdatePayload, SchemaLocationSlotDeletePayload } from \"./location/schemaLocationSlot\";\n\nexport { schemaInjectionFieldReplacePayload, schemaInjectionFieldCreatePayload, schemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\nexport type { SchemaInjectionFieldReplacePayload, SchemaInjectionFieldCreatePayload, SchemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\n\nexport { schemaRegionCountryCreatePayload, schemaRegionCountryUpdatePayload, schemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport type { SchemaRegionCountryCreatePayload, SchemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport { schemaRegionStateCreatePayload, schemaRegionStateDeletePayload, schemaRegionStateUpdatePayload } from \"./region/schemaRegionState\";\nexport type { SchemaRegionStateCreatePayload, SchemaRegionStateDeletePayload } from \"./region/schemaRegionState\";\nexport { schemaRegionAreaCreatePayload, schemaRegionAreaDeletePayload, schemaRegionAreaUpdatePayload, } from \"./region/schemaRegionArea\";\nexport type { SchemaRegionAreaCreatePayload, SchemaRegionAreaDeletePayload, SchemaRegionAreaUpdatePayload } from \"./region/schemaRegionArea\";\n\n// export { schemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\n// export type { SchemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\nexport { schemaAccessKeyUtilValidatePayload, schemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";\nexport type { SchemaAccessKeyUtilValidatePayload, SchemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/payload/index.ts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CAAmC,OAAA;AAAE,6IAAA,mCAAmC,OAAA;AAEtH,oEAAmJ;AAA1I,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAE1G,oEAA8J;AAArJ,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,gHAAA,UAAU,OAAA;AAGtH,+EAAkK;AAAzJ,0IAAA,kCAAkC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAGjH,oEAAoJ;AAA3I,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAE7G,gEAA4I;AAAnI,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAEvG,8DAAyI;AAAhI,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAGpG,4FAA4F;AAC5F,iGAAiG;AACjG,mEAAyH;AAAhH,yIAAA,kCAAkC,OAAA;AAAE,6IAAA,sCAAsC,OAAA","sourcesContent":["export { schemaAuthTokenPayload, schemaAuthTokenOptionalAccountPayload, schemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\nexport type { SchemaAuthTokenPayload, SchemaAuthTokenOptionalAccountPayload, SchemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\n\nexport { schemaAccessKeyCreatePayload, schemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\nexport type { SchemaAccessKeyCreatePayload, SchemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\n\nexport { schemaResetPasswordRequestPayload, schemaResetPasswordValidateCodePayload, schemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\nexport type { SchemaResetPasswordRequestPayload, SchemaResetPasswordValidateCodePayload, SchemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\n\nexport { schemaAccountCreatePayload, schemaAccountUpdatePayload, schemaAccountDeletePayload } from \"./account/schemaAccount\";\nexport type { SchemaAccountCreatePayload, SchemaAccountUpdatePayload, SchemaAccountDeletePayload } from \"./account/schemaAccount\";\n\nexport { schemaBusinessCreatePayload, schemaBusiness, schemaBusinessUpdatePayload, schemaBusinessDeletePayload } from \"./business/schemaBusiness\";\nexport type { SchemaBusinessCreatePayload, SchemaBusinessUpdatePayload, SchemaBusinessDeletePayload } from \"./business/schemaBusiness\";\n\nexport { schemaSubscribePlanCreatePayload, schemaSubscribePlanUpdatePayload, schemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport type { SchemaSubscribePlanCreatePayload, SchemaSubscribePlanUpdatePayload, SchemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport { schemaAccountSubscribeCreatePayload, schemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\nexport type { SchemaAccountSubscribeCreatePayload, SchemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\n\nexport { schemaUserDeletePayload, schemaUserCredential } from \"./user/schemaUser\";\nexport type { SchemaUserDeletePayload } from \"./user/schemaUser\";\nexport { schemaUserMeChangePasswordPayload, schemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport type { SchemaUserMeChangePasswordPayload, SchemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport { schemaUserOperatorCreatePayload, schemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport type { SchemaUserOperatorCreatePayload, SchemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport { schemaUserCustomerCreatePayload, schemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport type { SchemaUserCustomerCreatePayload, SchemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport { schemaUserRetailerCreatePayload, schemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport type { SchemaUserRetailerCreatePayload, SchemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport { schemaUserAdministratorCreatePayload, schemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport type { SchemaUserAdministratorCreatePayload, SchemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport { schemaUserWorkerCreatePayload, schemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport type { SchemaUserWorkerCreatePayload, SchemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport { schemaUserDriverCreatePayload, schemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport type { SchemaUserDriverCreatePayload, SchemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport { schemaUserMemberCreatePayload, schemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport type { SchemaUserMemberCreatePayload, SchemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport { schemaUserAgentCreatePayload, schemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\nexport type { SchemaUserAgentCreatePayload, SchemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\n\nexport { schemaFileUploadPayload, schemaFileDeletePayload } from \"./file/schemaFile\";\nexport type { SchemaFileUploadPayload, SchemaFileDeletePayload } from \"./file/schemaFile\";\n\nexport { schemaDocumentDeletePayload, eNumDocumentTypes } from \"./document/schemaDocument\";\nexport type { SchemaDocumentDeletePayload } from \"./document/schemaDocument\";\nexport { schemaDocumentSalesOrderCreatePayload, schemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport type { SchemaDocumentSalesOrderCreatePayload, SchemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport { schemaDocumentProformaSalesCreatePayload, schemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport type { SchemaDocumentProformaSalesCreatePayload, SchemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport { schemaDocumentDeliveryOrderCreatePayload, schemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport type { SchemaDocumentDeliveryOrderCreatePayload, SchemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport { schemaDocumentReplacementDeliveryOrderCreatePayload, schemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport type { SchemaDocumentReplacementDeliveryOrderCreatePayload, SchemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport { schemaDocumentCashSalesCreatePayload, schemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport type { SchemaDocumentCashSalesCreatePayload, SchemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport { schemaDocumentTripOrderCreatePayload, schemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\nexport type { SchemaDocumentTripOrderCreatePayload, SchemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\n\nexport { schemaItemDeletePayload } from \"./item/schemaItem\";\nexport type { SchemaItemDeletePayload } from \"./item/schemaItem\";\nexport { schemaItemProductCreatePayload, schemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport type { SchemaItemProductCreatePayload, SchemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport { schemaItemItemCreatePayload, schemaItemItemUpdatePayload, schemaItemItem } from \"./item/schemaItemItem\";\nexport type { SchemaItemItemCreatePayload, SchemaItemItemUpdatePayload } from \"./item/schemaItemItem\";\nexport { schemaItemCategoryCreatePayload, schemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport type { SchemaItemCategoryCreatePayload, SchemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport { schemaItemBrandCreatePayload, schemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport type { SchemaItemBrandCreatePayload, SchemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport { schemaItemUomCreatePayload, schemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\nexport type { SchemaItemUomCreatePayload, SchemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\n\nexport { schemaLocationLocationCreatePayload, schemaLocationLocationUpdatePayload, schemaLocationLocationDeletePayload, } from \"./location/schemaLocationLocation\";\nexport type { SchemaLocationLocationCreatePayload, SchemaLocationLocationUpdatePayload, SchemaLocationLocationDeletePayload } from \"./location/schemaLocationLocation\";\nexport { schemaLocationRackCreatePayload, schemaLocationRackUpdatePayload, schemaLocationRackDeletePayload, } from \"./location/schemaLocationRack\";\nexport type { SchemaLocationRackCreatePayload, SchemaLocationRackUpdatePayload, SchemaLocationRackDeletePayload } from \"./location/schemaLocationRack\";\nexport { schemaLocationSlotCreatePayload, schemaLocationSlotUpdatePayload, schemaLocationSlotDeletePayload, schemaSlot } from \"./location/schemaLocationSlot\";\nexport type { SchemaLocationSlotCreatePayload, SchemaLocationSlotUpdatePayload, SchemaLocationSlotDeletePayload } from \"./location/schemaLocationSlot\";\n\nexport { schemaInjectionFieldReplacePayload, schemaInjectionFieldCreatePayload, schemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\nexport type { SchemaInjectionFieldReplacePayload, SchemaInjectionFieldCreatePayload, SchemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\n\nexport { schemaRegionCountryCreatePayload, schemaRegionCountryUpdatePayload, schemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport type { SchemaRegionCountryCreatePayload, SchemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport { schemaRegionStateCreatePayload, schemaRegionStateDeletePayload, schemaRegionStateUpdatePayload } from \"./region/schemaRegionState\";\nexport type { SchemaRegionStateCreatePayload, SchemaRegionStateDeletePayload } from \"./region/schemaRegionState\";\nexport { schemaRegionAreaCreatePayload, schemaRegionAreaDeletePayload, schemaRegionAreaUpdatePayload, } from \"./region/schemaRegionArea\";\nexport type { SchemaRegionAreaCreatePayload, SchemaRegionAreaDeletePayload, SchemaRegionAreaUpdatePayload } from \"./region/schemaRegionArea\";\n\n// export { schemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\n// export type { SchemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\nexport { schemaAccessKeyUtilValidatePayload, schemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";\nexport type { SchemaAccessKeyUtilValidatePayload, SchemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";"]}
@@ -0,0 +1,126 @@
1
+ import { z } from "zod";
2
+ export declare const schemePayloadScope: z.ZodObject<{
3
+ target: z.ZodLiteral<"account_subscription">;
4
+ action: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ target: "account_subscription";
7
+ action: string;
8
+ }, {
9
+ target: "account_subscription";
10
+ action: string;
11
+ }>;
12
+ export declare const schemaAccountSubscribe: z.ZodObject<{
13
+ accountId: z.ZodNumber;
14
+ subscribePlanId: z.ZodNumber;
15
+ subscriptionStartDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ accountId: number;
18
+ subscribePlanId: number;
19
+ subscriptionStartDate?: string | undefined;
20
+ }, {
21
+ accountId: number;
22
+ subscribePlanId: number;
23
+ subscriptionStartDate?: string | undefined;
24
+ }>;
25
+ /** Create */
26
+ export declare const schemaAccountSubscribeCreatePayload: z.ZodObject<{
27
+ scope: z.ZodObject<{
28
+ target: z.ZodLiteral<"account_subscription">;
29
+ action: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ target: "account_subscription";
32
+ action: string;
33
+ }, {
34
+ target: "account_subscription";
35
+ action: string;
36
+ }>;
37
+ payload: z.ZodObject<{
38
+ accountSubscription: z.ZodObject<{
39
+ accountId: z.ZodNumber;
40
+ subscribePlanId: z.ZodNumber;
41
+ subscriptionStartDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ accountId: number;
44
+ subscribePlanId: number;
45
+ subscriptionStartDate?: string | undefined;
46
+ }, {
47
+ accountId: number;
48
+ subscribePlanId: number;
49
+ subscriptionStartDate?: string | undefined;
50
+ }>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ accountSubscription: {
53
+ accountId: number;
54
+ subscribePlanId: number;
55
+ subscriptionStartDate?: string | undefined;
56
+ };
57
+ }, {
58
+ accountSubscription: {
59
+ accountId: number;
60
+ subscribePlanId: number;
61
+ subscriptionStartDate?: string | undefined;
62
+ };
63
+ }>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ scope: {
66
+ target: "account_subscription";
67
+ action: string;
68
+ };
69
+ payload: {
70
+ accountSubscription: {
71
+ accountId: number;
72
+ subscribePlanId: number;
73
+ subscriptionStartDate?: string | undefined;
74
+ };
75
+ };
76
+ }, {
77
+ scope: {
78
+ target: "account_subscription";
79
+ action: string;
80
+ };
81
+ payload: {
82
+ accountSubscription: {
83
+ accountId: number;
84
+ subscribePlanId: number;
85
+ subscriptionStartDate?: string | undefined;
86
+ };
87
+ };
88
+ }>;
89
+ export type SchemaAccountSubscribeCreatePayload = z.infer<typeof schemaAccountSubscribeCreatePayload>;
90
+ /** Cancel */
91
+ export declare const schemaAccountSubscribeCancelPayload: z.ZodObject<{
92
+ scope: z.ZodObject<{
93
+ target: z.ZodLiteral<"account_subscription">;
94
+ action: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ target: "account_subscription";
97
+ action: string;
98
+ }, {
99
+ target: "account_subscription";
100
+ action: string;
101
+ }>;
102
+ payload: z.ZodObject<{
103
+ id: z.ZodNumber;
104
+ }, "strip", z.ZodTypeAny, {
105
+ id: number;
106
+ }, {
107
+ id: number;
108
+ }>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ scope: {
111
+ target: "account_subscription";
112
+ action: string;
113
+ };
114
+ payload: {
115
+ id: number;
116
+ };
117
+ }, {
118
+ scope: {
119
+ target: "account_subscription";
120
+ action: string;
121
+ };
122
+ payload: {
123
+ id: number;
124
+ };
125
+ }>;
126
+ export type SchemaAccountSubscribeCancelPayload = z.infer<typeof schemaAccountSubscribeCancelPayload>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemaAccountSubscribeCancelPayload = exports.schemaAccountSubscribeCreatePayload = exports.schemaAccountSubscribe = exports.schemePayloadScope = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.schemePayloadScope = zod_1.z.object({
6
+ target: zod_1.z.literal("account_subscription"),
7
+ action: zod_1.z.string(),
8
+ });
9
+ exports.schemaAccountSubscribe = zod_1.z.object({
10
+ accountId: zod_1.z.number().min(1),
11
+ subscribePlanId: zod_1.z.number().min(1),
12
+ subscriptionStartDate: zod_1.z
13
+ .string()
14
+ .refine((val) => !isNaN(new Date(val).getTime()), { message: "Invalid date string. Example of valid ISO date: '2026-03-10T00:00:00Z'" })
15
+ .optional(),
16
+ });
17
+ /** Create */
18
+ exports.schemaAccountSubscribeCreatePayload = zod_1.z.object({
19
+ scope: exports.schemePayloadScope,
20
+ payload: zod_1.z.object({
21
+ accountSubscription: exports.schemaAccountSubscribe
22
+ })
23
+ });
24
+ /** Cancel */
25
+ exports.schemaAccountSubscribeCancelPayload = zod_1.z.object({
26
+ scope: exports.schemePayloadScope,
27
+ payload: zod_1.z.object({
28
+ id: zod_1.z.number().min(1)
29
+ }),
30
+ });
31
+ //# sourceMappingURL=schemaAccountSubscribe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaAccountSubscribe.js","sourceRoot":"","sources":["../../../../src/schema/payload/subscription/schemaAccountSubscribe.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIX,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC;IACzC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,qBAAqB,EAAE,OAAC;SACnB,MAAM,EAAE;SACR,MAAM,CACH,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EACxC,EAAE,OAAO,EAAE,wEAAwE,EAAE,CACxF;SACA,QAAQ,EAAE;CAClB,CAAC,CAAA;AAEF,aAAa;AACA,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,KAAK,EAAE,0BAAkB;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,mBAAmB,EAAE,8BAAsB;KAC9C,CAAC;CACL,CAAC,CAAC;AAIH,aAAa;AACA,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,KAAK,EAAE,0BAAkB;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACxB,CAAC;CACL,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { _, dayjs } from \"@/utils\";\n\nexport const schemePayloadScope = z.object({\n target: z.literal(\"account_subscription\"),\n action: z.string(),\n})\n\nexport const schemaAccountSubscribe = z.object({\n accountId: z.number().min(1),\n subscribePlanId: z.number().min(1),\n subscriptionStartDate: z\n .string()\n .refine(\n (val) => !isNaN(new Date(val).getTime()),\n { message: \"Invalid date string. Example of valid ISO date: '2026-03-10T00:00:00Z'\" }\n )\n .optional(),\n})\n\n/** Create */\nexport const schemaAccountSubscribeCreatePayload = z.object({\n scope: schemePayloadScope,\n payload: z.object({\n accountSubscription: schemaAccountSubscribe\n })\n});\n\nexport type SchemaAccountSubscribeCreatePayload = z.infer<typeof schemaAccountSubscribeCreatePayload>;\n\n/** Cancel */\nexport const schemaAccountSubscribeCancelPayload = z.object({\n scope: schemePayloadScope,\n payload: z.object({\n id: z.number().min(1)\n }),\n});\n\nexport type SchemaAccountSubscribeCancelPayload = z.infer<typeof schemaAccountSubscribeCancelPayload>;"]}
@@ -0,0 +1,259 @@
1
+ import { z } from "zod";
2
+ export declare const schemePayloadScope: z.ZodObject<{
3
+ target: z.ZodLiteral<"subscribe_plan">;
4
+ action: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ target: "subscribe_plan";
7
+ action: string;
8
+ }, {
9
+ target: "subscribe_plan";
10
+ action: string;
11
+ }>;
12
+ export declare const schemaSubscribePlan: z.ZodObject<{
13
+ name: z.ZodString;
14
+ shortDescription: z.ZodString;
15
+ fullDescription: z.ZodString;
16
+ price: z.ZodNumber;
17
+ billingCycle: z.ZodEnum<["monthly" | "yearly", ...("monthly" | "yearly")[]]>;
18
+ currency: z.ZodEnum<["myr" | "usd", ...("myr" | "usd")[]]>;
19
+ status: z.ZodBoolean;
20
+ }, "strip", z.ZodTypeAny, {
21
+ status: boolean;
22
+ name: string;
23
+ price: number;
24
+ currency: "myr" | "usd";
25
+ shortDescription: string;
26
+ fullDescription: string;
27
+ billingCycle: "monthly" | "yearly";
28
+ }, {
29
+ status: boolean;
30
+ name: string;
31
+ price: number;
32
+ currency: "myr" | "usd";
33
+ shortDescription: string;
34
+ fullDescription: string;
35
+ billingCycle: "monthly" | "yearly";
36
+ }>;
37
+ /** Create */
38
+ export declare const schemaSubscribePlanCreatePayload: z.ZodObject<{
39
+ scope: z.ZodObject<{
40
+ target: z.ZodLiteral<"subscribe_plan">;
41
+ action: z.ZodString;
42
+ }, "strip", z.ZodTypeAny, {
43
+ target: "subscribe_plan";
44
+ action: string;
45
+ }, {
46
+ target: "subscribe_plan";
47
+ action: string;
48
+ }>;
49
+ payload: z.ZodObject<{
50
+ subscribePlan: z.ZodObject<{
51
+ name: z.ZodString;
52
+ shortDescription: z.ZodString;
53
+ fullDescription: z.ZodString;
54
+ price: z.ZodNumber;
55
+ billingCycle: z.ZodEnum<["monthly" | "yearly", ...("monthly" | "yearly")[]]>;
56
+ currency: z.ZodEnum<["myr" | "usd", ...("myr" | "usd")[]]>;
57
+ status: z.ZodBoolean;
58
+ }, "strip", z.ZodTypeAny, {
59
+ status: boolean;
60
+ name: string;
61
+ price: number;
62
+ currency: "myr" | "usd";
63
+ shortDescription: string;
64
+ fullDescription: string;
65
+ billingCycle: "monthly" | "yearly";
66
+ }, {
67
+ status: boolean;
68
+ name: string;
69
+ price: number;
70
+ currency: "myr" | "usd";
71
+ shortDescription: string;
72
+ fullDescription: string;
73
+ billingCycle: "monthly" | "yearly";
74
+ }>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ subscribePlan: {
77
+ status: boolean;
78
+ name: string;
79
+ price: number;
80
+ currency: "myr" | "usd";
81
+ shortDescription: string;
82
+ fullDescription: string;
83
+ billingCycle: "monthly" | "yearly";
84
+ };
85
+ }, {
86
+ subscribePlan: {
87
+ status: boolean;
88
+ name: string;
89
+ price: number;
90
+ currency: "myr" | "usd";
91
+ shortDescription: string;
92
+ fullDescription: string;
93
+ billingCycle: "monthly" | "yearly";
94
+ };
95
+ }>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ scope: {
98
+ target: "subscribe_plan";
99
+ action: string;
100
+ };
101
+ payload: {
102
+ subscribePlan: {
103
+ status: boolean;
104
+ name: string;
105
+ price: number;
106
+ currency: "myr" | "usd";
107
+ shortDescription: string;
108
+ fullDescription: string;
109
+ billingCycle: "monthly" | "yearly";
110
+ };
111
+ };
112
+ }, {
113
+ scope: {
114
+ target: "subscribe_plan";
115
+ action: string;
116
+ };
117
+ payload: {
118
+ subscribePlan: {
119
+ status: boolean;
120
+ name: string;
121
+ price: number;
122
+ currency: "myr" | "usd";
123
+ shortDescription: string;
124
+ fullDescription: string;
125
+ billingCycle: "monthly" | "yearly";
126
+ };
127
+ };
128
+ }>;
129
+ export type SchemaSubscribePlanCreatePayload = z.infer<typeof schemaSubscribePlanCreatePayload>;
130
+ /** Update */
131
+ export declare const schemaSubscribePlanUpdatePayload: z.ZodObject<{
132
+ scope: z.ZodObject<{
133
+ target: z.ZodLiteral<"subscribe_plan">;
134
+ action: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ target: "subscribe_plan";
137
+ action: string;
138
+ }, {
139
+ target: "subscribe_plan";
140
+ action: string;
141
+ }>;
142
+ payload: z.ZodObject<{
143
+ subscribePlan: z.ZodObject<{
144
+ name: z.ZodString;
145
+ shortDescription: z.ZodString;
146
+ fullDescription: z.ZodString;
147
+ price: z.ZodNumber;
148
+ billingCycle: z.ZodEnum<["monthly" | "yearly", ...("monthly" | "yearly")[]]>;
149
+ currency: z.ZodEnum<["myr" | "usd", ...("myr" | "usd")[]]>;
150
+ status: z.ZodBoolean;
151
+ }, "strip", z.ZodTypeAny, {
152
+ status: boolean;
153
+ name: string;
154
+ price: number;
155
+ currency: "myr" | "usd";
156
+ shortDescription: string;
157
+ fullDescription: string;
158
+ billingCycle: "monthly" | "yearly";
159
+ }, {
160
+ status: boolean;
161
+ name: string;
162
+ price: number;
163
+ currency: "myr" | "usd";
164
+ shortDescription: string;
165
+ fullDescription: string;
166
+ billingCycle: "monthly" | "yearly";
167
+ }>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ subscribePlan: {
170
+ status: boolean;
171
+ name: string;
172
+ price: number;
173
+ currency: "myr" | "usd";
174
+ shortDescription: string;
175
+ fullDescription: string;
176
+ billingCycle: "monthly" | "yearly";
177
+ };
178
+ }, {
179
+ subscribePlan: {
180
+ status: boolean;
181
+ name: string;
182
+ price: number;
183
+ currency: "myr" | "usd";
184
+ shortDescription: string;
185
+ fullDescription: string;
186
+ billingCycle: "monthly" | "yearly";
187
+ };
188
+ }>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ scope: {
191
+ target: "subscribe_plan";
192
+ action: string;
193
+ };
194
+ payload: {
195
+ subscribePlan: {
196
+ status: boolean;
197
+ name: string;
198
+ price: number;
199
+ currency: "myr" | "usd";
200
+ shortDescription: string;
201
+ fullDescription: string;
202
+ billingCycle: "monthly" | "yearly";
203
+ };
204
+ };
205
+ }, {
206
+ scope: {
207
+ target: "subscribe_plan";
208
+ action: string;
209
+ };
210
+ payload: {
211
+ subscribePlan: {
212
+ status: boolean;
213
+ name: string;
214
+ price: number;
215
+ currency: "myr" | "usd";
216
+ shortDescription: string;
217
+ fullDescription: string;
218
+ billingCycle: "monthly" | "yearly";
219
+ };
220
+ };
221
+ }>;
222
+ export type SchemaSubscribePlanUpdatePayload = z.infer<typeof schemaSubscribePlanUpdatePayload>;
223
+ /** Delete */
224
+ export declare const schemaSubscribePlanDeletePayload: z.ZodObject<{
225
+ scope: z.ZodObject<{
226
+ target: z.ZodLiteral<"subscribe_plan">;
227
+ action: z.ZodString;
228
+ }, "strip", z.ZodTypeAny, {
229
+ target: "subscribe_plan";
230
+ action: string;
231
+ }, {
232
+ target: "subscribe_plan";
233
+ action: string;
234
+ }>;
235
+ payload: z.ZodObject<{
236
+ ids: z.ZodArray<z.ZodNumber, "many">;
237
+ }, "strip", z.ZodTypeAny, {
238
+ ids: number[];
239
+ }, {
240
+ ids: number[];
241
+ }>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ scope: {
244
+ target: "subscribe_plan";
245
+ action: string;
246
+ };
247
+ payload: {
248
+ ids: number[];
249
+ };
250
+ }, {
251
+ scope: {
252
+ target: "subscribe_plan";
253
+ action: string;
254
+ };
255
+ payload: {
256
+ ids: number[];
257
+ };
258
+ }>;
259
+ export type SchemaSubscribePlanDeletePayload = z.infer<typeof schemaSubscribePlanDeletePayload>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemaSubscribePlanDeletePayload = exports.schemaSubscribePlanUpdatePayload = exports.schemaSubscribePlanCreatePayload = exports.schemaSubscribePlan = exports.schemePayloadScope = void 0;
4
+ const zod_1 = require("zod");
5
+ const services_1 = require("../../../services");
6
+ const services_2 = require("../../../services");
7
+ exports.schemePayloadScope = zod_1.z.object({
8
+ target: zod_1.z.literal("subscribe_plan"),
9
+ action: zod_1.z.string(),
10
+ });
11
+ exports.schemaSubscribePlan = zod_1.z.object({
12
+ name: zod_1.z.string(),
13
+ shortDescription: zod_1.z.string(),
14
+ fullDescription: zod_1.z.string(),
15
+ price: zod_1.z.number(),
16
+ billingCycle: zod_1.z.enum(Object.values(services_1.subscribePlanBillingCycles)),
17
+ currency: zod_1.z.enum(Object.values(services_2.subscribeCurrencies)),
18
+ status: zod_1.z.boolean(),
19
+ });
20
+ /** Create */
21
+ exports.schemaSubscribePlanCreatePayload = zod_1.z.object({
22
+ scope: exports.schemePayloadScope,
23
+ payload: zod_1.z.object({
24
+ subscribePlan: exports.schemaSubscribePlan
25
+ })
26
+ });
27
+ /** Update */
28
+ exports.schemaSubscribePlanUpdatePayload = zod_1.z.object({
29
+ scope: exports.schemePayloadScope,
30
+ payload: zod_1.z.object({
31
+ subscribePlan: exports.schemaSubscribePlan
32
+ })
33
+ });
34
+ /** Delete */
35
+ exports.schemaSubscribePlanDeletePayload = zod_1.z.object({
36
+ scope: exports.schemePayloadScope,
37
+ payload: zod_1.z.object({
38
+ ids: zod_1.z.array(zod_1.z.number()).min(1, "ids must contain at least one number"),
39
+ }),
40
+ });
41
+ //# sourceMappingURL=schemaSubscribePlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaSubscribePlan.js","sourceRoot":"","sources":["../../../../src/schema/payload/subscription/schemaSubscribePl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CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;KAC1E,CAAC;CACL,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { _, dayjs } from \"@/utils\";\n\nimport { subscribePlanBillingCycles, SubscribePlanBillingCycle } from \"@/services\"\nimport { subscribeCurrencies, SubscribePlanCurrency } from \"@/services\"\n\nexport const schemePayloadScope = z.object({\n target: z.literal(\"subscribe_plan\"),\n action: z.string(),\n})\n\nexport const schemaSubscribePlan = z.object({\n name: z.string(),\n shortDescription: z.string(),\n fullDescription: z.string(),\n price: z.number(),\n billingCycle: z.enum(Object.values(subscribePlanBillingCycles) as [SubscribePlanBillingCycle, ...SubscribePlanBillingCycle[]]),\n currency: z.enum(Object.values(subscribeCurrencies) as [SubscribePlanCurrency, ...SubscribePlanCurrency[]]),\n status: z.boolean(),\n})\n\n/** Create */\nexport const schemaSubscribePlanCreatePayload = z.object({\n scope: schemePayloadScope,\n payload: z.object({\n subscribePlan: schemaSubscribePlan\n })\n});\n\nexport type SchemaSubscribePlanCreatePayload = z.infer<typeof schemaSubscribePlanCreatePayload>;\n\n/** Update */\nexport const schemaSubscribePlanUpdatePayload = z.object({\n scope: schemePayloadScope,\n payload: z.object({\n subscribePlan: schemaSubscribePlan\n })\n});\n\nexport type SchemaSubscribePlanUpdatePayload = z.infer<typeof schemaSubscribePlanUpdatePayload>;\n\n/** Delete */\nexport const schemaSubscribePlanDeletePayload = z.object({\n scope: schemePayloadScope,\n payload: z.object({\n ids: z.array(z.number()).min(1, \"ids must contain at least one number\"),\n }),\n});\n\nexport type SchemaSubscribePlanDeletePayload = z.infer<typeof schemaSubscribePlanDeletePayload>;"]}
@@ -8,6 +8,13 @@ export declare const authTypes: {
8
8
  readonly member: "member";
9
9
  };
10
10
  export type AuthType = typeof authTypes[keyof typeof authTypes];
11
+ export type AuthTokenResult = {
12
+ token: string;
13
+ account: any;
14
+ user: any;
15
+ user_locations: any[];
16
+ is_owner: boolean;
17
+ };
11
18
  export type AuthJwtToken = JwtPayload & {
12
19
  user?: {
13
20
  id: number;
@@ -32,12 +39,6 @@ export type AuthGetTokenProps = {
32
39
  };
33
40
  };
34
41
  export declare const AuthService: (props: AuthServiceProps) => {
35
- getAuthToken: ({ authType, data, accountCode }: AuthGetTokenProps) => Promise<{
36
- token: string;
37
- account: any;
38
- user: any;
39
- user_locations: any[];
40
- is_owner: boolean;
41
- }>;
42
+ getAuthToken: ({ authType, data, accountCode }: AuthGetTokenProps) => Promise<any>;
42
43
  verifyAuthToken: (token: string, secret: string) => AuthJwtToken;
43
44
  };
@@ -6,6 +6,7 @@ const utils_1 = require("../../utils");
6
6
  const services_1 = require("../../services");
7
7
  const utils_2 = require("../../utils");
8
8
  const models_1 = require("../../models");
9
+ const features_1 = require("../../features");
9
10
  exports.authTypes = {
10
11
  operator: "operator",
11
12
  administrator: "administrator",
@@ -15,6 +16,7 @@ exports.authTypes = {
15
16
  };
16
17
  const AuthService = (props) => {
17
18
  const { secretKey, authType = "administrator", ...rest } = props;
19
+ let hookSetup = null;
18
20
  const getUserInjectionFieldName = (authType) => {
19
21
  if (authType === "administrator")
20
22
  return ["administrator_injection_fields"];
@@ -176,7 +178,7 @@ const AuthService = (props) => {
176
178
  const { data } = await locationService.listLocations(listPayload);
177
179
  locations = data;
178
180
  }
179
- return {
181
+ const result = {
180
182
  token: authToken,
181
183
  account,
182
184
  user,
@@ -192,6 +194,9 @@ const AuthService = (props) => {
192
194
  is_owner: Boolean(user?.is_owner),
193
195
  // owner_id: 0
194
196
  };
197
+ // Call the consumer hook, if registered
198
+ const newResult = await features_1.AuthTokenHook.onSuccessAuthenticate(result);
199
+ return newResult ? newResult : result;
195
200
  };
196
201
  return {
197
202
  getAuthToken,