@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,19 +1,78 @@
1
1
  export const sheetFragment = `fragment sheetFragment on Sheet {
2
2
  id
3
+ cursor
3
4
  organizationId
4
5
 
5
6
  name
6
7
  title
7
8
  description
8
9
  position
9
- active
10
+ deletedAt
11
+ manifestRevision
12
+
13
+ editor {
14
+ textColors
15
+ fillColors
16
+ }
17
+
18
+ access {
19
+ team
20
+ public
21
+ network
22
+ }
23
+
24
+ createdAt
25
+ updatedAt
26
+ }`;
27
+
28
+ export const sheetMetadataFragment = `fragment sheetMetadataFragment on SheetMetadata {
29
+ id
30
+ name
31
+ title
32
+ description
33
+ }`;
34
+
35
+ export const sheetTabFragment = `fragment sheetTabFragment on SheetTab {
36
+ id
37
+ organizationId
38
+ sheetId
39
+
40
+ name
41
+ position
42
+ hidden
43
+ cellsRevision
44
+ designRevision
10
45
 
11
46
  design {
12
47
  id
13
48
  version
14
49
  columns
15
50
  rows
16
- defaultCellStyle
51
+ defaultCellStyle {
52
+ fontSize
53
+ textColor
54
+ fillColor
55
+ textWrap
56
+ textAlign
57
+ verticalAlign
58
+ disableMarkdown
59
+ bold
60
+ italic
61
+ underline
62
+ strikethrough
63
+ borderTopWidth
64
+ borderTopColor
65
+ borderTopStyle
66
+ borderRightWidth
67
+ borderRightColor
68
+ borderRightStyle
69
+ borderBottomWidth
70
+ borderBottomColor
71
+ borderBottomStyle
72
+ borderLeftWidth
73
+ borderLeftColor
74
+ borderLeftStyle
75
+ }
17
76
  defaultCellFormat
18
77
  metadata
19
78
 
@@ -37,109 +96,291 @@ export const sheetFragment = `fragment sheetFragment on Sheet {
37
96
  updatedAt
38
97
  }`;
39
98
 
99
+ export const sheetTabMutationTabFragment = `fragment sheetTabMutationTabFragment on SheetTabMutationTab {
100
+ id
101
+ organizationId
102
+ sheetId
103
+ name
104
+ position
105
+ hidden
106
+ cellsRevision
107
+ designRevision
108
+ createdAt
109
+ updatedAt
110
+ }`;
111
+
112
+ export const sheetTabMutationResultFragment = `fragment sheetTabMutationResultFragment on SheetTabMutationResult {
113
+ changed
114
+ commandId
115
+ deletedSheetTabId
116
+ manifestRevision
117
+ replayed
118
+
119
+ tab {
120
+ ...sheetTabMutationTabFragment
121
+ }
122
+
123
+ tabs {
124
+ ...sheetTabMutationTabFragment
125
+ }
126
+ }
127
+
128
+ ${sheetTabMutationTabFragment}`;
129
+
130
+ export const sheetTabSummaryFragment = `fragment sheetTabSummaryFragment on SheetTabSummary {
131
+ id
132
+ name
133
+ position
134
+ hidden
135
+ currentSeq
136
+ referencedTabIds
137
+ updatedAt
138
+ }`;
139
+
40
140
  export const sheetCellFragment = `fragment sheetCellFragment on SheetCell {
41
141
  id
42
142
  organizationId
43
143
  sheetId
144
+ sheetTabId
44
145
 
45
146
  rowIndex
46
147
  columnIndex
47
148
  rawInput
149
+ literalType
150
+ formulaText
151
+ compiledFormula {
152
+ version
153
+ text
154
+ volatile
155
+ cells {
156
+ rowIndex
157
+ columnIndex
158
+ sheetName
159
+ sheetTabId
160
+ status
161
+ }
162
+ ranges {
163
+ startRowIndex
164
+ startColumnIndex
165
+ endRowIndex
166
+ endColumnIndex
167
+ sheetName
168
+ sheetTabId
169
+ status
170
+ }
171
+ diagnostics {
172
+ code
173
+ message
174
+ sheetName
175
+ }
176
+ }
48
177
  value
178
+ formulaValue
49
179
  textValue
50
180
  numberValue
51
181
  booleanValue
52
182
  dateValue
53
183
  datetimeValue
54
- formula {
55
- version
56
- kind
57
- text
58
- dataTableName
59
- rowIdentifier
60
- cellKey
184
+ errorCode
185
+ errorMessage
186
+ computedAt
187
+ revision
188
+
189
+ style {
190
+ fontSize
191
+ textColor
192
+ fillColor
193
+ textWrap
194
+ textAlign
195
+ verticalAlign
196
+ disableMarkdown
197
+ bold
198
+ italic
199
+ underline
200
+ strikethrough
201
+ borderTopWidth
202
+ borderTopColor
203
+ borderTopStyle
204
+ borderRightWidth
205
+ borderRightColor
206
+ borderRightStyle
207
+ borderBottomWidth
208
+ borderBottomColor
209
+ borderBottomStyle
210
+ borderLeftWidth
211
+ borderLeftColor
212
+ borderLeftStyle
61
213
  }
62
- style
63
214
  format
64
215
  note
65
- sourceType
66
- regionId
67
- region {
68
- regionId
69
- sourceRowId
70
- sourceCellKey
71
- }
72
216
 
73
217
  createdAt
74
218
  updatedAt
75
219
  }`;
76
220
 
77
- export const sheetRangeFragment = `fragment sheetRangeFragment on SheetRange {
221
+ /*
222
+ * Shape of one websocket $sheetViewFragment packet (wire contract v3). The
223
+ * client routes these packets straight to its tab stores, never through the
224
+ * fragment cache; chunkIndex/chunkCount position one chunk of a packet whose
225
+ * chunks share fromSeq/toSeq.
226
+ */
227
+ export const sheetViewFragment = `fragment sheetViewFragment on SheetView {
78
228
  id
79
- organizationId
80
229
  sheetId
230
+ sheetTabId
231
+ axisMoveOps {
232
+ schemaVersion
233
+ commandId
234
+ sheetTabId
235
+ axis
236
+ sourceStartIndex
237
+ sourceEndIndex
238
+ targetStartIndex
239
+ baseRevision
240
+ resultRevision
241
+ baseDesignRevision
242
+ resultDesignRevision
243
+ }
244
+ cellsRevision
245
+ designRevision
246
+ fromSeq
247
+ toSeq
248
+ chunkIndex
249
+ chunkCount
250
+ originActorAccountId
251
+ originClientId
252
+ requiresSnapshot
81
253
 
82
- startRowIndex
83
- startColumnIndex
84
- endRowIndex
85
- endColumnIndex
86
- position
87
- style
88
- format
89
- metadata
90
- active
91
-
92
- createdAt
93
- updatedAt
94
- }`;
254
+ commandBatchAck {
255
+ actorAccountId
256
+ envelopeId
257
+ clientId
258
+ committedCommandIds
259
+ noWriteCommandIds
260
+ }
95
261
 
96
- export const sheetRegionFragment = `fragment sheetRegionFragment on SheetRegion {
97
- id
98
- organizationId
99
- sheetId
262
+ sheetTab {
263
+ ...sheetTabFragment
264
+ }
100
265
 
101
- type
102
- startRowIndex
103
- startColumnIndex
104
- active
266
+ cellsDelta {
267
+ ...sheetCellFragment
268
+ }
105
269
 
106
- source {
107
- type
108
- dataTableId
109
- viewId
270
+ cellsComputedDelta {
271
+ id
272
+ sheetTabId
273
+ rowIndex
274
+ columnIndex
275
+ revision
276
+ value
277
+ textValue
278
+ numberValue
279
+ booleanValue
280
+ dateValue
281
+ datetimeValue
282
+ errorCode
283
+ errorMessage
284
+ computedAt
110
285
  }
111
286
 
112
- columns {
113
- sourceCellKey
114
- label
115
- width
287
+ deletedCellCoords {
288
+ sheetTabId
289
+ rowIndex
290
+ columnIndex
291
+ id
292
+ revision
116
293
  }
117
294
 
118
- options {
119
- conflictPolicy
120
- includeHeaderRow
295
+ structureOps {
296
+ opId
297
+ operation
298
+ index
299
+ structureSeq
121
300
  }
122
301
 
123
- createdAt
124
- updatedAt
302
+ pageInfo {
303
+ hasMoreRows
304
+ lastContentRowIndex
305
+ }
125
306
  }`;
126
307
 
127
- export const sheetGridFragment = `fragment sheetGridFragment on SheetGrid {
308
+ /*
309
+ * Authoritative command payload returned by editSheetCommandBatch. The
310
+ * mutation is no-store: the client applies these patches to its tab stores.
311
+ * pageInfo is intentionally absent (a patch owns no pagination state), and
312
+ * chunk metadata exists only on websocket packets.
313
+ */
314
+ export const sheetViewPatchFragment = `fragment sheetViewPatchFragment on SheetView {
128
315
  id
316
+ sheetId
317
+ sheetTabId
318
+ axisMoveOps {
319
+ schemaVersion
320
+ commandId
321
+ sheetTabId
322
+ axis
323
+ sourceStartIndex
324
+ sourceEndIndex
325
+ targetStartIndex
326
+ baseRevision
327
+ resultRevision
328
+ baseDesignRevision
329
+ resultDesignRevision
330
+ }
331
+ cellsRevision
332
+ designRevision
333
+ fromSeq
334
+ toSeq
335
+ originActorAccountId
336
+ originClientId
337
+ requiresSnapshot
129
338
 
130
- viewport {
131
- startRowIndex
132
- startColumnIndex
133
- rowCount
134
- columnCount
339
+ commandBatchAck {
340
+ actorAccountId
341
+ envelopeId
342
+ clientId
343
+ committedCommandIds
344
+ noWriteCommandIds
135
345
  }
136
346
 
137
- rows {
347
+ sheetTab {
348
+ ...sheetTabFragment
349
+ }
350
+
351
+ cellsDelta {
352
+ ...sheetCellFragment
353
+ }
354
+
355
+ cellsComputedDelta {
356
+ id
357
+ sheetTabId
138
358
  rowIndex
359
+ columnIndex
360
+ revision
361
+ value
362
+ textValue
363
+ numberValue
364
+ booleanValue
365
+ dateValue
366
+ datetimeValue
367
+ errorCode
368
+ errorMessage
369
+ computedAt
139
370
  }
140
371
 
141
- pageInfo {
142
- hasMoreRows
143
- lastContentRowIndex
372
+ deletedCellCoords {
373
+ sheetTabId
374
+ rowIndex
375
+ columnIndex
376
+ id
377
+ revision
378
+ }
379
+
380
+ structureOps {
381
+ opId
382
+ operation
383
+ index
384
+ structureSeq
144
385
  }
145
386
  }`;
@@ -4,10 +4,55 @@ export const storageFileFragment = `fragment storageFileFragment on StorageFile
4
4
  size
5
5
  contentType
6
6
  at
7
+ intent
7
8
  name
8
9
  description
9
10
  aiNote
11
+ imageData {
12
+ width
13
+ height
14
+ aspectRatio
15
+ dominantColor
16
+ averageColor
17
+ luminance
18
+ isOpaque
19
+ }
10
20
 
11
21
  # client-side required fields
12
22
  uploadStatus
13
23
  }`;
24
+
25
+ export const generatedFileFragment = `fragment generatedFileFragment on GeneratedFile {
26
+ id
27
+ cursor
28
+ fileName
29
+ fileDescription
30
+ summaryReport
31
+ status
32
+ generationStage
33
+ progressVersion
34
+ requestedDeliveryChannel
35
+ deliveryStatus
36
+ deliveredVia
37
+ visibility
38
+ downloadCount
39
+ lastDownloadedAt
40
+ activeLinkExpiresAt
41
+ expiresAt
42
+ generatedAt
43
+ createdAt
44
+ updatedAt
45
+ createdByName
46
+ hasFile
47
+ recoveryChatId
48
+ qualityReport {
49
+ version
50
+ status
51
+ category
52
+ reason
53
+ nextAction
54
+ question
55
+ affectedColumns
56
+ caveats
57
+ }
58
+ }`;
@@ -1,16 +1,38 @@
1
-
2
1
  export const workflowFragment = `fragment workflowFragment on Workflow {
3
2
  id
4
3
  organizationId
5
- reportId
4
+ fieldDocId
5
+ programManaged
6
+ fieldDocProgramId
7
+ userInstructions
8
+ catalogInstructions
9
+ agentNoteId
10
+ agentNote {
11
+ id
12
+ kind
13
+ headline
14
+ emoji
15
+ archivedAt
16
+ }
6
17
 
7
- logType
8
- feature
18
+ kind
19
+ triggerType
20
+ logTypes
21
+
22
+ accountId
23
+ recipients {
24
+ accountId
25
+ name
26
+ phone
27
+ email
28
+ channels
29
+ }
30
+ cursor
9
31
 
10
32
  title
33
+ reminderContent
11
34
 
12
35
  steps {
13
- iconName
14
36
  label
15
37
  value
16
38
  }
@@ -18,6 +40,7 @@ export const workflowFragment = `fragment workflowFragment on Workflow {
18
40
  schedule
19
41
  scheduleInterval
20
42
  active
43
+ status
21
44
 
22
45
  startedAt
23
46
  nextAt
@@ -30,6 +53,7 @@ export const workflowRunFragment = `fragment workflowRunFragment on WorkflowRun
30
53
  id
31
54
  workflowId
32
55
  logId
56
+ cursor
33
57
 
34
58
  runKey
35
59
  iterations
@@ -37,6 +61,18 @@ export const workflowRunFragment = `fragment workflowRunFragment on WorkflowRun
37
61
  message
38
62
  status
39
63
 
64
+ activeWait {
65
+ id
66
+ workflowRunId
67
+ name
68
+ phone
69
+ email
70
+ channel
71
+ expiresAt
72
+ resolvedAt
73
+ createdAt
74
+ }
75
+
40
76
  scheduledDate
41
77
  followUpAt
42
78
  activityAt
@@ -3,13 +3,11 @@ import { accountFragment } from '../fragments/accountFragments.ts';
3
3
 
4
4
  export const editAccountMtn = gql`
5
5
  mutation editAccount (
6
- $accountId: GenericID
7
6
  $photoId: GenericID
8
7
  $profile: AccountProfileInput
9
8
  $settings: AccountSettingsInput
10
9
  ) {
11
10
  editAccount (
12
- accountId: $accountId
13
11
  photoId: $photoId
14
12
  profile: $profile
15
13
  settings: $settings
@@ -0,0 +1,68 @@
1
+ import { gql } from 'graphql-tag';
2
+ import { agentMemoryFragment } from '../fragments/agentMemoryFragments.ts';
3
+
4
+ export const createAgentMemoryMtn = gql`
5
+ mutation createAgentMemory (
6
+ $organizationId: GenericID!
7
+ $scope: AgentMemoryScope!
8
+ $accountId: GenericID
9
+ $inboundContactId: GenericID
10
+ $category: AgentMemoryCategory
11
+ $content: String!
12
+ $surface: [AgentMemorySurface!]
13
+ $permanent: Boolean
14
+ ) {
15
+ createAgentMemory (
16
+ organizationId: $organizationId
17
+ scope: $scope
18
+ accountId: $accountId
19
+ inboundContactId: $inboundContactId
20
+ category: $category
21
+ content: $content
22
+ surface: $surface
23
+ permanent: $permanent
24
+ ) {
25
+ ...agentMemoryFragment
26
+ }
27
+ }
28
+
29
+ ${agentMemoryFragment}
30
+ `;
31
+
32
+ export const editAgentMemoryMtn = gql`
33
+ mutation editAgentMemory (
34
+ $organizationId: GenericID!
35
+ $agentMemoryId: GenericID!
36
+ $content: String
37
+ $category: AgentMemoryCategory
38
+ $surface: [AgentMemorySurface!]
39
+ $permanent: Boolean
40
+ $status: AgentMemoryStatus
41
+ ) {
42
+ editAgentMemory (
43
+ organizationId: $organizationId
44
+ agentMemoryId: $agentMemoryId
45
+ content: $content
46
+ category: $category
47
+ surface: $surface
48
+ permanent: $permanent
49
+ status: $status
50
+ ) {
51
+ ...agentMemoryFragment
52
+ }
53
+ }
54
+
55
+ ${agentMemoryFragment}
56
+ `;
57
+
58
+ export const deleteAgentMemoryMtn = gql`
59
+ mutation deleteAgentMemory (
60
+ $organizationId: GenericID!
61
+ $agentMemoryId: GenericID!
62
+ ) {
63
+ deleteAgentMemory (
64
+ organizationId: $organizationId
65
+ agentMemoryId: $agentMemoryId
66
+ )
67
+ }
68
+ `;
@@ -0,0 +1,62 @@
1
+ import { gql } from 'graphql-tag';
2
+ import { agentNoteDetailFragment } from '../fragments/agentNoteFragments.ts';
3
+
4
+ export const markAgentNoteReadMtn = gql`
5
+ mutation markAgentNoteRead (
6
+ $organizationId: GenericID!
7
+ $agentNoteId: GenericID!
8
+ ) {
9
+ markAgentNoteRead (
10
+ organizationId: $organizationId
11
+ agentNoteId: $agentNoteId
12
+ )
13
+ }
14
+ `;
15
+
16
+ export const updateAgentNoteMtn = gql`
17
+ mutation updateAgentNote (
18
+ $organizationId: GenericID!
19
+ $agentNoteId: GenericID!
20
+ $pinned: Boolean
21
+ $needsAttention: Boolean
22
+ $archived: Boolean
23
+ $disableAutoCreation: Boolean
24
+ ) {
25
+ updateAgentNote (
26
+ organizationId: $organizationId
27
+ agentNoteId: $agentNoteId
28
+ pinned: $pinned
29
+ needsAttention: $needsAttention
30
+ archived: $archived
31
+ disableAutoCreation: $disableAutoCreation
32
+ )
33
+ }
34
+ `;
35
+
36
+ export const refreshAgentNoteMtn = gql`
37
+ mutation refreshAgentNote (
38
+ $organizationId: GenericID!
39
+ $agentNoteId: GenericID!
40
+ ) {
41
+ refreshAgentNote (
42
+ organizationId: $organizationId
43
+ agentNoteId: $agentNoteId
44
+ ) {
45
+ ...agentNoteDetailFragment
46
+ }
47
+ }
48
+
49
+ ${agentNoteDetailFragment}
50
+ `;
51
+
52
+ export const deleteAgentNoteMtn = gql`
53
+ mutation deleteAgentNote (
54
+ $organizationId: GenericID!
55
+ $agentNoteId: GenericID!
56
+ ) {
57
+ deleteAgentNote (
58
+ organizationId: $organizationId
59
+ agentNoteId: $agentNoteId
60
+ )
61
+ }
62
+ `;