@evinvest/sites-contract 0.1.0 → 0.1.1

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.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { type BookingCode, type BookingConfig, type BookingProvider, type DayPart, type PageProvider } from "./generated/contract.js";
1
+ import { type DayPart } from "./generated/booking.js";
2
+ import type { BookingCode } from "./generated/codes.js";
3
+ import type { BookingConfig, BookingProvider, PageProvider } from "./generated/types.js";
2
4
  import type { BookingRequestedV1 } from "./generated/wire.js";
3
5
  /** One thing wrong with a place's `booking`: where below it (`""`, `default`, `providers.cal_com.url`) and why. */
4
6
  export interface BookingProblem {
package/dist/booking.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BOOKING_LIMITS as LIMIT, BOOKING_PROVIDERS, DAY_PARTS, PAGE_PROVIDERS, } from "./generated/contract.js";
1
+ import { BOOKING_LIMITS as LIMIT, BOOKING_PROVIDERS, DAY_PARTS, PAGE_PROVIDERS } from "./generated/booking.js";
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);
@@ -1,4 +1,4 @@
1
- import { type LiveExperiments } from "./generated/contract.js";
1
+ import type { LiveExperiments } from "./generated/types.js";
2
2
  import type { ExperimentDeclaration } from "./generated/wire.js";
3
3
  /**
4
4
  * The panel's answer to `GET …/brands/{brand}/experiments`, or `null` when it is not one: an
@@ -1,4 +1,4 @@
1
- import { EXPERIMENT_LIMITS } from "./generated/contract.js";
1
+ import { EXPERIMENT_LIMITS } from "./generated/experiments.js";
2
2
  import { charCount, isObject, trim } from "./text.js";
3
3
  /**
4
4
  * The panel's answer to `GET …/brands/{brand}/experiments`, or `null` when it is not one: an
@@ -0,0 +1,12 @@
1
+ export declare const BOOKING_PROVIDERS: readonly ["manual", "link", "google_calendar", "cal_com"];
2
+ export declare const PAGE_PROVIDERS: readonly ["link", "google_calendar", "cal_com"];
3
+ export declare const BOOKING_LIMITS: {
4
+ readonly calComHosts: readonly ["cal.evinvest.ltd", "cal.com"];
5
+ readonly calComSegment: "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$";
6
+ readonly leadRef: "^lead-[1-9][0-9]{0,18}-[0-9a-f]{8}$";
7
+ readonly maxUrl: 2048;
8
+ };
9
+ export declare const BOOKING_STATUSES: readonly ["none", "requested", "booked", "canceled", "done", "no_show"];
10
+ export type BookingStatus = (typeof BOOKING_STATUSES)[number];
11
+ export declare const DAY_PARTS: readonly ["morning", "afternoon", "evening"];
12
+ export type DayPart = (typeof DAY_PARTS)[number];
@@ -0,0 +1,11 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const BOOKING_PROVIDERS = ["manual", "link", "google_calendar", "cal_com"];
3
+ export const PAGE_PROVIDERS = ["link", "google_calendar", "cal_com"];
4
+ export const BOOKING_LIMITS = {
5
+ "calComHosts": ["cal.evinvest.ltd", "cal.com"],
6
+ "calComSegment": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
7
+ "leadRef": "^lead-[1-9][0-9]{0,18}-[0-9a-f]{8}$",
8
+ "maxUrl": 2048,
9
+ };
10
+ export const BOOKING_STATUSES = ["none", "requested", "booked", "canceled", "done", "no_show"];
11
+ export const DAY_PARTS = ["morning", "afternoon", "evening"];
@@ -0,0 +1,6 @@
1
+ export declare const PRICING_CODES: readonly ["object", "missing", "unknownField", "format", "currency", "date", "int", "slug", "labels", "locale", "label", "list", "duplicate", "kind", "needKind", "noInput", "dearest", "labelMissing"];
2
+ export type PricingCode = (typeof PRICING_CODES)[number];
3
+ export declare const BOOKING_CODES: readonly ["shape", "unknown_key", "required", "provider_unknown", "provider_shape", "provider_extra", "manual", "url_type", "default_unknown", "default_unset", "format", "scheme", "fragment", "backslash", "userinfo", "ip", "port", "host", "google", "cal_host", "cal_path"];
4
+ export type BookingCode = (typeof BOOKING_CODES)[number];
5
+ export declare const PLACE_CODES: readonly ["object", "unknown_field", "required", "type", "blank", "too_long", "control", "e164", "telegram_bot", "messenger_unknown", "boolean", "shape", "empty", "too_many", "day", "duplicate", "time", "closes_before_opens", "postal_code", "coordinate", "https_url", "review_url", "locale", "rating_value", "rating_count", "instant"];
6
+ export type PlaceCode = (typeof PLACE_CODES)[number];
@@ -0,0 +1,4 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const PRICING_CODES = ["object", "missing", "unknownField", "format", "currency", "date", "int", "slug", "labels", "locale", "label", "list", "duplicate", "kind", "needKind", "noInput", "dearest", "labelMissing"];
3
+ export const BOOKING_CODES = ["shape", "unknown_key", "required", "provider_unknown", "provider_shape", "provider_extra", "manual", "url_type", "default_unknown", "default_unset", "format", "scheme", "fragment", "backslash", "userinfo", "ip", "port", "host", "google", "cal_host", "cal_path"];
4
+ export const PLACE_CODES = ["object", "unknown_field", "required", "type", "blank", "too_long", "control", "e164", "telegram_bot", "messenger_unknown", "boolean", "shape", "empty", "too_many", "day", "duplicate", "time", "closes_before_opens", "postal_code", "coordinate", "https_url", "review_url", "locale", "rating_value", "rating_count", "instant"];
@@ -0,0 +1,7 @@
1
+ export declare const EXPERIMENT_LIMITS: {
2
+ readonly key: "^[a-z0-9_]{1,64}$";
3
+ readonly maxExperiments: 64;
4
+ readonly maxSummary: 200;
5
+ readonly maxVariants: 32;
6
+ readonly variant: "^[a-z0-9_-]{1,32}$";
7
+ };
@@ -0,0 +1,8 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const EXPERIMENT_LIMITS = {
3
+ "key": "^[a-z0-9_]{1,64}$",
4
+ "maxExperiments": 64,
5
+ "maxSummary": 200,
6
+ "maxVariants": 32,
7
+ "variant": "^[a-z0-9_-]{1,32}$",
8
+ };
@@ -0,0 +1,13 @@
1
+ export declare const LEAD_LIMITS: {
2
+ readonly analyticsId: "^[A-Za-z0-9._:-]{1,128}$";
3
+ readonly maxEstimateInputs: 12;
4
+ readonly messageRef: "^[A-Z]{2,4}-[0-9A-HJKMNP-TV-Z]{4,8}$";
5
+ };
6
+ export declare const LEAD_CHANNELS: readonly ["form", "phone_inbound", "callback", "whatsapp", "telegram"];
7
+ export type LeadChannel = (typeof LEAD_CHANNELS)[number];
8
+ export declare const SITE_CHANNELS: readonly ["form", "callback", "whatsapp", "telegram"];
9
+ export type SiteChannel = (typeof SITE_CHANNELS)[number];
10
+ export declare const LEAD_SUSPECTS: readonly ["rate_limited", "too_fast"];
11
+ export type LeadSuspect = (typeof LEAD_SUSPECTS)[number];
12
+ export declare const LEAD_FLOWS: readonly ["quote", "estimate", "fixed"];
13
+ export type LeadFlow = (typeof LEAD_FLOWS)[number];
@@ -0,0 +1,10 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const LEAD_LIMITS = {
3
+ "analyticsId": "^[A-Za-z0-9._:-]{1,128}$",
4
+ "maxEstimateInputs": 12,
5
+ "messageRef": "^[A-Z]{2,4}-[0-9A-HJKMNP-TV-Z]{4,8}$",
6
+ };
7
+ export const LEAD_CHANNELS = ["form", "phone_inbound", "callback", "whatsapp", "telegram"];
8
+ export const SITE_CHANNELS = ["form", "callback", "whatsapp", "telegram"];
9
+ export const LEAD_SUSPECTS = ["rate_limited", "too_fast"];
10
+ export const LEAD_FLOWS = ["quote", "estimate", "fixed"];
@@ -0,0 +1,15 @@
1
+ export declare const DAYS: readonly ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
2
+ export declare const MESSENGERS: readonly ["whatsapp", "telegram"];
3
+ export declare const PLACE_FIELDS: readonly ["phone", "whatsapp", "telegram", "messengers", "hours", "serviceArea", "address", "geo", "storefrontPhoto", "landmark", "rating", "booking", "reviewUrl"];
4
+ export type PlaceField = (typeof PLACE_FIELDS)[number];
5
+ export declare const PLACE_LIMITS: {
6
+ readonly e164: "^\\+[1-9][0-9]{6,14}$";
7
+ readonly maxArea: 200;
8
+ readonly maxHours: 14;
9
+ readonly maxLocales: 8;
10
+ readonly maxText: 200;
11
+ readonly maxUrl: 2048;
12
+ readonly reviewHosts: readonly ["g.page", "search.google.com"];
13
+ readonly telegramBot: "^[A-Za-z][A-Za-z0-9_]{1,28}[Bb][Oo][Tt]$";
14
+ readonly time: "^([01][0-9]|2[0-3]):[0-5][0-9]$";
15
+ };
@@ -0,0 +1,15 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const DAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
3
+ export const MESSENGERS = ["whatsapp", "telegram"];
4
+ export const PLACE_FIELDS = ["phone", "whatsapp", "telegram", "messengers", "hours", "serviceArea", "address", "geo", "storefrontPhoto", "landmark", "rating", "booking", "reviewUrl"];
5
+ export const PLACE_LIMITS = {
6
+ "e164": "^\\+[1-9][0-9]{6,14}$",
7
+ "maxArea": 200,
8
+ "maxHours": 14,
9
+ "maxLocales": 8,
10
+ "maxText": 200,
11
+ "maxUrl": 2048,
12
+ "reviewHosts": ["g.page", "search.google.com"],
13
+ "telegramBot": "^[A-Za-z][A-Za-z0-9_]{1,28}[Bb][Oo][Tt]$",
14
+ "time": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
15
+ };
@@ -0,0 +1,16 @@
1
+ export declare const PRICING_FORMAT = 1;
2
+ export declare const PRICING_CURRENCY = "EUR";
3
+ export declare const PRICING_LIMITS: {
4
+ readonly locale: "^[a-z]{2}(-[A-Z]{2})?$";
5
+ readonly maxDiscountBp: 10000;
6
+ readonly maxInputs: 32;
7
+ readonly maxLabel: 120;
8
+ readonly maxMultiplyBp: 100000;
9
+ readonly maxNeedInputs: 12;
10
+ readonly maxNeeds: 64;
11
+ readonly maxOptions: 32;
12
+ readonly maxPriceCents: 100000000;
13
+ readonly slug: "^[a-z0-9_-]{1,40}$";
14
+ };
15
+ export declare const INPUT_KINDS: readonly ["add", "multiply", "discount"];
16
+ export type PricingInputKind = (typeof INPUT_KINDS)[number];
@@ -0,0 +1,16 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export const PRICING_FORMAT = 1;
3
+ export const PRICING_CURRENCY = "EUR";
4
+ export const PRICING_LIMITS = {
5
+ "locale": "^[a-z]{2}(-[A-Z]{2})?$",
6
+ "maxDiscountBp": 10000,
7
+ "maxInputs": 32,
8
+ "maxLabel": 120,
9
+ "maxMultiplyBp": 100000,
10
+ "maxNeedInputs": 12,
11
+ "maxNeeds": 64,
12
+ "maxOptions": 32,
13
+ "maxPriceCents": 100000000,
14
+ "slug": "^[a-z0-9_-]{1,40}$",
15
+ };
16
+ export const INPUT_KINDS = ["add", "multiply", "discount"];
@@ -232,72 +232,3 @@ export type Rating = {
232
232
  */
233
233
  fetchedAt: string;
234
234
  };
235
- export declare const PRICING_FORMAT = 1;
236
- export declare const PRICING_CURRENCY = "EUR";
237
- export declare const PRICING_LIMITS: {
238
- readonly locale: "^[a-z]{2}(-[A-Z]{2})?$";
239
- readonly maxDiscountBp: 10000;
240
- readonly maxInputs: 32;
241
- readonly maxLabel: 120;
242
- readonly maxMultiplyBp: 100000;
243
- readonly maxNeedInputs: 12;
244
- readonly maxNeeds: 64;
245
- readonly maxOptions: 32;
246
- readonly maxPriceCents: 100000000;
247
- readonly slug: "^[a-z0-9_-]{1,40}$";
248
- };
249
- export declare const INPUT_KINDS: readonly ["add", "multiply", "discount"];
250
- export type PricingInputKind = (typeof INPUT_KINDS)[number];
251
- export declare const PRICING_CODES: readonly ["object", "missing", "unknownField", "format", "currency", "date", "int", "slug", "labels", "locale", "label", "list", "duplicate", "kind", "needKind", "noInput", "dearest", "labelMissing"];
252
- export type PricingCode = (typeof PRICING_CODES)[number];
253
- export declare const BOOKING_PROVIDERS: readonly ["manual", "link", "google_calendar", "cal_com"];
254
- export declare const PAGE_PROVIDERS: readonly ["link", "google_calendar", "cal_com"];
255
- export declare const BOOKING_LIMITS: {
256
- readonly calComHosts: readonly ["cal.evinvest.ltd", "cal.com"];
257
- readonly calComSegment: "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$";
258
- readonly leadRef: "^lead-[1-9][0-9]{0,18}-[0-9a-f]{8}$";
259
- readonly maxUrl: 2048;
260
- };
261
- export declare const BOOKING_CODES: readonly ["shape", "unknown_key", "required", "provider_unknown", "provider_shape", "provider_extra", "manual", "url_type", "default_unknown", "default_unset", "format", "scheme", "fragment", "backslash", "userinfo", "ip", "port", "host", "google", "cal_host", "cal_path"];
262
- export type BookingCode = (typeof BOOKING_CODES)[number];
263
- export declare const BOOKING_STATUSES: readonly ["none", "requested", "booked", "canceled", "done", "no_show"];
264
- export type BookingStatus = (typeof BOOKING_STATUSES)[number];
265
- export declare const DAY_PARTS: readonly ["morning", "afternoon", "evening"];
266
- export type DayPart = (typeof DAY_PARTS)[number];
267
- export declare const DAYS: readonly ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
268
- export declare const MESSENGERS: readonly ["whatsapp", "telegram"];
269
- export declare const PLACE_FIELDS: readonly ["phone", "whatsapp", "telegram", "messengers", "hours", "serviceArea", "address", "geo", "storefrontPhoto", "landmark", "rating", "booking", "reviewUrl"];
270
- export type PlaceField = (typeof PLACE_FIELDS)[number];
271
- export declare const PLACE_LIMITS: {
272
- readonly e164: "^\\+[1-9][0-9]{6,14}$";
273
- readonly maxArea: 200;
274
- readonly maxHours: 14;
275
- readonly maxLocales: 8;
276
- readonly maxText: 200;
277
- readonly maxUrl: 2048;
278
- readonly reviewHosts: readonly ["g.page", "search.google.com"];
279
- readonly telegramBot: "^[A-Za-z][A-Za-z0-9_]{1,28}[Bb][Oo][Tt]$";
280
- readonly time: "^([01][0-9]|2[0-3]):[0-5][0-9]$";
281
- };
282
- export declare const PLACE_CODES: readonly ["object", "unknown_field", "required", "type", "blank", "too_long", "control", "e164", "telegram_bot", "messenger_unknown", "boolean", "shape", "empty", "too_many", "day", "duplicate", "time", "closes_before_opens", "postal_code", "coordinate", "https_url", "review_url", "locale", "rating_value", "rating_count", "instant"];
283
- export type PlaceCode = (typeof PLACE_CODES)[number];
284
- export declare const EXPERIMENT_LIMITS: {
285
- readonly key: "^[a-z0-9_]{1,64}$";
286
- readonly maxExperiments: 64;
287
- readonly maxSummary: 200;
288
- readonly maxVariants: 32;
289
- readonly variant: "^[a-z0-9_-]{1,32}$";
290
- };
291
- export declare const LEAD_LIMITS: {
292
- readonly analyticsId: "^[A-Za-z0-9._:-]{1,128}$";
293
- readonly maxEstimateInputs: 12;
294
- readonly messageRef: "^[A-Z]{2,4}-[0-9A-HJKMNP-TV-Z]{4,8}$";
295
- };
296
- export declare const LEAD_CHANNELS: readonly ["form", "phone_inbound", "callback", "whatsapp", "telegram"];
297
- export type LeadChannel = (typeof LEAD_CHANNELS)[number];
298
- export declare const SITE_CHANNELS: readonly ["form", "callback", "whatsapp", "telegram"];
299
- export type SiteChannel = (typeof SITE_CHANNELS)[number];
300
- export declare const LEAD_SUSPECTS: readonly ["rate_limited", "too_fast"];
301
- export type LeadSuspect = (typeof LEAD_SUSPECTS)[number];
302
- export declare const LEAD_FLOWS: readonly ["quote", "estimate", "fixed"];
303
- export type LeadFlow = (typeof LEAD_FLOWS)[number];
@@ -0,0 +1,2 @@
1
+ // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,10 @@
1
- export * from "./generated/contract.js";
1
+ export * from "./generated/booking.js";
2
+ export * from "./generated/codes.js";
3
+ export * from "./generated/experiments.js";
4
+ export * from "./generated/lead.js";
5
+ export * from "./generated/place.js";
6
+ export * from "./generated/pricing.js";
7
+ export type * from "./generated/types.js";
2
8
  export * from "./generated/wire.js";
3
9
  export { checkBookingConfig, checkBookingUrl, bookingRequested, isBookingProvider, isLeadRef, isPageProvider, preferredDateInWindow, type BookingProblem, type BookingRequested } from "./booking.js";
4
10
  export { declarationProblem, parseLiveExperiments, type DeclarationProblem } from "./experiments.js";
package/dist/index.js CHANGED
@@ -1,4 +1,9 @@
1
- export * from "./generated/contract.js";
1
+ export * from "./generated/booking.js";
2
+ export * from "./generated/codes.js";
3
+ export * from "./generated/experiments.js";
4
+ export * from "./generated/lead.js";
5
+ export * from "./generated/place.js";
6
+ export * from "./generated/pricing.js";
2
7
  export * from "./generated/wire.js";
3
8
  export { checkBookingConfig, checkBookingUrl, bookingRequested, isBookingProvider, isLeadRef, isPageProvider, preferredDateInWindow } from "./booking.js";
4
9
  export { declarationProblem, parseLiveExperiments } from "./experiments.js";
package/dist/ingest.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { BookingRequested } from "./booking.js";
2
- import type { LeadFlow, LeadSuspect, SiteChannel } from "./generated/contract.js";
2
+ import type { LeadFlow, LeadSuspect, SiteChannel } from "./generated/lead.js";
3
3
  import { type Event, type ExperimentsDeclaredV1, type IngestRequest, type LeadCreatedV1, type Registered, type SiteEventKey, type Subject } from "./generated/wire.js";
4
4
  /** `lead.created@1`'s properties, their vocabularies as the panel checks them. */
5
5
  export type LeadCreated = LeadCreatedV1 & {
package/dist/place.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { type BookingCode, type PlaceCode, type PlaceLive } from "./generated/contract.js";
1
+ import type { BookingCode, PlaceCode } from "./generated/codes.js";
2
+ import type { PlaceLive } from "./generated/types.js";
2
3
  /** One thing wrong with a place's settings: its path (`phone`, `hours[0].opens`, `booking.providers.cal_com.url`) and why. */
3
4
  export interface PlaceProblem {
4
5
  path: string;
package/dist/place.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { checkBookingConfig } from "./booking.js";
2
- import { DAYS, MESSENGERS, PLACE_LIMITS as LIMIT, } from "./generated/contract.js";
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
4
  const E164 = new RegExp(LIMIT.e164);
5
5
  const TELEGRAM_BOT = new RegExp(LIMIT.telegramBot);
package/dist/pricing.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { type PricingCode, type PricingInput, type PricingInputKind, type PricingModel } from "./generated/contract.js";
1
+ import type { PricingCode } from "./generated/codes.js";
2
+ import { type PricingInputKind } from "./generated/pricing.js";
3
+ import type { PricingInput, PricingModel } from "./generated/types.js";
2
4
  /**
3
5
  * One thing wrong with a model: its path from the model's root (`inputs[0].options[2].addCents`,
4
6
  * `""` for the model itself), the code the panel names it by too, and what the code's words
package/dist/pricing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { INPUT_KINDS, PRICING_CURRENCY, PRICING_FORMAT, PRICING_LIMITS as LIMIT, } from "./generated/contract.js";
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
3
  const SLUG = new RegExp(LIMIT.slug);
4
4
  const LOCALE = new RegExp(LIMIT.locale);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evinvest/sites-contract",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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": {
@@ -1,59 +0,0 @@
1
- // AUTO-GENERATED by `nix run .#gen` — do not edit.
2
- export const PRICING_FORMAT = 1;
3
- export const PRICING_CURRENCY = "EUR";
4
- export const PRICING_LIMITS = {
5
- "locale": "^[a-z]{2}(-[A-Z]{2})?$",
6
- "maxDiscountBp": 10000,
7
- "maxInputs": 32,
8
- "maxLabel": 120,
9
- "maxMultiplyBp": 100000,
10
- "maxNeedInputs": 12,
11
- "maxNeeds": 64,
12
- "maxOptions": 32,
13
- "maxPriceCents": 100000000,
14
- "slug": "^[a-z0-9_-]{1,40}$",
15
- };
16
- export const INPUT_KINDS = ["add", "multiply", "discount"];
17
- export const PRICING_CODES = ["object", "missing", "unknownField", "format", "currency", "date", "int", "slug", "labels", "locale", "label", "list", "duplicate", "kind", "needKind", "noInput", "dearest", "labelMissing"];
18
- export const BOOKING_PROVIDERS = ["manual", "link", "google_calendar", "cal_com"];
19
- export const PAGE_PROVIDERS = ["link", "google_calendar", "cal_com"];
20
- export const BOOKING_LIMITS = {
21
- "calComHosts": ["cal.evinvest.ltd", "cal.com"],
22
- "calComSegment": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
23
- "leadRef": "^lead-[1-9][0-9]{0,18}-[0-9a-f]{8}$",
24
- "maxUrl": 2048,
25
- };
26
- export const BOOKING_CODES = ["shape", "unknown_key", "required", "provider_unknown", "provider_shape", "provider_extra", "manual", "url_type", "default_unknown", "default_unset", "format", "scheme", "fragment", "backslash", "userinfo", "ip", "port", "host", "google", "cal_host", "cal_path"];
27
- export const BOOKING_STATUSES = ["none", "requested", "booked", "canceled", "done", "no_show"];
28
- export const DAY_PARTS = ["morning", "afternoon", "evening"];
29
- export const DAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
30
- export const MESSENGERS = ["whatsapp", "telegram"];
31
- export const PLACE_FIELDS = ["phone", "whatsapp", "telegram", "messengers", "hours", "serviceArea", "address", "geo", "storefrontPhoto", "landmark", "rating", "booking", "reviewUrl"];
32
- export const PLACE_LIMITS = {
33
- "e164": "^\\+[1-9][0-9]{6,14}$",
34
- "maxArea": 200,
35
- "maxHours": 14,
36
- "maxLocales": 8,
37
- "maxText": 200,
38
- "maxUrl": 2048,
39
- "reviewHosts": ["g.page", "search.google.com"],
40
- "telegramBot": "^[A-Za-z][A-Za-z0-9_]{1,28}[Bb][Oo][Tt]$",
41
- "time": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
42
- };
43
- export const PLACE_CODES = ["object", "unknown_field", "required", "type", "blank", "too_long", "control", "e164", "telegram_bot", "messenger_unknown", "boolean", "shape", "empty", "too_many", "day", "duplicate", "time", "closes_before_opens", "postal_code", "coordinate", "https_url", "review_url", "locale", "rating_value", "rating_count", "instant"];
44
- export const EXPERIMENT_LIMITS = {
45
- "key": "^[a-z0-9_]{1,64}$",
46
- "maxExperiments": 64,
47
- "maxSummary": 200,
48
- "maxVariants": 32,
49
- "variant": "^[a-z0-9_-]{1,32}$",
50
- };
51
- export const LEAD_LIMITS = {
52
- "analyticsId": "^[A-Za-z0-9._:-]{1,128}$",
53
- "maxEstimateInputs": 12,
54
- "messageRef": "^[A-Z]{2,4}-[0-9A-HJKMNP-TV-Z]{4,8}$",
55
- };
56
- export const LEAD_CHANNELS = ["form", "phone_inbound", "callback", "whatsapp", "telegram"];
57
- export const SITE_CHANNELS = ["form", "callback", "whatsapp", "telegram"];
58
- export const LEAD_SUSPECTS = ["rate_limited", "too_fast"];
59
- export const LEAD_FLOWS = ["quote", "estimate", "fixed"];