@hiver/connector-agent 4.24.2 → 4.25.0-prefillAuto-beta.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.
@@ -81,4 +81,5 @@ export declare const SLACK_LINK_EXISTING_CLICKED = "slack_link_existing_clicked"
81
81
  export declare const SLACK_EXISTING_THREAD_LINKED = "slack_existing_thread_linked";
82
82
  export declare const SLACK_CONVERSATION_UNLINKED = "slack_conversation_unlinked";
83
83
  export declare const SLACK_LINK_SWITCHED = "slack_link_switched";
84
+ export declare const PREFILL_VALUE_TRUNCATED = "Prefill Value Truncated";
84
85
  //# sourceMappingURL=tracking-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracking-events.d.ts","sourceRoot":"","sources":["../../src/constants/tracking-events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,gCAAgC,qCAAqC,CAAC;AACnF,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAC/E,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,4BAA4B,2CAA2C,CAAC;AACrF,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,eAAO,MAAM,yBAAyB,wCAAwC,CAAC;AAC/E,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAC3E,eAAO,MAAM,0BAA0B,yCAAyC,CAAC;AACjF,eAAO,MAAM,yBAAyB,wCAAwC,CAAC;AAC/E,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAC3E,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AACrE,eAAO,MAAM,2BAA2B,0CAA0C,CAAC;AACnF,eAAO,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AAM,gBAAgB,qBAAqB,CAAC;AAInD,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAIzE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAIzE,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAEzE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,uBAAuB,4BAA4B,CAAC"}
@@ -7,10 +7,17 @@ export interface GetFormDefaultQueryProps extends GetFormDefaultProps {
7
7
  enabled: boolean;
8
8
  fetchOnMount?: boolean;
9
9
  }
10
- export declare const fetchFormDefaultValues: ({ formId, conversationId, inboxIds }: GetFormDefaultProps) => Promise<Record<string, unknown>>;
10
+ export interface FormDefaultValuesData {
11
+ /** Resolved default value per field, as placed into the create form. */
12
+ values: Record<string, unknown>;
13
+ /** `system_default_fields` from the response; empty when nothing was injected. */
14
+ systemDefaultFields: string[];
15
+ }
16
+ export declare const fetchFormDefaultValues: ({ formId, conversationId, inboxIds }: GetFormDefaultProps) => Promise<FormDefaultValuesData>;
11
17
  export declare const getFormDefaultValuesQuery: ({ formId, conversationId, inboxIds }: GetFormDefaultProps) => (string | number | (string | number)[] | undefined)[];
12
18
  export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, inboxIds, enabled, fetchOnMount }: GetFormDefaultQueryProps) => {
13
- data: Record<string, unknown>;
19
+ data: Record<string, unknown> | undefined;
20
+ systemDefaultFields: string[] | undefined;
14
21
  error: Error;
15
22
  isError: true;
16
23
  isPending: false;
@@ -32,13 +39,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
32
39
  isPaused: boolean;
33
40
  isRefetching: boolean;
34
41
  isStale: boolean;
35
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
42
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
36
43
  fetchStatus: import('@tanstack/query-core').FetchStatus;
37
- promise: Promise<Record<string, unknown>>;
44
+ promise: Promise<FormDefaultValuesData>;
38
45
  enabledRef: import('react').MutableRefObject<boolean>;
39
46
  isNudgeRequired: boolean | undefined;
40
47
  } | {
41
- data: Record<string, unknown>;
48
+ data: Record<string, unknown> | undefined;
49
+ systemDefaultFields: string[] | undefined;
42
50
  error: null;
43
51
  isError: false;
44
52
  isPending: false;
@@ -60,13 +68,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
60
68
  isPaused: boolean;
61
69
  isRefetching: boolean;
62
70
  isStale: boolean;
63
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
71
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
64
72
  fetchStatus: import('@tanstack/query-core').FetchStatus;
65
- promise: Promise<Record<string, unknown>>;
73
+ promise: Promise<FormDefaultValuesData>;
66
74
  enabledRef: import('react').MutableRefObject<boolean>;
67
75
  isNudgeRequired: boolean | undefined;
68
76
  } | {
69
- data: undefined;
77
+ data: Record<string, unknown> | undefined;
78
+ systemDefaultFields: string[] | undefined;
70
79
  error: Error;
71
80
  isError: true;
72
81
  isPending: false;
@@ -88,13 +97,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
88
97
  isPaused: boolean;
89
98
  isRefetching: boolean;
90
99
  isStale: boolean;
91
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
100
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
92
101
  fetchStatus: import('@tanstack/query-core').FetchStatus;
93
- promise: Promise<Record<string, unknown>>;
102
+ promise: Promise<FormDefaultValuesData>;
94
103
  enabledRef: import('react').MutableRefObject<boolean>;
95
104
  isNudgeRequired: boolean | undefined;
96
105
  } | {
97
- data: undefined;
106
+ data: Record<string, unknown> | undefined;
107
+ systemDefaultFields: string[] | undefined;
98
108
  error: null;
99
109
  isError: false;
100
110
  isPending: true;
@@ -116,13 +126,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
116
126
  isPaused: boolean;
117
127
  isRefetching: boolean;
118
128
  isStale: boolean;
119
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
129
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
120
130
  fetchStatus: import('@tanstack/query-core').FetchStatus;
121
- promise: Promise<Record<string, unknown>>;
131
+ promise: Promise<FormDefaultValuesData>;
122
132
  enabledRef: import('react').MutableRefObject<boolean>;
123
133
  isNudgeRequired: boolean | undefined;
124
134
  } | {
125
- data: undefined;
135
+ data: Record<string, unknown> | undefined;
136
+ systemDefaultFields: string[] | undefined;
126
137
  error: null;
127
138
  isError: false;
128
139
  isPending: true;
@@ -144,13 +155,14 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
144
155
  isPaused: boolean;
145
156
  isRefetching: boolean;
146
157
  isStale: boolean;
147
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
158
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
148
159
  fetchStatus: import('@tanstack/query-core').FetchStatus;
149
- promise: Promise<Record<string, unknown>>;
160
+ promise: Promise<FormDefaultValuesData>;
150
161
  enabledRef: import('react').MutableRefObject<boolean>;
151
162
  isNudgeRequired: boolean | undefined;
152
163
  } | {
153
- data: Record<string, unknown>;
164
+ data: Record<string, unknown> | undefined;
165
+ systemDefaultFields: string[] | undefined;
154
166
  isError: false;
155
167
  error: null;
156
168
  isPending: false;
@@ -172,9 +184,9 @@ export declare const useGetFormDefaultValuesQuery: ({ formId, conversationId, in
172
184
  isPaused: boolean;
173
185
  isRefetching: boolean;
174
186
  isStale: boolean;
175
- refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<Record<string, unknown>, Error>>;
187
+ refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<FormDefaultValuesData, Error>>;
176
188
  fetchStatus: import('@tanstack/query-core').FetchStatus;
177
- promise: Promise<Record<string, unknown>>;
189
+ promise: Promise<FormDefaultValuesData>;
178
190
  enabledRef: import('react').MutableRefObject<boolean>;
179
191
  isNudgeRequired: boolean | undefined;
180
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getFormDefaultValues.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/getFormDefaultValues.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAUD,eAAO,MAAM,sBAAsB,yCAIhC,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBvD,CAAC;AAEF,eAAO,MAAM,yBAAyB,yCAA0C,mBAAmB,0DAOlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,gEAMtC,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1B,CAAC"}
1
+ {"version":3,"file":"getFormDefaultValues.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/api/getFormDefaultValues.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AASD,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,kFAAkF;IAClF,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAKD,eAAO,MAAM,sBAAsB,yCAIhC,mBAAmB,KAAG,OAAO,CAAC,qBAAqB,CAyBrD,CAAC;AAEF,eAAO,MAAM,yBAAyB,yCAA0C,mBAAmB,0DAOlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,gEAMtC,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/write-form/components/write-form/index.tsx"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EA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AAwC,CAAC;AAEvE,UAAU,cAAc;IACtB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACxE,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,eAAe,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D;AACD,QAAA,MAAM,SAAS,gJAWZ,cAAc,4CA0+BhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { PrefillLimitField } from '../utils/prefillTruncation';
2
+ import { ITrackingData } from '../../../context';
3
+ export interface UsePrefillPlacementProps {
4
+ /** The form's rendered fields; read at call time, so it may change freely. */
5
+ fields?: readonly PrefillLimitField[];
6
+ /** Identifies the form, so "once per truncated field" is scoped per form. */
7
+ formId?: string | number;
8
+ /** App (connector) name sent as `app`. */
9
+ app?: string;
10
+ conversationId?: number;
11
+ smIds?: (string | number)[];
12
+ sendTrackingEvent: (event: string, data?: ITrackingData) => void;
13
+ }
14
+ /**
15
+ * Everything that sits between a resolved prefill value and the form state:
16
+ * title truncation, the "Prefill Value Truncated" event, and a record of the
17
+ * FINAL value placed in each prefilled field.
18
+ *
19
+ * `placedValuesRef.current` maps field name -> the value the form placed there
20
+ * (after variables resolved, truncation ran and, for summary fields, the summary
21
+ * was substituted). Comparing a submitted value with it tells a rep's edit apart
22
+ * from truncation or the summary arriving.
23
+ *
24
+ * `placeDefaults` / `placeValue` are stable (they read props through a ref), so
25
+ * they can sit in effect deps without re-running those effects.
26
+ */
27
+ export declare const usePrefillPlacement: (props: UsePrefillPlacementProps) => {
28
+ placeDefaults: <T extends Record<string, unknown>>(values: T) => T;
29
+ placeValue: (name: string, value: string) => string;
30
+ placedValuesRef: import('react').MutableRefObject<Record<string, unknown>>;
31
+ };
32
+ //# sourceMappingURL=usePrefillPlacement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrefillPlacement.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/hooks/usePrefillPlacement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,iBAAiB,EAA0B,MAAM,4BAA4B,CAAC;AAGnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,wBAAwB;IACvC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAClE;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB;oBAwB9D,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAG,CAAC;uBAW1C,MAAM,SAAS,MAAM,KAAG,MAAM;;CAUxC,CAAC"}
@@ -0,0 +1,31 @@
1
+ export type YesNo = 'Yes' | 'No';
2
+ export interface PrefillTaskProperties {
3
+ prefilled_fields: YesNo;
4
+ default_prefilled_fields: YesNo;
5
+ edited_prefilled_fields: YesNo;
6
+ }
7
+ export interface GetPrefillTaskPropertiesArgs {
8
+ /**
9
+ * Field name -> FINAL value the form placed (after variables resolved,
10
+ * truncation ran and the summary filled in). `undefined` when no prefill was
11
+ * placed for this form.
12
+ */
13
+ placedValues?: Record<string, unknown>;
14
+ /** The form values the rep submitted. */
15
+ submittedValues: Record<string, unknown>;
16
+ /** Fields mapped to {{conversation_summary}}; the token itself never counts as an edit. */
17
+ summaryFieldNames?: string[];
18
+ /** `system_default_fields` from the `/default-values` response. */
19
+ systemDefaultFields?: string[];
20
+ }
21
+ /**
22
+ * The prefill properties "PM Task Created" (NEW_OBJECT_CREATED_BY_FORM) carries.
23
+ *
24
+ * - `prefilled_fields`: at least one field was placed from `/default-values`.
25
+ * - `default_prefilled_fields`: that response listed system defaults.
26
+ * - `edited_prefilled_fields`: a submitted value differs from the value placed
27
+ * in the form. Truncation and the summary fill are part of the placed value,
28
+ * so neither counts as an edit.
29
+ */
30
+ export declare const getPrefillTaskProperties: ({ placedValues, submittedValues, summaryFieldNames, systemDefaultFields }: GetPrefillTaskPropertiesArgs) => PrefillTaskProperties;
31
+ //# sourceMappingURL=prefillTaskProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefillTaskProperties.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTaskProperties.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,KAAK,CAAC;IACxB,wBAAwB,EAAE,KAAK,CAAC;IAChC,uBAAuB,EAAE,KAAK,CAAC;CAChC;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA8BD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,8EAKlC,4BAA4B,KAAG,qBAajC,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface PrefillTrackingContext {
2
+ tenant?: string;
3
+ UG_Id?: string;
4
+ SM_id?: string[];
5
+ User_id?: string;
6
+ conversation_id?: number;
7
+ }
8
+ /**
9
+ * The standard context every prefill analytics event carries (tenant, UG_Id,
10
+ * SM_id, User_id, conversation_id). Keys whose value is not available are left
11
+ * out rather than sent empty. Shared by "Prefill Value Truncated" and
12
+ * "PM Task Created".
13
+ */
14
+ export declare const getPrefillTrackingContext: ({ conversationId, smIds }: {
15
+ conversationId?: number;
16
+ smIds?: (string | number)[];
17
+ }) => PrefillTrackingContext;
18
+ //# sourceMappingURL=prefillTracking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefillTracking.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTracking.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,8BAGnC;IACD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC7B,KAAG,sBASH,CAAC"}
@@ -0,0 +1,51 @@
1
+ export declare const PREFILL_TRUNCATION_ELLIPSIS = "\u2026";
2
+ /**
3
+ * The slice of a form field the truncation needs. Structural on purpose, so both
4
+ * the raw `FieldListResponse` and the `@connector/ui` field configs satisfy it.
5
+ */
6
+ export interface PrefillLimitField {
7
+ name: string;
8
+ type?: string;
9
+ multiline?: boolean;
10
+ limit?: number | null;
11
+ validations?: {
12
+ maxCharacters?: number;
13
+ isUrl?: unknown;
14
+ isEmail?: unknown;
15
+ };
16
+ }
17
+ export interface PrefillTruncation {
18
+ field: string;
19
+ originalLength: number;
20
+ limit: number;
21
+ }
22
+ /** The field's character limit: `field.limit`, else `validations.maxCharacters`. */
23
+ export declare const getPrefillFieldLimit: (field: PrefillLimitField) => number | undefined;
24
+ /**
25
+ * Title-like = a single-line text input. Multiline (description) fields are not
26
+ * cut here; their summary is sized to fit instead. URL / email inputs are left
27
+ * alone too: a cut value would fail their format validation anyway, and a
28
+ * silently broken link is worse than the visible length error.
29
+ */
30
+ export declare const isTitleLikeField: (field: PrefillLimitField) => boolean;
31
+ /**
32
+ * Cuts `value` to exactly `limit` characters ending in "…" when it is longer
33
+ * than `limit`; returns it untouched otherwise. Never splits a surrogate pair
34
+ * (the result is then one character shorter, still within the limit).
35
+ */
36
+ export declare const truncateToLimit: (value: string, limit: number) => string;
37
+ /**
38
+ * Applies title truncation to resolved prefill values (system defaults and
39
+ * admin-configured alike). Only string values of title-like fields that have a
40
+ * limit are touched. A value still carrying the `{{conversation_summary}}` token
41
+ * is skipped: it is not final yet, and cutting it could break the token. Run it
42
+ * again on that field once the summary has been substituted.
43
+ *
44
+ * Returns a new values object (the input is not mutated) and one entry per
45
+ * field that was shortened.
46
+ */
47
+ export declare const truncatePrefillValues: <T extends Record<string, unknown>>(values: T, fields: readonly PrefillLimitField[]) => {
48
+ values: T;
49
+ truncations: PrefillTruncation[];
50
+ };
51
+ //# sourceMappingURL=prefillTruncation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefillTruncation.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/prefillTruncation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,WAAM,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE;QACZ,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,UAAW,iBAAiB,KAAG,MAAM,GAAG,SAGxE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UAAW,iBAAiB,KAAG,OAC2C,CAAC;AAExG;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,SAAS,MAAM,KAAG,MAM9D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAC7D,CAAC,UACD,SAAS,iBAAiB,EAAE,KACnC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,iBAAiB,EAAE,CAAA;CAe/C,CAAC"}
@@ -0,0 +1,33 @@
1
+ export declare const PERMALINK_LINE_PREFIX = "\nLinked Hiver conversation: ";
2
+ export declare const PERMALINK_URL_ALLOWANCE = 100;
3
+ export declare const PERMALINK_LINE_ALLOWANCE: number;
4
+ export declare const MIN_SUMMARY_MAX_CHARS = 50;
5
+ export interface ISummaryFieldConfig {
6
+ name: string;
7
+ limit?: number;
8
+ validations?: {
9
+ maxCharacters?: number;
10
+ } | Record<string, unknown>;
11
+ meta?: {
12
+ [key: string]: unknown;
13
+ };
14
+ }
15
+ /** The field's character limit, from `limit` or `validations.maxCharacters`. */
16
+ export declare const getFieldCharLimit: (field?: ISummaryFieldConfig) => number | undefined;
17
+ export declare const hasAppendPermalink: (field?: ISummaryFieldConfig) => boolean;
18
+ /**
19
+ * `max_chars` for one summary field: the field limit, minus the rest of the
20
+ * resolved text around the token, minus the permalink line appended on submit
21
+ * when `appendPermalink` applies. If the token appears more than once, the
22
+ * remaining budget is split between the copies.
23
+ *
24
+ * Returns `undefined` when the field has no limit (no cap, as before), and never
25
+ * less than `MIN_SUMMARY_MAX_CHARS`.
26
+ */
27
+ export declare const getSummaryMaxCharsForField: (field: ISummaryFieldConfig | undefined, value: string) => number | undefined;
28
+ /**
29
+ * One summary request feeds every mapped field, so the tightest per-field cap
30
+ * wins. `undefined` when none of the fields has a limit.
31
+ */
32
+ export declare const getSummaryMaxChars: (fieldNames: string[], fields: ISummaryFieldConfig[] | undefined, defaults: Record<string, unknown> | null | undefined) => number | undefined;
33
+ //# sourceMappingURL=summaryMaxChars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summaryMaxChars.d.ts","sourceRoot":"","sources":["../../../../src/features/write-form/utils/summaryMaxChars.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAOrE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,eAAO,MAAM,wBAAwB,QAAyD,CAAC;AAM/F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnE,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAKD,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,WAAY,mBAAmB,KAAG,MAAM,GAAG,SAKxE,CAAC;AAEF,eAAO,MAAM,kBAAkB,WAAY,mBAAmB,KAAG,OAGhE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,UAC9B,mBAAmB,GAAG,SAAS,SAC/B,MAAM,KACZ,MAAM,GAAG,SAWX,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eACjB,MAAM,EAAE,UACZ,mBAAmB,EAAE,GAAG,SAAS,YAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KACnD,MAAM,GAAG,SASX,CAAC"}