@jsb188/graphql 1.1.10 → 1.1.12

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.
Files changed (176) hide show
  1. package/audience.d.ts +343 -0
  2. package/cache/config.ts +98 -50
  3. package/cache/index.chat-activity.test.ts +119 -0
  4. package/cache/index.chat.test.ts +92 -0
  5. package/cache/index.helpers.ts +96 -0
  6. package/cache/index.regression.test.ts +149 -0
  7. package/cache/index.test.ts +1017 -127
  8. package/cache/index.ts +1256 -1269
  9. package/cache/optimistic-ui-runtime.ts +46 -0
  10. package/cache/optimistic-ui.ts +401 -0
  11. package/cache/persist.ts +800 -0
  12. package/cache/store.ts +395 -0
  13. package/cache/value.helpers.ts +17 -0
  14. package/client/draft-persistence-indexed-db.ts +413 -0
  15. package/client/draft-persistence.ts +152 -0
  16. package/client/index.ts +3 -0
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +870 -164
  19. package/deno.lock +187 -0
  20. package/deno.test.json +10 -4
  21. package/gql/eagerQueryMap.ts +12 -0
  22. package/gql/fragments/accountAuthFragments.ts +5 -0
  23. package/gql/fragments/accountFragments.ts +0 -3
  24. package/gql/fragments/accountSessionFragments.ts +16 -0
  25. package/gql/fragments/agentMemoryFragments.ts +23 -0
  26. package/gql/fragments/agentNoteFragments.ts +150 -0
  27. package/gql/fragments/aiChatFragments.ts +42 -0
  28. package/gql/fragments/audienceFragments.ts +141 -0
  29. package/gql/fragments/campaignFragments.ts +566 -0
  30. package/gql/fragments/dataTableFragments.ts +50 -192
  31. package/gql/fragments/emailFragments.ts +32 -17
  32. package/gql/fragments/fieldDocFragments.ts +264 -0
  33. package/gql/fragments/inboundContactFragments.ts +2 -0
  34. package/gql/fragments/logFragments.ts +101 -69
  35. package/gql/fragments/organizationFragments.ts +53 -5
  36. package/gql/fragments/qrCodeFragments.ts +29 -0
  37. package/gql/fragments/scheduleFragments.ts +667 -0
  38. package/gql/fragments/sheetFragments.ts +304 -63
  39. package/gql/fragments/storageFragments.ts +45 -0
  40. package/gql/fragments/workflowFragments.ts +41 -5
  41. package/gql/mutations/accountMutations.ts +0 -2
  42. package/gql/mutations/agentMemoryMutations.ts +68 -0
  43. package/gql/mutations/agentNoteMutations.ts +62 -0
  44. package/gql/mutations/aiChatMutations.ts +49 -4
  45. package/gql/mutations/audienceMutations.ts +71 -0
  46. package/gql/mutations/authMutations.ts +203 -18
  47. package/gql/mutations/billingMutations.ts +17 -27
  48. package/gql/mutations/campaignMutations.ts +258 -0
  49. package/gql/mutations/contactMutations.ts +23 -0
  50. package/gql/mutations/dataTableMutations.ts +19 -54
  51. package/gql/mutations/fieldDocMutations.ts +173 -0
  52. package/gql/mutations/index.ts +10 -2
  53. package/gql/mutations/logMutations.ts +6 -29
  54. package/gql/mutations/organizationMutations.ts +19 -4
  55. package/gql/mutations/qrCodeMutations.ts +20 -0
  56. package/gql/mutations/scheduleMutations.ts +1121 -0
  57. package/gql/mutations/sheetMutations.ts +221 -60
  58. package/gql/mutations/storageMutations.ts +19 -0
  59. package/gql/mutations/workflowMutations.ts +60 -0
  60. package/gql/queries/agentMemoryQueries.ts +28 -0
  61. package/gql/queries/agentNoteQueries.ts +89 -0
  62. package/gql/queries/aiChatQueries.ts +70 -2
  63. package/gql/queries/audienceQueries.ts +128 -0
  64. package/gql/queries/authQueries.ts +47 -0
  65. package/gql/queries/billingQueries.ts +118 -6
  66. package/gql/queries/campaignQueries.ts +236 -0
  67. package/gql/queries/dataTableQueries.ts +61 -13
  68. package/gql/queries/emailQueries.ts +26 -17
  69. package/gql/queries/emailReplyReportQueries.ts +76 -0
  70. package/gql/queries/fieldDocQueries.ts +166 -0
  71. package/gql/queries/inboundContactQueries.ts +4 -0
  72. package/gql/queries/index.ts +10 -2
  73. package/gql/queries/logQueries.ts +68 -30
  74. package/gql/queries/organizationQueries.ts +65 -1
  75. package/gql/queries/qrCodeQueries.ts +20 -0
  76. package/gql/queries/scheduleQueries.ts +691 -0
  77. package/gql/queries/sheetQueries.ts +244 -26
  78. package/gql/queries/storageQueries.ts +38 -0
  79. package/gql/queries/workflowQueries.ts +77 -2
  80. package/hooks/index.helpers.test.ts +50 -0
  81. package/hooks/index.helpers.ts +52 -0
  82. package/hooks/index.ts +2254 -982
  83. package/hooks/use-account-mtn.ts +76 -81
  84. package/hooks/use-agentMemory-mtn.ts +71 -0
  85. package/hooks/use-agentMemory-qry.ts +56 -0
  86. package/hooks/use-agentNote-mtn.ts +82 -0
  87. package/hooks/use-agentNote-qry.ts +190 -0
  88. package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
  89. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  90. package/hooks/use-agentNote-recovery.ts +72 -0
  91. package/hooks/use-aiChat-mtn.ts +220 -141
  92. package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
  93. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  94. package/hooks/use-aiChat-qry.ts +341 -237
  95. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  96. package/hooks/use-app-qry.ts +12 -9
  97. package/hooks/use-audience-mtn.ts +194 -0
  98. package/hooks/use-audience-qry.helpers.test.ts +80 -0
  99. package/hooks/use-audience-qry.helpers.ts +63 -0
  100. package/hooks/use-audience-qry.ts +330 -0
  101. package/hooks/use-auth-mtn.ts +435 -252
  102. package/hooks/use-auth-qry.ts +51 -0
  103. package/hooks/use-billing-mtn.ts +31 -0
  104. package/hooks/use-billing-qry.ts +76 -0
  105. package/hooks/use-campaign-generation-recovery.ts +53 -0
  106. package/hooks/use-campaign-mtn.ts +436 -0
  107. package/hooks/use-campaign-qry.helpers.ts +40 -0
  108. package/hooks/use-campaign-qry.ts +834 -0
  109. package/hooks/use-dataTable-mtn.ts +37 -46
  110. package/hooks/use-dataTable-qry.ts +102 -128
  111. package/hooks/use-email-qry.helpers.ts +37 -0
  112. package/hooks/use-email-qry.ts +56 -86
  113. package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
  114. package/hooks/use-fieldDoc-mtn.ts +262 -0
  115. package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
  116. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  117. package/hooks/use-fieldDoc-qry.ts +212 -0
  118. package/hooks/use-inboundContact-mtn.ts +19 -16
  119. package/hooks/use-inboundContact-qry.ts +62 -56
  120. package/hooks/use-integration-mtn.ts +56 -38
  121. package/hooks/use-integration-qry.ts +24 -9
  122. package/hooks/use-log-mtn.ts +88 -59
  123. package/hooks/use-log-qry.ts +150 -73
  124. package/hooks/use-organization-mtn.ts +334 -277
  125. package/hooks/use-organization-qry.ts +155 -129
  126. package/hooks/use-publicFormEmail-mtn.ts +27 -0
  127. package/hooks/use-qrCode-mtn.ts +40 -0
  128. package/hooks/use-qrCode-qry.ts +78 -0
  129. package/hooks/use-schedule-mtn.ts +589 -0
  130. package/hooks/use-schedule-qry.ts +738 -0
  131. package/hooks/use-schedule-reactive.ts +486 -0
  132. package/hooks/use-sheet-mtn.ts +157 -79
  133. package/hooks/use-sheet-qry.ts +221 -92
  134. package/hooks/use-storage-mtn.ts +81 -41
  135. package/hooks/use-storage-qry.ts +128 -14
  136. package/hooks/use-workflow-mtn.ts +72 -0
  137. package/hooks/use-workflow-qry.ts +184 -47
  138. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  139. package/libs/ai-chat-outgoing.ts +11 -0
  140. package/libs/ai-chat-outgoing.types.ts +25 -0
  141. package/libs/ai-chat-run-realtime.ts +20 -0
  142. package/libs/ai-chat-submission-realtime.ts +150 -0
  143. package/libs/fragment-realtime-sequence.ts +55 -0
  144. package/libs/fragment-recovery.test.ts +326 -0
  145. package/libs/fragment-recovery.ts +325 -0
  146. package/libs/open-sheet.ts +138 -0
  147. package/libs/orchestrator-realtime.helpers.test.ts +229 -0
  148. package/libs/orchestrator-realtime.helpers.ts +317 -0
  149. package/libs/orchestrator-realtime.ts +433 -0
  150. package/libs/request-cache-regression.test.ts +122 -0
  151. package/libs/request-managed-session.test.ts +574 -0
  152. package/libs/request-no-store.test.ts +419 -0
  153. package/libs/sheet-command-batch.ts +44 -0
  154. package/libs/sheet-view-realtime-router.test.ts +214 -0
  155. package/libs/sheet-view-realtime-router.ts +99 -0
  156. package/libs/sse-ticket.test.ts +26 -0
  157. package/loaders/campaign.test.ts +186 -0
  158. package/loaders/campaign.ts +110 -0
  159. package/loaders/emailPreference.ts +75 -0
  160. package/loaders/rest.ts +12 -0
  161. package/package.json +119 -71
  162. package/schedule.d.ts +1790 -0
  163. package/sse.helpers.ts +19 -0
  164. package/sse.ts +70 -106
  165. package/tests/agent-note-detail-cache.test.ts +120 -0
  166. package/tests/agent-note-search.test.ts +444 -0
  167. package/tsconfig.json +11 -10
  168. package/types.d.ts +77 -26
  169. package/utils.ts +78 -49
  170. package/gql/fragments/billingFragments.ts +0 -25
  171. package/gql/fragments/productFragments.ts +0 -39
  172. package/gql/fragments/reportFragments.ts +0 -90
  173. package/gql/queries/productQueries.ts +0 -31
  174. package/gql/queries/reportQueries.ts +0 -134
  175. package/hooks/use-product-qry.ts +0 -67
  176. package/hooks/use-report-qry.ts +0 -153
@@ -1,171 +1,44 @@
1
+ // The one DataTable fragment: every listing, detail and mutation selects it,
2
+ // and the server's $dataTableFragment realtime updates patch it.
1
3
  export const dataTableFragment = `fragment dataTableFragment on DataTable {
2
4
  id
5
+ cursor
3
6
  organizationId
4
7
 
5
- name
8
+ kind
9
+ source
6
10
  title
7
11
  description
8
- active
9
-
10
- design {
11
- id
12
- instructions
13
- cellsOrder
14
- viewsOrder
15
- defaultViewId
16
- humansCannotEdit
17
- stickyTop
18
- stickyLeft
19
-
20
- cells {
21
- key
22
- label
23
- humanLabel
24
- iconName
25
- fieldType
26
- humanFieldType
27
- format
28
- instructions
29
- openLink
30
- humansOnly
31
- humansCannotEdit
32
- hidden
33
- indexed
34
- width
35
-
36
- source {
37
- path
38
- table
39
- }
40
-
41
- options {
42
- label
43
- value
44
- color
45
- }
46
- }
47
-
48
- views {
49
- id
50
- name
51
- layout
52
- iconName
53
- color
54
- description
55
- columnsOrder
56
- stickyTop
57
- stickyLeft
58
- humansCannotEdit
59
-
60
- rowModel {
61
- type
62
-
63
- dimensions {
64
- key
65
- label
66
-
67
- source {
68
- type
69
- cellKey
70
- formulaKey
71
- dimensionKey
72
- table
73
- path
74
- sourceCellKey
75
- sourceCellKeys
76
- operation
77
- }
78
- }
79
-
80
- generator {
81
- keyPrefix
82
-
83
- dateSeries {
84
- key
85
- label
86
- sourceCellKey
87
- grain
88
- weekStart
89
-
90
- range {
91
- type
92
- start
93
- end
94
- }
95
- }
96
-
97
- dimensions {
98
- key
99
- label
100
-
101
- source {
102
- type
103
- cellKey
104
-
105
- values {
106
- value
107
- label
108
- }
109
- }
110
- }
111
-
112
- measures {
113
- key
114
- label
115
- operation
116
- sourceCellKey
117
- }
118
- }
119
- }
120
-
121
- columns {
122
- key
123
- label
124
- humanLabel
125
- iconName
126
- fieldType
127
- humanFieldType
128
- openLink
129
- humansCannotEdit
130
- width
131
-
132
- source {
133
- type
134
- cellKey
135
- formulaKey
136
- dimensionKey
137
- table
138
- path
139
- sourceCellKey
140
- sourceCellKeys
141
- operation
142
- }
143
-
144
- options {
145
- label
146
- value
147
- color
148
- }
149
- }
150
-
151
- filters {
152
- id
153
- columnKey
154
- operator
155
- value
156
- enabled
157
- }
12
+ rowCount
13
+ revision
14
+ syncState
15
+ syncError
16
+ syncedAt
17
+ derivePausedAt
18
+ derivePauseReason
19
+ canManage
20
+ archivedAt
21
+
22
+ columns {
23
+ key
24
+ label
25
+ type
26
+ origin
27
+ unit
28
+ currency
29
+ retired
30
+ }
158
31
 
159
- sorts {
160
- columnKey
161
- direction
162
- }
32
+ coverageWarnings {
33
+ code
34
+ columnKey
35
+ message
36
+ }
163
37
 
164
- groups {
165
- columnKey
166
- direction
167
- }
168
- }
38
+ ownerNote {
39
+ id
40
+ headline
41
+ emoji
169
42
  }
170
43
 
171
44
  createdAt
@@ -174,39 +47,24 @@ export const dataTableFragment = `fragment dataTableFragment on DataTable {
174
47
 
175
48
  export const dataTableRowFragment = `fragment dataTableRowFragment on DataTableRow {
176
49
  id
177
- cursor
178
- organizationId
179
- dataTableId
180
-
181
- identifier
182
- viewId
183
- viewRowKey
184
- position
185
- metadata
50
+ key
51
+ cells
52
+ sourceReadableId
53
+ derivePending
54
+ deriveError
55
+ changedAt
186
56
  }`;
187
57
 
188
- export const dataTableCellFragment = `fragment dataTableCellFragment on DataTableCell {
58
+ export const dataTableRunFragment = `fragment dataTableRunFragment on DataTableRun {
189
59
  id
190
- dataTableId
191
- dataTableRowId
192
-
193
- cellKey
194
- iconName
195
- value
196
- textValue
197
- numberValue
198
- booleanValue
199
- dateValue
200
- datetimeValue
201
- relatedTable
202
- relatedId
203
- reference {
204
- dataTableId
205
- dataTableRowId
206
- cellKey
207
- }
208
- referenceStatus
209
-
210
- createdAt
211
- updatedAt
60
+ cause
61
+ added
62
+ changed
63
+ removed
64
+ derived
65
+ llmCalls
66
+ reason
67
+ error
68
+ startedAt
69
+ finishedAt
212
70
  }`;
@@ -1,26 +1,41 @@
1
- export const inboundEmailAttachmentFragment = `fragment inboundEmailAttachmentFragment on InboundEmailAttachment {
2
- name
3
- contentType
4
- contentLength
5
- }`;
6
-
7
- export const inboundEmailFragment = `fragment inboundEmailFragment on InboundEmail {
1
+ export const emailMessageFragment = `fragment emailMessageFragment on EmailMessage {
8
2
  id
9
3
  cursor
10
4
  organizationId
11
- recipientEmail
12
- senderEmail
13
- subject
14
- postmarkMessageId
5
+ direction
6
+ kind
15
7
  status
16
- statusSummary
8
+ statusGroup
9
+ statusDetail
10
+ fromEmail
11
+ fromName
12
+ toEmail
13
+ toName
14
+ subject
17
15
  previewText
18
- bodyFormat
16
+ postmarkMessageId
17
+ campaignId
18
+ relatedEmailMessageId
19
+ occurredAt
20
+ }`;
21
+
22
+ export const emailMessageDetailsFragment = `fragment emailMessageDetailsFragment on EmailMessage {
23
+ id
19
24
  bodyText
20
- attachments {
21
- ...inboundEmailAttachmentFragment
22
- }
23
- receivedAt
25
+ bodyFormat
24
26
  processingStartedAt
25
27
  processingCompletedAt
28
+ replyToEmail
29
+ cc
30
+ replyToName
31
+ suppressionReason
32
+ sentAt
33
+ deliveredAt
34
+ firstOpenedAt
35
+ bouncedAt
36
+ bounceType
37
+ spamComplaintAt
38
+ broadcast
39
+ relatedLogIds
40
+ updatedAt
26
41
  }`;
@@ -0,0 +1,264 @@
1
+ // Program-owned group fields shared by program lists, forms and editor sources.
2
+ export const fieldDocProgramGroupFragment = `fragment fieldDocProgramGroupFragment on FieldDocProgramGroup {
3
+ id
4
+ fieldDocProgramId
5
+ name
6
+ order
7
+ }`;
8
+
9
+ // Org-agnostic program fields. Per-organization data (enrollment state, forms)
10
+ // never goes on this fragment: one cache entry is shared by every organization.
11
+ export const fieldDocProgramFragment = `fragment fieldDocProgramFragment on FieldDocProgram {
12
+ id
13
+ isCatalog
14
+ name
15
+ shortName
16
+ description
17
+ categoryKey
18
+ operations
19
+ layout {
20
+ columns
21
+ headers
22
+ gridLayoutStyle
23
+ }
24
+ retired
25
+ }`;
26
+
27
+ // Enrollment scalars only; id is "<organizationId>:<programId>". Program and
28
+ // forms are selected beside it (fieldDocProgramEnrollmentStatement).
29
+ export const fieldDocProgramEnrollmentFragment = `fragment fieldDocProgramEnrollmentFragment on FieldDocProgramEnrollment {
30
+ id
31
+ organizationId
32
+ archivedAt
33
+ restorableUntil
34
+ }`;
35
+
36
+ // The form; org-agnostic
37
+ export const fieldDocFragment = `fragment fieldDocFragment on FieldDoc {
38
+ order
39
+ id
40
+ fieldDocProgramId
41
+ documentName
42
+ title
43
+ draftTitle
44
+ description
45
+ frequency
46
+ isProgramDoc
47
+ retired
48
+ published
49
+ publishedRevisionNumber
50
+ hasDraft
51
+ }`;
52
+
53
+ // The one submission shape, shared by submission lists and the document header.
54
+ // Spread it directly in operations, never inside another fragment.
55
+ export const fieldDocSubmissionFragment = `fragment fieldDocSubmissionFragment on FieldDocSubmission {
56
+ id
57
+ cursor
58
+ readableId
59
+ fieldDocId
60
+ fieldDocProgramId
61
+ programName
62
+ programShortName
63
+ isProgramDoc
64
+ definitionRevisionId
65
+
66
+ organizationId
67
+ organizationName
68
+ childOrgId
69
+ childOrgName
70
+ siteId
71
+ location
72
+
73
+ documentName
74
+ title
75
+ frequency
76
+ period
77
+ status
78
+ statusOverridden
79
+ summary
80
+ identifierHint
81
+
82
+ instanceKey
83
+ instanceStatus
84
+ instanceClosedAt
85
+
86
+ activityAt
87
+ createdAt
88
+ updatedAt
89
+ }`;
90
+
91
+ // Immutable definition revision scalars; sections and elements are selected
92
+ // beside it with their own fragments
93
+ export const fieldDocDefinitionFragment = `fragment fieldDocDefinitionFragment on FieldDocDefinition {
94
+ id
95
+ fieldDocId
96
+ revisionNumber
97
+ title
98
+ description
99
+ }`;
100
+
101
+ export const fieldDocDefinitionSectionFragment = `fragment fieldDocDefinitionSectionFragment on FieldDocDefinitionSection {
102
+ id
103
+ key
104
+ title
105
+ description
106
+ }`;
107
+
108
+ export const fieldDocDefinitionElementFragment = `fragment fieldDocDefinitionElementFragment on FieldDocDefinitionElement {
109
+ id
110
+ key
111
+ kind
112
+ label
113
+ description
114
+ options
115
+ required
116
+ allowMultipleAnswers
117
+ doNotAllowNotes
118
+ answerType
119
+ tableColumns {
120
+ key
121
+ label
122
+ type
123
+ required
124
+ options
125
+ }
126
+ lineNumber
127
+ }`;
128
+
129
+ // One answer; id is "<submissionId>:<key>". Spread it directly in operations,
130
+ // never inside another fragment.
131
+ export const fieldDocAnswerFragment = `fragment fieldDocAnswerFragment on FieldDocAnswer {
132
+ id
133
+ key
134
+ text
135
+ tableRows {
136
+ id
137
+ cells {
138
+ key
139
+ text
140
+ isCustomBooleanLabel
141
+ }
142
+ }
143
+ answerState
144
+ answerReason
145
+ note
146
+ warningNote
147
+ referenceIds
148
+ }`;
149
+
150
+ // Edit session scalars only; id is "<organizationId>:<fieldDocId>". The source,
151
+ // editor and custom instructions are selected beside it (fieldDocEditSessionStatement).
152
+ export const fieldDocEditSessionFragment = `fragment fieldDocEditSessionFragment on FieldDocEditSession {
153
+ id
154
+ organizationId
155
+ mode
156
+ manageable
157
+ }`;
158
+
159
+ // id is "<organizationId>:<fieldDocId>"
160
+ export const fieldDocEditorSourceFragment = `fragment fieldDocEditorSourceFragment on FieldDocEditorSource {
161
+ order
162
+ id
163
+ fieldDocId
164
+ organizationId
165
+ fieldDocProgramId
166
+ isProgramDoc
167
+ documentName
168
+ frequency
169
+ editVersion
170
+ hasDraft
171
+ draftStale
172
+ publishedRevisionNumber
173
+ draftUpdatedAt
174
+ }`;
175
+
176
+ // Nested fragments are selected directly by operations, never spread inside another fragment.
177
+ export const fieldDocProgramStatement = `...fieldDocProgramFragment
178
+ groups {
179
+ ...fieldDocProgramGroupFragment
180
+ }`;
181
+
182
+ export const fieldDocStatement = `...fieldDocFragment
183
+ group {
184
+ ...fieldDocProgramGroupFragment
185
+ }`;
186
+
187
+ export const fieldDocEditorSourceStatement = `...fieldDocEditorSourceFragment
188
+ group {
189
+ ...fieldDocProgramGroupFragment
190
+ }`;
191
+
192
+ export const fieldDocProgramImports = `${fieldDocProgramFragment}
193
+ ${fieldDocProgramGroupFragment}`;
194
+ export const fieldDocImports = `${fieldDocFragment}
195
+ ${fieldDocProgramGroupFragment}`;
196
+ export const fieldDocEditorSourceImports = `${fieldDocEditorSourceFragment}
197
+ ${fieldDocProgramGroupFragment}`;
198
+
199
+ // The enrollment selection shared by fieldDocProgramEnrollments and every
200
+ // mutation returning FieldDocProgramEnrollment, so all of them cache the same tree
201
+ export const fieldDocProgramEnrollmentStatement = `...fieldDocProgramEnrollmentFragment
202
+
203
+ fieldDocSubmissionUpdates {
204
+ fieldDocId
205
+ lastSubmissionUpdatedAt
206
+ }
207
+
208
+ program {
209
+ ${fieldDocProgramStatement}
210
+ }
211
+
212
+ forms {
213
+ ${fieldDocStatement}
214
+ }`;
215
+
216
+ export const fieldDocProgramEnrollmentImports = `
217
+ ${fieldDocProgramEnrollmentFragment}
218
+ ${fieldDocProgramGroupFragment}
219
+ ${fieldDocProgramFragment}
220
+ ${fieldDocFragment}
221
+ `;
222
+
223
+ // The edit session selection shared by fieldDocEditSession and
224
+ // editFieldDocCustomInstructions, so the mutation result updates the cached session
225
+ export const fieldDocEditSessionStatement = `...fieldDocEditSessionFragment
226
+
227
+ fieldDoc {
228
+ ${fieldDocEditorSourceStatement}
229
+ }
230
+
231
+ editor {
232
+ definition {
233
+ title
234
+ description
235
+ agentHint
236
+ sections {
237
+ key
238
+ label
239
+ description
240
+ hint
241
+ elements {
242
+ key
243
+ kind
244
+ label
245
+ description
246
+ hint
247
+ options
248
+ required
249
+ settings
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ customInstructions {
256
+ elementKey
257
+ instructions
258
+ updatedAt
259
+ }`;
260
+
261
+ export const fieldDocEditSessionImports = `
262
+ ${fieldDocEditSessionFragment}
263
+ ${fieldDocEditorSourceImports}
264
+ `;
@@ -4,6 +4,8 @@ export const inboundContactFragment = `fragment inboundContactFragment on Inboun
4
4
  cursor
5
5
  personName
6
6
  email
7
+ emailEligible
8
+ campaignEmailSuppressed
7
9
  phone
8
10
  memory
9
11
  associated {