@munchi_oy/license-sdk 0.6.0 → 0.8.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`, `sevenrooms`, `tableonline`, `zenchef`), with `STORE_ONLY_PRODUCTS` and `isStoreOnlyProduct` for the ones only a store asks for, never the whole group (the delivery apps, card payments at the POS or kiosk, and the reservation systems).
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,21 @@ 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",
111
+ "sevenrooms",
112
+ "tableonline",
113
+ "zenchef"
109
114
  ];
110
115
  var STORE_ONLY_PRODUCTS = [
111
116
  "foodora",
112
- "bolt"
117
+ "bolt",
118
+ "card_payments_pos",
119
+ "card_payments_kiosk",
120
+ "sevenrooms",
121
+ "tableonline",
122
+ "zenchef"
113
123
  ];
114
124
  var storeOnly = new Set(STORE_ONLY_PRODUCTS);
115
125
  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", "sevenrooms", "tableonline", "zenchef"];
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, card payments at the POS or kiosk and reservation systems are set up one store at
76
+ * a time, so only a store asks for them, never the whole group.
77
+ */
78
+ declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt", "card_payments_pos", "card_payments_kiosk", "sevenrooms", "tableonline", "zenchef"];
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", "sevenrooms", "tableonline", "zenchef"];
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, card payments at the POS or kiosk and reservation systems are set up one store at
76
+ * a time, so only a store asks for them, never the whole group.
77
+ */
78
+ declare const STORE_ONLY_PRODUCTS: readonly ["foodora", "bolt", "card_payments_pos", "card_payments_kiosk", "sevenrooms", "tableonline", "zenchef"];
76
79
  declare const isStoreOnlyProduct: (product: RequestableProduct) => boolean;
77
80
 
78
81
  /**
package/dist/index.js CHANGED
@@ -71,11 +71,21 @@ 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",
77
+ "sevenrooms",
78
+ "tableonline",
79
+ "zenchef"
75
80
  ];
76
81
  var STORE_ONLY_PRODUCTS = [
77
82
  "foodora",
78
- "bolt"
83
+ "bolt",
84
+ "card_payments_pos",
85
+ "card_payments_kiosk",
86
+ "sevenrooms",
87
+ "tableonline",
88
+ "zenchef"
79
89
  ];
80
90
  var storeOnly = new Set(STORE_ONLY_PRODUCTS);
81
91
  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.8.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",