@munchi_oy/license-sdk 0.6.0 → 0.7.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.
package/README.md CHANGED
@@ -31,6 +31,6 @@ const snapshot = await license.entitlements(venueId); // full snapshot, null = u
31
31
 
32
32
  Call `invalidate(venueId)` when you receive a `license.changed` event.
33
33
 
34
- It also exports the shared names: `PRODUCTS` and `PLANS` (catalog codes), `USAGE_METRICS` (what usage can cost money) and `REQUESTABLE_PRODUCTS` (what a store asks Munchi for in the dashboard: `ari`, `business_account`, `capital`, `foodora`, `bolt`), with `STORE_ONLY_PRODUCTS` and `isStoreOnlyProduct` for the ones only a store asks for, never the whole group (the delivery apps).
34
+ It also exports the shared names: `PRODUCTS` and `PLANS` (catalog codes), `USAGE_METRICS` (what usage can cost money) and `REQUESTABLE_PRODUCTS` (what a store asks Munchi for in the dashboard: `ari`, `business_account`, `capital`, `foodora`, `bolt`, `card_payments_pos`, `card_payments_kiosk`), with `STORE_ONLY_PRODUCTS` and `isStoreOnlyProduct` for the ones only a store asks for, never the whole group (the delivery apps and card payments at the POS or kiosk).
35
35
 
36
36
  For a group's company (ADR 0025) it exports `companyIds(country, { businessId, vatId })` (the IDs to store by the company's country, or `{ invalid: "businessId" | "vatId" }`; any country is accepted, Finland's are checked), `finnishBusinessId(input)` (the Y-tunnus as `NNNNNNN-C`, or `null` when its format or check digit is wrong), `finnishVatId(businessId)` (`FI` and its digits), and the types `LegalEntityChange` (the body of `PATCH /v1/accounts/:accountId/legal-entities/:legalEntityId`) and `LegalEntity` (its response).
package/dist/index.cjs CHANGED
@@ -105,11 +105,15 @@ var REQUESTABLE_PRODUCTS = [
105
105
  "business_account",
106
106
  "capital",
107
107
  "foodora",
108
- "bolt"
108
+ "bolt",
109
+ "card_payments_pos",
110
+ "card_payments_kiosk"
109
111
  ];
110
112
  var STORE_ONLY_PRODUCTS = [
111
113
  "foodora",
112
- "bolt"
114
+ "bolt",
115
+ "card_payments_pos",
116
+ "card_payments_kiosk"
113
117
  ];
114
118
  var storeOnly = new Set(STORE_ONLY_PRODUCTS);
115
119
  var isStoreOnlyProduct = /* @__PURE__ */ __name((product) => storeOnly.has(product), "isStoreOnlyProduct");
package/dist/index.d.cts CHANGED
@@ -69,10 +69,13 @@ declare const companyIds: (country: string, input: {
69
69
  * (ADR 0022). These are the dashboard's product ids, not catalog codes (`MUN-*`); the mobile app
70
70
  * has its own request flow (ADR 0021). A new one is added here first.
71
71
  */
72
- declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital", "foodora", "bolt"];
72
+ declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital", "foodora", "bolt", "card_payments_pos", "card_payments_kiosk"];
73
73
  type RequestableProduct = (typeof REQUESTABLE_PRODUCTS)[number];
74
- /** Delivery apps connect one store at a time, so only a store asks for them, never the whole group. */
75
- declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt"];
74
+ /**
75
+ * Delivery apps and card payments at the POS or kiosk are set up one store at a time, so only a
76
+ * store asks for them, never the whole group.
77
+ */
78
+ declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt", "card_payments_pos", "card_payments_kiosk"];
76
79
  declare const isStoreOnlyProduct: (product: RequestableProduct) => boolean;
77
80
 
78
81
  /**
package/dist/index.d.ts CHANGED
@@ -69,10 +69,13 @@ declare const companyIds: (country: string, input: {
69
69
  * (ADR 0022). These are the dashboard's product ids, not catalog codes (`MUN-*`); the mobile app
70
70
  * has its own request flow (ADR 0021). A new one is added here first.
71
71
  */
72
- declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital", "foodora", "bolt"];
72
+ declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital", "foodora", "bolt", "card_payments_pos", "card_payments_kiosk"];
73
73
  type RequestableProduct = (typeof REQUESTABLE_PRODUCTS)[number];
74
- /** Delivery apps connect one store at a time, so only a store asks for them, never the whole group. */
75
- declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt"];
74
+ /**
75
+ * Delivery apps and card payments at the POS or kiosk are set up one store at a time, so only a
76
+ * store asks for them, never the whole group.
77
+ */
78
+ declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt", "card_payments_pos", "card_payments_kiosk"];
76
79
  declare const isStoreOnlyProduct: (product: RequestableProduct) => boolean;
77
80
 
78
81
  /**
package/dist/index.js CHANGED
@@ -71,11 +71,15 @@ var REQUESTABLE_PRODUCTS = [
71
71
  "business_account",
72
72
  "capital",
73
73
  "foodora",
74
- "bolt"
74
+ "bolt",
75
+ "card_payments_pos",
76
+ "card_payments_kiosk"
75
77
  ];
76
78
  var STORE_ONLY_PRODUCTS = [
77
79
  "foodora",
78
- "bolt"
80
+ "bolt",
81
+ "card_payments_pos",
82
+ "card_payments_kiosk"
79
83
  ];
80
84
  var storeOnly = new Set(STORE_ONLY_PRODUCTS);
81
85
  var isStoreOnlyProduct = /* @__PURE__ */ __name((product) => storeOnly.has(product), "isStoreOnlyProduct");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@munchi_oy/license-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Client for the Munchi license service: cached entitlements and feature checks per venue",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",