@sonordev/contracts 2.23.0 → 2.26.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.
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ // src/contracts/wire-uuid.ts
4
+ var UUID_V1_TO_V8_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
5
+
3
6
  // src/contracts/wire-schema.ts
4
7
  function createWireSchema(fail2, isValidationError) {
5
8
  const own = (v, k) => Object.prototype.hasOwnProperty.call(v, k);
@@ -129,7 +132,7 @@ var parseSignalExperimentCreate = (v) => create.read(v, "experimentCreate");
129
132
  var parseSignalExperimentUpdate = (v) => update.read(v, "experimentUpdate");
130
133
  var SIGNAL_EXPERIMENT_CREATE_JSON_SCHEMA = create.schema;
131
134
  var SIGNAL_EXPERIMENT_UPDATE_JSON_SCHEMA = update.schema;
132
- var measurementUuid = text(36, /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
135
+ var measurementUuid = text(36, UUID_V1_TO_V8_PATTERN);
133
136
  var measurementRevision = text(128, /^[a-zA-Z0-9._:-]+$/);
134
137
  var measurementInstant = refine(text(30, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/), (v, p) => {
135
138
  if (!Number.isFinite(Date.parse(v)) || new Date(v).toISOString().replace(".000Z", "Z") !== v.replace(".000Z", "Z")) fail(p, "invalid UTC instant");
@@ -1,3 +1,6 @@
1
+ // src/contracts/wire-uuid.ts
2
+ var UUID_V1_TO_V8_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
3
+
1
4
  // src/contracts/wire-schema.ts
2
5
  function createWireSchema(fail2, isValidationError) {
3
6
  const own = (v, k) => Object.prototype.hasOwnProperty.call(v, k);
@@ -127,7 +130,7 @@ var parseSignalExperimentCreate = (v) => create.read(v, "experimentCreate");
127
130
  var parseSignalExperimentUpdate = (v) => update.read(v, "experimentUpdate");
128
131
  var SIGNAL_EXPERIMENT_CREATE_JSON_SCHEMA = create.schema;
129
132
  var SIGNAL_EXPERIMENT_UPDATE_JSON_SCHEMA = update.schema;
130
- var measurementUuid = text(36, /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
133
+ var measurementUuid = text(36, UUID_V1_TO_V8_PATTERN);
131
134
  var measurementRevision = text(128, /^[a-zA-Z0-9._:-]+$/);
132
135
  var measurementInstant = refine(text(30, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/), (v, p) => {
133
136
  if (!Number.isFinite(Date.parse(v)) || new Date(v).toISOString().replace(".000Z", "Z") !== v.replace(".000Z", "Z")) fail(p, "invalid UTC instant");
@@ -0,0 +1,5 @@
1
+ /** Internal UUID v1-v8 wire rule shared by runtime readers and portable JSON Schema.
2
+ * Explicit ASCII case ranges need no flags; parsing preserves original spelling.
3
+ * Broader UUID-like identifiers in other domains intentionally keep their own rules.
4
+ */
5
+ export declare const UUID_V1_TO_V8_PATTERN: RegExp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonordev/contracts",
3
- "version": "2.23.0",
3
+ "version": "2.26.0",
4
4
  "description": "The rules Sonor's sites, APIs and dashboard share: popup blocks and site design tokens, site hosts, SEO page identity, title quality, llms.txt sanitizers, shared form validation, fleet heartbeats, slot content and signing, site cache tags, portfolio metrics, the house voice's contraction rule, how a proposal's site plan counts its pages, what separates an error page from a page's content, which stored JSON-LD is a template's unfilled placeholder, where prose splits into sentences, which Sonor records Signal reads into a project's knowledge and the address each one is stored under, what outbound email and text may claim about a business and whether a sent email arrived intact, what a segment of outreach is and who may turn one on, a page's own name taken from its title or its slug, which Broadcast card layouts and review compositions are drawn and what a retired one draws as, what a publication's branding may hold, which literal hosts are refused as public fetch destinations, which inbox cards are decisions a bulk action leaves alone, what a rep's call outcome (positive, negative or left voicemail) changes on a prospect, and which buying role a job title says (owner, decision maker, influencer or gatekeeper). Pure functions, no dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -180,6 +180,16 @@
180
180
  "types": "./dist/signal-experiments.d.ts",
181
181
  "import": "./dist/signal-experiments.mjs",
182
182
  "require": "./dist/signal-experiments.js"
183
+ },
184
+ "./property-interest": {
185
+ "types": "./dist/property-interest.d.ts",
186
+ "import": "./dist/property-interest.mjs",
187
+ "require": "./dist/property-interest.js"
188
+ },
189
+ "./sales-call-prep": {
190
+ "types": "./dist/sales-call-prep.d.ts",
191
+ "import": "./dist/sales-call-prep.mjs",
192
+ "require": "./dist/sales-call-prep.js"
183
193
  }
184
194
  },
185
195
  "typesVersions": {