@jsb188/graphql 1.1.11 → 1.1.13

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 (174) hide show
  1. package/LICENSE +21 -0
  2. package/audience.d.ts +205 -0
  3. package/cache/config.ts +65 -28
  4. package/cache/index.helpers.ts +96 -0
  5. package/cache/index.ts +364 -808
  6. package/cache/mounted-queries.ts +33 -0
  7. package/cache/optimistic-ui-runtime.ts +46 -0
  8. package/cache/optimistic-ui.ts +401 -0
  9. package/cache/persist.ts +107 -22
  10. package/cache/realtime-fence.ts +47 -0
  11. package/cache/realtime-live.ts +17 -0
  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} +13 -39
  16. package/client/index.ts +4 -2
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +122 -232
  19. package/client/storage-asset.ts +58 -0
  20. package/gql/fragments/accountAuthFragments.ts +0 -4
  21. package/gql/fragments/agentMemoryFragments.ts +5 -1
  22. package/gql/fragments/agentNoteFragments.ts +156 -0
  23. package/gql/fragments/aiChatFragments.ts +35 -11
  24. package/gql/fragments/aiChatLinkFragments.ts +8 -0
  25. package/gql/fragments/audienceFragments.ts +76 -0
  26. package/gql/fragments/dataTableFragments.ts +48 -80
  27. package/gql/fragments/emailFragments.ts +49 -21
  28. package/gql/fragments/emailOutreachFragments.ts +281 -0
  29. package/gql/fragments/fieldDocFragments.ts +222 -40
  30. package/gql/fragments/inboundContactFragments.ts +2 -0
  31. package/gql/fragments/libraryFragments.ts +120 -0
  32. package/gql/fragments/logFragments.ts +93 -2
  33. package/gql/fragments/organizationFragments.ts +12 -0
  34. package/gql/fragments/qrCodeFragments.ts +29 -0
  35. package/gql/fragments/scheduleFragments.ts +574 -145
  36. package/gql/fragments/sheetFragments.ts +86 -424
  37. package/gql/fragments/storageFragments.ts +25 -1
  38. package/gql/fragments/workWaitFragments.ts +13 -0
  39. package/gql/fragments/workflowFragments.ts +32 -4
  40. package/gql/mutations/agentMemoryMutations.ts +32 -0
  41. package/gql/mutations/agentNoteMutations.ts +64 -0
  42. package/gql/mutations/aiChatLinkMutations.ts +13 -0
  43. package/gql/mutations/aiChatMutations.ts +34 -4
  44. package/gql/mutations/audienceMutations.ts +58 -0
  45. package/gql/mutations/authMutations.ts +24 -28
  46. package/gql/mutations/billingMutations.ts +24 -0
  47. package/gql/mutations/contactMutations.ts +23 -0
  48. package/gql/mutations/dataTableMutations.ts +18 -75
  49. package/gql/mutations/emailMutations.ts +22 -0
  50. package/gql/mutations/emailOutreachMutations.ts +139 -0
  51. package/gql/mutations/fieldDocMutations.ts +162 -13
  52. package/gql/mutations/index.ts +10 -5
  53. package/gql/mutations/organizationMutations.ts +6 -0
  54. package/gql/mutations/qrCodeMutations.ts +20 -0
  55. package/gql/mutations/scheduleMutations.ts +389 -417
  56. package/gql/mutations/sheetMutations.ts +62 -118
  57. package/gql/mutations/storageMutations.ts +1 -1
  58. package/gql/mutations/workflowMutations.ts +94 -0
  59. package/gql/queries/agentMemoryQueries.ts +12 -2
  60. package/gql/queries/agentNoteQueries.ts +86 -0
  61. package/gql/queries/aiChatQueries.ts +63 -12
  62. package/gql/queries/audienceQueries.ts +104 -0
  63. package/gql/queries/authQueries.ts +20 -4
  64. package/gql/queries/billingQueries.ts +114 -9
  65. package/gql/queries/dataTableQueries.ts +43 -75
  66. package/gql/queries/emailOutreachQueries.ts +282 -0
  67. package/gql/queries/emailQueries.ts +48 -64
  68. package/gql/queries/emailReplyReportQueries.ts +127 -0
  69. package/gql/queries/fieldDocQueries.ts +128 -98
  70. package/gql/queries/inboundContactQueries.ts +15 -4
  71. package/gql/queries/index.ts +5 -3
  72. package/gql/queries/libraryQueries.ts +112 -0
  73. package/gql/queries/logQueries.ts +86 -12
  74. package/gql/queries/organizationQueries.ts +44 -12
  75. package/gql/queries/qrCodeQueries.ts +27 -0
  76. package/gql/queries/scheduleQueries.ts +401 -278
  77. package/gql/queries/sheetQueries.ts +94 -165
  78. package/gql/queries/storageQueries.ts +11 -4
  79. package/gql/queries/workflowQueries.ts +61 -12
  80. package/gql/reactivity.ts +98 -0
  81. package/gql/recordReads.ts +171 -0
  82. package/hooks/index.helpers.ts +52 -0
  83. package/hooks/index.ts +920 -715
  84. package/hooks/use-agentMemory-mtn.ts +29 -31
  85. package/hooks/use-agentMemory-qry.ts +15 -3
  86. package/hooks/use-agentNote-mtn.ts +89 -0
  87. package/hooks/use-agentNote-qry.ts +162 -0
  88. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  89. package/hooks/use-agentNote-recovery.ts +57 -0
  90. package/hooks/use-aiChat-mtn.ts +104 -115
  91. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  92. package/hooks/use-aiChat-qry.ts +254 -387
  93. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  94. package/hooks/use-audience-mtn.ts +170 -0
  95. package/hooks/use-audience-qry.helpers.ts +39 -0
  96. package/hooks/use-audience-qry.ts +245 -0
  97. package/hooks/use-auth-mtn.ts +30 -1
  98. package/hooks/use-billing-mtn.ts +31 -0
  99. package/hooks/use-billing-qry.ts +76 -0
  100. package/hooks/use-dataTable-mtn.ts +23 -115
  101. package/hooks/use-dataTable-qry.ts +69 -914
  102. package/hooks/use-email-mtn.ts +26 -0
  103. package/hooks/use-email-qry.helpers.ts +37 -0
  104. package/hooks/use-email-qry.ts +44 -174
  105. package/hooks/use-emailOutreach-mtn.ts +211 -0
  106. package/hooks/use-emailOutreach-qry.helpers.ts +25 -0
  107. package/hooks/use-emailOutreach-qry.ts +367 -0
  108. package/hooks/use-emailOutreachReplyReport-qry.ts +46 -0
  109. package/hooks/use-fieldDoc-mtn.ts +244 -32
  110. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  111. package/hooks/use-fieldDoc-qry.ts +134 -102
  112. package/hooks/use-inboundContact-qry.ts +7 -9
  113. package/hooks/use-library-qry.ts +233 -0
  114. package/hooks/use-log-mtn.ts +25 -12
  115. package/hooks/use-log-qry.ts +99 -46
  116. package/hooks/use-organization-qry.ts +16 -60
  117. package/hooks/use-qrCode-mtn.ts +40 -0
  118. package/hooks/use-qrCode-qry.ts +78 -0
  119. package/hooks/use-schedule-mtn.ts +231 -348
  120. package/hooks/use-schedule-qry.ts +208 -139
  121. package/hooks/use-schedule-reactive.ts +218 -0
  122. package/hooks/use-sheet-mtn.ts +91 -199
  123. package/hooks/use-sheet-qry.ts +88 -237
  124. package/hooks/use-storage-qry.ts +84 -61
  125. package/hooks/use-workflow-mtn.ts +84 -23
  126. package/hooks/use-workflow-qry.ts +60 -61
  127. package/libs/ai-chat-link-events.ts +78 -0
  128. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  129. package/libs/ai-chat-outgoing.ts +11 -0
  130. package/libs/ai-chat-outgoing.types.ts +25 -0
  131. package/libs/ai-chat-run-realtime.ts +20 -0
  132. package/libs/ai-chat-submission-realtime.ts +150 -0
  133. package/libs/data-changes.helpers.ts +161 -0
  134. package/libs/data-changes.ts +382 -0
  135. package/libs/fragment-realtime-sequence.ts +55 -0
  136. package/libs/open-sheet.ts +138 -0
  137. package/libs/record-read.ts +327 -0
  138. package/libs/sheet-command-batch.ts +45 -0
  139. package/libs/sheet-realtime-packet.ts +53 -0
  140. package/libs/sheet-view-realtime-router.ts +99 -0
  141. package/loaders/emailPreference.ts +69 -0
  142. package/loaders/rest.ts +12 -0
  143. package/package.json +77 -25
  144. package/schedule.d.ts +1183 -0
  145. package/sse.helpers.ts +19 -0
  146. package/sse.ts +26 -115
  147. package/types.d.ts +48 -25
  148. package/cache/index.test.ts +0 -881
  149. package/client/data-table-realtime-subscriptions.test.ts +0 -740
  150. package/client/data-table-realtime-subscriptions.ts +0 -955
  151. package/client/data-table-realtime.test.ts +0 -792
  152. package/client/data-table-realtime.ts +0 -1218
  153. package/client/fragment-realtime-sequence.ts +0 -52
  154. package/client/open-sheet.ts +0 -137
  155. package/client/request-managed-session.test.ts +0 -574
  156. package/client/request-no-store.test.ts +0 -157
  157. package/client/sse-ticket.test.ts +0 -26
  158. package/deno.lock +0 -170
  159. package/deno.test.json +0 -10
  160. package/gql/fragments/agentDocFragments.ts +0 -46
  161. package/gql/fragments/billingFragments.ts +0 -14
  162. package/gql/fragments/campaignFragments.ts +0 -277
  163. package/gql/mutations/agentDocMutations.ts +0 -177
  164. package/gql/mutations/campaignMutations.ts +0 -215
  165. package/gql/queries/agentDocQueries.ts +0 -120
  166. package/gql/queries/appQueries.ts +0 -14
  167. package/gql/queries/campaignQueries.ts +0 -127
  168. package/hooks/use-agentDoc-mtn.ts +0 -285
  169. package/hooks/use-agentDoc-qry.ts +0 -208
  170. package/hooks/use-app-qry.ts +0 -22
  171. package/hooks/use-campaign-mtn.ts +0 -377
  172. package/hooks/use-campaign-qry.ts +0 -257
  173. package/loaders/campaign.ts +0 -137
  174. package/tsconfig.json +0 -13
@@ -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,