@jsb188/graphql 1.1.11 → 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 (165) hide show
  1. package/audience.d.ts +343 -0
  2. package/cache/config.ts +58 -24
  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 +370 -42
  8. package/cache/index.ts +326 -799
  9. package/cache/optimistic-ui-runtime.ts +46 -0
  10. package/cache/optimistic-ui.ts +401 -0
  11. package/cache/persist.ts +98 -19
  12. package/cache/store.ts +22 -64
  13. package/cache/value.helpers.ts +17 -0
  14. package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
  15. package/{drafts/index.ts → client/draft-persistence.ts} +5 -2
  16. package/client/index.ts +3 -2
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +130 -215
  19. package/deno.lock +17 -0
  20. package/deno.test.json +2 -0
  21. package/gql/fragments/agentMemoryFragments.ts +5 -1
  22. package/gql/fragments/agentNoteFragments.ts +150 -0
  23. package/gql/fragments/aiChatFragments.ts +36 -10
  24. package/gql/fragments/audienceFragments.ts +141 -0
  25. package/gql/fragments/campaignFragments.ts +415 -126
  26. package/gql/fragments/dataTableFragments.ts +48 -80
  27. package/gql/fragments/emailFragments.ts +28 -23
  28. package/gql/fragments/fieldDocFragments.ts +222 -40
  29. package/gql/fragments/inboundContactFragments.ts +2 -0
  30. package/gql/fragments/logFragments.ts +93 -2
  31. package/gql/fragments/organizationFragments.ts +10 -0
  32. package/gql/fragments/qrCodeFragments.ts +29 -0
  33. package/gql/fragments/scheduleFragments.ts +652 -140
  34. package/gql/fragments/sheetFragments.ts +84 -373
  35. package/gql/fragments/storageFragments.ts +25 -1
  36. package/gql/fragments/workflowFragments.ts +13 -1
  37. package/gql/mutations/agentMemoryMutations.ts +32 -0
  38. package/gql/mutations/agentNoteMutations.ts +62 -0
  39. package/gql/mutations/aiChatMutations.ts +36 -4
  40. package/gql/mutations/audienceMutations.ts +71 -0
  41. package/gql/mutations/authMutations.ts +45 -1
  42. package/gql/mutations/billingMutations.ts +24 -0
  43. package/gql/mutations/campaignMutations.ts +170 -127
  44. package/gql/mutations/contactMutations.ts +23 -0
  45. package/gql/mutations/dataTableMutations.ts +18 -75
  46. package/gql/mutations/fieldDocMutations.ts +162 -13
  47. package/gql/mutations/index.ts +8 -5
  48. package/gql/mutations/organizationMutations.ts +6 -0
  49. package/gql/mutations/qrCodeMutations.ts +20 -0
  50. package/gql/mutations/scheduleMutations.ts +1052 -354
  51. package/gql/mutations/sheetMutations.ts +62 -118
  52. package/gql/mutations/storageMutations.ts +0 -1
  53. package/gql/mutations/workflowMutations.ts +18 -0
  54. package/gql/queries/agentMemoryQueries.ts +6 -0
  55. package/gql/queries/agentNoteQueries.ts +89 -0
  56. package/gql/queries/aiChatQueries.ts +56 -4
  57. package/gql/queries/audienceQueries.ts +128 -0
  58. package/gql/queries/authQueries.ts +6 -0
  59. package/gql/queries/billingQueries.ts +95 -6
  60. package/gql/queries/campaignQueries.ts +132 -23
  61. package/gql/queries/dataTableQueries.ts +24 -65
  62. package/gql/queries/emailQueries.ts +18 -61
  63. package/gql/queries/emailReplyReportQueries.ts +76 -0
  64. package/gql/queries/fieldDocQueries.ts +100 -92
  65. package/gql/queries/inboundContactQueries.ts +4 -0
  66. package/gql/queries/index.ts +3 -1
  67. package/gql/queries/logQueries.ts +62 -7
  68. package/gql/queries/organizationQueries.ts +13 -0
  69. package/gql/queries/qrCodeQueries.ts +20 -0
  70. package/gql/queries/scheduleQueries.ts +633 -257
  71. package/gql/queries/sheetQueries.ts +59 -152
  72. package/gql/queries/workflowQueries.ts +10 -4
  73. package/hooks/index.helpers.test.ts +50 -0
  74. package/hooks/index.helpers.ts +52 -0
  75. package/hooks/index.ts +863 -685
  76. package/hooks/use-agentMemory-mtn.ts +29 -31
  77. package/hooks/use-agentMemory-qry.ts +15 -3
  78. package/hooks/use-agentNote-mtn.ts +82 -0
  79. package/hooks/use-agentNote-qry.ts +190 -0
  80. package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
  81. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  82. package/hooks/use-agentNote-recovery.ts +72 -0
  83. package/hooks/use-aiChat-mtn.ts +96 -112
  84. package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
  85. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  86. package/hooks/use-aiChat-qry.ts +229 -383
  87. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  88. package/hooks/use-audience-mtn.ts +194 -0
  89. package/hooks/use-audience-qry.helpers.test.ts +80 -0
  90. package/hooks/use-audience-qry.helpers.ts +63 -0
  91. package/hooks/use-audience-qry.ts +330 -0
  92. package/hooks/use-auth-mtn.ts +30 -1
  93. package/hooks/use-billing-mtn.ts +31 -0
  94. package/hooks/use-billing-qry.ts +76 -0
  95. package/hooks/use-campaign-generation-recovery.ts +53 -0
  96. package/hooks/use-campaign-mtn.ts +224 -165
  97. package/hooks/use-campaign-qry.helpers.ts +40 -0
  98. package/hooks/use-campaign-qry.ts +631 -54
  99. package/hooks/use-dataTable-mtn.ts +23 -115
  100. package/hooks/use-dataTable-qry.ts +66 -916
  101. package/hooks/use-email-qry.helpers.ts +37 -0
  102. package/hooks/use-email-qry.ts +33 -178
  103. package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
  104. package/hooks/use-fieldDoc-mtn.ts +244 -32
  105. package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
  106. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  107. package/hooks/use-fieldDoc-qry.ts +134 -102
  108. package/hooks/use-inboundContact-qry.ts +7 -9
  109. package/hooks/use-log-mtn.ts +25 -12
  110. package/hooks/use-log-qry.ts +99 -46
  111. package/hooks/use-organization-qry.ts +16 -60
  112. package/hooks/use-publicFormEmail-mtn.ts +27 -0
  113. package/hooks/use-qrCode-mtn.ts +40 -0
  114. package/hooks/use-qrCode-qry.ts +78 -0
  115. package/hooks/use-schedule-mtn.ts +506 -333
  116. package/hooks/use-schedule-qry.ts +682 -101
  117. package/hooks/use-schedule-reactive.ts +486 -0
  118. package/hooks/use-sheet-mtn.ts +91 -199
  119. package/hooks/use-sheet-qry.ts +84 -238
  120. package/hooks/use-storage-qry.ts +84 -61
  121. package/hooks/use-workflow-mtn.ts +39 -22
  122. package/hooks/use-workflow-qry.ts +40 -61
  123. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  124. package/libs/ai-chat-outgoing.ts +11 -0
  125. package/libs/ai-chat-outgoing.types.ts +25 -0
  126. package/libs/ai-chat-run-realtime.ts +20 -0
  127. package/libs/ai-chat-submission-realtime.ts +150 -0
  128. package/libs/fragment-realtime-sequence.ts +55 -0
  129. package/libs/fragment-recovery.test.ts +326 -0
  130. package/libs/fragment-recovery.ts +325 -0
  131. package/libs/open-sheet.ts +138 -0
  132. package/libs/orchestrator-realtime.helpers.test.ts +229 -0
  133. package/libs/orchestrator-realtime.helpers.ts +317 -0
  134. package/libs/orchestrator-realtime.ts +433 -0
  135. package/libs/request-cache-regression.test.ts +122 -0
  136. package/{client → libs}/request-managed-session.test.ts +1 -1
  137. package/libs/request-no-store.test.ts +419 -0
  138. package/libs/sheet-command-batch.ts +44 -0
  139. package/libs/sheet-view-realtime-router.test.ts +214 -0
  140. package/libs/sheet-view-realtime-router.ts +99 -0
  141. package/loaders/campaign.test.ts +186 -0
  142. package/loaders/campaign.ts +56 -83
  143. package/loaders/emailPreference.ts +75 -0
  144. package/loaders/rest.ts +12 -0
  145. package/package.json +42 -17
  146. package/schedule.d.ts +1790 -0
  147. package/sse.helpers.ts +19 -0
  148. package/sse.ts +26 -115
  149. package/tests/agent-note-detail-cache.test.ts +120 -0
  150. package/tests/agent-note-search.test.ts +444 -0
  151. package/types.d.ts +46 -25
  152. package/client/data-table-realtime-subscriptions.test.ts +0 -740
  153. package/client/data-table-realtime-subscriptions.ts +0 -955
  154. package/client/data-table-realtime.test.ts +0 -792
  155. package/client/data-table-realtime.ts +0 -1218
  156. package/client/fragment-realtime-sequence.ts +0 -52
  157. package/client/open-sheet.ts +0 -137
  158. package/client/request-no-store.test.ts +0 -157
  159. package/gql/fragments/agentDocFragments.ts +0 -46
  160. package/gql/fragments/billingFragments.ts +0 -14
  161. package/gql/mutations/agentDocMutations.ts +0 -177
  162. package/gql/queries/agentDocQueries.ts +0 -120
  163. package/hooks/use-agentDoc-mtn.ts +0 -285
  164. package/hooks/use-agentDoc-qry.ts +0 -208
  165. /package/{client → libs}/sse-ticket.test.ts +0 -0
@@ -1,102 +1,70 @@
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
3
5
  cursor
4
6
  organizationId
5
7
 
6
- name
8
+ kind
9
+ source
7
10
  title
8
11
  description
9
- active
10
- deletedAt
12
+ rowCount
13
+ revision
14
+ syncState
15
+ syncError
16
+ syncedAt
17
+ derivePausedAt
18
+ derivePauseReason
19
+ canManage
20
+ archivedAt
11
21
 
12
- design {
13
- id
14
- instructions
15
- cellsOrder
16
- humansCannotEdit
17
- rowIdentifier
18
- stickyTop
19
- stickyLeft
20
-
21
- cells {
22
- key
23
- label
24
- humanLabel
25
- iconName
26
- fieldType
27
- format
28
- instructions
29
- openLink
30
- humansOnly
31
- humansCannotEdit
32
- hidden
33
- indexed
34
- width
22
+ columns {
23
+ key
24
+ label
25
+ type
26
+ origin
27
+ unit
28
+ currency
29
+ retired
30
+ }
35
31
 
36
- source {
37
- path
38
- table
39
- }
32
+ coverageWarnings {
33
+ code
34
+ columnKey
35
+ message
36
+ }
40
37
 
41
- options {
42
- label
43
- value
44
- color
45
- }
46
- }
38
+ ownerNote {
39
+ id
40
+ headline
41
+ emoji
47
42
  }
48
43
 
49
44
  createdAt
50
45
  updatedAt
51
46
  }`;
52
47
 
53
- export const dataTablePartialFragment = `fragment dataTablePartialFragment on DataTable {
54
- id
55
- name
56
- title
57
- description
58
- deletedAt
59
- }`;
60
-
61
- export const dataTableMetadataFragment = `fragment dataTableMetadataFragment on DataTableMetadata {
62
- id
63
- name
64
- title
65
- description
66
- }`;
67
-
68
48
  export const dataTableRowFragment = `fragment dataTableRowFragment on DataTableRow {
69
49
  id
70
- cursor
71
- organizationId
72
- dataTableId
73
-
74
- identifier
75
- metadata
50
+ key
51
+ cells
52
+ sourceReadableId
53
+ derivePending
54
+ deriveError
55
+ changedAt
76
56
  }`;
77
57
 
78
- export const dataTableCellFragment = `fragment dataTableCellFragment on DataTableCell {
58
+ export const dataTableRunFragment = `fragment dataTableRunFragment on DataTableRun {
79
59
  id
80
- dataTableId
81
- dataTableRowId
82
-
83
- cellKey
84
- iconName
85
- value
86
- textValue
87
- numberValue
88
- booleanValue
89
- dateValue
90
- datetimeValue
91
- relatedTable
92
- relatedId
93
- reference {
94
- dataTableId
95
- dataTableRowId
96
- cellKey
97
- }
98
- referenceStatus
99
-
100
- createdAt
101
- updatedAt
60
+ cause
61
+ added
62
+ changed
63
+ removed
64
+ derived
65
+ llmCalls
66
+ reason
67
+ error
68
+ startedAt
69
+ finishedAt
102
70
  }`;
@@ -1,36 +1,41 @@
1
- export const inboundEmailFragment = `fragment inboundEmailFragment on InboundEmail {
1
+ export const emailMessageFragment = `fragment emailMessageFragment on EmailMessage {
2
2
  id
3
3
  cursor
4
4
  organizationId
5
- recipientEmail
6
- senderEmail
7
- subject
8
- postmarkMessageId
5
+ direction
6
+ kind
9
7
  status
10
- statusSummary
8
+ statusGroup
9
+ statusDetail
10
+ fromEmail
11
+ fromName
12
+ toEmail
13
+ toName
14
+ subject
11
15
  previewText
12
- bodyFormat
13
- bodyText
14
- receivedAt
15
- processingStartedAt
16
- processingCompletedAt
16
+ postmarkMessageId
17
+ campaignId
18
+ relatedEmailMessageId
19
+ occurredAt
17
20
  }`;
18
21
 
19
- export const outboundEmailFragment = `fragment outboundEmailFragment on OutboundEmail {
22
+ export const emailMessageDetailsFragment = `fragment emailMessageDetailsFragment on EmailMessage {
20
23
  id
21
- cursor
22
- organizationId
23
- sourceInboundEmailId
24
- toEmail
24
+ bodyText
25
+ bodyFormat
26
+ processingStartedAt
27
+ processingCompletedAt
25
28
  replyToEmail
29
+ cc
26
30
  replyToName
27
- subject
28
- body
29
- status
30
- postmarkMessageId
31
- errorMessage
31
+ suppressionReason
32
32
  sentAt
33
- createdAt
34
- updatedAt
33
+ deliveredAt
34
+ firstOpenedAt
35
+ bouncedAt
36
+ bounceType
37
+ spamComplaintAt
38
+ broadcast
35
39
  relatedLogIds
40
+ updatedAt
36
41
  }`;
@@ -1,27 +1,111 @@
1
- export const fieldDocFragment = `fragment fieldDocFragment on FieldDoc {
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 {
2
30
  id
3
31
  organizationId
32
+ archivedAt
33
+ restorableUntil
34
+ }`;
4
35
 
36
+ // The form; org-agnostic
37
+ export const fieldDocFragment = `fragment fieldDocFragment on FieldDoc {
38
+ order
39
+ id
40
+ fieldDocProgramId
5
41
  documentName
6
42
  title
43
+ draftTitle
7
44
  description
8
- agentHint
9
45
  frequency
10
- fieldDocGroupId
11
- groupName
12
- groupShortName
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
13
76
  period
77
+ status
78
+ statusOverridden
14
79
  summary
80
+ identifierHint
81
+
82
+ instanceKey
83
+ instanceStatus
84
+ instanceClosedAt
85
+
86
+ activityAt
87
+ createdAt
88
+ updatedAt
15
89
  }`;
16
90
 
17
- export const fieldDocSectionFragment = `fragment fieldDocSectionFragment on FieldDocSection {
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 {
18
102
  id
19
103
  key
20
104
  title
21
105
  description
22
106
  }`;
23
107
 
24
- export const fieldDocElementDataFragment = `fragment fieldDocElementDataFragment on FieldDocElement {
108
+ export const fieldDocDefinitionElementFragment = `fragment fieldDocDefinitionElementFragment on FieldDocDefinitionElement {
25
109
  id
26
110
  key
27
111
  kind
@@ -31,52 +115,150 @@ export const fieldDocElementDataFragment = `fragment fieldDocElementDataFragment
31
115
  required
32
116
  allowMultipleAnswers
33
117
  doNotAllowNotes
118
+ answerType
119
+ tableColumns {
120
+ key
121
+ label
122
+ type
123
+ required
124
+ options
125
+ }
126
+ lineNumber
127
+ }`;
34
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
35
134
  text
135
+ tableRows {
136
+ id
137
+ cells {
138
+ key
139
+ text
140
+ isCustomBooleanLabel
141
+ }
142
+ }
143
+ answerState
144
+ answerReason
36
145
  note
37
146
  warningNote
38
147
  referenceIds
39
- lineNumber
40
148
  }`;
41
149
 
42
- export const fieldDocGroupFragment = `fragment fieldDocGroupFragment on FieldDocGroup {
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 {
43
153
  id
44
- name
45
- shortName
46
- layout {
47
- columns
48
- headers
49
- gridLayoutStyle
50
- }
51
- lastSubmissionPeriod
52
- lastSubmissionFieldDocId
154
+ organizationId
155
+ mode
156
+ manageable
53
157
  }`;
54
158
 
55
- export const fieldDocSubmissionFragment = `fragment fieldDocSubmissionFragment on FieldDocSubmission {
159
+ // id is "<organizationId>:<fieldDocId>"
160
+ export const fieldDocEditorSourceFragment = `fragment fieldDocEditorSourceFragment on FieldDocEditorSource {
161
+ order
56
162
  id
57
- fieldDocSubmissionId
58
163
  fieldDocId
59
- value
164
+ organizationId
165
+ fieldDocProgramId
166
+ isProgramDoc
167
+ documentName
60
168
  frequency
61
- fieldDocSubmissionIdEnc
169
+ editVersion
170
+ hasDraft
171
+ draftStale
172
+ publishedRevisionNumber
173
+ draftUpdatedAt
174
+ }`;
62
175
 
63
- organizationId
64
- organizationIdEnc
65
- organizationName
66
- organizationOperation
176
+ // Nested fragments are selected directly by operations, never spread inside another fragment.
177
+ export const fieldDocProgramStatement = `...fieldDocProgramFragment
178
+ groups {
179
+ ...fieldDocProgramGroupFragment
180
+ }`;
67
181
 
68
- childOrgId
69
- childOrgIdEnc
70
- childOrgName
71
- childOrgOperation
182
+ export const fieldDocStatement = `...fieldDocFragment
183
+ group {
184
+ ...fieldDocProgramGroupFragment
185
+ }`;
72
186
 
73
- location
74
- period
75
- status
76
- fieldDocGroupId
77
- groupName
78
- groupShortName
79
- activityAt
80
- createdAt
81
- updatedAt
82
- }`;
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 {
@@ -14,14 +14,33 @@ export const logEntryFragment = `fragment logEntryFragment on LogEntry {
14
14
  location
15
15
  inboundContactEmail
16
16
  inboundContactPhone
17
- fieldDocName
18
- fieldDocSubmissionPeriod
19
17
  accountPersonName
20
18
  summary
21
19
  source
22
20
  confidence
23
21
  originalMessage
24
22
  flagColor
23
+ translation {
24
+ version
25
+ sourceHash
26
+ originalLanguage
27
+ texts {
28
+ language
29
+ translatedAt
30
+ summary
31
+ notes
32
+ item
33
+ values {
34
+ ordinal
35
+ label
36
+ }
37
+ fields {
38
+ key
39
+ textValue
40
+ }
41
+ searchText
42
+ }
43
+ }
25
44
  date
26
45
  createdAt
27
46
  updatedAt
@@ -62,3 +81,75 @@ export const logEntryDetailsFragment = `fragment logEntryDetailsFragment on LogE
62
81
 
63
82
  notes
64
83
  }`;
84
+
85
+ export const logRevisionSummaryFragment = `fragment logRevisionSummaryFragment on LogRevision {
86
+ id
87
+ cursor
88
+ organizationId
89
+ logEntryId
90
+ revisionNumber
91
+ action
92
+ mutationSource
93
+ createdAt
94
+ revisionHash
95
+ hashVersion
96
+
97
+ actor {
98
+ kind
99
+ accountId
100
+ displayName
101
+ }
102
+
103
+ changes {
104
+ path
105
+ operation
106
+ before
107
+ after
108
+ }
109
+
110
+ proof {
111
+ status
112
+ object
113
+ generation
114
+ hash
115
+ archivedAt
116
+ retentionUntil
117
+ }
118
+ }`;
119
+
120
+ export const logRevisionFragment = `fragment logRevisionFragment on LogRevision {
121
+ id
122
+ cursor
123
+ organizationId
124
+ logEntryId
125
+ revisionNumber
126
+ action
127
+ mutationSource
128
+ createdAt
129
+ snapshot
130
+ previousRevisionHash
131
+ revisionHash
132
+ hashVersion
133
+
134
+ actor {
135
+ kind
136
+ accountId
137
+ displayName
138
+ }
139
+
140
+ changes {
141
+ path
142
+ operation
143
+ before
144
+ after
145
+ }
146
+
147
+ proof {
148
+ status
149
+ object
150
+ generation
151
+ hash
152
+ archivedAt
153
+ retentionUntil
154
+ }
155
+ }`;
@@ -18,8 +18,13 @@ export const organizationFragment = `fragment organizationFragment on Organizati
18
18
  }
19
19
 
20
20
  settings {
21
+ schedule { defaultSurface }
22
+ id
21
23
  timeZone
22
24
  language
25
+ displayTranslatedLogs
26
+ translateLanguage
27
+ logRevisionsProof
23
28
  color
24
29
  priorityService
25
30
  routes {
@@ -52,8 +57,13 @@ export const organizationFragment = `fragment organizationFragment on Organizati
52
57
  }`;
53
58
 
54
59
  export const organizationSettingsFragment = `fragment organizationSettingsFragment on OrganizationSettings {
60
+ schedule { defaultSurface }
61
+ id
55
62
  timeZone
56
63
  language
64
+ displayTranslatedLogs
65
+ translateLanguage
66
+ logRevisionsProof
57
67
  color
58
68
  priorityService
59
69
  routes {
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Share the complete QR record shape across management reads and mutations.
3
+ * References stay inline: their identity includes the entity type, and the
4
+ * displayed name snapshot belongs to this issued code rather than a live entity.
5
+ */
6
+ export const qrCodeFragment = `fragment qrCodeFragment on QrCode {
7
+ id
8
+ cursor
9
+ organizationId
10
+ publicId
11
+ name
12
+ fields {
13
+ key
14
+ description
15
+ kind
16
+ value
17
+ reference {
18
+ type
19
+ id
20
+ }
21
+ displayNameSnapshot
22
+ }
23
+ payloadVersion
24
+ qrText
25
+ createdByAccountId
26
+ createdAt
27
+ updatedAt
28
+ archivedAt
29
+ }`;