@kshon/loyalty-plugin 2.14.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/.medusa/server/src/admin/index.js +69052 -0
- package/.medusa/server/src/admin/index.mjs +69034 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/orders/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/orders/route.js +28 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/route.js +41 -0
- package/.medusa/server/src/api/admin/gift-cards/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/gift-cards/middlewares.js +46 -0
- package/.medusa/server/src/api/admin/gift-cards/query-config.d.ts +14 -0
- package/.medusa/server/src/api/admin/gift-cards/query-config.js +32 -0
- package/.medusa/server/src/api/admin/gift-cards/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/gift-cards/route.js +42 -0
- package/.medusa/server/src/api/admin/gift-cards/validators.d.ts +139 -0
- package/.medusa/server/src/api/admin/gift-cards/validators.js +56 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/credit/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/credit/route.js +30 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/route.js +19 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/transactions/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/transactions/route.js +23 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/middlewares.js +46 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/query-config.d.ts +18 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/query-config.js +44 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/route.js +52 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/validators.d.ts +142 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/validators.js +45 -0
- package/.medusa/server/src/api/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/middlewares.js +18 -0
- package/.medusa/server/src/api/store/carts/[id]/gift-cards/route.d.ts +5 -0
- package/.medusa/server/src/api/store/carts/[id]/gift-cards/route.js +43 -0
- package/.medusa/server/src/api/store/carts/[id]/store-credits/route.d.ts +4 -0
- package/.medusa/server/src/api/store/carts/[id]/store-credits/route.js +24 -0
- package/.medusa/server/src/api/store/carts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/carts/middlewares.js +35 -0
- package/.medusa/server/src/api/store/carts/query-config.d.ts +4 -0
- package/.medusa/server/src/api/store/carts/query-config.js +9 -0
- package/.medusa/server/src/api/store/carts/validators.d.ts +13 -0
- package/.medusa/server/src/api/store/carts/validators.js +14 -0
- package/.medusa/server/src/api/store/gift-cards/[idOrCode]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/gift-cards/[idOrCode]/route.js +24 -0
- package/.medusa/server/src/api/store/gift-cards/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/gift-cards/middlewares.js +16 -0
- package/.medusa/server/src/api/store/gift-cards/query-config.d.ts +9 -0
- package/.medusa/server/src/api/store/gift-cards/query-config.js +23 -0
- package/.medusa/server/src/api/store/gift-cards/validators.d.ts +7 -0
- package/.medusa/server/src/api/store/gift-cards/validators.js +8 -0
- package/.medusa/server/src/api/store/store-credit-accounts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/store-credit-accounts/[id]/route.js +31 -0
- package/.medusa/server/src/api/store/store-credit-accounts/claim/route.d.ts +3 -0
- package/.medusa/server/src/api/store/store-credit-accounts/claim/route.js +25 -0
- package/.medusa/server/src/api/store/store-credit-accounts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/store-credit-accounts/middlewares.js +36 -0
- package/.medusa/server/src/api/store/store-credit-accounts/query-config.d.ts +9 -0
- package/.medusa/server/src/api/store/store-credit-accounts/query-config.js +24 -0
- package/.medusa/server/src/api/store/store-credit-accounts/route.d.ts +3 -0
- package/.medusa/server/src/api/store/store-credit-accounts/route.js +40 -0
- package/.medusa/server/src/api/store/store-credit-accounts/validators.d.ts +44 -0
- package/.medusa/server/src/api/store/store-credit-accounts/validators.js +19 -0
- package/.medusa/server/src/links/cart-gift-cards-link.d.ts +2 -0
- package/.medusa/server/src/links/cart-gift-cards-link.js +13 -0
- package/.medusa/server/src/links/customer-store-credit-account-link.d.ts +1 -0
- package/.medusa/server/src/links/customer-store-credit-account-link.js +13 -0
- package/.medusa/server/src/links/gift-card-store-credit.d.ts +2 -0
- package/.medusa/server/src/links/gift-card-store-credit.js +10 -0
- package/.medusa/server/src/links/order-gift-cards-link.d.ts +2 -0
- package/.medusa/server/src/links/order-gift-cards-link.js +13 -0
- package/.medusa/server/src/links/order-line-item-gift-card-link.d.ts +1 -0
- package/.medusa/server/src/links/order-line-item-gift-card-link.js +19 -0
- package/.medusa/server/src/modules/loyalty/index.d.ts +21 -0
- package/.medusa/server/src/modules/loyalty/index.js +12 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250123130553.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250123130553.js +17 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250127174331.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250127174331.js +19 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141026.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141026.js +19 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141429.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141429.js +14 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206144714.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206144714.js +14 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250326095923.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250326095923.js +16 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250617080328.d.ts +5 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250617080328.js +20 -0
- package/.medusa/server/src/modules/loyalty/models/gift-card.d.ts +18 -0
- package/.medusa/server/src/modules/loyalty/models/gift-card.js +18 -0
- package/.medusa/server/src/modules/loyalty/models/index.d.ts +1 -0
- package/.medusa/server/src/modules/loyalty/models/index.js +9 -0
- package/.medusa/server/src/modules/loyalty/service.d.ts +21 -0
- package/.medusa/server/src/modules/loyalty/service.js +13 -0
- package/.medusa/server/src/modules/store-credit/index.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/index.js +12 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250129115518.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250129115518.js +16 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130213237.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130213237.js +18 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130220640.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130220640.js +19 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250131205753.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250131205753.js +14 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250520081315.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250520081315.js +16 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250626081315.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250626081315.js +16 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250722080351.d.ts +5 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250722080351.js +27 -0
- package/.medusa/server/src/modules/store-credit/models/account-transaction.d.ts +28 -0
- package/.medusa/server/src/modules/store-credit/models/account-transaction.js +21 -0
- package/.medusa/server/src/modules/store-credit/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/store-credit/models/index.js +11 -0
- package/.medusa/server/src/modules/store-credit/models/store-credit-account.d.ts +27 -0
- package/.medusa/server/src/modules/store-credit/models/store-credit-account.js +27 -0
- package/.medusa/server/src/modules/store-credit/service.d.ts +29 -0
- package/.medusa/server/src/modules/store-credit/service.js +253 -0
- package/.medusa/server/src/subscribers/create-gift-card.d.ts +5 -0
- package/.medusa/server/src/subscribers/create-gift-card.js +53 -0
- package/.medusa/server/src/types/cart/index.d.ts +12 -0
- package/.medusa/server/src/types/cart/index.js +3 -0
- package/.medusa/server/src/types/http/gift-card.d.ts +42 -0
- package/.medusa/server/src/types/http/gift-card.js +3 -0
- package/.medusa/server/src/types/http/index.d.ts +3 -0
- package/.medusa/server/src/types/http/index.js +20 -0
- package/.medusa/server/src/types/http/store-credit-account.d.ts +60 -0
- package/.medusa/server/src/types/http/store-credit-account.js +3 -0
- package/.medusa/server/src/types/http/transaction.d.ts +19 -0
- package/.medusa/server/src/types/http/transaction.js +3 -0
- package/.medusa/server/src/types/index.d.ts +4 -0
- package/.medusa/server/src/types/index.js +21 -0
- package/.medusa/server/src/types/loyalty/index.d.ts +3 -0
- package/.medusa/server/src/types/loyalty/index.js +20 -0
- package/.medusa/server/src/types/loyalty/module.d.ts +151 -0
- package/.medusa/server/src/types/loyalty/module.js +12 -0
- package/.medusa/server/src/types/loyalty/service.d.ts +168 -0
- package/.medusa/server/src/types/loyalty/service.js +3 -0
- package/.medusa/server/src/types/loyalty/workflows.d.ts +3 -0
- package/.medusa/server/src/types/loyalty/workflows.js +3 -0
- package/.medusa/server/src/types/modules.d.ts +6 -0
- package/.medusa/server/src/types/modules.js +12 -0
- package/.medusa/server/src/types/store-credit/index.d.ts +2 -0
- package/.medusa/server/src/types/store-credit/index.js +19 -0
- package/.medusa/server/src/types/store-credit/module.d.ts +290 -0
- package/.medusa/server/src/types/store-credit/module.js +13 -0
- package/.medusa/server/src/types/store-credit/service.d.ts +325 -0
- package/.medusa/server/src/types/store-credit/service.js +3 -0
- package/.medusa/server/src/utils/code-generator.d.ts +1 -0
- package/.medusa/server/src/utils/code-generator.js +32 -0
- package/.medusa/server/src/workflows/carts/index.d.ts +5 -0
- package/.medusa/server/src/workflows/carts/index.js +22 -0
- package/.medusa/server/src/workflows/carts/steps/validate-gift-card-balances.d.ts +37 -0
- package/.medusa/server/src/workflows/carts/steps/validate-gift-card-balances.js +36 -0
- package/.medusa/server/src/workflows/carts/workflows/add-gift-card-to-cart.d.ts +118 -0
- package/.medusa/server/src/workflows/carts/workflows/add-gift-card-to-cart.js +179 -0
- package/.medusa/server/src/workflows/carts/workflows/add-store-credits-to-cart.d.ts +88 -0
- package/.medusa/server/src/workflows/carts/workflows/add-store-credits-to-cart.js +134 -0
- package/.medusa/server/src/workflows/carts/workflows/confirm-cart-credit-lines.d.ts +68 -0
- package/.medusa/server/src/workflows/carts/workflows/confirm-cart-credit-lines.js +110 -0
- package/.medusa/server/src/workflows/carts/workflows/refresh-cart-gift-cards.d.ts +30 -0
- package/.medusa/server/src/workflows/carts/workflows/refresh-cart-gift-cards.js +154 -0
- package/.medusa/server/src/workflows/carts/workflows/remove-gift-cart-from-cart.d.ts +103 -0
- package/.medusa/server/src/workflows/carts/workflows/remove-gift-cart-from-cart.js +124 -0
- package/.medusa/server/src/workflows/common/steps/validate-presence-of.d.ts +29 -0
- package/.medusa/server/src/workflows/common/steps/validate-presence-of.js +22 -0
- package/.medusa/server/src/workflows/gift-cards/index.d.ts +9 -0
- package/.medusa/server/src/workflows/gift-cards/index.js +26 -0
- package/.medusa/server/src/workflows/gift-cards/steps/create-gift-cards.d.ts +20 -0
- package/.medusa/server/src/workflows/gift-cards/steps/create-gift-cards.js +38 -0
- package/.medusa/server/src/workflows/gift-cards/steps/delete-gift-cards.d.ts +17 -0
- package/.medusa/server/src/workflows/gift-cards/steps/delete-gift-cards.js +24 -0
- package/.medusa/server/src/workflows/gift-cards/steps/retrieve-gift-card-balance.d.ts +32 -0
- package/.medusa/server/src/workflows/gift-cards/steps/retrieve-gift-card-balance.js +34 -0
- package/.medusa/server/src/workflows/gift-cards/steps/update-gift-cards.d.ts +19 -0
- package/.medusa/server/src/workflows/gift-cards/steps/update-gift-cards.js +41 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/claim-gift-card.d.ts +65 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/claim-gift-card.js +101 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/create-gift-cards.d.ts +36 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/create-gift-cards.js +88 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/delete-gift-card.d.ts +28 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/delete-gift-card.js +34 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/redeem-gift-card.d.ts +60 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/redeem-gift-card.js +129 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/update-gift-cards.d.ts +28 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/update-gift-cards.js +31 -0
- package/.medusa/server/src/workflows/hooks/after-order-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/after-order-created.js +31 -0
- package/.medusa/server/src/workflows/hooks/after-order-credit-lines-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/after-order-credit-lines-created.js +32 -0
- package/.medusa/server/src/workflows/hooks/before-payment-collection-refresh.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/before-payment-collection-refresh.js +26 -0
- package/.medusa/server/src/workflows/hooks/complete-cart-before-payment-authorization.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/complete-cart-before-payment-authorization.js +27 -0
- package/.medusa/server/src/workflows/index.d.ts +3 -0
- package/.medusa/server/src/workflows/index.js +20 -0
- package/.medusa/server/src/workflows/orders/index.d.ts +2 -0
- package/.medusa/server/src/workflows/orders/index.js +19 -0
- package/.medusa/server/src/workflows/orders/workflows/link-gift-cards-to-order.d.ts +34 -0
- package/.medusa/server/src/workflows/orders/workflows/link-gift-cards-to-order.js +75 -0
- package/.medusa/server/src/workflows/orders/workflows/refund-credit-lines.d.ts +88 -0
- package/.medusa/server/src/workflows/orders/workflows/refund-credit-lines.js +131 -0
- package/.medusa/server/src/workflows/store-credit/index.d.ts +8 -0
- package/.medusa/server/src/workflows/store-credit/index.js +25 -0
- package/.medusa/server/src/workflows/store-credit/steps/create-store-credit-accounts.d.ts +19 -0
- package/.medusa/server/src/workflows/store-credit/steps/create-store-credit-accounts.js +37 -0
- package/.medusa/server/src/workflows/store-credit/steps/credit-account.d.ts +20 -0
- package/.medusa/server/src/workflows/store-credit/steps/credit-account.js +31 -0
- package/.medusa/server/src/workflows/store-credit/steps/debit-account.d.ts +20 -0
- package/.medusa/server/src/workflows/store-credit/steps/debit-account.js +31 -0
- package/.medusa/server/src/workflows/store-credit/workflows/claim-store-credit-account.d.ts +91 -0
- package/.medusa/server/src/workflows/store-credit/workflows/claim-store-credit-account.js +170 -0
- package/.medusa/server/src/workflows/store-credit/workflows/create-store-credit-accounts.d.ts +50 -0
- package/.medusa/server/src/workflows/store-credit/workflows/create-store-credit-accounts.js +50 -0
- package/.medusa/server/src/workflows/store-credit/workflows/credit-accounts.d.ts +29 -0
- package/.medusa/server/src/workflows/store-credit/workflows/credit-accounts.js +32 -0
- package/.medusa/server/src/workflows/store-credit/workflows/credit-store-credit-account.d.ts +29 -0
- package/.medusa/server/src/workflows/store-credit/workflows/credit-store-credit-account.js +67 -0
- package/.medusa/server/src/workflows/store-credit/workflows/debit-accounts.d.ts +29 -0
- package/.medusa/server/src/workflows/store-credit/workflows/debit-accounts.js +32 -0
- package/.medusa/server/tailwind.config.d.ts +3 -0
- package/.medusa/server/tailwind.config.js +12 -0
- package/README.md +62 -0
- package/package.json +107 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const types_1 = require("../../../types");
|
|
5
|
+
exports.default = utils_1.model.define({ tableName: "loyalty_gift_card", name: "GiftCard" }, {
|
|
6
|
+
id: utils_1.model.id({ prefix: "gcard" }).primaryKey(),
|
|
7
|
+
status: utils_1.model.enum(types_1.GiftCardStatus).default(types_1.GiftCardStatus.PENDING),
|
|
8
|
+
value: utils_1.model.bigNumber(),
|
|
9
|
+
code: utils_1.model.text().searchable().unique(),
|
|
10
|
+
currency_code: utils_1.model.text().searchable(),
|
|
11
|
+
expires_at: utils_1.model.dateTime().nullable(),
|
|
12
|
+
reference_id: utils_1.model.text().nullable(),
|
|
13
|
+
reference: utils_1.model.text().nullable(),
|
|
14
|
+
line_item_id: utils_1.model.text().nullable(),
|
|
15
|
+
note: utils_1.model.text().nullable(),
|
|
16
|
+
metadata: utils_1.model.json().nullable(),
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2lmdC1jYXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvbG95YWx0eS9tb2RlbHMvZ2lmdC1jYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEscURBQWtEO0FBQ2xELDBDQUFnRDtBQUVoRCxrQkFBZSxhQUFLLENBQUMsTUFBTSxDQUN6QixFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLEVBQ3BEO0lBQ0UsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUU7SUFDOUMsTUFBTSxFQUFFLGFBQUssQ0FBQyxJQUFJLENBQUMsc0JBQWMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxzQkFBYyxDQUFDLE9BQU8sQ0FBQztJQUNsRSxLQUFLLEVBQUUsYUFBSyxDQUFDLFNBQVMsRUFBRTtJQUN4QixJQUFJLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLE1BQU0sRUFBRTtJQUN4QyxhQUFhLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRTtJQUN4QyxVQUFVLEVBQUUsYUFBSyxDQUFDLFFBQVEsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN2QyxZQUFZLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNyQyxTQUFTLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNsQyxZQUFZLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNyQyxJQUFJLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUM3QixRQUFRLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtDQUNsQyxDQUNGLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GiftCard } from "./gift-card";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GiftCard = void 0;
|
|
7
|
+
var gift_card_1 = require("./gift-card");
|
|
8
|
+
Object.defineProperty(exports, "GiftCard", { enumerable: true, get: function () { return __importDefault(gift_card_1).default; } });
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9sb3lhbHR5L21vZGVscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSx5Q0FBaUQ7QUFBeEMsc0hBQUEsT0FBTyxPQUFZIn0=
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const LoyaltyModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
2
|
+
readonly GiftCard: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("../../types").GiftCardStatus>;
|
|
5
|
+
value: import("@medusajs/framework/utils").BigNumberProperty;
|
|
6
|
+
code: import("@medusajs/framework/utils").TextProperty;
|
|
7
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
8
|
+
expires_at: import("@medusajs/framework/utils").NullableModifier<Date, import("@medusajs/framework/utils").DateTimeProperty>;
|
|
9
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
10
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
11
|
+
line_item_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
12
|
+
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
13
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
14
|
+
}>, {
|
|
15
|
+
readonly tableName: "loyalty_gift_card";
|
|
16
|
+
readonly name: "GiftCard";
|
|
17
|
+
}>;
|
|
18
|
+
}>>;
|
|
19
|
+
declare class LoyaltyModuleService extends LoyaltyModuleService_base {
|
|
20
|
+
}
|
|
21
|
+
export default LoyaltyModuleService;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const gift_card_1 = __importDefault(require("./models/gift-card"));
|
|
8
|
+
class LoyaltyModuleService extends (0, utils_1.MedusaService)({
|
|
9
|
+
GiftCard: gift_card_1.default,
|
|
10
|
+
}) {
|
|
11
|
+
}
|
|
12
|
+
exports.default = LoyaltyModuleService;
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL2xveWFsdHkvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUEwRDtBQUMxRCxtRUFBMEM7QUFFMUMsTUFBTSxvQkFBcUIsU0FBUSxJQUFBLHFCQUFhLEVBQUM7SUFDL0MsUUFBUSxFQUFSLG1CQUFRO0NBQ1QsQ0FBQztDQUFHO0FBRUwsa0JBQWUsb0JBQW9CLENBQUMifQ==
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const types_1 = require("../../types");
|
|
8
|
+
const service_1 = __importDefault(require("./service"));
|
|
9
|
+
exports.default = (0, utils_1.Module)(types_1.PluginModule.STORE_CREDIT, {
|
|
10
|
+
service: service_1.default,
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBbUQ7QUFDbkQsdUNBQTJDO0FBQzNDLHdEQUEyQztBQUUzQyxrQkFBZSxJQUFBLGNBQU0sRUFBQyxvQkFBWSxDQUFDLFlBQVksRUFBRTtJQUMvQyxPQUFPLEVBQUUsaUJBQWtCO0NBQzVCLENBQUMsQ0FBQyJ9
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250129115518 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250129115518 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql('create table if not exists "store_credit_account" ("id" text not null, "currency_code" text not null, "customer_id" text not null, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "store_credit_account_pkey" primary key ("id"));');
|
|
8
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_account_deleted_at" ON "store_credit_account" (deleted_at) WHERE deleted_at IS NULL;');
|
|
9
|
+
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_customer_id_currency_code" ON "store_credit_account" (customer_id, currency_code) WHERE deleted_at IS NULL;');
|
|
10
|
+
}
|
|
11
|
+
async down() {
|
|
12
|
+
this.addSql('drop table if exists "store_credit_account" cascade;');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20250129115518 = Migration20250129115518;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTAxMjkxMTU1MTguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDEyOTExNTUxOC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUNwRCxLQUFLLENBQUMsRUFBRTtRQUNOLElBQUksQ0FBQyxNQUFNLENBQ1Qsd1ZBQXdWLENBQ3pWLENBQUM7UUFFRixJQUFJLENBQUMsTUFBTSxDQUNULG1JQUFtSSxDQUNwSSxDQUFDO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FDVCxvSkFBb0osQ0FDckosQ0FBQztJQUNKLENBQUM7SUFFRCxLQUFLLENBQUMsSUFBSTtRQUNSLElBQUksQ0FBQyxNQUFNLENBQUMsc0RBQXNELENBQUMsQ0FBQztJQUN0RSxDQUFDO0NBQ0Y7QUFsQkQsMERBa0JDIn0=
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250130213237 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250130213237 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql('create table if not exists "store_credit_transaction_group" ("id" text not null, "code" text not null, "account_id" text not null, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "store_credit_transaction_group_pkey" primary key ("id"));');
|
|
8
|
+
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_code_unique" ON "store_credit_transaction_group" (code) WHERE deleted_at IS NULL;');
|
|
9
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_account_id" ON "store_credit_transaction_group" (account_id) WHERE deleted_at IS NULL;');
|
|
10
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_deleted_at" ON "store_credit_transaction_group" (deleted_at) WHERE deleted_at IS NULL;');
|
|
11
|
+
this.addSql('alter table if exists "store_credit_transaction_group" add constraint "store_credit_transaction_group_account_id_foreign" foreign key ("account_id") references "store_credit_account" ("id") on update cascade;');
|
|
12
|
+
}
|
|
13
|
+
async down() {
|
|
14
|
+
this.addSql('drop table if exists "store_credit_transaction_group" cascade;');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Migration20250130213237 = Migration20250130213237;
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTAxMzAyMTMyMzcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDEzMDIxMzIzNy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUNwRCxLQUFLLENBQUMsRUFBRTtRQUNOLElBQUksQ0FBQyxNQUFNLENBQ1Qsa1dBQWtXLENBQ25XLENBQUM7UUFFRixJQUFJLENBQUMsTUFBTSxDQUNULHlKQUF5SixDQUMxSixDQUFDO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FDVCx1SkFBdUosQ0FDeEosQ0FBQztRQUVGLElBQUksQ0FBQyxNQUFNLENBQ1QsdUpBQXVKLENBQ3hKLENBQUM7UUFFRixJQUFJLENBQUMsTUFBTSxDQUNULGtOQUFrTixDQUNuTixDQUFDO0lBQ0osQ0FBQztJQUVELEtBQUssQ0FBQyxJQUFJO1FBQ1IsSUFBSSxDQUFDLE1BQU0sQ0FDVCxnRUFBZ0UsQ0FDakUsQ0FBQztJQUNKLENBQUM7Q0FDRjtBQTVCRCwwREE0QkMifQ==
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250130220640 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250130220640 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql('create table if not exists "store_credit_account_transaction" ("id" text not null, "amount" numeric not null, "type" text check ("type" in (\'credit\', \'debit\')) not null, "reference" text not null, "reference_id" text not null, "note" text null, "account_id" text not null, "transaction_group_id" text null, "metadata" jsonb null, "raw_amount" jsonb not null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "store_credit_account_transaction_pkey" primary key ("id"));');
|
|
8
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_account_transaction_account_id" ON "store_credit_account_transaction" (account_id) WHERE deleted_at IS NULL;');
|
|
9
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_account_transaction_transaction_group_id" ON "store_credit_account_transaction" (transaction_group_id) WHERE deleted_at IS NULL;');
|
|
10
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_store_credit_account_transaction_deleted_at" ON "store_credit_account_transaction" (deleted_at) WHERE deleted_at IS NULL;');
|
|
11
|
+
this.addSql('alter table if exists "store_credit_account_transaction" add constraint "store_credit_account_transaction_account_id_foreign" foreign key ("account_id") references "store_credit_account" ("id") on update cascade;');
|
|
12
|
+
this.addSql('alter table if exists "store_credit_account_transaction" add constraint "store_credit_account_transaction_transaction_group_id_foreign" foreign key ("transaction_group_id") references "store_credit_transaction_group" ("id") on update cascade on delete set null;');
|
|
13
|
+
}
|
|
14
|
+
async down() {
|
|
15
|
+
this.addSql('drop table if exists "store_credit_account_transaction" cascade;');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Migration20250130220640 = Migration20250130220640;
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTAxMzAyMjA2NDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDEzMDIyMDY0MC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUNwRCxLQUFLLENBQUMsRUFBRTtRQUNOLElBQUksQ0FBQyxNQUFNLENBQ1QscWpCQUFxakIsQ0FDdGpCLENBQUM7UUFFRixJQUFJLENBQUMsTUFBTSxDQUNULDJKQUEySixDQUM1SixDQUFDO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FDVCwrS0FBK0ssQ0FDaEwsQ0FBQztRQUVGLElBQUksQ0FBQyxNQUFNLENBQ1QsMkpBQTJKLENBQzVKLENBQUM7UUFFRixJQUFJLENBQUMsTUFBTSxDQUNULHNOQUFzTixDQUN2TixDQUFDO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FDVCx1UUFBdVEsQ0FDeFEsQ0FBQztJQUNKLENBQUM7SUFFRCxLQUFLLENBQUMsSUFBSTtRQUNSLElBQUksQ0FBQyxNQUFNLENBQ1Qsa0VBQWtFLENBQ25FLENBQUM7SUFDSixDQUFDO0NBQ0Y7QUFoQ0QsMERBZ0NDIn0=
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250131205753 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250131205753 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql('CREATE UNIQUE INDEX IF NOT EXISTS "IDX_account_id" ON "store_credit_transaction_group" (code, account_id) WHERE deleted_at IS NULL;');
|
|
8
|
+
}
|
|
9
|
+
async down() {
|
|
10
|
+
this.addSql('drop index if exists "IDX_account_id";');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Migration20250131205753 = Migration20250131205753;
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTAxMzEyMDU3NTMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDEzMTIwNTc1My50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUVwRCxLQUFLLENBQUMsRUFBRTtRQUNOLElBQUksQ0FBQyxNQUFNLENBQUMscUlBQXFJLENBQUMsQ0FBQztJQUNySixDQUFDO0lBRUQsS0FBSyxDQUFDLElBQUk7UUFDUixJQUFJLENBQUMsTUFBTSxDQUFDLHdDQUF3QyxDQUFDLENBQUM7SUFDeEQsQ0FBQztDQUVGO0FBVkQsMERBVUMifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250520081315 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250520081315 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" type text using ("customer_id"::text);`);
|
|
8
|
+
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" drop not null;`);
|
|
9
|
+
}
|
|
10
|
+
async down() {
|
|
11
|
+
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" type text using ("customer_id"::text);`);
|
|
12
|
+
this.addSql(`alter table if exists "store_credit_account" alter column "customer_id" set not null;`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20250520081315 = Migration20250520081315;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTA1MjAwODEzMTUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDUyMDA4MTMxNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUUzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQUMsZ0hBQWdILENBQUMsQ0FBQztRQUM5SCxJQUFJLENBQUMsTUFBTSxDQUFDLHdGQUF3RixDQUFDLENBQUM7SUFDeEcsQ0FBQztJQUVRLEtBQUssQ0FBQyxJQUFJO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQUMsZ0hBQWdILENBQUMsQ0FBQztRQUM5SCxJQUFJLENBQUMsTUFBTSxDQUFDLHVGQUF1RixDQUFDLENBQUM7SUFDdkcsQ0FBQztDQUVGO0FBWkQsMERBWUMifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250520081315 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250520081315 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table if exists "store_credit_account" add column "code" text;`);
|
|
8
|
+
this.addSql(`create unique index if not exists "IDX_store_credit_account_code_unique" on "store_credit_account" (code) where deleted_at is null;`);
|
|
9
|
+
}
|
|
10
|
+
async down() {
|
|
11
|
+
this.addSql(`alter table if exists "store_credit_account" drop column "code";`);
|
|
12
|
+
this.addSql(`drop index if exists "IDX_store_credit_account_code_unique";`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20250520081315 = Migration20250520081315;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTA2MjYwODEzMTUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDYyNjA4MTMxNS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUMzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQ1Qsc0VBQXNFLENBQ3ZFLENBQUM7UUFDRixJQUFJLENBQUMsTUFBTSxDQUNULHFJQUFxSSxDQUN0SSxDQUFDO0lBQ0osQ0FBQztJQUVRLEtBQUssQ0FBQyxJQUFJO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQ1Qsa0VBQWtFLENBQ25FLENBQUM7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLDhEQUE4RCxDQUFDLENBQUM7SUFDOUUsQ0FBQztDQUNGO0FBaEJELDBEQWdCQyJ9
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250722080351 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20250722080351 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`alter table if exists "store_credit_account_transaction" drop constraint if exists "store_credit_account_transaction_transaction_group_id_foreign";`);
|
|
8
|
+
this.addSql(`drop table if exists "store_credit_transaction_group" cascade;`);
|
|
9
|
+
this.addSql(`alter table if exists "store_credit_account" add column if not exists "code" text null;`);
|
|
10
|
+
this.addSql(`drop index if exists "IDX_store_credit_account_transaction_transaction_group_id";`);
|
|
11
|
+
this.addSql(`alter table if exists "store_credit_account_transaction" drop column if exists "transaction_group_id";`);
|
|
12
|
+
}
|
|
13
|
+
async down() {
|
|
14
|
+
this.addSql(`create table if not exists "store_credit_transaction_group" ("id" text not null, "code" text not null, "account_id" text not null, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "store_credit_transaction_group_pkey" primary key ("id"));`);
|
|
15
|
+
this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_code_unique" ON "store_credit_transaction_group" (code) WHERE deleted_at IS NULL;`);
|
|
16
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_account_id" ON "store_credit_transaction_group" (account_id) WHERE deleted_at IS NULL;`);
|
|
17
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_store_credit_transaction_group_deleted_at" ON "store_credit_transaction_group" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
18
|
+
this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_account_id" ON "store_credit_transaction_group" (code, account_id) WHERE deleted_at IS NULL;`);
|
|
19
|
+
this.addSql(`alter table if exists "store_credit_transaction_group" add constraint "store_credit_transaction_group_account_id_foreign" foreign key ("account_id") references "store_credit_account" ("id") on update cascade;`);
|
|
20
|
+
this.addSql(`alter table if exists "store_credit_account" drop column if exists "code";`);
|
|
21
|
+
this.addSql(`alter table if exists "store_credit_account_transaction" add column if not exists "transaction_group_id" text null;`);
|
|
22
|
+
this.addSql(`alter table if exists "store_credit_account_transaction" add constraint "store_credit_account_transaction_transaction_group_id_foreign" foreign key ("transaction_group_id") references "store_credit_transaction_group" ("id") on update cascade on delete set null;`);
|
|
23
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_store_credit_account_transaction_transaction_group_id" ON "store_credit_account_transaction" (transaction_group_id) WHERE deleted_at IS NULL;`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.Migration20250722080351 = Migration20250722080351;
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTA3MjIwODAzNTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI1MDcyMjA4MDM1MS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBcUU7QUFFckUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUUzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQUMscUpBQXFKLENBQUMsQ0FBQztRQUVuSyxJQUFJLENBQUMsTUFBTSxDQUFDLGdFQUFnRSxDQUFDLENBQUM7UUFFOUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyx5RkFBeUYsQ0FBQyxDQUFDO1FBRXZHLElBQUksQ0FBQyxNQUFNLENBQUMsbUZBQW1GLENBQUMsQ0FBQztRQUNqRyxJQUFJLENBQUMsTUFBTSxDQUFDLHdHQUF3RyxDQUFDLENBQUM7SUFDeEgsQ0FBQztJQUVRLEtBQUssQ0FBQyxJQUFJO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQUMsa1dBQWtXLENBQUMsQ0FBQztRQUNoWCxJQUFJLENBQUMsTUFBTSxDQUFDLHlKQUF5SixDQUFDLENBQUM7UUFDdkssSUFBSSxDQUFDLE1BQU0sQ0FBQyx1SkFBdUosQ0FBQyxDQUFDO1FBQ3JLLElBQUksQ0FBQyxNQUFNLENBQUMsdUpBQXVKLENBQUMsQ0FBQztRQUNySyxJQUFJLENBQUMsTUFBTSxDQUFDLHFJQUFxSSxDQUFDLENBQUM7UUFFbkosSUFBSSxDQUFDLE1BQU0sQ0FBQyxrTkFBa04sQ0FBQyxDQUFDO1FBRWhPLElBQUksQ0FBQyxNQUFNLENBQUMsNEVBQTRFLENBQUMsQ0FBQztRQUUxRixJQUFJLENBQUMsTUFBTSxDQUFDLHFIQUFxSCxDQUFDLENBQUM7UUFDbkksSUFBSSxDQUFDLE1BQU0sQ0FBQyx1UUFBdVEsQ0FBQyxDQUFDO1FBQ3JSLElBQUksQ0FBQyxNQUFNLENBQUMsK0tBQStLLENBQUMsQ0FBQztJQUMvTCxDQUFDO0NBRUY7QUE3QkQsMERBNkJDIn0=
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TransactionType } from "../../../types";
|
|
2
|
+
declare const _default: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
5
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof TransactionType>;
|
|
6
|
+
reference: import("@medusajs/framework/utils").TextProperty;
|
|
7
|
+
reference_id: import("@medusajs/framework/utils").TextProperty;
|
|
8
|
+
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
9
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
10
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
11
|
+
code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
12
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
13
|
+
customer_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
14
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
15
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, {
|
|
16
|
+
readonly tableName: "store_credit_account_transaction";
|
|
17
|
+
readonly name: "AccountTransaction";
|
|
18
|
+
}>>;
|
|
19
|
+
}>, {
|
|
20
|
+
readonly tableName: "store_credit_account";
|
|
21
|
+
readonly name: "StoreCreditAccount";
|
|
22
|
+
}>, undefined>;
|
|
23
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
24
|
+
}>, {
|
|
25
|
+
readonly tableName: "store_credit_account_transaction";
|
|
26
|
+
readonly name: "AccountTransaction";
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const types_1 = require("../../../types");
|
|
8
|
+
const store_credit_account_1 = __importDefault(require("./store-credit-account"));
|
|
9
|
+
exports.default = utils_1.model.define({ tableName: "store_credit_account_transaction", name: "AccountTransaction" }, {
|
|
10
|
+
id: utils_1.model.id({ prefix: "sc_trx" }).primaryKey(),
|
|
11
|
+
amount: utils_1.model.bigNumber(),
|
|
12
|
+
type: utils_1.model.enum(types_1.TransactionType),
|
|
13
|
+
reference: utils_1.model.text(),
|
|
14
|
+
reference_id: utils_1.model.text(),
|
|
15
|
+
note: utils_1.model.text().nullable(),
|
|
16
|
+
account: utils_1.model.belongsTo(() => store_credit_account_1.default, {
|
|
17
|
+
mappedBy: "transactions",
|
|
18
|
+
}),
|
|
19
|
+
metadata: utils_1.model.json().nullable(),
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudC10cmFuc2FjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3N0b3JlLWNyZWRpdC9tb2RlbHMvYWNjb3VudC10cmFuc2FjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFrRDtBQUNsRCwwQ0FBaUQ7QUFDakQsa0ZBQXdEO0FBRXhELGtCQUFlLGFBQUssQ0FBQyxNQUFNLENBQ3pCLEVBQUUsU0FBUyxFQUFFLGtDQUFrQyxFQUFFLElBQUksRUFBRSxvQkFBb0IsRUFBRSxFQUM3RTtJQUNFLEVBQUUsRUFBRSxhQUFLLENBQUMsRUFBRSxDQUFDLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRSxDQUFDLENBQUMsVUFBVSxFQUFFO0lBRS9DLE1BQU0sRUFBRSxhQUFLLENBQUMsU0FBUyxFQUFFO0lBQ3pCLElBQUksRUFBRSxhQUFLLENBQUMsSUFBSSxDQUFDLHVCQUFlLENBQUM7SUFDakMsU0FBUyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDdkIsWUFBWSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDMUIsSUFBSSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFFN0IsT0FBTyxFQUFFLGFBQUssQ0FBQyxTQUFTLENBQUMsR0FBRyxFQUFFLENBQUMsOEJBQWtCLEVBQUU7UUFDakQsUUFBUSxFQUFFLGNBQWM7S0FDekIsQ0FBQztJQUVGLFFBQVEsRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0NBQ2xDLENBQ0YsQ0FBQyJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StoreCreditAccount = exports.AccountTransaction = void 0;
|
|
7
|
+
var account_transaction_1 = require("./account-transaction");
|
|
8
|
+
Object.defineProperty(exports, "AccountTransaction", { enumerable: true, get: function () { return __importDefault(account_transaction_1).default; } });
|
|
9
|
+
var store_credit_account_1 = require("./store-credit-account");
|
|
10
|
+
Object.defineProperty(exports, "StoreCreditAccount", { enumerable: true, get: function () { return __importDefault(store_credit_account_1).default; } });
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbW9kZWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLDZEQUFxRTtBQUE1RCwwSUFBQSxPQUFPLE9BQXNCO0FBQ3RDLCtEQUFzRTtBQUE3RCwySUFBQSxPQUFPLE9BQXNCIn0=
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
+
code: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
4
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
5
|
+
customer_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
6
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
7
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
8
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
9
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
10
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof import("../../../types").TransactionType>;
|
|
11
|
+
reference: import("@medusajs/framework/utils").TextProperty;
|
|
12
|
+
reference_id: import("@medusajs/framework/utils").TextProperty;
|
|
13
|
+
note: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
14
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, {
|
|
15
|
+
readonly tableName: "store_credit_account";
|
|
16
|
+
readonly name: "StoreCreditAccount";
|
|
17
|
+
}>, undefined>;
|
|
18
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
19
|
+
}>, {
|
|
20
|
+
readonly tableName: "store_credit_account_transaction";
|
|
21
|
+
readonly name: "AccountTransaction";
|
|
22
|
+
}>>;
|
|
23
|
+
}>, {
|
|
24
|
+
readonly tableName: "store_credit_account";
|
|
25
|
+
readonly name: "StoreCreditAccount";
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const account_transaction_1 = __importDefault(require("./account-transaction"));
|
|
8
|
+
exports.default = utils_1.model
|
|
9
|
+
.define({ tableName: "store_credit_account", name: "StoreCreditAccount" }, {
|
|
10
|
+
id: utils_1.model.id({ prefix: "sc_acc" }).primaryKey(),
|
|
11
|
+
code: utils_1.model.text().nullable(),
|
|
12
|
+
currency_code: utils_1.model.text().searchable(),
|
|
13
|
+
customer_id: utils_1.model.text().nullable(),
|
|
14
|
+
metadata: utils_1.model.json().nullable(),
|
|
15
|
+
transactions: utils_1.model.hasMany(() => account_transaction_1.default, {
|
|
16
|
+
mappedBy: "account",
|
|
17
|
+
}),
|
|
18
|
+
})
|
|
19
|
+
.indexes([
|
|
20
|
+
{
|
|
21
|
+
name: "IDX_customer_id_currency_code",
|
|
22
|
+
on: ["customer_id", "currency_code"],
|
|
23
|
+
unique: true,
|
|
24
|
+
where: "customer_id IS NOT NULL",
|
|
25
|
+
},
|
|
26
|
+
]);
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmUtY3JlZGl0LWFjY291bnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9zdG9yZS1jcmVkaXQvbW9kZWxzL3N0b3JlLWNyZWRpdC1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQWtEO0FBQ2xELGdGQUF1RDtBQUV2RCxrQkFBZSxhQUFLO0tBQ2pCLE1BQU0sQ0FDTCxFQUFFLFNBQVMsRUFBRSxzQkFBc0IsRUFBRSxJQUFJLEVBQUUsb0JBQW9CLEVBQUUsRUFDakU7SUFDRSxFQUFFLEVBQUUsYUFBSyxDQUFDLEVBQUUsQ0FBQyxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQUUsQ0FBQyxDQUFDLFVBQVUsRUFBRTtJQUMvQyxJQUFJLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUM3QixhQUFhLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRTtJQUN4QyxXQUFXLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNwQyxRQUFRLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUVqQyxZQUFZLEVBQUUsYUFBSyxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQyw2QkFBa0IsRUFBRTtRQUNwRCxRQUFRLEVBQUUsU0FBUztLQUNwQixDQUFDO0NBQ0gsQ0FDRjtLQUNBLE9BQU8sQ0FBQztJQUNQO1FBQ0UsSUFBSSxFQUFFLCtCQUErQjtRQUNyQyxFQUFFLEVBQUUsQ0FBQyxhQUFhLEVBQUUsZUFBZSxDQUFDO1FBQ3BDLE1BQU0sRUFBRSxJQUFJO1FBQ1osS0FBSyxFQUFFLHlCQUF5QjtLQUNqQztDQUNGLENBQUMsQ0FBQyJ9
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Context, DAL, FindConfig, InferEntityType, ModulesSdkTypes, SoftDeleteReturn } from "@medusajs/framework/types";
|
|
2
|
+
import { IStoreCreditModuleService, ModuleAccountStats, ModuleAccountTransaction, ModuleCreditAccount, ModuleDebitAccount, ModuleRetrieveAccountStats, ModuleStoreCreditAccount, ModuleStoreCreditAccountFilters, ModuleUpdateStoreCreditAccount } from "../../types";
|
|
3
|
+
type InjectedDependencies = {
|
|
4
|
+
baseRepository: DAL.RepositoryService;
|
|
5
|
+
accountTransactionService: ModulesSdkTypes.IMedusaInternalService<any>;
|
|
6
|
+
};
|
|
7
|
+
declare const StoreCreditService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<{
|
|
8
|
+
StoreCreditAccount: {
|
|
9
|
+
dto: ModuleStoreCreditAccount;
|
|
10
|
+
};
|
|
11
|
+
AccountTransaction: {
|
|
12
|
+
dto: ModuleAccountTransaction;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
declare class StoreCreditService extends StoreCreditService_base implements IStoreCreditModuleService {
|
|
16
|
+
protected baseRepository_: DAL.RepositoryService;
|
|
17
|
+
protected readonly accountTransactionService_: ModulesSdkTypes.IMedusaInternalService<InferEntityType<ModuleAccountTransaction>>;
|
|
18
|
+
constructor({ baseRepository, accountTransactionService, }: InjectedDependencies);
|
|
19
|
+
listStoreCreditAccounts(filters: ModuleStoreCreditAccountFilters, config?: FindConfig<ModuleStoreCreditAccount>, sharedContext?: Context): Promise<ModuleStoreCreditAccount[]>;
|
|
20
|
+
updateStoreCreditAccounts(data: ModuleUpdateStoreCreditAccount | ModuleUpdateStoreCreditAccount[], sharedContext?: Context): Promise<ModuleStoreCreditAccount[]>;
|
|
21
|
+
deleteStoreCreditAccounts(ids: string | string[], sharedContext?: Context): Promise<void>;
|
|
22
|
+
softDeleteStoreCreditAccounts<TReturnableLinkableKeys extends string = string>(ids: string | string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
|
|
23
|
+
retrieveAccountStats(data: ModuleRetrieveAccountStats, sharedContext?: Context): Promise<ModuleAccountStats>;
|
|
24
|
+
creditAccounts_(creditAccountsData: ModuleCreditAccount[], sharedContext?: Context): Promise<ModuleAccountTransaction[]>;
|
|
25
|
+
creditAccounts(data: ModuleCreditAccount[], sharedContext?: Context): Promise<ModuleAccountTransaction[]>;
|
|
26
|
+
debitAccounts(debitAccountsData: ModuleDebitAccount[], sharedContext?: Context): Promise<ModuleAccountTransaction[]>;
|
|
27
|
+
debitAccounts_(debitAccountsData: ModuleDebitAccount[], sharedContext?: Context): Promise<ModuleAccountTransaction[]>;
|
|
28
|
+
}
|
|
29
|
+
export default StoreCreditService;
|