@hartl-services/medusa-contracts 1.1.0 → 1.2.0

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.
@@ -1,3 +1,25 @@
1
+ /** Plugin key and feature keys of the affiliate plugin (plugin feature toggles). */
2
+ export declare const AFFILIATE_PLUGIN_KEY: "affiliate";
3
+ export declare const AFFILIATE_FEATURES: {
4
+ readonly partnerPortal: "partner_portal";
5
+ };
6
+ /**
7
+ * Product tag (its value) of a product only an active partner (e.g. a
8
+ * therapist) may see and order. The backend refuses to complete a cart with
9
+ * such a product for anyone else; storefronts hide it.
10
+ */
11
+ export declare const PARTNER_ONLY_PRODUCT_TAG: "partner-only";
12
+ /**
13
+ * Product category metadata flag (`true`): the category, its subcategories
14
+ * and every product in them are for active partners only, like a product
15
+ * tagged with `PARTNER_ONLY_PRODUCT_TAG`.
16
+ */
17
+ export declare const PARTNER_ONLY_CATEGORY_METADATA_KEY: "partner_only";
18
+ /**
19
+ * Error message (HTTP 400) of adding a partner-only product to the cart and
20
+ * of completing a cart with one, for anyone but an active partner.
21
+ */
22
+ export declare const PARTNER_ONLY_PRODUCT_MESSAGE: "Dieses Produkt ist nur f\u00FCr freigeschaltete Partner:innen erh\u00E4ltlich.";
1
23
  export declare const affiliateStorePaths: {
2
24
  readonly get: {
3
25
  readonly cartReferral: (cartId: string) => string;
@@ -1,7 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.affiliateAdminPaths = exports.affiliateStorePaths = void 0;
3
+ exports.affiliateAdminPaths = exports.affiliateStorePaths = exports.PARTNER_ONLY_PRODUCT_MESSAGE = exports.PARTNER_ONLY_CATEGORY_METADATA_KEY = exports.PARTNER_ONLY_PRODUCT_TAG = exports.AFFILIATE_FEATURES = exports.AFFILIATE_PLUGIN_KEY = void 0;
4
4
  const pathSegment = (value) => encodeURIComponent(value);
5
+ /** Plugin key and feature keys of the affiliate plugin (plugin feature toggles). */
6
+ exports.AFFILIATE_PLUGIN_KEY = "affiliate";
7
+ exports.AFFILIATE_FEATURES = {
8
+ partnerPortal: "partner_portal",
9
+ };
10
+ /**
11
+ * Product tag (its value) of a product only an active partner (e.g. a
12
+ * therapist) may see and order. The backend refuses to complete a cart with
13
+ * such a product for anyone else; storefronts hide it.
14
+ */
15
+ exports.PARTNER_ONLY_PRODUCT_TAG = "partner-only";
16
+ /**
17
+ * Product category metadata flag (`true`): the category, its subcategories
18
+ * and every product in them are for active partners only, like a product
19
+ * tagged with `PARTNER_ONLY_PRODUCT_TAG`.
20
+ */
21
+ exports.PARTNER_ONLY_CATEGORY_METADATA_KEY = "partner_only";
22
+ /**
23
+ * Error message (HTTP 400) of adding a partner-only product to the cart and
24
+ * of completing a cart with one, for anyone but an active partner.
25
+ */
26
+ exports.PARTNER_ONLY_PRODUCT_MESSAGE = "Dieses Produkt ist nur für freigeschaltete Partner:innen erhältlich.";
5
27
  exports.affiliateStorePaths = {
6
28
  get: {
7
29
  cartReferral: (cartId) => `/store/affiliate-referrals/carts/${pathSegment(cartId)}`,
@@ -1,4 +1,26 @@
1
1
  const pathSegment = (value) => encodeURIComponent(value);
2
+ /** Plugin key and feature keys of the affiliate plugin (plugin feature toggles). */
3
+ export const AFFILIATE_PLUGIN_KEY = "affiliate";
4
+ export const AFFILIATE_FEATURES = {
5
+ partnerPortal: "partner_portal",
6
+ };
7
+ /**
8
+ * Product tag (its value) of a product only an active partner (e.g. a
9
+ * therapist) may see and order. The backend refuses to complete a cart with
10
+ * such a product for anyone else; storefronts hide it.
11
+ */
12
+ export const PARTNER_ONLY_PRODUCT_TAG = "partner-only";
13
+ /**
14
+ * Product category metadata flag (`true`): the category, its subcategories
15
+ * and every product in them are for active partners only, like a product
16
+ * tagged with `PARTNER_ONLY_PRODUCT_TAG`.
17
+ */
18
+ export const PARTNER_ONLY_CATEGORY_METADATA_KEY = "partner_only";
19
+ /**
20
+ * Error message (HTTP 400) of adding a partner-only product to the cart and
21
+ * of completing a cart with one, for anyone but an active partner.
22
+ */
23
+ export const PARTNER_ONLY_PRODUCT_MESSAGE = "Dieses Produkt ist nur für freigeschaltete Partner:innen erhältlich.";
2
24
  export const affiliateStorePaths = {
3
25
  get: {
4
26
  cartReferral: (cartId) => `/store/affiliate-referrals/carts/${pathSegment(cartId)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hartl-services/medusa-contracts",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "files": [