@evinvest/sites-contract 0.1.1 → 0.1.2
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/dist/booking.js +2 -2
- package/dist/experiments.js +2 -2
- package/dist/place.js +3 -3
- package/dist/pricing.js +2 -2
- package/package.json +1 -1
package/dist/booking.js
CHANGED
|
@@ -2,8 +2,8 @@ import { BOOKING_LIMITS as LIMIT, BOOKING_PROVIDERS, DAY_PARTS, PAGE_PROVIDERS }
|
|
|
2
2
|
import { at, isDate, isObject } from "./text.js";
|
|
3
3
|
export const isBookingProvider = (v) => BOOKING_PROVIDERS.some(p => p === v);
|
|
4
4
|
export const isPageProvider = (v) => PAGE_PROVIDERS.some(p => p === v);
|
|
5
|
-
const LEAD_REF = new RegExp(LIMIT.leadRef);
|
|
6
|
-
const CAL_SEGMENT = new RegExp(LIMIT.calComSegment);
|
|
5
|
+
const LEAD_REF = /* @__PURE__ */ new RegExp(LIMIT.leadRef);
|
|
6
|
+
const CAL_SEGMENT = /* @__PURE__ */ new RegExp(LIMIT.calComSegment);
|
|
7
7
|
const LABEL = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$/;
|
|
8
8
|
const APPOINTMENTS = "/calendar/appointments/";
|
|
9
9
|
/** `lead-<row>-<8 lowercase hex>`, the row 1 or more: the panel's lead id for a site's lead. */
|
package/dist/experiments.js
CHANGED
|
@@ -28,8 +28,8 @@ export function parseLiveExperiments(body) {
|
|
|
28
28
|
}
|
|
29
29
|
return { experiments };
|
|
30
30
|
}
|
|
31
|
-
const KEY = new RegExp(EXPERIMENT_LIMITS.key);
|
|
32
|
-
const VARIANT = new RegExp(EXPERIMENT_LIMITS.variant);
|
|
31
|
+
const KEY = /* @__PURE__ */ new RegExp(EXPERIMENT_LIMITS.key);
|
|
32
|
+
const VARIANT = /* @__PURE__ */ new RegExp(EXPERIMENT_LIMITS.variant);
|
|
33
33
|
/**
|
|
34
34
|
* Why the panel would refuse this experiment of `experiments.declared@1`, or `null`
|
|
35
35
|
* (`contracts/vectors/ingest/declarations.json`): a key; 2 to 32 variants, unique, each a slug;
|
package/dist/place.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { checkBookingConfig } from "./booking.js";
|
|
2
2
|
import { DAYS, MESSENGERS, PLACE_LIMITS as LIMIT } from "./generated/place.js";
|
|
3
3
|
import { at, charCount, hasControl, hasWhitespace, isDate, isObject, trim } from "./text.js";
|
|
4
|
-
const E164 = new RegExp(LIMIT.e164);
|
|
5
|
-
const TELEGRAM_BOT = new RegExp(LIMIT.telegramBot);
|
|
6
|
-
const TIME = new RegExp(LIMIT.time);
|
|
4
|
+
const E164 = /* @__PURE__ */ new RegExp(LIMIT.e164);
|
|
5
|
+
const TELEGRAM_BOT = /* @__PURE__ */ new RegExp(LIMIT.telegramBot);
|
|
6
|
+
const TIME = /* @__PURE__ */ new RegExp(LIMIT.time);
|
|
7
7
|
class Check {
|
|
8
8
|
problems = [];
|
|
9
9
|
fail(path, code) {
|
package/dist/pricing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INPUT_KINDS, PRICING_CURRENCY, PRICING_FORMAT, PRICING_LIMITS as LIMIT } from "./generated/pricing.js";
|
|
2
2
|
import { at, isDate, isObject, trim } from "./text.js";
|
|
3
|
-
const SLUG = new RegExp(LIMIT.slug);
|
|
4
|
-
const LOCALE = new RegExp(LIMIT.locale);
|
|
3
|
+
const SLUG = /* @__PURE__ */ new RegExp(LIMIT.slug);
|
|
4
|
+
const LOCALE = /* @__PURE__ */ new RegExp(LIMIT.locale);
|
|
5
5
|
const EFFECT_FIELD = { add: "addCents", multiply: "multiplyBp", discount: "discountBp" };
|
|
6
6
|
const EFFECT_MAX = { add: LIMIT.maxPriceCents, multiply: LIMIT.maxMultiplyBp, discount: LIMIT.maxDiscountBp };
|
|
7
7
|
class Check {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evinvest/sites-contract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The Service-Arb sites ↔ panel contract in TS: the shapes and vocabularies generated from the panel's Rust and protos, and the one TS implementation of what both sides run — pricing, booking and place checks, phone numbers, the ingest events a site sends.",
|
|
5
5
|
"license": "BlueOak-1.0.0",
|
|
6
6
|
"publishConfig": {
|