@captello/ulc-webview-sdk 0.5.0 → 0.6.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 CHANGED
@@ -295,7 +295,7 @@ have.
295
295
  A `submission_body` payload includes `visible_submissions_data` — one entry per filled,
296
296
  visible element, typed as `VisibleSubmissionDataItem[]` and discriminated by
297
297
  `element_type`. Narrow on `element_type` and `element_value` is precisely typed (string,
298
- string array, composite name/address, order quantities, etc.), so you render it exactly
298
+ string array, name/address objects, order quantities, etc.), so you render it exactly
299
299
  how your UI needs — no flattening helper to fight:
300
300
 
301
301
  ```ts
@@ -312,8 +312,18 @@ webview.on(OutboundMessageType.SubmissionBody, (msg) => {
312
312
  addRow(item.element_title, renderChoices(item.element_value));
313
313
  break;
314
314
  case FormElementType.simple_name:
315
- // element_value: CompositeSubmissionValue (sub-field id string)
316
- addRow(item.element_title, Object.values(item.element_value).join(" "));
315
+ // element_value: NameSubmissionValue ({ FirstName?, LastName? })
316
+ addRow(
317
+ item.element_title,
318
+ [item.element_value.FirstName, item.element_value.LastName].filter(Boolean).join(" "),
319
+ );
320
+ break;
321
+ case FormElementType.address:
322
+ // element_value: AddressSubmissionValue ({ StreetAddress?, City?, State?, Zipcode?, Country?, … })
323
+ addRow(
324
+ item.element_title,
325
+ [item.element_value.StreetAddress, item.element_value.City].filter(Boolean).join(", "),
326
+ );
317
327
  break;
318
328
  // …other element types
319
329
  }
@@ -64,9 +64,26 @@ declare enum FormElementType {
64
64
  star_rating = "star_survey",
65
65
  attachments = "attachments"
66
66
  }
67
- /** Composite element value (simple_name / address): sub-field values keyed by sub-element id. */
68
- type CompositeSubmissionValue = {
69
- [subElementId: string]: string;
67
+ /**
68
+ * `simple_name` value: the visible sub-fields keyed by their transcription identifier
69
+ * (`ll_field_unique_identifier`), the same identifiers used by prefill. Hidden sub-fields are
70
+ * omitted, so keys are optional.
71
+ */
72
+ type NameSubmissionValue = {
73
+ FirstName?: string;
74
+ LastName?: string;
75
+ };
76
+ /**
77
+ * `address` value: the visible sub-fields keyed by their transcription identifier
78
+ * (`ll_field_unique_identifier`). Hidden sub-fields are omitted, so keys are optional.
79
+ */
80
+ type AddressSubmissionValue = {
81
+ StreetAddress?: string;
82
+ StreetAddress2?: string;
83
+ City?: string;
84
+ State?: string;
85
+ Zipcode?: string;
86
+ Country?: string;
70
87
  };
71
88
  /** Checkbox value when the element is an "order" checkbox (quantities + note). */
72
89
  type OrderCheckboxSubmissionData = {
@@ -134,8 +151,8 @@ type VisibleSubmissionElementValueMap = {
134
151
  [FormElementType.business_card]: Partial<BusinessCardValue>;
135
152
  [FormElementType.boolean]: boolean;
136
153
  [FormElementType.attachments]: AttachmentValue[];
137
- [FormElementType.simple_name]: CompositeSubmissionValue;
138
- [FormElementType.address]: CompositeSubmissionValue;
154
+ [FormElementType.simple_name]: NameSubmissionValue;
155
+ [FormElementType.address]: AddressSubmissionValue;
139
156
  };
140
157
  /** Element types that carry a user-facing value (i.e. can appear in visible data). */
141
158
  type VisibleSubmissionElementType = keyof VisibleSubmissionElementValueMap;
@@ -497,4 +514,4 @@ declare class CaptelloWebview {
497
514
  private handleMessage;
498
515
  }
499
516
 
500
- export { type AnyOutboundListener as A, type BusinessCardValue as B, type CaptelloWebviewOptions as C, FormElementType as F, type InboundMessage as I, OutboundMessageType as O, type PrefillInfoItem as P, type SubmissionBody as S, type Unsubscribe as U, type ValidationTarget as V, type OutboundMessageMap as a, SubmissionError as b, SubmissionTimeoutError as c, type OutboundMessage as d, CaptelloWebview as e, type SubmissionPrefill as f, type AttachmentValue as g, type CompositeSubmissionValue as h, InboundMessageType as i, type OrderCheckboxSubmissionData as j, type OrderRadioSubmissionData as k, type OutboundListener as l, type SubmissionQuestionData as m, type VisibleSubmissionDataItem as n, type VisibleSubmissionElementType as o, type VisibleSubmissionElementValueMap as p, parseOutboundMessage as q };
517
+ export { type AddressSubmissionValue as A, type BusinessCardValue as B, type CaptelloWebviewOptions as C, FormElementType as F, type InboundMessage as I, type NameSubmissionValue as N, OutboundMessageType as O, type PrefillInfoItem as P, type SubmissionBody as S, type Unsubscribe as U, type ValidationTarget as V, type OutboundMessageMap as a, SubmissionError as b, SubmissionTimeoutError as c, type OutboundMessage as d, CaptelloWebview as e, type SubmissionPrefill as f, type AnyOutboundListener as g, type AttachmentValue as h, InboundMessageType as i, type OrderCheckboxSubmissionData as j, type OrderRadioSubmissionData as k, type OutboundListener as l, type SubmissionQuestionData as m, type VisibleSubmissionDataItem as n, type VisibleSubmissionElementType as o, type VisibleSubmissionElementValueMap as p, parseOutboundMessage as q };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AnyOutboundListener, g as AttachmentValue, B as BusinessCardValue, e as CaptelloWebview, C as CaptelloWebviewOptions, h as CompositeSubmissionValue, F as FormElementType, I as InboundMessage, i as InboundMessageType, j as OrderCheckboxSubmissionData, k as OrderRadioSubmissionData, l as OutboundListener, d as OutboundMessage, a as OutboundMessageMap, O as OutboundMessageType, P as PrefillInfoItem, S as SubmissionBody, b as SubmissionError, f as SubmissionPrefill, m as SubmissionQuestionData, c as SubmissionTimeoutError, U as Unsubscribe, V as ValidationTarget, n as VisibleSubmissionDataItem, o as VisibleSubmissionElementType, p as VisibleSubmissionElementValueMap, q as parseOutboundMessage } from './client-Dik-Mjid.js';
1
+ export { A as AddressSubmissionValue, g as AnyOutboundListener, h as AttachmentValue, B as BusinessCardValue, e as CaptelloWebview, C as CaptelloWebviewOptions, F as FormElementType, I as InboundMessage, i as InboundMessageType, N as NameSubmissionValue, j as OrderCheckboxSubmissionData, k as OrderRadioSubmissionData, l as OutboundListener, d as OutboundMessage, a as OutboundMessageMap, O as OutboundMessageType, P as PrefillInfoItem, S as SubmissionBody, b as SubmissionError, f as SubmissionPrefill, m as SubmissionQuestionData, c as SubmissionTimeoutError, U as Unsubscribe, V as ValidationTarget, n as VisibleSubmissionDataItem, o as VisibleSubmissionElementType, p as VisibleSubmissionElementValueMap, q as parseOutboundMessage } from './client-DOm9cwoe.js';
2
2
 
3
3
  /**
4
4
  * Builder for the Captello capture webview embed URL.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/submission-data.ts"],"names":["FormElementType"],"mappings":";;;;AAiCO,IAAK,eAAA,qBAAAA,gBAAAA,KAAL;AACH,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,SAAA,CAAA,GAAU,eAAA;AACV,EAAAA,iBAAA,YAAA,CAAA,GAAa,SAAA;AACb,EAAAA,iBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AACd,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,eAAA,CAAA,GAAgB,eAAA;AAChB,EAAAA,iBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,WAAA,CAAA,GAAY,kBAAA;AACZ,EAAAA,iBAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,iBAAA,UAAA,CAAA,GAAW,WAAA;AACX,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,iBAAA,iBAAA,CAAA,GAAkB,uBAAA;AAClB,EAAAA,iBAAA,iBAAA,CAAA,GAAkB,uBAAA;AAClB,EAAAA,iBAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AACd,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AApCN,EAAA,OAAAA,gBAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA","file":"index.js","sourcesContent":["/**\n * Types for a submission's **visible** data — the list a host renders as key/value\n * pairs (one row per filled, visible form element).\n *\n * The webview emits this as `visible_submissions_data` inside the `submission_body`\n * payload: an array of {@link VisibleSubmissionDataItem}, discriminated by\n * `element_type`, where `element_value`'s shape depends on the type. Narrow on\n * `element_type` to get a precisely-typed `element_value` and render it however you\n * like:\n *\n * @example\n * for (const item of submission.visible_submissions_data ?? []) {\n * switch (item.element_type) {\n * case FormElementType.email:\n * row(item.element_title, item.element_value); // element_value: string\n * break;\n * case FormElementType.checkbox:\n * // element_value: string[] | OrderCheckboxSubmissionData\n * break;\n * // …\n * }\n * }\n */\n\n/* ------------------------------------------------------------------ *\n * Element types\n * ------------------------------------------------------------------ */\n\n/**\n * Every form element type, mirroring the webview's `FormElementType`. The string\n * values are the wire values. Structural types (sections, separators, …) never carry\n * a value and never appear in visible submission data.\n */\nexport enum FormElementType {\n email = \"email\",\n section = \"section_block\",\n html_block = \"section\",\n url = \"url\",\n text = \"text\",\n select = \"select\",\n radio = \"radio\",\n simple_name = \"simple_name\",\n textarea = \"textarea\",\n time = \"time\",\n address = \"address\",\n money = \"money\",\n number = \"number\",\n date = \"date\",\n phone = \"phone\",\n simple_phone = \"simple_phone\",\n checkbox = \"checkbox\",\n image = \"image\",\n business_card = \"business_card\",\n signature = \"signature\",\n barcode = \"barcode\",\n separator = \"column_separator\",\n activation = \"activation\",\n document = \"documents\",\n datetime = \"datetime\",\n meeting = \"meeting\",\n audio = \"audio\",\n rating = \"rating\",\n assign_owner = \"assign_owner\",\n boolean = \"boolean\",\n engagem_feeder = \"engagem_feeder\",\n speaker_section = \"speaker_section_block\",\n session_section = \"session_section_block\",\n image_placeholder = \"image_placeholder\",\n star_rating = \"star_survey\",\n attachments = \"attachments\",\n}\n\n/* ------------------------------------------------------------------ *\n * Element value shapes\n * ------------------------------------------------------------------ */\n\n/** Composite element value (simple_name / address): sub-field values keyed by sub-element id. */\nexport type CompositeSubmissionValue = { [subElementId: string]: string };\n\n/** Checkbox value when the element is an \"order\" checkbox (quantities + note). */\nexport type OrderCheckboxSubmissionData = {\n values: { value: string; quantity: number }[];\n note: string;\n};\n\n/** Radio/select value when the element is an \"order\" radio/select (quantity + note). */\nexport type OrderRadioSubmissionData = { value: string; quantity: number; note: string };\n\n/** An uploaded attachment. `blob` is not present on the wire (postMessage JSON drops it). */\nexport type AttachmentValue = { token: string; url: string; name: string; size: number };\n\n/** A business-card capture: front/back image references (either may be absent). */\nexport type BusinessCardValue = { front: string; back: string };\n\n/** One engagement-feeder question/answer entry. */\nexport type SubmissionQuestionData = {\n question: string;\n answers: string[];\n /** `\"\"` when the element is hidden. */\n correct_answer: number | \"\";\n};\n\n/**\n * Maps each value-carrying element type to its `element_value` shape. Structural\n * types are intentionally absent, so they can never appear in a visible item.\n */\nexport type VisibleSubmissionElementValueMap = {\n [FormElementType.email]: string;\n [FormElementType.url]: string;\n [FormElementType.text]: string;\n [FormElementType.textarea]: string;\n [FormElementType.money]: string;\n [FormElementType.number]: string;\n [FormElementType.phone]: string;\n [FormElementType.simple_phone]: string;\n [FormElementType.date]: string;\n [FormElementType.time]: string;\n [FormElementType.datetime]: string;\n [FormElementType.audio]: string;\n [FormElementType.rating]: string;\n [FormElementType.star_rating]: string;\n [FormElementType.assign_owner]: string;\n [FormElementType.signature]: string;\n [FormElementType.barcode]: string;\n [FormElementType.meeting]: string;\n [FormElementType.activation]: string;\n [FormElementType.checkbox]: string[] | OrderCheckboxSubmissionData;\n [FormElementType.radio]: string | OrderRadioSubmissionData;\n [FormElementType.select]: string | OrderRadioSubmissionData;\n [FormElementType.image]: string[];\n [FormElementType.document]: number[];\n [FormElementType.engagem_feeder]: SubmissionQuestionData[];\n [FormElementType.business_card]: Partial<BusinessCardValue>;\n [FormElementType.boolean]: boolean;\n [FormElementType.attachments]: AttachmentValue[];\n [FormElementType.simple_name]: CompositeSubmissionValue;\n [FormElementType.address]: CompositeSubmissionValue;\n};\n\n/** Element types that carry a user-facing value (i.e. can appear in visible data). */\nexport type VisibleSubmissionElementType = keyof VisibleSubmissionElementValueMap;\n\n/**\n * One entry in `visible_submissions_data`, discriminated by `element_type`. Narrowing\n * on `element_type` gives a precisely-typed `element_value`.\n */\nexport type VisibleSubmissionDataItem = {\n [T in VisibleSubmissionElementType]: {\n element_id: string;\n element_title: string;\n element_type: T;\n element_value: VisibleSubmissionElementValueMap[T];\n };\n}[VisibleSubmissionElementType];\n"]}
1
+ {"version":3,"sources":["../src/submission-data.ts"],"names":["FormElementType"],"mappings":";;;;AAiCO,IAAK,eAAA,qBAAAA,gBAAAA,KAAL;AACH,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,SAAA,CAAA,GAAU,eAAA;AACV,EAAAA,iBAAA,YAAA,CAAA,GAAa,SAAA;AACb,EAAAA,iBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AACd,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,eAAA,CAAA,GAAgB,eAAA;AAChB,EAAAA,iBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,WAAA,CAAA,GAAY,kBAAA;AACZ,EAAAA,iBAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,iBAAA,UAAA,CAAA,GAAW,WAAA;AACX,EAAAA,iBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,iBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,iBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,iBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,iBAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,iBAAA,iBAAA,CAAA,GAAkB,uBAAA;AAClB,EAAAA,iBAAA,iBAAA,CAAA,GAAkB,uBAAA;AAClB,EAAAA,iBAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AACd,EAAAA,iBAAA,aAAA,CAAA,GAAc,aAAA;AApCN,EAAA,OAAAA,gBAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA","file":"index.js","sourcesContent":["/**\n * Types for a submission's **visible** data — the list a host renders as key/value\n * pairs (one row per filled, visible form element).\n *\n * The webview emits this as `visible_submissions_data` inside the `submission_body`\n * payload: an array of {@link VisibleSubmissionDataItem}, discriminated by\n * `element_type`, where `element_value`'s shape depends on the type. Narrow on\n * `element_type` to get a precisely-typed `element_value` and render it however you\n * like:\n *\n * @example\n * for (const item of submission.visible_submissions_data ?? []) {\n * switch (item.element_type) {\n * case FormElementType.email:\n * row(item.element_title, item.element_value); // element_value: string\n * break;\n * case FormElementType.checkbox:\n * // element_value: string[] | OrderCheckboxSubmissionData\n * break;\n * // …\n * }\n * }\n */\n\n/* ------------------------------------------------------------------ *\n * Element types\n * ------------------------------------------------------------------ */\n\n/**\n * Every form element type, mirroring the webview's `FormElementType`. The string\n * values are the wire values. Structural types (sections, separators, …) never carry\n * a value and never appear in visible submission data.\n */\nexport enum FormElementType {\n email = \"email\",\n section = \"section_block\",\n html_block = \"section\",\n url = \"url\",\n text = \"text\",\n select = \"select\",\n radio = \"radio\",\n simple_name = \"simple_name\",\n textarea = \"textarea\",\n time = \"time\",\n address = \"address\",\n money = \"money\",\n number = \"number\",\n date = \"date\",\n phone = \"phone\",\n simple_phone = \"simple_phone\",\n checkbox = \"checkbox\",\n image = \"image\",\n business_card = \"business_card\",\n signature = \"signature\",\n barcode = \"barcode\",\n separator = \"column_separator\",\n activation = \"activation\",\n document = \"documents\",\n datetime = \"datetime\",\n meeting = \"meeting\",\n audio = \"audio\",\n rating = \"rating\",\n assign_owner = \"assign_owner\",\n boolean = \"boolean\",\n engagem_feeder = \"engagem_feeder\",\n speaker_section = \"speaker_section_block\",\n session_section = \"session_section_block\",\n image_placeholder = \"image_placeholder\",\n star_rating = \"star_survey\",\n attachments = \"attachments\",\n}\n\n/* ------------------------------------------------------------------ *\n * Element value shapes\n * ------------------------------------------------------------------ */\n\n/**\n * `simple_name` value: the visible sub-fields keyed by their transcription identifier\n * (`ll_field_unique_identifier`), the same identifiers used by prefill. Hidden sub-fields are\n * omitted, so keys are optional.\n */\nexport type NameSubmissionValue = {\n FirstName?: string;\n LastName?: string;\n};\n\n/**\n * `address` value: the visible sub-fields keyed by their transcription identifier\n * (`ll_field_unique_identifier`). Hidden sub-fields are omitted, so keys are optional.\n */\nexport type AddressSubmissionValue = {\n StreetAddress?: string;\n StreetAddress2?: string;\n City?: string;\n State?: string;\n Zipcode?: string;\n Country?: string;\n};\n\n/** Checkbox value when the element is an \"order\" checkbox (quantities + note). */\nexport type OrderCheckboxSubmissionData = {\n values: { value: string; quantity: number }[];\n note: string;\n};\n\n/** Radio/select value when the element is an \"order\" radio/select (quantity + note). */\nexport type OrderRadioSubmissionData = { value: string; quantity: number; note: string };\n\n/** An uploaded attachment. `blob` is not present on the wire (postMessage JSON drops it). */\nexport type AttachmentValue = { token: string; url: string; name: string; size: number };\n\n/** A business-card capture: front/back image references (either may be absent). */\nexport type BusinessCardValue = { front: string; back: string };\n\n/** One engagement-feeder question/answer entry. */\nexport type SubmissionQuestionData = {\n question: string;\n answers: string[];\n /** `\"\"` when the element is hidden. */\n correct_answer: number | \"\";\n};\n\n/**\n * Maps each value-carrying element type to its `element_value` shape. Structural\n * types are intentionally absent, so they can never appear in a visible item.\n */\nexport type VisibleSubmissionElementValueMap = {\n [FormElementType.email]: string;\n [FormElementType.url]: string;\n [FormElementType.text]: string;\n [FormElementType.textarea]: string;\n [FormElementType.money]: string;\n [FormElementType.number]: string;\n [FormElementType.phone]: string;\n [FormElementType.simple_phone]: string;\n [FormElementType.date]: string;\n [FormElementType.time]: string;\n [FormElementType.datetime]: string;\n [FormElementType.audio]: string;\n [FormElementType.rating]: string;\n [FormElementType.star_rating]: string;\n [FormElementType.assign_owner]: string;\n [FormElementType.signature]: string;\n [FormElementType.barcode]: string;\n [FormElementType.meeting]: string;\n [FormElementType.activation]: string;\n [FormElementType.checkbox]: string[] | OrderCheckboxSubmissionData;\n [FormElementType.radio]: string | OrderRadioSubmissionData;\n [FormElementType.select]: string | OrderRadioSubmissionData;\n [FormElementType.image]: string[];\n [FormElementType.document]: number[];\n [FormElementType.engagem_feeder]: SubmissionQuestionData[];\n [FormElementType.business_card]: Partial<BusinessCardValue>;\n [FormElementType.boolean]: boolean;\n [FormElementType.attachments]: AttachmentValue[];\n [FormElementType.simple_name]: NameSubmissionValue;\n [FormElementType.address]: AddressSubmissionValue;\n};\n\n/** Element types that carry a user-facing value (i.e. can appear in visible data). */\nexport type VisibleSubmissionElementType = keyof VisibleSubmissionElementValueMap;\n\n/**\n * One entry in `visible_submissions_data`, discriminated by `element_type`. Narrowing\n * on `element_type` gives a precisely-typed `element_value`.\n */\nexport type VisibleSubmissionDataItem = {\n [T in VisibleSubmissionElementType]: {\n element_id: string;\n element_title: string;\n element_type: T;\n element_value: VisibleSubmissionElementValueMap[T];\n };\n}[VisibleSubmissionElementType];\n"]}
@@ -1,5 +1,5 @@
1
- import { C as CaptelloWebviewOptions, S as SubmissionBody, O as OutboundMessageType, a as OutboundMessageMap } from './client-Dik-Mjid.js';
2
- export { b as SubmissionError, c as SubmissionTimeoutError } from './client-Dik-Mjid.js';
1
+ import { C as CaptelloWebviewOptions, S as SubmissionBody, O as OutboundMessageType, a as OutboundMessageMap } from './client-DOm9cwoe.js';
2
+ export { b as SubmissionError, c as SubmissionTimeoutError } from './client-DOm9cwoe.js';
3
3
 
4
4
  /**
5
5
  * Promise-based, one-shot helpers for imperative flows — `@captello/ulc-webview-sdk/promises`.
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { CSSProperties, IframeHTMLAttributes, ReactNode, RefCallback } from 'react';
3
- import { C as CaptelloWebviewOptions, a as OutboundMessageMap, O as OutboundMessageType, d as OutboundMessage, e as CaptelloWebview, V as ValidationTarget, f as SubmissionPrefill, P as PrefillInfoItem, S as SubmissionBody } from './client-Dik-Mjid.js';
4
- export { b as SubmissionError, c as SubmissionTimeoutError, U as Unsubscribe } from './client-Dik-Mjid.js';
3
+ import { C as CaptelloWebviewOptions, a as OutboundMessageMap, O as OutboundMessageType, d as OutboundMessage, e as CaptelloWebview, V as ValidationTarget, f as SubmissionPrefill, P as PrefillInfoItem, S as SubmissionBody } from './client-DOm9cwoe.js';
4
+ export { b as SubmissionError, c as SubmissionTimeoutError, U as Unsubscribe } from './client-DOm9cwoe.js';
5
5
  import { EmbedUrlOptions } from './index.js';
6
6
 
7
7
  /** Per-message-type callback props accepted by {@link useCaptelloWebview}. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captello/ulc-webview-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Typed SDK for embedding the Captello capture webview: message protocol, host client, and embed-URL builder.",
5
5
  "author": "Lead Liaison",
6
6
  "license": "MIT",