@munchi_oy/license-sdk 0.3.0 → 0.4.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 +2 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,3 +30,5 @@ const snapshot = await license.entitlements(venueId); // full snapshot, null = u
|
|
|
30
30
|
| `mode: "enforce"` | `can()` returns `false` for features the venue doesn't have, or while it is suspended |
|
|
31
31
|
|
|
32
32
|
Call `invalidate(venueId)` when you receive a `license.changed` event.
|
|
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`).
|
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
LicenseClient: () => LicenseClient,
|
|
25
25
|
PLANS: () => PLANS,
|
|
26
26
|
PRODUCTS: () => PRODUCTS,
|
|
27
|
+
REQUESTABLE_PRODUCTS: () => REQUESTABLE_PRODUCTS,
|
|
27
28
|
USAGE_METRICS: () => USAGE_METRICS,
|
|
28
29
|
USAGE_METRIC_NAMES: () => USAGE_METRIC_NAMES
|
|
29
30
|
});
|
|
@@ -44,6 +45,13 @@ var PLANS = [
|
|
|
44
45
|
PRODUCTS.one
|
|
45
46
|
];
|
|
46
47
|
|
|
48
|
+
// ../license-core/src/requestable-products.ts
|
|
49
|
+
var REQUESTABLE_PRODUCTS = [
|
|
50
|
+
"ari",
|
|
51
|
+
"business_account",
|
|
52
|
+
"capital"
|
|
53
|
+
];
|
|
54
|
+
|
|
47
55
|
// ../license-core/src/usage-metrics.ts
|
|
48
56
|
var USAGE_METRICS = {
|
|
49
57
|
sms: "sum",
|
|
@@ -194,6 +202,7 @@ var LicenseClient = class {
|
|
|
194
202
|
LicenseClient,
|
|
195
203
|
PLANS,
|
|
196
204
|
PRODUCTS,
|
|
205
|
+
REQUESTABLE_PRODUCTS,
|
|
197
206
|
USAGE_METRICS,
|
|
198
207
|
USAGE_METRIC_NAMES
|
|
199
208
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -16,6 +16,14 @@ type KnownProductCode = (typeof PRODUCTS)[keyof typeof PRODUCTS];
|
|
|
16
16
|
declare const PLANS: readonly ["MUN-START", "MUN-ONE"];
|
|
17
17
|
type PlanCode = (typeof PLANS)[number];
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Products a store asks Munchi for in the dashboard because they can't be bought online
|
|
21
|
+
* (ADR 0022). These are the dashboard's product ids, not catalog codes (`MUN-*`); the mobile app
|
|
22
|
+
* has its own request flow (ADR 0021). A new one is added here first.
|
|
23
|
+
*/
|
|
24
|
+
declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital"];
|
|
25
|
+
type RequestableProduct = (typeof REQUESTABLE_PRODUCTS)[number];
|
|
26
|
+
|
|
19
27
|
/**
|
|
20
28
|
* What the apps report and the monthly bill can charge for: reminder SMS segments sent (added
|
|
21
29
|
* up), and loyalty members (the month's highest count, since Start includes 150 and each one
|
|
@@ -166,4 +174,4 @@ declare class LicenseClient {
|
|
|
166
174
|
private report;
|
|
167
175
|
}
|
|
168
176
|
|
|
169
|
-
export { type DeniedEvent, type KnownProductCode, LicenseClient, type LicenseClientOptions, PLANS, PRODUCTS, type PlanCode, type Snapshot, USAGE_METRICS, USAGE_METRIC_NAMES, type UsageMetric };
|
|
177
|
+
export { type DeniedEvent, type KnownProductCode, LicenseClient, type LicenseClientOptions, PLANS, PRODUCTS, type PlanCode, REQUESTABLE_PRODUCTS, type RequestableProduct, type Snapshot, USAGE_METRICS, USAGE_METRIC_NAMES, type UsageMetric };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ type KnownProductCode = (typeof PRODUCTS)[keyof typeof PRODUCTS];
|
|
|
16
16
|
declare const PLANS: readonly ["MUN-START", "MUN-ONE"];
|
|
17
17
|
type PlanCode = (typeof PLANS)[number];
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Products a store asks Munchi for in the dashboard because they can't be bought online
|
|
21
|
+
* (ADR 0022). These are the dashboard's product ids, not catalog codes (`MUN-*`); the mobile app
|
|
22
|
+
* has its own request flow (ADR 0021). A new one is added here first.
|
|
23
|
+
*/
|
|
24
|
+
declare const REQUESTABLE_PRODUCTS: readonly ["ari", "business_account", "capital"];
|
|
25
|
+
type RequestableProduct = (typeof REQUESTABLE_PRODUCTS)[number];
|
|
26
|
+
|
|
19
27
|
/**
|
|
20
28
|
* What the apps report and the monthly bill can charge for: reminder SMS segments sent (added
|
|
21
29
|
* up), and loyalty members (the month's highest count, since Start includes 150 and each one
|
|
@@ -166,4 +174,4 @@ declare class LicenseClient {
|
|
|
166
174
|
private report;
|
|
167
175
|
}
|
|
168
176
|
|
|
169
|
-
export { type DeniedEvent, type KnownProductCode, LicenseClient, type LicenseClientOptions, PLANS, PRODUCTS, type PlanCode, type Snapshot, USAGE_METRICS, USAGE_METRIC_NAMES, type UsageMetric };
|
|
177
|
+
export { type DeniedEvent, type KnownProductCode, LicenseClient, type LicenseClientOptions, PLANS, PRODUCTS, type PlanCode, REQUESTABLE_PRODUCTS, type RequestableProduct, type Snapshot, USAGE_METRICS, USAGE_METRIC_NAMES, type UsageMetric };
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,13 @@ var PLANS = [
|
|
|
16
16
|
PRODUCTS.one
|
|
17
17
|
];
|
|
18
18
|
|
|
19
|
+
// ../license-core/src/requestable-products.ts
|
|
20
|
+
var REQUESTABLE_PRODUCTS = [
|
|
21
|
+
"ari",
|
|
22
|
+
"business_account",
|
|
23
|
+
"capital"
|
|
24
|
+
];
|
|
25
|
+
|
|
19
26
|
// ../license-core/src/usage-metrics.ts
|
|
20
27
|
var USAGE_METRICS = {
|
|
21
28
|
sms: "sum",
|
|
@@ -165,6 +172,7 @@ export {
|
|
|
165
172
|
LicenseClient,
|
|
166
173
|
PLANS,
|
|
167
174
|
PRODUCTS,
|
|
175
|
+
REQUESTABLE_PRODUCTS,
|
|
168
176
|
USAGE_METRICS,
|
|
169
177
|
USAGE_METRIC_NAMES
|
|
170
178
|
};
|
package/package.json
CHANGED