@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,9 +1,6 @@
1
1
  import type { UseMutationParams } from '@jsb188/graphql/types.d';
2
+ import { FRAGMENT_NAMES, makeFragmentKey } from '@jsb188/mday/constants/graphqlReactivity.ts';
2
3
  import type { OpenModalPopUpFn } from '@jsb188/react/states';
3
- import {
4
- FRAGMENT_NAMES,
5
- makeFragmentKey,
6
- } from '@jsb188/mday/constants/graphqlReactivity.ts';
7
4
  import { updateFragment } from '../cache/index.ts';
8
5
  import {
9
6
  createSheetMtn,
@@ -11,11 +8,10 @@ import {
11
8
  deleteSheetMtn,
12
9
  deleteSheetTabMtn,
13
10
  editSheetCommandBatchMtn,
14
- editSheetRegionCommandMtn,
15
- editSheetStructureCommandMtn,
16
11
  exportSheetToFileMtn,
17
12
  importSheetFromFileMtn,
18
13
  reorderSheetTabsMtn,
14
+ setSheetTabHiddenMtn,
19
15
  updateSheetAccessMtn,
20
16
  updateSheetMtn,
21
17
  updateSheetTabMtn,
@@ -26,17 +22,11 @@ import { useMutation } from './index.ts';
26
22
  * Create a sheet.
27
23
  */
28
24
 
29
- export function useCreateSheet(
30
- params: UseMutationParams = {},
31
- openModalPopUp?: OpenModalPopUpFn,
32
- ) {
33
- const [createSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(
34
- createSheetMtn,
35
- {
36
- openModalPopUp,
37
- ...params,
38
- },
39
- );
25
+ export function useCreateSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
26
+ const [createSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(createSheetMtn, {
27
+ openModalPopUp,
28
+ ...params,
29
+ });
40
30
 
41
31
  return {
42
32
  createSheet,
@@ -50,17 +40,11 @@ export function useCreateSheet(
50
40
  * Update a sheet.
51
41
  */
52
42
 
53
- export function useUpdateSheet(
54
- params: UseMutationParams = {},
55
- openModalPopUp?: OpenModalPopUpFn,
56
- ) {
57
- const [updateSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(
58
- updateSheetMtn,
59
- {
60
- openModalPopUp,
61
- ...params,
62
- },
63
- );
43
+ export function useUpdateSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
44
+ const [updateSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetMtn, {
45
+ openModalPopUp,
46
+ ...params,
47
+ });
64
48
 
65
49
  return {
66
50
  updateSheet,
@@ -74,34 +58,24 @@ export function useUpdateSheet(
74
58
  * Update a sheet's access settings.
75
59
  */
76
60
 
77
- export function useUpdateSheetAccess(
78
- params: UseMutationParams = {},
79
- openModalPopUp?: OpenModalPopUpFn,
80
- ) {
61
+ export function useUpdateSheetAccess(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
81
62
  const { onCompleted, ...rest } = params;
82
63
 
83
- const [updateSheetAccess, mtnValues, mtnHandlers, updateObservers] =
84
- useMutation(updateSheetAccessMtn, {
85
- openModalPopUp,
86
- onCompleted: (data, error, variables) => {
87
- const updatedSheet = data?.updateSheetAccess;
88
-
89
- if (updatedSheet?.id) {
90
- // The origin socket is excluded from the server's realtime emit,
91
- // so the mutation issuer refreshes its own cached fragment here
92
- updateFragment(
93
- makeFragmentKey(FRAGMENT_NAMES.sheet, updatedSheet.id),
94
- updatedSheet,
95
- null,
96
- false,
97
- updateObservers,
98
- );
99
- }
100
-
101
- onCompleted?.(updatedSheet, error, variables);
102
- },
103
- ...rest,
104
- });
64
+ const [updateSheetAccess, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetAccessMtn, {
65
+ openModalPopUp,
66
+ onCompleted: (data, error, variables) => {
67
+ const updatedSheet = data?.updateSheetAccess;
68
+
69
+ if (updatedSheet?.id) {
70
+ // The origin socket is excluded from the server's realtime emit,
71
+ // so the mutation issuer refreshes its own cached fragment here
72
+ updateFragment(makeFragmentKey(FRAGMENT_NAMES.sheet, updatedSheet.id), updatedSheet, null, false, updateObservers);
73
+ }
74
+
75
+ onCompleted?.(updatedSheet, error, variables);
76
+ },
77
+ ...rest,
78
+ });
105
79
 
106
80
  return {
107
81
  updateSheetAccess,
@@ -115,32 +89,20 @@ export function useUpdateSheetAccess(
115
89
  * Delete a sheet.
116
90
  */
117
91
 
118
- export function useDeleteSheet(
119
- params: UseMutationParams = {},
120
- openModalPopUp?: OpenModalPopUpFn,
121
- ) {
92
+ export function useDeleteSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
122
93
  const { onCompleted, ...rest } = params;
123
- const [deleteSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(
124
- deleteSheetMtn,
125
- {
126
- openModalPopUp,
127
- onCompleted: (data, error, variables) => {
128
- const deletedSheetId = data?.deleteSheet;
129
- if (deletedSheetId) {
130
- updateFragment(
131
- makeFragmentKey(FRAGMENT_NAMES.sheet, deletedSheetId),
132
- { __deleted: true },
133
- null,
134
- false,
135
- updateObservers,
136
- );
137
- }
138
-
139
- onCompleted?.(data, error, variables);
140
- },
141
- ...rest,
94
+ const [deleteSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(deleteSheetMtn, {
95
+ openModalPopUp,
96
+ onCompleted: (data, error, variables) => {
97
+ const deletedSheetId = data?.deleteSheet;
98
+ if (deletedSheetId) {
99
+ updateFragment(makeFragmentKey(FRAGMENT_NAMES.sheet, deletedSheetId), { __deleted: true }, null, false, updateObservers);
100
+ }
101
+
102
+ onCompleted?.(data, error, variables);
142
103
  },
143
- );
104
+ ...rest,
105
+ });
144
106
 
145
107
  return {
146
108
  deleteSheet,
@@ -154,17 +116,11 @@ export function useDeleteSheet(
154
116
  * Create a sheet tab.
155
117
  */
156
118
 
157
- export function useCreateSheetTab(
158
- params: UseMutationParams = {},
159
- openModalPopUp?: OpenModalPopUpFn,
160
- ) {
161
- const [createSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(
162
- createSheetTabMtn,
163
- {
164
- openModalPopUp,
165
- ...params,
166
- },
167
- );
119
+ export function useCreateSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
120
+ const [createSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(createSheetTabMtn, {
121
+ openModalPopUp,
122
+ ...params,
123
+ });
168
124
 
169
125
  return {
170
126
  createSheetTab,
@@ -178,15 +134,11 @@ export function useCreateSheetTab(
178
134
  * Import a spreadsheet file into a new or existing sheet.
179
135
  */
180
136
 
181
- export function useImportSheetFromFile(
182
- params: UseMutationParams = {},
183
- openModalPopUp?: OpenModalPopUpFn,
184
- ) {
185
- const [importSheetFromFile, mtnValues, mtnHandlers, updateObservers] =
186
- useMutation(importSheetFromFileMtn, {
187
- openModalPopUp,
188
- ...params,
189
- });
137
+ export function useImportSheetFromFile(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
138
+ const [importSheetFromFile, mtnValues, mtnHandlers, updateObservers] = useMutation(importSheetFromFileMtn, {
139
+ openModalPopUp,
140
+ ...params,
141
+ });
190
142
 
191
143
  return {
192
144
  importSheetFromFile,
@@ -201,15 +153,11 @@ export function useImportSheetFromFile(
201
153
  * for the whole workbook).
202
154
  */
203
155
 
204
- export function useExportSheetToFile(
205
- params: UseMutationParams = {},
206
- openModalPopUp?: OpenModalPopUpFn,
207
- ) {
208
- const [exportSheetToFile, mtnValues, mtnHandlers, updateObservers] =
209
- useMutation(exportSheetToFileMtn, {
210
- openModalPopUp,
211
- ...params,
212
- });
156
+ export function useExportSheetToFile(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
157
+ const [exportSheetToFile, mtnValues, mtnHandlers, updateObservers] = useMutation(exportSheetToFileMtn, {
158
+ openModalPopUp,
159
+ ...params,
160
+ });
213
161
 
214
162
  return {
215
163
  exportSheetToFile,
@@ -223,17 +171,11 @@ export function useExportSheetToFile(
223
171
  * Update a sheet tab.
224
172
  */
225
173
 
226
- export function useUpdateSheetTab(
227
- params: UseMutationParams = {},
228
- openModalPopUp?: OpenModalPopUpFn,
229
- ) {
230
- const [updateSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(
231
- updateSheetTabMtn,
232
- {
233
- openModalPopUp,
234
- ...params,
235
- },
236
- );
174
+ export function useUpdateSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
175
+ const [updateSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetTabMtn, {
176
+ openModalPopUp,
177
+ ...params,
178
+ });
237
179
 
238
180
  return {
239
181
  updateSheetTab,
@@ -244,21 +186,16 @@ export function useUpdateSheetTab(
244
186
  }
245
187
 
246
188
  /*
247
- * Reorder sheet tabs.
189
+ * Set whether a sheet tab is hidden from the collapsed tab strip.
248
190
  */
249
-
250
- export function useReorderSheetTabs(
251
- params: UseMutationParams = {},
252
- openModalPopUp?: OpenModalPopUpFn,
253
- ) {
254
- const [reorderSheetTabs, mtnValues, mtnHandlers, updateObservers] =
255
- useMutation(reorderSheetTabsMtn, {
256
- openModalPopUp,
257
- ...params,
258
- });
191
+ export function useSetSheetTabHidden(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
192
+ const [setSheetTabHidden, mtnValues, mtnHandlers, updateObservers] = useMutation(setSheetTabHiddenMtn, {
193
+ openModalPopUp,
194
+ ...params,
195
+ });
259
196
 
260
197
  return {
261
- reorderSheetTabs,
198
+ setSheetTabHidden,
262
199
  updateObservers,
263
200
  ...mtnValues,
264
201
  ...mtnHandlers,
@@ -266,37 +203,17 @@ export function useReorderSheetTabs(
266
203
  }
267
204
 
268
205
  /*
269
- * Delete a sheet tab.
206
+ * Reorder sheet tabs.
270
207
  */
271
208
 
272
- export function useDeleteSheetTab(
273
- params: UseMutationParams = {},
274
- openModalPopUp?: OpenModalPopUpFn,
275
- ) {
276
- const { onCompleted, ...rest } = params;
277
- const [deleteSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(
278
- deleteSheetTabMtn,
279
- {
280
- openModalPopUp,
281
- onCompleted: (data, error, variables) => {
282
- if (data?.deleteSheetTab && variables?.sheetTabId) {
283
- updateFragment(
284
- makeFragmentKey(FRAGMENT_NAMES.sheetTab, variables.sheetTabId),
285
- { __deleted: true },
286
- null,
287
- false,
288
- updateObservers,
289
- );
290
- }
291
-
292
- onCompleted?.(data, error, variables);
293
- },
294
- ...rest,
295
- },
296
- );
209
+ export function useReorderSheetTabs(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
210
+ const [reorderSheetTabs, mtnValues, mtnHandlers, updateObservers] = useMutation(reorderSheetTabsMtn, {
211
+ openModalPopUp,
212
+ ...params,
213
+ });
297
214
 
298
215
  return {
299
- deleteSheetTab,
216
+ reorderSheetTabs,
300
217
  updateObservers,
301
218
  ...mtnValues,
302
219
  ...mtnHandlers,
@@ -304,41 +221,17 @@ export function useDeleteSheetTab(
304
221
  }
305
222
 
306
223
  /*
307
- * Apply an ordered batch of Sheet edit and history commands in one mutation.
224
+ * Delete a sheet tab.
308
225
  */
309
- export function useEditSheetCommandBatch(
310
- params: UseMutationParams = {},
311
- openModalPopUp?: OpenModalPopUpFn,
312
- ) {
313
- const [editSheetCommandBatch, mtnValues, mtnHandlers, updateObservers] =
314
- useMutation(editSheetCommandBatchMtn, {
315
- openModalPopUp,
316
- ...params,
317
- });
318
226
 
319
- return {
320
- editSheetCommandBatch,
321
- updateObservers,
322
- ...mtnValues,
323
- ...mtnHandlers,
324
- };
325
- }
326
-
327
- /*
328
- * Upsert or delete one Sheet region through the durable command contract.
329
- */
330
- export function useEditSheetRegionCommand(
331
- params: UseMutationParams = {},
332
- openModalPopUp?: OpenModalPopUpFn,
333
- ) {
334
- const [editSheetRegionCommand, mtnValues, mtnHandlers, updateObservers] =
335
- useMutation(editSheetRegionCommandMtn, {
336
- openModalPopUp,
337
- ...params,
338
- });
227
+ export function useDeleteSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
228
+ const [deleteSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(deleteSheetTabMtn, {
229
+ openModalPopUp,
230
+ ...params,
231
+ });
339
232
 
340
233
  return {
341
- editSheetRegionCommand,
234
+ deleteSheetTab,
342
235
  updateObservers,
343
236
  ...mtnValues,
344
237
  ...mtnHandlers,
@@ -346,20 +239,19 @@ export function useEditSheetRegionCommand(
346
239
  }
347
240
 
348
241
  /*
349
- * Insert or delete one Sheet row or column through durable command history.
242
+ * Send one sealed Sheet command envelope. The mutation is always no-store:
243
+ * its authoritative patches belong to the client's tab stores, never to the
244
+ * normalized fragment cache.
350
245
  */
351
- export function useEditSheetStructureCommand(
352
- params: UseMutationParams = {},
353
- openModalPopUp?: OpenModalPopUpFn,
354
- ) {
355
- const [editSheetStructureCommand, mtnValues, mtnHandlers, updateObservers] =
356
- useMutation(editSheetStructureCommandMtn, {
357
- openModalPopUp,
358
- ...params,
359
- });
246
+ export function useEditSheetCommandBatch(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
247
+ const [editSheetCommandBatch, mtnValues, mtnHandlers, updateObservers] = useMutation(editSheetCommandBatchMtn, {
248
+ openModalPopUp,
249
+ ...params,
250
+ cachePolicy: 'no-store',
251
+ });
360
252
 
361
253
  return {
362
- editSheetStructureCommand,
254
+ editSheetCommandBatch,
363
255
  updateObservers,
364
256
  ...mtnValues,
365
257
  ...mtnHandlers,