@proveanything/smartlinks 1.6.0 → 1.6.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.
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.6.0 | Generated: 2026-02-26T10:54:21.851Z
3
+ Version: 1.6.1 | Generated: 2026-02-26T11:23:15.062Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -2516,6 +2516,16 @@ interface ContactSchemaProperty {
2516
2516
  description?: string
2517
2517
  format?: string
2518
2518
  enum?: string[]
2519
+ * Display labels for `enum` values — parallel array.
2520
+ * `enum[i]` is the stored value; `enumNames[i]` is the display label.
2521
+ * When absent, `enum` values are used as labels.
2522
+ enumNames?: string[]
2523
+ default?: unknown
2524
+ minLength?: number
2525
+ maxLength?: number
2526
+ pattern?: string
2527
+ minimum?: number
2528
+ maximum?: number
2519
2529
  conditions?: FieldCondition[]
2520
2530
  showWhen?: 'all' | 'any'
2521
2531
  }
@@ -2524,9 +2534,17 @@ interface ContactSchemaProperty {
2524
2534
  **ContactUiSchemaEntry** (interface)
2525
2535
  ```typescript
2526
2536
  interface ContactUiSchemaEntry {
2527
- 'ui:disabled'?: true // Field is visible but not editable
2528
- 'ui:placeholder'?: string // Placeholder text
2529
- [key: string]: unknown // Forward-compatible with additional rjsf hints
2537
+ 'ui:disabled'?: true
2538
+ 'ui:placeholder'?: string
2539
+ 'ui:help'?: string
2540
+ 'ui:widget'?: string
2541
+ 'ui:options'?: {
2542
+ rows?: number // textarea: number of visible rows
2543
+ accept?: string // file: accepted MIME types
2544
+ label?: boolean // checkbox: show inline label
2545
+ [key: string]: unknown
2546
+ }
2547
+ [key: string]: unknown
2530
2548
  }
2531
2549
  ```
2532
2550
 
@@ -133,7 +133,7 @@ export interface CommsState {
133
133
  * Operators for conditional field visibility.
134
134
  * Used in ContactSchemaProperty.conditions[].operator.
135
135
  */
136
- export type ConditionOperator = 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty' | 'greater_than' | 'less_than';
136
+ export type ConditionOperator = 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'is_empty' | 'is_not_empty' | 'is_true' | 'is_false' | 'greater_than' | 'less_than';
137
137
  /**
138
138
  * A single visibility condition on a field.
139
139
  * The field renders only when its conditions are satisfied (see `showWhen`).
@@ -163,7 +163,26 @@ export interface ContactSchemaProperty {
163
163
  title?: string;
164
164
  description?: string;
165
165
  format?: string;
166
+ /** Stored values for select / radio / multiselect fields */
166
167
  enum?: string[];
168
+ /**
169
+ * Display labels for `enum` values — parallel array.
170
+ * `enum[i]` is the stored value; `enumNames[i]` is the display label.
171
+ * When absent, `enum` values are used as labels.
172
+ */
173
+ enumNames?: string[];
174
+ /** Default value pre-populated into the field */
175
+ default?: unknown;
176
+ /** Minimum string length (type: 'string') */
177
+ minLength?: number;
178
+ /** Maximum string length (type: 'string') */
179
+ maxLength?: number;
180
+ /** Regex pattern the value must match (type: 'string') */
181
+ pattern?: string;
182
+ /** Minimum value (type: 'number') */
183
+ minimum?: number;
184
+ /** Maximum value (type: 'number') */
185
+ maximum?: number;
167
186
  conditions?: FieldCondition[];
168
187
  showWhen?: 'all' | 'any';
169
188
  }
@@ -171,8 +190,21 @@ export interface ContactSchemaProperty {
171
190
  * UI rendering hints for a single field, keyed by field ID in `uiSchema`.
172
191
  */
173
192
  export interface ContactUiSchemaEntry {
193
+ /** Field is visible but not editable */
174
194
  'ui:disabled'?: true;
195
+ /** Placeholder text shown inside the input */
175
196
  'ui:placeholder'?: string;
197
+ /** Help text shown below the field (longer than description) */
198
+ 'ui:help'?: string;
199
+ /** Override the auto-detected widget (e.g. 'textarea', 'radio', 'checkboxes') */
200
+ 'ui:widget'?: string;
201
+ /** Widget-specific options */
202
+ 'ui:options'?: {
203
+ rows?: number;
204
+ accept?: string;
205
+ label?: boolean;
206
+ [key: string]: unknown;
207
+ };
176
208
  [key: string]: unknown;
177
209
  }
178
210
  /**
@@ -22,6 +22,10 @@ export function evaluateConditions(conditions, showWhen, fieldValues) {
22
22
  return value == null || value === '' || (Array.isArray(value) && value.length === 0);
23
23
  case 'is_not_empty':
24
24
  return value != null && value !== '' && !(Array.isArray(value) && value.length === 0);
25
+ case 'is_true':
26
+ return value === true;
27
+ case 'is_false':
28
+ return value === false;
25
29
  case 'equals':
26
30
  return value === condition.value;
27
31
  case 'not_equals':
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.6.0 | Generated: 2026-02-26T10:54:21.851Z
3
+ Version: 1.6.1 | Generated: 2026-02-26T11:23:15.062Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -2516,6 +2516,16 @@ interface ContactSchemaProperty {
2516
2516
  description?: string
2517
2517
  format?: string
2518
2518
  enum?: string[]
2519
+ * Display labels for `enum` values — parallel array.
2520
+ * `enum[i]` is the stored value; `enumNames[i]` is the display label.
2521
+ * When absent, `enum` values are used as labels.
2522
+ enumNames?: string[]
2523
+ default?: unknown
2524
+ minLength?: number
2525
+ maxLength?: number
2526
+ pattern?: string
2527
+ minimum?: number
2528
+ maximum?: number
2519
2529
  conditions?: FieldCondition[]
2520
2530
  showWhen?: 'all' | 'any'
2521
2531
  }
@@ -2524,9 +2534,17 @@ interface ContactSchemaProperty {
2524
2534
  **ContactUiSchemaEntry** (interface)
2525
2535
  ```typescript
2526
2536
  interface ContactUiSchemaEntry {
2527
- 'ui:disabled'?: true // Field is visible but not editable
2528
- 'ui:placeholder'?: string // Placeholder text
2529
- [key: string]: unknown // Forward-compatible with additional rjsf hints
2537
+ 'ui:disabled'?: true
2538
+ 'ui:placeholder'?: string
2539
+ 'ui:help'?: string
2540
+ 'ui:widget'?: string
2541
+ 'ui:options'?: {
2542
+ rows?: number // textarea: number of visible rows
2543
+ accept?: string // file: accepted MIME types
2544
+ label?: boolean // checkbox: show inline label
2545
+ [key: string]: unknown
2546
+ }
2547
+ [key: string]: unknown
2530
2548
  }
2531
2549
  ```
2532
2550
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",