@medusajs/loyalty-plugin 0.0.1
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/components/action-menu.js +63 -0
- package/.medusa/server/src/admin/components/chip-group.js +82 -0
- package/.medusa/server/src/admin/components/chip-input.js +157 -0
- package/.medusa/server/src/admin/components/combobox.js +324 -0
- package/.medusa/server/src/admin/components/conditional-tooltip.js +15 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-boolean-cell.js +66 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-cell-container.js +77 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-currency-cell.js +110 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-duplicate-cell.js +16 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-keyboard-shortcut-modal.js +214 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-number-cell.js +77 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-readonly-cell.js +32 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-root.js +743 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-row-error-indicator.js +37 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-skeleton.js +54 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-text-cell.js +66 -0
- package/.medusa/server/src/admin/components/data-grid/components/data-grid-toggleable-number-cell.js +166 -0
- package/.medusa/server/src/admin/components/data-grid/components/index.js +16 -0
- package/.medusa/server/src/admin/components/data-grid/context/data-grid-context.js +7 -0
- package/.medusa/server/src/admin/components/data-grid/context/index.js +6 -0
- package/.medusa/server/src/admin/components/data-grid/context/use-data-grid-context.js +14 -0
- package/.medusa/server/src/admin/components/data-grid/data-grid.js +31 -0
- package/.medusa/server/src/admin/components/data-grid/helpers/create-data-grid-column-helper.js +28 -0
- package/.medusa/server/src/admin/components/data-grid/helpers/create-data-grid-price-columns.js +85 -0
- package/.medusa/server/src/admin/components/data-grid/helpers/index.js +6 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/index.js +31 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-cell-error.js +50 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-cell-handlers.js +123 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-cell-metadata.js +52 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-cell-snapshot.js +43 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-cell.js +191 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-clipboard-events.js +70 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-column-visibility.js +51 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-duplicate-cell.js +15 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-error-highlighting.js +86 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-form-handlers.js +149 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-keydown-event.js +482 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-mouse-up-event.js +64 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-navigation.js +81 -0
- package/.medusa/server/src/admin/components/data-grid/hooks/use-data-grid-query-tool.js +14 -0
- package/.medusa/server/src/admin/components/data-grid/index.js +8 -0
- package/.medusa/server/src/admin/components/data-grid/models/data-grid-bulk-update-command.js +27 -0
- package/.medusa/server/src/admin/components/data-grid/models/data-grid-matrix.js +296 -0
- package/.medusa/server/src/admin/components/data-grid/models/data-grid-query-tool.js +62 -0
- package/.medusa/server/src/admin/components/data-grid/models/data-grid-update-command.js +25 -0
- package/.medusa/server/src/admin/components/data-grid/models/index.js +10 -0
- package/.medusa/server/src/admin/components/data-grid/types.js +1 -0
- package/.medusa/server/src/admin/components/data-grid/utils.js +18 -0
- package/.medusa/server/src/admin/components/data-table/components/data-table-status-cell/data-table-status-cell.js +36 -0
- package/.medusa/server/src/admin/components/data-table/data-table.js +271 -0
- package/.medusa/server/src/admin/components/data-table/helpers/general/use-data-table-date-columns.js +51 -0
- package/.medusa/server/src/admin/components/data-table/helpers/general/use-data-table-date-filters.js +90 -0
- package/.medusa/server/src/admin/components/data-table/helpers/sales-channels/index.js +10 -0
- package/.medusa/server/src/admin/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.js +48 -0
- package/.medusa/server/src/admin/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.js +19 -0
- package/.medusa/server/src/admin/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.js +30 -0
- package/.medusa/server/src/admin/components/data-table/helpers/sales-channels/use-sales-channel-table-query.js +23 -0
- package/.medusa/server/src/admin/components/data-table/index.js +4 -0
- package/.medusa/server/src/admin/components/data-table.js +249 -0
- package/.medusa/server/src/admin/components/display-id.js +18 -0
- package/.medusa/server/src/admin/components/file-upload.js +116 -0
- package/.medusa/server/src/admin/components/form.js +151 -0
- package/.medusa/server/src/admin/components/handle-input.js +22 -0
- package/.medusa/server/src/admin/components/header.js +41 -0
- package/.medusa/server/src/admin/components/icon-avatar.js +27 -0
- package/.medusa/server/src/admin/components/json-view-section.js +139 -0
- package/.medusa/server/src/admin/components/keybound-form.js +32 -0
- package/.medusa/server/src/admin/components/layouts/single-column.js +7 -0
- package/.medusa/server/src/admin/components/layouts/two-column.js +13 -0
- package/.medusa/server/src/admin/components/listicle.js +20 -0
- package/.medusa/server/src/admin/components/modals/index.js +19 -0
- package/.medusa/server/src/admin/components/modals/route-drawer/index.js +4 -0
- package/.medusa/server/src/admin/components/modals/route-drawer/route-drawer.js +57 -0
- package/.medusa/server/src/admin/components/modals/route-focus-modal/index.js +4 -0
- package/.medusa/server/src/admin/components/modals/route-focus-modal/route-focus-modal.js +71 -0
- package/.medusa/server/src/admin/components/modals/route-modal-form/index.js +4 -0
- package/.medusa/server/src/admin/components/modals/route-modal-form/route-modal-form.js +60 -0
- package/.medusa/server/src/admin/components/modals/route-modal-provider/index.js +6 -0
- package/.medusa/server/src/admin/components/modals/route-modal-provider/route-modal-context.js +5 -0
- package/.medusa/server/src/admin/components/modals/route-modal-provider/route-provider.js +30 -0
- package/.medusa/server/src/admin/components/modals/route-modal-provider/use-route-modal.js +12 -0
- package/.medusa/server/src/admin/components/modals/stacked-drawer/index.js +5 -0
- package/.medusa/server/src/admin/components/modals/stacked-drawer/stacked-drawer.js +55 -0
- package/.medusa/server/src/admin/components/modals/stacked-focus-modal/index.js +5 -0
- package/.medusa/server/src/admin/components/modals/stacked-focus-modal/stacked-focus-modal.js +63 -0
- package/.medusa/server/src/admin/components/modals/stacked-modal-provider/index.js +6 -0
- package/.medusa/server/src/admin/components/modals/stacked-modal-provider/stacked-modal-context.js +5 -0
- package/.medusa/server/src/admin/components/modals/stacked-modal-provider/stacked-modal-provider.js +47 -0
- package/.medusa/server/src/admin/components/modals/stacked-modal-provider/use-stacked-modal.js +14 -0
- package/.medusa/server/src/admin/components/placeholder-cell.js +7 -0
- package/.medusa/server/src/admin/components/product/product-cell/index.js +5 -0
- package/.medusa/server/src/admin/components/product/product-cell/product-cell.js +15 -0
- package/.medusa/server/src/admin/components/product/product-status-cell/index.js +5 -0
- package/.medusa/server/src/admin/components/product/product-status-cell/product-status-cell.js +18 -0
- package/.medusa/server/src/admin/components/product/sales-channels-cell/index.js +5 -0
- package/.medusa/server/src/admin/components/product/sales-channels-cell/sales-channels-cell.js +31 -0
- package/.medusa/server/src/admin/components/product/variant-cell/index.js +5 -0
- package/.medusa/server/src/admin/components/product/variant-cell/variant-cell.js +15 -0
- package/.medusa/server/src/admin/components/section-row.js +32 -0
- package/.medusa/server/src/admin/components/sidebar-link.js +31 -0
- package/.medusa/server/src/admin/components/sortable-list.js +152 -0
- package/.medusa/server/src/admin/components/switch-box.js +43 -0
- package/.medusa/server/src/admin/components/tax-badge.js +18 -0
- package/.medusa/server/src/admin/components/thumbnail.js +28 -0
- package/.medusa/server/src/admin/components/upload-media-form-item.js +83 -0
- package/.medusa/server/src/admin/hooks/api/customers.js +26 -0
- package/.medusa/server/src/admin/hooks/api/gift-cards.js +107 -0
- package/.medusa/server/src/admin/hooks/api/order.js +16 -0
- package/.medusa/server/src/admin/hooks/api/price-preferences.js +19 -0
- package/.medusa/server/src/admin/hooks/api/products.js +127 -0
- package/.medusa/server/src/admin/hooks/api/regions.js +17 -0
- package/.medusa/server/src/admin/hooks/api/sales-channels.js +28 -0
- package/.medusa/server/src/admin/hooks/api/store-credit-accounts.js +41 -0
- package/.medusa/server/src/admin/hooks/api/store.js +31 -0
- package/.medusa/server/src/admin/hooks/api/transaction-groups.js +23 -0
- package/.medusa/server/src/admin/hooks/api/transactions.js +23 -0
- package/.medusa/server/src/admin/hooks/commands/use-command-history.js +45 -0
- package/.medusa/server/src/admin/hooks/common/use-combobox-data.js +59 -0
- package/.medusa/server/src/admin/hooks/common/use-data-table-date-filters.js +89 -0
- package/.medusa/server/src/admin/hooks/common/use-date.js +32 -0
- package/.medusa/server/src/admin/hooks/common/use-debounced-search.js +22 -0
- package/.medusa/server/src/admin/hooks/common/use-query-params.js +14 -0
- package/.medusa/server/src/admin/hooks/query/use-customers-filters.js +30 -0
- package/.medusa/server/src/admin/hooks/query/use-transaction-groups-filters.js +30 -0
- package/.medusa/server/src/admin/hooks/sales-channels/index.js +10 -0
- package/.medusa/server/src/admin/hooks/sales-channels/use-sales-channel-table-columns.js +48 -0
- package/.medusa/server/src/admin/hooks/sales-channels/use-sales-channel-table-empty-state.js +19 -0
- package/.medusa/server/src/admin/hooks/sales-channels/use-sales-channel-table-filters.js +30 -0
- package/.medusa/server/src/admin/hooks/sales-channels/use-sales-channel-table-query.js +23 -0
- package/.medusa/server/src/admin/lib/currencies.js +729 -0
- package/.medusa/server/src/admin/lib/query-key.js +17 -0
- package/.medusa/server/src/admin/lib/sdk.js +10 -0
- package/.medusa/server/src/admin/routes/gift-card-products/@create/page.js +75 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/@denominations/components/gift-card-product-edit-denominations-form.js +172 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/@denominations/page.js +30 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/@edit/components/gift-card-product-edit-form.js +180 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/@edit/page.js +30 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/components/product-general-section.js +97 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/components/product-media-section.js +162 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/components/product-sales-channel-section.js +89 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/components/product-variant-section.js +199 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/edit-product-media-form/edit-product-media-form.js +353 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/edit-product-media-form/index.js +5 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-gallery/index.js +4 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-gallery/product-media-gallery.js +247 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-view/index.js +4 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-view/product-media-view-context.js +5 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-view/product-media-view.js +48 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/components/product-media-view/use-product-media-view.js +14 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/media/page.js +28 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/page.js +40 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/prices/components/prices-edit.js +121 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/prices/components/variant-pricing-form.js +72 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/prices/page.js +23 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/sales-channels/components/edit-sales-channel-form.js +123 -0
- package/.medusa/server/src/admin/routes/gift-card-products/_id_/sales-channels/page.js +23 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/general-form-section.js +1 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-denominations-form.js +98 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-details-form.js +28 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form-denominations.js +96 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form-general.js +90 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form-media.js +288 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form-organize-section.js +111 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form-organize.js +23 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-create-form.js +285 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/gift-card-product-sales-channel-stacked-modal.js +124 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/index.js +4 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/schema.js +112 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-product-create-form/types.js +1 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-products-table/columns.js +35 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-products-table/filters.js +11 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-products-table/gift-card-products-table.js +61 -0
- package/.medusa/server/src/admin/routes/gift-card-products/components/gift-card-products-table/query.js +23 -0
- package/.medusa/server/src/admin/routes/gift-card-products/page.js +18 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/@expiration/page.js +137 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/@note/page.js +87 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/@owner/components/transfer-icon.js +352 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/@owner/page.js +116 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-balance-section.js +49 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-general-section.js +177 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-note-section.js +27 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-order-section.js +33 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-owner-section.js +33 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/gift-card-transactions-section.js +18 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/transactions-table/columns.js +50 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/components/transactions-table/query.js +23 -0
- package/.medusa/server/src/admin/routes/gift-cards/_id_/page.js +78 -0
- package/.medusa/server/src/admin/routes/gift-cards/components/gift-card-products-section.js +40 -0
- package/.medusa/server/src/admin/routes/gift-cards/components/gift-cards-table/columns.js +57 -0
- package/.medusa/server/src/admin/routes/gift-cards/components/gift-cards-table/filters.js +13 -0
- package/.medusa/server/src/admin/routes/gift-cards/components/gift-cards-table/gift-cards-table.js +61 -0
- package/.medusa/server/src/admin/routes/gift-cards/components/gift-cards-table/query.js +23 -0
- package/.medusa/server/src/admin/routes/gift-cards/page.js +27 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/credit-card-icon.js +126 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/store-credit-account-balance-section.js +31 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/store-credit-account-details-section.js +43 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/transactions-table/columns.js +44 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/transactions-table/filters.js +18 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/transactions-table/query.js +37 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/components/transactions-table/table.js +58 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/_id_/page.js +39 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/components/store-credit-accounts-table/columns.js +58 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/components/store-credit-accounts-table/filters.js +13 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/components/store-credit-accounts-table/query.js +31 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/components/store-credit-accounts-table/table.js +56 -0
- package/.medusa/server/src/admin/routes/store-credit-accounts/page.js +19 -0
- package/.medusa/server/src/admin/utils/date-utils.js +27 -0
- package/.medusa/server/src/admin/utils/format-amount.js +9 -0
- package/.medusa/server/src/admin/utils/format-date.js +21 -0
- package/.medusa/server/src/admin/utils/refs.js +20 -0
- package/.medusa/server/src/admin/utils/statuses.js +23 -0
- package/.medusa/server/src/admin/utils/validations.js +71 -0
- package/.medusa/server/src/admin/utils/variants.js +92 -0
- package/.medusa/server/src/admin/widgets/customer-gift-cards-widget.js +67 -0
- package/.medusa/server/src/admin/widgets/customer-store-credit-widget.js +42 -0
- package/.medusa/server/src/admin/widgets/order-gift-cards-widget.js +58 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/redeem/route.js +25 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/route.js +41 -0
- package/.medusa/server/src/api/admin/gift-cards/[id]/transfer/route.js +24 -0
- package/.medusa/server/src/api/admin/gift-cards/middlewares.js +55 -0
- package/.medusa/server/src/api/admin/gift-cards/query-config.js +29 -0
- package/.medusa/server/src/api/admin/gift-cards/route.js +42 -0
- package/.medusa/server/src/api/admin/gift-cards/validators.js +69 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/[id]/route.js +24 -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.js +38 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/query-config.js +43 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/route.js +52 -0
- package/.medusa/server/src/api/admin/store-credit-accounts/validators.js +51 -0
- package/.medusa/server/src/api/admin/transaction-groups/middlewares.js +16 -0
- package/.medusa/server/src/api/admin/transaction-groups/query-config.js +13 -0
- package/.medusa/server/src/api/admin/transaction-groups/route.js +27 -0
- package/.medusa/server/src/api/admin/transaction-groups/validators.js +19 -0
- package/.medusa/server/src/api/middlewares.js +22 -0
- package/.medusa/server/src/api/store/carts/[id]/gift-cards/route.js +43 -0
- package/.medusa/server/src/api/store/carts/middlewares.js +26 -0
- package/.medusa/server/src/api/store/carts/query-config.js +9 -0
- package/.medusa/server/src/api/store/carts/validators.js +15 -0
- package/.medusa/server/src/api/store/gift-card-invitations/[code]/accept/route.js +24 -0
- package/.medusa/server/src/api/store/gift-card-invitations/[code]/reject/route.js +24 -0
- package/.medusa/server/src/api/store/gift-card-invitations/middlewares.js +30 -0
- package/.medusa/server/src/api/store/gift-card-invitations/query-config.js +17 -0
- package/.medusa/server/src/api/store/gift-card-invitations/validators.js +14 -0
- package/.medusa/server/src/api/store/gift-cards/[id]/invitation/route.js +26 -0
- package/.medusa/server/src/api/store/gift-cards/[id]/redeem/route.js +24 -0
- package/.medusa/server/src/api/store/gift-cards/[id]/route.js +16 -0
- package/.medusa/server/src/api/store/gift-cards/middlewares.js +46 -0
- package/.medusa/server/src/api/store/gift-cards/query-config.js +26 -0
- package/.medusa/server/src/api/store/gift-cards/route.js +28 -0
- package/.medusa/server/src/api/store/gift-cards/validators.js +26 -0
- package/.medusa/server/src/api/store/store-credit-accounts/[id]/route.js +31 -0
- package/.medusa/server/src/api/store/store-credit-accounts/middlewares.js +28 -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.js +40 -0
- package/.medusa/server/src/api/store/store-credit-accounts/validators.js +17 -0
- package/.medusa/server/src/links/cart-gift-cards-link.js +13 -0
- package/.medusa/server/src/links/customer-gift-card-link.js +13 -0
- package/.medusa/server/src/links/customer-store-credit-account-link.js +13 -0
- package/.medusa/server/src/links/order-gift-cards-link.js +13 -0
- package/.medusa/server/src/links/order-line-item-gift-card-link.js +19 -0
- package/.medusa/server/src/modules/loyalty/index.js +12 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250123130553.js +17 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250127174331.js +19 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141026.js +19 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141429.js +14 -0
- package/.medusa/server/src/modules/loyalty/migrations/Migration20250206144714.js +14 -0
- package/.medusa/server/src/modules/loyalty/models/gift-card-invitation.js +20 -0
- package/.medusa/server/src/modules/loyalty/models/gift-card.js +28 -0
- package/.medusa/server/src/modules/loyalty/service.js +15 -0
- package/.medusa/server/src/modules/store-credit/index.js +12 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250129115518.js +16 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130213237.js +18 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250130220640.js +19 -0
- package/.medusa/server/src/modules/store-credit/migrations/Migration20250131205753.js +14 -0
- package/.medusa/server/src/modules/store-credit/models/account-transaction.js +27 -0
- package/.medusa/server/src/modules/store-credit/models/store-credit-account.js +29 -0
- package/.medusa/server/src/modules/store-credit/models/transaction-group.js +28 -0
- package/.medusa/server/src/modules/store-credit/service.js +412 -0
- package/.medusa/server/src/providers/index.js +12 -0
- package/.medusa/server/src/providers/store-credit-payment/index.js +12 -0
- package/.medusa/server/src/providers/store-credit-payment/service.js +181 -0
- package/.medusa/server/src/subscribers/create-gift-card.js +94 -0
- package/.medusa/server/src/types/cart/index.js +3 -0
- package/.medusa/server/src/types/http/gift-card.js +3 -0
- package/.medusa/server/src/types/http/index.js +21 -0
- package/.medusa/server/src/types/http/store-credit-account.js +3 -0
- package/.medusa/server/src/types/http/transaction-group.js +3 -0
- package/.medusa/server/src/types/http/transaction.js +3 -0
- package/.medusa/server/src/types/index.js +21 -0
- package/.medusa/server/src/types/loyalty/index.js +20 -0
- package/.medusa/server/src/types/loyalty/module.js +17 -0
- package/.medusa/server/src/types/loyalty/service.js +3 -0
- package/.medusa/server/src/types/loyalty/workflows.js +3 -0
- package/.medusa/server/src/types/modules.js +14 -0
- package/.medusa/server/src/types/store-credit/index.js +19 -0
- package/.medusa/server/src/types/store-credit/module.js +10 -0
- package/.medusa/server/src/types/store-credit/service.js +3 -0
- package/.medusa/server/src/workflows/carts/workflows/add-gift-card-to-cart.js +167 -0
- package/.medusa/server/src/workflows/carts/workflows/confirm-cart-credit-lines.js +95 -0
- package/.medusa/server/src/workflows/carts/workflows/refresh-cart-gift-cards.js +136 -0
- package/.medusa/server/src/workflows/carts/workflows/remove-gift-cart-from-cart.js +66 -0
- package/.medusa/server/src/workflows/common/steps/validate-presence-of.js +11 -0
- package/.medusa/server/src/workflows/gift-card-invitation/steps/create-gift-card-invitation.js +17 -0
- package/.medusa/server/src/workflows/gift-card-invitation/steps/delete-gift-card-invitation.js +20 -0
- package/.medusa/server/src/workflows/gift-card-invitation/steps/update-gift-card-invitation.js +31 -0
- package/.medusa/server/src/workflows/gift-card-invitation/workflows/accept-gift-card-invitation.js +79 -0
- package/.medusa/server/src/workflows/gift-card-invitation/workflows/create-gift-card-invitation.js +66 -0
- package/.medusa/server/src/workflows/gift-card-invitation/workflows/delete-gift-card-invitation.js +10 -0
- package/.medusa/server/src/workflows/gift-card-invitation/workflows/reject-gift-card-invitation.js +70 -0
- package/.medusa/server/src/workflows/gift-cards/steps/create-gift-cards.js +17 -0
- package/.medusa/server/src/workflows/gift-cards/steps/delete-gift-cards.js +17 -0
- package/.medusa/server/src/workflows/gift-cards/steps/retrieve-gift-card-balance.js +20 -0
- package/.medusa/server/src/workflows/gift-cards/steps/update-gift-cards.js +34 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/create-gift-cards.js +12 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/delete-gift-card.js +19 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/redeem-gift-card.js +90 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/transfer-gift-card.js +48 -0
- package/.medusa/server/src/workflows/gift-cards/workflows/update-gift-cards.js +12 -0
- package/.medusa/server/src/workflows/hooks/after-order-created.js +31 -0
- package/.medusa/server/src/workflows/hooks/after-order-credit-lines-created.js +31 -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.js +27 -0
- package/.medusa/server/src/workflows/orders/workflows/link-gift-cards-to-order.js +58 -0
- package/.medusa/server/src/workflows/orders/workflows/refund-gift-card-credit-lines.js +96 -0
- package/.medusa/server/src/workflows/store-credit/steps/create-store-credit-accounts.js +17 -0
- package/.medusa/server/src/workflows/store-credit/steps/create-transaction-groups.js +17 -0
- package/.medusa/server/src/workflows/store-credit/steps/credit-account.js +17 -0
- package/.medusa/server/src/workflows/store-credit/steps/debit-account.js +17 -0
- package/.medusa/server/src/workflows/store-credit/workflows/create-store-credit-accounts.js +57 -0
- package/.medusa/server/src/workflows/store-credit/workflows/create-transaction-groups.js +12 -0
- package/.medusa/server/src/workflows/store-credit/workflows/credit-accounts.js +12 -0
- package/.medusa/server/src/workflows/store-credit/workflows/debit-accounts.js +12 -0
- package/.medusa/server/types/loyalty/module.js +8 -0
- package/README.md +62 -0
- package/package.json +94 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
const currencies = {
|
|
2
|
+
USD: {
|
|
3
|
+
code: "USD",
|
|
4
|
+
name: "US Dollar",
|
|
5
|
+
symbol_native: "$",
|
|
6
|
+
decimal_digits: 2
|
|
7
|
+
},
|
|
8
|
+
CAD: {
|
|
9
|
+
code: "CAD",
|
|
10
|
+
name: "Canadian Dollar",
|
|
11
|
+
symbol_native: "$",
|
|
12
|
+
decimal_digits: 2
|
|
13
|
+
},
|
|
14
|
+
EUR: {
|
|
15
|
+
code: "EUR",
|
|
16
|
+
name: "Euro",
|
|
17
|
+
symbol_native: "€",
|
|
18
|
+
decimal_digits: 2
|
|
19
|
+
},
|
|
20
|
+
AED: {
|
|
21
|
+
code: "AED",
|
|
22
|
+
name: "United Arab Emirates Dirham",
|
|
23
|
+
symbol_native: "د.إ.",
|
|
24
|
+
decimal_digits: 2
|
|
25
|
+
},
|
|
26
|
+
AFN: {
|
|
27
|
+
code: "AFN",
|
|
28
|
+
name: "Afghan Afghani",
|
|
29
|
+
symbol_native: "؋",
|
|
30
|
+
decimal_digits: 0
|
|
31
|
+
},
|
|
32
|
+
ALL: {
|
|
33
|
+
code: "ALL",
|
|
34
|
+
name: "Albanian Lek",
|
|
35
|
+
symbol_native: "Lek",
|
|
36
|
+
decimal_digits: 0
|
|
37
|
+
},
|
|
38
|
+
AMD: {
|
|
39
|
+
code: "AMD",
|
|
40
|
+
name: "Armenian Dram",
|
|
41
|
+
symbol_native: "դր.",
|
|
42
|
+
decimal_digits: 0
|
|
43
|
+
},
|
|
44
|
+
ARS: {
|
|
45
|
+
code: "ARS",
|
|
46
|
+
name: "Argentine Peso",
|
|
47
|
+
symbol_native: "$",
|
|
48
|
+
decimal_digits: 2
|
|
49
|
+
},
|
|
50
|
+
AUD: {
|
|
51
|
+
code: "AUD",
|
|
52
|
+
name: "Australian Dollar",
|
|
53
|
+
symbol_native: "$",
|
|
54
|
+
decimal_digits: 2
|
|
55
|
+
},
|
|
56
|
+
AZN: {
|
|
57
|
+
code: "AZN",
|
|
58
|
+
name: "Azerbaijani Manat",
|
|
59
|
+
symbol_native: "ман.",
|
|
60
|
+
decimal_digits: 2
|
|
61
|
+
},
|
|
62
|
+
BAM: {
|
|
63
|
+
code: "BAM",
|
|
64
|
+
name: "Bosnia-Herzegovina Convertible Mark",
|
|
65
|
+
symbol_native: "KM",
|
|
66
|
+
decimal_digits: 2
|
|
67
|
+
},
|
|
68
|
+
BDT: {
|
|
69
|
+
code: "BDT",
|
|
70
|
+
name: "Bangladeshi Taka",
|
|
71
|
+
symbol_native: "৳",
|
|
72
|
+
decimal_digits: 2
|
|
73
|
+
},
|
|
74
|
+
BGN: {
|
|
75
|
+
code: "BGN",
|
|
76
|
+
name: "Bulgarian Lev",
|
|
77
|
+
symbol_native: "лв.",
|
|
78
|
+
decimal_digits: 2
|
|
79
|
+
},
|
|
80
|
+
BHD: {
|
|
81
|
+
code: "BHD",
|
|
82
|
+
name: "Bahraini Dinar",
|
|
83
|
+
symbol_native: "د.ب.",
|
|
84
|
+
decimal_digits: 3
|
|
85
|
+
},
|
|
86
|
+
BIF: {
|
|
87
|
+
code: "BIF",
|
|
88
|
+
name: "Burundian Franc",
|
|
89
|
+
symbol_native: "FBu",
|
|
90
|
+
decimal_digits: 0
|
|
91
|
+
},
|
|
92
|
+
BND: {
|
|
93
|
+
code: "BND",
|
|
94
|
+
name: "Brunei Dollar",
|
|
95
|
+
symbol_native: "$",
|
|
96
|
+
decimal_digits: 2
|
|
97
|
+
},
|
|
98
|
+
BOB: {
|
|
99
|
+
code: "BOB",
|
|
100
|
+
name: "Bolivian Boliviano",
|
|
101
|
+
symbol_native: "Bs",
|
|
102
|
+
decimal_digits: 2
|
|
103
|
+
},
|
|
104
|
+
BRL: {
|
|
105
|
+
code: "BRL",
|
|
106
|
+
name: "Brazilian Real",
|
|
107
|
+
symbol_native: "R$",
|
|
108
|
+
decimal_digits: 2
|
|
109
|
+
},
|
|
110
|
+
BWP: {
|
|
111
|
+
code: "BWP",
|
|
112
|
+
name: "Botswanan Pula",
|
|
113
|
+
symbol_native: "P",
|
|
114
|
+
decimal_digits: 2
|
|
115
|
+
},
|
|
116
|
+
BYN: {
|
|
117
|
+
code: "BYN",
|
|
118
|
+
name: "Belarusian Ruble",
|
|
119
|
+
symbol_native: "руб.",
|
|
120
|
+
decimal_digits: 2
|
|
121
|
+
},
|
|
122
|
+
BZD: {
|
|
123
|
+
code: "BZD",
|
|
124
|
+
name: "Belize Dollar",
|
|
125
|
+
symbol_native: "$",
|
|
126
|
+
decimal_digits: 2
|
|
127
|
+
},
|
|
128
|
+
CDF: {
|
|
129
|
+
code: "CDF",
|
|
130
|
+
name: "Congolese Franc",
|
|
131
|
+
symbol_native: "FrCD",
|
|
132
|
+
decimal_digits: 2
|
|
133
|
+
},
|
|
134
|
+
CHF: {
|
|
135
|
+
code: "CHF",
|
|
136
|
+
name: "Swiss Franc",
|
|
137
|
+
symbol_native: "CHF",
|
|
138
|
+
decimal_digits: 2
|
|
139
|
+
},
|
|
140
|
+
CLP: {
|
|
141
|
+
code: "CLP",
|
|
142
|
+
name: "Chilean Peso",
|
|
143
|
+
symbol_native: "$",
|
|
144
|
+
decimal_digits: 0
|
|
145
|
+
},
|
|
146
|
+
CNY: {
|
|
147
|
+
code: "CNY",
|
|
148
|
+
name: "Chinese Yuan",
|
|
149
|
+
symbol_native: "CN¥",
|
|
150
|
+
decimal_digits: 2
|
|
151
|
+
},
|
|
152
|
+
COP: {
|
|
153
|
+
code: "COP",
|
|
154
|
+
name: "Colombian Peso",
|
|
155
|
+
symbol_native: "$",
|
|
156
|
+
decimal_digits: 0
|
|
157
|
+
},
|
|
158
|
+
CRC: {
|
|
159
|
+
code: "CRC",
|
|
160
|
+
name: "Costa Rican Colón",
|
|
161
|
+
symbol_native: "₡",
|
|
162
|
+
decimal_digits: 0
|
|
163
|
+
},
|
|
164
|
+
CVE: {
|
|
165
|
+
code: "CVE",
|
|
166
|
+
name: "Cape Verdean Escudo",
|
|
167
|
+
symbol_native: "CV$",
|
|
168
|
+
decimal_digits: 2
|
|
169
|
+
},
|
|
170
|
+
CZK: {
|
|
171
|
+
code: "CZK",
|
|
172
|
+
name: "Czech Republic Koruna",
|
|
173
|
+
symbol_native: "Kč",
|
|
174
|
+
decimal_digits: 2
|
|
175
|
+
},
|
|
176
|
+
DJF: {
|
|
177
|
+
code: "DJF",
|
|
178
|
+
name: "Djiboutian Franc",
|
|
179
|
+
symbol_native: "Fdj",
|
|
180
|
+
decimal_digits: 0
|
|
181
|
+
},
|
|
182
|
+
DKK: {
|
|
183
|
+
code: "DKK",
|
|
184
|
+
name: "Danish Krone",
|
|
185
|
+
symbol_native: "kr",
|
|
186
|
+
decimal_digits: 2
|
|
187
|
+
},
|
|
188
|
+
DOP: {
|
|
189
|
+
code: "DOP",
|
|
190
|
+
name: "Dominican Peso",
|
|
191
|
+
symbol_native: "RD$",
|
|
192
|
+
decimal_digits: 2
|
|
193
|
+
},
|
|
194
|
+
DZD: {
|
|
195
|
+
code: "DZD",
|
|
196
|
+
name: "Algerian Dinar",
|
|
197
|
+
symbol_native: "د.ج.",
|
|
198
|
+
decimal_digits: 2
|
|
199
|
+
},
|
|
200
|
+
EEK: {
|
|
201
|
+
code: "EEK",
|
|
202
|
+
name: "Estonian Kroon",
|
|
203
|
+
symbol_native: "kr",
|
|
204
|
+
decimal_digits: 2
|
|
205
|
+
},
|
|
206
|
+
EGP: {
|
|
207
|
+
code: "EGP",
|
|
208
|
+
name: "Egyptian Pound",
|
|
209
|
+
symbol_native: "ج.م.",
|
|
210
|
+
decimal_digits: 2
|
|
211
|
+
},
|
|
212
|
+
ERN: {
|
|
213
|
+
code: "ERN",
|
|
214
|
+
name: "Eritrean Nakfa",
|
|
215
|
+
symbol_native: "Nfk",
|
|
216
|
+
decimal_digits: 2
|
|
217
|
+
},
|
|
218
|
+
ETB: {
|
|
219
|
+
code: "ETB",
|
|
220
|
+
name: "Ethiopian Birr",
|
|
221
|
+
symbol_native: "Br",
|
|
222
|
+
decimal_digits: 2
|
|
223
|
+
},
|
|
224
|
+
GBP: {
|
|
225
|
+
code: "GBP",
|
|
226
|
+
name: "British Pound Sterling",
|
|
227
|
+
symbol_native: "£",
|
|
228
|
+
decimal_digits: 2
|
|
229
|
+
},
|
|
230
|
+
GEL: {
|
|
231
|
+
code: "GEL",
|
|
232
|
+
name: "Georgian Lari",
|
|
233
|
+
symbol_native: "GEL",
|
|
234
|
+
decimal_digits: 2
|
|
235
|
+
},
|
|
236
|
+
GHS: {
|
|
237
|
+
code: "GHS",
|
|
238
|
+
name: "Ghanaian Cedi",
|
|
239
|
+
symbol_native: "GH₵",
|
|
240
|
+
decimal_digits: 2
|
|
241
|
+
},
|
|
242
|
+
GNF: {
|
|
243
|
+
code: "GNF",
|
|
244
|
+
name: "Guinean Franc",
|
|
245
|
+
symbol_native: "FG",
|
|
246
|
+
decimal_digits: 0
|
|
247
|
+
},
|
|
248
|
+
GTQ: {
|
|
249
|
+
code: "GTQ",
|
|
250
|
+
name: "Guatemalan Quetzal",
|
|
251
|
+
symbol_native: "Q",
|
|
252
|
+
decimal_digits: 2
|
|
253
|
+
},
|
|
254
|
+
HKD: {
|
|
255
|
+
code: "HKD",
|
|
256
|
+
name: "Hong Kong Dollar",
|
|
257
|
+
symbol_native: "$",
|
|
258
|
+
decimal_digits: 2
|
|
259
|
+
},
|
|
260
|
+
HNL: {
|
|
261
|
+
code: "HNL",
|
|
262
|
+
name: "Honduran Lempira",
|
|
263
|
+
symbol_native: "L",
|
|
264
|
+
decimal_digits: 2
|
|
265
|
+
},
|
|
266
|
+
HRK: {
|
|
267
|
+
code: "HRK",
|
|
268
|
+
name: "Croatian Kuna",
|
|
269
|
+
symbol_native: "kn",
|
|
270
|
+
decimal_digits: 2
|
|
271
|
+
},
|
|
272
|
+
HUF: {
|
|
273
|
+
code: "HUF",
|
|
274
|
+
name: "Hungarian Forint",
|
|
275
|
+
symbol_native: "Ft",
|
|
276
|
+
decimal_digits: 0
|
|
277
|
+
},
|
|
278
|
+
IDR: {
|
|
279
|
+
code: "IDR",
|
|
280
|
+
name: "Indonesian Rupiah",
|
|
281
|
+
symbol_native: "Rp",
|
|
282
|
+
decimal_digits: 0
|
|
283
|
+
},
|
|
284
|
+
ILS: {
|
|
285
|
+
code: "ILS",
|
|
286
|
+
name: "Israeli New Sheqel",
|
|
287
|
+
symbol_native: "₪",
|
|
288
|
+
decimal_digits: 2
|
|
289
|
+
},
|
|
290
|
+
INR: {
|
|
291
|
+
code: "INR",
|
|
292
|
+
name: "Indian Rupee",
|
|
293
|
+
symbol_native: "₹",
|
|
294
|
+
decimal_digits: 2
|
|
295
|
+
},
|
|
296
|
+
IQD: {
|
|
297
|
+
code: "IQD",
|
|
298
|
+
name: "Iraqi Dinar",
|
|
299
|
+
symbol_native: "د.ع.",
|
|
300
|
+
decimal_digits: 0
|
|
301
|
+
},
|
|
302
|
+
IRR: {
|
|
303
|
+
code: "IRR",
|
|
304
|
+
name: "Iranian Rial",
|
|
305
|
+
symbol_native: "﷼",
|
|
306
|
+
decimal_digits: 0
|
|
307
|
+
},
|
|
308
|
+
ISK: {
|
|
309
|
+
code: "ISK",
|
|
310
|
+
name: "Icelandic Króna",
|
|
311
|
+
symbol_native: "kr",
|
|
312
|
+
decimal_digits: 0
|
|
313
|
+
},
|
|
314
|
+
JMD: {
|
|
315
|
+
code: "JMD",
|
|
316
|
+
name: "Jamaican Dollar",
|
|
317
|
+
symbol_native: "$",
|
|
318
|
+
decimal_digits: 2
|
|
319
|
+
},
|
|
320
|
+
JOD: {
|
|
321
|
+
code: "JOD",
|
|
322
|
+
name: "Jordanian Dinar",
|
|
323
|
+
symbol_native: "د.أ.",
|
|
324
|
+
decimal_digits: 3
|
|
325
|
+
},
|
|
326
|
+
JPY: {
|
|
327
|
+
code: "JPY",
|
|
328
|
+
name: "Japanese Yen",
|
|
329
|
+
symbol_native: "¥",
|
|
330
|
+
decimal_digits: 0
|
|
331
|
+
},
|
|
332
|
+
KES: {
|
|
333
|
+
code: "KES",
|
|
334
|
+
name: "Kenyan Shilling",
|
|
335
|
+
symbol_native: "Ksh",
|
|
336
|
+
decimal_digits: 2
|
|
337
|
+
},
|
|
338
|
+
KHR: {
|
|
339
|
+
code: "KHR",
|
|
340
|
+
name: "Cambodian Riel",
|
|
341
|
+
symbol_native: "៛",
|
|
342
|
+
decimal_digits: 2
|
|
343
|
+
},
|
|
344
|
+
KMF: {
|
|
345
|
+
code: "KMF",
|
|
346
|
+
name: "Comorian Franc",
|
|
347
|
+
symbol_native: "FC",
|
|
348
|
+
decimal_digits: 0
|
|
349
|
+
},
|
|
350
|
+
KRW: {
|
|
351
|
+
code: "KRW",
|
|
352
|
+
name: "South Korean Won",
|
|
353
|
+
symbol_native: "₩",
|
|
354
|
+
decimal_digits: 0
|
|
355
|
+
},
|
|
356
|
+
KWD: {
|
|
357
|
+
code: "KWD",
|
|
358
|
+
name: "Kuwaiti Dinar",
|
|
359
|
+
symbol_native: "د.ك.",
|
|
360
|
+
decimal_digits: 3
|
|
361
|
+
},
|
|
362
|
+
KZT: {
|
|
363
|
+
code: "KZT",
|
|
364
|
+
name: "Kazakhstani Tenge",
|
|
365
|
+
symbol_native: "тңг.",
|
|
366
|
+
decimal_digits: 2
|
|
367
|
+
},
|
|
368
|
+
LBP: {
|
|
369
|
+
code: "LBP",
|
|
370
|
+
name: "Lebanese Pound",
|
|
371
|
+
symbol_native: "ل.ل.",
|
|
372
|
+
decimal_digits: 0
|
|
373
|
+
},
|
|
374
|
+
LKR: {
|
|
375
|
+
code: "LKR",
|
|
376
|
+
name: "Sri Lankan Rupee",
|
|
377
|
+
symbol_native: "SL Re",
|
|
378
|
+
decimal_digits: 2
|
|
379
|
+
},
|
|
380
|
+
LTL: {
|
|
381
|
+
code: "LTL",
|
|
382
|
+
name: "Lithuanian Litas",
|
|
383
|
+
symbol_native: "Lt",
|
|
384
|
+
decimal_digits: 2
|
|
385
|
+
},
|
|
386
|
+
LVL: {
|
|
387
|
+
code: "LVL",
|
|
388
|
+
name: "Latvian Lats",
|
|
389
|
+
symbol_native: "Ls",
|
|
390
|
+
decimal_digits: 2
|
|
391
|
+
},
|
|
392
|
+
LYD: {
|
|
393
|
+
code: "LYD",
|
|
394
|
+
name: "Libyan Dinar",
|
|
395
|
+
symbol_native: "د.ل.",
|
|
396
|
+
decimal_digits: 3
|
|
397
|
+
},
|
|
398
|
+
MAD: {
|
|
399
|
+
code: "MAD",
|
|
400
|
+
name: "Moroccan Dirham",
|
|
401
|
+
symbol_native: "د.م.",
|
|
402
|
+
decimal_digits: 2
|
|
403
|
+
},
|
|
404
|
+
MDL: {
|
|
405
|
+
code: "MDL",
|
|
406
|
+
name: "Moldovan Leu",
|
|
407
|
+
symbol_native: "MDL",
|
|
408
|
+
decimal_digits: 2
|
|
409
|
+
},
|
|
410
|
+
MGA: {
|
|
411
|
+
code: "MGA",
|
|
412
|
+
name: "Malagasy Ariary",
|
|
413
|
+
symbol_native: "MGA",
|
|
414
|
+
decimal_digits: 0
|
|
415
|
+
},
|
|
416
|
+
MKD: {
|
|
417
|
+
code: "MKD",
|
|
418
|
+
name: "Macedonian Denar",
|
|
419
|
+
symbol_native: "MKD",
|
|
420
|
+
decimal_digits: 2
|
|
421
|
+
},
|
|
422
|
+
MMK: {
|
|
423
|
+
code: "MMK",
|
|
424
|
+
name: "Myanma Kyat",
|
|
425
|
+
symbol_native: "K",
|
|
426
|
+
decimal_digits: 0
|
|
427
|
+
},
|
|
428
|
+
MNT: {
|
|
429
|
+
code: "MNT",
|
|
430
|
+
name: "Mongolian Tugrig",
|
|
431
|
+
symbol_native: "₮",
|
|
432
|
+
decimal_digits: 0
|
|
433
|
+
},
|
|
434
|
+
MOP: {
|
|
435
|
+
code: "MOP",
|
|
436
|
+
name: "Macanese Pataca",
|
|
437
|
+
symbol_native: "MOP$",
|
|
438
|
+
decimal_digits: 2
|
|
439
|
+
},
|
|
440
|
+
MUR: {
|
|
441
|
+
code: "MUR",
|
|
442
|
+
name: "Mauritian Rupee",
|
|
443
|
+
symbol_native: "MURs",
|
|
444
|
+
decimal_digits: 0
|
|
445
|
+
},
|
|
446
|
+
MXN: {
|
|
447
|
+
code: "MXN",
|
|
448
|
+
name: "Mexican Peso",
|
|
449
|
+
symbol_native: "$",
|
|
450
|
+
decimal_digits: 2
|
|
451
|
+
},
|
|
452
|
+
MYR: {
|
|
453
|
+
code: "MYR",
|
|
454
|
+
name: "Malaysian Ringgit",
|
|
455
|
+
symbol_native: "RM",
|
|
456
|
+
decimal_digits: 2
|
|
457
|
+
},
|
|
458
|
+
MZN: {
|
|
459
|
+
code: "MZN",
|
|
460
|
+
name: "Mozambican Metical",
|
|
461
|
+
symbol_native: "MTn",
|
|
462
|
+
decimal_digits: 2
|
|
463
|
+
},
|
|
464
|
+
NAD: {
|
|
465
|
+
code: "NAD",
|
|
466
|
+
name: "Namibian Dollar",
|
|
467
|
+
symbol_native: "N$",
|
|
468
|
+
decimal_digits: 2
|
|
469
|
+
},
|
|
470
|
+
NGN: {
|
|
471
|
+
code: "NGN",
|
|
472
|
+
name: "Nigerian Naira",
|
|
473
|
+
symbol_native: "₦",
|
|
474
|
+
decimal_digits: 2
|
|
475
|
+
},
|
|
476
|
+
NIO: {
|
|
477
|
+
code: "NIO",
|
|
478
|
+
name: "Nicaraguan Córdoba",
|
|
479
|
+
symbol_native: "C$",
|
|
480
|
+
decimal_digits: 2
|
|
481
|
+
},
|
|
482
|
+
NOK: {
|
|
483
|
+
code: "NOK",
|
|
484
|
+
name: "Norwegian Krone",
|
|
485
|
+
symbol_native: "kr",
|
|
486
|
+
decimal_digits: 2
|
|
487
|
+
},
|
|
488
|
+
NPR: {
|
|
489
|
+
code: "NPR",
|
|
490
|
+
name: "Nepalese Rupee",
|
|
491
|
+
symbol_native: "नेरू",
|
|
492
|
+
decimal_digits: 2
|
|
493
|
+
},
|
|
494
|
+
NZD: {
|
|
495
|
+
code: "NZD",
|
|
496
|
+
name: "New Zealand Dollar",
|
|
497
|
+
symbol_native: "$",
|
|
498
|
+
decimal_digits: 2
|
|
499
|
+
},
|
|
500
|
+
OMR: {
|
|
501
|
+
code: "OMR",
|
|
502
|
+
name: "Omani Rial",
|
|
503
|
+
symbol_native: "ر.ع.",
|
|
504
|
+
decimal_digits: 3
|
|
505
|
+
},
|
|
506
|
+
PAB: {
|
|
507
|
+
code: "PAB",
|
|
508
|
+
name: "Panamanian Balboa",
|
|
509
|
+
symbol_native: "B/.",
|
|
510
|
+
decimal_digits: 2
|
|
511
|
+
},
|
|
512
|
+
PEN: {
|
|
513
|
+
code: "PEN",
|
|
514
|
+
name: "Peruvian Nuevo Sol",
|
|
515
|
+
symbol_native: "S/.",
|
|
516
|
+
decimal_digits: 2
|
|
517
|
+
},
|
|
518
|
+
PHP: {
|
|
519
|
+
code: "PHP",
|
|
520
|
+
name: "Philippine Peso",
|
|
521
|
+
symbol_native: "₱",
|
|
522
|
+
decimal_digits: 2
|
|
523
|
+
},
|
|
524
|
+
PKR: {
|
|
525
|
+
code: "PKR",
|
|
526
|
+
name: "Pakistani Rupee",
|
|
527
|
+
symbol_native: "₨",
|
|
528
|
+
decimal_digits: 0
|
|
529
|
+
},
|
|
530
|
+
PLN: {
|
|
531
|
+
code: "PLN",
|
|
532
|
+
name: "Polish Zloty",
|
|
533
|
+
symbol_native: "zł",
|
|
534
|
+
decimal_digits: 2
|
|
535
|
+
},
|
|
536
|
+
PYG: {
|
|
537
|
+
code: "PYG",
|
|
538
|
+
name: "Paraguayan Guarani",
|
|
539
|
+
symbol_native: "₲",
|
|
540
|
+
decimal_digits: 0
|
|
541
|
+
},
|
|
542
|
+
QAR: {
|
|
543
|
+
code: "QAR",
|
|
544
|
+
name: "Qatari Rial",
|
|
545
|
+
symbol_native: "ر.ق.",
|
|
546
|
+
decimal_digits: 2
|
|
547
|
+
},
|
|
548
|
+
RON: {
|
|
549
|
+
code: "RON",
|
|
550
|
+
name: "Romanian Leu",
|
|
551
|
+
symbol_native: "RON",
|
|
552
|
+
decimal_digits: 2
|
|
553
|
+
},
|
|
554
|
+
RSD: {
|
|
555
|
+
code: "RSD",
|
|
556
|
+
name: "Serbian Dinar",
|
|
557
|
+
symbol_native: "дин.",
|
|
558
|
+
decimal_digits: 0
|
|
559
|
+
},
|
|
560
|
+
RUB: {
|
|
561
|
+
code: "RUB",
|
|
562
|
+
name: "Russian Ruble",
|
|
563
|
+
symbol_native: "₽.",
|
|
564
|
+
decimal_digits: 2
|
|
565
|
+
},
|
|
566
|
+
RWF: {
|
|
567
|
+
code: "RWF",
|
|
568
|
+
name: "Rwandan Franc",
|
|
569
|
+
symbol_native: "FR",
|
|
570
|
+
decimal_digits: 0
|
|
571
|
+
},
|
|
572
|
+
SAR: {
|
|
573
|
+
code: "SAR",
|
|
574
|
+
name: "Saudi Riyal",
|
|
575
|
+
symbol_native: "ر.س.",
|
|
576
|
+
decimal_digits: 2
|
|
577
|
+
},
|
|
578
|
+
SDG: {
|
|
579
|
+
code: "SDG",
|
|
580
|
+
name: "Sudanese Pound",
|
|
581
|
+
symbol_native: "SDG",
|
|
582
|
+
decimal_digits: 2
|
|
583
|
+
},
|
|
584
|
+
SEK: {
|
|
585
|
+
code: "SEK",
|
|
586
|
+
name: "Swedish Krona",
|
|
587
|
+
symbol_native: "kr",
|
|
588
|
+
decimal_digits: 2
|
|
589
|
+
},
|
|
590
|
+
SGD: {
|
|
591
|
+
code: "SGD",
|
|
592
|
+
name: "Singapore Dollar",
|
|
593
|
+
symbol_native: "$",
|
|
594
|
+
decimal_digits: 2
|
|
595
|
+
},
|
|
596
|
+
SOS: {
|
|
597
|
+
code: "SOS",
|
|
598
|
+
name: "Somali Shilling",
|
|
599
|
+
symbol_native: "Ssh",
|
|
600
|
+
decimal_digits: 0
|
|
601
|
+
},
|
|
602
|
+
SYP: {
|
|
603
|
+
code: "SYP",
|
|
604
|
+
name: "Syrian Pound",
|
|
605
|
+
symbol_native: "ل.س.",
|
|
606
|
+
decimal_digits: 0
|
|
607
|
+
},
|
|
608
|
+
THB: {
|
|
609
|
+
code: "THB",
|
|
610
|
+
name: "Thai Baht",
|
|
611
|
+
symbol_native: "฿",
|
|
612
|
+
decimal_digits: 2
|
|
613
|
+
},
|
|
614
|
+
TND: {
|
|
615
|
+
code: "TND",
|
|
616
|
+
name: "Tunisian Dinar",
|
|
617
|
+
symbol_native: "د.ت.",
|
|
618
|
+
decimal_digits: 3
|
|
619
|
+
},
|
|
620
|
+
TOP: {
|
|
621
|
+
code: "TOP",
|
|
622
|
+
name: "Tongan Paʻanga",
|
|
623
|
+
symbol_native: "T$",
|
|
624
|
+
decimal_digits: 2
|
|
625
|
+
},
|
|
626
|
+
TRY: {
|
|
627
|
+
code: "TRY",
|
|
628
|
+
name: "Turkish Lira",
|
|
629
|
+
symbol_native: "TL",
|
|
630
|
+
decimal_digits: 2
|
|
631
|
+
},
|
|
632
|
+
TTD: {
|
|
633
|
+
code: "TTD",
|
|
634
|
+
name: "Trinidad and Tobago Dollar",
|
|
635
|
+
symbol_native: "$",
|
|
636
|
+
decimal_digits: 2
|
|
637
|
+
},
|
|
638
|
+
TWD: {
|
|
639
|
+
code: "TWD",
|
|
640
|
+
name: "New Taiwan Dollar",
|
|
641
|
+
symbol_native: "NT$",
|
|
642
|
+
decimal_digits: 2
|
|
643
|
+
},
|
|
644
|
+
TZS: {
|
|
645
|
+
code: "TZS",
|
|
646
|
+
name: "Tanzanian Shilling",
|
|
647
|
+
symbol_native: "TSh",
|
|
648
|
+
decimal_digits: 0
|
|
649
|
+
},
|
|
650
|
+
UAH: {
|
|
651
|
+
code: "UAH",
|
|
652
|
+
name: "Ukrainian Hryvnia",
|
|
653
|
+
symbol_native: "₴",
|
|
654
|
+
decimal_digits: 2
|
|
655
|
+
},
|
|
656
|
+
UGX: {
|
|
657
|
+
code: "UGX",
|
|
658
|
+
name: "Ugandan Shilling",
|
|
659
|
+
symbol_native: "USh",
|
|
660
|
+
decimal_digits: 0
|
|
661
|
+
},
|
|
662
|
+
UYU: {
|
|
663
|
+
code: "UYU",
|
|
664
|
+
name: "Uruguayan Peso",
|
|
665
|
+
symbol_native: "$",
|
|
666
|
+
decimal_digits: 2
|
|
667
|
+
},
|
|
668
|
+
UZS: {
|
|
669
|
+
code: "UZS",
|
|
670
|
+
name: "Uzbekistan Som",
|
|
671
|
+
symbol_native: "UZS",
|
|
672
|
+
decimal_digits: 0
|
|
673
|
+
},
|
|
674
|
+
VEF: {
|
|
675
|
+
code: "VEF",
|
|
676
|
+
name: "Venezuelan Bolívar",
|
|
677
|
+
symbol_native: "Bs.F.",
|
|
678
|
+
decimal_digits: 2
|
|
679
|
+
},
|
|
680
|
+
VND: {
|
|
681
|
+
code: "VND",
|
|
682
|
+
name: "Vietnamese Dong",
|
|
683
|
+
symbol_native: "₫",
|
|
684
|
+
decimal_digits: 0
|
|
685
|
+
},
|
|
686
|
+
XAF: {
|
|
687
|
+
code: "XAF",
|
|
688
|
+
name: "CFA Franc BEAC",
|
|
689
|
+
symbol_native: "FCFA",
|
|
690
|
+
decimal_digits: 0
|
|
691
|
+
},
|
|
692
|
+
XOF: {
|
|
693
|
+
code: "XOF",
|
|
694
|
+
name: "CFA Franc BCEAO",
|
|
695
|
+
symbol_native: "CFA",
|
|
696
|
+
decimal_digits: 0
|
|
697
|
+
},
|
|
698
|
+
YER: {
|
|
699
|
+
code: "YER",
|
|
700
|
+
name: "Yemeni Rial",
|
|
701
|
+
symbol_native: "ر.ي.",
|
|
702
|
+
decimal_digits: 0
|
|
703
|
+
},
|
|
704
|
+
ZAR: {
|
|
705
|
+
code: "ZAR",
|
|
706
|
+
name: "South African Rand",
|
|
707
|
+
symbol_native: "R",
|
|
708
|
+
decimal_digits: 2
|
|
709
|
+
},
|
|
710
|
+
ZMK: {
|
|
711
|
+
code: "ZMK",
|
|
712
|
+
name: "Zambian Kwacha",
|
|
713
|
+
symbol_native: "ZK",
|
|
714
|
+
decimal_digits: 0
|
|
715
|
+
},
|
|
716
|
+
ZWL: {
|
|
717
|
+
code: "ZWL",
|
|
718
|
+
name: "Zimbabwean Dollar",
|
|
719
|
+
symbol_native: "ZWL$",
|
|
720
|
+
decimal_digits: 0
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
function getCurrencySymbol(code) {
|
|
724
|
+
return currencies[code.toUpperCase()].symbol_native;
|
|
725
|
+
}
|
|
726
|
+
export {
|
|
727
|
+
currencies,
|
|
728
|
+
getCurrencySymbol
|
|
729
|
+
};
|